CN114443109A - Patch repair method, electronic device, and storage medium - Google Patents

Patch repair method, electronic device, and storage medium Download PDF

Info

Publication number
CN114443109A
CN114443109A CN202110814045.2A CN202110814045A CN114443109A CN 114443109 A CN114443109 A CN 114443109A CN 202110814045 A CN202110814045 A CN 202110814045A CN 114443109 A CN114443109 A CN 114443109A
Authority
CN
China
Prior art keywords
patch
area
patch data
data
repair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110814045.2A
Other languages
Chinese (zh)
Other versions
CN114443109B (en
Inventor
代常凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110814045.2A priority Critical patent/CN114443109B/en
Publication of CN114443109A publication Critical patent/CN114443109A/en
Application granted granted Critical
Publication of CN114443109B publication Critical patent/CN114443109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a patch repairing method, electronic equipment and a storage medium, and relates to the technical field of terminals. The method comprises the following steps: determining a first area and a second area from a storage partition of the electronic equipment, acquiring first patch data, and storing the first patch data in the first area; if second patch data corresponding to the software to which the first patch data belongs is stored in the second area, merging the first patch data and the second patch data to obtain target patch data; and performing patch repair according to the target patch data. By utilizing the method and the device, only the content needing to be repaired needs to be concerned in the research and development stage, and the previous patch repairing content does not need to be additionally concerned due to the maintenance and collection relation, so that the cost of updating, research and development and testing can be reduced, the period of waiting for updating by a user is shortened, and the efficiency of patch repairing is improved.

Description

Patch repair method, electronic device and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a patch repair method, an electronic device, and a storage medium.
Background
Manufacturers often update the software version of the end product, for example, to update new features or repair problems in the end software on the end product. The current common software update approach is implemented by replacing the entire software version. However, performing replacement updates to the entire software version may result in increased development and testing costs, and the period for a user to wait for an update may also be increased.
Disclosure of Invention
In view of the foregoing, there is a need to provide a patch repair method, an electronic device, and a storage medium, which can reduce the cost of development and testing of updates, shorten the period for a user to wait for an update, and improve the efficiency of patch repair.
In a first aspect, the present application provides a patch repair method, which is applied to an electronic device, and includes: determining a first area and a second area from a storage partition of the electronic equipment, acquiring first patch data, and storing the first patch data in the first area; if second patch data corresponding to the software to which the first patch data belongs is stored in the second area, merging the first patch data and the second patch data to obtain target patch data; and performing patch repair according to the target patch data.
By the technical scheme, differential upgrading of the double partitions is realized, only the content needing to be repaired needs to be paid attention to in the research and development stage, the previous patch repairing content does not need to be paid attention to additionally due to the maintenance and editing relation, the speed of generating the patch package can be accelerated, meanwhile, the efficiency of testing the patch package is improved as the patch package does not need to contain the previous patch repairing content, and the efficiency of patch repairing can be improved from multiple aspects. Meanwhile, the patch package does not need to contain the previous patch repair content, the size of the patch package is reduced, the flow cost in the pushing process can be saved, and the performance requirement on the bandwidth is reduced.
In one possible implementation, determining the first area and the second area from a memory partition of the electronic device includes: determining a patch partition for storing a patch in a storage partition, and a start address and an end address corresponding to the patch partition; based on the start address and the end address, a first region and a second region are determined. Through the technical scheme, the first area and the second area are determined according to the starting address and the ending address corresponding to the patch partition, and the efficiency of determining the first area and the second area can be improved.
In one possible implementation, determining the first area and the second area based on the start address and the end address includes: acquiring historical patch data; determining the partition proportion of the first area and the second area according to the historical patch data; determining an intermediate address in the patch partition based on the partition proportion; and determining the first area and the second area according to the starting address, the middle address and the ending address. According to the technical scheme, the partition proportion is determined according to the historical patch data, the first area and the second area are determined based on the partition proportion, and the accuracy of determining the first area and the second area can be improved.
In one possible implementation, storing the patch data to the first area includes: acquiring a partition table corresponding to the electronic equipment, and determining the position information of the first area according to the partition table; and storing the first patch data to the first area according to the position information. By the technical scheme, the partition table is inquired, and the rate of determining the first area can be increased.
In one possible implementation manner, merging the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area includes: converting the first patch data of the first region into a binary file based on binary processing; and writing the binary file into the second area, so that the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area are merged. By the technical scheme, the first patch data are converted into the binary file, and the merging efficiency of the first patch data and the second patch data can be improved.
In one possible implementation manner, merging the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area includes: packing the first patch data of the first area into an image file based on image processing; and writing the image file into the second area, so that the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area are merged. By means of the technical scheme, the first patch data are converted into the image file, the first patch data can be prevented from being lost in the merging process, and the merging efficiency of the first patch data and the second patch data is improved.
In one possible implementation, the method further includes: and if the second patch data corresponding to the software to which the first patch data belongs does not exist in the second area, performing patch repair based on the first patch data in the first area. By the technical scheme, when the second patch data corresponding to the software to which the first patch data belongs does not exist in the second area, patch repair is directly performed on the basis of the first patch data of the first area, and patch repair efficiency can be improved.
In a possible implementation manner, after merging the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area, the method includes: and clearing the first patch data of the first area. By the technical scheme, after the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area are combined, the first patch data of the first area are removed, and the occupation of a memory can be reduced.
In a second aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor; wherein the memory is used for storing program instructions; a processor for reading program instructions stored in the memory to implement the patch repair method as described above.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-readable instructions are stored, and when executed by a processor, the computer-readable instructions implement the patch repair method as described above.
In addition, the technical effects brought by the second aspect and the third aspect can be referred to the description related to the methods designed in the above methods, and are not described herein again.
Drawings
Fig. 1 is a schematic view of a conventional patch repair method.
Fig. 2 is a schematic view of a scene of a patch partition according to an embodiment of the present disclosure.
Fig. 3a to 3c are schematic scene diagrams of a patch repair method according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of a patch repair method according to an embodiment of the present application.
Fig. 5a to 5c are schematic scene diagrams of another patch repair method provided in the embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, the words "exemplary," "or," "for example," etc. are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary," "or," "e.g.," are intended to present relevant concepts in a concrete fashion.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that in this application, "/" means "or" means "unless otherwise indicated. For example, A/B may represent A or B. In the present application, "and/or" is only one kind of association relation describing an associated object, and means that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. "at least one" means one or more and "a plurality" means two or more than two. For example, at least one of a, b, or c, may represent: a, b, c, a and b, a and c, b and c, a, b and c.
To meet the user requirements, manufacturers usually update the software version of the terminal product, for example, update new features for the terminal software on the terminal product or repair problems in the terminal software. The current common software update approach is implemented by replacing the entire software version. Performing replacement updating on the whole software version will increase the cost of development and testing, and the period for the user to wait for updating will also become longer. Because the dependence of the current user on the terminal device is stronger and stronger, manufacturers (such as terminal manufacturers, application manufacturers and the like) often encounter some problems needing urgent repair solution, and at this time, the problem needing urgent repair solution is not usually processed by updating the whole software version, but is solved by adopting a patch repair mode. The patch repair mode can reduce the cost of research and development and testing, and shorten the period of waiting for updating for a user.
Limited by the underlying design of the terminal electronic device, the patch validation method may be: a Memory area (hereinafter, simply referred to as a "patch partition") is divided in advance in a Read-Only Memory (ROM) of an electronic device for storing a patch. The repair content in the patch needs to be effective depending on the mounting of the patch partition, the electronic device can only erase and take effect of the whole patch partition, and the patch repair cannot be performed differentially, so that the terminal can only perform the patch repair for multiple times through a collected patch repair mode under the scenes of repeated repair and patch problem repair.
The patch repair mode of the collection and edition means that a new patch of the same software version needs to carry the repair content of the last patch, for example, the content of the second patch needs to include the content of the first patch, the content of the third patch needs to include the content of the second patch, and the effective performance of the patch is considered as a coverage relation. For example, patch 01 represents content patched for the first time, patch 02 represents content patched for the second time, and patch 03 represents content patched for the third time, where patch 02 includes all modifications in patch 01 and patch 03 includes all modifications in patch 02.
As shown in fig. 1, a patch repair (patch 01) for the first time needs to be performed on a bug a (code) of a certain version of terminal software, a patch package needed by the patch 01 includes repair content corresponding to the bug a, a manufacturer pushes the repair content corresponding to the repair bug a to a terminal user, the terminal user downloads the patch package needed by the patch 01 to a patch partition in an electronic device ROM through a network download or the like, and then a system of the electronic device realizes obtaining and validating the patch content by mounting the patch partition. If the version of the terminal software has a bug B (code number), a second patch repair (patch 02) is required to repair the bug B, and the patch package corresponding to the patch 02 needs to contain the repair content corresponding to the bug B (code number). Because the patch 02 patch can cover the content of the original patch partition in the actual validation process, for example, the content of the last patch repair can be covered in the validation process, and the whole patch becomes effective, the patch package corresponding to the patch 02 also needs to contain the content of the last patch repair, that is, the patch package corresponding to the patch 02 needs to include the content of the patch package corresponding to the patch 01, and the patch package corresponding to the patch 02 needs to include the contents of the repair bug a and the repair bug B. That is, a manufacturer needs to push the repair content corresponding to the repair bug a and the repair content corresponding to the repair bug B to an electronic device user, a terminal user downloads a patch package required by patch 02 to a patch partition in an electronic device ROM through a network, and then a system of the electronic device mounts the patch partition to enable the patch content to be obtained and take effect.
Due to the requirement of patch collection and compilation, all the repair contents in the last patch package of the same version must be collected and compiled in the current patch package of the terminal software, so that the previous patch package needs to be carefully checked when the patch package is released, so that the problem that the existing function on the terminal software fails or is repaired is avoided. In actual research and development, the time span of releasing a patch every time is long, developers are difficult to clearly remember historical repair contents, quality problems such as missing synthesis and wrong synthesis are easily caused, and the efficiency of patch repair is low. Meanwhile, due to the receiving and editing relationship, the patch packages pushed by manufacturers are larger and larger, but the content pushed each time is repeated, so that the server consumes more bandwidth and flow cost. Moreover, the patch package is systematically tested before being pushed to the electronic device, and due to the receiving and editing relationship, the same content of the patch package is repeatedly pushed, so that the same content needs to be tested again based on the patch package each time, the workload of the test is greatly increased, the cost of the update research and development and the test is increased, the period of the user waiting for the update is also prolonged, and the efficiency of patch repair is low.
In order to solve the technical problem of low patch repair efficiency, an embodiment of the present application provides a patch repair method to reduce costs of update research and development and testing, shorten a period for a user to wait for update, and improve patch repair efficiency.
Fig. 2 is a schematic view of a scenario of a patch repair method according to an embodiment of the present application. The patch is partitioned into two areas, wherein one area is used for receiving the pushed patch package and transmitting the received patch package to the other area, the other area is used for carrying out synthesis processing according to the transmitted patch package and one or more stored patch packages of previous versions corresponding to the transmitted patch package, mounting validation is realized according to the synthesized patch package, the patch repair of the time is completed, and the defects that differential design cannot be realized and the patch repair is accepted and updated can be solved by partitioning the patch into the two areas, so that the patch repair efficiency is improved. If the other area does not store the patch package of the previous version corresponding to the transmitted patch package, the patch can be directly mounted and validated according to the transmitted patch package, and patch repair is completed.
As shown in fig. 2, a patch partition may be 128M in size, and is divided into two regions: patch a (patch a) region and patch B (patch B) region, where patch a region may be 96M and patch B region may be 32M. The size of the patch partition may be other sizes, the divided patch area may also be other sizes, and the specific numerical values of the size of the patch partition and the size of the divided patch area are only illustrated here by way of example and are not limited. The patch B area is used for receiving the pushed patch package and transmitting the received patch package to the patch A area, the patch A area receives the patch package transmitted by the patch B area, merges the received patch package and the corresponding patch package of the previous version, and realizes mounting effect based on the merged patch package to finish the patch repair of the time. For example, after receiving the patch package transmitted by the patch B area in the patch a area, the patch package transmitted by the patch B area and the patch package existing in the patch a area in advance are synthesized, and the synthesized patch package is mounted to take effect, thereby completing the patch repair.
For example, referring to the first patch repair (patch 01) shown in fig. 3a, a vulnerability Q needs to be repaired, and a manufacturer pushes a patch package with repair content corresponding to the vulnerability Q to an electronic device: and patch Q. And the patch B area receives the pushed patch package (such as a patch Q) and transmits the patch Q to the patch A area, and the patch A area receives the patch Q and realizes the mounting effect according to the patch Q to complete the first patch repair.
Referring to the second patch repair (patch 02) shown in fig. 3b, the bug W needs to be repaired, and the manufacturer pushes a patch package for repairing the bug W to the electronic device: and a patch W. patch B district receives the patch W of propelling movement to deliver patch W to patch A district, patch A district receives patch W, and synthesizes original patch Q and patch W, according to the content after the synthesis: and patch Q + patch W, so that mounting is effective, and secondary patch repair is completed.
Referring to the third patch repair (patch 03) shown in fig. 3c, the vulnerability E needs to be repaired, and the vendor pushes a patch package for repairing the vulnerability E to the electronic device: patch E, patch B district receives the patch E of propelling movement to deliver patch E to patch A district, patch A district receives patch E, and synthesizes original patch Q, patch W and patch E, according to the content after the synthesis: and patch Q + patch W + patch E, the mounting effect is realized, and the third patch repair is completed.
As shown in fig. 3a to 3c, in each patch repair, as long as a manufacturer pays attention to a current bug to be repaired, the manufacturer directly pushes a patch package corresponding to the current bug to the electronic device, and does not need to pay attention to a corresponding patch package in a previous patch repair process, and the electronic device synthesizes the patch package corresponding to the current bug to be repaired and the corresponding patch package in the previous patch repair process, and implements the current patch repair according to the synthesized patch package.
In the embodiment, the dual partitions are used for differential upgrading, only the content needing to be repaired at this time needs to be paid attention in the research and development stage, and the previous patch repairing content does not need to be paid attention additionally due to the maintenance and editing relation, so that the speed of generating the patch package can be increased, meanwhile, the efficiency of testing the patch package is improved because the patch package does not contain the previous patch repairing content, and the efficiency of patch repairing can be improved from multiple aspects. Meanwhile, the patch package does not need to contain the previous patch repair content, the size of the patch package is reduced, the flow cost in the pushing process can be saved, and the performance requirement on the bandwidth is reduced.
Referring to fig. 4, a flowchart of a patch repair method according to an embodiment of the present application is shown. The method can be applied to different types of electronic devices, such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, an intelligent home device, and/or a city device. The method specifically comprises the following steps:
s40, determining the first area and the second area from the storage partition of the electronic device.
In some embodiments of the present application, an area is preset in a memory partition of an electronic device for storing a patch, and the area is referred to as a patch partition. The patch partition may be divided based on a start address and an end address corresponding to the patch partition, and the first area and the second area may be determined. The first area and the second area are determined according to the starting address and the ending address corresponding to the patch partition, and the efficiency of determining the first area and the second area can be improved.
For example, the area may be divided according to the start address, the end address and the partition rule corresponding to the patch partition. The partition rule may include obtaining historical patch data and determining partition proportions according to the historical patch data; an intermediate address is determined in the patch partition according to the partition ratio, for example, an address is determined as the intermediate address from among addresses between the start address and the end address according to the partition ratio. And determining the position of the first area according to the starting address, the middle address and the ending address. Partition proportion can be determined according to the size of historical patch data; and determining an intermediate address in the patch partition according to the partition proportion, thereby determining the positions and sizes of the first area and the second area. For example, a region between the start address and the intermediate address is determined as a first region, and a region between the intermediate address and the end address is determined as a second region; or determining the area from the middle address to the end address as a first area and determining the area from the start address to the middle address as a second area.
For example, it is determined from the historical patch data that the patch data is small each time, the partition ratio of the first area to the second area is determined to be 1:3, and if the size of the patch partition is 128M, the first area is determined to be 32M, and the second area is determined to be 96M. The specific values of the partition ratio and the patch partition size are only illustrated here by way of example, and are not limited at all, and the partition ratio may be other ratios, and the patch partition size may also be other sizes. The partition proportion is determined according to the historical patch data, the first area and the second area are determined based on the partition proportion, and accuracy of determining the first area and the second area can be improved.
And S41, acquiring the pushed first patch data, and storing the acquired first patch data in a first area.
The first patch data may be used to update or repair a system or some software in the electronic device. For example, updating a new feature or fixing a problem in a system or in some software.
In some embodiments of the present application, patch data pushed by a vendor may be obtained based on a patch repair instruction. The patch repair instruction may be generated based on a user clicking on some related interactive messages, such as whether to repair a patch or to perform an update. For example, if the user selects a repair patch or selects an update, a patch repair instruction is generated.
In some embodiments of the present application, a partition table corresponding to the electronic device may be obtained, and location information corresponding to the first area is determined according to the partition table, where the location information of the first area includes a start address and an end address corresponding to the first area. The electronic device has a partition table for recording information about the partitions. For example, each electronic device in ANDROID includes a partition table, such as partition. The partition table may include a start address, an end address, and a size for each partition. By querying the partition table, the rate at which the first region is determined may be increased.
For example, based on a partition table in the electronic device, a start address and an end address corresponding to the first region are queried, and a corresponding storage instruction may be called according to the start address and the end address, so as to store the patch data in the first region.
S42, if the second area stores second patch data corresponding to the software to which the first patch data belongs, merging the first patch data and the second patch data to obtain target patch data.
The software may include systems and applications, etc. For convenience of description, the patch data to be merged in the two regions mentioned in this embodiment is the patch data for the same application or system.
The target patch data comprises first patch data of the first area and second patch data corresponding to software to which the first patch data in the second area belongs. The second patch data corresponding to the software to which the first patch data belongs in the second area may include second patch data corresponding to the same version of the software to which the first patch data belongs in the second area. For example, the second patch data corresponding to the software to which the first patch data belongs in the second region may be a patch packet corresponding to the last patch repair of the same version of the software to which the first patch data belongs.
For example, the first patch data in the first region may be merged with the second patch data corresponding to the software to which the first patch data belongs in the second region through a mount mechanism, for example, the merging may be performed depending on the end-side capability.
In some embodiments of the present application, the merging the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area may include: storing the first patch data of the first area into a second area; and if the first patch data of the first area are stored in the second area, merging the first patch data of the first area with second patch data corresponding to software to which the first patch data in the second area belong.
In some embodiments of the present application, the first patch data of the first area is copied to the second area based on binary processing, so that the first patch data of the first area is merged with the second patch data corresponding to the software to which the first patch data belongs in the second area. For example, the first patch data of the first area may be converted into a binary file, and the obtained binary file is written into the second area, so that the first patch data of the first area is merged with the second patch data corresponding to the software to which the first patch data in the second area belongs. By converting the first patch data into a binary file, the efficiency of merging the first patch data and the second patch data can be improved.
In some embodiments of the present application, based on mirroring, the first patch data of the first area is copied to the second area, so that the first patch data of the first area is merged with the second patch data corresponding to the software to which the first patch data belongs in the second area. The first patch data of the first area may be packaged into an image file, and the obtained image file is written into the second area, so that the first patch data of the first area and the second patch data corresponding to the software to which the first patch data in the second area belongs are merged. For example, the first patch data of the first region is decompressed to obtain a decompressed file. And reversely packaging the decompressed file into an image file. By converting the first patch data into the image file, the first patch data can be prevented from being lost in the merging process, and the merging efficiency of the first patch data and the second patch data is improved.
And S43, performing patch repair according to the target patch data.
And realizing mounting and taking effect on the target patch data in the second area, and completing the patch repair.
In some embodiments of the present application, if second patch data corresponding to software to which the first patch data belongs does not exist in the second area, patch repair is performed based on the first patch data in the first area, and the first patch data in the first area is stored in the second area. For example, the first patch data in the first area may be stored to the second area after patch repair is performed based on the first patch data in the first area.
For example, in the first patch repair process, the electronic device obtains the pushed patch data and stores the obtained patch data in the first area, and at this time, the second area does not store second patch data corresponding to software to which the first patch data belongs, and the first patch repair can be completed based on the first patch data in the first area. And storing the first patch data of the first area to the second area after the first patch is repaired.
When the second patch data corresponding to the software to which the first patch data belongs does not exist in the second area, patch repair is directly performed based on the first patch data of the first area, and patch repair efficiency can be improved.
Or if the second area does not have patch data, storing the first patch data in the first area into the second area, and after the storage is finished, performing patch repair based on the patch data in the second area.
In some embodiments of the present application, after merging the first patch data of the first area with the second patch data corresponding to the software to which the first patch data belongs in the second area, the method further includes: and clearing the first patch data of the first area. After the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area are merged, the first patch data of the first area is removed, so that the occupation of a memory can be reduced.
In some embodiments of the present application, the method further comprises: determining software corresponding to the first patch data, and if patch data corresponding to the historical version of the software exists in the second area, removing the patch data corresponding to the historical version of the software in the second area. The software is updated and is changed into a new version, and patch data corresponding to the historical version of the software is cleared, so that the occupation of a memory can be reduced.
In the embodiment, the obtained patch data is stored in the first area, the first patch data stored in the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area are merged to obtain the target patch data, and the patch repair is completed based on the target patch data. The differential upgrading of the dual partitions is realized, only the content needing to be repaired at this time needs to be paid attention in the research and development stage, the previous patch repairing content does not need to be paid attention additionally due to the maintenance and editing relation, the speed of generating the patch package can be accelerated, meanwhile, the efficiency of testing the patch package is improved as the patch package does not need to contain the previous patch repairing content, and the efficiency of patch repairing can be improved from multiple aspects. Meanwhile, the patch package does not need to contain the previous patch repair content, the size of the patch package is reduced, the flow cost in the pushing process can be saved, and the performance requirement on the bandwidth is reduced.
Fig. 5a to 5c are schematic scene diagrams of another patch repair method according to an embodiment of the present disclosure.
Referring to the first patch repair (patch 01) shown in fig. 5a, the pushed patch data a is acquired, the acquired patch data a is stored in the first area, the first patch data a of the first area is stored in the second area, the target patch data a is acquired, the mounting is realized to be effective based on the second area, and the first patch repair is completed.
Referring to the second patch repair (patch 02) shown in fig. 5B, obtaining pushed patch data B, storing the obtained patch data B in the first area, storing the first patch data B of the first area in the second area, and merging the first patch data B with second patch data a corresponding to software to which the first patch data in the second area belongs to obtain target patch data: patch data a + patch data B. And storing the target patch data into the second area, realizing mounting effect based on the second area, and completing second patch repair.
Referring to the third patch repair (patch 03) shown in fig. 5C, the pushed patch data C is obtained, the obtained patch data C is stored in the first area, and the first patch data C in the first area is stored in the second area, where the second patch data corresponds to the software to which the first patch data in the second area belongs: merging the patch data A + the patch data B to obtain target patch data: patch data-a + patch data-B + patch data-C. And storing the target patch data into the second area, realizing mounting effect based on the second area, and completing third patch repair.
The patch repair method in the foregoing embodiments may be applied to an electronic device, as shown in fig. 6, where fig. 6 is a schematic structural diagram of an electronic device 100 provided in this embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments of the present application, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments of the present application, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments of the present application, the processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments of the present application, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments of the present application, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement the function of answering a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments of the present application, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments of the present application, the audio module 170 may also transmit the audio signal to the wireless communication module 160 through the PCM interface, so as to implement the function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments of the present application, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments of the present application, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments of the present application, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments of the present application, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices 100, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments of the present application, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments of the present application, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments of the present application, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments of the present application, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150 and the antenna 2 is coupled with the wireless communication module 160 so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments of the present application, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments of the present application, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments of the present application, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like; the nonvolatile memory may include a magnetic disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, may include single-level cells (SLC), multi-level cells (MLC), three-level cells (TLC), four-level cells (QLC), etc. according to the level order of the memory cells, and may include universal FLASH memory (UFS), embedded multimedia memory cards (eMMC), etc. according to the storage specification.
The random access memory may be read and written directly by the processor 110, may be used to store executable programs (e.g., machine instructions) of an operating system or other programs in operation, and may also be used to store data of users and applications, etc.
The nonvolatile memory may also store executable programs, data of users and application programs, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect an external nonvolatile memory to extend the storage capability of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are saved in an external nonvolatile memory.
The external memory interface 120 or the internal memory 121 is used to store one or more computer programs. One or more computer programs are configured to be executed by the processor 110. The one or more computer programs include instructions which, when executed by the processor 110, implement the patch repair method performed on the electronic device 100 in the above embodiments.
In one embodiment, the processor 110 executes the plurality of instructions to implement a patch repair method: acquiring first patch data and storing the first patch data to the first area; if second patch data corresponding to the software to which the first patch data belongs is stored in the second area, merging the first patch data and the second patch data to obtain target patch data; and performing patch repair according to the target patch data.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments of the present application, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be an open mobile electronic device 100 platform (OMTP) standard interface of 3.5mm, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments of the present application, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments of the present application, touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments of the present application, the angular velocity of the electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by the gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments of the present application, the electronic device 100 calculates altitude, aiding positioning and navigation, from the barometric pressure value measured by the barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments of the present application, when the electronic device 100 is a flip, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment 100, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments of the present application, the electronic device 100 may utilize the distance sensor 180F to measure distance to achieve fast focus when shooting a scene.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic apparatus 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments of the present application, the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments of the present application, the bone conduction sensor 180M may acquire a vibration signal of the human voice vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments of the present application, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 may be inserted into multiple frame cards simultaneously. The types of the multi-frame cards can be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments of the present application, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The present embodiment also provides a computer storage medium, in which a computer program is stored, where the computer program includes computer instructions, and when the computer program runs on the electronic device 100, the electronic device 100 executes the related method to implement any one of the patch repair methods in the foregoing embodiments.
The present embodiment also provides a computer program product comprising computer executable instructions stored on a non-volatile storage medium, which when run on the electronic device 100, cause the electronic device 100 to perform the related method described above, so as to implement any one of the patch repair methods in the above embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the apparatus runs, the processor may execute the computer execution instructions stored in the memory, so as to make the chip execute any one of the patch repair methods in the above-mentioned method embodiments.
The electronic device 100, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding methods provided above, so that the beneficial effects achieved by the electronic device may refer to the beneficial effects in the corresponding methods provided above, and are not described herein again.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the module or unit is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application and not for limiting, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made to the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.

Claims (10)

1. A patch repair method is applied to an electronic device, and is characterized by comprising the following steps:
determining a first area and a second area from a storage partition of the electronic equipment;
acquiring first patch data and storing the first patch data to the first area;
if second patch data corresponding to the software to which the first patch data belongs is stored in the second area, merging the first patch data and the second patch data to obtain target patch data;
and performing patch repair according to the target patch data.
2. The patch repair method of claim 1, wherein the determining the first region and the second region from the memory partition of the electronic device comprises:
determining a patch partition for storing a patch in a storage partition, and a start address and an end address corresponding to the patch partition;
determining the first region and the second region based on the start address and the end address.
3. The method of patch repair of claim 2, wherein the determining a first region and a second region based on the starting address and the ending address comprises:
acquiring historical patch data;
determining the partition proportion of the first area and the second area according to the historical patch data;
determining an intermediate address in the patch partition based on the partition proportion;
and determining a first area and a second area according to the starting address, the middle address and the ending address.
4. The patch repair method according to claim 1, wherein the storing the patch data to the first area comprises:
acquiring a partition table corresponding to the electronic equipment, and determining the position information of the first area according to the partition table;
and storing the first patch data to the first area according to the position information.
5. The patch repair method according to claim 1, wherein the merging of the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area comprises:
converting the first patch data of the first region into a binary file based on binary processing;
and writing the binary file into the second area, so that the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area are merged.
6. The patch repair method according to claim 1, wherein the merging of the first patch data of the first area and the second patch data corresponding to the software to which the first patch data belongs in the second area comprises:
packing the first patch data of the first area into an image file based on image processing;
and writing the image file into the second area, so that the first patch data of the first area and the second patch data corresponding to the software to which the first patch data in the second area belongs are merged.
7. A method of patch repair as claimed in claim 1, the method further comprising:
and if the second patch data corresponding to the software to which the first patch data belongs does not exist in the second area, performing patch repair based on the first patch data in the first area.
8. The patch repair method according to any one of claims 1 to 7, wherein after merging the first patch data of the first area with the second patch data corresponding to the software to which the first patch data belongs in the second area, the method includes:
and clearing the first patch data of the first area.
9. An electronic device, comprising a memory and a processor;
the memory to store program instructions;
the processor, configured to read the program instructions stored in the memory to implement the patch repair method according to any one of claims 1 to 8.
10. A computer-readable storage medium having computer-readable instructions stored thereon which, when executed by a processor, implement the patch repair method of any one of claims 1 to 8.
CN202110814045.2A 2021-07-19 2021-07-19 Patch repair method, electronic device and storage medium Active CN114443109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110814045.2A CN114443109B (en) 2021-07-19 2021-07-19 Patch repair method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110814045.2A CN114443109B (en) 2021-07-19 2021-07-19 Patch repair method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114443109A true CN114443109A (en) 2022-05-06
CN114443109B CN114443109B (en) 2023-08-22

Family

ID=81362575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110814045.2A Active CN114443109B (en) 2021-07-19 2021-07-19 Patch repair method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114443109B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700740A (en) * 2022-09-29 2023-09-05 荣耀终端有限公司 Software repairing method and related device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402438A (en) * 2010-09-16 2012-04-04 金蝶软件(中国)有限公司 Automatic merging method and device of patch files and communication terminal
CN103345412A (en) * 2013-07-10 2013-10-09 华为技术有限公司 Patching method and device
CN106951279A (en) * 2017-02-27 2017-07-14 努比亚技术有限公司 The hot repair apparatus for coating and method of application
CN108027741A (en) * 2016-04-27 2018-05-11 华为技术有限公司 Document handling method, device, terminal and storage medium based on patch upgrading
CN110633090A (en) * 2019-08-14 2019-12-31 华为技术有限公司 Patch method, related device and system
CN110990253A (en) * 2019-10-24 2020-04-10 苏州浪潮智能科技有限公司 Method and device for realizing application debugging, computer storage medium and terminal
CN111008034A (en) * 2019-12-02 2020-04-14 网易(杭州)网络有限公司 Patch generation method and device
EP3647944A1 (en) * 2018-10-30 2020-05-06 Shenzhen Goodix Technology Co., Ltd. Memory optimized block-based differential update algorithm
US20200356358A1 (en) * 2019-05-07 2020-11-12 Dell Products L.P. Systems and methods for incrementally and dynamically updating firmware

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402438A (en) * 2010-09-16 2012-04-04 金蝶软件(中国)有限公司 Automatic merging method and device of patch files and communication terminal
CN103345412A (en) * 2013-07-10 2013-10-09 华为技术有限公司 Patching method and device
CN108027741A (en) * 2016-04-27 2018-05-11 华为技术有限公司 Document handling method, device, terminal and storage medium based on patch upgrading
CN106951279A (en) * 2017-02-27 2017-07-14 努比亚技术有限公司 The hot repair apparatus for coating and method of application
EP3647944A1 (en) * 2018-10-30 2020-05-06 Shenzhen Goodix Technology Co., Ltd. Memory optimized block-based differential update algorithm
US20200356358A1 (en) * 2019-05-07 2020-11-12 Dell Products L.P. Systems and methods for incrementally and dynamically updating firmware
CN110633090A (en) * 2019-08-14 2019-12-31 华为技术有限公司 Patch method, related device and system
CN110990253A (en) * 2019-10-24 2020-04-10 苏州浪潮智能科技有限公司 Method and device for realizing application debugging, computer storage medium and terminal
CN111008034A (en) * 2019-12-02 2020-04-14 网易(杭州)网络有限公司 Patch generation method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
潘璠 等: "一种改进的补丁比较模型的研究与实现", 《南京邮电大学学报(自然科学版)》 *
潘璠 等: "一种改进的补丁比较模型的研究与实现", 《南京邮电大学学报(自然科学版)》, 30 April 2012 (2012-04-30), pages 75 - 83 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700740A (en) * 2022-09-29 2023-09-05 荣耀终端有限公司 Software repairing method and related device
CN116700740B (en) * 2022-09-29 2024-06-04 荣耀终端有限公司 Software repairing method and related device

Also Published As

Publication number Publication date
CN114443109B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
CN113704014B (en) Log acquisition system, method, electronic device and storage medium
CN109559270B (en) Image processing method and electronic equipment
CN110515646B (en) Differential upgrading method and related equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN114461057A (en) VR display control method, electronic device and computer readable storage medium
CN117130541B (en) Storage space configuration method and related equipment
CN112667306A (en) Method, device and storage medium for installing plug-in
CN114546969A (en) File sharing method and device and electronic equipment
CN113438643B (en) Terminal capability reporting system, method, electronic equipment and storage medium
CN114880251A (en) Access method and access device of storage unit and terminal equipment
CN114443109B (en) Patch repair method, electronic device and storage medium
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN113901485B (en) Application program loading method, electronic device and storage medium
CN113704209B (en) Data sharing method, electronic device and storage medium
CN113590346B (en) Method and electronic equipment for processing service request
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN114816028A (en) Screen refreshing method, electronic device and computer-readable storage medium
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN116703741B (en) Image contrast generation method and device and electronic equipment
CN116743921B (en) Method for displaying number-carrying network number, electronic equipment and storage medium
CN116841575B (en) Method and related device for generating image file
CN116703691B (en) Image processing method, electronic device, and computer storage medium
CN114942741B (en) Data transmission method and electronic equipment
CN114385282A (en) Theme color conversion method, electronic device, and computer-readable storage medium
CN116935869A (en) Audio data distribution method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant