CN115904339A - Application program running method and device, storage medium and computer equipment - Google Patents

Application program running method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN115904339A
CN115904339A CN202211427620.4A CN202211427620A CN115904339A CN 115904339 A CN115904339 A CN 115904339A CN 202211427620 A CN202211427620 A CN 202211427620A CN 115904339 A CN115904339 A CN 115904339A
Authority
CN
China
Prior art keywords
implementation method
application program
target
original
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211427620.4A
Other languages
Chinese (zh)
Inventor
陈棚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202211427620.4A priority Critical patent/CN115904339A/en
Publication of CN115904339A publication Critical patent/CN115904339A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses an application program running method and device, a storage medium and computer equipment, wherein the method comprises the following steps: responding to the application program code modification instruction, and acquiring a target implementation method; determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method into an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used; after the application program enters a system crash tracing processing flow of the application program due to calling of the original implementation method, a first crash processing method of the original implementation method is intercepted, and an error name version original implementation method in the first crash processing method is replaced by the target implementation method, so that the application program operates based on the target implementation method, and codes of the application program can be modified on line.

Description

Application program running method and device, storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application program running method and apparatus, a storage medium, and a computer device.
Background
With the development of software development technology, many developments for APP (Application) have appeared. The IOS is a mobile operating system developed by apple Inc., at present, a plurality of APPs developed based on the IOS system exist, after the APP based on the IOS system is built on an APP Store (application program Store) of the apple Inc., codes of the APPs which are on line cannot be modified unless the APPs release a new version, but in the actual development process, the APPs may have defects, or product requirements corresponding to the APPs change, but the new versions of the APPs are not released at the moment, so that an application program running method is needed, and the codes of the application programs can be modified on line.
Disclosure of Invention
In view of this, the present application provides an application program running method and apparatus, a storage medium, and a computer device, which can modify codes of an application program online.
According to an aspect of the present application, there is provided a method for running an application program, the method including:
responding to an application program code modification instruction, and acquiring a target implementation method;
determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method into a wrong name to obtain a wrong name version original implementation method, so that the original implementation method cannot be used;
after the application program enters a system crash tracing processing flow of the application program due to the calling of the original implementation method, a first crash processing method of the original implementation method is intercepted, and the original implementation method of the error name version in the first crash processing method is replaced by the target implementation method, so that the application program runs based on the target implementation method.
Optionally, the determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method to an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used includes:
extracting a method name of the target implementation method;
inquiring a method in the application program, which is consistent with the method name, to obtain an original implementation method to be replaced;
and modifying the method name of the original implementation method into an error name according to a preset name modification method to obtain an original implementation method of the error name version, so that the original implementation method cannot be used.
Optionally, the application code modification instruction comprises an access address The method for responding to the application program code modification instruction and acquiring the target implementation comprises the following steps:
responding to an application program code modification instruction, and acquiring a target implementation method in a preset file management system based on the access address, wherein the preset file management system is used for storing the implementation methods to be updated of the application program, and the implementation methods to be updated comprise the target implementation methods.
Optionally, the method for obtaining a target in a preset file management system based on the access address includes:
acquiring a target implementation method encryption compressed packet in a preset file management system based on the access address;
and decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method, wherein the target implementation method encrypted compressed packet is generated by encrypting and compressing the target implementation method through the preset file management system.
Optionally, the decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method includes:
running a preset code modifying program, wherein the preset code modifying program is written with the preset private key signature;
and decrypting the target implementation method encrypted compressed packet according to a preset code modification program and a preset private key signature to obtain the target implementation method.
Optionally, the method further comprises:
responding to an application program code newly-increased instruction, and acquiring a newly-increased function of the application program and a newly-increased implementation method corresponding to the newly-increased function;
when a call request for the newly added function is received, calling the added method of the application program based on the method name of the newly added implementation method;
and after the application program enters a system crash tracing processing flow of the application program because the new implementation method is not added, intercepting a second crash processing method of the new implementation method, and adding the new implementation method in the second crash processing method, so that the application program calls the new function based on the added new implementation method.
Optionally, the method further comprises:
responding to a starting signal of an application program, and sending inquiry information to a server of the application program;
receiving feedback information of the server, wherein the server inquires whether a target implementation method and/or a newly added implementation method which needs to be updated exist or not according to the timestamp of the inquiry information, and feeds back the target implementation method and/or the newly added implementation method based on the inquiry result;
and if the feedback information is that the target realization method and/or the newly added realization method exist, acquiring the target realization method and/or the newly added realization method.
According to another aspect of the present application, there is provided an apparatus for running an application, the apparatus comprising:
the method acquisition module is used for responding to the application program code modification instruction and acquiring a target implementation method;
the method processing module is used for determining an original implementation method to be replaced corresponding to the target implementation method, modifying the method name of the original implementation method into an error name, and obtaining the original implementation method of the error name version, so that the original implementation method cannot be used;
and the program running module is used for intercepting a first crash processing method of the original implementation method after the application program enters a system crash tracing processing flow of the application program due to the calling of the original implementation method, and replacing the original implementation method of the error name version in the first crash processing method with the target implementation method so as to enable the application program to run based on the target implementation method.
Optionally, the method processing module is further configured to:
extracting a method name of the target implementation method;
inquiring a method in the application program, which is consistent with the method name, to obtain an original implementation method to be replaced;
and modifying the method name of the original implementation method into an error name according to a preset name modification method to obtain an original implementation method of the error name version, so that the original implementation method cannot be used.
Optionally, the method obtaining module is further configured to:
in response to an application code modification instruction, the application code modification instruction including an access address
And acquiring a target implementation method in a preset file management system based on the access address, wherein the preset file management system is used for storing the implementation methods to be updated of the application program, and the implementation methods to be updated comprise the target implementation methods.
Optionally, the method obtaining module is further configured to:
acquiring a target implementation method encryption compressed packet in a preset file management system based on the access address;
and decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method, wherein the target implementation method encrypted compressed packet is generated by encrypting and compressing the target implementation method through the preset file management system.
Optionally, the method obtaining module is further configured to:
running a preset code modifying program, wherein the preset code modifying program is written with the preset private key signature;
and decrypting the target implementation method encrypted compressed packet according to a preset code modification program and a preset private key signature to obtain the target implementation method.
Optionally, the apparatus further comprises: a code adding module for:
responding to an application program code newly-increased instruction, and acquiring a newly-increased function of the application program and a newly-increased implementation method corresponding to the newly-increased function;
when a call request for the newly added function is received, calling the added method of the application program based on the method name of the newly added implementation method;
after the application program enters a system crash tracing processing flow of the application program because the new implementation method is not added, intercepting a second crash processing method of the new implementation method, and adding the new implementation method in the second crash processing method, so that the application program calls the new function based on the added new implementation method.
Optionally, the apparatus further comprises: an information receiving module for:
responding to a starting signal of an application program, and sending inquiry information to a server of the application program;
receiving feedback information of the server, wherein the server inquires whether a target implementation method and/or a newly added implementation method which needs to be updated exist or not according to the timestamp of the inquiry information, and feeds back the target implementation method and/or the newly added implementation method based on the inquiry result;
and if the feedback information indicates that the target implementation method and/or the newly added implementation method exist, acquiring the target implementation method and/or the newly added implementation method.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements a method of running an application program as described above.
According to yet another aspect of the present application, there is provided a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the application program execution method when executing the program.
By means of the technical scheme, the application program operation method and device, the storage medium and the computer device, provided by the application program, respond to an application program code modification instruction, obtain a target implementation method, determine an original implementation method to be replaced corresponding to the target implementation method, modify a method name of the original implementation method into an error name, obtain an error name version original implementation method, so that the original implementation method cannot be used, intercept a first crash processing method of the original implementation method after the application program enters a system crash tracing processing flow of the application program due to calling of the original implementation method, and replace the error name version original implementation method in the first crash processing method with the target implementation method, so that the application program operates based on the target implementation method, and can modify codes of the application program online.
The above description is only an overview of the technical solutions of the present application, and the present application may be implemented in accordance with the content of the description so as to make the technical means of the present application more clearly understood, and the detailed description of the present application will be given below in order to make the above and other objects, features, and advantages of the present application more clearly understood.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart illustrating an operation method of an application according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating an operation method of another application provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for running another application provided by an embodiment of the present application;
FIG. 4 is a schematic structural diagram illustrating an apparatus for running an application according to an embodiment of the present application;
fig. 5 is a schematic structural diagram illustrating another apparatus for running an application according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, an application program running method is provided, and as shown in fig. 1, the method includes:
step 101, responding to the application program code modification instruction, and acquiring a target implementation method.
In the above embodiments of the present application, the instruction is first modified in response to the application program code, and then the target implementation method is acquired. After the application program is already installed in an application program store of apple, if in the subsequent development process, it is found that real-time code modification needs to be performed on the application program, then in response to an application program code modification instruction, a corresponding target implementation method is obtained for implementing subsequent application program code modification, where the application program may be installed in a user terminal, for example: the mobile phone, the tablet computer, the notebook computer or the desktop computer.
Step 102, determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method into an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used.
And then, determining an original implementation method to be replaced corresponding to the target implementation method, modifying the method name of the original implementation method into an error name, and obtaining the original implementation method of the error name version, so that the original implementation method cannot be used.
The target implementation method and the original implementation method may be written in OC (object-C, C-extended object-oriented programming language). The main programming language of the APP (application program) of apple inc is OC, all method calls and class generation on OC are run through Objective-C Runtime, and a user can obtain a corresponding class and method through reflection of a class name and a method name, can replace a method of a certain class during running, can newly register a class, and adds a method to the class, which is a characteristic of Runtime. Therefore, when the App runs, any OC method can be called through the class name and the method name, the realization of any class is replaced, and any class is added. In OC, the definition of each class includes two parts: i.e. interfaces and implementations, for providing an access interface to the outside and for the functional implementation of the method, respectively.
And determining an original implementation method to be replaced corresponding to the target implementation method through the acquired target implementation method, modifying the method name of the original implementation method into an error name, and obtaining an original implementation method of the error name version.
Step 103, after the application program enters a system crash tracing process flow of the application program due to the calling of the original implementation method, intercepting a first crash processing method of the original implementation method, and replacing an error name version original implementation method in the first crash processing method with the target implementation method, so that the application program runs based on the target implementation method.
And then, after the application program enters a system crash tracing process flow of the application program due to calling of an original implementation method, intercepting a first crash processing method of the original implementation method, and replacing an error name version original implementation method in the first crash processing method with a target implementation method so as to enable the application program to run based on the target implementation method.
By applying the technical scheme of the embodiment, a target implementation method is obtained in response to an application program code modification instruction, an original implementation method to be replaced corresponding to the target implementation method is determined, a method name of the original implementation method is modified into an error name, and an original implementation method of an error name version is obtained, so that the original implementation method cannot be used, after the application program enters a system crash tracing processing flow of the application program due to calling of the original implementation method, a first crash processing method for the original implementation method is intercepted, the original implementation method of the error name version in the first crash processing method is replaced by the target implementation method, so that the application program runs based on the target implementation method, and the code of the application program is modified online by replacing the original implementation method with the target implementation method so that the application program runs based on the target implementation method.
Further, as a refinement and an extension of the specific implementation of the embodiment, in order to fully describe the specific implementation process of the embodiment, another method for running an application program is provided, as shown in fig. 2, the method includes:
step 201, in response to an application program code modification instruction, acquiring a target implementation method encryption compression packet in a preset file management system based on an access address, wherein the application program code modification instruction includes the access address, the preset file management system is used for storing an implementation method to be updated of an application program, the implementation method to be updated includes a target implementation method, and the target implementation method encryption compression packet is generated by encrypting and compressing the target implementation method by the preset file management system.
In the above embodiment of the present application, first, in response to an application code modification instruction, a target implementation method encrypted compressed packet is obtained in a preset file management system based on an access address. Wherein the application code modification instruction includes an access address so that the application can download the object implementation method encrypted compressed packet according to the access address. The preset file management system may be a background server file management system or a third-party file management system, and the preset file management system is configured to store an implementation method to be updated of an application program, where the implementation method to be updated may include a target implementation method, and the target implementation method encryption compression packet is generated by encrypting and compressing the target implementation method by the preset file management system, for example, by using a public key to encrypt and package the target implementation method into a zip packet.
Step 202, running a preset code modification program, decrypting the target implementation method encrypted compressed packet according to a preset private key signature through the preset code modification program, and obtaining the target implementation method, wherein the preset private key signature is written in the preset code modification program.
And then, running a preset code modification program, and decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain a target implementation method, specifically, the preset code modification program may include a library PALoachModule integrated by an application program, where the library PALo achModule normally runs in the background, starts running after responding to an application program code modification instruction, and is used for decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method, where the preset private key signature is written in the preset code modification program.
Step 203, extracting the method name of the target implementation method, and querying a method in the application program, which is consistent with the method name, to obtain the original implementation method to be replaced.
Step 204, modifying the method name of the original implementation method into an error name according to a preset name modification method to obtain an error name version original implementation method, so that the original implementation method cannot be used.
In the above embodiment of the present application, next, a method name of a target implementation method is extracted, and then a method in an application program that is consistent with the foregoing method name is queried, so as to obtain an original implementation method to be replaced, and a method is modified according to a preset name, for example: <xnotran> class _ replaceMethod "_ o", , "_ o" . </xnotran>
Step 205, after the application program enters a system crash tracing process flow of the application program due to the calling of the original implementation method, intercepting a first crash processing method of the original implementation method, and replacing an error name version original implementation method in the first crash processing method with the target implementation method, so that the application program runs based on the target implementation method.
After the application program enters a system crash tracing processing flow of the application program due to calling the original implementation method, intercepting a first crash processing method of the original implementation method, for example: the system method is a forwadlnvocation method, and the original implementation method of the error name version in the first crash processing method is replaced by the target implementation method, at the moment, the system crash tracing process flow is terminated, and the application program continues to run, so that the application program runs based on the target implementation method. By replacing the original implementation method of the wrong name version in the first crash processing method with the target implementation method, the execution code of the application program of the client can be updated without repackaging and submitting the code to be updated of the application program to an application program store in a mode that the application program runs based on the target implementation method, namely, the application program can be automatically updated without downloading the application program, quick response can be made to bug problems existing in the application program on a line, the application program version is directly applied to published versions of all the application programs without reissuing the application program version for changes of special product requirements, and the compatibility problem of services in application programs of different versions is reduced.
By applying the technical scheme of the embodiment, in response to an application program code modification instruction, a target implementation method encrypted compressed packet is obtained in a preset file management system based on an access address, a preset code modification program is operated, the target implementation method encrypted compressed packet is decrypted according to a preset private key signature, the target implementation method is obtained, an original implementation method to be replaced is obtained according to the target implementation method, the method name of the original implementation method is modified into an error name according to a preset name modification method, an original implementation method of an error name version is obtained, so that the original implementation method cannot be used, after the application program enters a system crash tracing process flow of the application program due to calling of the original implementation method, a first crash processing method of the original implementation method is intercepted, the original implementation method of the error name version in the first crash processing method is replaced by the target implementation method, so that the application program operates based on the target implementation method, and the application program code to be updated can be updated without repackaged and submitted to an application program code of an application program, namely, the application program code of an online application program can be updated.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully describe the specific implementation process of the embodiment, another method for running an application program is provided, as shown in fig. 3, where the method includes:
step 301, responding to the application program code modification instruction, obtaining a target implementation method.
Step 302, determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method into an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used.
In the above embodiment of the present application, first, a target implementation method is obtained in response to an application program code modification instruction, for subsequent application program code modification.
And then, determining an original implementation method to be replaced corresponding to the target implementation method, and then modifying the method name of the original implementation method into an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used and is used for triggering a subsequent system crash traceability processing flow.
Step 303, after the application program enters a system crash tracing process flow of the application program due to the calling of the original implementation method, intercepting a first crash processing method of the original implementation method, and replacing an error name version original implementation method in the first crash processing method with the target implementation method, so that the application program operates based on the target implementation method.
And then, after the application program enters a system crash tracing processing flow of the application program due to calling of the original implementation method, intercepting a first crash processing method of the original implementation method, and replacing the original implementation method with a target implementation method of the error name version in the first crash processing method, so that the application program runs based on the target implementation method, and code modification of the application program is completed.
And 304, responding to the application program code adding instruction, and acquiring an adding function of the application program and an adding implementation method corresponding to the adding function.
In the above embodiments of the present application, in response to an application code new adding instruction, an added function of an application and a new adding implementation method corresponding to the added function are obtained. In a specific embodiment, in the development process of the application program, a function is newly added to the h5 webpage displayed by the client for the application program according to the user requirement, so that when the user clicks the new function of the h5 webpage, an application program code new adding instruction can be triggered, then, the application program code new adding instruction is responded, the new function of the application program and a new adding implementation method corresponding to the new function are obtained, and the new function and the new adding implementation method are used for subsequently implementing the new function based on the new adding implementation method.
And 305, when a call request for the newly added function is received, calling the added method of the application program based on the method name of the newly added implementation method.
Step 306, after the application program enters a system crash tracing process flow of the application program because the new implementation method is not added, intercepting a second crash processing method of the new implementation method, and adding the new implementation method to the second crash processing method, so that the application program realizes calling of the new function based on the added new implementation method.
And then, when the application program receives a call request for the newly added function, calling the added method of the application program based on the method name of the newly added implementation method, entering a system crash tracing processing flow of the application program because the application program does not add the newly added implementation method, intercepting a second crash processing method of the newly added implementation method, and adding the newly added implementation method in the second crash processing method, so that the application program realizes the call of the newly added function based on the added newly added implementation method. The object with the newly added function is not limited to the h5 webpage, and when the application program is in hybrid development, the object with the newly added function can be a plug-in and the like.
Optionally, the method further comprises: responding to a starting signal of an application program, and sending inquiry information to a server of the application program; receiving feedback information of the server, wherein the server inquires whether a target implementation method and/or a newly added implementation method which needs to be updated exist or not according to the timestamp of the inquiry information, and feeds back the target implementation method and/or the newly added implementation method based on the inquiry result; and if the feedback information indicates that the target implementation method and/or the newly added implementation method exist, acquiring the target implementation method and/or the newly added implementation method.
In the above embodiment of the present application, in response to a start signal of an application, sending query information to a server of the application, and then receiving feedback information of the server, where the feedback information may be feedback information used to notify a client that an application code needs to be updated after a new implementation method is generated on a server side, and if the application cannot receive the feedback information of the server after being offline, sending query information to the server of the application when the application is started, so as to ensure that the application can be updated in time.
And if the feedback information indicates that the target implementation method and/or the newly added implementation method exist, acquiring the target implementation method and/or the newly added implementation method so that the application program can operate according to the target implementation method and/or the newly added implementation method.
By applying the technical scheme of the embodiment, after an application program enters a system crash tracing process flow of the application program due to calling of an original implementation method in response to an application program code modification instruction, a first crash processing method of the original implementation method is intercepted for replacing a target implementation method so that the application program runs based on the target implementation method, and similarly, a newly added function and a newly added implementation method of the application program are obtained in response to an application program code newly added instruction.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides an apparatus for running an application, as shown in fig. 4, the apparatus includes:
a method obtaining module 41, configured to obtain a target implementation method in response to the application code modification instruction;
a method processing module 42, configured to determine an original implementation method to be replaced corresponding to the target implementation method, and modify a method name of the original implementation method to an error name to obtain an original implementation method of an error name version, so that the original implementation method cannot be used;
a program running module 43, configured to intercept a first crash processing method of the original implementation method after the application program enters a system crash tracing process flow of the application program due to the invocation of the original implementation method, and replace an original implementation method of an error name version in the first crash processing method with the target implementation method, so that the application program runs based on the target implementation method.
Optionally, the method processing module 42 is further configured to:
extracting a method name of the target implementation method;
inquiring a method in the application program, which is consistent with the method name, to obtain an original implementation method to be replaced;
and modifying the method name of the original implementation method into an error name according to a preset name modification method to obtain an original implementation method of the error name version, so that the original implementation method cannot be used.
Optionally, the method obtaining module 41 is further configured to:
in response to an application code modification instruction, the application code modification instruction including an access address
And acquiring a target implementation method in a preset file management system based on the access address, wherein the preset file management system is used for storing the implementation methods to be updated of the application program, and the implementation methods to be updated comprise the target implementation methods.
Optionally, the method obtaining module 41 is further configured to:
acquiring a target implementation method encryption compressed packet in a preset file management system based on the access address;
and decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method, wherein the target implementation method encrypted compressed packet is generated by encrypting and compressing the target implementation method through the preset file management system.
Optionally, the method obtaining module 41 is further configured to:
running a preset code modifying program, wherein the preset code modifying program is written with the preset private key signature;
and decrypting the target implementation method encrypted compressed packet according to a preset code modification program and a preset private key signature to obtain the target implementation method.
Further, an embodiment of the present application provides another apparatus for running an application, as shown in fig. 5, the apparatus includes:
a method obtaining module 51, configured to obtain a target implementation method in response to the application code modification instruction;
a method processing module 52, configured to determine an original implementation method to be replaced corresponding to the target implementation method, and modify the method name of the original implementation method into an error name to obtain an original implementation method of an error name version, so that the original implementation method cannot be used;
a program running module 53, configured to intercept a first crash processing method of the original implementation method after the application program enters a system crash tracing process flow of the application program due to the calling of the original implementation method, and replace an error name version original implementation method in the first crash processing method with the target implementation method, so that the application program runs based on the target implementation method.
The code adding module 54 is configured to obtain a newly added function of the application program and a newly added implementation method corresponding to the newly added function in response to an application program code adding instruction, when a call request for the newly added function is received, call an added method of the application program based on a method name of the newly added implementation method, intercept a second crash processing method for the newly added implementation method after the application program enters a system crash tracing processing flow of the application program because the newly added implementation method is not added, and add the newly added implementation method to the second crash processing method, so that the application program realizes call of the newly added function based on the added newly added implementation method.
The information receiving module 55 is configured to send query information to a server of the application program in response to a start signal of the application program, and receive feedback information of the server, where the server queries whether a target implementation method and/or a newly added implementation method that needs to be updated exists according to a timestamp of the query information, and performs feedback based on a query result, and if the feedback information indicates that the target implementation method and/or the newly added implementation method exists, acquires the target implementation method and/or the newly added implementation method.
Optionally, the method processing module 52 is further configured to:
extracting a method name of the target implementation method;
inquiring a method in the application program, which is consistent with the method name, to obtain an original implementation method to be replaced;
and modifying the method name of the original implementation method into an error name according to a preset name modification method to obtain an original implementation method of the error name version, so that the original implementation method cannot be used.
Optionally, the method obtaining module 51 is further configured to:
in response to an application code modification instruction, the application code modification instruction including an access address
And acquiring a target implementation method in a preset file management system based on the access address, wherein the preset file management system is used for storing the implementation methods to be updated of the application program, and the implementation methods to be updated comprise the target implementation methods.
Optionally, the method obtaining module 51 is further configured to:
acquiring a target implementation method encrypted compressed packet in a preset file management system based on the access address;
and decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method, wherein the target implementation method encrypted compressed packet is generated by encrypting and compressing the target implementation method through the preset file management system.
Optionally, the method obtaining module 51 is further configured to:
running a preset code modifying program, wherein the preset code modifying program is written with the preset private key signature;
and decrypting the target implementation method encrypted compressed packet according to a preset code modification program and a preset private key signature to obtain the target implementation method.
It should be noted that other corresponding descriptions of the functional units involved in the application program running device provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 3, and are not described herein again.
Based on the method shown in fig. 1 to fig. 3, correspondingly, the embodiment of the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the running method of the application program shown in fig. 1 to fig. 3.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the above methods shown in fig. 1 to fig. 3 and the virtual device embodiment shown in fig. 3, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing the computer program to implement the running method of the application program as shown in fig. 1 to 3.
Optionally, the computer device may also include a user interface, a network interface, a camera, radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among the components in the storage medium and communication with other hardware and software in the entity device.
Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus a necessary general hardware platform, or by hardware, in response to an application program code modification instruction, obtain a target implementation method, determine an original implementation method to be replaced corresponding to the target implementation method, modify a method name of the original implementation method to an error name, obtain an original implementation method of an error name version, so that the original implementation method cannot be used, intercept a first crash processing method for the original implementation method after the application program enters a system crash tracing process flow of the application program due to invoking the original implementation method, and replace the original implementation method of the error name version in the first crash processing method with the target implementation method, so that the application program runs based on the target implementation method, and can implement online modification of a code of the application program.
Those skilled in the art will appreciate that the drawings are merely schematic representations of preferred embodiments and that the blocks or flowchart illustrations are not necessary to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. An application program running method, comprising:
responding to an application program code modification instruction, and acquiring a target implementation method;
determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method into an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used;
after the application program enters a system crash tracing processing flow of the application program due to the calling of the original implementation method, a first crash processing method of the original implementation method is intercepted, and the original implementation method of the error name version in the first crash processing method is replaced by the target implementation method, so that the application program runs based on the target implementation method.
2. The method according to claim 1, wherein the determining an original implementation method to be replaced corresponding to the target implementation method, and modifying the method name of the original implementation method to an error name to obtain an error name version original implementation method, so that the original implementation method cannot be used, comprises:
extracting a method name of the target implementation method;
inquiring a method in the application program, which is consistent with the method name, to obtain an original implementation method to be replaced;
and modifying the method name of the original implementation method into an error name according to a preset name modification method to obtain an original implementation method of the error name version, so that the original implementation method cannot be used.
3. The method of claim 1, wherein the application code modification instruction comprises an access address The method for responding to the application program code modification instruction and acquiring the target implementation comprises the following steps:
responding to an application program code modification instruction, and acquiring a target implementation method in a preset file management system based on the access address, wherein the preset file management system is used for storing the implementation methods to be updated of the application program, and the implementation methods to be updated comprise the target implementation methods.
4. The method according to claim 3, wherein the obtaining the target implementation method in the pre-set file management system based on the access address comprises:
acquiring a target implementation method encryption compressed packet in a preset file management system based on the access address;
and decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method, wherein the target implementation method encrypted compressed packet is generated by encrypting and compressing the target implementation method through the preset file management system.
5. The method according to claim 4, wherein the decrypting the target implementation method encrypted compressed packet according to a preset private key signature to obtain the target implementation method comprises:
running a preset code modifying program, wherein the preset code modifying program is written with the preset private key signature;
and decrypting the target implementation method encrypted compressed packet according to a preset code modification program and a preset private key signature to obtain the target implementation method.
6. The method according to any one of claims 1 to 5, further comprising:
responding to an application program code newly-increased instruction, and acquiring a newly-increased function of the application program and a newly-increased implementation method corresponding to the newly-increased function;
when a call request for the newly added function is received, calling the added method of the application program based on the method name of the newly added implementation method;
after the application program enters a system crash tracing processing flow of the application program because the new implementation method is not added, intercepting a second crash processing method of the new implementation method, and adding the new implementation method in the second crash processing method, so that the application program calls the new function based on the added new implementation method.
7. The method of claim 6, further comprising:
responding to a starting signal of an application program, and sending inquiry information to a server of the application program;
receiving feedback information of the server, wherein the server inquires whether a target implementation method and/or a newly added implementation method which needs to be updated exists or not according to the timestamp of the inquiry information, and feeds back the target implementation method and/or the newly added implementation method based on the inquiry result;
and if the feedback information indicates that the target implementation method and/or the newly added implementation method exist, acquiring the target implementation method and/or the newly added implementation method.
8. An apparatus for running an application, the apparatus comprising:
the method acquisition module is used for responding to the application program code modification instruction and acquiring a target implementation method;
the method processing module is used for determining an original implementation method to be replaced corresponding to the target implementation method, modifying the method name of the original implementation method into an error name, and obtaining the original implementation method of the error name version, so that the original implementation method cannot be used;
and the program running module is used for intercepting a first crash processing method of the original implementation method after the application program enters a system crash tracing processing flow of the application program due to calling of the original implementation method, and replacing the original implementation method of the wrong name version in the first crash processing method with the target implementation method, so that the application program runs based on the target implementation method.
9. A storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out a method of running an application program according to any one of claims 1 to 7.
10. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, wherein the processor implements a method of running an application program according to any one of claims 1 to 7 when executing the computer program.
CN202211427620.4A 2022-11-15 2022-11-15 Application program running method and device, storage medium and computer equipment Pending CN115904339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211427620.4A CN115904339A (en) 2022-11-15 2022-11-15 Application program running method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211427620.4A CN115904339A (en) 2022-11-15 2022-11-15 Application program running method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN115904339A true CN115904339A (en) 2023-04-04

Family

ID=86475736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211427620.4A Pending CN115904339A (en) 2022-11-15 2022-11-15 Application program running method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN115904339A (en)

Similar Documents

Publication Publication Date Title
US9367403B2 (en) Terminal and application restoring method
US9990214B2 (en) Dynamic agent delivery
US10404568B2 (en) Agent manager for distributed transaction monitoring system
US8990929B2 (en) Auditing application activities
JP7106001B2 (en) SUB-APPLICATION DEVELOPMENT METHOD, APPARATUS, COMPUTER DEVICE, AND COMPUTER PROGRAM
CN107273126B (en) Application development method and device
US10606477B1 (en) Intelligent keyboard
CN110968331A (en) Method and device for running application program
CN110727469B (en) Terminal device control method and device, application program configuration file packaging method, terminal device and computer readable storage medium
CN111930382A (en) Application page access method, device and equipment
CN106681749A (en) Local code patch updating method and device based on Android platform
CN113986256A (en) Method and device for issuing application program, electronic equipment and storage medium
CN115185717A (en) Interface calling method and device, electronic equipment and storage medium
JP2005228183A (en) Program execution method and computer system for executing the program
CN114222003A (en) Service calling method, system, device, equipment and storage medium
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
WO2018121652A1 (en) Method and device for connecting wireless access point through application in user equipment
CN115904339A (en) Application program running method and device, storage medium and computer equipment
CN110727477A (en) Component loading method and device, computer equipment and storage medium
CN111488286B (en) Method and device for independently developing Android modules
CN113515299A (en) Software development kit SDK hot upgrading method, device, equipment and storage medium
CN112860300A (en) Distributed SDK (software development kit) hot update processing method and application server cluster
US10203970B2 (en) Dynamic configuration of native functions to intercept
CN116662101B (en) Fault restoration method of electronic equipment and electronic equipment
CN112134910B (en) Network request debugging method, device, equipment and storage medium

Legal Events

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