An application updating method and terminal based on dynamic function module loading
By simulating the generation and transmission of DLL memory data to the client via the server, dynamic loading and updating of functional modules are achieved, solving the problems of DLL component information display and exception handling, and providing a safe and reliable application update method.
Patent Information
- Application Number
- CN202410712311.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-06-04
AI Technical Summary
In existing technologies, using dynamic link libraries (DLLs) for application updates presents security risks and poor compatibility issues, especially the inability to effectively hide DLL component information and capture abnormal errors.
The server loads the DLLs required by the client into the simulation component, simulates the generation of memory space size, memory address and memory data, saves it as a List data and returns it to the client. The client performs memory partitioning and data filling in memory according to the List data, replaces the exception handling address, and realizes dynamic hiding of functional modules and exception handling.
It achieves dynamic hiding of functional modules, avoids displaying DLL component information, ensures unified security and exception handling, and uses dynamic network transmission to prevent information leakage.
Smart Images

Figure CN118689551B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to an application updating method based on dynamic function module loading and a terminal. BACKGROUND
[0002] Dynamic Link Library (Dynamic-link Library, DLL for short) is a way to realize the concept of shared function library in Windows operating system.
[0003] Using dynamic link library can more easily apply program updating functions to each module without affecting other parts of the program. For example, if the entire hundreds of MB or even hundreds of GB of game code in a large network game is placed in an application program, the modification work will be very time-consuming in the future, and if the codes of different functions are placed in several dynamic link libraries, the entire program does not need to be regenerated or installed to apply updates.
[0004] However, after referring to the dynamic link library DLL for application updating, the system will display the referenced component information, which has security risks. Currently, the DLL is hidden by breaking the link, or deleted / hidden after loading by the HOOK method, but both methods will leave traces. Currently, there is a way to directly LIB the DLL to participate in static component compilation to realize application updating, but it has the problem of poor compatibility and cannot provide exception protection (i.e. errors generated by the DLL after memory running cannot be captured, and the generated errors cause direct errors). SUMMARY
[0005] The technical problem to be solved by the present application is to provide an application updating method based on dynamic function module loading and a terminal to replace the traditional DLL loading method and effectively realize dynamic hiding of function components.
[0006] To solve the above technical problems, the technical scheme adopted by the present application is:
[0007] An application updating method based on dynamic function module loading, comprising the steps of:
[0008] S1, the server receives a function module request of a client, loads a DLL required by the function module and sends it to a simulated component;
[0009] S2, the simulated component simulates the memory space size, memory address and memory data generated when the DLL is loaded, and saves them as List data and returns them to the server;
[0010] S3, the server sends the obtained List data to the requesting client.
[0011] S4, the client loads the List data, completes application update.
[0012] To solve the above technical problems, another technical solution adopted by the application is:
[0013] An application update terminal based on dynamic function module loading, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0014] S1, the server receives a function module request of a client, loads DLL required by the function module and sends to an analog component;
[0015] S2, the analog component simulates memory space size, memory address and memory data generated when loading the DLL, and saves the List data and returns to the server;
[0016] S3, the server sends the List data obtained to the client requesting;
[0017] S4, the client loads the List data, completes application update.
[0018] The application has the advantages that: an application update method and terminal based on dynamic function module loading are provided, the server loads DLL required by the function module to be updated by the client and sends to an analog component, the analog component simulates memory space size, memory address and memory data generated when the actual client updates the function module by using the traditional DLL loading method, and returns the List data to the server, and the server sends the List data to the corresponding client for loading and updating, so that the application component corresponding to the function module is directly run in the client memory without using the DLL, and the dynamic hiding of the function component is effectively realized. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 A flowchart of an application update method based on dynamic function module loading according to an embodiment of the application;
[0020] Figure 2 A schematic diagram of component information displayed by the system when updating the application by loading the function module through the DLL;
[0021] Figure 3 A schematic diagram of component information displayed by the system when updating the application by using the application update method based on dynamic function module loading according to an embodiment of the application;
[0022] Figure 4A structure schematic diagram of an application updating terminal based on dynamic function module loading for an embodiment of the present application.
[0023] Label description:
[0024] 1. An application updating terminal based on dynamic function module loading; 2. a memory; 3. a processor. DETAILED DESCRIPTION
[0025] To make the technical content, the achieved purposes and effects of the present application clear, the following will be described in combination with embodiments and the accompanying drawings.
[0026] Please refer to Figures 1 to 3 An application updating method based on dynamic function module loading, comprising the steps of:
[0027] S1, the server receives the function module request of the client, loads the DLL required by the function module and sends it to the simulation component;
[0028] S2, the simulation component simulates the memory space size, memory address and memory data generated when the DLL is loaded, and saves it as List data and returns it to the server;
[0029] S3, the server sends the List data obtained to the client requesting it;
[0030] S4, the client loads the List data and completes the application update.
[0031] From the above description, the beneficial effects of the present application are that: an application updating method based on dynamic function module loading is provided, the server loads the DLL required by the function module to be updated by the client and sends it to the simulation component, the simulation component simulates the memory space size, memory address and memory data generated when the function module is updated by the actual client using the traditional DLL loading method, and returns these data to the server after storing them as List data, and the server sends them to the corresponding client for loading and updating, which realizes the direct running of the application component corresponding to the function module in the memory of the client without using the DLL method, and effectively realizes the dynamic hiding of the function component.
[0032] Further, the step S4 is specifically:
[0033] The client calls the corresponding system API according to the memory address in the List data to divide the memory space size in the memory of the client, and fills the memory data in the space, thereby completing the application update.
[0034] From the above description, the client can directly obtain the system API called by the simulation component in the simulation function module loading process according to the memory address in the List data, so that the same system API is used for memory partitioning and data filling in the client, and the function module dynamic loading in the DLL-free mode is realized.
[0035] Further, the step S4 further includes, before filling the memory data in the space:
[0036] determining whether the memory address + the partitioned space size is equal to the memory address + the memory space size, and if not, returning to step S2 to re-simulate by the simulation component until the equality.
[0037] From the above description, the memory size verification before the data filling in the specified space partitioned in the client is increased, which ensures that the partitioned space size is equal to the memory space size obtained by the simulation component, ensures the effective filling of the memory data, and avoids the excess or deficiency of the partitioned space.
[0038] Further, the step S4 further includes:
[0039] obtaining the exception handling address of the client and replacing the exception handling address of the DLL.
[0040] From the above description, since the memory partitioning and data filling are used to replace the traditional use of DLL for function module loading to realize the application updating mode, the exception handling address of the DLL is not applicable in the client, and needs to be replaced by the exception handling address of the client itself, so that the exception handling mechanism is unified, and the exception handling can be realized in addition to the DLL mode.
[0041] Further, the data transmission between the client and the server and between the server and the simulation component adopts a network dynamic transmission mode.
[0042] From the above description, the network dynamic transmission loading does not generate file information locally, effectively ensures the security, and avoids information leakage.
[0043] Please refer to Figure 4 An application updating terminal based on dynamic function module loading, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0044] S1, the server receives the function module request of the client, loads the DLL required by the function module and sends it to the simulation component;
[0045] S2, the simulation component simulates memory space size, memory address and memory data generated when the DLL is loaded, and saves the List data and returns to the server;
[0046] S3, the server sends the obtained List data to the requested client;
[0047] S4, the client loads the List data to complete application update.
[0048] From the above description, the beneficial effects of the application are that based on the same technical concept, a kind of application update terminal based on dynamic function module loading is provided in cooperation with the above-mentioned application update method based on dynamic function module loading, the DLL required for the function module to be updated by the server loads client and is sent to simulation component, the memory space size, memory address and memory data generated when the function module is updated by actual client using traditional DLL loading mode are simulated by simulation component, and these data are stored as List data and returned to server, and are sent to corresponding client by server for loading update, the application component corresponding to function module is directly run in the memory of client without using DLL, and the dynamic hiding of function component is effectively realized.
[0049] Further, the step S4 is specifically:
[0050] The client calls corresponding system API in the memory of the client according to the memory address in the List data to divide the memory space size in space, and fills the memory data in space to complete application update.
[0051] From the above description, the client can directly obtain system API called by simulation component in the simulation process of function module loading according to the memory address in List data, so that the same system API is used for memory division and data filling in client, and dynamic loading of function module under DLL-free mode is realized.
[0052] Further, the step S4 further includes before filling the memory data in space:
[0053] It is judged whether the memory address+divided space size is equal to the memory address+memory space size, if not, return to step S2 to be simulated by the simulation component again until equal.
[0054] From the above description, the memory size verification before data filling in the specified space divided in client is added, to ensure that the size of divided space is equal to the memory space size obtained by simulation component simulation, to ensure effective filling of memory data, and to avoid excess or insufficient of divided space.
[0055] Furthermore, step S4 also includes:
[0056] Obtain the exception handling address of the client and replace the exception handling address of the DLL.
[0057] As described above, since memory partitioning and data filling are used instead of the traditional method of loading functional modules using DLLs to achieve application updates, the exception handling address of the DLL is not applicable in the client and needs to be replaced with the exception handling address of the client itself. This makes the exception handling mechanism uniform and ensures that exception handling can be achieved in addition to using the DLL method.
[0058] Furthermore, data transmission between the client and the server, and between the server and the simulation component, both adopt a dynamic network transmission method.
[0059] As described above, dynamic network transfer loading does not generate file information locally, effectively ensuring security and preventing information leakage.
[0060] This invention provides an application update method and terminal based on dynamic functional module loading, mainly applied in scenarios where clients perform application updates. The following is a detailed description with reference to specific embodiments:
[0061] Please refer to Figure 1 Embodiment 1 of the present invention is as follows:
[0062] An application update method based on dynamic functional module loading, such as Figure 1 As shown, the steps include:
[0063] S1. The server receives the client's functional module request, loads the DLL required by the functional module, and sends it to the simulation component.
[0064] S2. The simulation component simulates the memory space size, memory address, and memory data generated when loading a DLL, saves it as a List data, and returns it to the server.
[0065] S3. The server sends the obtained List data to the requesting client.
[0066] S4. The client loads the List data and completes the application update.
[0067] That is, in the embodiment, the DLL required by the client to load the function module to be updated is sent to the simulation component, the memory space size, the memory address and the memory data generated when the actual client updates the function module by using the traditional DLL loading method are simulated by the simulation component, the data are stored as List data and returned to the server, the server sends the data to the corresponding client to load and update, the application component corresponding to the function module is directly run in the memory of the client without using the DLL, and the dynamic hiding of the function component is effectively realized.
[0068] The data transmission between the client and the server and between the server and the simulation component is in a network dynamic transmission mode, no file information is generated locally, safety is effectively ensured, and information leakage is avoided.
[0069] Please refer to Figure 2 and Figure 3 Embodiment two of the application is:
[0070] An application updating method based on dynamic function module loading, on the basis of the above embodiment one, in the embodiment, step S4 is specifically:
[0071] The client calls the corresponding system API in the memory of the client according to the memory address in the List data to divide the space of the memory space size, and fills the memory data in the space, and completes the application updating.
[0072] That is, in the embodiment, the client can directly obtain the system API called by the simulation component in the simulation function module loading process according to the memory address in the List data, so that the same system API is used to divide the memory and fill the data in the client, and the dynamic loading of the function module in the DLL-free mode is realized.
[0073] In the embodiment, step S4 further includes the following before the memory data is filled in the space:
[0074] It is judged whether the memory address + the divided space size is equal to the memory address + the memory space size, if not, the simulation of the simulation component is restarted from step S2 until the two are equal.
[0075] That is, the memory size verification before the specified space divided in the client is filled with data is added, so that the divided space size is equal to the memory space size obtained by the simulation component, the effective filling of the memory data is ensured, and the divided space is prevented from being excessive or insufficient.
[0076] In addition, in the embodiment, step S4 further includes:
[0077] The exception processing address of the client is obtained, and the exception processing address of the DLL is replaced.
[0078] That is, because the memory partitioning and data padding are used instead of the traditional use of the DLL to load the functional module to realize the application update, the exception handling address of the DLL does not apply in the client, and needs to be replaced by the exception handling address of the client itself, so that the exception handling mechanism is unified, and it is ensured that the exception handling can be realized except for the use of the DLL mode.
[0079] By Figure 2 It can be known that in the existing application update mode using the DLL to load the functional module, the system displays the detailed information of the referenced component, and the application update method based on the dynamic functional module loading of the embodiment can effectively hide the detailed information of the referenced component, that is, as shown in Figure 3 .
[0080] Please refer to Figure 4 , the third embodiment of the present application is:
[0081] An application update terminal 1 based on dynamic functional module loading, comprising a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, and the processor 3 completes the steps of the application update method based on dynamic functional module loading in the first embodiment or the second embodiment.
[0082] In summary, the application update method and terminal based on dynamic functional module loading provided by the present application have the following beneficial effects:
[0083] 1. The module loading function is realized
[0084] 2. The common exception handling mode is solved, and a scheme of dynamically loading the module without generating a file is provided
[0085] 3. The dynamic hiding (address randomization) of the functional component is realized.
[0086] The above is only an embodiment of the present application, and does not limit the patent range of the present application, and any equivalent transformation or direct or indirect application in the related technical field using the content of the specification and drawings of the present application is also included in the patent protection range of the present application.
Claims
1. An application update method based on dynamic function module loading, characterized by, The method comprises the steps of: S1, the server receives a function module request of a client, loads a DLL required by the function module, and sends the DLL to an analog component; S2, the analog component simulates a memory space size, a memory address, and memory data generated when the client loads the DLL, saves the memory space size, the memory address, and the memory data as List data, and returns the List data to the server; S3, the server distributes the List data obtained to the client that makes the request; S4, the client loads the List data and completes application updating. The step S4 specifically comprises: The client calls a corresponding system API according to the memory address in the List data to divide a space of the memory space size in the memory of the client, fills the memory data in the space, and completes application updating.
2. The application update method based on dynamic function module loading according to claim 1, characterized in that, Before filling the memory data in the space in the step S4, the method further comprises the steps of: determining whether the memory address + the divided space size is equal to the memory address + the memory space size, returning to the step S2 to be simulated again by the analog component if the memory address + the divided space size is not equal to the memory address + the memory space size, and stopping until the memory address + the divided space size is equal to the memory address + the memory space size.
3. The application update method based on dynamic function module loading according to claim 1, characterized in that, The step S4 further comprises the steps of: obtaining an exception handling address of the client, and replacing an exception handling address of the DLL.
4. The application update method based on dynamic function module loading according to claim 1, characterized in that, The data transmission between the client and the server and between the server and the analog component is performed in a network dynamic transmission mode.
5. An application update terminal based on dynamic function module loading, characterized by The computer program product comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program: S1, the server receives a function module request of a client, loads a DLL required by the function module, and sends the DLL to an analog component; S2, the analog component simulates a memory space size, a memory address, and memory data generated when the client loads the DLL, saves the memory space size, the memory address, and the memory data as List data, and returns the List data to the server; S3, the server distributes the List data obtained to the client that makes the request; S4, the client loads the List data and completes application updating. The step S4 specifically comprises: The client calls a corresponding system API according to the memory address in the List data to divide a space of the memory space size in the memory of the client, fills the memory data in the space, and completes application updating.
6. The application update terminal based on dynamic function module loading according to claim 5, characterized in that, Before filling the memory data in the space in the step S4, the method further comprises the steps of: determining whether the memory address + the divided space size is equal to the memory address + the memory space size, returning to the step S2 to be simulated again by the analog component if the memory address + the divided space size is not equal to the memory address + the memory space size, and stopping until the memory address + the divided space size is equal to the memory address + the memory space size.
7. The application update terminal based on dynamic function module loading according to claim 5, characterized in that, The step S4 further comprises the steps of: obtaining an exception handling address of the client, and replacing an exception handling address of the DLL.
8. The application update terminal based on dynamic function module loading according to claim 5, characterized in that, The data transmission between the client and the server and between the server and the analog component is performed in a network dynamic transmission mode.
Citation Information
Patent Citations
DLL file hiding method and system
CN106295402A
File dynamic generation method and application server
CN107908603A