Application program processing method and device, electronic equipment and storage medium
By introducing the corresponding relationship between program identification identification and decryption passwords in the application, using the server to verify and generate decryption information, controlling the decryption operation of the application, the system instability caused by classes that do not allow obfuscation after code obfuscation is solved, and the dual effects of system stability and program source code protection are achieved.
Patent Information
- Application Number
- CN202410851274.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-03-04
AI Technical Summary
Classes that do not allow obfuscation after code obfuscation will cause errors in the system operation, and even cause the system to fail to start, affecting the stability of the system.
By introducing the corresponding relationship between program identification identification and decryption passwords in the application, the server verification and generation of decryption information are used to control the application's decryption operations to avoid system instability caused by code obfuscation.
It effectively avoids program errors and system instability caused by code obfuscation, improves system stability, and protects program source code through encryption to prevent leakage.
Smart Images

Figure CN119557003A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for processing an application. Background Art
[0002] In scenarios such as application development, in order to protect the program source code and prevent the leakage of sensitive information, the program source code is usually compiled. In related technologies, code obfuscation is usually performed when the program source code is compiled. For example, the class names, method names, and parameters in the program are renamed and obfuscated to make them difficult to read and understand, thereby preventing the decompilation software from obtaining a program that is very close to the source code. However, code obfuscation technology requires cumbersome configuration to configure which classes to be obfuscated and which classes cannot be obfuscated. Once the classes that are not allowed to be obfuscated are obfuscated, it will cause the program to fail during system operation, and even cause the system to fail to start, affecting the stability of the system. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an application processing method, device, electronic device and storage medium, which can solve the problem that the code confuses the classes that are not allowed to be obfuscated, causing the program to fail during system operation, resulting in the system being unable to start and affecting the stability of the system.
[0004] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for processing an application is provided.
[0005] A method for processing an application in an embodiment of the present invention is used at a server, comprising: receiving a decryption request sent by a first terminal, obtaining verification information and a program identification in the decryption request, and calling a preset verification program to verify the verification information, wherein the program identification is obtained by the first terminal from a second terminal;
[0006] In response to successful verification of the verification information, determining a usage status of the program identification based on the historical records;
[0007] In response to the usage status being unused, querying the decryption password corresponding to the program identification identifier, and calling a preset calculation model to calculate decryption information corresponding to the decryption password;
[0008] The decryption information is sent to the first terminal.
[0009] In one embodiment, the method further comprises:
[0010] In response to the use status being used, obtaining a first environment parameter in the decryption request, and querying a second environment parameter associated with the program identification identifier;
[0011] In response to the first environment parameter and the second environment parameter being the same, the query program identifies the decryption password corresponding to the identifier, calls the preset calculation model to calculate the decryption information corresponding to the decryption password, and sends the decryption information to the first terminal; in response to the first environment parameter and the second environment parameter being different, stops the operation.
[0012] In one embodiment, in response to the use state not being a preset state, the method further includes:
[0013] Obtaining a first environment parameter in the decryption request, and querying a second environment parameter associated with the program identification identifier;
[0014] In response to the first environmental parameter and the second environmental parameter being the same, the query program identifies the decryption password corresponding to the identifier, calls the preset calculation model to calculate the decryption information corresponding to the decryption password, and sends the decryption information to the first terminal; in response to the first environmental parameter and the second environmental parameter being different, stops the operation.
[0015] To achieve the above objective, according to another aspect of an embodiment of the present invention, another method for processing an application is provided.
[0016] A method for processing an application program according to an embodiment of the present invention is used in a first terminal, comprising: acquiring display information of a second terminal through a photographing device to identify a corresponding program identification mark;
[0017] The query program identifies the historical information associated with the identifier and obtains the query result;
[0018] In response to the query result being empty, calling the preset generation model to generate verification information, and sending the verification information and the program identification identifier to the server; in response to the query result being not empty, obtaining the environment parameters corresponding to the display information, calling the preset generation model to generate verification information, and sending the environment information, verification information and the program identification identifier to the server;
[0019] Receive the decrypted information sent by the server, and transmit the decrypted information to the second terminal.
[0020] In one embodiment, the environment information, verification information, and program identification are sent to the server, including:
[0021] Querying the environment parameters corresponding to the program identification identifier to match the environment parameters corresponding to the displayed information;
[0022] In response to a successful match, the environment information, verification information and program identification identifier are sent to the server; in response to a failed match, the operation is stopped.
[0023] To achieve the above objective, according to another aspect of an embodiment of the present invention, another method for processing an application is provided.
[0024] An application processing method according to an embodiment of the present invention is used in a second terminal, comprising: in response to a start instruction of a target application, calling a preset interface to load an application and a program information file corresponding to the target application;
[0025] Extracting a program identification identifier of a target application based on the program information file, obtaining environmental parameters of the target application, generating and displaying mixed information based on the environmental parameters and the program identification identifier, enabling the first terminal to obtain the program identification identifier through the mixed information, and obtaining decryption information from the server through the program identification identifier;
[0026] receiving decryption information, calculating a decryption password based on the decryption information, and calling a preset decryption program to decrypt the application program;
[0027] In response to successful decryption of the application, the application is run.
[0028] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for processing an application is provided.
[0029] An application processing device according to an embodiment of the present invention is provided at a server end, and includes: a receiving unit, configured to receive a verification request sent by a first terminal, obtain verification information and a program identification in the verification request, and call a preset verification program to perform verification on the verification information, wherein the program identification is obtained by the first terminal from the second terminal;
[0030] A verification unit, configured to determine a usage status of the program identification mark based on the historical record in response to successful verification of the verification information;
[0031] A calculation unit, configured to, in response to the usage status being unused, query a decryption password corresponding to the program identification identifier, and call a preset calculation model to calculate decryption information corresponding to the decryption password;
[0032] The sending unit is used to send decryption information to the first terminal.
[0033] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for processing an application is provided.
[0034] An application processing device according to an embodiment of the present invention is provided in a first terminal, and includes: an acquisition unit, configured to acquire display information of a second terminal through a photographing device to identify a corresponding program identification mark;
[0035] A query unit, used to query the historical information associated with the program identification identifier and obtain the query result;
[0036] A sending unit, configured to, in response to the query result being empty, call a preset generation model to generate verification information, and send the verification information and a program identification identifier to the server; in response to the query result being not empty, obtain an environment parameter corresponding to the display information, call a preset generation model to generate verification information, and send the environment information, verification information and a program identification identifier to the server;
[0037] The sending unit is further used to receive the decryption information sent by the service end, and transmit the decryption information to the second terminal.
[0038] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for processing an application is provided.
[0039] An application processing device according to an embodiment of the present invention is provided in a second terminal, comprising: a receiving unit, configured to call a preset interface to load an application and a program information file corresponding to the target application in response to a start instruction of the target application;
[0040] A display unit, configured to extract a program identification identifier of a target application based on a program information file, obtain environmental parameters of the target application, generate and display mixed information based on the environmental parameters and the program identification identifier, enable the first terminal to obtain the program identification identifier through the mixed information, and obtain decryption information from the server through the program identification identifier;
[0041] A decryption unit, used to receive decryption information, calculate a decryption password based on the decryption information, and call a preset decryption program to decrypt the application program;
[0042] The running unit is used to run the application program in response to successful decryption of the application program.
[0043] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.
[0044] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the processing method of the application provided by the embodiment of the present invention.
[0045] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.
[0046] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the method for processing an application program provided by the embodiment of the present invention is implemented.
[0047] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer program product is provided.
[0048] A computer program product according to an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the processing method of the application program provided by the embodiment of the present invention is implemented.
[0049] An embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, the application is encrypted and the decryption password is stored in the server, and each application establishes a corresponding relationship through the program identification code and the decryption password; when the second terminal starts the application, it can first read the program identification code to generate mixed information in combination with the environmental information of the application, and the environmental parameters represent the deployment environment characteristics of the application; the first terminal identifies the program identification identifier and the environmental parameters from the mixed information, and sends it and the generated verification information to the server; after the server receives the decryption request sent by the first terminal, it can obtain the verification information and program identification identifier therein, and after the verification information is successfully verified, the usage status of the program identification identifier can be queried. If the usage status of the program identification identifier is not used, it means that the program identification identifier is not used, that is, the application is started and deployed for the first time, so the confidential information corresponding to the program identification identifier can be sent to the first terminal, so as to be transmitted to the second terminal through the first terminal, so that the second terminal decrypts and runs the application. In an embodiment of the present invention, an application is encrypted and a program identification identifier is set corresponding to a decryption password. When the second terminal starts the program, the program identification code and environmental parameters can be generated into mixed information for display, so that the first terminal obtains the information required for program startup through the mixed information and sends it to the server, that is, the decryption password is requested from the server through other devices. When the server receives the decryption request, it can determine whether the application is started for the first time through the use status of the program identification code. When it is determined that it is the first time to start, the decryption password is sent to the second terminal through the first terminal to decrypt the application. In this way, in an embodiment of the present invention, the application avoids leakage of program source code through encryption. When the application is used, the decryption operation of the application is controlled by the use status of the program identification identifier and the environmental parameters to avoid leakage of the application due to factors such as duplication and copying, so that there is no need to obfuscate the program source code, avoid program errors in system operation due to obfuscation, and improve system stability.
[0050] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0052] Figure 1 is a schematic diagram of a system architecture of an application processing system according to an embodiment of the present invention;
[0053] Figure 2is a schematic diagram of a main process of a method for processing an application according to an embodiment of the present invention;
[0054] Figure 3 is a schematic diagram of another main process of a method for processing an application according to an embodiment of the present invention;
[0055] Figure 4 is a schematic diagram of another main process of a method for processing an application according to an embodiment of the present invention;
[0056] Figure 5 is a schematic diagram of another main process of a method for processing an application according to an embodiment of the present invention;
[0057] Figure 6 is a schematic diagram of a main unit of an application processing device according to an embodiment of the present invention;
[0058] Figure 7 is a schematic diagram of another main unit of the application processing device according to an embodiment of the present invention;
[0059] Figure 8 is a schematic diagram of another main unit of the application processing device according to an embodiment of the present invention;
[0060] Fig. 9 is another exemplary system architecture diagram to which the embodiments of the present invention can be applied;
[0061] Fig.10 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0063] It should be noted that the embodiments and features of the embodiments of the present invention can be combined with each other without conflict. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0064] An embodiment of the present invention provides a system for processing an application program, which can be used in scenarios of starting and running an application program.
[0065] Figure 1FIG. 1 is a schematic diagram of the architecture of a processing system for an application program in an embodiment of the present invention. Figure 1 As shown, the processing system may include an application processing end, a server end, a first terminal, and a second terminal. The application processing end is used for operations such as compiling and packaging the application, so that the application performs encryption and program identification identification generation processing in this process, wherein the decryption password of the application and the program identification identification correspond one to one, that is, each application has a unique decryption password and program identification identification, and the relevant content is stored in the server end. The server end can be used to store the application, program information file, decryption password and program identification identification, and can interact with the first terminal to provide decryption information to the first terminal. The second terminal represents a device for application deployment, wherein the application is deployed and run on this device to perform corresponding business processing. The first terminal can be used to interact with the second terminal and the server end, so as to obtain the startup password of the corresponding application from the server end for the second terminal when the application is started in the second terminal.
[0066] Specifically, in the embodiment of the present invention, an application is implemented by a Java (a computer language) program as an example. An encryption mechanism can be provided in the compilation stage of the application, such as executing the encryption mechanism through a preset encryption plug-in, so that the encrypted application cannot be decompiled and cracked. In the packaging stage, the application can analyze the compiled program, important configuration information of the software, such as class program files, various configuration files containing information such as database accounts, cache service information, interface addresses, etc., and rely on third-party software libraries, etc., and encrypt them and reassemble them into a release program. In the packaging and assembly link, a unique program identification identifier of the software can be generated according to the characteristics of the application. In the packaging stage, a program information file (such as a MANIFEST.MF file) is usually generated, so a custom field can be added in the embodiment of the present invention to record the generated program identification identifier. After the application is compiled and packaged, it can be stored in the server (such as a remote server), and the application, program identification identifier and decryption password correspond one by one and are managed by the server to prevent abuse. One password can only be used by one application.
[0067] It should be noted that during the compilation phase, Java programs can encrypt various configuration files and dependent software packages. The encryption process is completed by the supporting integrated development environment tool plug-in, such as IDE (Integrated Development Environment). Plug-in related information may include the plug-in organization number, plug-in version number, and other extension information. During the compilation and packaging phase, target software information can be collected, including application compilation completion time, packaging time, author information, version information, program identification, packaged size (bytes), compression format, encryption information, etc.
[0068] The embodiment of the present invention provides a method for processing an application program. Figure 1 In the system architecture shown, the second terminal executes, Figure 2 As shown, the method includes:
[0069] S201: In response to a start instruction of a target application, calling a preset interface to load an application program and a program information file corresponding to the target application.
[0070] The target application represents an application deployed in the second terminal and needs to be started. The application and program information file may be pre-deployed in the second terminal. After the start instruction is triggered, a preset interface may be called to load the application and program information file corresponding to the target application. Since the application is encrypted, the decryption operation of the application may be triggered after startup.
[0071] In an embodiment of the present invention, a corresponding gateway device may be configured for the target application during the deployment phase. The gateway device and the second terminal are located in the same network environment and may be used for interaction with other devices and determination of environmental parameters in the target environment.
[0072] It should be noted that in the embodiment of the present invention, the encrypted application, such as class files, configuration files, third-party dependent software packages, etc., can be identified and loaded by the loading unit, and loaded into the JVM (Java virtual machine) for subsequent processing. When the target application is started, the environment initialization work can be performed, and the detection unit of the program startup entry can be called to run the boot program to load the application.
[0073] S202: extracting a program identification mark of a target application based on the program information file, acquiring environment parameters of the target application, and generating and displaying mixed information based on the environment parameters and the program identification mark.
[0074] The mixed information displayed in this step can be obtained by the first terminal to obtain the program identification through the mixed information, and obtain decryption information from the server through the program identification. The program identification is generated by the application during the packaging stage and recorded in the program information file. The environmental parameters represent the deployment environment characteristics of the target application, which can specifically be the characteristic information of the first terminal, such as network information, device address information, etc.
[0075] The mixed information may be based on environmental parameters and program identification, and the generation method may be preset. Since the mixed information needs to be displayed, the mixed information may be specifically graphic information such as a QR code that can be used for information identification.
[0076] It should be noted that, in order to further ensure the security of the decryption process, in this step, the program identification code may be converted first and then combined with the environment parameters to generate mixed information, such as performing a hash calculation on the program identification code to obtain a converted identifier.
[0077] S203: receiving decryption information, calculating a decryption password based on the decryption information, and calling a preset decryption program to decrypt the application program.
[0078] The first terminal can obtain decryption information from the server and transmit it to the second terminal. The decryption information represents information encrypted by the decryption password, so the second terminal can decrypt the decryption information after receiving it, obtain the decryption password, and then call the preset decryption program to decrypt the application.
[0079] Specifically, the first terminal may display the decrypted information after obtaining it, so that the staff can input the displayed decrypted information into the second terminal, or the first terminal may send the decrypted information to the second terminal.
[0080] It should be noted that, if the first terminal fails to obtain the decryption information, a failure message may be sent to the second terminal to prompt the second terminal that the target application cannot be started.
[0081] S204: In response to successful decryption of the application, run the application.
[0082] If the application is successfully decrypted, the decrypted source code can be obtained, such as the correct class files, configuration files, and third-party dependent library programs, etc., which can then be loaded into the JVM for execution. In the embodiment of the present invention, if the application fails to be decrypted, the decrypted information can be re-obtained, that is, step S202 is executed.
[0083] It should be noted that after the application is successfully decrypted and started, the target application and the characteristic information of the second terminal can be sent to the server through the first terminal for storage.
[0084] In an embodiment of the present invention, the application is encrypted and a program identification identifier is set corresponding to the decryption password. When the second terminal starts the program, the program identification code and environmental parameters can be generated into mixed information for display, so that the first terminal obtains the information required for program startup through the mixed information and sends it to the server, that is, requests the decryption password from the server through other devices. In this way, in an embodiment of the present invention, the application avoids leakage of program source code through encryption. When the application is used, the decryption operation of the application is controlled by the usage status and environmental parameters of the program identification identifier to avoid leakage of the application due to factors such as duplication and copying, thereby eliminating the need to obfuscate the program source code, avoiding program errors during system operation due to obfuscation, and improving system stability.
[0085] The embodiment of the present invention provides a method for processing an application program. Figure 1 In the system architecture shown, the first terminal executes, such as Figure 3 As shown, the method includes:
[0086] S301: Acquire display information of a second terminal through a photographing device to identify a corresponding program identification mark.
[0087] The first terminal may include a photographing device for photographing or scanning the display information displayed by the second terminal, that is, the mixed information displayed in step S202. By identifying the display information, the program identification mark therein may be obtained.
[0088] It should be noted that when the program identification mark is identified, the environmental parameters can also be identified and stored to facilitate subsequent processing.
[0089] S302: The query program identifies the historical information associated with the identifier and obtains the query result.
[0090] Among them, the first terminal can store the identified program identification identifier and environmental parameters, so in this step, the historical information associated with the program identification identifier can be queried from the record. If the query result is empty, it means that the first terminal has identified the program identification identifier for the first time, that is, the first time to perform the decryption of the application corresponding to the program identification identifier; if the query result is not empty, it means that the first terminal has previously identified the program identification identifier, that is, the decryption of the application corresponding to the program identification identifier has been performed.
[0091] S303: In response to the query result being empty, call the preset generation model, generate verification information, and send the verification information and the program identification identifier to the server; in response to the query result being not empty, obtain the environment parameters corresponding to the display information, call the preset generation model, generate verification information, and send the environment information, verification information and the program identification identifier to the server.
[0092] Among them, if the query result is empty, it means that the first terminal has recognized the program identification identifier for the first time, so the program identification identifier can be sent directly to the server; if the query result is not empty, it means that the first terminal has not recognized the program identification identifier for the first time, so the program identification identifier and environmental parameters can be sent to the server together to facilitate the server to determine whether to allow decryption for this application.
[0093] In the embodiment of the present invention, in order to improve the security of data transmission, when sending information to the server, the first terminal may generate dynamic verification information first, and send the verification information together with the information to be sent to the server.
[0094] It should be noted that, in the embodiment of the present invention, the first terminal and the service unit can pre-negotiate the generation and verification method of the verification information, so that the first terminal can generate dynamic verification information and perform the verification process on the service end. The verification information can be generated based on a preset period, such as once every 60 seconds.
[0095] S304: Receive decryption information sent by the server, and transmit the decryption information to the second terminal.
[0096] After receiving the information sent by the first terminal, the server can return the decryption information corresponding to the program identification identifier, and then the first terminal can transmit the decryption information to the second terminal. Specifically, the first terminal can display the decryption information so that the staff can enter it into the second terminal, or the first terminal can send the decryption information to the second terminal.
[0097] It should be noted that when the server does not return decryption information or returns prompt information that the decryption cannot be performed, the first terminal may send a prompt information to the second terminal to prompt that the application cannot be decrypted.
[0098] In an embodiment of the present invention, an application is encrypted and a program identification identifier is set corresponding to a decryption password. When the second terminal starts the program, the program identification code and environmental parameters can be generated into mixed information for display. The first terminal obtains the information required for program startup through the mixed information and sends it to the server, that is, requests the decryption password from the server, and sends the decryption password to the second terminal for application decryption. In this way, the application avoids leakage of program source code through encryption. When the application is used, the decryption operation of the application is controlled by the use status of the program identification identifier and the environmental parameters, so as to avoid leakage of the application due to factors such as duplication and copying, thereby eliminating the need to obfuscate the program source code, avoiding program errors in system operation due to obfuscation, and improving system stability.
[0099] The embodiment of the present invention provides a method for processing an application program. Figure 1 In the system architecture shown, the server executes Figure 4 As shown, the method includes:
[0100] S401: receiving a decryption request sent by a first terminal, obtaining verification information and a program identification in the decryption request, and calling a preset verification program to perform verification on the verification information.
[0101] The program identification is obtained by the first terminal from the second terminal. Figure 2 and Figure 3In the embodiment, the first terminal can send a decryption request to the server when the target application is started in the second terminal. The decryption request can include verification information and program identification, and the server can verify the verification information. If the verification passes, the subsequent process can be executed; if the verification fails, the operation can be stopped, and a prompt message indicating that the decryption cannot be passed can also be returned to the first terminal.
[0102] It should be noted that the decryption request usually also includes environment parameters to indicate the application environment of the target application, so the server can store the environment parameters and the correspondence between the program identification identifier and the environment parameters to record the application environment of the target application.
[0103] S402: In response to successful verification of the verification information, determining a usage status of the program identification identifier based on the historical records.
[0104] Among them, the usage status can include used and unused. Unused means that the decryption password corresponding to the program identification identifier has not been used, that is, it has not been sent to other devices, that is, the application corresponding to the program identification identifier has not performed decryption; used means that the decryption password corresponding to the program identification identifier has been used, that is, it has been sent to other devices, that is, the application corresponding to the program identification identifier has performed decryption. When the server sends the decryption password corresponding to the program identification identifier to other devices, it means that the application corresponding to the program identification identifier has performed the decryption process, and the information of this process can be recorded from the historical records, such as recording the time when the decryption password corresponding to the program identification identifier was sent.
[0105] After the verification information is successfully verified, the usage status of the program identification identifier is determined based on the historical records to determine whether the application corresponding to the program identification identifier is decrypted for the first time.
[0106] S403: In response to the usage status being unused, querying the decryption password corresponding to the program identification identifier and calling a preset calculation model to calculate decryption information corresponding to the decryption password.
[0107] Among them, in the embodiment of the present invention, since each application is only used in one application environment, after the program identification identifier is used, it indicates that the application has been running, and usually there is no need to perform the decryption operation again, so the preset state in this step is unused. After determining that the program identification identifier is not used, the corresponding decryption password can be returned to the first terminal. In order to improve the decryption security, the decryption password can be encrypted before transmission, that is, the preset calculation model is called to calculate the decryption information corresponding to the decryption password. The preset calculation model can be agreed with the second terminal to facilitate the encryption and decryption of the decryption password. The algorithm used by the calculation model can be set based on demand, such as a preset information encoding algorithm.
[0108] It should be noted that the use status is not the preset status, that is, it is used, which can indicate that the application has been decrypted, so this operation can be regarded as an erroneous operation, thereby stopping the operation or sending a decryption failure message to the first terminal.
[0109] In some implementations, after the program identification identifier is used, various factors, such as the previous decryption failure, may cause the application to need to be restarted in the original application environment and re-obtain the decryption password. At this time, the application environment of the target application has not changed, so the server can send the decryption password again to enable the target application to operate normally.
[0110] Therefore, after determining that the usage status of the program identification identifier has been used, this step can also obtain the first environment parameter in the decryption request, that is, the environment parameter of the target application this time, and query the second environment parameter associated with the program identification identifier, that is, the environment parameter corresponding to the program identification identifier in the server-side historical record, and then compare whether the first environment parameter and the second environment parameter are the same to determine whether the application environment of the target application has changed; in response to the first environment parameter and the second environment parameter being the same, it means that the usage environment of the target application has not changed, and the decryption password corresponding to the program identification identifier can be queried, and the preset calculation model can be called to calculate the decryption information corresponding to the decryption password, and the decryption information is sent to the first terminal; in response to the first environment parameter and the second environment parameter being different, it means that the usage environment of the target application has changed, then the operation is stopped, or a decryption failure message can be sent to the first terminal.
[0111] S404: Send decryption information to the first terminal.
[0112] After the decryption information is obtained, it can be returned to the first terminal so that the first terminal can transmit it to the second terminal for use.
[0113] It should be noted that in an embodiment of the present invention, the target application corresponding to the application program can be encrypted and a program identification identifier can be generated during the compilation and packaging stages, and the program identification identifier can be recorded in a program information file. Then, the application program, the program information file and the decryption password are all associated and stored on the server.
[0114] In an embodiment of the present invention, an application is encrypted and a program identification identifier is set corresponding to a decryption password. When the server receives a decryption request, it can determine whether the application is started for the first time by the usage status of the program identification code. When it is determined that the application is started for the first time, the decryption password is sent to the second terminal through the first terminal to decrypt the application. In this way, the application is encrypted to avoid leakage of program source code. When the application is used, the decryption operation of the application is controlled by the usage status and environmental parameters of the program identification identifier to avoid leakage of the application due to factors such as duplication and copying. Therefore, there is no need to obfuscate the program source code, avoid program errors during system operation due to obfuscation, and improve system stability.
[0115] Combine the following Figure 1 The system architecture shown in FIG. 1 is used to specifically describe the processing method of the application program in the embodiment of the present invention. Figure 5 As shown, the method includes:
[0116] S501: The second terminal responds to a start instruction of a target application by calling a preset interface to load an application program and a program information file corresponding to the target application.
[0117] S502: The second terminal extracts the program identification identifier of the target application based on the program information file, obtains the environment parameters of the target application, generates a QR code based on the environment parameters and the program identification identifier, and displays the QR code.
[0118] S503: The first terminal obtains the QR code of the second terminal through a photographing device, and identifies the corresponding program identification mark and environmental parameters.
[0119] S504: The first terminal queries the historical information associated with the program identification identifier to obtain a query result.
[0120] S505: In response to the query result being empty, the first terminal generates verification information, and sends the verification information and the program identification identifier to the server; in response to the query result being not empty, the first terminal queries the environment parameters corresponding to the program identification identifier to match the environment parameters corresponding to the display information, and in response to the matching result being a successful match, generates verification information, and sends the environment information, verification information and the program identification identifier to the server.
[0121] Among them, since the application of the target application is repeatedly started in the first terminal or copied to other devices, VMware, Docker virtual environment and other environments for startup, the application needs to be decrypted again, so the first terminal may obtain the mixed information generated for starting the target application again. In the embodiment of the present invention, in order to ensure the security of the source code of the application, usually only one application is allowed to be deployed and run in only one application environment, and can be deployed through other applications of the target application when the application environment changes, so the environment parameters and program identification identifiers in the embodiment of the present invention are one-to-one corresponding. In this step, the query result is not empty, indicating that the corresponding relationship between the program identification identifier and the environment parameter is stored in the first terminal, so the environment parameter in the display information can be identified, and then the environment parameter corresponding to the program identification identifier can be queried to match the two environment parameters; in response to the matching result being a successful match, it means that this time the target application is repeatedly started in the original application environment, and it needs to be decrypted again, so the environment information, verification information and program identification identifier can be sent to the server; in response to the matching result being a failed match, it means that this time the target application is not repeatedly started in the original application environment, but started in other application environments, then this operation can be stopped and the application decryption is not performed.
[0122] It should be noted that, in an embodiment of the present invention, in response to a matching failure, it means that the target application is not repeatedly started in the original application environment. At this time, in order to further confirm that the target application is not repeatedly started in the original application environment, the matching result and the environmental information, the verification information, and the program identification identifier can be sent to the server, so that the server can judge again whether it is a repeated start in the original application environment. The server can check the judgment result based on the received matching failure result. If its own judgment result is inconsistent with the result reported in the matching, an alarm can be processed.
[0123] S506: The server obtains the verification information, the program identification identifier and the first environment parameter in the decryption request, and calls a preset verification program to perform verification on the verification information.
[0124] S507: In response to successful verification of the verification information, the server determines the usage status of the program identification identifier based on the historical records.
[0125] S508: In response to the usage status being unused, the server queries the decryption password corresponding to the program identification identifier and calculates the decryption information corresponding to the decryption password; in response to the usage status being used, the server queries the second environment parameter associated with the program identification identifier; in response to the first environment parameter and the second environment parameter being the same, the server queries the decryption password corresponding to the program identification identifier and calculates the decryption information corresponding to the decryption password.
[0126] S509: The server transmits the decrypted information to the second terminal through the first terminal.
[0127] S510: The second terminal receives the decryption information, calculates a decryption password based on the decryption information, and calls a preset decryption program to decrypt the application; in response to the application being successfully decrypted, the application is run.
[0128] It should be noted that the data processing principle in the embodiment of the present invention is the same as Figure 2 , 3 The data processing principles corresponding to the embodiments shown in , 4 are the same and will not be repeated here.
[0129] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a device 600 for processing an application program, which is arranged at a server end, such as Figure 6 As shown, the device 600 includes:
[0130] The receiving unit 601 is used to receive a verification request sent by the first terminal, obtain verification information and a program identification in the verification request, and call a preset verification program to perform verification on the verification information, wherein the program identification is obtained by the first terminal from the second terminal;
[0131] A verification unit 602, configured to determine a usage status of the program identification mark based on the historical records in response to successful verification of the verification information;
[0132] The calculation unit 603 is used for, in response to the usage status being unused, querying the decryption password corresponding to the program identification identifier, calling a preset calculation model to calculate the decryption information corresponding to the decryption password;
[0133] The sending unit 604 is configured to send the decryption information to the first terminal.
[0134] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 2 The method of the illustrated embodiment is the same and will not be repeated here.
[0135] In one embodiment, the calculation unit 603 is specifically configured to:
[0136] In response to the use status being used, obtaining a first environment parameter in the decryption request, and querying a second environment parameter associated with the program identification identifier;
[0137] In response to the first environment parameter and the second environment parameter being the same, the query program identifies the decryption password corresponding to the identifier, calls the preset calculation model to calculate the decryption information corresponding to the decryption password, and sends the decryption information to the first terminal; in response to the first environment parameter and the second environment parameter being different, stops the operation.
[0138] In yet another embodiment, the receiving unit 601 is further configured to receive an application program, a program information file, and a decryption password of a target application;
[0139] The apparatus 600 further comprises:
[0140] The storage unit is used to obtain the corresponding program identification identifier based on the program information file to establish and store the association relationship between the program identification identifier and the decryption password corresponding to the target application, wherein the program identification identifier corresponding to the target application is generated when the application is packaged and recorded in the program information file.
[0141] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 2 , 5 The method of the illustrated embodiment is the same and will not be repeated here.
[0142] In the embodiment of the present invention, the application avoids leakage of program source code through encryption. When the application is in use, the decryption operation of the application is controlled by the usage status and environmental parameters of the program identification mark, thereby avoiding leakage of the application due to factors such as duplication and copying. Therefore, there is no need to obfuscate the program source code, avoiding program errors during system operation due to obfuscation, and improving system stability.
[0143] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a device 700 for processing an application program, which is arranged in a first terminal, such as Figure 7 As shown, the device 700 includes:
[0144] The acquisition unit 701 is used to acquire display information of the second terminal through a photographing device to identify a corresponding program identification mark;
[0145] A query unit 702, used to query the historical information associated with the program identification identifier to obtain a query result;
[0146] The sending unit 703 is used to call the preset generation model to generate verification information in response to the query result being empty, and send the verification information and the program identification identifier to the server; in response to the query result being not empty, obtain the environment parameters corresponding to the display information, call the preset generation model to generate verification information, and send the environment information, verification information and the program identification identifier to the server;
[0147] The sending unit 704 is further configured to receive decryption information sent by the server, and transmit the decryption information to the second terminal.
[0148] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 3 The method of the illustrated embodiment is the same and will not be repeated here.
[0149] In one embodiment, the sending unit 704 is specifically configured to:
[0150] Querying the environment parameters corresponding to the program identification identifier to match the environment parameters corresponding to the displayed information;
[0151] In response to a successful match, the environment information, verification information and program identification identifier are sent to the server; in response to a failed match, the operation is stopped.
[0152] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 3 , 5 The method of the illustrated embodiment is the same and will not be repeated here.
[0153] In the embodiment of the present invention, the application avoids leakage of program source code through encryption. When the application is in use, the decryption operation of the application is controlled by the usage status and environmental parameters of the program identification mark, thereby avoiding leakage of the application due to factors such as duplication and copying. Therefore, there is no need to obfuscate the program source code, avoiding program errors during system operation due to obfuscation, and improving system stability.
[0154] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a device 800 for processing an application program, which is arranged in a second terminal, such as Figure 8 As shown, the device 800 includes:
[0155] The receiving unit 801 is used to call a preset interface to load an application program and a program information file corresponding to the target application in response to a start instruction of the target application;
[0156] The display unit 802 is used to extract the program identification identifier of the target application based on the program information file, obtain the environment parameters of the target application, generate and display mixed information based on the environment parameters and the program identification identifier, enable the first terminal to obtain the program identification identifier through the mixed information, and obtain decryption information from the server through the program identification identifier;
[0157] The decryption unit 803 is used to receive the decryption information, calculate the decryption password based on the decryption information, and call the preset decryption program to decrypt the application program;
[0158] The running unit 804 is used to run the application program in response to the application program being successfully decrypted.
[0159] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 4 , 5 The method of the illustrated embodiment is the same and will not be repeated here.
[0160] In the embodiment of the present invention, the application avoids leakage of program source code through encryption. When the application is in use, the decryption operation of the application is controlled by the usage status and environmental parameters of the program identification mark, thereby avoiding leakage of the application due to factors such as duplication and copying. Therefore, there is no need to obfuscate the program source code, avoiding program errors during system operation due to obfuscation, and improving system stability.
[0161] According to an embodiment of the present invention, the embodiment of the present invention further provides an electronic device and a readable storage medium.
[0162] The electronic device of an embodiment of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by a processor, and the instructions are executed by the at least one processor so that the at least one processor executes the processing method of the application provided by the embodiment of the present invention.
[0163] Fig. 9 An exemplary system architecture 900 is shown to which the method for processing an application program or the device for processing an application program according to an embodiment of the present invention can be applied.
[0164] like Fig. 9 As shown, system architecture 900 may include terminal devices 901, 902, 903, network 904 and server 905. Network 904 is used to provide a medium for communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0165] The user can use the terminal devices 901 , 902 , 903 to interact with the server 905 through the network 904 to receive or send messages, etc. Various client applications can be installed on the terminal devices 901 , 902 , 903 .
[0166] The terminal devices 901 , 902 , and 903 may be, but are not limited to, smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0167] The server 905 may be a server that provides various services. The server may analyze and process the received data such as the product information query request, and feed back the processing result (such as product information - just an example) to the terminal device.
[0168] It should be noted that the application processing method provided in the embodiment of the present invention is generally executed by the server 905 , and accordingly, the application processing device is generally set in the server 905 .
[0169] It should be understood that Fig. 9The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0170] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 suitable for implementing an embodiment of the present invention. Fig.10 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0171] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0172] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0173] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present invention are executed.
[0174] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0175] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0176] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes a receiving unit, a verification unit, a calculation unit and a sending unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the receiving unit may also be described as a "unit of receiving function".
[0177] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the application processing method provided by the present invention.
[0178] As another aspect, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for processing an application program provided by an embodiment of the present invention.
[0179] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing an application, characterized in that: Applied to the server, including: receiving a decryption request sent by the first terminal, obtaining verification information and a program identification in the decryption request, and calling a preset verification program to perform verification on the verification information, wherein the program identification is obtained by the first terminal from the second terminal; In response to successful verification of the verification information, determining a usage status of the program identification mark based on historical records; In response to the usage status being unused, querying a decryption password corresponding to the program identification identifier, and calling a preset calculation model to calculate decryption information corresponding to the decryption password; The decryption information is sent to the first terminal.
2. The method according to claim 1, characterized in that The method further comprises: In response to the use status being used, obtaining a first environment parameter in the decryption request, and querying a second environment parameter associated with the program identification; In response to the first environment parameter and the second environment parameter being the same, querying a decryption password corresponding to the program identification identifier, calling a preset calculation model to calculate decryption information corresponding to the decryption password, and sending the decryption information to the first terminal; In response to the first environmental parameter and the second environmental parameter being different, operation is stopped.
3. The method according to claim 1 or 2, characterized in that: Also includes: Receiving the application program, program information file and decryption password of the target application; A corresponding program identification identifier is obtained based on the program information file to establish and store an association relationship with a decryption password corresponding to the target application, wherein the program identification identifier corresponding to the target application is generated when the application is packaged and recorded in the program information file.
4. A method for processing an application, characterized in that: Applied to the first terminal, comprising: Acquire display information of the second terminal through a photographing device to identify a corresponding program identification mark; Querying historical information associated with the program identification identifier to obtain a query result; In response to the query result being empty, calling a preset generation model to generate verification information, and sending the verification information and the program identification identifier to the server; in response to the query result being not empty, obtaining the environment parameters corresponding to the display information, calling a preset generation model to generate verification information, and sending the environment information, the verification information and the program identification identifier to the server; Receive the decryption information sent by the server, and transmit the decryption information to the second terminal.
5. The method according to claim 1, characterized in that Sending the environment information, the verification information, and the program identification identifier to the server includes: Querying the environment parameters corresponding to the program identification to match the environment parameters corresponding to the display information; In response to the matching result being a successful match, sending the environment information, the verification information and the program identification identifier to a server; In response to the matching result being a matching failure, the operation is stopped.
6. A method for processing an application, characterized in that: Applied to the second terminal, including: In response to a start instruction of a target application, calling a preset interface to load an application program and a program information file corresponding to the target application; Extracting a program identification identifier of the target application based on the program information file, obtaining environmental parameters of the target application, generating and displaying mixed information based on the environmental parameters and the program identification identifier, enabling the first terminal to obtain the program identification identifier through the mixed information, and obtaining decryption information from the server through the program identification identifier; receiving the decryption information, calculating a decryption password based on the decryption information, and calling a preset decryption program to decrypt the application program; In response to the application being successfully decrypted, the application is run.
7. A device for processing an application, characterized in that: Set on the server side, including: A receiving unit, configured to receive a verification request sent by a first terminal, obtain verification information and a program identification in the verification request, and call a preset verification program to perform verification on the verification information, wherein the program identification is obtained by the first terminal from the second terminal; A verification unit, configured to determine, in response to successful verification of the verification information, a usage status of the program identification mark based on historical records; a calculation unit, configured to query a decryption password corresponding to the program identification identifier in response to the usage status being unused, and call a preset calculation model to calculate decryption information corresponding to the decryption password; A sending unit is used to send the decryption information to the first terminal.
8. A device for processing an application, characterized in that: Set at the first terminal, including: An acquisition unit, configured to acquire display information of the second terminal through a photographing device to identify a corresponding program identification mark; A query unit, used to query the historical information associated with the program identification identifier to obtain a query result; A sending unit, configured to, in response to the query result being empty, call a preset generation model to generate verification information, and send the verification information and the program identification identifier to the server; in response to the query result being not empty, obtain the environment parameters corresponding to the display information, call a preset generation model to generate verification information, and send the environment information, the verification information and the program identification identifier to the server; The sending unit is further configured to receive decryption information sent by the server, and transmit the decryption information to the second terminal.
9. A device for processing an application, characterized in that: Set at the second terminal, including: A receiving unit, configured to call a preset interface to load an application program and a program information file corresponding to the target application in response to a start instruction of the target application; A display unit, configured to extract a program identification identifier of the target application based on the program information file, obtain environmental parameters of the target application, generate and display mixed information based on the environmental parameters and the program identification identifier, enable the first terminal to obtain the program identification identifier through the mixed information, and obtain decryption information from the server through the program identification identifier; A decryption unit, used to receive the decryption information, calculate a decryption password based on the decryption information, and call a preset decryption program to decrypt the application program; The running unit is used for running the application in response to the application being successfully decrypted.
10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.