Program updating method and device, electronic equipment and storage medium

By identifying and updating memory objects during application runtime, the problem of business interruption caused by application updates was resolved, enabling seamless updates and improving user experience and business stability.

CN122152344APending Publication Date: 2026-06-05DUOYI NETWORK CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DUOYI NETWORK CO LTD
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The update process of existing applications requires them to exit the current running state, which leads to problems such as interruption of user operations, discontinuity of business processes, data loss and delay of business processing.

Method used

During application execution, by determining the memory object corresponding to the first program data, the modified second program data is loaded, and the first memory object is updated based on the second memory object to achieve seamless updates.

Benefits of technology

It enables seamless updates of the application during runtime, avoiding user operation interruptions, business process inconsistencies, and data loss, thereby improving user experience and the stability of business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152344A_ABST
    Figure CN122152344A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a program updating method and device, electronic equipment and a storage medium. The method comprises: determining first program data called by a target application program during running of the target application program; in response to a program change event of the first program data, determining a first memory object corresponding to the first program data; loading second program data corresponding to the first program data to obtain a second memory object corresponding to the second program data; wherein the second program data is program data changed from the first program data; and updating the first memory object based on the second memory object, so that the target application program can normally run based on the second program data, and seamless updating of the application program during running is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a program update method, apparatus, electronic device, and storage medium. Background Technology

[0002] In today's rapidly evolving digital landscape, applications, as crucial carriers of various business functions, are being updated and iterated more frequently. To meet ever-changing user needs, fix potential vulnerabilities, or improve performance, application updates have become routine, covering multiple aspects such as code logic and data structures to ensure that applications always maintain good functionality and stability.

[0003] However, when existing applications update during runtime, they typically need to be exited and restarted after the update is complete. This update method interrupts the user's ongoing operations, leading to discontinuous business processes, impacting user experience, and in some critical business scenarios, potentially causing data loss or business processing delays due to update interruptions. Summary of the Invention

[0004] This invention provides a program update method, apparatus, electronic device, and storage medium to achieve seamless updates of applications during runtime.

[0005] According to one aspect of the present invention, a program update method is provided, the method comprising: During the execution of the target application, the first program data called by the target application at runtime is determined; In response to a program change event of the first program data, determine the first memory object corresponding to the first program data; Load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data; wherein, the second program data is program data modified from the first program data; The first memory object is updated based on the second memory object so that the target application can run normally based on the second program data.

[0006] According to another aspect of the present invention, a program update apparatus is provided, the apparatus comprising: The first module is used to determine the first program data called by the target application during its runtime. The second module is used to determine the first memory object corresponding to the first program data in response to a program change event of the first program data; The third module is used to load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data; wherein, the second program data is program data modified from the first program data; The fourth module is used to update the first memory object based on the second memory object, so that the target application can run normally based on the second program data.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: One or more processors; Storage device for storing one or more programs. When one or more programs are executed by one or more processors, the one or more processors implement a program update method as described in any of the embodiments of this disclosure.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to implement any of the program update methods of the present invention when executed.

[0009] According to another aspect of the present disclosure, a computer program product is provided, which, when executed by a processor, implements a program update method as described in any of the embodiments of the present disclosure.

[0010] The technical solution of this disclosure, during the operation of a target application, determines the first program data called by the target application during runtime; in response to a program change event of the first program data, it determines the first memory object corresponding to the first program data, thereby quickly finding the memory entity associated with the program data, ensuring that the update operation directly acts on the memory level, reducing intermediate steps, and improving update response speed. Loading the modified second program data corresponding to the first program data to obtain the second memory object ensures that the updated data is new data that has been modified and meets the requirements; updating the first memory object based on the second memory object allows the target application to run normally based on the second program data, achieving seamless updates of the application during runtime. The technical solution of this disclosure solves the problem of business interruption caused by the need to exit during updates in traditional applications, avoiding user operation interruptions, discontinuous business processes, data loss, and business processing delays caused by exiting updates, effectively improving user experience and the stability of business processing.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart illustrating a program update method provided in an embodiment of this disclosure; Figure 2 A schematic diagram illustrating the determination of memory objects for a customized garbage collection interface applicable to a program update method provided in this embodiment of the disclosure; Figure 3 A flowchart illustrating a program update method provided in an embodiment of this disclosure; Figure 4 A schematic diagram illustrating the process of updating instance objects in a program update method provided in this embodiment of the disclosure; Figure 5 This is a schematic diagram of the structure of a program update device provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0017] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0018] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0019] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0020] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0021] Figure 1 This is a flowchart illustrating a program update method provided in an embodiment of this disclosure. This embodiment is applicable to situations where application program data needs to be updated. The method can be executed by a program update device, which can be implemented in hardware and / or software and can be configured in electronic devices such as computers or servers. Figure 1 As shown, the method in this embodiment includes: S110. During the execution of the target application, determine the first program data called by the target application at runtime.

[0022] The target application can be understood as an application that is running and currently requires a program update. The number of target applications can be one, two, or more. The first program data can be understood as the program data called by the target application during its operation. In this embodiment, the first program data can be source code, i.e., the code originally written; or, the first program data can be program code obtained by modifying the source code, such as code optimized for a certain function of office software.

[0023] Specifically, the target application is run. During the execution of the target application, the program data used by the target application during its execution is determined through the application's calling mechanism, i.e., the first program data is determined. The calling mechanism can be understood as a series of function calls, method calls, and other operations within the application. By analyzing these calling relationships, the specific program data currently being used by the application can be determined. In this embodiment of the disclosure, running the target application can specifically involve, in response to a startup operation for the target application, loading the relevant resources of the target application, retrieving the relevant resources from the storage device into memory, and initializing the application's runtime environment, including allocating memory control and loading necessary library files. Taking a mobile game application as an example, in response to the triggering of the game application, the installation package of the target application is read, the code and resource files are decompressed and loaded into memory, memory space is allocated, and dynamic link libraries are loaded to complete initialization, making the target application runnable.

[0024] S120. In response to the program change event of the first program data, determine the first memory object corresponding to the first program data.

[0025] The first program change event can be understood as an event triggered when the first program data changes. For example, when a program developer modifies and saves the program code of the target application, this modification and saving action will trigger a program change event. In this embodiment of the disclosure, the program change event may include one of the following: a program addition event, a program modification event, and a program deletion event. It can be understood that a program addition event is an event that adds program data to the first program data. A program modification event is an event that modifies a portion of the program data in the first program data. A program deletion event is an event that deletes a portion of the program data from the first program data. The first memory object can be understood as an entity dynamically created and stored in the computer memory space according to a predefined structure and logic in the first program data.

[0026] Taking a Python application as an example, the initial program data might contain multiple .py module files. These module files define different classes, functions, and global variables. Each class has its own attributes and methods, while functions contain specific logic code. When the application starts, the Python interpreter loads these module files and creates corresponding object instances in the heap memory based on the class definitions. These object instances are the initial memory objects. They not only store the attribute values ​​defined in the class but also contain references to class methods, enabling the objects to call the corresponding methods to perform specific operations.

[0027] In this embodiment of the disclosure, in response to program change events involving the first program data, such as modifications to class definitions, additions or deletions of functions, or adjustments to data structures, the object currently stored in memory that is related to the first program data, i.e., the first memory object, can be located. Specifically, a memory management mechanism is used to perform a fast lookup in a memory mapping table or index structure. In this embodiment of the disclosure, the mapping table or index structure records the correspondence between the first program data and objects stored in memory. Through a lookup operation on the mapping table or index structure, the object currently stored in memory that is related to the first program data, i.e., the first memory object, can be quickly located.

[0028] In this embodiment of the disclosure, determining the first memory object corresponding to the first program data may include: determining third program data in the first program data that has undergone program changes; wherein the third program data includes a preset program element; determining the third memory object corresponding to the preset program element, and determining the first memory object corresponding to the first program data based on the third memory object.

[0029] The third program data can be understood as the portion of the first program data that has undergone program changes. The third program data reflects the specific program code involved in the update or modification of the first program data of the target application. For example, if the item generation logic in a game application is optimized, then the code related to item generation constitutes the third program data. Identifying the third program data helps determine the scope of the program changes. Predefined program elements can be understood as program components predefined during the design and development of the target application.

[0030] In this embodiment, the preset program element may include one of the following: a class, a function, and a variable. The preset program element has a specific function and role in the program. The number of preset program elements can be one, two, or more. In this embodiment, the third memory object can be understood as a specific storage area in memory corresponding to the preset program element. When the program runs, the preset program element is loaded into memory and forms a corresponding memory object. These memory objects store the current state and value of the preset program element and are the objects actually operated on by the program during runtime. Determining the third memory object helps to understand the impact of program changes on the memory state, providing support for dynamic updates and debugging of the program.

[0031] Specifically, the third program data that has undergone program changes within the first program data is identified. This allows for the identification of program elements defined within the third program data. The memory object associated with the program element, i.e., the third memory object, is then searched in memory. The identified third memory object can then be designated as the first memory object corresponding to the first program data. It is understood that the number of first memory objects can be one, two, or more.

[0032] In this embodiment of the disclosure, determining the third program data in the first program data that has undergone program changes may include: determining the second program data corresponding to the first program data; performing content difference analysis on the first program data and the second program data to determine the scope of program changes in the first program data; and determining the third program data in the first program data that has undergone program changes based on the scope of program changes.

[0033] The second program data can be understood as program data modified from the first program data. In simpler terms, the first program data can be program data for a first version of the target application, and the second program data can be program data for a second version of the target application; wherein the first version is lower than the second version, i.e., the second version is the newer version, and the first version is the older version. The scope of program changes can be used to determine the program data in the first program data that has undergone program changes. In this embodiment of the disclosure, content difference analysis is used, which may accurately locate the differences between the first program data and the second program data, clarify the scope of program changes, and help to quickly identify the differing code segments.

[0034] Specifically, the second program data corresponding to the first program data is determined. Then, a preset text comparison tool or a custom analysis script can be used to perform content difference analysis on the second program data and the first program data, thereby obtaining the content difference analysis results of the first program data and the second program data. Furthermore, based on the content difference analysis results, the range of program changes in the first program data relative to the second program data can be determined. Thus, the program data within the range of program changes can be identified as the third program data in the first program data that has undergone program changes.

[0035] In this embodiment of the disclosure, the number of preset program elements is multiple. Determining the third memory object corresponding to each preset program element may include: determining the third memory object corresponding to each preset program element through a customized garbage collection interface. The customized garbage collection interface can be used to simultaneously determine the memory objects corresponding to multiple preset program elements.

[0036] In this embodiment, the customized garbage collection interface can search for memory objects corresponding to other program elements while searching for the memory object corresponding to a preset program element, thus searching for multiple objects corresponding to preset program elements in memory at once. In this embodiment, the customized garbage collection interface completes multiple searches at once, thereby reducing the number of memory addressing operations, significantly reducing CPU load, and improving overall search efficiency.

[0037] See Figure 2 This system utilizes a customized garbage collection interface to obtain the reference chain. Then, based on different object types and reference conditions, it adopts corresponding replacement strategies to replace the original memory objects with new instance objects. The specific steps are as follows: Based on the customized garbage collection interface, the reference chain of memory objects is first obtained. Then, different replacement strategies are adopted according to the object type: for containers, the old memory objects corresponding to their elements are traversed and replaced; for instance objects, the old memory referenced by their member variables is replaced; for weak references, a new reference is generated to point to the new instance; for methods bound to instances, the associated instance object is first obtained and then its old memory is replaced. In this process, the customized garbage collection interface accurately determines the third memory object to be replaced for each preset program element, achieving efficient memory management.

[0038] S130. Load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data.

[0039] The second program data refers to the program data modified from the first program data. In simpler terms, the second program data is all the program code obtained after modifying the first program data, i.e., the code of the new version of the application. The second memory object can be understood as an object related to the second program object stored in computer memory. That is, the second memory object is the representation of the second program data in memory.

[0040] Specifically, during the execution of the target application, in response to a program change event for the first program data, second program data corresponding to the first program data is determined. In response to a determination event for the second program data, the second program data is loaded to generate an object corresponding to the second program data, i.e., a second memory object, in memory.

[0041] S140. Update the first memory object based on the second memory object so that the target application can run normally based on the second program data.

[0042] Specifically, the first memory object is updated using the second memory object, enabling the target application to continue running using the updated memory object data.

[0043] In this disclosure, there are multiple ways to update the first memory object based on the second memory object. As an optional implementation in this disclosure, the first memory object can be replaced with the second memory object. As another optional implementation in this disclosure, for each third memory object in the first memory object, a fourth memory object corresponding to the third memory object in the second memory object can be determined, and the third memory object can be replaced with the fourth memory object. It is understood that when it is necessary to update a third memory object in the first memory object, a specific memory object (i.e., a fourth memory object) corresponding to the third memory object in terms of program logic and data structure needs to be found in the second memory object, and then the original third memory object is replaced with the fourth memory object. This is done to ensure that the target application can run normally based on the second program data after the update, maintaining accuracy and consistency in data usage and logical processing.

[0044] In this embodiment of the disclosure, after updating the first memory object based on the second memory object, the method may further include: releasing the resources occupied by the first memory object in response to an event indicating that the first memory object has been updated. This effectively avoids memory leaks, prevents the continuous accumulation of unused memory, and avoids the gradual depletion of available system memory, ensuring long-term stable operation of the program. Releasing resources reduces memory usage, lowers memory management overhead, and makes the program run more smoothly. Specifically, in response to an event indicating that the first memory object has been updated, a resource release method can be invoked to release the resources occupied by the first memory object.

[0045] In this embodiment of the disclosure, after updating the first memory object based on the second memory object, the method may further include: generating a preset prompt message in response to an event indicating that the update of the first memory object is complete, and displaying the preset prompt message. The preset prompt message can be used to indicate that the program data of the target application has been changed. In this embodiment of the disclosure, the specific form of the preset prompt message may include one of the following: text, audio, or image. That is, the preset prompt message can be at least one of text prompts, audio prompts, and image prompts. In this embodiment of the disclosure, generating and displaying the preset prompt message in response to the event indicating that the update of the first memory object is complete allows relevant personnel to be aware of the change status of the target application's program data in a timely manner, avoiding erroneous operations due to ignorance of the changes, improving the interactive experience of the application, and facilitating relevant personnel to understand the program's operation flow, thus aiding in debugging and maintenance.

[0046] The technical solution of this disclosure, during the operation of a target application, determines the first program data called by the target application during runtime; in response to a program change event of the first program data, it determines the first memory object corresponding to the first program data, thereby quickly finding the memory entity associated with the program data, ensuring that the update operation directly acts on the memory level, reducing intermediate steps, and improving update response speed. Loading the modified second program data corresponding to the first program data to obtain the second memory object ensures that the updated data is new data that has been modified and meets the requirements; updating the first memory object based on the second memory object allows the target application to run normally based on the second program data, achieving seamless updates of the application during runtime. The technical solution of this disclosure solves the problem of business interruption caused by the need to exit during updates in traditional applications, avoiding user operation interruptions, discontinuous business processes, data loss, and business processing delays caused by exiting updates, effectively improving user experience and the stability of business processing.

[0047] Figure 3This is a schematic flowchart illustrating another program update method provided in this embodiment. The technical solution of this embodiment can be combined with other embodiments; for the same or related parts, they can be described in conjunction with the descriptions of other embodiments, and will not be repeated here. Figure 3 As shown, the method in this embodiment may specifically include: S210. During the execution of the target application, determine the first program data called by the target application at runtime.

[0048] S220. In response to a program change event in the first program data, determine third program data in the first program data that has undergone program change; wherein the third program data includes preset program elements.

[0049] S230. Determine the third memory object corresponding to the preset program element; wherein the number of the third memory objects is one or more.

[0050] The third memory object can be understood as an old memory object created in memory for a preset program element. In other words, it is the data object stored in memory corresponding to the preset program element before the program changes. As the program runs, the data of the preset program element is loaded into memory to form memory objects. When the program changes, these old memory objects may need to be removed or marked as invalid.

[0051] S240. Load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data.

[0052] The second program data refers to the program data modified from the first program data. It is understood that the second program data includes the original content of the first program data as well as new content after modification, addition, or deletion. In this embodiment, loading the second program data corresponding to the first program data to obtain a second memory object corresponding to the second program data can specifically involve calling a preset reload method to reload the second program data, generating a new function body object and a class definition object, thus obtaining the second memory object.

[0053] S250. For the third memory object in the first memory object, determine the fourth memory object in the second memory object that corresponds to the third memory object, replace the third memory object with the fourth memory object, and determine whether there is a reference point that references the third memory object; if so, modify the memory object pointed to by the reference point to the fourth memory object so that the target application can run normally based on the second program data.

[0054] The fourth memory object can be a new memory object that needs to replace the third memory object. For example, after an application update, the memory object storing the old color information will be replaced with the memory object storing the color information. A reference point can be understood as a memory object that references the third memory object. If there are reference points to the third memory object, the third memory object can have one, two, or more reference points.

[0055] Understandably, if there is no reference point to the third memory object, the operation of determining the fourth memory object corresponding to the third memory object in the second memory object, replacing the third memory object with the fourth memory object, and determining whether there is a reference point to the third memory object can be returned.

[0056] Building upon the above embodiments, the newly generated memory object replaces the old object, and all references are synchronously updated to the new object. Alternatively, an instance object can be generated based on the new class definition to replace the original instance object. For the process of generating an instance object based on the new class definition to replace the original instance object, please refer to [link to documentation]. Figure 4 The newly defined classes are categorized; the class type can include one of the following: component class, struct, enumeration class, and regular class. These classes are checked to see if they are custom classes, requiring additional handling of their dependent memory data. If they are custom classes, special handling is required; otherwise, the process continues. Regardless of whether they have undergone customization, the process proceeds to the next step, collecting class variables and metaclass variables from bottom to top based on class inheritance relationships. After collecting variables, the process enters several decision nodes: checking if the variable is a magic variable; checking if the variable has the slots attribute and is no longer owned by the new class; checking if the variable is a special metaclass variable; and other complex conditions need to be determined. Based on the above results, the data is updated to the new instance object.

[0057] The technical solution of this disclosure embodiment, for a third memory object in the first memory object, determines a fourth memory object in the second memory object corresponding to the third memory object, replaces the third memory object with the fourth memory object, and determines whether there is a reference point referencing the third memory object; if so, the memory object pointed to by the reference point is modified to the fourth memory object, thereby realizing seamless updates of the application during operation.

[0058] Figure 5 This is a schematic diagram of a program update device provided in an embodiment of the present disclosure. Figure 5 As shown, the program update device includes: a first module 310, a second module 320, a third module 330, and a fourth module 340.

[0059] The first module 310 is used to determine the first program data called by the target application during its runtime. The second module 320 is used to determine the first memory object corresponding to the first program data in response to a program change event of the first program data. The third module 330 is used to load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data; wherein, the second program data is program data modified from the first program data; The fourth module 340 is used to update the first memory object based on the second memory object so that the target application can run normally based on the second program data.

[0060] The technical solution of this disclosure, during the operation of a target application, determines the first program data called by the target application during runtime; in response to a program change event of the first program data, it determines the first memory object corresponding to the first program data, thereby quickly finding the memory entity associated with the program data, ensuring that the update operation directly acts on the memory level, reducing intermediate steps, and improving update response speed. Loading the modified second program data corresponding to the first program data to obtain the second memory object ensures that the updated data is new data that has been modified and meets the requirements; updating the first memory object based on the second memory object allows the target application to run normally based on the second program data, achieving seamless updates of the application during runtime. The technical solution of this disclosure solves the problem of business interruption caused by the need to exit during updates in traditional applications, avoiding user operation interruptions, discontinuous business processes, data loss, and business processing delays caused by exiting updates, effectively improving user experience and the stability of business processing.

[0061] In some embodiments of this disclosure, optionally, the second module 320 is used to determine third program data in the first program data that has undergone program changes; wherein, the third program data includes preset program elements; determine a third memory object corresponding to the preset program elements, and determine a first memory object corresponding to the first program data based on the third memory object.

[0062] In some embodiments of this disclosure, optionally, the number of preset program elements is multiple, and the second module 320 is used to determine the third memory object corresponding to each preset program element through a customized garbage collection interface; wherein, the customized garbage collection interface is used to simultaneously determine the memory objects corresponding to multiple preset program elements.

[0063] In some embodiments of this disclosure, optionally, the second module 320 is configured to determine the second program data corresponding to the first program data, perform content difference analysis on the first program data and the second program data to determine the scope of program changes in the first program data; and determine the third program data in the first program data that has undergone program changes based on the scope of program changes.

[0064] In some embodiments of this disclosure, optionally, the fourth module 340 is configured to, for a third memory object in the first memory object, determine a fourth memory object in the second memory object corresponding to the third memory object, replace the third memory object with the fourth memory object, and determine whether there is a reference point referencing the third memory object; if so, modify the memory object pointed to by the reference point to the fourth memory object.

[0065] In some embodiments of this disclosure, the program update may optionally include a fifth module. This fifth module is configured to release the resources occupied by the first memory object in response to an event indicating that the update of the first memory object is complete, after the first memory object has been updated based on the second memory object.

[0066] In some embodiments of this disclosure, the update may optionally include a sixth module. This sixth module is configured to, after the first memory object is updated based on the second memory object, generate and display a preset prompt message in response to an event indicating that the update of the first memory object is complete; wherein the preset prompt message indicates that the program data of the target application has been changed.

[0067] The program update apparatus provided in this disclosure can execute the program update method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0068] It is worth noting that the various units and modules included in the above-mentioned program update device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0069] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0070] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0071] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0072] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as program update methods.

[0073] In some embodiments, the program update method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the program update method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the program update method by any other suitable means (e.g., by means of firmware).

[0074] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0075] Computer programs used to implement the program update methods of this disclosure can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0076] This disclosure provides a computer-readable storage medium storing computer instructions for causing a processor to execute a program update method, comprising: during the execution of a target application, determining first program data invoked by the target application during runtime; in response to a program change event of the first program data, determining a first memory object corresponding to the first program data; loading second program data corresponding to the first program data to obtain a second memory object corresponding to the second program data; wherein the second program data is program data modified from the first program data; and updating the first memory object based on the second memory object so that the target application can run normally based on the second program data.

[0077] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0078] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0079] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0080] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0081] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of embodiments of this disclosure.

[0082] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements a program update method according to any embodiment of this disclosure.

[0083] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0084] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.

[0085] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A program update method, characterized in that, The method includes: During the execution of the target application, the first program data called by the target application at runtime is determined; In response to a program change event of the first program data, determine the first memory object corresponding to the first program data; Load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data; wherein, the second program data is program data modified from the first program data; The first memory object is updated based on the second memory object so that the target application can run normally based on the second program data.

2. The method according to claim 1, characterized in that, Determining the first memory object corresponding to the first program data includes: Identify third program data in the first program data that has undergone program changes; wherein, the third program data includes preset program elements; Determine the third memory object corresponding to the preset program element, and determine the first memory object corresponding to the first program data based on the third memory object.

3. The method according to claim 2, characterized in that, The number of preset program elements is multiple, and determining the third memory object corresponding to each preset program element includes: A customized garbage collection interface is used to determine the third memory object corresponding to each of the preset program elements; wherein, the customized garbage collection interface is used to simultaneously determine the memory objects corresponding to multiple preset program elements.

4. The method according to claim 2, characterized in that, The step of determining the third program data in the first program data that has undergone program changes includes: Determine the second program data corresponding to the first program data. A content difference analysis is performed on the first program data and the second program data to determine the scope of program changes that have occurred in the first program data. Based on the scope of program changes, determine the third program data in the first program data that has undergone program changes.

5. The method according to claim 2, characterized in that, The step of updating the first memory object based on the second memory object includes: For the third memory object in the first memory object, determine the fourth memory object in the second memory object that corresponds to the third memory object, replace the third memory object with the fourth memory object, and determine whether there is a reference point that references the third memory object; if so, modify the memory object pointed to by the reference point to the fourth memory object.

6. The method according to claim 1, characterized in that, After updating the first memory object based on the second memory object, the method further includes: In response to the event that the first memory object has been updated, the resources occupied by the first memory object are released.

7. The method according to claim 1, characterized in that, After updating the first memory object based on the second memory object, the method further includes: In response to the event that the first memory object has been updated, a preset prompt message is generated and displayed; wherein the preset prompt message is used to indicate that the program data of the target application has been changed.

8. A program update device, characterized in that, The device includes: The first module is used to determine the first program data called by the target application during its runtime. The second module is used to determine the first memory object corresponding to the first program data in response to a program change event of the first program data; The third module is used to load the second program data corresponding to the first program data to obtain the second memory object corresponding to the second program data; wherein, the second program data is program data modified from the first program data; The fourth module is used to update the first memory object based on the second memory object, so that the target application can run normally based on the second program data.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; 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 program update method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the program update method according to any one of claims 1-7.