Application program updating method, system, computer device and storage medium
By receiving and parsing the repair package sent by the server, it replaces the content to be repaired in the application, solving the problem of low repair efficiency in the traditional hot repair method and achieving efficient application updates.
Patent Information
- Application Number
- CN201811019243.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-03
- Publication Date
- 2024-09-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the traditional hot repair method, the updated code and the original code coexist for a period of time, resulting in low repair efficiency. How to improve the repair efficiency of the application becomes a technical challenge.
By receiving the update prompt information sent by the server, the repair package is obtained and parsed using the parsing engine to obtain the repair code. The repair package carries the repair package identifier and function interface, detects and replaces the function interface of the application's content to be repaired, stores and runs the repair code to Update the application.
It effectively improves the update efficiency of applications, avoids the coexistence of original code and repair code, and improves the efficiency of hot fixes.
Smart Images

Figure CN109240723B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an application updating method, system, computer device and storage medium based on data processing. Background Art
[0002] With the rapid development of Internet technology, more and more applications have emerged. These applications may have some problems and vulnerabilities during the application process, and the applications need to be repaired. At present, online hot repair methods have emerged. This hot repair method can repair the application directly online, without the need to re-release the corresponding repaired new version of the application in the app store, nor does it require users to re-download the new version of the application.
[0003] However, in this traditional hot fix method, after the server obtains the updated code, when the original code is executed, the original code is intercepted and the updated code is executed. However, in this hot fix method, the updated code and the original code will coexist for a period of time, resulting in low repair efficiency. Therefore, how to effectively improve the repair efficiency of applications has become a technical problem that needs to be solved at present. Summary of the invention
[0004] Based on this, it is necessary to provide an application update method, system, computer device and storage medium that can effectively improve the repair efficiency in response to the above technical problems.
[0005] An application updating method, comprising:
[0006] The first terminal receives the update prompt information of the application sent by the server;
[0007] Obtaining a corresponding repair package from the server according to the update prompt information, wherein the repair package corresponds to the content to be repaired of the application program;
[0008] Acquire a parsing engine, and parse the repair package through the parsing engine to obtain a corresponding repair code;
[0009] The repair package carries a repair package identifier and a function interface, detects the function interface of the to-be-repaired content of the application program according to the repair package identifier, and modifies the function interface of the to-be-repaired content into the function interface of the repair package;
[0010] The repair code is stored in a local location corresponding to the content to be repaired, and the application is run according to the function interface and the repair code to update the application.
[0011] In one of the embodiments, the repair package includes a code identifier, and after obtaining the corresponding repair package from the server according to the update prompt information, it includes: obtaining the signature information of the repair package; when the signature information of the repair package is consistent with the signature information of the application, traversing the code identifier of the application; matching the code identifier of the repair package with the code identifier in the application; when a consistent code identifier is matched, the verification is passed.
[0012] In one of the embodiments, the application includes an application identifier, and after obtaining the corresponding repair package from the server according to the update prompt information, it also includes: obtaining the corresponding key file from the server according to the application identifier; parsing the key from the key file according to a preset method; and decrypting the repair package using the key.
[0013] In one of the embodiments, the method further includes: detecting abnormal conditions during the operation of the updated application; when an abnormal condition exists in the application, intercepting the abnormal condition and generating abnormal prompt information according to the abnormal condition; and sending the abnormal prompt information to the server.
[0014] An application updating method, comprising:
[0015] The server receives a repair package corresponding to the application uploaded by the second terminal, wherein the repair package includes a repair package identifier;
[0016] Acquire the corresponding content to be repaired in the application program according to the repair package identifier;
[0017] Verifying the repair package using the content to be repaired;
[0018] After the verification is passed, the repair package is encrypted and the encrypted repair package is released.
[0019] In one of the embodiments, the use of the content to be repaired to verify the repair package includes: identifying the business function corresponding to the content to be repaired; verifying whether the business function of the repair package matches the business function corresponding to the content to be repaired; when the business function of the repair package matches the business function corresponding to the content to be repaired, the verification is successful.
[0020] In one of the embodiments, the application includes an application identifier, and encrypting the repair package includes: obtaining a preset file and a key according to the application identifier; encoding the key to obtain the encoded key; encrypting the repair package according to the encoded key; adding the key to a preset position of the preset file, generating a key file and storing it.
[0021] An application updating system, comprising:
[0022] The server is used to receive a repair package corresponding to an application uploaded by a second terminal, wherein the repair package includes a repair package identifier; obtain the corresponding content to be repaired in the application according to the repair package identifier; verify the repair package using the content to be repaired; after the verification is passed, encrypt the repair package and publish the encrypted repair package.
[0023] The first terminal is used to receive update prompt information of an application sent by a server; obtain a corresponding repair package from the server according to the update prompt information, wherein the repair package corresponds to the content to be repaired of the application; obtain a parsing engine, parse the repair package through the parsing engine, and obtain a corresponding repair code; the repair package carries a repair package identifier and a function interface, detects the function interface of the content to be repaired of the application according to the repair package identifier, and modifies the function interface of the content to be repaired to the function interface of the repair package; stores the repair code to a location corresponding to the local content to be repaired, and runs the application according to the function interface and the repair code to update the application.
[0024] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0025] The first terminal receives the update prompt information of the application sent by the server;
[0026] Obtaining a corresponding repair package from the server according to the update prompt information, wherein the repair package corresponds to the content to be repaired of the application program; obtaining a parsing engine, and parsing the repair package through the parsing engine to obtain a corresponding repair code;
[0027] The repair package carries a repair package identifier and a function interface, detects the function interface of the to-be-repaired content of the application program according to the repair package identifier, and modifies the function interface of the to-be-repaired content into the function interface of the repair package;
[0028] The repair code is stored in a local location corresponding to the content to be repaired, and the application is run according to the function interface and the repair code to update the application.
[0029] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0030] The server receives a repair package corresponding to the application uploaded by the second terminal, wherein the repair package includes a repair package identifier;
[0031] Acquire the corresponding content to be repaired in the application program according to the repair package identifier;
[0032] Verifying the repair package using the content to be repaired;
[0033] After the verification is passed, the repair package is encrypted and the encrypted repair package is released.
[0034] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0035] The first terminal receives the update prompt information of the application sent by the server;
[0036] Obtaining a corresponding repair package from the server according to the update prompt information, wherein the repair package corresponds to the content to be repaired of the application program;
[0037] Acquire a parsing engine, and parse the repair package through the parsing engine to obtain a corresponding repair code;
[0038] The repair package carries a repair package identifier and a function interface, detects the function interface of the to-be-repaired content of the application program according to the repair package identifier, and modifies the function interface of the to-be-repaired content into the function interface of the repair package;
[0039] The repair code is stored in a local location corresponding to the content to be repaired, and the application is run according to the function interface and the repair code to update the application.
[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0041] The first terminal receives the update prompt information of the application sent by the server;
[0042] Obtaining a corresponding repair package from the server according to the update prompt information, wherein the repair package corresponds to the content to be repaired of the application program;
[0043] Acquire a parsing engine, and parse the repair package through the parsing engine to obtain a corresponding repair code;
[0044] The repair package carries a repair package identifier and a function interface, detects the function interface of the to-be-repaired content of the application program according to the repair package identifier, and modifies the function interface of the to-be-repaired content into the function interface of the repair package;
[0045] The repair code is stored in a local location corresponding to the content to be repaired, and the application is run according to the function interface and the repair code to update the application.
[0046] In the above-mentioned application updating method, system, computer device and storage medium, after the server releases the repair package of the application, the first terminal receives the update prompt information of the application sent by the server, and obtains the corresponding repair package from the server according to the update prompt information. The repair package corresponds to the content to be repaired of the application. After obtaining the repair package, the first terminal obtains the parsing engine, and parses the repair package through the parsing engine to obtain the corresponding repair code. The repair package carries the repair package identifier and the function interface, and the first terminal detects the function interface of the content to be repaired of the application according to the repair package identifier, and modifies the function interface of the content to be repaired to the function interface of the repair package. The first terminal further stores the parsed repair code to the location corresponding to the local content to be repaired, and runs the application according to the function interface and the repair code, thereby updating the application. By parsing the repair package and replacing the original content to be repaired at the same time, the update efficiency of the application can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 An application scenario diagram of an application updating method in an embodiment;
[0048] Figure 2 A schematic diagram of a flow chart of an application updating method in one embodiment;
[0049] Figure 3 A schematic diagram of a flow chart of steps for verifying a repair package in an embodiment;
[0050] Figure 4 is a flowchart of an application updating method in another embodiment;
[0051] Figure 5 A schematic flow chart of the steps of encrypting a repair package in one embodiment;
[0052] Figure 6 A structural block diagram of an application updating system in one embodiment;
[0053] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] The application updating method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the first terminal 102 communicates with the server 104 through the network. Among them, the first terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers. The first terminal 102 receives the update prompt information of the application sent by the server 104, and obtains the corresponding repair package from the server 104 according to the update prompt information, and the repair package corresponds to the content to be repaired of the application. After the first terminal 102 obtains the repair package, it obtains the parsing engine, and parses the repair package through the parsing engine to obtain the corresponding repair code. The repair package carries the repair package identifier and the function interface, and the first terminal 102 detects the function interface of the content to be repaired of the application according to the repair package identifier, and modifies the function interface of the content to be repaired to the function interface of the repair package. The first terminal 102 further stores the parsed repair code to the location corresponding to the local content to be repaired, and runs the application according to the function interface and the repair code, thereby updating the application. After parsing the repair package, the original content to be repaired is replaced at the same time, thereby effectively improving the update efficiency of the application.
[0056] In one embodiment, Figure 2 As shown, a method for updating an application is provided, which is applied to Figure 1 Taking the first terminal in the example as an example, the method includes the following steps:
[0057] Step 202: The first terminal receives update prompt information of the application sent by the server.
[0058] After the application is released, some problems may occur during the application process. When the application has a problem, the developer will develop a repair package based on the problem and upload the developed repair package to the server so that the server can release the repair package.
[0059] The first terminal may be a terminal corresponding to a user of the application. Specifically, after receiving the repair package, the server will send an update prompt message of the application to the corresponding first terminal to notify the first terminal that the application has a corresponding repair package. The first terminal can then learn from the update prompt message sent by the server that the application needs to be updated.
[0060] Step 204: Obtain a corresponding repair package from the server according to the update prompt information, where the repair package corresponds to the content to be repaired of the application program.
[0061] After the first terminal receives the update prompt information sent by the server, it can obtain the corresponding repair package from the server according to the update prompt information, and the repair package carries the repair package identifier and function interface. The repair package can be developed by the developer according to the repair requirements of the application, and uploaded to the server through the corresponding second terminal for release, and the repair package corresponds to the content to be repaired of the application.
[0062] Furthermore, after the first terminal obtains the corresponding repair package, it can also verify the repair package. Specifically, the repair package can also carry signature information, and the signature information carried in the repair package is verified with the signature information of the application. If the verification passes, it means that the repair package matches the application, that is, the repair package is the repair package of this application. By verifying the repair package, the validity of the repair package can be effectively verified. For example, it can effectively prevent the situation where the version of the repair package does not correspond to the version of the application.
[0063] Furthermore, the server can also encrypt the content in the repair package before releasing the repair package to increase the security of the repair package. Specifically, the server can obtain a preset file and a key according to the application identifier, and encode the key to obtain the encoded key. The repair package is encrypted according to the encoded key. The server also adds the key to the preset position of the preset file, generates a key file and stores it. After the first terminal obtains the repair package, it obtains the corresponding key file from the server according to the application identifier, and then obtains the key from the key file according to the preset rules, so that the repair package can be decrypted according to the key.
[0064] Step 206, obtaining a parsing engine, parsing the repair package through the parsing engine, and obtaining a corresponding repair code.
[0065] After the first terminal decrypts the repair package, it obtains a parsing engine, which is used to parse out the repair code in the repair package. The first terminal parses the repair package through the parsing engine, thereby effectively parsing out the repair code contained in the repair package.
[0066] Step 208: The repair package carries a repair package identifier and a function interface, and the function interface of the content to be repaired of the application is detected according to the repair package identifier, and the function interface of the content to be repaired is modified to the function interface of the repair package.
[0067] The repair package corresponds to the content to be repaired of the application, and the repair package carries a repair package identifier and a function interface. After the first terminal parses the repair code in the repair package through the parsing engine, it further detects the function interface of the content to be repaired in the application according to the repair package identifier carried in the repair package, and modifies the function interface of the content to be repaired to the function interface of the repair package. In this way, the function interface of the content to be repaired is replaced.
[0068] Furthermore, after verifying and encrypting the repair package, the server can also call a load balancer to assign a new process to the repair package and bind a new listening port. The first terminal obtains the corresponding repair package from the server, verifies the repair package, binds the listening port of the repair package, and resets the weight of the content to be repaired in the application corresponding to the repair package. For example, the weight of the part to be repaired can be reset to zero. And delete the code corresponding to the content to be repaired. When all connections corresponding to the content to be repaired are disconnected, the old process is shut down, thereby realizing the hot update of the repair package. By replacing the code of the part to be repaired, the original code and the repair code will not coexist when the application is updated using the repair package, thereby effectively improving the efficiency of hot repair.
[0069] Step 210, storing the repair code to a location corresponding to the local content to be repaired, and running the application according to the function interface and the repair code to update the application.
[0070] After the first terminal modifies the function interface of the content to be repaired, it further stores the repair code to the location corresponding to the local content to be repaired, and runs the application according to the function interface and the repair code, thereby updating the application. After the first terminal updates the application using the repair package, it starts the updated interface of the application. By replacing and deleting the original code corresponding to the content to be repaired using the repair package to update the application, the update efficiency of the application is effectively improved.
[0071] In the above-mentioned application updating method, after the first terminal receives the update prompt information of the application sent by the server, it obtains the corresponding repair package from the server according to the update prompt information, and the repair package corresponds to the content to be repaired of the application. After obtaining the repair package, the first terminal obtains the parsing engine, and parses the repair package through the parsing engine to obtain the corresponding repair code. The repair package carries the repair package identifier and the function interface, and the first terminal detects the function interface of the content to be repaired of the application according to the repair package identifier, and modifies the function interface of the content to be repaired to the function interface of the repair package. The first terminal further stores the parsed repair code to the location corresponding to the local content to be repaired, and runs the application according to the function interface and the repair code, thereby updating the application. By parsing the repair package and replacing the original content to be repaired at the same time, the updating efficiency of the application can be effectively improved.
[0072] In one embodiment, the repair package includes a code identifier. After obtaining the corresponding repair package from the server according to the update prompt information, a step of verifying the repair package is included. The step specifically includes the following contents:
[0073] Step 302: Obtain signature information of the repair package.
[0074] Step 304: When the signature information of the repair package is consistent with the signature information of the application, the code identifier of the application is traversed.
[0075] After the developer develops the repair package through the corresponding second terminal, he adds the corresponding signature information code identifier to the repair package and uploads it to the server so that the server can publish the repair package. The signature information is the signature information of the application corresponding to the repair package. The code identifier can be the identifier of the business function corresponding to the content to be repaired in the application.
[0076] After the first terminal obtains the repair package from the server, it obtains the signature information of the repair package and verifies the signature information of the repair package to verify whether the signature information of the repair package is consistent with the signature information of the application. When the signature information of the repair package is consistent with the signature information of the application, it means that the repair package is a repair package of the version corresponding to the application. By verifying the signature information of the repair package, the validity of the repair package can be effectively verified.
[0077] Step 306: Match the code identifier of the repair package with the code identifier in the application program.
[0078] Step 308: When a consistent code identifier is matched, the verification is successful.
[0079] When the signature information of the repair package is consistent with the signature information of the application, the first terminal traverses the code identifiers contained in the application and matches the code identifier of the repair package with the code identifier in the application to detect whether the code identifier of the repair package is in the code identifier of the application.
[0080] When a consistent code identifier is matched, it means that the repair package is a repair package for the relevant business functions of the application. By verifying the repair package based on its signature information and code identifier, it can effectively prevent the repair package from being irrelevant to the application, such as inserting advertisements, malicious bundling, etc., and thus effectively ensure the validity of the repair package.
[0081] In one embodiment, the application includes an application identifier. After the first terminal obtains the corresponding repair package from the server, it also includes: obtaining the corresponding key file from the server according to the application identifier; parsing the key from the key file according to a preset method; and decrypting the repair package using the key.
[0082] The server can also encrypt the content of the repair package before releasing it to increase the security of the repair package. Specifically, a database is deployed in the server. The database stores a variety of preset files and keys corresponding to application identifiers. Different keys can generate corresponding key files through different preset files.
[0083] The server can obtain the preset file and key according to the application identifier corresponding to the repair package, and encode the key to obtain the encoded key. The key can be a preset string or a preset graphic. Specifically, the server can encode the preset string according to the preset encoding method, or encode the preset graphic according to the preset encoding method, thereby obtaining the encoded key. There can be multiple preset encoding methods. For example, the preset encoding method can be a base64 encoding method. The encoded key includes an encoded key string and a key graphic, etc.
[0084] Then the server encrypts the repair package according to the encoded key, and adds the key to the preset location of the preset file, generates a key file and stores it.
[0085] After the first terminal obtains the repair package, it obtains the corresponding key file from the server according to the application identifier, parses the key from the key file according to a preset method, and then obtains the corresponding key from the key file, thereby using the key to decrypt the repair package. By encrypting and decrypting the repair package in a special way, the security of the repair package can be effectively improved.
[0086] In one embodiment, the method further includes: detecting abnormal conditions in the running process of the updated application; intercepting the abnormal conditions when the application has abnormal conditions, and generating abnormal prompt information according to the abnormal conditions; and sending the abnormal prompt information to the server.
[0087] The first terminal obtains the repair package, and after using the repair package to update the application, detects abnormal conditions in the running process of the updated application. For example, the abnormal conditions may include abnormal conditions such as low compatibility and stability of the application and problems in functional logic.
[0088] When an abnormality is detected in the application, the abnormality is intercepted. The first terminal generates corresponding abnormal prompt information according to the intercepted abnormality, and feeds the abnormal prompt information back to the server so that the server generates corresponding log information. The server can also send prompt information to the corresponding second terminal so that the second terminal obtains the log information corresponding to the abnormality and maintains the application.
[0089] Furthermore, after the first terminal feeds back the abnormal prompt information to the server, it can also restart the application to alleviate the abnormal situation encountered by the application. By effectively monitoring the running status of the application, it is possible to timely understand the problems existing in the application, so that the corresponding developers can develop a repair package in time to repair the application, thereby effectively improving the repair efficiency of the application.
[0090] In one embodiment, Figure 4 As shown, a method for updating an application is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0091] Step 402: The server receives a repair package corresponding to the application program uploaded by the second terminal, wherein the repair package includes a repair package identifier.
[0092] After the application is released, some problems may occur during the application process. When the application has a problem, the developer will develop a repair package according to the problem, the repair package corresponds to the content to be repaired in the application, and upload the developed repair package to the server so that the server can publish the repair package.
[0093] After the developer develops the repair package through the corresponding second terminal, he adds the corresponding signature information code identifier to the repair package and uploads it to the server. The signature information is the signature information of the application corresponding to the repair package. The code identifier can be the identifier of the business function corresponding to the content to be repaired in the application.
[0094] After the server obtains the repair package, it obtains the signature information of the repair package and verifies the signature information of the repair package to verify whether the signature information of the repair package is consistent with the signature information of the application. When the signature information of the repair package is consistent with the signature information of the application, it means that the repair package is the repair package of the corresponding version of the application. By verifying the signature information of the repair package, the validity of the repair package can be effectively verified.
[0095] Step 404: Obtain the corresponding content to be repaired in the application program according to the repair package identifier.
[0096] Step 406: Verify the repair package using the content to be repaired.
[0097] After the server passes the signature verification of the repair package, it further obtains the corresponding content to be repaired in the application based on the repair package identifier. The content to be repaired includes the corresponding business functions, and uses the business functions of the content to be repaired to verify the repair package. Specifically, after the server obtains the business functions of the package to be repaired, it matches the business functions of the repair package with the business functions corresponding to the content to be repaired. When the match is consistent, the verification is successful. That is, the business functions of the repair package correspond to the business functions corresponding to the content to be repaired in the application. By verifying the repair package based on its signature information and business functions, it is possible to effectively prevent the content of the repair package from being irrelevant to the application, such as inserting advertisements, malicious bundling, etc., and thus effectively ensure the validity of the repair package.
[0098] Step 408: After the verification is passed, the repair package is encrypted and the encrypted repair package is released.
[0099] After the server verifies the repair package, it needs to further encrypt the repair package. Specifically, a database is deployed in the server. The database stores a variety of preset files and keys corresponding to application identifiers. Different keys can generate corresponding key files through different preset files.
[0100] The server can obtain the preset file and key according to the application identifier corresponding to the repair package, and encode the key to obtain the encoded key. The key can be a preset string or a preset graphic. Specifically, the server can encode the preset string according to the preset encoding method, or encode the preset graphic according to the preset encoding method, thereby obtaining the encoded key. There can be multiple preset encoding methods. For example, the preset encoding method can be a base64 encoding method. The encoded key includes an encoded key string and a key graphic, etc.
[0101] Then the server encrypts the repair package according to the encoded key. The server adds the key to the preset location of the preset file, generates a key file and stores it. By encrypting the repair package in a special way, the security of the repair package can be effectively improved.
[0102] Furthermore, after the server verifies and encrypts the repair package, it can also call a load balancer to assign a new process to the repair package and bind a new listening port. The first terminal obtains the corresponding repair package from the server, verifies the repair package, binds the listening port of the repair package, resets the weight of the content to be repaired in the application corresponding to the repair package to zero, and deletes the code corresponding to the content to be repaired. When all connections corresponding to the content to be repaired are disconnected, the old process is shut down, thereby realizing the hot update of the repair package. By replacing the code of the part to be repaired, the old and new codes will not coexist when the application is running, thereby effectively improving the efficiency of hot repair.
[0103] In one embodiment, the repair package is verified using the content to be repaired, including: identifying the business function corresponding to the content to be repaired; verifying whether the business function of the repair package matches the business function corresponding to the content to be repaired; when the business function of the repair package matches the business function corresponding to the content to be repaired, the verification is successful.
[0104] After the server passes the signature verification of the repair package, it further obtains the corresponding content to be repaired in the application according to the repair package identifier. The content to be repaired includes the corresponding business functions, and verifies the repair package using the business functions of the content to be repaired. Specifically, after the server obtains the business functions of the repair package, it matches the business functions of the repair package with the business functions corresponding to the content to be repaired. If the matches are consistent, the verification is passed. This means that the business functions of the repair package correspond to the business functions corresponding to the content to be repaired in the application.
[0105] Furthermore, the corresponding business function can be represented by the code identifier. The server can also traverse the code identifiers contained in the application and match the code identifier of the repair package with the code identifier in the application to detect whether the code identifier of the repair package is in the code identifier of the application.
[0106] When a consistent code identifier is matched, it means that the repair package is a repair package for the relevant business functions of the application. By verifying the repair package based on the code identifier and business function of the repair package, it can effectively prevent the content of the repair package from being irrelevant to the application, such as inserting advertisements, malicious bundling, etc., and thus effectively ensure the effectiveness of the repair package.
[0107] In one embodiment, Figure 5As shown, the application includes an application identifier, and the steps of encrypting the repair package specifically include the following:
[0108] Step 502: Obtain a preset file and a key according to the application identifier.
[0109] After the server verifies the repair package, it needs to further encrypt the repair package. Specifically, a database is deployed in the server. The database stores a variety of preset files and keys corresponding to application identifiers. Different keys can generate corresponding key files through different preset files.
[0110] Step 504: encode the key to obtain the encoded key.
[0111] Step 506: Encrypt the repair package according to the encoded key.
[0112] The server can obtain the preset file and key according to the application identifier corresponding to the repair package, and encode the key to obtain the encoded key. The key can be a preset string or a preset graphic. Specifically, the server can encode the preset string according to the preset encoding method, or encode the preset graphic according to the preset encoding method, thereby obtaining the encoded key. There can be multiple preset encoding methods. For example, the preset encoding method can be a base64 encoding method. The encoded key includes an encoded key string and a key graphic, etc.
[0113] Then, the server can use the encoded key to encrypt the repair package. By encrypting the repair package in a special way, the security of the repair package can be effectively improved.
[0114] Step 508, adding the key to the preset location of the preset file, generating a key file and storing it.
[0115] After the server obtains the encoded key, it adds the encoded key at a preset position in the preset file. Specifically, the server deletes multiple characters starting from the first position of the character string corresponding to the preset file, and the number of deleted characters is the same as the number of key characters. Among them, the server can continuously delete the same number of characters as the number of key characters starting from the first position. It can also start from the first position and delete multiple characters in a dispersed manner according to a preset rule, and the number of deleted characters is the same as the number of key characters. For example, the number of characters in the key character string is 20. The server can continuously delete 20 characters starting from the first position in the character string corresponding to the preset file. The server can also start from the first position and delete multiple characters in a dispersed manner, for example, delete 5 characters starting from the first position, then skip 10 characters and continue to delete 5 characters, then skip 10 characters and continue to delete 5 characters, and so on, until the number of deleted characters reaches 20. When the server deletes characters in a dispersed manner, the number of partial characters deleted continuously at different positions can be the same or different.
[0116] The server adds the encoded key string to the position corresponding to the deleted character. The server can add the encoded key string continuously from the first position, or can add the encoded key string in a scattered manner from the first position, so that the encoded string replaces the original multiple characters in the preset file, generates a corresponding key file, and stores it. By adding the key to the preset file in a preset manner, the key can be effectively hidden, thereby effectively improving the security of the repair package.
[0117] It should be understood that although Figure 2-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0118] In one embodiment, Figure 6 As shown, an application updating system is provided, including a server 602 and a first terminal 604, wherein:
[0119] Server 602 is used to receive a repair package corresponding to the application uploaded by the second terminal, the repair package including a repair package identifier; obtain the corresponding content to be repaired in the application according to the repair package identifier; verify the repair package using the content to be repaired; after the verification is passed, encrypt the repair package and publish the encrypted repair package.
[0120] The first terminal 604 is used to receive update prompt information of the application sent by the server; obtain a corresponding repair package from the server according to the update prompt information, and the repair package corresponds to the content to be repaired of the application; obtain a parsing engine, parse the repair package through the parsing engine, and obtain a corresponding repair code; the repair package carries a repair package identifier and a function interface, detects the function interface of the content to be repaired of the application according to the repair package identifier, and modifies the function interface of the content to be repaired to the function interface of the repair package; stores the repair code to a location corresponding to the local content to be repaired, and runs the application according to the function interface and the repair code to update the application.
[0121] In one embodiment, server 602 is also used to identify the business function corresponding to the content to be repaired; verify whether the business function of the repair package matches the business function corresponding to the content to be repaired; when the business function of the repair package matches the business function corresponding to the content to be repaired, the verification is successful.
[0122] In one embodiment, the application includes an application identifier, and the server 602 is also used to obtain a preset file and a key based on the application identifier; encode the key to obtain an encoded key; encrypt the repair package based on the encoded key; add the key to a preset position in the preset file, generate a key file, and store it.
[0123] In one embodiment, the repair package includes a code identifier, and the first terminal 602 is also used to obtain signature information of the repair package; when the signature information of the repair package is consistent with the signature information of the application, the code identifier of the application is traversed; the code identifier of the repair package is matched with the code identifier in the application; when a consistent code identifier is matched, the verification is passed.
[0124] In one embodiment, the application includes an application identifier, and the first terminal 602 is further used to obtain a corresponding key file from a server according to the application identifier; parse a key from the key file in a preset manner; and decrypt the repair package using the key.
[0125] In one embodiment, the first terminal 602 is also used to detect abnormal situations in the running process of the updated application; when an abnormal situation occurs in the application, the abnormal situation is intercepted and abnormal prompt information is generated according to the abnormal situation; and the abnormal prompt information is sent to the server.
[0126] For the specific definition of the application update system, please refer to the definition of the application update method above, which will not be repeated here. Each module in the above application update system can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0127] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input system connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an application program update method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input system of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0128] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as repair packages, preset files, and key files. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an application program update method is implemented.
[0129] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0130] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0131] The first terminal receives the update prompt information of the application sent by the server;
[0132] Obtaining a corresponding repair package from the server according to the update prompt information, where the repair package corresponds to the content to be repaired of the application program;
[0133] Obtain a parsing engine, parse the repair package through the parsing engine, and obtain the corresponding repair code;
[0134] The repair package carries a repair package identifier and a function interface, detects the function interface of the content to be repaired of the application program according to the repair package identifier, and modifies the function interface of the content to be repaired into the function interface of the repair package;
[0135] The repair code is stored in a local location corresponding to the content to be repaired, and the application is run according to the function interface and the repair code to update the application.
[0136] In one embodiment, the repair package includes a code identifier, and the processor also implements the following steps when executing the computer program: obtaining signature information of the repair package; when the signature information of the repair package is consistent with the signature information of the application, traversing the code identifier of the application; matching the code identifier of the repair package with the code identifier in the application; when a consistent code identifier is matched, the verification is passed.
[0137] In one embodiment, the application includes an application identifier, and the processor further implements the following steps when executing the computer program: obtaining a corresponding key file from a server according to the application identifier; parsing a key from the key file in a preset manner; and decrypting the repair package using the key.
[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented: detecting abnormal conditions in the running process of the updated application; when an abnormal condition exists in the application, intercepting the abnormal condition and generating abnormal prompt information according to the abnormal condition; and sending the abnormal prompt information to the server.
[0139] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0140] The server receives a repair package corresponding to the application uploaded by the second terminal, wherein the repair package includes a repair package identifier;
[0141] Obtain the corresponding content to be repaired in the application program according to the repair package identifier;
[0142] The repair package is verified using the content to be repaired; after the verification is passed, the repair package is encrypted and the encrypted repair package is released.
[0143] In one embodiment, when the processor executes the computer program, the following steps are also implemented: identifying the business function corresponding to the content to be repaired; verifying whether the business function of the repair package matches the business function corresponding to the content to be repaired; when the business function of the repair package matches the business function corresponding to the content to be repaired, the verification is successful.
[0144] In one embodiment, the application includes an application identifier, and the processor also implements the following steps when executing the computer program: obtaining a preset file and a key according to the application identifier; encoding the key to obtain an encoded key; encrypting the repair package according to the encoded key; adding the key to a preset position of the preset file, generating a key file and storing it.
[0145] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0146] The first terminal receives the update prompt information of the application sent by the server;
[0147] Obtaining a corresponding repair package from the server according to the update prompt information, where the repair package corresponds to the content to be repaired of the application program;
[0148] Obtain a parsing engine, parse the repair package through the parsing engine, and obtain the corresponding repair code;
[0149] The repair package carries a repair package identifier and a function interface, detects the function interface of the content to be repaired of the application program according to the repair package identifier, and modifies the function interface of the content to be repaired into the function interface of the repair package;
[0150] The repair code is stored in a local location corresponding to the content to be repaired, and the application is run according to the function interface and the repair code to update the application.
[0151] In one embodiment, the repair package includes a code identifier, and the computer program also implements the following steps when executed by the processor: obtaining signature information of the repair package; when the signature information of the repair package is consistent with the signature information of the application, traversing the code identifier of the application; matching the code identifier of the repair package with the code identifier in the application; when a consistent code identifier is matched, the verification is passed.
[0152] In one embodiment, the application includes an application identifier, and when the computer program is executed by the processor, the following steps are also implemented: obtaining a corresponding key file from a server according to the application identifier; parsing a key from the key file in a preset manner; and decrypting the repair package using the key.
[0153] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: detecting abnormal conditions in the running process of the updated application; when an abnormal condition exists in the application, intercepting the abnormal condition and generating abnormal prompt information according to the abnormal condition; sending the abnormal prompt information to the server.
[0154] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0155] The server receives a repair package corresponding to the application uploaded by the second terminal, wherein the repair package includes a repair package identifier;
[0156] Obtain the corresponding content to be repaired in the application program according to the repair package identifier;
[0157] The repair package is verified using the content to be repaired; after the verification is passed, the repair package is encrypted and the encrypted repair package is released.
[0158] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: identifying the business function corresponding to the content to be repaired; verifying whether the business function of the repair package matches the business function corresponding to the content to be repaired; when the business function of the repair package matches the business function corresponding to the content to be repaired, the verification is successful.
[0159] In one embodiment, the application includes an application identifier, and the computer program also implements the following steps when executed by the processor: obtaining a preset file and a key according to the application identifier; encoding the key to obtain an encoded key; encrypting the repair package according to the encoded key; adding the key to a preset position of the preset file, generating a key file and storing it.
[0160] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for updating an application, characterized in that: The method comprises: The first terminal receives the update prompt information of the application sent by the server; Obtaining a corresponding repair package from the server according to the update prompt information, wherein the repair package corresponds to the content to be repaired of the application program; Acquire a parsing engine, and parse the repair package through the parsing engine to obtain a corresponding repair code; The repair package carries a repair package identifier and a function interface, detects the function interface of the to-be-repaired content of the application program according to the repair package identifier, and modifies the function interface of the to-be-repaired content into the function interface of the repair package; Bind the listening port of the repair package, reset the weight of the content to be repaired, and delete the code corresponding to the content to be repaired; wherein the listening port of the repair package is bound by the server for the repair package by calling the load balancer; The repair code is stored in a location corresponding to the local content to be repaired, and the application is run according to the function interface and the repair code. When the connection corresponding to the content to be repaired is disconnected, the old process corresponding to the content to be repaired is closed to update the application.
2. The method according to claim 1, characterized in that The repair package includes a code identifier, and after obtaining the corresponding repair package from the server according to the update prompt information, the method further includes: Obtaining signature information of the repair package; When the signature information of the repair package is consistent with the signature information of the application, traversing the code identifier of the application; Matching the code identifier of the repair package with the code identifier in the application; When a consistent code identifier is matched, the verification is successful.
3. The method according to claim 1, characterized in that The application includes an application identifier, and after obtaining a corresponding repair package from the server according to the update prompt information, the method further includes: Obtaining a corresponding key file from the server according to the application identifier; Parsing the key from the key file in a preset manner; The repair package is decrypted using the key.
4. The method according to claim 1, characterized in that: The method further comprises: Detecting abnormal conditions during operation of the updated application; When an abnormal situation occurs in the application, the abnormal situation is intercepted and abnormal prompt information is generated according to the abnormal situation; The abnormal prompt information is sent to the server.
5. A method for updating an application, characterized in that: The method comprises: The server receives a repair package corresponding to the application uploaded by the second terminal, wherein the repair package includes a repair package identifier; Acquire the corresponding content to be repaired in the application program according to the repair package identifier; Verifying the repair package using the content to be repaired; After the verification is passed, the repair package is encrypted, the load balancer is called to bind a new listening port for the repair package, and the encrypted repair package is published; the published repair package is used to instruct the first terminal to decrypt and parse it through the parsing engine to obtain the corresponding repair code, and detect the function interface of the content to be repaired of the application according to the repair package identifier, modify the function interface of the content to be repaired to the function interface of the repair package, bind the listening port of the repair package, reset the weight of the content to be repaired, delete the code corresponding to the content to be repaired, store the repair code to the location corresponding to the content to be repaired locally on the first terminal, and run the application according to the function interface and the repair code. When the connection corresponding to the content to be repaired is disconnected, close the old process corresponding to the content to be repaired to update the application.
6. The method according to claim 5, characterized in that The verifying the repair package by using the content to be repaired includes: Identify the business function corresponding to the content to be repaired; Verifying whether the service function of the repair package matches the service function corresponding to the content to be repaired; When the business function of the repair package matches the business function corresponding to the content to be repaired, the verification is successful.
7. The method according to claim 5, characterized in that The application includes an application identifier, and encrypting the repair package includes: Obtaining a preset file and a key according to the application identifier; Encoding the key to obtain an encoded key; encrypting the repair package according to the encoded key; The key is added to the preset location of the preset file, and a key file is generated and stored.
8. An application updating system, characterized in that: The system comprises: The server is used to receive a repair package corresponding to the application uploaded by the second terminal, wherein the repair package includes a repair package identifier; obtain the corresponding content to be repaired in the application according to the repair package identifier; verify the repair package using the content to be repaired; after the verification is passed, encrypt the repair package, call the load balancer to bind a new listening port for the repair package, and publish the encrypted repair package; The first terminal is used to receive update prompt information of the application sent by the server; obtain a corresponding repair package from the server according to the update prompt information, and the repair package corresponds to the content to be repaired of the application; obtain a parsing engine, and parse the repair package through the parsing engine to obtain a corresponding repair code; the repair package carries a repair package identifier and a function interface, and the function interface of the content to be repaired of the application is detected according to the repair package identifier, and the function interface of the content to be repaired is modified to the function interface of the repair package; bind the listening port of the repair package, reset the weight of the content to be repaired, and delete the code corresponding to the content to be repaired; store the repair code to the location corresponding to the local content to be repaired, and run the application according to the function interface and the repair code, and when the connection corresponding to the content to be repaired is disconnected, close the old process corresponding to the content to be repaired to update the application.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 or 5 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 or 5 to 7 are implemented.
