WO2017076244A1 - 一种动态修复应用程序的方法、装置及相关系统 - Google Patents

一种动态修复应用程序的方法、装置及相关系统 Download PDF

Info

Publication number
WO2017076244A1
WO2017076244A1 PCT/CN2016/103939 CN2016103939W WO2017076244A1 WO 2017076244 A1 WO2017076244 A1 WO 2017076244A1 CN 2016103939 W CN2016103939 W CN 2016103939W WO 2017076244 A1 WO2017076244 A1 WO 2017076244A1
Authority
WO
WIPO (PCT)
Prior art keywords
program segment
repaired
address
app
storage node
Prior art date
Application number
PCT/CN2016/103939
Other languages
English (en)
French (fr)
Inventor
张志坚
马妙魁
Original Assignee
广州市动景计算机科技有限公司
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 广州市动景计算机科技有限公司 filed Critical 广州市动景计算机科技有限公司
Priority to US15/772,991 priority Critical patent/US10929121B2/en
Publication of WO2017076244A1 publication Critical patent/WO2017076244A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • 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/44505Configuring for program initiating, e.g. using registry, configuration files

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a method, an apparatus, and a related system for dynamically repairing an application.
  • the operation of a mobile terminal depends on the built-in operating system.
  • the third-party server develops a plurality of APPs (Applications) that implement different functions based on the operating system of the mobile terminal.
  • an APP capable of implementing the corresponding function can be installed at the mobile terminal.
  • the APP is a third-party application developed by a third-party server
  • the third-party server develops the APP
  • the app is released in the APP Store. Later, when the user needs to use the app, they can download from the app store.
  • the client IOS system reviews the APP for a relatively long time, usually around 7 days. If some functions are found to be wrong after the APP is released, you need to go offline and fix the errors that exist in the APP. The repaired app needs to be reviewed again and then released again. This process takes a long time, resulting in a large cost of the APP, an increase in the crash rate, and a serious impact on the user experience.
  • the embodiments of the present invention provide a method, an apparatus, and a related system for dynamically repairing an application.
  • the embodiment of the invention solves the problem that the consumption time caused by the error after the APP is released is long.
  • an embodiment of the present invention provides a method for dynamically repairing an application, including: a client receiving a pre-configured repaired program segment; storing the repaired program segment; and recording an address of the repaired program segment. And storing the address of the repaired program segment into an application program, the APP runtime calling the repaired program segment by the address of the repaired program segment.
  • storing the address of the repaired program segment in the application program including: creating a storage node corresponding to an address of the repaired program segment in the APP The address of the repaired program segment is written to the storage node that has been created.
  • storing the address of the repaired program segment in the application APP includes: reading, from the APP, a storage corresponding to an address of the program segment to be repaired a node, wherein the to-be-repaired program segment is a program segment before the repaired program segment is repaired; a storage node corresponding to an address of the to-be-repaired program segment writes an address of the repaired program segment to use The address of the repaired program segment replaces the address of the block to be repaired.
  • the storing, in the APP, the storage node of the address of the repaired program segment includes: reading identifier information of the repaired program segment; The identifier information is used to search for an address of the function module to which the repaired program segment belongs from the APP; determine a storage node corresponding to the address of the function module; and add a sub-storage to the storage node corresponding to the address of the function module. A node and the storage node as the address of the repaired program segment.
  • the storing, by the APP, the storage node corresponding to the address of the to-be-repaired program segment includes: reading the identifier information of the repaired program segment; The identifier information is used to search for an address of the function module to which the repaired program segment belongs from the APP; determine a storage node corresponding to the address of the function module; and store the storage node corresponding to the address of the function module as a root The node searches for a storage node corresponding to the address of the to-be-repaired program from the sub-storage node.
  • the storing, by the APP, the storage node corresponding to the address of the to-be-repaired program segment includes: reading the identifier information of the repaired program segment; The identifier information is used to search for a function module to which the repaired program segment belongs; determine the program segment to be repaired from the function module; and add a storage address for the program segment to be repaired; And determining, by the storage node corresponding to the storage address of the to-be-repaired program segment, the storage node corresponding to the address of the to-be-repaired program segment.
  • the embodiment of the present invention further provides a method for dynamically repairing an application, including: a server receiving a connection request for running an application system APP, where the connection request includes a current version number of the APP; When the current version number is smaller than the highest version number, the repaired program segment is configured corresponding to the APP; the repaired program segment is sent to the client, and the repaired program segment is stored by the client; Resuring the address of the program segment; storing the address of the repaired program segment in the APP, so that when the APP is running, the client calls the repaired program segment by the address of the repaired program segment .
  • the corresponding the APP configuration of the repaired program segment includes: sequentially acquiring a program segment different from the APP from an APP whose version number is greater than the current version number; The identification information is added according to the attribute value, and the program segment to which the identification information is added is determined as the repaired program segment.
  • an embodiment of the present invention provides an apparatus for dynamically repairing an application, including: a receiving module, configured to receive a pre-configured repaired program segment; and a storage module, configured to store the repaired received by the receiving module a program module, configured to record, by the storage module, an address of the repaired program segment; the storage module is further configured to store an address of the repaired program segment recorded by the recording module into an application program
  • the APP runtime invokes the repaired program segment by the address of the repaired program segment.
  • the storage module includes: a creating unit and a writing unit, wherein the creating unit is configured to create an address corresponding to the repaired program segment in the APP Storage node; the writing unit, configured to write an address of the repaired program segment to the storage node that has been created.
  • the storage module further includes: a reading unit, wherein the reading unit is configured to read an address of the program segment to be repaired from the APP Corresponding storage node, wherein the to-be-repaired program segment is a program segment before the repaired program segment is repaired; the write unit is further configured to write to a storage node corresponding to an address of the to-be-repaired program segment The address of the repaired program segment replaces the address of the block to be repaired with the address of the repaired program segment.
  • the creating unit includes: a first reading subunit, a first searching subunit, a first determining subunit, and a first adding subunit, wherein a first reading subunit, configured to read the identification information of the repaired program segment; the first search subunit, configured to search, according to the identification information, the APP from the APP An address of the function module; the first determining subunit, configured to determine a storage node corresponding to an address of the function module; the first adding subunit, configured to be a storage node corresponding to an address of the function module A child storage node is added and the child storage node is used as a storage node for the address of the repaired program segment.
  • the reading unit includes: a second reading subunit, a second searching subunit, and a second determining subunit, wherein the second reading a sub-unit, configured to read the identifier information of the repaired program segment, where the second search sub-unit is configured to search, according to the identifier information, an address of the function module to which the repaired program segment belongs from the APP
  • the second determining subunit is configured to determine a storage node corresponding to the address of the function module
  • the second search subunit is further configured to use the storage node corresponding to the address of the function module as a root storage node And searching for a storage node corresponding to the address of the to-be-repaired program from the sub-storage node.
  • the reading unit includes: a second adding subunit, wherein the second searching subunit is further configured to search for the identifier according to the identifier information.
  • the function module to which the program segment belongs the second determining subunit is further configured to determine the program segment to be repaired from the function module; the second adding subunit is configured to be the program to be repaired
  • the second determining subunit is further configured to determine, by the storage node corresponding to the added storage address of the to-be-repaired program segment, a storage node corresponding to the address of the to-be-repaired program segment.
  • the embodiment of the present invention further provides an apparatus for dynamically repairing an application, comprising: a receiving module, configured to receive a connection request for running an application system APP, where the connection request includes a current version of the APP a configuration module, configured to: when the current version number is smaller than the highest version number, configure a repaired program segment corresponding to the APP; and send a module, configured to send the repaired program segment to the client.
  • the configuration module includes: an obtaining unit, an adding unit, and a determining unit, where the acquiring unit is configured to sequentially obtain a larger version than the Obtaining a program segment different from the APP in the APP of the previous version number; the adding unit is configured to add the identifier information to the program segment according to the attribute value; and the determining unit is configured to add the identifier information
  • the program segment is determined to be the repaired program segment.
  • an embodiment of the present invention provides a system for dynamically repairing an application, including: a server and a client, where the server is configured to receive a connection request of a running application system APP sent by a client, where The connection request includes a current version number of the APP; when the current version number is less than the highest version number, the repaired program segment is configured corresponding to the APP; and the repaired program segment is sent to the client; a client for receiving a pre-configured repaired segment of the server; storing the repaired program segment; recording an address storing the repaired program segment; storing the address of the repaired program segment in an application APP In order to invoke the repaired program segment by the address of the repaired program segment when the APP is running.
  • the embodiments of the present invention provide a method, an apparatus, and a related system for dynamically repairing an application.
  • the client receives the pre-configured repaired segment of the server, records the address of the repaired segment after storing the repaired segment, and stores the address of the repaired segment into the APP. .
  • the patch segment is found through the address of the repaired segment and the repaired segment is executed. Therefore, compared with the prior art, the technical solution of the embodiment of the present invention can repair the APP online, thereby avoiding the time consumed by the APP to go offline, repair, and re-examine. Furthermore, this can reduce the cost of the APP. Optionally, this can reduce the crash rate. In addition, this can improve the user experience.
  • FIG. 1 is a flowchart of a method for dynamically repairing an application method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method of a second implementation manner of a method for dynamically repairing an application according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method according to a third embodiment manner of a method for dynamically repairing an application according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of a method according to a fourth embodiment manner of a method for dynamically repairing an application according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an apparatus for dynamically repairing an application according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a second implementation manner of an apparatus for dynamically repairing an application according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of a system for dynamically repairing an application according to an embodiment of the present invention.
  • the development language of the IOS system is the Objective-C language (referred to as the OC language in the embodiment of the present invention).
  • Apps running on IOS systems are developed using the OC language.
  • Programs developed using the OC language implement different functions by calling different methods at the time of execution, and different methods belong to different classes.
  • you need to call a method during the running of the APP first determine the class to which the method belongs, and then find and call the method from the class.
  • the implementation blocks corresponding to the OC language-based grammar, class, and method are all stored in the memory of the mobile terminal, and the address of the stored program segment is correspondingly recorded in the APP.
  • the APP When the APP is running, it searches through the address and calls the relevant program segment. Based on the above implementation process, in the technical solution of the embodiment of the present invention, the function of the APP is repaired by modifying the program segment called by the APP by modifying the address of the program segment.
  • FIG. 1 is a flowchart of a method for dynamically repairing an application according to an embodiment of the present invention. This embodiment will introduce the implementation method of the present invention as a whole, and the method includes the following steps.
  • Step S101 The client receives the pre-configured repaired program segment.
  • the APP can send a connection request to the corresponding server through the client, where the connection request includes the version number of the APP.
  • the server can determine the program that the APP needs to be repaired by using the version number of the APP, so that the repaired program segment corresponding to the APP is pre-configured and sent to the client. It should be noted that the process of configuring the repaired program segment according to the version number of the APP is described in detail in the following embodiments.
  • the fixed program segment described in this solution can be regarded as a program segment collection, including at least one program segment, and each program segment corresponds to one method implementation.
  • the server may add identification information for each program segment according to the attribute value or method name of the method represented by the program segment, for the client to identify Fix the program segment so that the client can fix the app.
  • the browser of the current version number lacks the ability to add controls relative to the browser of the latest version number.
  • the server sends the executor of the added control as a patched section to the client.
  • the client adds the program segment of the control based on the currently running browser.
  • Step S102 Store the repaired program segment.
  • the IOS system can detect and know that the modification operation is not allowed, and the APP cannot be repaired online by directly modifying the OC language.
  • a repair platform is set in advance in the APP, and the repair platform is written in a programmable programming language in the IOS system, and can provide an environment in which the OC language code is called.
  • the repair platform can be written using JavaScript code. It is of course possible to use other languages that satisfy the above conditions, and the embodiments of the present invention do not limit this.
  • a repair platform written using JavaScript code is referred to as a JS platform.
  • the JS platform receives the repaired segment, first, the repaired program segment is stored in the client memory, and then the memory address of the repaired segment in memory is obtained.
  • the server can directly write the fixed program segment using JavaScript code, and the JS platform can recognize the received repaired program segment.
  • each of the repaired segments is converted to a format recognized by the APP and then stored in the memory.
  • the APP runtime can directly call the stored repaired segments.
  • the method for converting the code format is a technique well known to those skilled in the art, and details are not described herein again.
  • the repaired program segment for execution can be received when the APP is dynamically running, so that the rules of the IOS system can be satisfied, and the APP can be dynamically repaired while the APP is running.
  • Step S103 Recording an address storing the repaired program segment.
  • the OC program first searches for the address of the method to be called, and then searches for and executes the program corresponding to the method according to the read address. Therefore, after the JS platform stores the repaired program segment into the memory, the address of the repaired program segment is recorded, so that the address of the repaired program segment is stored in the corresponding location of the APP, so that the repaired program is read during the running of the APP. The address of the segment.
  • the repaired program segment is a collection of program segments, and the address of the repaired program segment described in this embodiment is specifically, corresponding to each repaired program segment in the repaired program segment. Storage address.
  • Step S104 Store the address of the repaired program segment into the application APP.
  • the APP can call the repaired program segment at runtime and execute the repaired program segment. This is considered to have been fixed for the APP.
  • the JS platform stores the repaired segment, the address of the repaired segment is stored in the APP.
  • the method belongs to a class.
  • the class can be used as a function module to which the program segment belongs, and each function module also corresponds to a storage address.
  • the address of the function module is usually read first, and the address of the function module is determined, and then the address of the program segment is determined. Therefore, in order to facilitate the more efficient operation of the APP, the address of the function module and the address of the program segment can be stored in the APP according to the affiliation.
  • each address is correspondingly written in a storage node, and the storage node corresponding to the address of the function module can be regarded as a root storage node.
  • the storage node corresponding to the address of the program segment belonging to the function module is a child storage node of the root storage node. This can clearly reflect the correspondence of addresses. Therefore, in this embodiment, the address of the repaired program segment is written to the corresponding storage node in the APP.
  • the IOS system provides a runtime mechanism.
  • the runtime mechanism means that the system will package or rebuild some reusable programs or instances into a "runtime library”.
  • a program or instance in the "runtime library” can be connected at runtime or called by any program. Therefore, the process of reading and calling the program and address of the APP by the JS platform in the solution can be completed by the runtime mechanism.
  • the method and the process of calling the APP program and the address through the runtime mechanism of the JS platform are well known to those skilled in the art, and will not be further described herein.
  • the program format that can be recognized is also different.
  • the OC program first encapsulates the program called by the JS platform according to the preset format, and then passes the packaged program to the JS platform.
  • the JS platform can change all program calls to a fixed _oc() function through regular expressions. That is, the programs called by the JS platform need to be encapsulated in the format of the _oc() function.
  • the JavaScript language has the feature of automatically converting the NSDictionary and the JavaScript object in the OC language
  • the OC program can encapsulate the program called by the JS into an NSDictionary, and in the NSDictionary.
  • the lieutenant will indicate the class name, method name and pointer of the program segment, so that any OC program can be called by the JS platform.
  • the solution can receive the repaired program segment for execution without violating the IOS development rule, and dynamically repair the APP according to the repaired program segment, by setting the repair platform in the APP. Avoid the cost of APP offline, repair, and re-audit time.
  • the repair APP usually performs the following three operations on the APP, adding a program segment to the APP, deleting the program segment from the APP, and modifying a part of the program segment in the APP, and the above embodiment relatively summarizes the description of the solution, in order to The technical solution of the embodiment of the present invention is described in detail based on the above three repair operations.
  • FIG. 2 is a flowchart of a method for a second embodiment of a method for dynamically repairing an application according to an embodiment of the present invention.
  • This embodiment describes a procedure for adding a program segment.
  • the method of this embodiment includes the following steps.
  • Step S201 The client receives the pre-configured repaired program segment.
  • the repaired program segment is a collection of method program segments, including at least one program segment corresponding to the complete method. Therefore, in order to clarify the operations that the client needs to perform for each repaired program segment, the server An operation instruction is added in advance to the repaired program segment, and the operation command can be represented by a number or a letter, which is not limited by the embodiment of the present invention.
  • the client After receiving the repaired segment, the client can perform the corresponding operation on the address of the repaired segment according to the operation instruction.
  • the operation instruction of the adding operation may be set to “ad” or other identification information, and after the client reads the operation instruction information, the next operation is determined according to the operation instruction.
  • Step S202 Store the repaired program segment.
  • Step S203 Recording an address storing the repaired program segment.
  • Step S204 Create a storage node corresponding to the address of the repaired program segment in the APP.
  • the address in the APP forms a affiliation through the storage node.
  • the address of the patch segment needs to be written to its corresponding storage node. Since the added block is a new block, there is no write to the repaired segment address storage node in the APP. Before the address of the repaired block is stored in the APP, the repaired process needs to be created. The storage node corresponding to the sequence address.
  • the storage node corresponding to the address of the repaired program segment is the child storage node of the storage node corresponding to the address of the functional module.
  • the client can find the address of the function module according to the identification information of the repaired program segment, and determine the corresponding storage node according to the address of the function module. Then, the client may add a new sub-storage node to the storage node corresponding to the address of the function module, and the new sub-storage node is the storage node corresponding to the address of the added repaired segment.
  • the storage node may be a mark of a storage location. Therefore, the process of creating a storage node is a process of determining a storage location and adding a tag at the determined storage location. Specifically, this is a technical means well known to those skilled in the art, and the embodiments of the present invention are not described in detail herein.
  • Step S205 Write the address of the repaired program segment to the storage node that has been created.
  • the APP encapsulates the created storage node according to a preset encapsulation format and sends it to the JS platform.
  • the JS platform knows the storage node, it sends a command to the APP to write the address of the repaired segment at the storage node, and completes the storage of the address of the repaired segment.
  • the foregoing embodiment describes the technical solution of the embodiment of the present invention based on the scenario of adding a program segment.
  • the program also includes scenarios for modifying the program segment and deleting the program segment.
  • the following embodiment will describe the solution based on the scenario of modifying the program segment and deleting the program segment.
  • FIG. 3 is a flowchart of a method for a third embodiment of a method for dynamically repairing an application according to an embodiment of the present invention, where the method includes the following steps:
  • Step S301 The client receives the pre-configured repaired program segment.
  • the JS platform when the program segment is modified, the JS platform replaces the original program segment executed by the APP with the new program segment by replacing the to-be-repaired program segment with the repaired program segment. Therefore, the operation instruction of the repaired segment received by the client is a "replace" instruction.
  • the repaired program segment corresponding to the block to be deleted can be regarded as empty because the corresponding repaired program segment does not exist in the block to be deleted.
  • the server may only send the identification information of the block to be deleted and the "replace" operation instruction to the client.
  • Step S302 Store the repaired program segment.
  • Step S303 Recording an address storing the repaired program segment.
  • the repaired program segment corresponding to the block to be deleted is empty, there is no address corresponding to the repaired program segment.
  • the repaired program segment address of the block to be deleted is also empty, and the empty storage address can be represented by "0".
  • Step S304 Read, from the APP, a storage node corresponding to the address of the program segment to be repaired.
  • the JS platform needs to send a command to the APP to search for the storage node corresponding to the address of the block to be repaired.
  • the APP may find the address of the corresponding function module according to the identification information of the repaired program segment, and determine the storage node corresponding to the address of the function module. Since the program segment to be repaired is a sub-program segment of the function module, the storage node of the block address to be repaired can be searched for in the determined sub-storage node of the storage node.
  • the APP finds the storage node of the block address to be repaired, it encapsulates it according to the preset package format and then sends it to the JS platform.
  • the APP first searches for the corresponding function module according to the identification information, and after finding the program segment to be repaired from the program segment corresponding to the function module, adding a read path for the to-be-repaired program segment. .
  • the read path is the address of the block to be repaired.
  • the added address in the APP corresponds to the storage node as the storage node to be sent to the JS platform.
  • Step S305 Write the address of the repaired program segment to the storage node corresponding to the address of the to-be-repaired program segment.
  • the block to be repaired is repaired by replacing the address of the block to be repaired with the address of the repaired program segment.
  • the address of the repaired program segment is written to the APP, the address of the repaired program segment covers the address of the block to be repaired, thereby causing the APP to execute
  • the repaired block cannot be called by the address of the block to be repaired.
  • the repair process is the same as the above process. Since the address of the repaired program segment is "0", after the repair, the address of the repaired program segment does not point to any program segment, so that when the APP is running, neither the program to be repaired nor the other program can be called. Segment, this is equivalent to having deleted the program to be repaired.
  • the program segment to be repaired can be replaced without releasing a new program, so that the APP can be completed under the dynamic operation of the APP.
  • APP fix This avoids the time it takes for the app to go offline, repair, and re-review. Furthermore, this can reduce the cost of the APP. Optionally, this can reduce the crash rate. Moreover, this can improve the user experience.
  • FIG. 4 is a flowchart of a method for a fourth embodiment of a method for dynamically repairing an application according to an embodiment of the present invention, where the method includes the following steps.
  • Step S401 The server receives a connection request for running the application system APP.
  • connection request includes the version number of the APP to be run, and the server can determine whether the APP to be run needs according to the version number of the APP to be executed. repair.
  • Step S402 When the current version number is smaller than the highest version number, the repaired program segment is configured corresponding to the APP.
  • the version number is the version identifier of each generation of APP. Engineers can use the version number to understand the features provided by each generation of apps. Each version of the app is an improvement over the previous version of the app.
  • the server can determine whether the to-be-run APP needs to be repaired by determining whether the version number is the highest version number. If the version number is the highest version number, it is considered that the client currently running the application does not need to be repaired, and the server can return the normal running information to the client.
  • the server configures the repaired section for the APP of the version number, so that the client repairs the to-be-runned APP according to the repaired program segment.
  • the server Since the development and maintenance of the APP are performed on the server side, the server stores the program corresponding to each version of the APP. Therefore, in this embodiment, the server can obtain all the APP programs whose version number is higher than the version number of the client APP.
  • the server can obtain the program sections of the high version number APP and the client APP one by one according to the version number from small to large, and add identification information according to the attribute information for each program segment to obtain the repaired program segment.
  • the browser version number of the client is 5.1.0
  • the highest version number of the browser is 5.1.3.
  • the server receives the client's request to run the browser with the version number 5.1.0
  • the server obtains the C browser programs with the version numbers 5.1.1, 5.1.2, and 5.1.3, and obtains the version number 5.1.1, respectively. It is a different program segment with a version number of 5.1.0, a version number of 5.1.2 and a version number of 5.1.0, and a version number of 5.1.3 and a version number of 5.1.0.
  • the server adds identification information according to the attribute value of each program segment to form a repaired program segment of the browser with version number 5.1.0.
  • the difference between the version of the APP and the previous version of the APP may be different each time the engineering developer develops a new version of the APP.
  • the blocks are stored separately so that when the server is configured with a patch segment, the patch segments can be obtained directly.
  • the server can be written in the same language as the programming language of the repair platform.
  • the server since the repair platform is written in JavaScript code, the server can also write the fixed program segments using JavaScript code.
  • Step S403 Send the repaired program segment to the client.
  • the patch segment is sent to the client.
  • the current pending APP is repaired by the client.
  • the client receives the pre-configured repaired program segment of the server. After storing the repaired program segment, the client records the address of the repaired program segment and stores the address of the repaired program segment into the APP. During the running of the app, the patch segment is found through the address of the repaired segment and the repaired segment is executed. Therefore, compared with the prior art, the technology of the embodiment of the present invention
  • the program can repair the APP online, thus avoiding the time taken for the APP to go offline, repair, and re-review.
  • embodiments of the present invention can reduce the cost of the APP.
  • embodiments of the present invention can reduce the crash rate.
  • embodiments of the present invention may be able to improve the user experience.
  • FIG. 5 is a schematic structural diagram of an apparatus for dynamically repairing an application according to an embodiment of the present invention. This embodiment describes a device structure for a client.
  • the device includes: a receiving module 11, a storage module 12, and a recording module 13, wherein the receiving module 11 is configured to receive a pre-configured repaired program segment; the storage module 12 is configured to store the receiving module 11 The received repaired program segment; the recording module 13 is configured to record the storage module 12 to store the address of the repaired program segment.
  • the storage module 12 is further configured to store the address of the repaired program segment recorded by the recording module 13 into the application APP, and the APP runtime is invoked by using the address of the repaired program segment. The repaired program segment.
  • the solution can receive the repaired program segment for execution without violating the IOS development rule, and dynamically repair the APP according to the repaired program segment, by setting the repair platform in the APP. Avoid the time it takes for the app to go offline, repair, and re-review.
  • the storage module 12 includes: a creating unit and a writing unit, wherein the creating unit is configured to create a storage node corresponding to the address of the repaired program segment in the APP.
  • the writing unit is configured to write an address of the repaired program segment at the storage node that has been created.
  • the creating unit includes: a first reading subunit, a first searching subunit, a first determining subunit, and a first adding subunit, wherein the first reading subunit is configured to: Reading the identification information of the repaired program segment; the first search subunit is configured to search, according to the identifier information, an address of the function module to which the repaired program segment belongs according to the identifier information; Determining a sub-unit, configured to determine a storage node corresponding to an address of the function module; the first adding sub-unit, configured to add a sub-storage node to a storage node corresponding to an address of the function module, and add the sub-storage node A storage node that acts as the address of the repaired program segment.
  • the storage module further includes: a reading unit, wherein the reading unit is configured to read, from the APP, a storage node corresponding to an address of the program segment to be repaired, where The repaired program segment is the program segment before the repaired program segment is repaired.
  • the writing unit is further configured to write, at a storage node corresponding to the address of the to-be-repaired program segment, an address of the repaired program segment to replace the address of the repaired program segment. The address of the block to be repaired.
  • the reading unit includes: a second reading subunit, a second searching subunit, and a second determining subunit, wherein the second reading subunit is configured to read the And the second search subunit is configured to search, according to the identifier information, an address of the function module to which the repaired program segment belongs from the APP; the second determining subunit, The storage node corresponding to the address of the function module is determined; the second search subunit is further configured to use the storage node corresponding to the address of the function module as a root storage node, and look for the to-be-served node from the sub-storage node. The storage node corresponding to the address of the fix.
  • the reading unit includes: a second adding subunit, wherein, in this embodiment, the second searching subunit is further configured to The identifier information is used to find a function module to which the repaired program segment belongs; the second determining subunit is further configured to determine the to-be-repaired program segment from the function module; the second added sub-unit is configured to Adding a storage address to the to-be-repaired program segment; the second determining sub-unit is further configured to determine, by the storage node corresponding to the added storage address of the to-be-repaired program segment, an address corresponding to the address of the to-be-repaired program segment Storage node.
  • the device for dynamically repairing an application provided by the embodiment of the present invention can repair the APP online, thereby preventing the APP from being offline and repaired. And review the time spent. Furthermore, embodiments of the present invention can reduce the cost of the APP. Alternatively, embodiments of the present invention can reduce the crash rate. Furthermore, embodiments of the present invention may be able to improve the user experience.
  • FIG. 6 is a schematic structural diagram of a second implementation manner of a device for dynamically repairing an application according to an embodiment of the present invention.
  • the device includes: a receiving module 21, a configuration module 22, and a sending module 23, wherein the receiving module 21 is configured to receive a connection request for running an application system APP, where the connection request includes a current version number of the APP;
  • the configuration module 22 is configured to: when the current version number is smaller than the highest version number, configure the repaired program segment corresponding to the APP; and send module 23, configured to send the repaired program segment to the client.
  • the configuration module includes: an obtaining unit, an adding unit, and a determining unit, where the acquiring unit is configured to sequentially acquire a program segment different from the APP from an APP whose version number is greater than the current version number; And an adding unit, configured to add identifier information according to the attribute value to the program segment; and a determining unit, configured to determine the program segment to which the identifier information is added as the repaired program segment.
  • the apparatus for dynamically repairing an application provided by the embodiment of the present invention can be seen.
  • the client receives the pre-configured patch segment of the server. After storing the repaired program segment, the client records the address of the repaired program segment and stores the address of the repaired program segment into the APP, thereby searching through the address of the repaired program segment during the running of the APP. Go to the repaired section and execute the fixed section. Therefore, compared with the prior art, the technical solution of the embodiment of the present invention can repair the APP online, thereby avoiding the time consumed by the APP to go offline, repair, and re-examine. Furthermore, embodiments of the present invention can reduce the cost of the APP. Alternatively, embodiments of the present invention can reduce the crash rate. Moreover, embodiments of the present invention can improve the user experience.
  • FIG. 7 is a schematic structural diagram of a system for dynamically repairing an application according to an embodiment of the present invention.
  • the system includes: a server 1 and a client 2.
  • the server 1 is configured to receive a connection request of the running application system APP sent by the client 2, where the connection request includes the current version number of the APP; when the current version number is less than the highest version number, the corresponding APP configuration has been repaired.
  • client 2 is used to receive the pre-configured repaired segment of server 1; store the repaired program segment; record the address where the repaired program segment is stored; The address is stored in the application app to facilitate the APP runtime
  • the patch segment is called by the address of the repaired block.
  • the embodiments of the present invention provide a method, an apparatus, and a related system for dynamically repairing an application.
  • the client receives the pre-configured patch segment of the server.
  • the client After storing the repaired program segment, the client records the address of the repaired program segment and stores the address of the repaired program segment into the APP, thereby searching through the address of the repaired program segment during the running of the APP. Go to the repaired section and execute the fixed section. Therefore, compared with the prior art, the technical solution of the embodiment of the present invention can repair the APP online, thereby avoiding the time consumed by the APP to go offline, repair, and re-examine. Further, the cost of the APP can be reduced according to an embodiment of the present invention. Alternatively, embodiments of the present invention can reduce the crash rate. Furthermore, embodiments of the present invention may be able to improve the user experience.

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 Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种动态修复应用程序的方法,包括:客户端接收预先配置的已修复程序段(S101);存储所述已修复程序段(S102);记录存储所述已修复程序段的地址(S103);将所述已修复程序段的地址存储到应用程序APP中(S104),所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。在线上修复APP,能够避免APP下线、修复、再审核所消耗的时间。

Description

一种动态修复应用程序的方法、装置及相关系统 技术领域
本发明涉及互联网技术领域,更具体而言,涉及一种动态修复应用程序的方法、装置及相关系统。
背景技术
众所周知,移动终端的运行依赖于内置的运行系统。鉴于移动终端的便捷性和操作简易性,人们越来越倾向于通过移动终端进行网络活动。因此,为了迎合用户的需求,同时,增加移动终端的使用灵活性,第三方服务器基于移动终端的运行系统开发出多种实现不同功能的APP(Application,应用程序)。当用户想要通过移动终端进行某种活动时,可以在移动终端安装能够实现相应功能的APP。
具体的,以IOS系统为例,由于APP为第三方服务器开发的第三方应用程序,在第三方服务器开发出APP之后,需要经过客户端的IOS系统的审核。当IOS系统审核通过后,将该APP在APP Store中发布。之后,当用户需要使用该APP时,才能够从APP Store中下载。
然而,客户端IOS系统审核APP的时间相对较长,通常为7天左右。如果在APP发布之后发现某些功能存在错误,则需要先将APP下线,然后对APP存在的错误进行修复。修复后的APP需要再次审核继而再次发布。该过程需要消耗很长的时间,导致APP的成本消耗大,崩溃率上升,严重影响用户体验。
发明内容
有鉴于此,本发明实施例提供了一种动态修复应用程序的方法、装置及相关系统。本发明实施例针对APP发布后修复错误所造成的消耗时间长的问题。
第一方面,本发明实施例提供了一种动态修复应用程序的方法,包括:客户端接收预先配置的已修复程序段;存储所述已修复程序段;记录存储所述已修复程序段的地址;将所述已修复程序段的地址存储到应用程序APP中,所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。
在第一方面的第一种可能的实现方式中,将所述已修复程序段的地址存储到应用程序APP中,包括:在所述APP中创建所述已修复程序段的地址对应的存储节点;在已创建的所述存储节点写入所述已修复程序段的地址。
结合上述第一方面,在第二种可能的实现方式中,将所述已修复程序段的地址存储到应用程序APP中,包括:从所述APP中读取待修复程序段的地址对应的存储节点,其中,所述待修复程序段是所述已修复程序段修复之前的程序段;在所述待修复程序段的地址对应的存储节点写入所述已修复程序段的地址,以使用所述已修复程序段的地址替换所述待修复程序段的地址。
结合上述第一方面,在第三种可能的实现方式中,所述在所述APP中创建所述已修复程序段的地址的存储节点包括:读取所述已修复程序段的标识信息;根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;确定所述功能模块的地址所对应的存储节点;为所述功能模块的地址对应的存储节点添加子存储节点,并将所述子存储节点作为所述已修复程序段的地址的存储节点。
结合上述第一方面,在第四种可能的实现方式中,所述从所述APP中读取待修复程序段的地址对应的存储节点包括:读取所述已修复程序段的标识信息;根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;确定所述功能模块的地址所对应的存储节点;以所述功能模块的地址对应的存储节点为根存储节点,从子存储节点中查找所述待修复程序的地址对应的存储节点。
结合上述第一方面,在第五种可能的实现方式中,所述从所述APP中读取待修复程序段的地址对应的存储节点包括:读取所述已修复程序段的标识信息;根据所述标识信息查找所述已修复程序段所属的功能模块;从所述功能模块中确定所述待修复程序段;为所述待修复程序段添加存储地址; 将所添加的所述待修复程序段的存储地址对应的存储节点确定为所述待修复程序段的地址对应的存储节点。
第二方面,本发明实施例还提供了一种动态修复应用程序的方法,包括:服务器接收运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;将所述已修复程序段发送到客户端,由所述客户端存储所述已修复程序段;获取存储所述已修复程序段的地址;将所述已修复程序段的地址存储到所述APP中,以便于所述APP运行时,所述客户端通过所述已修复程序段的地址调用所述已修复程序段。
在第二方面的第一种可能实现方式中,所述对应所述APP配置已修复程序段包括:顺次从版本号大于所述当前版本号的APP中获取与所述APP不同的程序段;按照属性值为所述程序段添加标识信息;将添加有所述标识信息的程序段确定为所述已修复程序段。
第三方面,本发明实施例提供了一种动态修复应用程序的装置,包括:接收模块,用于接收预先配置的已修复程序段;存储模块,用于存储所述接收模块所接收的已修复程序段;记录模块,用于记录所述存储模块存储所述已修复程序段的地址;所述存储模块,还用于将所述记录模块记录的已修复程序段的地址存储到应用程序APP中,所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。
在第三方面的第一种可能实现方式中,所述存储模块包括:创建单元和写入单元,其中,所述创建单元,用于在所述APP中创建所述已修复程序段的地址对应的存储节点;所述写入单元,用于在已创建的所述存储节点写入所述已修复程序段的地址。
结合上述第三方面,在第二种可能的实现方式中,所述存储模块还包括:读取单元,其中,所述读取单元,用于从所述APP中读取待修复程序段的地址对应的存储节点,其中,所述待修复程序段是所述已修复程序段修复之前的程序段;所述写入单元,还用于在所述待修复程序段的地址对应的存储节点写入所述已修复程序段的地址,以使用所述已修复程序段的地址替换所述待修复程序段的地址。
结合上述第三方面,在第三种可能的实现方式中,所述创建单元包括:第一读取子单元、第一查找子单元、第一确定子单元和第一添加子单元,其中,所述第一读取子单元,用于读取所述已修复程序段的标识信息;所述第一查找子单元,用于根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;所述第一确定子单元,用于确定所述功能模块的地址所对应的存储节点;所述第一添加子单元,用于为所述功能模块的地址对应的存储节点添加子存储节点,并将所述子存储节点作为所述已修复程序段的地址的存储节点。
结合上述第三方面,在第四种可能的实现方式中,所述读取单元包括:第二读取子单元、第二查找子单元和第二确定子单元,其中,所述第二读取子单元,用于读取所述已修复程序段的标识信息;所述第二查找子单元,用于根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;所述第二确定子单元,用于确定所述功能模块的地址所对应的存储节点;所述第二查找子单元,还用于以所述功能模块的地址对应的存储节点为根存储节点,从子存储节点中查找所述待修复程序的地址对应的存储节点。
结合上述第三方面,在第五种可能的实现方式中,所述读取单元包括:第二添加子单元,其中,所述第二查找子单元,还用于根据所述标识信息查找所述已修复程序段所属的功能模块;所述第二确定子单元,还用于从所述功能模块中确定所述待修复程序段;所述第二添加子单元,用于为所述待修复程序段添加存储地址;所述第二确定子单元,还用于将所添加的所述待修复程序段的存储地址对应的存储节点确定为所述待修复程序段的地址对应的存储节点。
第四方面,本发明实施例还提供了一种动态修复应用程序的装置,包括:接收模块,用于接收运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;配置模块,用于当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;发送模块,用于将所述已修复程序段发送到客户端。
在第四方面的第一种可能实现方式中,所述配置模块包括:获取单元、添加单元和确定单元,其中,所述获取单元,用于顺次从版本号大于所述当 前版本号的APP中获取与所述APP不同的程序段;所述添加单元,用于按照属性值为所述程序段添加标识信息;所述确定单元,用于将添加有所述标识信息的程序段确定为所述已修复程序段。
第五方面,本发明实施例提供了一种动态修复应用程序的系统,包括:服务器和客户端,其中,所述服务器,用于收客户端发送的运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;将所述已修复程序段发送到所述客户端;所述客户端,用于接收服务器预先配置的已修复程序段;存储所述已修复程序段;记录存储所述已修复程序段的地址;将所述已修复程序段的地址存储到应用程序APP中,以便于所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。
由以上技术方案可知,本发明实施例提供了动态修复应用程序的方法、装置及相关系统。在APP需要修复时,客户端接收服务器预先配置的已修复程序段,在存储所述已修复程序段之后,记录所述已修复程序段的地址,并将已修复程序段的地址存储到APP中。在APP运行过程中,通过已修复程序段的地址查找到已修复程序段,并执行已修复程序段。因此,与现有技术相比,本发明实施例的技术方案,能够在线上修复APP,从而能够避免APP下线、修复、再审核所消耗的时间。进而,这可以能够降低APP的成本消耗。可选地,这可以降低崩溃率。此外,这能够提高用户体验。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。通过附图所示,本发明的上述及其它目的、特征和优势将更加清晰。在全部附图中相同的附图标记指示相同的部分。并未刻意按实际尺寸等比例缩放绘制附图,重点在于示出本发明的主旨。
图1为本发明实施例提供的动态修复应用程序方法的方法流程图;
图2为本发明实施例提供的动态修复应用程序的方法的第二种实施方式的方法流程图;
图3为本发明实施例提供的动态修复应用程序的方法的第三种实施例方式的方法流程图;
图4为本发明实施例提供的动态修复应用程序的方法的第四种实施例方式的方法流程图;
图5为本发明实施例提供的动态修复应用程序的装置的结构示意图;
图6为本发明实施例提供的动态修复应用程序的装置第二种实施方式的结构示意图;
图7为本发明实施例提供的动态修复应用程序的系统的结构示意图。
具体实施方式
下面以IOS系统为例说明根据本发明的实施例。本领域技术人员应当理解,其他系统可能存在与IOS系统类似的情形,本发明的实施例也可以应用于所述其他系统。
IOS系统的开发语言为Objective-C语言(本发明实施例中简称为OC语言)。基于IOS系统运行的APP均使用OC语言开发。使用OC语言开发的程序在执行时,通过调用不同的方法实现不同的功能,而不同的方法属于不同的类。在APP运行过程中需要调用某一方法时,首先确定该方法所属的类,然后,从类中查找并调用该方法。基于OC语言的语法、类和方法对应的实现程序段均存储在移动终端的内存中,在APP中对应地记录存储程序段的地址。APP在运行时,通过地址查找并调用相关程序段。基于上述实现过程,在本发明实施例的技术方案中,通过修改程序段的地址改变APP所调用的程序段,从而对APP的功能进行修复。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
由于在本发明实施例的技术方案中,修复APP的具体操作主要在客户端完成,因此,为了使本领域技术人员准确地了解本方案,下面将从客户端的角度对本方案进行说明。
请参见图1。图1为本发明实施例提供的动态修复应用程序的方法的流程图。本实施例将从整体上介绍本发明的实现方法,所述方法包括以下步骤。
步骤S101:客户端接收预先配置的已修复程序段。
当客户端运行APP时,该APP可以通过客户端向其对应的服务器发送连接请求,其中,连接请求中包括该APP的版本号。服务器在读取该APP的版本号之后,可以通过该APP的版本号确定该APP需要修复的程序,从而预先配置该APP对应的已修复程序段,并发送到客户端。需要说明的是,服务器根据APP的版本号配置已修复程序段的过程详见下述实施例的描述,本发明实施例此处不做详述。
由于APP的执行过程是调用一个个方法程序段的过程,因此,本方案所述的已修复程序段可以视为程序段合集,包括至少一个程序段,并且每个程序段对应于一种方法实现。此外,为了能够明确每个程序段所表示的内容及所属的类,服务器可以根据程序段所表示的方法的属性值、或者方法名称,为每个程序段添加标识信息,用于客户端识别已修复程序段,从而便于客户端修复APP。
例如,当用户在iphone手机上运行浏览器时,当前版本号的浏览器相对于最新版本号的浏览器缺少添加控件的功能。服务器将添加控件的执行程序作为已修复程序段发送到客户端。由客户端在当前运行的浏览器的基础上,将添加控件的程序段加入。
步骤S102:存储所述已修复程序段。
现有技术中,如果直接修改OC语言开发的程序,IOS系统能够检测得知,从而不允许修改操作的执行,导致无法通过直接修改OC语言来在线修复APP。为解决该问题,技术人员在开发APP时,预先在APP中设置有修复平台,该修复平台通过在IOS系统中可修改的编程语言编写,而且能够提供调用OC语言代码的环境。具体的,由于IOS系统允许JavaScript代 码执行,因此,在本发明的一个优选示例中,修复平台可以使用JavaScript代码编写。当然也可以使用其他满足上述条件的语言编写,本发明实施例对此不做限制。
本实施例中,将使用JavaScript代码编写的修复平台称为JS平台。当JS平台接收到已修复程序段之后,首先,将已修复程序段存储到客户端内存,然后,获取已修复程序段在内存中的存储地址。由此可见,服务器可以直接使用JavaScript代码编写已修复程序段,JS平台能够识别所接收的已修复程序段。
在JS平台接收到已修复程序段,并根据标识信息识别每个已修复程序段之后,将每个已修复程序段转换为APP能识别的格式,然后再存储到内存中。APP运行时能够直接调用所存储的已修复程序段。具体的,转换代码格式的方法为本领域技术人员所熟知的技术,本发明实施例此处不再赘述。
本实施例中,通过设置修复平台,能够在APP动态运行时,接收用于执行的已修复程序段,从而既能够满足IOS系统的规则,又能够在APP运行时动态修复APP。
步骤S103:记录存储所述已修复程序段的地址。
由上述描述可知,OC程序执行时首先查找待调用方法的地址,然后根据所读取的地址查找并执行方法对应的程序。因此,JS平台将已修复程序段存储到内存之后,记录存储已修复程序段的地址,以便于将已修复程序段的地址存储到APP的相应位置,使APP运行过程中读取到已修复程序段的地址。
需要说明的是,由上述描述可知,已修复程序段是程序段的合集,而本实施例所述的已修复程序段的地址具体为,已修复程序段中每个已修复程序段所对应的存储地址。
步骤S104:将所述已修复程序段的地址存储到应用程序APP中。
本实施例中,APP在运行时能够调用已修复程序段,并执行已修复程序段。这被认为是已经对APP完成修复。在JS平台存储已修复程序段之后,将已修复程序段的地址存储到APP中。
根据上述描述可知,在OC语言编写的程序中,方法从属于一个类。在本实施例中,可以将类作为程序段所属的功能模块,每个功能模块同样对应一个存储地址。在APP执行过程中,通常先读取到功能模块的地址,确定功能模块的地址之后,再确定程序段的地址。因此,为了便于APP更加高效的运行,功能模块的地址和程序段的地址在APP中可以按照从属关系进行存储。具体的,每个地址对应写在一个存储节点,功能模块的地址所对应的存储节点可以看做根存储节点。从属于该功能模块的程序段的地址所对应的存储节点,为该根存储节点的子存储节点。这样能够清晰的反应地址的对应关系。因此,本实施例中,将已修复程序段的地址写入到APP中相应的存储节点。
需要指出的是,IOS系统提供有runtime机制。runtime机制是指,系统将把某些可以重复使用的程序或者实例打包或者重建成为“运行库"。“运行库”中的程序或者实例可以在运行时被连接或者被任何程序调用。因此,本方案中JS平台读取和调用APP的程序和地址的过程可以均是通过runtime机制完成的。JS平台通过runtime机制调用APP程序和地址的方法和过程,为本领域技术人员所熟知的技术,本发明实施例此处不再赘述。
此外,由于JS平台与APP的程序语言不同,所以能够识别的程序格式也不相同。在JS平台调用APP的相应程序时,OC程序首先按照预设格式封装JS平台调用的程序,然后再将封装后的程序传递至JS平台。具体的,JS平台可以通过正则表达式把所有的程序调用都改成调用一个固定的_oc()函数,即,JS平台所调用的程序均需要以_oc()函数的格式封装。具体的,由于JavaScript语言具有将OC语言中的NSDictionary与JavaScript对象自动转换的特性,因此,当JS平台调用APP中的程序段时,OC程序可以将JS调用的程序封装成一个NSDictionary,并在NSDictionary中将指出该程序段的类名、方法名及指针等,从而能够由JS平台调用任意的OC程序。
由本实施例的描述可知,本方案通过在APP中设置修复平台,能够在不违背IOS开发规则的情况下,接收用于执行的已修复程序段,并依据已修复程序段动态修复APP,从而能够避免APP下线、修复、再审核所消耗的 时间。
此外,修复APP通常是对APP执行下述三种操作,向APP中添加程序段、从APP中删除程序段以和修改APP中的部分程序段,而上述实施例对本方案的描述相对概括,为了使本领域技术人员更加清楚的理解本方案,下面基于上述三种修复操作,分别对本发明实施例的技术方案进行详细描述。
需要说明的是,下述实施例是在上述实施例基础上的展开,也是对上述实施例的补充,因此,本实施例中与上述实施例相同的步骤,详见上述实施例的描述,本实施例不再赘述。
请参见图2,图2为本发明实施例提供的动态修复应用程序方法的第二种实施方式的方法流程图,本实施例将对添加程序段的操作过程进行描述。本实施例所述方法包括下述步骤。
步骤S201:客户端接收预先配置的已修复程序段。
基于上述实施例的描述可知,已修复程序段是方法程序段的合集,包括至少一个完整方法对应的程序段,因此,为了明确客户端需要对每个已修复程序段执行的操作,服务器针对每个已修复程序段预先添加操作指令,操作指令可以通过数字或者字母表示,本发明实施例对此不做限制。客户端在接收到已修复程序段之后,可以根据操作指令对已修复程序段的地址执行相应操作。例如,本实施例中,添加操作的操作指令可以设置为“ad”或者其他标识信息,当客户端读取到操作指令信息之后,根据操作指令确定下一步操作。
步骤S202:存储所述已修复程序段。
步骤S203:记录存储所述已修复程序段的地址。
步骤S204:在所述APP中创建所述已修复程序段的地址对应的存储节点。
根据上述描述可知,APP中的地址通过存储节点形成从属关系。当向APP添加程序段时,需要将已修复程序段的地址写到其相应的存储节点。由于所添加程序段为新程序段,所以,APP中不存在写入已修复程序段地址存储节点,在将已修复程序段的地址存储到APP之前,需要创建已修复程 序段地址对应的存储节点。
由于已修复程序段从属于某一功能模块,所以,已修复程序段的地址对应的存储节点为功能模块的地址所对应的存储节点的子存储节点。客户端可以根据已修复程序段的标识信息查找该功能模块的地址,并根据功能模块的地址确定其对应的存储节点。然后,客户端可以以该功能模块的地址对应的存储节点为根节点,添加新的子存储节点,该新的子存储节点即为所添加的已修复程序段的地址所对应的存储节点。
需要说明的是,存储节点可以为存储位置的标记。因此,创建存储节点的过程是确定存储位置并在所确定的存储位置添加标记的过程。具体的,这是本领域技术人员所熟知的技术手段,本发明实施例此处不再详述。
步骤S205:在已创建的所述存储节点写入所述已修复程序段的地址。
基于上述步骤,在创建存储节点之后,APP将所创建的存储节点按照预设封装格式进行封装,并发送至JS平台。JS平台获知存储节点后,向APP发送在存储节点写入已修复程序段的地址的命令,完成对已修复程序段的地址的存储。
由本实施例的描述可知,向APP添加程序段时,无须修改APP对应的执行程序,仅在APP中添加新的存储节点即可,从而能够避免对IOS系统的修改,向APP动态添加已修复程序段。
上述实施例基于添加程序段的场景对本发明实施例的技术方案进行了描述。除此之外,本方案还包括修改程序段和删除程序段的场景。下述实施例将基于修改程序段和删除程序段的场景对本方案进行描述。
请参见图3。图3为本发明实施例提供的动态修复应用程序的方法的第三种实施例方式的方法流程图,所述方法包括如下步骤:
步骤S301:客户端接收预先配置的已修复程序段。
本实施例中,当修改程序段时,JS平台通过使用已修复程序段替换待修复程序段的方式,将APP所执行的原程序段替换为新程序段。因此,客户端所接收的已修复程序段的操作指令为“替换”指令。
此外,需要说明的是,当删除某个程序段时,由于待删除程序段不存在对应的已修复程序段,所以,可以将待删除程序段对应的已修复程序段视为空。 服务器可以仅将待删除程序段的标识信息和“替换”操作指令发送到客户端。
步骤S302:存储所述已修复程序段。
步骤S303:记录存储所述已修复程序段的地址。
由于待删除程序段所对应的已修复程序段为空,因此,不存在已修复程序段对应的地址。该待删除程序段的已修复程序段地址也为空,空的存储地址可以使用“0”表示。
步骤S304:从所述APP中读取待修复程序段的地址对应的存储节点。
在删除程序段和替换程序段时,APP中均存储有修复前的待修复程序段地址。因此,JS平台在接收到已修复程序段的地址后,需要向APP发送查找待修复程序段的地址对应的存储节点的命令。当APP接收到命令后,可以根据已修复程序段的标识信息查找到对应的功能模块的地址,并确定该功能模块的地址所对应的存储节点。由于待修复程序段是该功能模块的子程序段,因此,可以在所确定的存储节点的子存储节点中查找待修复程序段地址的存储节点。同样的,APP查找到待修复程序段地址的存储节点后,按照预设封装格式封装后再发送至JS平台。
需要说明的是,在OC语言程序中,大部分方法程序段通过列表的形式存储。方法程序段在列表中通过指针指向。指向方法程序段的指针为方法程序的地址。而上述在APP中查找存储节点的方法,为基于该场景的描述。
然而,在OC语言程序中,还包括部分需直接执行的方法程序,例如,super方法和self方法。该类程序在APP中不存在地址,因此,也不存在存储节点。所以,当待修复程序段为此类程序时,APP首先根据标识信息查找相应的功能模块,从功能模块对应的程序段中查找到待修复程序段之后,为该待修复程序段添加读取路径。该读取路径即是待修复程序段的地址。所添加的地址在APP中对应存储节点为待发送到JS平台的存储节点。
步骤S305:在所述待修复程序段的地址对应的存储节点写入所述已修复程序段的地址。
由上述描述可知,本实施例中,通过使用已修复程序段的地址替换待修复程序段的地址,来修复待修复程序段。将已修复程序段的地址写入APP的同时,已修复程序段的地址覆盖待修复程序段的地址,从而使得APP执 行时,无法通过待修复程序段的地址调用到待修复程序段,完成修复。
当对APP的修复操作是删除程序段时,修复过程与上述过程相同。由于已修复程序段的地址为“0”,因此,修复之后,已修复程序段的地址不指向任何程序段,从而在APP运行时,既无法调用到待修复程序段,也无法调用到其他程序段,这等同于已删除待修复程序。
由本实施例的描述可知,通过将待修复程序段的地址替换为已修复程序段的地址,能够在不下发新程序的基础上替换待修复程序段,从而能够在APP动态运行的情况下完成对APP的修复。这避免APP下线、修复、再审核所消耗的时间。进而,这能够降低APP的成本消耗。可选地,这可以降低崩溃率。而且,这能够提高用户体验。
上述实施例从客户端的角度阐述了本方案的技术内容,为了使本领域技术人员对本方案有更加全面、完整的了解,下面从服务器的角度对本方案进行描述。
请参见图4。图4为本发明实施例提供的动态修复应用程序的方法的第四种实施例方式的方法流程图,所述方法包括下述步骤。
步骤S401:服务器接收运行应用系统APP的连接请求。
当用户在客户端点击运行APP时,APP通过客户端向其对应的服务器发送连接请求,该连接请求中包括待运行APP的版本号,服务器可以根据待运行APP的版本号确定待运行APP是否需要修复。
步骤S402:当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段。
版本号是每一代APP的版本标识。工程人员通过版本号能够了解每一代APP所提供的功能。每个版本的APP均是在上一版本的APP基础上的改进。当服务器读取客户端待运行APP的版本号之后,可以通过判断该版本号是否为最高版本号来确定待运行APP是否需要修复。如果该版本号是最高版本号,则认为客户端当前待运行的APP无须修复,服务器可以向客户端返回常规的运行信息。如果该版本号不是最高版本号,则客户端当前待运行的APP需要修复,服务器针对该版本号的APP配置已修复程序段,以便于客户端按照已修复程序段修复待运行的APP。
由于APP的开发及维护均在服务器端完成,服务器存储有各个版本的APP对应的程序,因此,本实施例中,服务器可以获取版本号高于客户端APP的版本号的所有APP程序。服务器可以按照版本号从小到大的顺序逐一获取高版本号的APP与客户端APP不同的程序段,并为每个程序段按照属性信息添加标识信息,得到已修复程序段。
例如,客户端运行的浏览器版本号为5.1.0,而浏览器的最高版本号为5.1.3。当服务器接收客户端运行版本号为5.1.0的浏览器的请求后,服务器获取版本号为5.1.1、5.1.2和5.1.3的C浏览器程序,并分别获取版本号为5.1.1与版本号为5.1.0,版本号为5.1.2与版本号为5.1.0,以及版本号为5.1.3与版本号为5.1.0的浏览器的不同程序段。服务器根据每个程序段的属性值为程序段添加标识信息,形成版本号为5.1.0的浏览器的已修复程序段。
需要说明的是,为了减少配置已修复程序段的步骤,提高配置已修复程序段的效率,工程人员每开发出新一个版本的APP时,可以将该版本的APP与上一版本的APP的区别程序段单独存储,以使服务器配置已修复程序段时,能够直接获取已修复程序段。
此外,为了便于客户端的修复平台识别和处理已修复程序段,服务器可以使用与修复平台的编程语言相同的变成语言进行编写。例如,在本实施例中,由于修复平台使用JavaScript代码编写,服务器也可以使用JavaScript代码编写已修复程序段。
骤S403:将所述已修复程序段发送到客户端。
当服务器配置完成已修复程序段之后,将已修复程序段发送到客户端。由客户端修复当前待运行的APP。详见上述实施例的描述,本发明实施例不再赘述。
由此可见,本发明实施例所提供的动态修复应用程序的方法,在APP需要修复时,客户端接收服务器预先配置的已修复程序段。客户端在存储所述已修复程序段之后,记录所述已修复程序段的地址,并将已修复程序段的地址存储到APP中。在APP运行过程中,通过已修复程序段的地址查找到已修复程序段,并执行已修复程序段。因此,与现有技术相比,本发明实施例的技 术方案,能够在线上修复APP,从而能够避免APP下线、修复、再审核所消耗的时间。进而,本发明的实施例可以降低APP的成本消耗。可选地,本发明的实施例可以降低崩溃率。此外,本发明的实施例可以能够提高用户体验。
与上述实现方法相对应的,本发明实施例还提供了一种动态修复应用程序的装置。请参见图5。图5为本发明实施例提供的动态修复应用程序的装置的结构示意图,本实施例将针对客户端的装置结构进行描述。
所述装置包括:接收模块11、存储模块12和记录模块13,其中,所述接收模块11,用于接收预先配置的已修复程序段;所述存储模块12,用于存储所述接收模块11所接收的已修复程序段;所述记录模块13,用于记录所述存储模块12存储所述已修复程序段的地址。在本实施例中,所述存储模块12还用于将所述记录模块13记录的已修复程序段的地址存储到应用程序APP中,所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。
所述装置中各个模块的功能和作用的实现过程详见上述方法中对应的实现过程,在此不再赘述。
由本实施例的描述可知,本方案通过在APP中设置修复平台,能够在不违背IOS开发规则的情况下,接收用于执行的已修复程序段,并依据已修复程序段动态修复APP,从而能够避免APP下线、修复、再审核所消耗的时间。
需要说明的是,在本实施例中,存储模块12包括:创建单元和写入单元,其中,所述创建单元,用于在所述APP中创建所述已修复程序段的地址对应的存储节点;所述写入单元,用于在已创建的所述存储节点写入所述已修复程序段的地址。
在本实施例中,所述创建单元包括:第一读取子单元、第一查找子单元、第一确定子单元和第一添加子单元,其中,所述第一读取子单元,用于读取所述已修复程序段的标识信息;所述第一查找子单元,用于根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;所述第一确定子单元,用于确定所述功能模块的地址所对应的存储节点;所述第一添加子单元,用于为所述功能模块的地址对应的存储节点添加子存储节点,并将所述子存储节点作为所述已修复程序段的地址的存储节点。
而在另一个实施例中,所述存储模块还包括:读取单元,其中,所述读取单元,用于从所述APP中读取待修复程序段的地址对应的存储节点,其中,所述待修复程序段是所述已修复程序段修复之前的程序段。在本实施例中,所述写入单元,还用于在所述待修复程序段的地址对应的存储节点写入所述已修复程序段的地址,以使用所述已修复程序段的地址替换所述待修复程序段的地址。
在本实施例中,所述读取单元包括:第二读取子单元、第二查找子单元和第二确定子单元,其中,所述第二读取子单元,用于读取所述已修复程序段的标识信息;所述第二查找子单元,用于根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;所述第二确定子单元,用于确定所述功能模块的地址所对应的存储节点;所述第二查找子单元,还用于以所述功能模块的地址对应的存储节点为根存储节点,从子存储节点中查找所述待修复程序的地址对应的存储节点。
在上述实施例的基础上,在另一个实施例中,所述读取单元包括:第二添加子单元,其中,在本实施例中,所述第二查找子单元,还用于根据所述标识信息查找所述已修复程序段所属的功能模块;所述第二确定子单元,还用于从所述功能模块中确定所述待修复程序段;所述第二添加子单元,用于为所述待修复程序段添加存储地址;所述第二确定子单元,还用于将所添加的所述待修复程序段的存储地址对应的存储节点确定为所述待修复程序段的地址对应的存储节点。
所述装置中各个模块和单元的功能和作用的实现过程详见上述方法中对应的实现过程,在此不再赘述。
由本实施例的描述可知,本发明实施例所提供的动态修复应用程序的装置,与现有技术相比,本发明实施例的技术方案,能够在线上修复APP,从而能够避免APP下线、修复、再审核所消耗的时间。进而,本发明的实施例可以降低APP的成本消耗。可选地,本发明的实施例可以降低崩溃率。此外,本发明的实施例可以能够提高用户体验。
上述实施例从客户端的角度对本方案中的装置进行了描述,为了使本领域技术人员对本方案有更加全面、完整的了解,下面从服务器的角度对 装置进行描述。
请参见图6。,图6为本发明实施例提供的动态修复应用程序的装置第二种实施方式的结构示意图。所述装置包括:接收模块21、配置模块22和发送模块23,其中,接收模块21,用于接收运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;配置模块22,用于当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;发送模块23,用于将所述已修复程序段发送到客户端。
在本实施例中,配置模块包括:获取单元、添加单元和确定单元,其中,获取单元,用于顺次从版本号大于所述当前版本号的APP中获取与所述APP不同的程序段;添加单元,用于按照属性值为所述程序段添加标识信息;确定单元,用于将添加有所述标识信息的程序段确定为所述已修复程序段。
所述装置中各个模块和单元的功能和作用的实现过程详见上述方法中对应的实现过程,在此不再赘述。
由此可见,本发明实施例所提供的动态修复应用程序的装置。在APP需要修复时,客户端接收服务器预先配置的已修复程序段。在存储所述已修复程序段之后,客户端记录所述已修复程序段的地址,并将已修复程序段的地址存储到APP中,从而在APP运行过程中,通过已修复程序段的地址查找到已修复程序段,并执行已修复程序段。因此,与现有技术相比,本发明实施例的技术方案,能够在线上修复APP,从而能够避免APP下线、修复、再审核所消耗的时间。进而,本发明的实施例可以降低APP的成本消耗。可选地,本发明的实施例可以降低崩溃率。此外,本发明的实施例可以提高用户体验。
与上述实现方法和装置相对应的,本发明实施例还提供了一种动态修复应用程序的系统。参见图7。图7为本发明实施例提供的动态修复应用程序的系统的结构示意图。所述系统包括:服务器1和客户端2。其中,服务器1,用于收客户端2发送的运行应用系统APP的连接请求,其中,连接请求中包括APP的当前版本号;当当前版本号小于最高版本号时,对应APP配置已修复程序段,并将已修复程序段发送到客户端2;客户端2用于接收服务器1预先配置的已修复程序段;存储已修复程序段;记录存储已修复程序段的地址;将已修复程序段的地址存储到应用程序APP中,以便于APP运行时通 过已修复程序段的地址调用已修复程序段。
需要说明的是,服务器1与客户端2的具体操作过程与结构,详见上述实施例的描述,本发明实施例此处不在赘述。
综合上述,本发明实施例提供了动态修复应用程序的方法、装置及相关系统。在APP需要修复时,客户端接收服务器预先配置的已修复程序段。在存储所述已修复程序段之后,客户端记录所述已修复程序段的地址,并将已修复程序段的地址存储到APP中,从而在APP运行过程中,通过已修复程序段的地址查找到已修复程序段,并执行已修复程序段。因此,与现有技术相比,本发明实施例的技术方案,能够在线上修复APP,从而能够避免APP下线、修复、再审核所消耗的时间。进而,根据本发明的实施例可以降低APP的成本消耗。可选地,本发明的实施例可以降低崩溃率。此外,本发明的实施例可以能够提高用户体验。
以上所述仅是本发明的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (27)

  1. 一种动态修复应用程序的方法,其特征在于,包括:
    客户端接收预先配置的已修复程序段;
    存储所述已修复程序段;
    记录存储所述已修复程序段的地址;
    将所述已修复程序段的地址存储到应用程序APP中,所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。
  2. 如权利要求1所述的方法,其特征在于,将所述已修复程序段的地址存储到应用程序APP中,包括:
    在所述APP中创建所述已修复程序段的地址对应的存储节点;
    在已创建的所述存储节点写入所述已修复程序段的地址。
  3. 如权利要求1或2所述的方法,其特征在于,将所述已修复程序段的地址存储到应用程序APP中,包括:
    从所述APP中读取待修复程序段的地址对应的存储节点,其中,所述待修复程序段是所述已修复程序段修复之前的程序段;
    在所述待修复程序段的地址对应的存储节点写入所述已修复程序段的地址,以使用所述已修复程序段的地址替换所述待修复程序段的地址。
  4. 如权利要求1-3中任意一项所述的方法,其特征在于,所述在所述APP中创建所述已修复程序段的地址的存储节点包括:
    读取所述已修复程序段的标识信息;
    根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;
    确定所述功能模块的地址所对应的存储节点;
    为所述功能模块的地址对应的存储节点添加子存储节点,并将所述子存储节点作为所述已修复程序段的地址的存储节点。
  5. 如权利要求1-4中任意一项所述的方法,其特征在于,所述从所述APP中读取待修复程序段的地址对应的存储节点包括:
    读取所述已修复程序段的标识信息;
    根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块 的地址;
    确定所述功能模块的地址所对应的存储节点;
    以所述功能模块的地址对应的存储节点为根存储节点,从子存储节点中查找所述待修复程序的地址对应的存储节点。
  6. 如权利要求1-5中任意一项所述的方法,其特征在于,所述从所述APP中读取待修复程序段的地址对应的存储节点包括:
    读取所述已修复程序段的标识信息;
    根据所述标识信息查找所述已修复程序段所属的功能模块;
    从所述功能模块中确定所述待修复程序段;
    为所述待修复程序段添加存储地址;
    将所添加的所述待修复程序段的存储地址对应的存储节点确定为所述待修复程序段的地址对应的存储节点。
  7. 如权利要求1-6中任意一项所述的方法,其特征在于,客户端的操作系统是IOS系统。
  8. 如权利要求1-7中任意一项所述的方法,其特征在于,在应用程序APP中设置有修复平台,该修复平台通过在IOS系统中可修改的编程语言编写,而且能够提供调用OC语言代码的环境。
  9. 一种动态修复应用程序的方法,其特征在于,包括:
    服务器接收运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;
    当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;
    将所述已修复程序段发送到客户端,由所述客户端存储所述已修复程序段;获取存储所述已修复程序段的地址;将所述已修复程序段的地址存储到所述APP中,以便于所述APP运行时,所述客户端通过所述已修复程序段的地址调用所述已修复程序段。
  10. 如权利要求9所述的方法,其特征在于,所述对应所述APP配置已修复程序段包括:
    顺次从版本号大于所述当前版本号的APP中获取与所述APP不同的程序 段;
    按照属性值为所述程序段添加标识信息;
    将添加有所述标识信息的程序段确定为所述已修复程序段。
  11. 如权利要求9或10所述的方法,其特征在于,所述客户端的操作系统是IOS系统。
  12. 如权利要求9-11中任意一项所述的方法,其特征在于,在应用程序APP中设置有修复平台,该修复平台通过在IOS系统中可修改的编程语言编写,而且能够提供调用OC语言代码的环境。
  13. 一种动态修复应用程序的装置,其特征在于,包括:
    接收模块,用于接收预先配置的已修复程序段;
    存储模块,用于存储所述接收模块所接收的已修复程序段;
    记录模块,用于记录所述存储模块存储所述已修复程序段的地址;
    所述存储模块,还用于将所述记录模块记录的已修复程序段的地址存储到应用程序APP中,所述APP运行时通过所述已修复程序段的地址调用所述已修复程序段。
  14. 如权利要求13所述的装置,其特征在于,所述存储模块包括:创建单元和写入单元,其中,
    所述创建单元,用于在所述APP中创建所述已修复程序段的地址对应的存储节点;
    所述写入单元,用于在已创建的所述存储节点写入所述已修复程序段的地址。
  15. 如权利要求13或14所述的装置,其特征在于,所述存储模块还包括:读取单元,其中,
    所述读取单元,用于从所述APP中读取待修复程序段的地址对应的存储节点,其中,所述待修复程序段是所述已修复程序段修复之前的程序段;
    所述写入单元,还用于在所述待修复程序段的地址对应的存储节点写入所述已修复程序段的地址,以使用所述已修复程序段的地址替换所述待修复程序段的地址。
  16. 如权利要求13-15中任意一项所述的装置,其特征在于,所述创建 单元包括:第一读取子单元、第一查找子单元、第一确定子单元和第一添加子单元,其中,
    所述第一读取子单元,用于读取所述已修复程序段的标识信息;
    所述第一查找子单元,用于根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;
    所述第一确定子单元,用于确定所述功能模块的地址所对应的存储节点;
    所述第一添加子单元,用于为所述功能模块的地址对应的存储节点添加子存储节点,并将所述子存储节点作为所述已修复程序段的地址的存储节点。
  17. 如权利要求13-16中任意一项所述的装置,其特征在于,所述读取单元包括:第二读取子单元、第二查找子单元和第二确定子单元,其中,
    所述第二读取子单元,用于读取所述已修复程序段的标识信息;
    所述第二查找子单元,用于根据所述标识信息从所述APP中查找所述已修复程序段所属的功能模块的地址;
    所述第二确定子单元,用于确定所述功能模块的地址所对应的存储节点;
    所述第二查找子单元,还用于以所述功能模块的地址对应的存储节点为根存储节点,从子存储节点中查找所述待修复程序的地址对应的存储节点。
  18. 如权利要求13-17中任意一项所述的装置,其特征在于,所述读取单元包括:第二添加子单元,其中,
    所述第二查找子单元,还用于根据所述标识信息查找所述已修复程序段所属的功能模块;
    所述第二确定子单元,还用于从所述功能模块中确定所述待修复程序段;
    所述第二添加子单元,用于为所述待修复程序段添加存储地址;
    所述第二确定子单元,还用于将所添加的所述待修复程序段的存储地址对应的存储节点确定为所述待修复程序段的地址对应的存储节点。
  19. 如权利要求13-18中任意一项所述的方法,其特征在于,应用程序APP所在的客户端的操作系统是IOS系统。
  20. 如权利要求13-19中任意一项所述的装置,其特征在于,在应用 程序APP中设置有修复平台,该修复平台通过在IOS系统中可修改的编程语言编写,而且能够提供调用OC语言代码的环境。
  21. 一种动态修复应用程序的装置,其特征在于,包括:
    接收模块,用于接收运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;
    配置模块,用于当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;
    发送模块,用于将所述已修复程序段发送到客户端。
  22. 如权利要求21所述的装置,其特征在于,所述配置模块包括:获取单元、添加单元和确定单元,其中,
    所述获取单元,用于顺次从版本号大于所述当前版本号的APP中获取与所述APP不同的程序段;
    所述添加单元,用于按照属性值为所述程序段添加标识信息;
    所述确定单元,用于将添加有所述标识信息的程序段确定为所述已修复程序段。
  23. 如权利要求21或22所述的方法,其特征在于,所述客户端的操作系统是IOS系统。
  24. 如权利要求21-23中任意一项所述的装置,其特征在于,在应用程序APP中设置有修复平台,该修复平台通过在IOS系统中可修改的编程语言编写,而且能够提供调用OC语言代码的环境。
  25. 一种动态修复应用程序的系统,其特征在于,包括:服务器和客户端,其中,
    所述服务器,用于收客户端发送的运行应用系统APP的连接请求,其中,所述连接请求中包括所述APP的当前版本号;当所述当前版本号小于最高版本号时,对应所述APP配置已修复程序段;将所述已修复程序段发送到所述客户端;
    所述客户端,用于接收服务器预先配置的已修复程序段;存储所述已修复程序段;记录存储所述已修复程序段的地址;将所述已修复程序段的地址存储到应用程序APP中,以便于所述APP运行时通过所述已修复程序段的地址调 用所述已修复程序段。
  26. 如权利要求25所述的方法,其特征在于,所述客户端的操作系统是IOS系统。
  27. 如权利要求25或26所述的装置,其特征在于,在应用程序APP中设置有修复平台,该修复平台通过在IOS系统中可修改的编程语言编写,而且能够提供调用OC语言代码的环境。
PCT/CN2016/103939 2015-11-02 2016-10-31 一种动态修复应用程序的方法、装置及相关系统 WO2017076244A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/772,991 US10929121B2 (en) 2015-11-02 2016-10-31 Method, device and related system for dynamically repairing application

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510742193.2 2015-11-02
CN201510742193.2A CN106020786A (zh) 2015-11-02 2015-11-02 一种动态修复应用程序的方法、装置及相关系统

Publications (1)

Publication Number Publication Date
WO2017076244A1 true WO2017076244A1 (zh) 2017-05-11

Family

ID=57082639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103939 WO2017076244A1 (zh) 2015-11-02 2016-10-31 一种动态修复应用程序的方法、装置及相关系统

Country Status (3)

Country Link
US (1) US10929121B2 (zh)
CN (1) CN106020786A (zh)
WO (1) WO2017076244A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108202A (zh) * 2016-11-23 2018-06-01 阿里巴巴集团控股有限公司 一种热插拔方法和装置
CN110311833B (zh) * 2019-06-27 2021-06-15 北京创鑫旅程网络技术有限公司 供应商服务的检测方法、装置、电子设备和存储介质
CN110597764B (zh) * 2019-10-10 2024-05-07 深圳前海微众银行股份有限公司 一种文件下载、版本管理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110252414A1 (en) * 2010-04-08 2011-10-13 Inventec Corporation System using separate modules to update software and the method thereof
CN103605551A (zh) * 2013-11-28 2014-02-26 金蝶软件(中国)有限公司 一种基于ios程序的插件更新方法、系统及相关设备
CN103677937A (zh) * 2013-12-23 2014-03-26 腾讯科技(深圳)有限公司 升级软件和运行软件的方法及装置
CN103995721A (zh) * 2014-05-22 2014-08-20 广州金山网络科技有限公司 一种应用程序的升级方法、装置及系统

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0106213B1 (en) * 1982-09-29 1987-12-16 Kabushiki Kaisha Toshiba Decentralized information processing system and initial program loading method therefor
TW400469B (en) * 1997-07-08 2000-08-01 Winbond Electronics Corp Device capable of fixing programs in embedded microprocessor
US7472133B2 (en) * 2004-07-30 2008-12-30 Microsoft Corporation System and method for improved prefetching
TW200825730A (en) * 2006-12-07 2008-06-16 Inventec Corp Parameter display system
US8689244B2 (en) * 2007-01-26 2014-04-01 Objective Interface Systems, Inc. Hardware communications infrastructure supporting location transparency and dynamic partial reconfiguration
US8056062B2 (en) * 2007-05-14 2011-11-08 General Electric Company Methods and systems for converting application code in turbine control systems
CN101398752B (zh) * 2007-09-29 2011-08-31 国际商业机器公司 重叠指令存取单元和重叠指令存取方法
DE102009047025B3 (de) * 2009-11-23 2011-05-26 Beckhoff Automation Gmbh Echtzeit-Laufzeitsystem und Funktionsmodul für ein solches Laufzeitsystem
CN104699491A (zh) * 2013-12-06 2015-06-10 中兴通讯股份有限公司 一种应用程序的升级处理方法及终端设备
US20160154644A1 (en) * 2014-08-29 2016-06-02 Ram Chhawchharia Real-time previewing and modifying an application under development
US9542244B2 (en) * 2015-04-22 2017-01-10 Ryft Systems, Inc. Systems and methods for performing primitive tasks using specialized processors
CN104866307B (zh) * 2015-05-14 2018-04-27 百度在线网络技术(北京)有限公司 一种应用程序的修复方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110252414A1 (en) * 2010-04-08 2011-10-13 Inventec Corporation System using separate modules to update software and the method thereof
CN103605551A (zh) * 2013-11-28 2014-02-26 金蝶软件(中国)有限公司 一种基于ios程序的插件更新方法、系统及相关设备
CN103677937A (zh) * 2013-12-23 2014-03-26 腾讯科技(深圳)有限公司 升级软件和运行软件的方法及装置
CN103995721A (zh) * 2014-05-22 2014-08-20 广州金山网络科技有限公司 一种应用程序的升级方法、装置及系统

Also Published As

Publication number Publication date
CN106020786A (zh) 2016-10-12
US10929121B2 (en) 2021-02-23
US20180321932A1 (en) 2018-11-08

Similar Documents

Publication Publication Date Title
CN111090433B (zh) 一种数据处理的方法、装置和存储介质
CN107943485B (zh) 一种补丁编译平台及补丁编译方法
CN108614702B (zh) 字节码优化方法及装置
CN111158741B (zh) 监控业务模块对第三方类库依赖关系变化的方法及装置
CN104572463A (zh) 测试接口信息的方法及装置
WO2017076244A1 (zh) 一种动态修复应用程序的方法、装置及相关系统
CN104932972A (zh) 一种反动态调试应用程序的方法及装置
CN113384896A (zh) 基于Unity的资源打包方法、装置、设备及介质
CN114327776A (zh) 用于智能合约的调试方法、调试设备和调试系统
CN112187713A (zh) 报文转换的方法、装置、计算机设备和存储介质
US20210026756A1 (en) Deriving software application dependency trees for white-box testing
KR101689984B1 (ko) 프로그래머블 컨트롤러, 프로그래머블 컨트롤러 시스템 및 실행 에러 정보 작성 방법
CN109032612B (zh) 混合型应用的接口调用方法、装置及计算机可读存储介质
CN102226888B (zh) 框架加载方法及设备
CN110806891B (zh) 嵌入式设备软件版本的生成方法及装置
CN104536892A (zh) 一种软件在线调试方法和系统
US20140258973A1 (en) Systems And Methods For Automatically Generating Applications
CN114791884A (zh) 测试环境的构建方法、装置、存储介质及电子设备
CN109947407B (zh) 一种数据获取方法及装置
CN114238142A (zh) 一种基于appium+python的移动端ui自动化测试方法
CN109308256B (zh) 一种java程序动态分析方法、设备和存储介质
CN114443316B (zh) 一种对象访问方法、装置及电子设备
CN112558975B (zh) 组件的代码切换方法、装置、电子设备及可读存储介质
CN116774988B (zh) 解除框架包模式符号依赖的方法及装置
CN107479899B (zh) 文件处理方法和装置、存储介质及处理器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16861512

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15772991

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16861512

Country of ref document: EP

Kind code of ref document: A1