Software updating method, electronic equipment and nonvolatile storage medium
By using a controller on the server to create and write updated data in memory, the problem of the database management system being unable to update online was solved, enabling a non-disruptive upgrade process and reducing the impact on business applications.
Patent Information
- Application Number
- CN202511491889.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies cannot update and upgrade database management systems without shutting down the server, resulting in significant impact on business applications.
The host sends the data structure update task of the database management system to the first controller, which creates the data structure in the memory and writes the updated data. The host accesses the updated data structure to upgrade the database management system, avoiding direct changes to the host-side data structure.
It enables database management system updates and upgrades without downtime, reducing the impact on server business applications.
Smart Images

Figure CN121326375A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and in particular to a software update method, an electronic device, and a non-volatile storage medium. Background Technology
[0002] During server system operation, system software updates are often required to fix software vulnerabilities, add new features, or optimize performance. To achieve non-downtime updates, related technologies have proposed hot update schemes based on differential upgrades, which can perform online updates of system software based on differential files while the server is running. However, updates to the server's database management system often involve updating the data structure, and database management systems do not allow online changes to the data structure.
[0003] How to update and upgrade a database management system without shutting down the server is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] This invention provides a software update method, an electronic device, and a non-volatile storage medium to at least solve the problem in related technologies that database management systems cannot be updated and upgraded without shutting down the server.
[0005] This invention provides a software update method applied to a first controller, comprising: Receive data structure update tasks from the database management system of the host device; Determine the data structure update type and the first update data corresponding to the data structure update task; According to the data structure update type, a first data structure is created at a first address in the first memory, and the first updated data is written into the first data structure. The information of the first address is sent to the host so that the host can access the first data structure based on the first address, and the local database management system and the first data structure are used as the updated database management system.
[0006] This invention also provides a software update method, applied to a host computer, comprising: In response to the data structure update task of the database management system of the host, the data structure update task is sent to the first controller of the device, so that the first controller determines the data structure update type and the first update data corresponding to the data structure update task, creates a first data structure at a first address of the first memory according to the data structure update type, and writes the first update data into the first data structure. Receive information about the first address sent by the first controller; The information at the first address is updated in the database management system, and the local database management system and the first data structure are used as the updated database management system.
[0007] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described software update methods when executing the computer program.
[0008] The present invention also provides a non-volatile storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described software update methods.
[0009] Through this invention, the host device sends the data structure update task of the database management system to the first controller. The first controller, based on the data structure update type and the first update data corresponding to the data structure update task, creates a first data structure at a first address in the first memory according to the data structure update type, writes the first update data into the first data structure, and sends the information of the first address to the host, so that the host can access the first data structure based on the first address. The updated database management system is based on the local database management system and the first data structure. Without changing the data structure of the database management system stored on the host side, the update and upgrade of the database management system for the upper-layer software is achieved. This solves the problem in related technologies that the database management system cannot be updated and upgraded without shutting down the server, and reduces the impact of database management system updates and upgrades on server business applications. Attached Figure Description
[0010] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the 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.
[0011] Figure 1 A flowchart of a software update method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a software update system provided in an embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0013] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0014] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] Here, we will first explain some key terms used in the embodiments of the present invention.
[0016] A server-side Database Management System (DBMS) is a software system that runs on a server and is used to manage and maintain databases, including their storage, retrieval, updates, and security. For example, it can be used to store user information, order information, and financial data. A DBMS stores data in a structured manner on the server and provides efficient storage and retrieval mechanisms. Common DBMSs include open-source relational database management systems (MySQL), open-source object-relational database systems (PostgreSQL), relational database management systems (Oracle Database), and open-source non-relational databases (MongoDB).
[0017] To achieve non-downtime updates of system software running on servers, related technologies have proposed hot update technology based on differential upgrades. The main method involves comparing the old and new versions of the software to generate a differential file. This differential file is then transferred to the device to be updated and applied to the old version of the software, achieving a non-downtime update. However, for database management systems (DBMS), updates often involve changes to data structures, and the nature of DBMS does not allow online data structure changes. This necessitates downtime for current server-side DBMS updates and upgrades.
[0018] To enable database management system (DBMS) updates and upgrades without server downtime, the software update scheme provided in this embodiment of the invention sends a data structure update task of the DBMS to a first controller via the device host. The first controller, based on the data structure update type corresponding to the data structure update task and the first update data, creates a first data structure at a first address in the first memory according to the data structure update type, writes the first update data into the first data structure, and sends the information of the first address to the host, enabling the host to access the first data structure based on the first address. The updated DBMS is then based on the local DBMS and the first data structure. This achieves DBMS updates and upgrades for the upper-layer software without altering the data structure of the DBMS stored on the host side. This solves the problem in related technologies where DBMS updates and upgrades cannot be performed without server downtime, and reduces the impact of DBMS updates and upgrades on server business applications.
[0019] The embodiments of the present invention provide a software update method. The method is described in detail below in conjunction with the execution flow of the software update method.
[0020] Figure 1 A flowchart of a software update method provided in an embodiment of the present invention.
[0021] Applied to the first controller, the software update method provided in this embodiment of the invention can be as follows: Figure 1 S101~S104 are shown.
[0022] S101: Receives data structure update tasks from the database management system of the host device.
[0023] In this embodiment of the invention, the device may refer to a server or other computer device running a database management system.
[0024] The host can refer to the central processing unit (CPU).
[0025] The first controller can be a baseboard management controller (BMC). In devices such as servers, the baseboard management controller (BMC) provides out-of-band management and monitoring functions. The baseboard management controller is typically installed on the motherboard or the motherboard of the monitored device, and uses, but is not limited to, the Intelligent Platform Management Interface (IPMI) protocol to monitor the status of the hardware in the server by monitoring sensors in the server system.
[0026] If a baseboard management controller is used as the first controller, the baseboard management controller can employ an ARM processor and run an operating system for out-of-band management, such as Linux. In some alternative embodiments, the baseboard management controller can run multiple operating systems, such as Linux and a real-time operating system (RTOS) based on different core processors. Therefore, the software update method for the first controller provided in this embodiment can be applied to a Linux system, and in some alternative embodiments, it can also be applied to an RTOS or both.
[0027] In some alternative embodiments of the present invention, the first controller may also be other types of controllers, such as programmable controllers, such as field programmable gate arrays (FPGAs).
[0028] To address the issue that the data structure of a database management system cannot be modified online, this embodiment of the invention employs a collaborative approach between a first controller and a host to perform updates to the database update system.
[0029] In this embodiment of the invention, a differential upgrade update method can be adopted. A differential algorithm is used to compare the old version of the database management system and the new version of the database management system and generate a differential file. The algorithm compares the contents of the old version and the new version of the software byte by byte or block by block, finds the different parts, and encodes and compresses them according to a certain format to form a differential file, recording the changed blocks and their offsets, new data and other information.
[0030] In this embodiment of the invention, the step of generating the differential file can be performed by the host or by another device and sending the differential file to the host. When the host determines that it is a data structure update task, it sends the data structure update task to the first controller for execution.
[0031] In some optional embodiments of the present invention, when the host determines that the update type of the database management system is a data structure update based on the differential file, the host may send the data structure update task to the first controller for execution.
[0032] In some alternative embodiments of the present invention, the host may run a thread for monitoring software update tasks, the first controller may monitor the thread, and when a data structure update task for the database management system is detected, the first controller may execute the data structure update task.
[0033] Specifically, the host can run a database software update module, which is used by the host to execute update tasks of the database management system. This software module can maintain a task information table containing information about the update tasks of the database management system. The first controller can access the task information table through the bus to obtain information about the data structure update tasks.
[0034] S102: Determine the data structure update type and the first update data corresponding to the data structure update task.
[0035] The first controller parses the information of the data structure update task to determine the data structure update type and the first update data. In this embodiment of the invention, the data structure update type sent by the host to the first controller for execution may include at least one of the following: adding data structures (such as adding rows or columns), deleting data structures (such as deleting rows or columns), changing the definition of data structures (such as changing column definitions or row definitions), creating or deleting indexes, creating or modifying views, and schema reconstruction (such as splitting table entries, merging table entries, restructuring or splitting columns, moving data from one table to another, etc.).
[0036] The first update data can be the corresponding data that needs to be replaced in the database management system, or data that describes how the corresponding data in the database management system is updated.
[0037] S103: Based on the data structure update type, create a first data structure at the first address of the first memory, and write the first update data into the first data structure.
[0038] The first memory can be the memory of the first controller or a non-volatile storage device. Space for storing the first data structure is pre-allocated in the first memory. When the data structure needs to be updated, a first address is determined in the first space and the first data structure is created at the first address. The first data structure is then written based on the first updated data.
[0039] Taking the data structure update type as adding a data structure as an example, determining the data structure update type and the first update data corresponding to the data structure update task in S102 can include: if the data structure update type is adding a data structure, then determining the data structure to be added corresponding to the data structure update task and the first update data in the data structure to be added. In S103, creating a first data structure at a first address in the first memory according to the data structure update type and writing the first update data into the first data structure can include: creating the data structure to be added as the first data structure at the first address and writing the first update data into the first data structure. In related technologies, when it is necessary to add rows or columns to the database of a database management system, online addition is often not possible due to database attributes. However, in this embodiment of the invention, the first controller can be used to create the rows or columns to be added as a first data structure, and the information of the first address of the first data structure can be sent to the host, so that the first data structure serves as a supplement to the corresponding original data structure, realizing the online addition of the data structure of the database management system from the host's perspective.
[0040] The software update method provided in this embodiment of the invention may further include: if the data structure update type is adding a data structure, then recording the first database interface corresponding to the data structure update task and the second target address of the original data structure corresponding to the data structure update task; when the device is detected to be in a preset state, accessing the second target address based on the first database interface, and updating the original data structure of the second target address based on the first data structure; wherein, the preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state. That is to say, when the device is shut down, restarted, or idle, the first controller can perform the addition operation on the data structure to be added, merging the first data structure into the database management system on the host side.
[0041] Taking a data structure update type of deleting a data structure as an example, determining the data structure update type and the first update data corresponding to the data structure update task in S102 may include: if the data structure update type is deleting a data structure, then recording the second database interface corresponding to the data structure update task and the third target address of the data structure to be deleted. The software update method provided in this embodiment may further include: when the device is detected to be in a preset state, accessing the third target address based on the second database interface and performing a deletion operation on the data structure to be deleted; wherein, the preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a business idle state. Similarly, in related technologies, it is also impossible to perform data structure deletion operations on the host's database management system online. However, in this embodiment, the first controller can record the information of the rows or columns to be deleted, and when the device is shut down, restarted, or idle, the first controller performs the deletion operation on the data structure to be deleted.
[0042] In some alternative embodiments of the present invention, the host may also record the information of the data structure to be deleted and perform the deletion operation on the data structure to be deleted when the device is in a preset state.
[0043] In addition, for other data structure update types, the first controller can also create a first data structure in the first memory to replace the original data structure in the database management system and write the first update data.
[0044] S104: Send the information of the first address to the host so that the host can access the first data structure based on the first address, and use the local database management system and the first data structure as the updated database management system.
[0045] In this embodiment of the invention, after the first controller completes the creation and addition of the first data structure in the first memory, it sends the address information of the first data structure to the host. Specifically, it can send it to the host's database management software, so that when other applications on the host access the database management system, the database management software provides the corresponding application with the address of the database management system (such as the one stored in the host's non-volatile memory) and the address of the first data structure, so that the application can access the updated database management system based on this.
[0046] Reconstructing data structures takes a considerable amount of time, and database management systems are typically configured to disallow online updates. However, the software update method provided in this invention allows for postponing the database structure reconstruction process, while the update of the database management system's data structure is already complete for the upper-layer software.
[0047] The software update method provided in this embodiment of the invention may further include: receiving a data update task for a database management system sent by a host; determining a third database interface corresponding to the data update task, a fourth target address of the original data structure corresponding to the data update task, and second update data corresponding to the data update task; accessing the fourth target address based on the third database interface, and updating the original data structure based on the second update data.
[0048] In addition to the data structure update task of the database management system performed by the first controller as described in the above embodiments, in this embodiment of the invention, the first controller can also perform data update tasks of the database management system that do not involve changes to the data structure, thereby further reducing the workload of the host and improving the smoothness of the host in executing business applications.
[0049] Figure 2 This is a schematic diagram of the structure of a software update system provided in an embodiment of the present invention.
[0050] Based on the above embodiments, this invention further describes a system implementation of an optional software update method. For example... Figure 2 As shown, the software update method provided in this embodiment of the invention is executed based on a host and a first controller. The software modules involved may include a database software update module, a server software update monitoring patch, a server shutdown monitoring patch, a first controller monitoring patch, and a first controller database update module.
[0051] The database software update module can employ differential hot update technology, using a differential algorithm to generate differential files. By comparing the contents of the old and new versions of the software byte-by-byte or block-by-block, the differences are identified, encoded, and compressed according to a specific format to form the differential file. It records information such as the changed blocks, their offsets, and new data.
[0052] The server software update monitoring patch receives database update files from the database software update module and provides detailed descriptions of database file changes for the server shutdown monitoring patch and the first controller monitoring patch. These detailed descriptions of database file changes can follow the structure shown in Table 1, using a description rule of database + table + column / row. Table 1
[0053] When a new row or column is added, the database management software will not directly operate on the corresponding database. Instead, it will operate on the server software update monitoring patch, which provides the database interface. The server software update monitoring patch will then translate the operation into corresponding commands and send them to the first controller monitoring patch via a high-speed interface.
[0054] The commands sent by the host to the first controller for the data structure update task can be shown in Table 2. Table 2
[0055] The server software update monitoring patch records deleted rows or columns and sends the record to the server shutdown monitoring patch when the server system is updated.
[0056] The server shutdown monitoring patch is used to receive and execute data structure deletion and data structure addition commands sent by the server software update monitoring patch and the first controller monitoring patch to the database management system.
[0057] The first controller monitoring patch is used to receive commands sent by the server software update monitoring patch and convert them into operation instructions for the first controller database update module; it also receives the server shutdown monitoring patch, operates the first controller database update module, and returns the stored database information (information at the first address).
[0058] The first controller database update module can be implemented in hardware, which uses a high-speed interface to receive instructions sent by the first controller monitoring patch and execute corresponding operations.
[0059] The software update system provided in this embodiment of the invention allows maintenance personnel to operate the database software update module to download and install the new version of the database management system and enable the new version of the software during the hot update phase. At the same time, the changes to the database files are updated in detail to the server software update monitoring patch.
[0060] For deleted columns / rows, the server software update monitoring patch caches the records and sends them to the server shutdown monitoring patch when the server system is updated.
[0061] For newly added columns / rows, the database management software does not directly operate on the corresponding database. Instead, it operates on the server software update monitoring patch, which provides the database interface. The server software update monitoring patch converts the operation into a corresponding command and sends it to the first controller monitoring patch via a high-speed interface. The first controller monitoring patch receives the command, parses it, converts it into an instruction from the first controller database update module, and sends it. The first controller database update module stores the data corresponding to the instruction at the appropriate address, completing the storage and operation of the column / row.
[0062] At this point, for the upper-layer software, the server has completed the hot update of the database management system's data structure and can perform subsequent operations based on the updated database management system.
[0063] During server shutdown or restart, the server shutdown monitoring patch detects a shutdown or restart command and, based on the cached database deletion instructions, executes the corresponding database deletion operation. Simultaneously, it sends a recovery operation instruction to the first controller monitoring patch, instructing the first controller to return the cached database information to the server. The first controller monitoring patch then updates each database table entry sequentially.
[0064] The structure of the update command for the database management system by the first controller monitoring patch can be shown in Table 3. Table 3
[0065] This invention also provides a software update method for a host, which may include: responding to a data structure update task from the host's database management system, sending the data structure update task to a first controller of the device, so that the first controller determines the data structure update type and first update data corresponding to the data structure update task; creating a first data structure at a first address in a first memory according to the data structure update type, and writing the first update data into the first data structure; receiving information about the first address sent by the first controller; updating the information about the first address to the database management system, using the local database management system and the first data structure as the updated database management system.
[0066] In this embodiment of the invention, sending the data structure update task to the first controller of the device may include: if the data structure update type is adding data structure, then sending the data structure update task to the first controller.
[0067] The software update method provided in this embodiment of the invention may further include: if the data structure update type is to delete a data structure, then recording the second database interface corresponding to the data structure update task and the third target address of the data structure to be deleted; when the device is detected to be in a preset state, accessing the third target address based on the second database interface and performing the deletion operation of the data structure to be deleted; wherein, the preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
[0068] The software update method applied to the host can refer to the software update method applied to the first controller described above.
[0069] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0070] Embodiments of the present invention also provide a software update apparatus, applied to a first controller, which may include: The first monitoring module is used to receive data structure update tasks from the database management system of the host on the device; determine the data structure update type and the first update data corresponding to the data structure update task; control the first update module to create the first data structure and send the information of the first address of the first data structure to the host, so that the host can access the first data structure based on the first address, and use the local database management system and the first data structure as the updated database management system. The first update module is used to create a first data structure at a first address in the first memory according to the data structure update type, and write the first update data into the first data structure.
[0071] In this embodiment of the invention, the monitoring module determines the data structure update type and the first update data corresponding to the data structure update task, which may include: if the data structure update type is to add a data structure, then determining the data structure to be added corresponding to the data structure update task and the first update data in the data structure to be added.
[0072] The first update module creates a first data structure at a first address in the first memory according to the data structure update type, and writes the first update data into the first data structure. This may include: creating a data structure to be added as the first data structure at the first address, and writing the first update data into the first data structure.
[0073] In this embodiment of the invention, the first monitoring module can also be used to record the first database interface corresponding to the data structure update task and the second target address of the original data structure corresponding to the data structure update task if the data structure update type is adding data structure; when the device is detected to be in a preset state, the module accesses the second target address based on the first database interface and updates the original data structure of the second target address based on the first data structure; wherein, the preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
[0074] In this embodiment of the invention, the first monitoring module determines the data structure update type and the first update data corresponding to the data structure update task. It may further include: if the data structure update type is to delete a data structure, recording the second database interface corresponding to the data structure update task and the third target address of the data structure to be deleted. The first monitoring module can also be used to access the third target address based on the second database interface and perform a deletion operation on the data structure to be deleted when the device is detected to be in a preset state; wherein the preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
[0075] In this embodiment of the invention, the first monitoring module can also be used to receive a data update task for the database management system sent by the host; determine the third database interface corresponding to the data update task, the fourth target address of the original data structure corresponding to the data update task, and the second update data corresponding to the data update task; and control the first update module to execute the data update task. The first update module can also be used to access the fourth target address based on the third database interface and update the original data structure based on the second update data.
[0076] This invention also provides a software update device applied to a host, which may include: a second monitoring module, configured to respond to a data structure update task of the host's database management system, send the data structure update task to a first controller of the device, so that the first controller determines the data structure update type and first update data corresponding to the data structure update task, create a first data structure at a first address in a first memory according to the data structure update type, and write the first update data into the first data structure; receive information of the first address sent by the first controller; update the information of the first address to the database management system, and use the local database management system and the first data structure as the updated database management system.
[0077] In this embodiment of the invention, the second monitoring module sends the data structure update task to the first controller of the device, which may include: if the data structure update type is adding data structure, then sending the data structure update task to the first controller.
[0078] In this embodiment of the invention, the software update device may further include a second update module; the second monitoring module may also be used to record the second database interface corresponding to the data structure update task and the third target address of the data structure to be deleted if the data structure update type is to delete the data structure; when the device is detected to be in a preset state, the second update module is controlled to access the third target address based on the second database interface and perform the deletion operation of the data structure to be deleted; wherein, the preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
[0079] For a description of the features in the embodiments corresponding to the software update device, please refer to the relevant descriptions in the embodiments corresponding to the software update method, which will not be repeated here.
[0080] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described software update method embodiments.
[0081] Embodiments of the present invention also provide a non-volatile storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described software update method embodiments when running.
[0082] In one exemplary embodiment, the aforementioned non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0083] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described software update method embodiments.
[0084] Embodiments of the present invention also provide another computer program product, including a non-volatile storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described software update method embodiments.
[0085] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0086] The software update method, electronic device, and non-volatile storage medium provided by this invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of this invention.
Claims
1. A software update method, characterized in that, Applied to the first controller, including: Receive data structure update tasks from the database management system of the host device; Determine the data structure update type and the first update data corresponding to the data structure update task; According to the data structure update type, a first data structure is created at a first address in the first memory, and the first updated data is written into the first data structure. The information of the first address is sent to the host so that the host can access the first data structure based on the first address, and the local database management system and the first data structure are used as the updated database management system.
2. The software update method according to claim 1, characterized in that, Determining the data structure update type and the first update data corresponding to the data structure update task includes: If the data structure update type is to add a data structure, then determine the data structure to be added corresponding to the data structure update task and the first updated data in the data structure to be added; According to the data structure update type, a first data structure is created at a first address in the first memory, and the first updated data is written into the first data structure, including: Create the data structure to be added at the first address as the first data structure, and write the first updated data into the first data structure.
3. The software update method according to claim 2, characterized in that, Also includes: If the data structure update type is to add a data structure, then record the first database interface corresponding to the data structure update task and the second target address of the original data structure corresponding to the data structure update task; When the device is detected to be in a preset state, the second target address is accessed based on the first database interface, and the original data structure of the second target address is updated based on the first data structure. The preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
4. The software update method according to claim 1, characterized in that, Determining the data structure update type and the first update data corresponding to the data structure update task includes: If the data structure update type is to delete a data structure, then record the second database interface corresponding to the data structure update task and the third target address of the data structure to be deleted; Software update methods also include: When the device is detected to be in a preset state, the third target address is accessed based on the second database interface and the deletion operation on the data structure to be deleted is performed. The preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
5. The software update method according to claim 1, characterized in that, Also includes: Receive data update tasks for the database management system sent by the host; Determine the third database interface corresponding to the data update task, the fourth target address of the original data structure corresponding to the data update task, and the second update data corresponding to the data update task; Access the fourth target address through the third database interface, and update the original data structure based on the second updated data.
6. A software update method, characterized in that, Applied to the host, including: In response to the data structure update task of the database management system of the host, the data structure update task is sent to the first controller of the device, so that the first controller determines the data structure update type and the first update data corresponding to the data structure update task, creates a first data structure at a first address of the first memory according to the data structure update type, and writes the first update data into the first data structure. Receive information about the first address sent by the first controller; The information at the first address is updated in the database management system, and the local database management system and the first data structure are used as the updated database management system.
7. The software update method according to claim 6, characterized in that, Sending the data structure update task to the first controller of the device includes: If the data structure update type is adding a data structure, then the data structure update task is sent to the first controller.
8. The software update method according to claim 6, characterized in that, Also includes: If the data structure update type is to delete a data structure, then record the second database interface corresponding to the data structure update task and the third target address of the data structure to be deleted; When the device is detected to be in a preset state, the third target address is accessed based on the second database interface and the deletion operation on the data structure to be deleted is performed. The preset state includes at least one of receiving a shutdown command, receiving a restart command, and the host entering a service idle state.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the software update method applied to a first controller as described in any one of claims 1 to 5, or the steps of the software update method applied to a host as described in any one of claims 6 to 8, when executing the computer program.
10. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the software update method applied to the first controller as described in any one of claims 1 to 5, or the steps of the software update method applied to the host as described in any one of claims 6 to 8.
