Apparatus and method for updating software

The software update device and method leverage a reference table to manage updates of functions and global variables, enabling real-time updates that maintain service continuity in critical systems by prioritizing threads and handling internal and external changes, thus addressing the challenge of service disruption in existing update methods.

WO2024242520A1PCT designated stage expired Publication Date: 2024-11-28UNIVERSITY INDUSTRY COOPERATION GROUP OF KYUNG HEE UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/095549
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-25
Filing Date
2024-03-15
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

Existing software update methods disrupt real-time services by requiring termination and re-execution of the entire software process, making it challenging to maintain service continuity, especially in critical fields like IoT and power plants.

Method used

A software update device and method utilizing a reference table to manage updates by identifying and updating functions and global variables, allowing for internal and external changes without interrupting services, using a table creation module, update confirmation module, and update execution module to perform updates with prioritized threads.

Benefits of technology

Enables real-time software updates without affecting ongoing services by using a reference table to manage addresses of functions and global variables, ensuring continuous operation in real-time systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024095549_28112024_PF_FP_ABST
    Figure KR2024095549_28112024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are an apparatus and a method for updating software. The disclosed apparatus for updating software, according to one embodiment, comprises: a table generation module for generating a reference table for software to be updated; an update checking module for checking whether an update event of the software occurs and checking at least one of a component type of an update and a content type of the update if the update event has occurred; and an update performing module for performing the update of the software according to at least one of the component type and the content type of the update, checked on the basis of the reference table.
Need to check novelty before this filing date? Find Prior Art

Description

Software update device and method

[0001] Embodiments of the present invention relate to software update technology.

[0002] National Research and Development Project (1) that supported this invention

[0003] - Assignment ID: 1711183722

[0004] - Assignment number: 2022R1F1A1063724

[0005] - Ministry name: Ministry of Science and ICT

[0006] - Research Management Specialist Organization: National Research Foundation of Korea

[0007] - Research Project Name: Individual Basic Research (Ministry of Science and ICT)

[0008] - Research Project Name: Research on RTOS-based IoT System Security Technology

[0009] - Contribution rate: 1 / 2

[0010] - Project implementation organization name: Kyung Hee University (International Campus)

[0011] Research period: March 1, 2023 - February 29, 2024

[0012] National Research and Development Project (2) that supported this invention

[0013] - Assignment ID: 1711198879

[0014] - Assignment number: 00266615

[0015] - Ministry name: Ministry of Science and ICT

[0016] - Research management specialized agency: Information and Communications Technology Planning and Evaluation Institute

[0017] - Research Project Name: Training of Information, Communication, and Broadcasting Innovation Talents

[0018] - Research Project Name: Graduate School of Convergence Security (Kyung Hee University)

[0019] - Contribution rate: 1 / 2

[0020] - Project implementation organization name: Kyung Hee University Industry-Academic Cooperation Foundation

[0021] Research period: July 1, 2023 - December 31, 2023

[0022] Typically, software is organically composed of various components, such as functions and variables. These components constitute the overall context of the software. If dependencies exist between software components, changing any component at any location can disrupt the entire software context. Software context is largely created as a set of commands and functions, and each component within a set has strong dependencies on adjacent components within the same set.

[0023] 1 : void foo(){

[0024] 2 : instr1;

[0025] 3 : instr2;

[0026] 4 : instr3;

[0027] 5 :}

[0028] In the context of the above software, instr2 is executed assuming that instr1 has been executed, and similarly, instr3 is executed assuming that instr2 has been executed, and so on. Similarly, there are strong dependencies between functions regarding the types of arguments passed and values ​​returned.

[0029] Therefore, because component changes at runtime during software updates can make it difficult to maintain the integrity of the overall context, a method was used: terminating the running old version of the software, replacing it with the new version, and restarting the entire process. However, in fields where real-time services are crucial, uninterrupted service provision is required during software updates.

[0030] An embodiment of the present invention provides a software update device and method capable of real-time updating.

[0031] A software update device according to one embodiment disclosed is a software update device having one or more processors and a memory storing one or more programs executed by the one or more processors, the device including: a table generation module for generating a reference table for software to be updated; an update confirmation module for confirming whether an update event of the software has occurred and, if the update event has occurred, confirming one or more of a component type of the update and a content type of the update; and an update execution module for performing an update of the software according to one or more of the component types and content types of the update confirmed based on the reference table.

[0032] The above table creation module can extract each function and global variable that constitutes the software, and create a reference table by mapping the identification information of the extracted functions and global variables with the addresses where the functions and global variables are stored in memory.

[0033] The above update check module can check whether the component type of the update is a function or a global variable when the above update event occurs, and can check whether the content type of the update is an internal change or an external change.

[0034] An internal change of the above function may be a case where only the instructions inside the function are changed, and an external change of the above function may be a case where a new function is added or the interface of the function is changed.

[0035] The above update execution module can, if the update event is an internal change of the function, load the updated function into memory and change the address of the corresponding function in the reference table to the address of the updated function, and, if the update event is an external change of the function, load the updated function into memory and add an entry for the updated function in the reference table.

[0036] The internal change of the above global variable may be a case where only the value of the global variable is changed, and the external change of the above global variable may be a case where a new global variable is added or the type of the global variable is changed.

[0037] The above update execution module, if the update event is an internal change of the global variable, loads the updated global variable into memory, changes the address of the corresponding global variable in the reference table to the address of the updated global variable, and if the update event is an external change of the global variable, loads the updated global variable into memory, and adds an entry for the updated global variable in the reference table.

[0038] The above update execution module executes a thread that loads the updated function or global variable into memory and a thread that changes the reference table according to the component type and content type of the confirmed update, and can set a priority between the thread generated according to the update and the user command thread.

[0039] The above update execution module can set the thread that loads the function or global variable into memory to have a lower priority than the user command thread, and set the thread that changes the reference table to have a higher priority than the user command thread.

[0040] A software update method according to one embodiment disclosed is a method performed in a computing device having one or more processors and a memory storing one or more programs executed by the one or more processors, the method comprising: generating a reference table for software to be updated; checking whether an update event of the software has occurred, and checking at least one of a component type of the update and a content type of the update when the update event has occurred; and performing an update of the software according to at least one of the component type and the content type of the update checked based on the reference table.

[0041] According to the disclosed embodiment, by performing a software update using a reference table that stores the addresses of each function and global variable of the software, the software can be updated in real time without affecting the service being performed.

[0042] FIG. 1 is a diagram showing the configuration of a software update device according to one embodiment of the present invention.

[0043] FIG. 2 is a diagram illustrating a conventional direct memory reference and an indirect memory reference according to the disclosed embodiment.

[0044] FIG. 3 is a diagram schematically showing an update execution state when the type of the update component is a function and the type of the update content is an internal change of the function in one embodiment of the present invention.

[0045] Figure 4 is a diagram showing a state in which an internally changed function is called in one embodiment of the present invention.

[0046] FIG. 5 is a diagram schematically showing an update execution state when the type of the update component is a function and the type of the update content is an external change of the function in one embodiment of the present invention.

[0047] Figure 6 is a diagram showing a state in which an externally modified function is called in one embodiment of the present invention.

[0048] Figure 7 is a flowchart for explaining a software update method according to one embodiment of the present invention.

[0049] FIG. 8 is a block diagram illustrating a computing environment including a computing device suitable for use in exemplary embodiments.

[0050] Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. The following detailed description is provided to facilitate a comprehensive understanding of the methods, devices, and / or systems described herein. However, these are merely examples and the present invention is not limited thereto.

[0051] In describing embodiments of the present invention, if a detailed description of a known technology related to the present invention is judged to unnecessarily obscure the gist of the present invention, the detailed description will be omitted. In addition, the terms described below are terms defined in consideration of their functions in the present invention, and this may vary depending on the intention or custom of the user or operator. Therefore, the definitions should be made based on the contents throughout this specification. The terminology used in the detailed description is only for the purpose of describing embodiments of the present invention and should not be limited in any way. Unless clearly used otherwise, the singular form includes the plural form. In this description, expressions such as "comprises" or "having" are intended to indicate certain features, numbers, steps, operations, elements, parts or combinations thereof, and should not be construed to exclude the presence or possibility of one or more other features, numbers, steps, operations, elements, parts or combinations thereof other than those described.

[0052] Additionally, while terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms may be used to distinguish one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a "second component," and similarly, a second component may also be referred to as a "first component."

[0053] FIG. 1 is a diagram showing the configuration of a software update device according to one embodiment of the present invention.

[0054] Referring to FIG. 1, a software update device (100) may include a table generation module (102), an update check module (104), and an update execution module (106). The software update device (100) may be a device for performing software updates. The software update device (100) may be provided within a computing device equipped with software. The software update device (100) may include one or more memories.

[0055] The table generation module (102) can generate a reference table for the software to be updated. The reference table may be stored by mapping the identification information of each function and global variable constituting the software with the address values ​​actually stored in the memory of the functions and global variables. The table generation module (102) can extract each function and each global variable constituting the software, and map the identification information of the extracted functions and global variables with the address values ​​actually stored in the memory of the functions and global variables to generate a reference table. The table generation module (102) can load the reference table into the memory.

[0056] In the disclosed embodiment, indirect memory references are made to software functions or global variables through a reference table. That is, while software typically makes direct memory references when calling functions or global variables, in the disclosed embodiment, indirect memory references are made through a reference table.

[0057] Figure 2 is a diagram illustrating a conventional direct memory reference and an indirect memory reference according to the disclosed embodiment. Referring to Figure 2, conventionally, when a function or global variable of software calls another function or global variable, the location in memory where the function or global variable is stored is directly referenced (Figure 2 (a)).

[0058] On the other hand, in the disclosed embodiment, when a function or global variable of software calls another function or global variable, an indirect reference is made by going through a process of checking the actual stored address value of the corresponding function or global variable in a reference table of memory.

[0059] The update check module (104) can check whether a software update event has occurred. The update check module (104) can be connected to an external server (not shown) that manages software updates. The update check module (104) can check whether an update event has occurred from the external server.

[0060] When an update event occurs, the update verification module (104) can check what the update component is (check the type of component). That is, the update verification module (104) can check whether the update component is a function or a global variable. After checking the type of the update component, the update verification module (104) can check the type of update content (e.g., internal change or external change).

[0061] In one embodiment, the update verification module (104) can determine whether the update is an internal or external change to the function, if the update component is a function. Here, an internal change to the function may refer to a case where only the instructions within the function are changed. Additionally, an external change to the function may refer to a case where a new function is added or the interface is changed.

[0062] In one embodiment, the update verification module (104) can determine whether the update content is an internal or external change to the global variable, if the update component is a global variable. Here, an internal change to the global variable may refer to a case where only the value of the global variable is changed. Additionally, an external change to the global variable may refer to a case where a new global variable is added or the type of the global variable is changed.

[0063] The update execution module (106) can perform software updates based on the information confirmed by the update confirmation module (104). The update execution module (106) can perform software updates based on the type of update component and the type of update content.

[0064] Specifically, if the type of the update component is a function and the type of the update content is an internal change of the function, the update execution module (106) can load the updated function (i.e., hotpatched function) into memory and change the address of the function in the reference table of the software from the existing address (i.e., the address of the function before update) to the address of the updated function.

[0065] FIG. 3 is a diagram schematically illustrating an update execution state when the type of the update component is a function and the type of the update content is an internal change of the function in one embodiment of the present invention. Referring to FIG. 3, when Function 3 (Func3) in the software is updated with an internal change, the update execution module (106) loads the updated function (i.e., hotpatched function) into memory (①) and can change the address of Function 3 (Func3) in the reference table to the address of the updated memory (②). At this time, the updated function may be loaded into a different area of ​​memory than the existing function.

[0066] FIG. 4 is a diagram illustrating a state in which an internally changed function is called in one embodiment of the present invention. Referring to FIG. 4, when function 1 (Func1) calls function 3 (Func3) in software, function 1 (Func1) can check the changed address value of function 3 (Func3) in the reference table and call the updated function 3 (Func3_hopatched).

[0067] Here, the storage area (address) of function 3 (Func3_legacy) before the update was the text area of ​​the memory, but after the update, it can be loaded into a different area of ​​memory, and accordingly, the address of function 3 (Func3) in the reference table is changed to the address of the updated memory.

[0068] Meanwhile, even if the type of the update component is a global variable and the type of the update content is an internal change of the global variable (e.g., a change in the value of the global variable), the update can be performed in the same or similar manner as an internal change of the function. That is, the update execution module (106) can load the updated global variable into memory and change the address of the corresponding global variable in the software's reference table from the existing address to the address of the updated global variable.

[0069] In addition, since the type of the update component is a function and the type of the update content is an external change of the function, a problem may occur in the dependency between functions, the update execution module (106) may load the updated function (i.e., the hotpatched function) into memory and add an entry for the updated function (function identification information and the address value actually stored in the function's memory) to the reference table of the software.

[0070] FIG. 5 is a diagram schematically illustrating an update execution state when the type of the update component is a function and the type of the update content is an external change of the function in one embodiment of the present invention. Referring to FIG. 5, when Function 3 (Func3) in the software is updated with an external change, the update execution module (106) loads the updated function (i.e., hotpatched function) into memory (①) and can add an entry for the updated Function 3 (Func3') in the reference table (②). At this time, the updated function may be loaded into a different area of ​​memory than the existing function.

[0071] Figure 6 is a diagram illustrating a state in which an externally modified function is called in one embodiment of the present invention. Here, the example illustrates a case in which function 1 (Func1) calls function 3 (Func3), and a case in which function 3 (Func3) is externally modified (e.g., an interface change).

[0072] Referring to Fig. 6, if function 3 (Func3) is externally changed, function 1 (Func1) that calls the externally changed function 3 (Func3) must also be updated accordingly. At this time, the updated function 1 (Func1_hotpatched) can be loaded into a certain area of ​​memory. Here, if the updated function 1 (Func1_hotpatched) calls the externally changed function 3 (Func1_hotpatched), the entry of the newly added externally changed function 3 (Func3') can be found in the reference table, its address value can be checked, and then the externally changed function 3 (Func1_hotpatched) can be called. If the existing version of function 1 (Func1_legacy) calls function 3, the entry for the existing version of function 3 (Func3) can be found in the reference table, its address value can be checked, and then the existing version of function 3 (Func3_legacy) can be called.

[0073] Meanwhile, even if the type of the update component is a global variable and the type of the update content is an external change of the global variable (e.g., a change in the type of the global variable or the addition of a new global variable), the update can be performed in the same or similar manner as an external change of the function. That is, the update execution module (106) can load the updated global variable into memory and add an entry for the updated global variable in the software's reference table.

[0074] The update execution module (106) can check whether a thread (user command thread) is being executed according to a user's command on a computing device when updating software. The update execution module (106) can set priorities between threads generated by software updates and user command threads. In this case, the update execution module (106) can set different priorities for the user command threads depending on the type of thread generated by software updates.

[0075] Specifically, when loading an updated function or global variable into memory, the update execution module (106) can check whether there is a user command thread, and if there is a user command thread, set the priority of the thread loading the updated function or global variable into memory to be lower than the priority of the user command thread.

[0076] In addition, when the update execution module (106) needs to change the reference table in memory due to an update of a function or global variable, the priority of the reference table change thread can be set higher than the priority of the user command thread. In other words, the reference table change can be executed with priority over the user command thread even if it exists.

[0077] According to the disclosed embodiment, software updates can be performed in real time without affecting ongoing services by utilizing a reference table that stores the addresses of each software function and global variable. This enables continuous software service provision in real-time systems, such as power plants and the Internet of Things (IoT), where service interruption is difficult.

[0078] As used herein, the term "module" may refer to a functional and structural combination of hardware for implementing the technical concepts of the present invention and software for operating the hardware. For example, the term "module" may refer to a logical unit of a given code and hardware resources for executing the given code, and does not necessarily refer to physically connected code or a single type of hardware.

[0079] Figure 7 is a flowchart illustrating a software update method according to one embodiment of the present invention. While the illustrated flowchart divides the method into multiple steps, at least some of the steps may be performed in a different order, combined with other steps and performed together, omitted, divided into substeps, or performed with one or more additional steps not illustrated.

[0080] Referring to FIG. 7, the software update device (100) can generate a reference table for the software to be updated (S 101). The software update device (100) can extract each function and each global variable constituting the software, and map the identification information of the extracted functions and global variables to the address values ​​where the functions and global variables are actually stored in memory to generate a reference table.

[0081] Next, the software update device (100) can check whether a software update event has occurred (S 103), and if an update event has occurred, can check the component type and update content type of the update (S 105). Next, the software update device (100) can perform an update using a reference table according to the component type and update content type of the confirmed update (S 107).

[0082] FIG. 8 is a block diagram illustrating a computing environment (10) including a computing device suitable for use in exemplary embodiments. In the illustrated embodiment, each component may have different functions and capabilities other than those described below, and may include additional components other than those described below.

[0083] The illustrated computing environment (10) includes a computing device (12). In one embodiment, the computing device (12) may be a software update device (100).

[0084] A computing device (12) includes at least one processor (14), a computer-readable storage medium (16), and a communication bus (18). The processor (14) may cause the computing device (12) to operate according to the exemplary embodiments mentioned above. For example, the processor (14) may execute one or more programs stored in the computer-readable storage medium (16). The one or more programs may include one or more computer-executable instructions, which, when executed by the processor (14), may be configured to cause the computing device (12) to perform operations according to the exemplary embodiments.

[0085] A computer-readable storage medium (16) is configured to store computer-executable instructions or program code, program data, and / or other suitable forms of information. A program (20) stored in the computer-readable storage medium (16) includes a set of instructions executable by the processor (14). In one embodiment, the computer-readable storage medium (16) may be a memory (volatile memory such as random access memory, non-volatile memory, or a suitable combination thereof), one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, any other form of storage medium that can be accessed by the computing device (12) and store desired information, or a suitable combination thereof.

[0086] A communication bus (18) interconnects various other components of the computing device (12), including the processor (14) and computer-readable storage media (16).

[0087] The computing device (12) may also include one or more input / output interfaces (22) that provide interfaces for one or more input / output devices (24) and one or more network communication interfaces (26). The input / output interfaces (22) and the network communication interfaces (26) are connected to the communication bus (18). The input / output devices (24) may be connected to other components of the computing device (12) via the input / output interfaces (22). Exemplary input / output devices (24) may include input devices such as pointing devices (such as a mouse or a trackpad), a keyboard, a touch input device (such as a touchpad or a touchscreen), a voice or sound input device, various types of sensor devices and / or photographing devices, and / or output devices such as display devices, printers, speakers and / or network cards. The exemplary input / output devices (24) may be included within the computing device (12) as a component constituting the computing device (12), or may be connected to the computing device (12) as a separate device distinct from the computing device (12).

[0088] While representative embodiments of the present invention have been described in detail above, those skilled in the art will appreciate that various modifications to the above-described embodiments are possible without departing from the scope of the present invention. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be defined not only by the claims set forth below but also by equivalents thereof.

Claims

1. One or more processors, and A software update device having a memory that stores one or more programs executed by one or more processors, A table generation module that creates a reference table for the software to be updated; An update check module that checks whether an update event of the above software occurs, and if the update event occurs, checks at least one of the component type of the update and the content type of the update; and A software update device comprising an update performing module that performs an update of the software according to at least one of the component types and content types of the confirmed update based on the reference table.

2. In claim 1, The above table creation module, A software update device that extracts each function and global variable constituting the above software, and creates a reference table by mapping the identification information of the extracted functions and global variables with the addresses where the functions and global variables are stored in memory.

3. In claim 2, The above update check module, A software update device that, when the above update event occurs, checks whether the component type of the above update is a function or a global variable, and checks whether the content type of the above update is an internal change or an external change.

4. In claim 3, An internal change of the above function is when only the instructions inside the function are changed. An external change to the above function is a software update device, where a new function is added or the interface of the function is changed.

5. In claim 4, The above update execution module is, If the above update event is an internal change of the above function, the updated function is loaded into memory, and the address of the corresponding function in the reference table is changed to the address of the updated function. A software update device that loads the updated function into memory and adds an entry for the updated function in the reference table when the above update event is an external change to the above function.

6. In claim 3, The internal change of the above global variable is when only the value of the global variable changes. An external change to the above global variable is a software update device in which a new global variable is added or the type of a global variable is changed.

7. In claim 6, The above update execution module is, If the above update event is an internal change of the global variable, the updated global variable is loaded into memory, and the address of the global variable in the reference table is changed to the address of the updated global variable. A software update device that loads the updated global variable into memory and adds an entry for the updated global variable in the reference table when the above update event is an external change of the global variable.

8. In claim 3, The above update execution module is, A software update device that performs a thread that loads an updated function or global variable into memory and a thread that changes the reference table according to the type of component and type of content of the above-mentioned confirmed update, and sets a priority between the thread generated according to the above-mentioned update and the user command thread.

9. In claim 8, The above update execution module is, A software update device in which a thread that loads the above function or global variable into memory is set to have a lower priority than the user command thread, and a thread that changes the reference table is set to have a higher priority than the user command thread.

10. One or more processors, and A method performed on a computing device having a memory storing one or more programs executed by one or more processors, A step of creating a reference table for the software to be updated; A step of checking whether an update event of the above software occurs, and if the update event occurs, checking at least one of the component type of the update and the content type of the update; and A software update method, comprising a step of performing an update of the software according to at least one of the component type and content type of the confirmed update based on the reference table.

11. In claim 10, The steps for creating the above reference table are: A step of extracting each function and global variable that constitutes the above software; and A software update method, comprising a step of creating a reference table by mapping identification information of the extracted functions and global variables to addresses where the functions and global variables are stored in memory.

12. In claim 11, The above verification steps are: When the above update event occurs, a step of checking whether the component type of the above update is a function or a global variable; and A software update method, comprising a step of checking whether the content type of the above update is an internal change or an external change.

13. In claim 12, An internal change of the above function is when only the instructions inside the function are changed. A method for software update in which external changes to the above function are made, such as when a new function is added or the interface of the function is changed.

14. In claim 13, The steps to perform the above update are: If the above update event is an internal change of the function, a step of loading the updated function into memory and changing the address of the corresponding function in the reference table to the address of the updated function; and A software update method, comprising the steps of loading the updated function into memory and adding an entry for the updated function in the reference table when the update event is an external change of the function.

15. In claim 12, The internal change of the above global variable is when only the value of the global variable changes. A software update method in which an external change to the above global variable occurs when a new global variable is added or the type of the global variable is changed.

16. In claim 15, The steps to perform the above update are: If the above update event is an internal change of the global variable, a step of loading the updated global variable into memory and changing the address of the corresponding global variable in the reference table to the address of the updated global variable; and A software update method, comprising the steps of loading the updated global variable into memory and adding an entry for the updated global variable in the reference table when the above update event is an external change of the global variable.

17. In claim 12, The steps to perform the above update are: A software update method, which further includes a step of setting priorities between a thread generated according to the update and a user command thread, performing a thread that loads an updated function or global variable into memory and a thread that changes the reference table according to the component type and content type of the confirmed update.

18. In claim 17, The steps to set the above priorities are: A software update method in which a thread that loads the above function or global variable into memory is set to have a lower priority than the user command thread, and a thread that changes the reference table is set to have a higher priority than the user command thread.

19. A computer program stored in a non-transitory computer readable storage medium, The computer program includes one or more instructions, which, when executed by a computing device having one or more processors, cause the computing device to: A step of creating a reference table for the software to be updated; A step of checking whether an update event of the above software occurs, and if the update event occurs, checking at least one of the component type of the update and the content type of the update; and A computer program that causes the software to be updated based on at least one of the component types and content types of the confirmed update based on the reference table.

Citation Information

Patent Citations

  • Information processor

    JP2002149421A

  • Program Analysis Method Based on Cluster and Apparatus Therefor

    KR101656358B1

  • electronic apparatus and program update method ofthereof

    KR1020060015969A

  • Software caching with bounded-error delayed update

    KR1020070052335A

  • Control apparatus and program updating method

    US20190384590A1