A system data saving method, device, equipment and storage medium
By pre-dividing storage subspaces in the server and utilizing multiple data saving threads for parallel processing, the problem of low data saving efficiency under server bursts is solved, achieving fast and efficient data saving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2022-06-30
- Publication Date
- 2026-07-03
Smart Images

Figure CN115129515B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and in particular to a system data storage method, a system data storage device, a system data storage equipment, and a computer-readable storage medium. Background Technology
[0002] During system operation, servers may encounter scenarios such as power outages, sudden business interruptions, and machine crashes. In such cases, it is necessary to perform emergency data saving of critical process context data and IO stream cache data.
[0003] When the aforementioned failure scenario occurs during the normal operation of the current server / storage server, the data protection mechanism is triggered to urgently save user data in the current I / O stack. However, due to limitations in hard drive performance, CPU single-core performance, the number of physical hard drives, internal bus transmission rate, and the energy storage limitations of the BBU (Battery Backup Unit), the amount of critical data that can be saved is limited. Therefore, how to provide an efficient method for emergency data saving when the server encounters an anomaly is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a system data storage method that can quickly save data when the system encounters an emergency; another purpose of this invention is to provide a system data storage device, a system data storage equipment, and a computer-readable storage medium that can quickly save data when the system encounters an emergency.
[0005] To solve the above-mentioned technical problems, the present invention provides a system data storage method, comprising:
[0006] Obtain emergency save command;
[0007] According to the emergency save instruction, the corresponding data save thread is called through the pre-defined CPU core for emergency data save, and the data in the corresponding storage subspace is read; the CPU core corresponds to the data save thread, and multiple data save threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspace corresponds to the CPU core.
[0008] The data is saved in the corresponding storage subspace through the data saving thread.
[0009] Optionally, the step of calling the corresponding data saving thread through a pre-defined CPU core for emergency data saving according to the emergency save instruction, and reading the data in the corresponding storage subspace, includes:
[0010] Multiple data saving threads are created according to the emergency save instruction;
[0011] The corresponding data storage thread is invoked by the pre-defined CPU core used for emergency data storage to read the data in the corresponding storage subspace.
[0012] Optionally, the step of calling the corresponding data storage thread through a pre-defined CPU core for emergency data storage to read data from the corresponding storage subspace includes:
[0013] The corresponding data storage thread is invoked by calling the pre-standardized CPU core used for emergency data storage, and the corresponding storage subspace is determined according to the identification information of the corresponding CPU core recorded in the page description table in the storage space.
[0014] The data saving thread is invoked to read the data of the data block corresponding to the tag identifier recorded in the block description table in the corresponding storage subspace; the tag identifier is a tag identifier added to the block description table when writing data to the data block.
[0015] Optionally, saving the data in the corresponding storage subspace through the data saving thread includes:
[0016] The data saving thread generates a file header based on the index information of the data and writes it into a preset file for saving data.
[0017] The data is compressed by the data saving thread, and the compressed data is written to the file.
[0018] Optionally, the step of generating a file header based on the index information of the data through the data saving thread and writing it to a preset file for saving data includes:
[0019] The data storage thread generates a file with a pre-defined header and writes it into the file containing the pre-defined data, based on the CPU core number corresponding to the data, the pre-defined header information, and the page description table information.
[0020] Optionally, after saving the data in the corresponding storage subspace through the data saving thread, the method further includes:
[0021] Obtain recovery instructions;
[0022] The data recovery thread is invoked according to the recovery command to restore the saved data to a preset location.
[0023] Optionally, the saved data includes a check bit corresponding to the data;
[0024] After invoking the data recovery thread according to the recovery instruction to restore the saved data to the preset location, the method further includes:
[0025] The data is verified based on the check bit.
[0026] The present invention also provides a system data storage device, comprising:
[0027] The save instruction module is used to obtain emergency save instructions;
[0028] The data reading module is used to read data in the corresponding storage subspace by calling the corresponding data saving thread through the pre-defined CPU core for emergency data saving according to the emergency save instruction; the CPU core corresponds to the data saving thread, and multiple data saving threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspace corresponds to the CPU core.
[0029] The data storage module is used to save the data in the corresponding storage subspace through the data storage thread.
[0030] The present invention also provides a system data storage device, comprising:
[0031] Memory, used to store computer programs;
[0032] A processor for executing the computer program to implement the steps of the system data storage method as described in any of the preceding claims.
[0033] The present invention also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of the system data storage method as described in any of the preceding claims.
[0034] The present invention provides a system data storage method, comprising: obtaining an emergency storage instruction; according to the emergency storage instruction, calling the corresponding data storage thread through a pre-defined CPU core for emergency data storage, and reading data in the corresponding storage subspace; the CPU core corresponds to the data storage thread, and multiple data storage threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspaces correspond to the CPU cores; and the data in the corresponding storage subspace is stored through the data storage thread.
[0035] By pre-defining pre-standardized CPU cores for emergency data saving in the storage space, when an emergency save command is generated in the event of an emergency, the CPU core controls the data saving thread to save the data in the corresponding storage subspace. By saving the data in the corresponding storage subspace in parallel by multiple data saving threads, the data processing speed can be greatly accelerated when emergency data saving is required, and data can be saved quickly when the system encounters an emergency.
[0036] The present invention also provides a system data storage device, a system data storage equipment, and a computer-readable storage medium, which have the same beneficial effects as described above, and will not be described in detail here. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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.
[0038] Figure 1 A flowchart illustrating a system data storage method provided in an embodiment of the present invention;
[0039] Figure 2 A flowchart illustrating a specific system data storage method provided in an embodiment of the present invention;
[0040] Figure 3 This is a structural block diagram of a system data storage device provided in an embodiment of the present invention;
[0041] Figure 4 This is a structural block diagram of a system data storage device provided in an embodiment of the present invention. Detailed Implementation
[0042] The core of this invention is to provide a system data storage method. In existing technologies, the amount of critical data that can be saved in the event of an emergency is limited.
[0043] The system data storage method provided by the present invention includes: obtaining an emergency storage instruction; according to the emergency storage instruction, calling the corresponding data storage thread through a pre-defined CPU core for emergency data storage, and reading the data in the corresponding storage subspace; the CPU core corresponds to the data storage thread, and multiple data storage threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspaces correspond to the CPU cores; and the data in the corresponding storage subspace is stored through the data storage thread.
[0044] By pre-defining pre-standardized CPU cores for emergency data saving in the storage space, when an emergency save command is generated in the event of an emergency, the CPU core controls the data saving thread to save the data in the corresponding storage subspace. By saving the data in the corresponding storage subspace in parallel by multiple data saving threads, the data processing speed can be greatly accelerated when emergency data saving is required, and data can be saved quickly when the system encounters an emergency.
[0045] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely 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 are within the scope of protection of the present invention.
[0046] Please refer to Figure 1 , Figure 1 This is a flowchart of a system data storage method provided in an embodiment of the present invention.
[0047] See Figure 1 In this embodiment of the invention, the system data storage method includes:
[0048] S101: Obtain emergency save command.
[0049] When the system encounters scenarios such as power outages, sudden business interruptions, or machine crashes, it will first trigger an emergency save command. This step will retrieve this emergency save command for subsequent steps. The specific content of the emergency save command can be set according to the actual situation and is not specifically limited here.
[0050] S102: Based on the emergency save instruction, the corresponding data save thread is invoked through the pre-defined CPU core used for emergency data save to read the data in the corresponding storage subspace.
[0051] In this embodiment of the invention, the CPU core corresponds to the data storage thread, and multiple data storage threads are invoked. The storage space is pre-divided into multiple storage subspaces based on the number of CPU cores, and each storage subspace corresponds to a CPU core. Prior to this step, the storage space typically needs to be divided during system initialization. Specifically, a pre-defined set of CPU cores for emergency data storage needs to be determined. Then, the number of storage subspaces to be allocated is determined based on the number of these pre-defined CPU cores. Typically, the number of allocated storage subspaces needs to be the same as the number of pre-defined CPU cores, and each storage subspace needs to correspond one-to-one with a pre-defined CPU core. Of course, in this embodiment of the invention, it is only necessary to ensure a correspondence between the storage subspaces and the CPU cores.
[0052] In this step, upon receiving an emergency save command, the current service is first interrupted, and the pre-defined CPU core for emergency data saving is activated. This CPU core then calls the corresponding data saving thread, and multiple data saving threads are invoked. In this embodiment of the invention, the data saving thread and the pre-defined CPU core have a corresponding relationship. At this time, the data saving thread, through the CPU core, establishes a correspondence with the storage subspace. In this step, the data saving thread specifically reads the data within the corresponding storage subspace. Since different data saving threads can be invoked through different CPU cores, different data saving threads are used to process data in parallel, thereby achieving parallel reading of data stored in multiple areas of the storage space.
[0053] Specifically, this step may include: creating multiple data saving threads according to the emergency save instruction; calling the corresponding data saving thread through the pre-defined CPU core for emergency data saving, and reading the data in the corresponding storage subspace.
[0054] Upon receiving the emergency save command, multiple data save threads are first created. Specifically, the number of data save threads is determined based on a pre-defined number of CPU cores designated for emergency data save, and each created data save thread is bound to its corresponding CPU core. Then, the pre-defined CPU cores designated for emergency data save call the corresponding data save threads to read data from the corresponding storage subspace. The specific details have been described in detail in the above embodiments and will not be repeated here.
[0055] S103: Save the data in the corresponding storage subspace through the data saving thread.
[0056] In this step, the data in the corresponding storage subspace is urgently saved through a data saving thread, thereby achieving parallel and rapid saving of data in the storage space to cope with emergencies. The specific process of emergency data saving will be described in detail in the following embodiments of the invention, and will not be repeated here.
[0057] The system data storage method provided in this embodiment of the invention establishes a storage subspace in the storage space corresponding to the pre-defined CPU core for emergency data storage. When an emergency storage command is generated in the event of an emergency, the CPU core controls the data storage thread to save the data in the corresponding storage subspace. By saving the data in the corresponding storage subspace in parallel by multiple data storage threads, the data processing speed can be greatly accelerated when emergency data storage is required, and data can be quickly saved when the system encounters an emergency.
[0058] The specific details of the system data storage method provided by this invention will be described in detail in the following embodiments.
[0059] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a specific system data storage method provided in an embodiment of the present invention.
[0060] See Figure 2 In this embodiment of the invention, the system data storage method includes:
[0061] S201: Obtain emergency save command.
[0062] The system typically requires a health monitoring module to monitor the current operating system status. In the event of a failure scenario that could lead to user data loss, service interruption, or machine crashes, an emergency data saving mechanism is triggered, i.e., an emergency save command is issued. Once the device returns to normal, a process to restore the emergency-saved data is initiated, triggering subsequent recovery commands.
[0063] This step is basically the same as S101 above. For details, please refer to the above embodiments of the invention. It will not be repeated here.
[0064] S202: Based on the emergency save instruction, the corresponding data save thread is invoked through the pre-defined CPU core used for emergency data save, and the corresponding storage subspace is determined according to the identification information of the corresponding CPU core recorded in the page description table in the storage space.
[0065] Before this step, during system initialization, the memory management module typically calculates the memory required by the operating system (kernel, users, user space business modules, etc.) and the memory space required by the memory management module itself, based on the current device's CPU and physical memory specifications, and confirms the current number of CPU cores. Then, the memory management module divides the current user space memory into intervals according to the pre-defined number of CPU cores used for emergency data storage, and marks the corresponding CPU core's index number on the page descriptor table of each page within the corresponding memory interval. Specifically, in this embodiment of the invention, CPU cores are associated with storage subspaces by marking the corresponding CPU core's index number on the page descriptor table.
[0066] In this step, based on the emergency save instruction, the corresponding data save thread needs to be invoked through the pre-defined CPU core. First, the storage subspace corresponding to the data save thread is determined according to the identification information of the corresponding CPU core recorded in the page descriptor table of the storage space. The identification information of the CPU core can be the CPU core index number.
[0067] S203: Call the data saving thread and read the data of the data block corresponding to the tag identifier recorded in the block description table in the corresponding storage subspace.
[0068] In this embodiment of the invention, the marker is a marker added to the block description table when data is written to the data block. That is, before this step, when the target thread writes data to a data block in the storage space, a marker corresponding to that data block can typically be added to the block description table to indicate that data is written to the data block. For example, when data is written to the data block, its marker can be set to 1; when no data is written to the data block, its marker can be set to 0.
[0069] In practice, when creating threads, the roles of different threads are differentiated. When allocating memory space for certain business threads, the corresponding memory range needs to be marked on the descriptor table, while the data of some business threads does not need to be saved and therefore does not need to be marked. That is, in this embodiment of the invention, the target thread is determined according to its role, and then the data stored in the target thread is marked as such, as data to be saved urgently.
[0070] In this step, after the data saving thread determines its corresponding storage subspace, the data saving thread will read the data of the data block corresponding to the tag identifier recorded in the block description table in its corresponding storage subspace, that is, read the data from the data block.
[0071] Specifically, when reading data, a corresponding check bit can be generated for the read data. Specifically, a corresponding data check value can be generated for each page of data, and the data check value is written into the page description table so that the recovered data can be verified later based on the data check value.
[0072] S204: The data saving thread generates a file header based on the data's index information and writes it to the preset data saving file.
[0073] When saving data via a data saving thread, a file header must first be generated based on the index information of the read data, and then this file header is written to the pre-defined file for saving the data. Specifically, this step can be as follows: the data saving thread generates a file header based on the CPU core number corresponding to the data, the pre-defined file header information, and the page descriptor table information, and writes it to the pre-defined file for saving the data. That is, the aforementioned index information may include the corresponding CPU core number, the pre-defined file header information, page descriptor table information, etc. The specific content of the index information is not specifically limited here, and the pre-defined file header information can be set according to the actual situation.
[0074] S205: Compress the data using the data saving thread and write the compressed data to a file.
[0075] In this step, the read data is compressed by the data storage thread, and the compressed data is written to the file, thereby achieving emergency data preservation. Specific details regarding data compression can be found in existing technologies and will not be elaborated upon here. During compression, data can be compressed sequentially according to the order of user space memory, cache, page descriptor table, and block descriptor table memory.
[0076] S206: Obtain recovery instructions.
[0077] When the system recovers from an emergency, a recovery command will be triggered. This step will retrieve this recovery command to facilitate subsequent data recovery steps. The specific content of the recovery command can be set according to the actual situation and is not specifically limited here.
[0078] S207: Invoke the data recovery thread according to the recovery command to restore the saved data to the preset location.
[0079] In this step, the first step is to generate a data recovery thread, and then use this data recovery thread to restore the saved data to the preset location. Usually, the data can be restored to its original position.
[0080] Specifically, the data recovery threads created in this step can first be bound to corresponding pre-defined CPU cores. Then, each data recovery thread will parse the saved data sequentially from the file according to the saved index information, i.e., the various descriptive tables in the file header mentioned above, and restore the corresponding data to the corresponding business module and cache. During the data recovery process, the corresponding data can be restored in parallel based on the correspondence between the data recovery threads and the data established using the pre-defined CPU cores, thereby achieving rapid data recovery.
[0081] In this embodiment of the invention, the saved data may include a checksum corresponding to the data, meaning the file storing the saved data contains a data checksum value. Following this step, the process may further include: verifying the data based on the checksum. For specific verification procedures, please refer to existing technologies. When verification fails, it indicates that the data corresponding to the checksum is distorted, and a corresponding alarm should typically be issued.
[0082] The system data storage method provided in this embodiment of the invention establishes a storage subspace in the storage space corresponding to the pre-defined CPU core for emergency data storage. When an emergency storage command is generated in the event of an emergency, the CPU core controls the data storage thread to save the data in the corresponding storage subspace. By saving the data in the corresponding storage subspace in parallel by multiple data storage threads, the data processing speed can be greatly accelerated when emergency data storage is required, and data can be quickly saved when the system encounters an emergency.
[0083] The following describes a system data storage device provided by an embodiment of the present invention. The system data storage device described below can be referred to in correspondence with the system data storage method described above.
[0084] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a system data storage device provided in an embodiment of the present invention.
[0085] See Figure 3 In this embodiment of the invention, the system data storage device may include:
[0086] The save instruction module 100 is used to obtain emergency save instructions;
[0087] The data reading module 200 is used to read data in the corresponding storage subspace by calling the corresponding data saving thread through the pre-defined CPU core for emergency data saving according to the emergency save instruction; the CPU core corresponds to the data saving thread, and multiple data saving threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspaces correspond to the CPU cores.
[0088] The data storage module 300 is used to save data in the corresponding storage subspace through the data storage thread.
[0089] Preferably, in this embodiment of the invention, the data reading module 200 includes:
[0090] A save thread creation unit is used to create multiple data save threads according to the emergency save instruction.
[0091] The data reading unit is used to call the corresponding data saving thread through the pre-defined CPU core for emergency data saving to read the data in the corresponding storage subspace.
[0092] Preferably, in this embodiment of the invention, the data reading module 200 includes:
[0093] The storage subspace determination unit is used to call the corresponding data storage thread through the pre-standardized CPU core for emergency data storage, and determine the corresponding storage subspace according to the identification information of the corresponding CPU core recorded in the page description table in the storage space.
[0094] The data block reading unit is used to call the data saving thread and read the data of the data block corresponding to the tag identifier recorded in the block description table in the corresponding storage subspace; the tag identifier is a tag identifier added to the block description table when writing data to the data block.
[0095] Preferably, in this embodiment of the invention, the data storage module 300 includes:
[0096] The file header storage unit is used to generate a file header based on the index information of the data through the data storage thread and write it into a file that stores preset data.
[0097] A data compression unit is used to compress the data through the data saving thread and write the compressed data into the file.
[0098] Preferably, in this embodiment of the invention, the file header storage unit is used for:
[0099] The data storage thread generates a file with a pre-defined header and writes it into the file containing the pre-defined data, based on the CPU core number corresponding to the data, the pre-defined header information, and the page description table information.
[0100] Preferably, in this embodiment of the invention, it further includes:
[0101] The recovery instruction module is used to obtain recovery instructions;
[0102] The data recovery module is used to call the data recovery thread according to the recovery command and restore the saved data to a preset location.
[0103] Preferably, in this embodiment of the invention, the stored data includes a check bit corresponding to the data;
[0104] Also includes:
[0105] The verification module is used to verify the data based on the verification bit.
[0106] The system data storage device of this embodiment is used to implement the aforementioned system data storage method. Therefore, the specific implementation of the system data storage device can be found in the embodiment section of the system data storage method above. For example, the storage instruction module 100, the data reading module 200, and the data storage module 300 are respectively used to implement steps S101 to S103 in the above system data storage method. Therefore, the specific implementation can be referred to the description of the corresponding embodiments, and will not be repeated here.
[0107] The following describes a system data storage device provided by an embodiment of the present invention. The system data storage device described below can be referred to in correspondence with the system data storage method and system data storage apparatus described above.
[0108] Please refer to Figure 4 , Figure 4 This is a structural block diagram of a system data storage device provided in an embodiment of the present invention.
[0109] Reference Figure 4 The system's data storage device may include a processor 11 and a memory 12.
[0110] The memory 12 is used to store computer programs; the processor 11 is used to execute the computer programs to implement the system data storage method described in the above embodiments of the invention.
[0111] In this embodiment, the processor 11 in the system data storage device is used to install the system data storage apparatus described in the above-described embodiments. Furthermore, the processor 11, combined with the memory 12, can implement the system data storage method described in any of the above-described embodiments. Therefore, the specific implementation of the system data storage device can be found in the embodiments section of the system data storage method above, and its specific implementation can be referred to the descriptions of the corresponding embodiments, which will not be repeated here.
[0112] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a system data storage method described in any of the above embodiments. Further details can be found in the prior art and will not be elaborated upon here.
[0113] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0114] 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.
[0115] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0116] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0117] The foregoing has provided a detailed description of a system data storage method, a system data storage device, a system data storage apparatus, and a computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A system data saving method characterized by comprising: include: In the event of a failure scenario that could result in user data loss, service interruption, or machine downtime, obtain an emergency save command; According to the emergency save instruction, the corresponding data save thread is called through the pre-defined CPU core for emergency data save to read the data in the corresponding storage subspace; The CPU core corresponds to the data storage thread, and multiple data storage threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspaces correspond to the CPU cores; The data in the corresponding storage subspace is saved through the data saving thread; The step of calling the corresponding data storage thread through a pre-defined CPU core for emergency data storage to read data from the corresponding storage subspace includes: The corresponding data storage thread is invoked by calling the pre-standardized CPU core used for emergency data storage, and the corresponding storage subspace is determined according to the identification information of the corresponding CPU core recorded in the page description table in the storage space. The data saving thread is invoked to read the data of the data block corresponding to the tag identifier recorded in the block description table in the corresponding storage subspace; the tag identifier is a tag identifier added to the block description table when writing data to the data block; The step of saving the data in the corresponding storage subspace through the data saving thread includes: The data saving thread generates a file header based on the index information of the data and writes it into a preset file for saving data. The data is compressed by the data saving thread, and the compressed data is written to the file.
2. The method according to claim 1, characterized in that, The step of reading data from the corresponding storage subspace by calling the corresponding data saving thread through a pre-defined CPU core used for emergency data saving according to the emergency save instruction includes: Multiple data saving threads are created according to the emergency save instruction; The corresponding data storage thread is invoked by the pre-defined CPU core used for emergency data storage to read the data in the corresponding storage subspace.
3. The method according to claim 1, characterized in that, The step of generating a file header based on the index information of the data through the data storage thread and writing it into a preset data storage file includes: The data storage thread generates a file with a pre-defined header and writes it into the file containing the pre-defined data, based on the CPU core number corresponding to the data, the pre-defined header information, and the page description table information.
4. The method according to claim 1, characterized in that, After saving the data in the corresponding storage subspace through the data saving thread, the method further includes: Obtain recovery instructions; The data recovery thread is invoked according to the recovery command to restore the saved data to a preset location.
5. The method according to claim 4, characterized in that, The saved data includes a check bit corresponding to the data; After invoking the data recovery thread according to the recovery instruction to restore the saved data to the preset location, the method further includes: The data is verified based on the check bit.
6. A system data storage device, characterized in that, include: The save command module is used to obtain emergency save commands in the event of a failure scenario that would cause user data loss, service interruption, or machine crash. The data reading module is used to read data in the corresponding storage subspace by calling the corresponding data saving thread through the pre-defined CPU core for emergency data saving according to the emergency save instruction; The CPU core corresponds to the data storage thread, and multiple data storage threads are called in total; the storage space is pre-divided into multiple storage subspaces according to the number of CPU cores, and the storage subspaces correspond to the CPU cores; The data storage module is used to save data in the corresponding storage subspace through the data storage thread; Specifically, the data reading module is used to invoke the corresponding data saving thread through a pre-defined CPU core for emergency data saving, determine the corresponding storage subspace based on the identification information of the corresponding CPU core recorded in the page description table of the storage space, and invoke the data saving thread to read the data of the data block corresponding to the marked identifier recorded in the block description table of the corresponding storage subspace. The marked identifier is a marker added to the block description table when writing data to the data block. The process of saving the data in the corresponding storage subspace through the data saving thread includes: generating a file header based on the index information of the data and writing it to a pre-defined file for saving data; compressing the data and writing the compressed data to the file.
7. A system data storage device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the system data storage method as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the steps of the system data storage method as claimed in any one of claims 1 to 5.