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

Patch repair method, electronic device and storage medium Download PDF

Info

Publication number
CN114443109B
CN114443109B CN202110814045.2A CN202110814045A CN114443109B CN 114443109 B CN114443109 B CN 114443109B CN 202110814045 A CN202110814045 A CN 202110814045A CN 114443109 B CN114443109 B CN 114443109B
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.)
Active
Application number
CN202110814045.2A
Other languages
Chinese (zh)
Other versions
CN114443109A (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

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

Abstract

The application provides a patch repair 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 into the first area; if the second area stores second patch data corresponding to the software to which the first patch data belongs, combining the first patch data with the second patch data to obtain target patch data; and performing patch repair according to the target patch data. By using the embodiment of the application, the research and development stage only needs to pay attention to the content needing to be repaired at the time, and does not need to pay additional attention to the previous patch repair content because of maintaining the collecting and editing relation, thereby reducing the cost of updating, researching and testing, shortening the period of waiting for updating by a user and improving the patch repair efficiency.

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
Vendors typically update software versions of the end products, for example, to update new features for the end software on the end products or to fix problems in the end software. Currently common software updating is implemented by replacing the entire software version. However, replacement updates to the entire software version can result in increased costs for development and testing, and the period of waiting for an update by the user can also be increased.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a patch repair method, an electronic device, and a storage medium, which reduce the cost of update development and testing, shorten the period for users to wait for update, and improve the patch repair efficiency.
In a first aspect, the present application provides a patch repair method, applied to an electronic device, where the method 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 into the first area; if the second area stores second patch data corresponding to the software to which the first patch data belongs, combining the first patch data with the second patch data to obtain target patch data; and performing patch repair according to the target patch data.
Through the technical scheme, differential upgrading of the double partitions is realized, only the content needing to be repaired at the time is needed to be paid attention to in the research and development stage, the previous patch repair content is not needed to be paid attention to additionally because of maintaining the collecting and editing relation, 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 need to contain the previous patch repair content, and the patch repair efficiency can be improved from multiple aspects. Meanwhile, the patch package does not need to contain the previous patch repair content, so that the size of the patch package is reduced, the traffic cost in the pushing process can be saved, and the performance requirement on bandwidth is reduced.
In one possible implementation, determining the first region and the second region from the memory partition of the electronic device includes: determining a patch partition for storing patches in the storage partition, and a start address and an end address corresponding to the patch partition; the first region and the second region are determined based on the start address and the end address. According to 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, so that the efficiency of determining the first area and the second area can be improved.
In one possible implementation, determining the first region and the second region 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 a first area and a second area according to the starting address, the intermediate address and the ending address. According to the technical scheme, the partition proportion is determined according to the historical patch data, and the first area and the second area are determined based on the partition proportion, so that 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 region 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 queried, so that the rate of determining the first area can be increased.
In one possible implementation manner, 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 includes: converting the first patch data of the first area 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 combined. By the technical scheme, the first patch data are converted into the binary file, so that 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 with the second patch data corresponding to the software to which the first patch data belongs in the second area includes: based on mirror image processing, packaging first patch data of a first area into a mirror image file; 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 belong in the second area are combined. By the technical scheme, the first patch data are converted into the mirror image file, so that the first patch data are 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 based on the first patch data of the first area, so that patch repair efficiency can be improved.
In one possible implementation manner, 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. 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 is cleared, so that the occupation of the memory can be reduced.
In a second aspect, an embodiment of the present application provides an electronic device including a memory and a processor; wherein the memory is used for storing program instructions; and the processor is used for reading the program instructions stored in the memory to realize the patch repair method.
In a third aspect, an embodiment of the present application provides a computer readable storage medium having computer readable instructions stored therein, which when executed by a processor implement a patch repair method as described above.
In addition, the technical effects of the second aspect and the third aspect may be referred to in the description related to the method designed by each of the above method sections, which are not repeated herein.
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 application.
Fig. 3a to 3c are schematic views of a scene of a patch repair method according to an embodiment of the present application.
Fig. 4 is a flowchart of a patch repair method according to an embodiment of the present application.
Fig. 5a to 5c are schematic views of a scene of yet another patch repair method according to an 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
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In describing embodiments of the present application, words such as "exemplary," "or," "such as," and the like are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "or," "such as," and the like are intended to present related 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 application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It is to be understood that, unless otherwise indicated, a "/" means or. For example, A/B may represent A or B. The "and/or" in the present application is merely one association relationship describing the association object, indicating that three relationships 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. For example, at least one of a, b or c may represent: seven cases of a, b, c, a and b, a and c, b and c, a, b and c.
To meet the needs of users, manufacturers often update software versions of the terminal products, for example, to update new features for the terminal software on the terminal products or to repair problems in the terminal software. Currently common software updating is implemented by replacing the entire software version. Replacement updates to the entire software version can result in increased costs for development and testing, as well as longer periods for users to wait for updates. Because the dependency of the current user on the terminal equipment is stronger, manufacturers (such as terminal manufacturers, application manufacturers and the like) often encounter some problems needing urgent repair, and at this time, the problem needing urgent repair is usually not treated by updating the whole software version, but is solved by adopting a patch repair mode. The patch repair method can reduce the cost of research and development and testing, and shorten the period of waiting for updating by a user.
Limited to the underlying design of the terminal electronics, the patch validation may be: a block of storage area (hereinafter, simply referred to as a "patch partition") is divided in advance in a Read-Only Memory (ROM) of the electronic device for storing patches. The repair content in the patch needs to be effective depending on the mounting of the patch partition, and the electronic equipment can only erase and take effect of the whole patch partition and can not differentially repair the patch, so that under the scene of repeated repair and patch problem repair, the terminal can only repair the patch for a plurality of times in a patch repair mode by means of editing.
The patch repairing mode of the receiving and editing refers to repairing content of a patch which needs to be carried by a new patch with the same software and the same version, for example, the content of the second time of patching needs to comprise the content of the first time of patching, the content of the third time of patching needs to comprise the content of the second time of patching, and the effective effect of the patch is represented as an overlay relationship. For example, patch 01 represents the first time patched content, patch 02 represents the second time patched content, patch 03 represents the third time patched content, where patch 02 includes all modifications in patch 01, and patch 03 includes all modifications in patch 02.
As shown in fig. 1, the first patch repair (patch 01) needs to repair a bug a (code) of a certain version of a terminal software, a patch package needed by the patch 01 includes repair contents corresponding to the bug a, a manufacturer pushes the repair contents 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 ROM of an electronic device in a network downloading mode or the like, and then a system of the electronic device realizes the effective acquisition of the patch contents by mounting the patch partition. If the vulnerability B (code number) appears in the version of the terminal software, the patch repair (patch 02) needs to be performed for the second time, and the patch package corresponding to the patch 02 needs to contain repair content corresponding to the vulnerability B (code number). Because the patch 02 patch covers the content in the original patch partition in the actual validation process, for example, the content repaired by the previous patch is covered in the validation process, and then the whole patch is validated, the patch package corresponding to the patch 02 needs to contain the content repaired by the previous patch, namely, the patch package corresponding to the patch 02 needs to contain the content in the patch package corresponding to the patch 01, and the patch package corresponding to the patch 02 needs to contain the content of the repair vulnerability A and the repair vulnerability B. The manufacturer needs to push the repair content corresponding to the repair bug A and the repair content corresponding to the repair bug B to the electronic equipment user, the terminal user downloads the patch package needed by the patch 02 to the patch partition in the ROM of the electronic equipment through the network, and then a system of the electronic equipment realizes the effective acquisition of the patch content through mounting the patch partition.
Because of the requirement of patch collection and editing, all the repair contents in the patch package of the last same version of the current terminal software must be collected and edited, so that when the patch package is released, the previous patch package needs to be carefully checked so as to avoid the reproduction of the problems of the prior function failure or repair on the terminal software. In practical development, the time span of each time of releasing the patch is longer, so that a developer can hardly clearly remember the historical repair content, quality problems such as missing synthesis, error synthesis and the like are easily caused, and the patch repair efficiency is low. Meanwhile, due to the collection and editing relation, 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 subjected to systematic testing before being pushed to the electronic device, and due to the fact that the same content of the patch package is repeatedly pushed, the same content is tested again based on the patch package each time, the testing workload is greatly increased, the cost of updating, researching and testing is increased, the period of waiting for updating by a user is prolonged, and therefore patch repairing efficiency is low.
In order to solve the technical problem of low patch repair efficiency, the embodiment of the application provides a patch repair method to reduce the cost of update development and test, shorten the period of waiting for update by a user and improve the patch repair efficiency.
Referring to fig. 2, a schematic view of a scenario of a patch repair method according to an embodiment of the present application is shown. The method comprises the steps of dividing a patch partition into two areas, wherein one area is used for receiving a pushed patch package, transmitting the received patch package to the other area, synthesizing according to the transmitted patch package and one or more patch packages of previous versions corresponding to the transmitted patch package, and realizing mounting effect according to the synthesized patch package, so that patch repair of the time is completed, the defect that differential design cannot be achieved, the patch repair is completed and upgrading is improved can be overcome by dividing the patch partition into the two areas. If the patch package of the previous version corresponding to the transmitted patch package is not stored in the other area, the patch package 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, dividing the patch partition into two regions: patch a (patch a) region and patch B (patch B) region, wherein patch a region may be 96M and patch B region may be 32M. The size of the patch partition may be other sizes, and the divided patch area may be other sizes, and specific values of the size of the patch partition and the divided patch area size are only given here as examples, and are not limited in any way. 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, the patch B area merges the received patch package with the corresponding patch package of the previous version, and the patch restoration of the time is completed based on the merged patch package to realize the effective mounting. For example, after receiving the patch package transmitted by the patch B area in the patch A area, synthesizing the patch package transmitted by the patch B area with the patch package originally existing in the patch A area, and performing mounting and validating after synthesizing to complete the patch repair.
For example, referring to the first patch repair (patch 01) shown in fig. 3a, a vendor pushes a patch package with repair content corresponding to the vulnerability Q to an electronic device in need of repairing the vulnerability Q: patch Q. The patch B area receives the pushed patch package (such as patch Q) and transmits the patch Q to the patch A area, and the patch A area receives the patch Q and realizes the effective mounting according to the patch Q to complete the first patch repair.
Referring to the second patch repair (patch 02) shown in fig. 3b, a vendor pushes a patch package of the repair vulnerability W to an electronic device, which requires the repair vulnerability W: and (5) patching W. The patch B area receives the pushed patch W and transmits the patch W to the patch A area, the patch A area receives the patch W, the patch Q and the patch W which exist originally are synthesized, and the synthesized patch W is used for receiving the patch W, wherein the patch W is transmitted to the patch A area: and the patch Q and the patch W are subjected to effective mounting, so that the second patch repair is completed.
Referring to the third patch repair (patch 03) shown in fig. 3c, a vendor pushes a patch package for repairing the vulnerability E to an electronic device, where the patch needs to repair the vulnerability E: patch E, patch B receives the pushed patch E and transmits patch E to patch A, patch A receives patch E and synthesizes the original patch Q, patch W and patch E, according to the synthesized content: and the patch Q+patch W+patch E realizes the effective mounting and completes the third patch repair.
As shown in fig. 3a to 3c, in each patch repair, as long as a manufacturer pays attention to a bug that needs to be repaired currently, a patch package corresponding to the current bug is directly pushed to an electronic device, and the electronic device does not need to pay attention to a patch package corresponding to a previous patch repair process, synthesizes the patch package corresponding to the bug that needs to be repaired currently and the patch package corresponding to the previous patch repair process, and realizes current patch repair according to the synthesized patch package.
According to the embodiment, the double partitions are utilized for differential upgrading, only the content needing to be repaired at the time is needed to be paid attention to in the research and development stage, the previous patch repair content is not needed to be paid attention to additionally because of maintaining the collecting and editing relation, 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 repair content, and the patch repair efficiency can be improved from multiple aspects. Meanwhile, the patch package does not need to contain the previous patch repair content, so that the size of the patch package is reduced, the traffic cost in the pushing process can be saved, and the performance requirement on 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 may be applied to different types of electronic devices, which may be mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computer personal computers (UMPC), netbooks, and cellular phones, personal digital assistants (personal digital assistant, PDA), augmented reality (augmented reality, AR) devices, virtual Reality (VR) devices, artificial intelligence (artificial intelligence, AI) devices, wearable devices, vehicle-mounted devices, smart home devices, and/or smart city devices, and the specific types of the electronic devices are not particularly limited in the embodiments of the present application. The method specifically comprises the following steps:
S40, determining a first area and a second area from the storage partition of the electronic equipment.
In some embodiments of the present application, an area is preset in a storage partition of an electronic device for storing a patch, and the area is referred to as a patch partition. The first area and the second area may be determined by dividing the patch partition based on a start address and an end address corresponding to the patch partition. The first area and the second area are determined according to the starting address and the ending address corresponding to the patch partition, so that the efficiency of determining the first area and the second area can be improved.
For example, the area division may be performed according to a start address, an end address, and a partition rule corresponding to the patch partition. The partitioning rule may include obtaining historical patch data and determining a partition proportion based on 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 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 intermediate address and the ending address. The partition proportion can be determined according to the size of the historical patch data; and determining the intermediate address in the patch partition according to the partition proportion, thereby determining the positions and the sizes of the first area and the second area. For example, a region between a start address and an intermediate address is determined as a first region, and a region between an intermediate address and an end address is determined as a second region; or the area between the intermediate address and the end address is determined as a first area, and the area between the start address and the intermediate address is determined as a second area.
For example, it is determined that the patch data is smaller each time according to the historical patch data, the partition ratio of the first area to the second area is determined to be 1:3, 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. Specific values of the partition proportion and the patch partition size are only given by way of example, and the partition proportion may be other proportions, and the patch partition size may be other sizes. The partition proportion is determined according to the historical patch data, and the first area and the second area are determined based on the partition proportion, so that the accuracy of determining the first area and the second area can be improved.
S41, acquiring 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, problems exist in updating new features or repairing a system or some software.
In some embodiments of the present application, patch data pushed by a manufacturer may be obtained based on a patch repair instruction. The patch repair instruction may be generated according to a user click on some relevant interactive messages such as whether to repair the patch or whether to update. For example, if the user selects a repair patch or selects to 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 a first area may be 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 partition. For example, each electronic device in the ANDROID includes a partition table, such as partition. The partition table may include a start address, an end address, and a size of each partition. By consulting the partition table, the rate of determining the first region 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 area are queried, and a corresponding storage instruction can be called according to the start address and the end address to store patch data in the first area.
And S42, if second patch data corresponding to the software to which the first patch data belongs is stored in the second area, combining the first patch data with the second patch data to obtain target patch data.
The software may include systems, applications, and the like. For convenience of description, the patch data to be combined in the two areas mentioned in this embodiment is patch data for the same application or system.
The target patch data comprise first patch data of the first area and second patch data corresponding to software to which the first patch data belong in the second area. 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 area may be a patch package corresponding to a 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 area and the second patch data corresponding to the software to which the first patch data belongs in the second area may be combined by using a mounting mechanism, for example, the combination 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 with the second patch data corresponding to the software to which the first patch data belongs in the second area may include: storing 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 the second patch data corresponding to the software to which the first patch data belong in the second area.
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 combined 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 and the second patch data corresponding to the software to which the first patch data belongs in the second area are combined. 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, the first patch data of the first area is copied to the second area based on mirroring, so that the first patch data of the first area is combined 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 can 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 belongs in the second area are combined. For example, the first patch data of the first area 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.
S43, repairing the patch according to the target patch data.
And realizing effective mounting of the target patch data in the second area, and finishing the patch repair of the time.
In some embodiments of the present application, if 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 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. 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 acquires the pushed patch data, and stores the acquired patch data in the first area, where the second area does not store the second patch data corresponding to the software to which the first patch data belongs, and the first patch repair may be completed based on the first patch data in the first area. And after the first patch repair, storing the first patch data of the first area to the second area.
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, so that patch repair efficiency can be improved.
Or if the second area does not have the patch data, storing the first patch data in the first area into the second area, and performing patch repair based on the patch data in the second area after the storage is completed.
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. The first patch data of the first area is cleared after being combined with the second patch data corresponding to the software to which the first patch data belongs in the second area, so that the occupation of the memory can be reduced.
In some embodiments of the 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, clearing the patch data corresponding to the historical version of the software in the second area. The software is updated and changed into a new version, and patch data corresponding to the historical version of the software is cleared, so that the occupation of the memory can be reduced.
According to the embodiment, the obtained patch data are stored in the first area, the first patch data stored in the first area are combined with the second patch data corresponding to the software to which the first patch data belong in the second area, the target patch data are obtained, and patch repair is completed based on the target patch data. The method realizes differential upgrading of the double partitions, only the content needing repair is required to be paid attention to in the research and development stage, the previous patch repair content is not required to be paid attention additionally because of maintaining the collecting and editing relation, 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 need to contain the previous patch repair content, and the patch repair efficiency can be improved from multiple aspects. Meanwhile, the patch package does not need to contain the previous patch repair content, so that the size of the patch package is reduced, the traffic cost in the pushing process can be saved, and the performance requirement on bandwidth is reduced.
Fig. 5a to 5c are schematic views of a scene of another patch repair method according to an embodiment of the present application.
Referring to the first patch repair (patch 01) shown in fig. 5a, pushed patch data a is obtained, the obtained patch data a is stored in a first area, the first patch data a in the first area is stored in a second area, target patch data a is obtained, and mounting validation is achieved based on the second area, so that the first patch repair is completed.
Referring to a second patch repair (patch 02) shown in fig. 5B, pushed patch data B is obtained, the obtained patch data B is stored in a first area, the first patch data B of the first area is stored in a second area, and second patch data a corresponding to software to which the first patch data belongs in the second area are combined to obtain target patch data: patch data a+patch data B. And storing the target patch data into a second area, and realizing the mounting effect based on the second area to finish the second patch repair.
Referring to a third patch repair (patch 03) shown in fig. 5C, pushed patch data C is obtained, the obtained patch data C is stored in a first area, and the first patch data C in the first area is stored in second patch data corresponding to software to which the first patch data in the second area belongs in the second area: the patch data A and the patch data B are combined to obtain target patch data: patch data-a+patch data-b+patch data-C. And storing the target patch data into a second area, and realizing the mounting effect based on the second area to finish the third patch repair.
The patch repair method in the above embodiments may be applied to an electronic device, as shown in fig. 6, and fig. 6 is a schematic structural diagram of an electronic device 100 according to an 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 (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity 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 should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments of the application, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments of the application, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments of the application, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments of the application, the processor 110 may contain 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 an audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode 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 audio signals to the wireless communication module 160 through the PCM interface, so as to implement a 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 for asynchronous communications. The bus may be a bi-directional 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 typically 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 an audio signal to the wireless communication module 160 through a UART interface, so as to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments of the present application, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments of the present application, a GPIO interface may be used to connect processor 110 with camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
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 transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices 100, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive 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 for connecting the battery 142, and the charge 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 to power 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 configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge 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 may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into 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 for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments of the present application, at least some of the functional modules of the mobile communication module 150 may be provided 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 provided 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 the 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 transmits the demodulated low frequency baseband signal to the 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 sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments of the 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 module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the 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, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments of the present application, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or 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 photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize 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 application, the ISP may be located in the 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 onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments of the 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 other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
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: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The random access memory may include a static random-access memory (SRAM), a dynamic random-access memory (dynamic random access memory, DRAM), a synchronous dynamic random-access memory (synchronous dynamic random access memory, SDRAM), a double data rate synchronous dynamic random-access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as fifth generation DDR SDRAM is commonly referred to as DDR5 SDRAM), etc.; the nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. divided according to an operation principle, may include single-level memory cells (SLC), multi-level memory cells (MLC), triple-level memory cells (TLC), quad-level memory cells (QLC), etc. divided according to a storage specification, may include universal FLASH memory (english: universal FLASH storage, UFS), embedded multimedia memory cards (embedded multi media Card, eMMC), etc. divided according to a storage specification.
The random access memory may be read directly from and written to by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other on-the-fly programs, may also be used to store data for users and applications, and the like.
The nonvolatile memory may store executable programs, store data of users and applications, 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 external non-volatile memory to enable expansion of the memory capabilities of the electronic device 100. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored 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 a plurality of instructions that when executed by the processor 110 implement the patch repair method performed on the electronic device 100 in the above-described embodiments.
Wherein, 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 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, combining the first patch data with 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 through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. 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 a part of functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to 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, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device 100 platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert 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 is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. 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 touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments of the present application, touch operations that act on the same touch location, but with different touch operation intensities, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments of the present application, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyro 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 the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments of the present application, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments of the present application, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are 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 may be detected when the electronic device 100 is stationary. The method can also be used for identifying the gesture of the electronic equipment 100, and can be applied to applications such as horizontal and vertical screen switching, pedometers and the like.
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 range using the distance sensor 180F to achieve fast focusing.
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 device 100 emits infrared light outward 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 may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments of the present application, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as 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 for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments of the present application, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments of the application, bone conduction sensor 180M may also be provided in a headset, incorporated into a bone conduction headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. 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 Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be plugged into multiple frames of cards simultaneously. The multi-frame cards may be of the same type or of different types. 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 realize functions such as communication and data communication. In some embodiments of the 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 further provides a computer storage medium, in which a computer program is stored, where the computer program includes computer instructions, and when the computer program is executed on the electronic device 100, cause the electronic device 100 to execute 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 an electronic device 100, cause the electronic device 100 to perform the above-described related method to implement any of the patch repair methods of the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is configured to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory, so that the chip performs any one of the patch repair methods in the above method embodiments.
The electronic device 100, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the advantages achieved by the method can refer to the advantages in the corresponding methods provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.

Claims (7)

1. A patch repair method applied to an electronic device, the method comprising:
determining a first area and a second area from a storage partition of the electronic device;
receiving pushed first patch data and storing the first patch data to the first area;
determining the software to which the first patch data belongs, and if patch data corresponding to the historical version of the software to which the first patch data belongs exists in the second area, clearing the patch data corresponding to the historical version of the software to which the first patch data belongs in the second area;
if 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 performed based on the first patch data in the first area; the second patch data is patch data corresponding to the last patch repair of the same version of the software to which the first patch data belongs;
If the second area stores second patch data corresponding to software to which the first patch data belongs, storing the first patch data into the second area, and combining the first patch data with the second patch data to obtain target patch data, wherein the method comprises the following steps: based on mirror image processing, packaging the first patch data of the first area into a mirror image file; writing the image file into the second area so that the first patch data and the second patch data are combined; wherein the target patch data includes the first patch data and the second patch data;
and carrying out mounting validation on the target patch data in the second area to finish patch repair of the software to which the first patch data belongs.
2. The patch repair method of claim 1, wherein determining the first region and the second region from the memory partition of the electronic device comprises:
determining a patch partition for storing patches in the storage partition, and a start address and an end address corresponding to the patch partition;
the first region and the second region are determined based on the start address and the end address.
3. The patch repair method of claim 2, wherein the determining the first region and the second region based on the start address and the end 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 the first area and the second area according to the starting address, the intermediate address and the ending address.
4. A patch repair method as defined in claim 1, wherein the storing the first patch data to the first region 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 any one of claims 1 to 4, wherein after merging the first patch data and the second patch data to obtain target patch data, the method further comprises:
And clearing the first patch data of the first area.
6. An electronic device comprising a memory and a processor;
the memory is used for storing program instructions;
the processor is configured to read the program instructions stored in the memory to implement the patch repair method according to any one of claims 1 to 5.
7. A computer readable storage medium having stored therein computer readable instructions which when executed by a processor implement a patch repair method as claimed in any one of claims 1 to 5.
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 CN114443109A (en) 2022-05-06
CN114443109B true 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)

Families Citing this family (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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402438A (en) * 2010-09-16 2012-04-04 金蝶软件(中国)有限公司 Method and device for automatically merging 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200356358A1 (en) * 2019-05-07 2020-11-12 Dell Products L.P. Systems and methods for incrementally and dynamically updating firmware

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402438A (en) * 2010-09-16 2012-04-04 金蝶软件(中国)有限公司 Method and device for automatically merging 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
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 (1)

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

Also Published As

Publication number Publication date
CN114443109A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN112348732B (en) Model reasoning method, device and storage medium based on graphic rendering pipeline
CN110515646B (en) Differential upgrading method and related equipment
CN113568634B (en) Processing method and processing device for application optimization
CN113704205A (en) Log storage method, chip, electronic device and readable storage medium
CN114443109B (en) Patch repair method, electronic device and storage medium
WO2022111664A1 (en) Patching method, related apparatus, and system
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN113901485A (en) Application program loading method, electronic device and storage medium
CN114546969A (en) File sharing method and device and electronic equipment
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN113704209B (en) Data sharing method, electronic device and storage medium
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN117312055B (en) Data backup method and related device
CN116719699B (en) Bus monitoring and control method, electronic device, chip and storage medium
CN116665751B (en) Test method and electronic equipment
CN115993592B (en) Bluetooth ranging method, electronic equipment and storage medium
CN115529379B (en) Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium
CN116841575B (en) Method and related device for generating image file
CN114942741B (en) Data transmission method and electronic equipment
CN116703741B (en) Image contrast generation method and device and electronic equipment
CN116048769B (en) Memory recycling method and device and terminal equipment
CN115952564B (en) Data writing method and terminal equipment
CN117130541A (en) Storage space configuration method and related equipment
CN116743921A (en) Method for displaying number-carrying network number, electronic equipment and storage medium
CN116703691A (en) Image processing method, electronic device, and computer 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