CN114706706A - Application software repairing method and device and electronic equipment - Google Patents

Application software repairing method and device and electronic equipment Download PDF

Info

Publication number
CN114706706A
CN114706706A CN202210375871.6A CN202210375871A CN114706706A CN 114706706 A CN114706706 A CN 114706706A CN 202210375871 A CN202210375871 A CN 202210375871A CN 114706706 A CN114706706 A CN 114706706A
Authority
CN
China
Prior art keywords
application software
patch file
patch
file
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.)
Pending
Application number
CN202210375871.6A
Other languages
Chinese (zh)
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202210375871.6A priority Critical patent/CN114706706A/en
Publication of CN114706706A publication Critical patent/CN114706706A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method and a device for repairing application software and electronic equipment, wherein the method comprises the following steps: firstly, a hot repair component is built in application software, after the starting operation of the application software is received, the application software is started and runs to the hot repair component, the hot repair component is run to obtain a patch file on a server of the application software, and finally the patch file is applied to repair the application software, so that the starting process of the application software is completed. According to the method and the device, when the application software is started each time, the hot repair component is operated firstly, the patch file is obtained from the server, the application software is started through the patch file containing the repair code in the starting process, when a user uses the application software, the application software finishes the repair of the BUG, the user does not need to manually repair the BUG, the interaction performance of the application software is improved, the development period of the patch file is short, and the software repair efficiency is improved.

Description

Application software repairing method and device and electronic equipment
Technical Field
The present application relates to the field of software technologies, and in particular, to a method and an apparatus for repairing application software, and an electronic device.
Background
In the prior art, when the Bug appears in the use process, a software developer is often required to release a normal version aiming at the Bug, and a user downloads and uses the normal version. The process of re-downloading and installing is complicated, the period of releasing the new version by developers is long, and the efficiency of Bug repair is low.
Disclosure of Invention
In view of this, an object of the present application is to provide a method and an apparatus for repairing application software, and an electronic device, so as to simplify a repairing process of the application software and improve defect repairing efficiency.
In a first aspect, an embodiment of the present application provides a method for repairing application software, where the method is applied to an electronic device installed with application software, and a hot repair component is built in a start-up program of the application software, and the method includes: responding to the starting operation of the application software, and starting the application software; responding to the starting of the application software to the hot repair component, and running the hot repair component to obtain a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to the target defect of the application software; and applying the patch file to repair the application software and continuously completing the starting process of the application software.
Further, the step of operating the hot fix component to obtain the patch file on the server of the application software includes: acquiring state information of the application software through the hot repair component; wherein, the state information at least comprises a software identifier and a current version; judging whether a patch file corresponding to the application software exists in a server of the application software or not according to the state information; if so, the patch file is downloaded.
Further, the step of determining whether a patch file corresponding to the application software exists in the server of the application software according to the state information includes: obtaining patch information from a server of the application software; the patch information represents the latest patch version corresponding to the application software contained in the server; and judging whether the server has a patch file corresponding to the application software according to the patch information and the state information.
Further, the step of determining whether the server has a patch file corresponding to the application software according to the patch information and the state information includes: comparing the latest patch version included in the patch information with the current version included in the state information; and if the comparison result represents that the latest patch version is inconsistent with the current version, determining that the server has a patch file corresponding to the application software.
Further, the status information further includes a processor model of the electronic device.
Further, the step of repairing the application software by applying the patch file includes: replacing the library file for starting with a patch file so as to read the patch file when the application software is started; the starting library file is a configuration file read when the application software is started, and at least one file in the starting library file is a defect file.
Further, the step of repairing the application software by applying the patch file includes: performing security verification on the patch file; the security check includes one or more of the following checks: encryption verification, patch file name verification and patch file version verification; and if the verification result represents that the patch file is safe, the patch file is applied to repair the application software.
Further, after the step of applying the patch file to repair the application software, the method further includes: and instructing the application software to re-execute the starting program by using a callback mechanism of the hook function so as to complete the starting operation of the application software.
In a second aspect, an embodiment of the present application further provides an apparatus for repairing application software, which is applied to an electronic device installed with application software, where a hot repair component is embedded in a start program of the application software, and the apparatus includes: the starting response module is used for responding to the starting operation of the application software and starting the application software; the patch file acquisition module is used for responding to the starting of the application software to the hot repair component and operating the hot repair component to acquire a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to the target defect of the application software; and the repairing module is used for applying the patch file to repair the application software and continuously completing the starting process of the application software.
In a third aspect, an embodiment of the present application further provides an electronic device, which includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for repairing application software according to the first aspect.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method for repairing application software according to the first aspect.
Compared with the prior art, the embodiment of the application has the following beneficial effects:
according to the method and the device for restoring the application software and the electronic equipment, firstly, the hot restoration component is built in the application software, after the starting operation of the application software is received, the application software is started and runs to the hot restoration component, the hot restoration component is run to obtain the patch file on the server of the application software, and finally the patch file is used for restoring the application software, so that the starting process of the application software is completed. According to the method and the device, when the application software is started each time, the hot repair component is operated firstly, the patch file is obtained from the server, the application software is started through the patch file containing the repair code in the starting process, when a user uses the application software, the application software finishes the repair of the BUG, the user does not need to manually repair the BUG, the interaction performance of the application software is improved, the development period of the patch file is short, and the software repair efficiency is improved.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for repairing application software according to an embodiment of the present application;
fig. 3 is a flowchart of another method for repairing application software according to an embodiment of the present application;
fig. 4 is a flowchart of another method for repairing application software according to an embodiment of the present application;
fig. 5 is a flowchart of another method for repairing application software according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a device for repairing application software according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Conventionally, after Android application software is released on line, when a user downloads, installs and uses the Android application software, an event that a program is crashed and flashed off or the Android application software is inconsistent with an expected event is often encountered, and the phenomenon can be called 'Bug'. Even if a strict test flow is provided before software release, it cannot be guaranteed whether a Bug is introduced into an online version or not. Once the Bug occurs, the user experience is not good, and the economic benefit of the user is lost, which causes serious consequences.
The existing flow for solving the problem of on-line Bug is as follows: after the Bug is found, the release of the Bug application software is stopped (so that more users are prevented from downloading or upgrading to the Bug application, and abnormal use is avoided); a developer emergently repairs the Bug and releases the normal application software version again; and the user downloads or upgrades the normal application software, so that the consequences of the last version caused by Bug are solved.
However, the period for the developer to reissue the software version implementation is too long and inefficient, i.e., bugs cannot be repaired online immediately, and at the same time, the user needs to manually reinstall the application software, which disturbs the user experience.
Accordingly, the embodiment of the application provides a method and a device for repairing application software and electronic equipment, so that the repairing process of the application software is simplified, and the defect repairing efficiency is improved.
Referring to fig. 1, a schematic diagram of an electronic system 100 is shown. The electronic system can be used for realizing the method and the device for restoring the application software of the embodiment of the application.
As shown in fig. 1, an electronic system 100 includes one or more processing devices 102 and one or more memory devices 104. Optionally, electronic system 100 may also include input device 106 and output device 108, which may be interconnected via bus system 110 and/or other forms of connection mechanisms (not shown). It should be noted that the components and structure of the electronic system 100 shown in fig. 1 are exemplary only, and not limiting, and the electronic system may have some of the components in fig. 1, as well as other components and structures, as desired.
The processing device 102 may be a server, a smart terminal, or a device containing a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, may process data for other components in the electronic system 100, and may control other components in the electronic system 100 to perform repair functions for application software.
Storage 104 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer-readable storage medium and executed by processing device 102 to implement the client functionality (implemented by the processing device) of the embodiments of the present application described below and/or other desired functionality. Various applications and various data, such as various data used and/or generated by the applications, may also be stored in the computer-readable storage medium.
The input device 106 may be a device used by a user to input instructions and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
The output device 108 may output various information (e.g., images or sounds) to the outside (e.g., a user), and may include one or more of a display, a speaker, and the like.
For example, the devices in the electronic device and the method and apparatus for implementing application software repair according to the embodiments of the present application may be integrally disposed, or may be dispersedly disposed, such as integrally disposing the processing device 102, the storage device 104, the input device 106, and the output device 108 in one body.
Fig. 2 is a flowchart of a method for repairing application software, which is provided in an embodiment of the present application and is applied to an electronic device with application software installed therein, where a hot repair component is built in a start program of the application software, and referring to fig. 2, the method includes the following steps:
s202: responding to the starting operation of the application software, and starting the application software;
the method for repairing application software disclosed in this embodiment implements hot repair of bugs existing in the application software in the process of starting the application software. The application software is any type of application installed in the electronic device, such as an APP installed in a mobile terminal or an application installed in a computer. When receiving an instruction for starting the application software from a user, the application software is started according to a starting program in the application software.
S204: responding to the starting of the application software to the hot repair component, and running the hot repair component to obtain a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to the target defect of the application software;
the start program of the application software comprises a hot repair component, and the hot repair component can be embedded in an installation program of the application software, namely the installation of the hot repair component is finished when the application software is installed for the first time, and the hot repair component can also be downloaded into the application software when the version of the application software is updated.
When the application software runs to the hot repair component, the patch file on the server is obtained through the hot repair component. Specifically, if the latest patch corresponding to the application software exists in the server, the patch file is downloaded, otherwise, the downloading is not performed, and the existing starting program is continuously used to start the application software.
S206: and applying the patch file to repair the application software and continuously completing the starting process of the application software.
And when the patch file exists, the patch file is used for repairing the application software, and the application software is instructed to continue executing other files in the starting program, so that the starting of the application program is completed. The application software is repaired by using the patch file, specifically, the specified file in the patch file is used for replacing the existing specified file with defects in the application software, so that the patch file is read in the starting process of the application program, and the Bug is repaired by the code in the patch file, thereby realizing the hot repair of the application software. The configuration file in the patch file can also indicate that the existing file with the Bug is not read when the application software is started, but the file containing the repair code is read, and the hot repair of the application software is also realized.
According to the method for repairing the application software, firstly, the hot repair component is built in the application software, after the starting operation of the application software is received, the application software is started and runs to the hot repair component, the hot repair component is run to obtain the patch file on the server of the application software, and finally the patch file is applied to repair the application software, so that the starting process of the application software is completed. According to the method and the device, when the application software is started each time, the hot repair component is operated firstly, the patch file is obtained from the server, the application software is started through the patch file containing the repair code in the starting process, when a user uses the application software, the application software finishes the repair of the BUG, the user does not need to manually repair the BUG, the interaction performance of the application software is improved, the development period of the patch file is short, and the software repair efficiency is improved.
Fig. 3 is a flowchart of another method for repairing application software according to an embodiment of the present application, where the method focuses on describing a process of how to obtain a patch file through a hot repair component, and as shown in fig. 3, the method specifically includes the following steps:
s302: responding to the starting operation of the application software, and starting the application software;
s304: responding to the starting of the application software to the hot repair component, and acquiring the state information of the application software through the hot repair component;
wherein, the state information at least comprises a software identifier and a current version.
S306: judging whether a patch file corresponding to the application software exists in the server of the application software according to the state information, if so, executing the step S308-S310; otherwise, go to step S312;
the patch file at least comprises a repair code corresponding to the target defect of the application software. In specific implementation, it is first determined whether a patch file corresponding to the state information exists in the server, for example, whether a patch file having the same identifier as the application software but a version number higher than the current version number exists is determined.
In some possible embodiments, the status information further includes a processor model of the electronic device. As the Android development project sometimes uses a multi-CPU architecture, for example, armeabi-v7a, arm64-v8a and the like are simultaneously supported. In this case, a supported processor model may be added in the process of generating the patch file, and when acquiring the patch file, not only the software identifier and the version number of the patch file but also whether the processor models are matched need to be considered. In other examples, the processor model may also be not considered in the patch file generation process, and a corresponding patch file is developed for each processor model, and when the patch file is acquired, the patch files with all versions and identifiers matching are packaged and downloaded, and a target patch file corresponding to the processor model in the electronic device is selected.
S308: downloading the patch file;
s310: the patch file is applied to repair the application software, and the starting process of the application software is continuously completed;
s312: and finishing the starting process of the application software by using the library file for starting in the application software.
In the embodiment, the state information of the application software is acquired through the hot repair component, the matched patch file is acquired according to the state information, and when the current software is the latest version, repeated downloading and repeated repair are not needed, so that the starting efficiency of the application software is improved, the starting time of the application software is reduced, and the use experience of a user is improved.
The foregoing embodiment describes a process of how to obtain a patch file through a hot repair component, and in order to further improve the hot repair efficiency of application software, an embodiment of the present application further provides another repair method for application software, as shown in fig. 4, the method specifically includes the following steps:
s402: responding to the starting operation of the application software, and starting the application software;
s404: responding to the starting of the application software to the hot repair component, and acquiring the state information of the application software through the hot repair component;
wherein, the state information at least comprises a software identifier and a current version. In some examples, the status information further includes a processor model of the electronic device.
S406: obtaining patch information from a server of the application software;
the patch information represents the latest patch version corresponding to the application software contained in the server;
s408: judging whether a server has a patch file corresponding to the application software according to the patch information and the state information, and if so, executing the steps S410-S412; otherwise, step S414 is executed.
In some possible embodiments, whether a patch file corresponding to the application software exists in the server may be determined according to the following method:
l11: comparing the latest patch version included in the patch information with the current version included in the state information;
l12: and if the comparison result represents that the latest patch version is inconsistent with the current version, determining that the server has a patch file corresponding to the application software.
In specific implementation, if the application software in the current electronic device has downloaded the patch file, the software version in the state information of the application software is updated to the same version number as the patch file, when the application software is restarted, the latest patch version is found to be consistent with the current version through comparison, the patch file does not need to be downloaded again, the application software is directly started, and only when the application software finds new bugs, developers develop new patch files and upload the new patch files to the server, and when the application software is started, the latest patch file version is found to be higher than the current version, the latest patch file is downloaded again.
S410: downloading the patch file;
s412: and applying the patch file to repair the application software and continuously completing the starting process of the application software.
S414: and finishing the starting process of the application software by using the library file for starting in the application software.
In this embodiment, the state information of the application software is acquired through the hot repair component, the patch information of the server is acquired, and whether the patch file needs to be downloaded again is determined by comparing the state information with the software version in the patch information, so that the problem of reduction in the running efficiency of the application software caused by repeated downloading of the existing patch file is avoided, and the starting efficiency of the application software is further improved.
Fig. 5 is a flowchart of another application software repairing method provided in an embodiment of the present application, where the method mainly describes a specific process of how to repair application software according to a patch file, and as shown in fig. 5, the method specifically includes the following steps:
s502: responding to the starting operation of the application software, and starting the application software;
s504: responding to the starting of the application software to the hot repair component, and running the hot repair component to obtain a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to the target defect of the application software;
s506: replacing the library file for starting with a patch file so as to read the patch file when the application software is started;
the starting library file is a configuration file read when the application software is started, and at least one file in the starting library file is a defect file.
How to generate the patch file is described below by steps L21-L22:
firstly, Flutter is developed by using a Dart language, service codes written by all programs can generate libapp.
L21: and self-defining a PalmCivetLoader class, inheriting a FluterLoader, holding a FluterLoader instance of a FluterInjector by Hook, and re-assigning the FluterLoader instance into a proxy instance of the PalmCivetLoader class through a Java reflection mechanism. Table 1 below is part of the code for the PalmCivetLoader class:
TABLE 1
Figure BDA0003590359150000111
L22: the so library loaded by the launch call of the Flutter engine is realized in a PalmCivetLoader agent class ensiurelnitialization complete method, and the realization codes are shown in the following table 2:
TABLE 2
Figure BDA0003590359150000112
So that the loaded fix patch file contains the repaired code, i.e., the generated patch file.
After the patch file fix.so is generated, the original libapp.so library file loaded by the system is replaced, namely when the application program is started, the fix.so file is read, but the libapp.so library file containing Bug is not read, so that the application software is thermally repaired.
S508: and instructing the application software to re-execute the starting program by using a callback mechanism of the hook function so as to complete the starting operation of the application software.
In the embodiment, a new patch file is generated, the application program is indicated to read the patch file through the thermal restoration component to be started, the whole process is completely processed in a background, the patch file does not need to be downloaded and installed manually by a user, the user can use the application software with the Bug restored after the start is finished, and the use experience of the user is effectively improved.
In some possible embodiments, in order to ensure the security and the validity of the patch file, after downloading the patch file, the security check of the patch file is further required, in which case, the step of applying the patch file to repair the application software may specifically be:
l31: performing security verification on the patch file; the security check includes one or more of the following checks: encryption verification, patch file name verification and patch file version verification;
l32: if the verification result represents that the patch file is safe, the patch file is applied to repair the application software;
l33: and if the verification result indicates that the patch file is unsafe, deleting the patch file.
After downloading the patch file, the repair is not performed immediately, but the security of the patch file is verified firstly, and if the downloaded patch file is a file with security threat due to illegal operation in the network data transmission process, the file can be effectively prevented from threatening the security of the electronic device, and the system security of the electronic device is improved.
In order to facilitate understanding of the above embodiments, a specific application scenario of the above embodiments is described as an example:
step 1: and (3) using a Dart language to develop the Flutter, generating a libapp.
Step 2: and self-defining a PalmCivetLoader class, inheriting a FluterLoader, holding a FluterLoader instance of a FluterInjector by Hook, and re-assigning the FluterLoader instance into a proxy instance of the PalmCivetLoader class through a Java reflection mechanism.
Official sdk provides a fluttloader class for loading code developed by programs, which is the process of loading code by the agent authority. According to the method and the device, the code module is loaded, and whether the patch code is loaded or not is selected to avoid wrong codes.
And step 3: the so library loaded by the Flutter engine start call is realized in the palmcintloader agent class ensurelnitializationcomplete method.
So that the loaded fix patch file contains a repaired code to replace the originally loaded libapp.
And 4, step 4: and setting the Hook FlutterLoader as a self-defined PalmCivetLoader class.
For the project of the fluterengergenegroup multi-engine using Flutter, because fluterengergenegroup acquires fluterloader through fluterobjector during initialization, Hook fluterloader is defined as PalmCivetLoader in advance before this step, and then the patch so library is loaded.
And 5: and selecting the corresponding CPU architecture type when uploading the Flutter patch library.
For Android projects, a multi-CPU architecture is used, for example, armeabi-v7a and arm64-v8a are simultaneously supported, corresponding types also need to be selected when a Flutter patch so library is uploaded, or all types of so libraries are directly packaged, and a corresponding patch so library is selected for a CPU architecture supported by a mobile phone.
Step 6: the application software is started and the hot fix component is run.
The starting of the hot repair component is at the entrance of Android custom Application or the entrance of a program, which can also be called as the initialization process of the hot repair component.
And 7: acquiring patch information on a LoadingActivity page or a BaseActivity page and checking whether the patch information is applied or not;
and if the service end for placing the patch in the background is accessed through the network, downloading the patch file and repairing the application program if the patch file exists, otherwise, not downloading the patch file.
Based on the foregoing method embodiment, an embodiment of the present application further provides a device for repairing application software, which is applied to an electronic device installed with application software, where a hot repair component is built in a start program of the application software, as shown in fig. 6, the device includes:
a start response module 602, configured to start the application software in response to a start operation on the application software;
a patch file obtaining module 604, configured to respond to the application software starting to the hot repair component, and run the hot repair component to obtain a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to the target defect of the application software;
and the repairing module 606 is used for applying the patch file to repair the application software and continuously completing the starting process of the application software.
The device for repairing application software provided by the embodiment of the application software is characterized in that a hot repair component is built in the application software, the application software is started and runs to the hot repair component after the starting operation of the application software is received, the hot repair component is run to obtain a patch file on a server of the application software, and finally the patch file is used for repairing the application software, so that the starting process of the application software is completed. According to the method and the device, when the application software is started each time, the hot repair component is operated firstly, the patch file is obtained from the server, the application software is started through the patch file containing the repair code in the starting process, when a user uses the application software, the application software finishes the repair of the BUG, the user does not need to manually repair the BUG, the interaction performance of the application software is improved, the development period of the patch file is short, and the software repair efficiency is improved.
The patch file obtaining module 604 is further configured to: acquiring state information of the application software through the hot repair component; wherein, the state information at least comprises a software identifier and a current version; judging whether a patch file corresponding to the application software exists in a server of the application software or not according to the state information; if so, the patch file is downloaded.
The process of determining whether a patch file corresponding to the application software exists in the server of the application software according to the state information includes: obtaining patch information from a server of the application software; the patch information represents the latest patch version corresponding to the application software contained in the server; and judging whether the server has a patch file corresponding to the application software according to the patch information and the state information.
The process of determining whether the server has the patch file corresponding to the application software according to the patch information and the state information includes: comparing the latest patch version included in the patch information with the current version included in the state information; and if the comparison result represents that the latest patch version is inconsistent with the current version, determining that the server has a patch file corresponding to the application software.
The status information further includes a processor model of the electronic device.
The repair module 606 is further configured to: replacing the library file for starting with a patch file so as to read the patch file when the application software is started; the starting library file is a configuration file read when the application software is started, and at least one file in the starting library file is a defect file.
The repair module 606 is further configured to: carrying out security verification on the patch file; the security check includes one or more of the following checks: encryption verification, patch file name verification and patch file version verification; and if the verification result represents that the patch file is safe, the patch file is applied to repair the application software.
The above-mentioned device still includes: and the callback module is used for indicating the application software to execute the starting program again by using a callback mechanism of the hook function so as to finish the starting operation of the application software.
The implementation principle and the technical effect of the application software repairing device provided by the embodiment of the present application are the same as those of the foregoing method embodiment, and for the sake of brief description, no mention is made in the embodiment of the device, and reference may be made to the corresponding contents in the foregoing application software repairing method embodiment.
By applying the method and the device for repairing the application software, provided by the embodiment of the application, developers can repair and print a fix.so that the fix is uploaded through a service background, the APP with the Bug version can be downloaded in a gray scale and full amount, and the process is simple and convenient; for QA testers, the verification of whether the patch is effective or not and whether the thermal restoration is normally operated or not can be participated; compared with the situation that no hot repair is performed and new version software needs to be released, a lot of manpower and material resources are saved (developers do not need to print APK packages of different channels and QA personnel to return to the main process), and the user experience is not influenced (the APK packages do not need to be updated again). Table 3 below shows the results of comparing the effects of several thermal healing methods, wherein "v" represents "yes" and "X" represents "no". As can be seen from the table, the success rate of the thermal repair of the application software using the technology in the embodiment of the present application is the highest.
TABLE 3
Figure BDA0003590359150000161
An embodiment of the present application further provides an electronic device, as shown in fig. 7, which is a schematic structural diagram of the electronic device, where the electronic device includes a processor 1501 and a memory 1502, the memory 1502 stores computer-executable instructions that can be executed by the processor 1501, and the processor 1501 executes the computer-executable instructions to implement the method for repairing the application software.
In the embodiment shown in fig. 7, the electronic device further comprises a bus 1503 and a communication interface 1504, wherein the processor 1501, the communication interface 1504 and the memory 1502 are connected by the bus 1503.
The Memory 1502 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is implemented through at least one communication interface 1504 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like may be used. The bus 1503 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 1503 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
Processor 1501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 1501. The Processor 1501 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and the processor 1501 reads information in the memory and completes the steps of the application software repair method of the foregoing embodiment in combination with hardware thereof.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method for repairing the application software, and specific implementation may refer to the foregoing method embodiment, and is not described herein again.
The method and the apparatus for repairing application software and the computer program product of the electronic device provided in the embodiments of the present application include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
Unless specifically stated otherwise, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to 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 (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for repairing application software is applied to an electronic device installed with the application software, a hot repair component is built in a starting program of the application software, and the method comprises the following steps:
responding to the starting operation of the application software, and starting the application software;
responding to the starting of the application software to the hot repair component, and running the hot repair component to obtain a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to a target defect of the application software;
and applying the patch file to repair the application software, and continuing to finish the starting process of the application software.
2. A method for repairing application software according to claim 1, wherein the step of operating the hot repair component to obtain the patch file on the server of the application software comprises:
acquiring state information of the application software through the thermal restoration component; wherein the state information at least comprises a software identifier and a current version;
judging whether a patch file corresponding to the application software exists in a server of the application software or not according to the state information;
and if so, downloading the patch file.
3. The method for repairing application software according to claim 2, wherein the step of determining whether a patch file corresponding to the application software exists in a server of the application software according to the state information includes:
obtaining patch information from a server of the application software; the patch information represents the latest patch version corresponding to the application software contained in the server;
and judging whether the server has a patch file corresponding to the application software according to the patch information and the state information.
4. The method for repairing application software according to claim 3, wherein the step of determining whether the server has a patch file corresponding to the application software according to the patch information and the state information includes:
comparing the latest patch version included in the patch information with the current version included in the state information;
and if the comparison result represents that the latest patch version is inconsistent with the current version, determining that the server has a patch file corresponding to the application software.
5. The application software repair method according to claim 2, wherein the status information further includes a processor model of the electronic device.
6. A method for repairing application software according to claim 1, wherein the step of applying the patch file to repair the application software comprises:
replacing a library file for starting with the patch file so as to read the patch file when the application software is started; the starting library file is a configuration file read when the application software is started, and at least one file in the starting library file is a defect file.
7. The method for repairing application software according to claim 1, wherein the step of applying the patch file to repair the application software comprises:
performing security verification on the patch file; the security check includes one or more of: encryption verification, patch file name verification and patch file version verification;
and if the verification result represents that the patch file is safe, the patch file is applied to repair the application software.
8. A method of repairing application software according to claim 6, wherein after the step of applying the patch file to repair the application software, the method further comprises:
and instructing the application software to re-execute a starting program by using a callback mechanism of the hook function so as to complete the starting operation of the application software.
9. An apparatus for restoring application software, applied to an electronic device in which the application software is installed, the apparatus including a hot-fix component embedded in a startup program of the application software, the apparatus comprising:
the starting response module is used for responding to the starting operation of the application software and starting the application software;
the patch file acquisition module is used for responding to the starting of the application software to the hot repair component and operating the hot repair component to acquire a patch file on a server of the application software; the patch file at least comprises a repair code corresponding to a target defect of the application software;
and the repairing module is used for applying the patch file to repair the application software and continuously completing the starting process of the application software.
10. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of application software remediation of any one of claims 1-8.
11. A computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of application software repair of any one of claims 1-8.
CN202210375871.6A 2022-04-11 2022-04-11 Application software repairing method and device and electronic equipment Pending CN114706706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210375871.6A CN114706706A (en) 2022-04-11 2022-04-11 Application software repairing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210375871.6A CN114706706A (en) 2022-04-11 2022-04-11 Application software repairing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114706706A true CN114706706A (en) 2022-07-05

Family

ID=82172669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210375871.6A Pending CN114706706A (en) 2022-04-11 2022-04-11 Application software repairing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114706706A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257278A (en) * 2023-05-15 2023-06-13 北京阿帕科蓝科技有限公司 Patch execution method of application software and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257278A (en) * 2023-05-15 2023-06-13 北京阿帕科蓝科技有限公司 Patch execution method of application software and storage medium
CN116257278B (en) * 2023-05-15 2023-10-31 北京阿帕科蓝科技有限公司 Patch execution method of application software and storage medium

Similar Documents

Publication Publication Date Title
US10019256B2 (en) Systems and methods for incremental software development
CN108847950B (en) Electronic device, cloud system software automatic deployment method and storage medium
CA2816814C (en) Repairing corrupt software
CN105786538B (en) software upgrading method and device based on android system
US8978015B2 (en) Self validating applications
US20130179865A1 (en) Automated error checking system for a software application and method therefor
WO2016119548A1 (en) Method for preventing software decompilation, and method and apparatus for preventing decompilation software from starting
CN113242288B (en) Internet of things equipment firmware upgrading method, system and device and storage medium
CN113656107A (en) Mobile application loading method and device and electronic equipment
CN110704113B (en) Starting method and system based on FPGA platform and development board device
CN114706706A (en) Application software repairing method and device and electronic equipment
US20230315620A1 (en) System and Method for Diagnosing a Computing Device in Safe Mode
US8074205B2 (en) Binary verification service
CN110688198B (en) System calling method and device and electronic equipment
CN112527371B (en) Boot loader upgrading method and device, electronic equipment and storage medium
CN115185551A (en) Application program installation method, device, system and storage medium
CN111158771B (en) Processing method and device and computer equipment
CN114356346A (en) Application program deployment method, device, storage medium and electronic equipment
CN114282205A (en) Firmware starting method and device and computer readable storage medium
CN113015156A (en) Mobile phone number batch binding changing method, terminal and computer readable storage medium
CN110908725A (en) Application program starting method and device, electronic equipment and readable medium
CN112579126A (en) Software development platform and software development method
CN113377400A (en) Software upgrading method and device, storage medium and electronic equipment
CN113722715B (en) Imported file checking method, checking system and computing equipment
CN114020638A (en) Vulnerability detection plug-in updating method and system

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