CN115129515A - System data storage method, device, equipment and storage medium - Google Patents

System data storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN115129515A
CN115129515A CN202210764522.3A CN202210764522A CN115129515A CN 115129515 A CN115129515 A CN 115129515A CN 202210764522 A CN202210764522 A CN 202210764522A CN 115129515 A CN115129515 A CN 115129515A
Authority
CN
China
Prior art keywords
data
storage
saving
thread
cpu core
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210764522.3A
Other languages
Chinese (zh)
Inventor
翟明立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210764522.3A priority Critical patent/CN115129515A/en
Publication of CN115129515A publication Critical patent/CN115129515A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a system data storage method, a device, equipment and a storage medium, which relate to the technical field of servers and comprise the steps of calling a corresponding data storage thread through a CPU core which is pre-specified and used for storing emergency data, and reading data in a corresponding storage subspace; the CPU core corresponds to the data storage thread and calls a plurality of data storage threads together; the storage space is divided into a plurality of storage subspaces in advance according to the core number of the CPU core, and the storage subspaces correspond to the CPU core; and saving the data in the corresponding storage subspace through the data saving thread. When an emergency situation occurs and an emergency storage instruction is generated, the CPU core controls the data storage threads to store the data of the corresponding storage sub-space, and the data of the corresponding storage sub-space is stored in parallel through the data storage threads, so that the processing speed of the data when the data are required to be stored emergently can be greatly increased, and the data can be rapidly stored when the system meets the emergency situation.

Description

System data storage method, device, equipment and storage medium
Technical Field
The present invention relates to the field of server technologies, and in particular, to a system data saving method, a system data saving device, a system data saving apparatus, and a computer-readable storage medium.
Background
When a server is in a situation of power failure, service interruption caused by burst, machine downtime and the like during the operation of a system, emergency data storage needs to be performed on current system key process context data and IO stream cache data.
When the fault scene occurs during the normal operation of the current server/storage server, a data protection mechanism is triggered to urgently store user data in the current IO stack, but the key data which can be stored is limited due to the limitations of the performance of the hard disk, the performance of a single core of a CPU, the number of physical hard disks, the transmission rate of an internal bus and the energy storage limitation of a used BBU (Battery Backup Unit). Therefore, how to provide an efficient method for saving data urgently when the server encounters an exception is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a system data storage method, which can quickly store data when a system encounters an emergency; another object of the present invention is to provide a system data saving device, a system data saving apparatus, and a computer readable storage medium, which can save data quickly when a system encounters an emergency.
In order to solve the above technical problem, the present invention provides a system data storage method, including:
acquiring an emergency saving instruction;
calling a corresponding data saving thread through a CPU core which is specified in advance and used for saving the emergency data according to the emergency saving instruction, and reading the data in the corresponding storage subspace; the CPU core corresponds to the data storage thread and calls a plurality of data storage threads together; the storage space is divided into a plurality of storage subspaces in advance according to the core number of the CPU core, and the storage subspaces correspond to the CPU core;
and storing the data in the corresponding storage subspace through the data storage thread.
Optionally, the calling, according to the emergency saving instruction, a corresponding data saving thread through a pre-specified CPU core for storing emergency data, and reading data in a corresponding storage subspace includes:
creating a plurality of data saving threads according to the emergency saving instruction;
and calling the corresponding data saving thread through a pre-specified CPU core for saving the emergency data, and reading the data in the corresponding storage subspace.
Optionally, the invoking, by the CPU core for storing emergency data that is pre-specified, a corresponding data storing thread, and reading data in a corresponding storage subspace includes:
calling a corresponding data saving thread through a pre-specified CPU core for storing emergency data, and determining a corresponding storage subspace according to the identification information of the corresponding CPU core recorded in the page description table in the storage space;
calling the data storage thread, and reading the data of the data block corresponding to the mark identifier according to the mark identifier recorded in the block description table in the corresponding storage subspace; the mark identification is added in the block description table when data is written into the data block.
Optionally, the saving, by the data saving thread, data in the corresponding storage subspace includes:
generating a file header according to the index information of the data through the data storage thread, and writing the file header into a file with preset stored data;
and compressing the data through the data storage thread, and writing the compressed data into the file.
Optionally, the generating, by the data saving thread, a file header according to the index information of the data, and writing a file with preset saved data includes:
and generating a file with a file header written in preset saved data by the data saving thread according to the CPU core number corresponding to the data, preset file header information and page description table information.
Optionally, after the data in the corresponding storage subspace is saved by the data saving thread, the method further includes:
acquiring a recovery instruction;
and calling a data recovery thread according to the recovery instruction, and recovering the stored data to a preset position.
Optionally, the stored data includes a check bit corresponding to the data;
after the calling a data recovery thread according to the recovery instruction and recovering the stored data to a preset position, the method further includes:
and verifying the data according to the check bits.
The invention also provides a system data storage device, comprising:
the saving instruction module is used for acquiring an emergency saving instruction;
the data reading module is used for calling a corresponding data storage thread through a pre-specified CPU core for storing the emergency data according to the emergency storage instruction and reading the data in the corresponding storage subspace; the CPU core corresponds to the data storage thread and calls a plurality of data storage threads together; the storage space is divided into a plurality of storage subspaces in advance according to the number of the cores of the CPU core, and the storage subspaces correspond to the CPU core;
and the data storage module is used for storing the data in the corresponding storage subspace through the data storage thread.
The invention also provides a system data storage device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the system data saving method according to any one of the above.
The present invention also provides a computer-readable storage medium having a computer program stored therein, the computer program being executed by a processor to implement the steps of the system data saving method according to any one of the above.
The system data storage method provided by the invention comprises the following steps: acquiring an emergency saving instruction; calling a corresponding data saving thread through a pre-specified CPU core for saving the emergency data according to the emergency saving instruction, and reading the data in the corresponding storage subspace; the CPU core corresponds to the data storage thread and calls a plurality of data storage threads together; the storage space is divided into a plurality of storage subspaces in advance according to the core number of the CPU core, and the storage subspaces correspond to the CPU core; and saving the data in the corresponding storage subspace through the data saving thread.
The CPU core which is used for storing the emergency data and corresponds to the pre-standard in the storage space is established with the storage subspace in advance, when an emergency storage instruction is generated, the CPU core controls the data storage thread to store the data of the corresponding storage subspace, and the data of the corresponding storage subspace is stored in parallel through the data storage threads, so that the processing speed of the data when the data is required to be stored emergently can be greatly increased, and the data can be stored quickly when the system meets the emergency.
The invention also provides a system data storage device, a system data storage device and a computer readable storage medium, which also have the beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a system data saving method according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific system data saving method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a system data storage device according to an embodiment of the present invention;
fig. 4 is a block diagram of a system data saving device according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a system data storage method. In the prior art, the critical data which can be saved when an emergency is met is limited.
The system data storage method provided by the invention comprises the following steps: acquiring an emergency saving instruction; calling a corresponding data saving thread through a pre-specified CPU core for saving the emergency data according to the emergency saving instruction, and reading the data in the corresponding storage subspace; the CPU core corresponds to the data storage thread and calls a plurality of data storage threads together; the storage space is divided into a plurality of storage subspaces in advance according to the core number of the CPU core, and the storage subspaces correspond to the CPU core; and saving the data in the corresponding storage subspace through the data saving thread.
The CPU core which is used for storing the emergency data and corresponds to the pre-standard in the storage space is established with the storage subspace in advance, when an emergency storage instruction is generated, the CPU core controls the data storage thread to store the data of the corresponding storage subspace, and the data of the corresponding storage subspace is stored in parallel through the data storage threads, so that the processing speed of the data when the data is required to be stored emergently can be greatly increased, and the data can be stored quickly when the system meets the emergency.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a system data saving method according to an embodiment of the present invention.
Referring to fig. 1, in the embodiment of the present invention, a system data saving method includes:
s101: and acquiring an emergency saving instruction.
When the system encounters a scene such as power failure, service interruption caused by burst, machine downtime and the like, an emergency storage instruction is firstly triggered. The urgent save instruction is obtained in this step, so that the subsequent steps can be performed conveniently. The specific content of the emergency saving command may be set according to the actual situation, and is not limited in this regard.
S102: and calling a corresponding data saving thread through a pre-specified CPU core for saving the emergency data according to the emergency saving instruction, and reading the data in the corresponding storage subspace.
In the embodiment of the present invention, the CPU core corresponds to the data saving thread, and calls a plurality of data saving threads together; the storage space is divided into a plurality of storage subspaces in advance according to the number of the cores of the CPU core, and the storage subspaces correspond to the CPU core. Before this step, the memory space needs to be divided, usually during system initialization. Specifically, a CPU core for storing emergency data needs to be determined in advance, and then a storage subspace that needs to be partitioned is determined according to the number of cores of the CPU core in advance, where the number of partitioned storage subspaces needs to be the same as the number of cores of the CPU core in advance, and the storage subspaces need to be in one-to-one correspondence with the CPU cores in advance. Of course, in the embodiment of the present invention, it is only necessary to ensure that there is a correspondence between the storage subspace and the CPU core.
In this step, after receiving the urgent save instruction, the current service is interrupted first, the CPU core for urgent data saving of the aforementioned pre-specification is enabled, and the corresponding data saving thread is called by the CPU core, so as to call a plurality of data saving threads altogether. In the embodiment of the invention, the data storage thread has a corresponding relation with the pre-specified CPU core, and the data storage thread generates a corresponding relation with the storage subspace through the CPU core. In this step, the data in the corresponding storage subspace is read by the data saving thread. Different data storage threads can be called through different CPU core areas, so that the different data storage threads are specifically used for processing data in parallel, and parallel reading of the data stored in a plurality of areas in the storage space is realized.
Specifically, the step may specifically include: creating a plurality of data saving threads according to the emergency saving instruction; and calling the corresponding data saving thread through a pre-specified CPU core for saving the emergency data, and reading the data in the corresponding storage subspace.
After the emergency saving instruction is acquired, a plurality of data saving threads are created, specifically, the data saving threads are created according to the number of CPU cores for emergency data saving specified in advance, and the created data saving threads are bound with the corresponding CPU cores. And then, calling a corresponding data saving thread through a CPU core which is pre-specified and used for saving the emergency data, and reading the data in the corresponding storage subspace. The details of the embodiments of the present invention are described in detail, and will not be described herein again.
S103: and saving the data in the corresponding storage subspace through the data saving thread.
In this step, the data in the corresponding storage subspace is saved urgently through the data saving thread, so that the parallel and rapid saving of the data in the storage space is realized to cope with an emergency. The detailed process of urgent data storage will be described in detail in the following embodiments of the present invention, and will not be described herein.
According to the system data storage method provided by the embodiment of the invention, the storage subspace is established in advance by the CPU core which is used for storing the emergency data and corresponds to the pre-standard in the storage space, when an emergency storage instruction is generated, the CPU core controls the data storage thread to store the data of the corresponding storage subspace, and the data of the corresponding storage subspace is stored in parallel by the plurality of data storage threads, so that the processing speed of the data when the data is required to be stored urgently can be greatly increased, and the data can be rapidly stored when the system meets the emergency.
The detailed contents of a system data storage method provided by the present invention will be described in detail in the following embodiments of the present invention.
Referring to fig. 2, fig. 2 is a flowchart illustrating a specific method for saving system data according to an embodiment of the present invention.
Referring to fig. 2, in the embodiment of the present invention, a system data saving method includes:
s201: and acquiring an emergency saving instruction.
In a system, a health supervision module is usually required to be arranged for supervising the running condition of a current operating system, and when a fault scene which can cause user data loss, service stop and machine downtime occurs, an emergency data saving mechanism is triggered, namely an emergency saving instruction is triggered. And when the equipment is recovered to be normal, initiating a data flow for recovering the emergency storage, namely triggering a subsequent recovery instruction.
This step is substantially the same as step S101, and for details, reference is made to the above embodiment of the present invention, which is not described herein again.
S202: and calling a corresponding data saving thread through a CPU core for storing emergency data which is specified in advance according to the emergency saving instruction, and determining a corresponding storage subspace according to the identification information of the corresponding CPU core recorded in the page description table in the storage space.
Before this step, in the process of system initialization, it is usually necessary to calculate the memory size, memory management module and other memory space size that the current operating system needs to occupy for each service module process of kernel, user and user space, according to the current device CPU and physical memory specification, and to confirm the current CPU core number. Then, the memory management module divides the current user space memory into regions according to the pre-specified number of the CPU cores for storing the urgent data, and marks the identifier of the index number corresponding to the CPU core on the page description table of each page corresponding to the memory region. That is, in the embodiment of the present invention, the CPU core may be specifically corresponding to the storage subspace by marking the index number of the corresponding CPU core on the page description table.
In this step, a corresponding data saving thread needs to be called through a pre-specified CPU core according to the emergency saving instruction, and a storage subspace corresponding to the data saving thread is determined according to the identification information of the corresponding CPU core recorded in the page description table in the storage space. The identification information of the CPU core may be an index number of the CPU core.
S203: and calling a data storage thread, and reading the data of the data block corresponding to the mark identifier according to the mark identifier recorded in the block description table in the corresponding storage subspace.
In this embodiment of the present invention, the tag identifier is a tag identifier 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 flag identifier corresponding to the data block may be added to the block description table corresponding to the data block, so as to flag that data is written in the data block. For example, when data is written in the data block, the tag flag thereof may be set to 1; when no data is written in the data block, its flag may be set to 0.
In an actual situation, when creating a thread, according to the functions of different distinguished threads, when allocating memory space to some service threads, a corresponding memory interval needs to be marked with a mark on a description table, and data of some service threads does not need to be stored, and thus marking is not needed. That is, in the embodiment of the present invention, the target thread is determined according to the role of the thread, and then the tag identifier is added to the data stored in the target thread to serve as the data to be saved urgently.
In this step, after the data saving thread determines the corresponding storage subspace, the data saving thread reads the data of the data block corresponding to the tag identifier according to the tag identifier recorded in the block description table in the corresponding storage subspace, that is, reads the data from the data block.
Specifically, when reading data, a corresponding check bit may be generated for the read data, specifically, a corresponding data check value may be generated for each page of data, and the data check value is written into the page description table, so that the recovered data may be checked according to the data check value in the following.
S204: and generating a file header according to the index information of the data through the data storage thread, and writing the file header into a file with preset stored data.
When data is saved through a data saving thread, a file header is first generated according to index information of read data, and the file header is written into a file with preset saved data. Specifically, the step may specifically be: and generating a file with a file header written in preset saved data by the data saving thread according to the CPU core number corresponding to the data, preset file header information and page description table information. That is, the index information may include a corresponding CPU core number, predetermined header information, page description table information, and the like, specific contents of the index information are not specifically limited herein, and the predetermined header information and the like may be set by itself according to actual situations.
S205: and compressing the data through a data storage thread, and writing the compressed data into a file.
In this step, the read data is compressed by the data saving thread, and the compressed data is written into the file, so as to realize emergency saving of the data. For details of data compression, reference may be made to the prior art, and details thereof are not repeated herein. During compression, data can be sequentially compressed according to the order of the memory of the user space, the cache, the page description table and the block description table.
S206: a resume instruction is fetched.
When the system recovers from an emergency state, a recovery instruction is triggered. The recovery instruction is obtained in this step, so that the subsequent data recovery step can be performed. The specific content of the recovery command may be set according to the actual situation, and is not limited specifically herein.
S207: and calling a data recovery thread according to the recovery instruction, and recovering the stored data to a preset position.
In this step, a data recovery thread may be first generated, and then the stored data may be recovered to a preset location by the data recovery thread, and the data may be generally recovered to the original location.
Specifically, the data recovery threads created in this step may bind the corresponding predefined CPU cores first, and then each data recovery thread may sequentially parse the stored data from the file according to the stored index information, that is, the description tables in the file header, and recover the corresponding data to the corresponding service module and the cache. In the process of recovering data, corresponding data can be recovered in parallel according to the corresponding relation between the data recovery threads established by the CPU cores which are pre-specified and the data, so that the rapid recovery of the data is realized.
In the embodiment of the present invention, the stored data may include a check bit corresponding to the data, that is, the file storing the data has a data check value. After this step, the method may further include: and verifying the data according to the check bits. Reference may be made to the prior art with respect to specific verification procedures. When the verification fails, it indicates that the data corresponding to the check bit is distorted, and a corresponding alarm is usually required to be reported.
According to the system data storage method provided by the embodiment of the invention, the storage subspace is established in advance by the CPU core which is used for storing the emergency data and corresponds to the pre-standard in the storage space, when an emergency storage instruction is generated, the CPU core controls the data storage thread to store the data of the corresponding storage subspace, and the data of the corresponding storage subspace is stored in parallel by the plurality of data storage threads, so that the processing speed of the data when the data is required to be stored urgently can be greatly increased, and the data can be rapidly stored when the system meets the emergency.
In the following, a system data saving device provided by an embodiment of the present invention is introduced, and the system data saving device described below and the system data saving method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a system data storage device according to an embodiment of the present invention.
Referring to fig. 3, in an embodiment of the present invention, the system data saving device may include:
a save instruction module 100, configured to obtain an emergency save instruction;
the data reading module 200 is configured to call a corresponding data saving thread through a pre-specified CPU core for emergency data saving according to the emergency saving instruction, and read data in a corresponding storage subspace; the CPU core corresponds to the data saving thread and calls a plurality of data saving threads together; the storage space is divided into a plurality of storage subspaces in advance according to the number of the cores of the CPU core, and the storage subspaces correspond to the CPU core;
the data saving module 300 is configured to save the data in the corresponding storage subspace through the data saving thread.
Preferably, in the embodiment of the present invention, the data reading module 200 includes:
and the saving thread establishing unit is used for establishing a plurality of data saving threads according to the emergency saving instruction.
And the data reading unit is used for calling a corresponding data saving thread through a CPU core which is specified in advance and used for saving the emergency data, and reading the data in the corresponding storage subspace.
Preferably, in the embodiment of the present invention, the data reading module 200 includes:
the storage subspace determining unit is used for calling a corresponding data saving thread through a pre-specified CPU core for urgent data saving, and determining a corresponding storage subspace according to the identification information of the corresponding CPU core recorded in the page description table in the storage space;
the data block reading unit is used for calling the data storage thread and reading the data of the data block corresponding to the mark identifier according to the mark identifier recorded in the block description table in the corresponding storage subspace; the mark identification is added in the block description table when data is written into the data block.
Preferably, in the embodiment of the present invention, the data saving module 300 includes:
and the file header storage unit is used for generating a file header according to the index information of the data through the data storage thread and writing the file header into a file with preset stored data.
And the data compression unit is used for compressing the data through the data storage thread and writing the compressed data into the file.
Preferably, in an embodiment of the present invention, the header saving unit is configured to:
and generating a file with a file header written in preset saved data by the data saving thread according to the CPU core number corresponding to the data, preset file header information and page description table information.
Preferably, in the embodiment of the present invention, the method further includes:
the recovery instruction module is used for acquiring a recovery instruction;
and the data recovery module is used for calling a data recovery thread according to the recovery instruction and recovering the stored data to a preset position.
Preferably, in the embodiment of the present invention, the stored data includes a check bit corresponding to the data;
further comprising:
and the checking module is used for checking the data according to the check bits.
The system data saving device of this embodiment is configured to implement the foregoing system data saving method, and therefore, a specific implementation of the system data saving device may be seen in the foregoing embodiment parts of the system data saving method, for example, the instruction saving module 100, the data reading module 200, and the data saving module 300, which are respectively configured to implement steps S101 to S103 in the foregoing system data saving method, so that the specific implementation thereof may refer to descriptions of corresponding embodiments of each part, and details thereof are not repeated here.
In the following, a system data saving device according to an embodiment of the present invention is introduced, and the system data saving device described below, the system data saving method described above, and the system data saving apparatus described above may be referred to in a corresponding manner.
Referring to fig. 4, fig. 4 is a block diagram of a system data saving device according to an embodiment of the present invention.
Referring to fig. 4, the system data saving device may include a processor 11 and a memory 12.
The memory 12 is used for storing a computer program; the processor 11 is configured to implement the system data saving method in the foregoing embodiment of the invention when executing the computer program.
The processor 11 in the system data saving device of this embodiment is used to install the system data saving apparatus in the above embodiment of the invention, and the processor 11 and the memory 12 are combined to implement the system data saving method in any embodiment of the invention. Therefore, the specific implementation of the system data saving device may be found in the foregoing embodiment of the system data saving method, and the specific implementation may refer to the description of each corresponding embodiment, which is not described herein again.
The present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements a system data saving method introduced in any of the embodiments of the present invention. The rest can be referred to the prior art and will not be described in an expanded manner.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above detailed description describes a system data saving method, a system data saving device, a system data saving apparatus, and a computer readable storage medium according to the present invention. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, without departing from the principle of the present invention, it is possible to make various improvements and modifications to the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method for storing system data, comprising:
acquiring an emergency saving instruction;
calling a corresponding data saving thread through a pre-specified CPU core for saving the emergency data according to the emergency saving instruction, and reading the data in the corresponding storage subspace; the CPU core corresponds to the data saving thread and calls a plurality of data saving threads together; the storage space is divided into a plurality of storage subspaces in advance according to the number of the cores of the CPU core, and the storage subspaces correspond to the CPU core;
and storing the data in the corresponding storage subspace through the data storage thread.
2. The method according to claim 1, wherein the calling the corresponding data saving thread through the pre-specified CPU core for urgent data saving according to the urgent saving instruction, and reading the data in the corresponding storage subspace comprises:
creating a plurality of data saving threads according to the emergency saving instruction;
and calling the corresponding data saving thread through a pre-specified CPU core for saving the emergency data, and reading the data in the corresponding storage subspace.
3. The method of claim 1, wherein the invoking of the corresponding data saving thread by the pre-specified CPU core for urgent data saving, the reading of the data in the corresponding memory subspace comprises:
calling a corresponding data saving thread through a pre-specified CPU core for storing emergency data, and determining a corresponding storage subspace according to the identification information of the corresponding CPU core recorded in the page description table in the storage space;
calling the data storage thread, and reading the data of the data block corresponding to the mark identifier according to the mark identifier recorded in the block description table in the corresponding storage subspace; the mark identification is added in the block description table when data is written into the data block.
4. The method of claim 3, wherein saving, by the data save thread, data within the corresponding storage subspace comprises:
generating a file header according to the index information of the data through the data storage thread, and writing the file header into a file with preset stored data;
and compressing the data through the data storage thread, and writing the compressed data into the file.
5. The method according to claim 4, wherein the generating, by the data saving thread, a file header according to the index information of the data, and writing a file with preset saved data comprises:
and generating a file with a file header written in preset saved data by the data saving thread according to the CPU core number corresponding to the data, preset file header information and page description table information.
6. The method of claim 1, further comprising, after said saving, by said data-saving thread, data within a corresponding storage subspace:
acquiring a recovery instruction;
and calling a data recovery thread according to the recovery instruction, and recovering the stored data to a preset position.
7. The method of claim 6, wherein the saved data includes parity bits corresponding to the data;
after the calling of a data recovery thread according to the recovery instruction and the recovery of the stored data to a preset position, the method further includes:
and verifying the data according to the check bits.
8. A system data retention apparatus, comprising:
the saving instruction module is used for acquiring an emergency saving instruction;
the data reading module is used for calling a corresponding data storage thread through a pre-specified CPU core for storing the emergency data according to the emergency storage instruction and reading the data in the corresponding storage subspace; the CPU core corresponds to the data saving thread and calls a plurality of data saving threads together; the storage space is divided into a plurality of storage subspaces in advance according to the number of the cores of the CPU core, and the storage subspaces correspond to the CPU core;
and the data storage module is used for storing the data in the corresponding storage subspace through the data storage thread.
9. A system data retention device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the system data retention method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, which computer program is executable by a processor for implementing the steps of the system data saving method according to any one of claims 1 to 7.
CN202210764522.3A 2022-06-30 2022-06-30 System data storage method, device, equipment and storage medium Pending CN115129515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210764522.3A CN115129515A (en) 2022-06-30 2022-06-30 System data storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210764522.3A CN115129515A (en) 2022-06-30 2022-06-30 System data storage method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115129515A true CN115129515A (en) 2022-09-30

Family

ID=83381240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210764522.3A Pending CN115129515A (en) 2022-06-30 2022-06-30 System data storage method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115129515A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166299A (en) * 2023-04-04 2023-05-26 深圳云豹智能有限公司 Software upgrading method and device, storage medium, chip and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166299A (en) * 2023-04-04 2023-05-26 深圳云豹智能有限公司 Software upgrading method and device, storage medium, chip and electronic equipment

Similar Documents

Publication Publication Date Title
EP2908254A1 (en) Data redundancy implementation method and device
CN106933843B (en) Database heartbeat detection method and device
CN107506266B (en) Data recovery method and system
CN109656895B (en) Distributed storage system, data writing method, device and storage medium
CN107315616B (en) Firmware loading method and device and electronic equipment
CN107315659B (en) Metadata redundancy backup method and device
CN102135925B (en) Method and device for detecting error check and correcting memory
EP3336702B1 (en) Metadata recovery method and device
CN109614045B (en) Metadata dropping method and device and related equipment
CN106528316A (en) Anti-crash method and system of online game server
CN113419684B (en) Data processing method, device and equipment and readable storage medium
CN110597779A (en) Data reading and writing method in distributed file system and related device
CN115129515A (en) System data storage method, device, equipment and storage medium
CN110989938A (en) Fault disk identification method, device, equipment and computer readable storage medium
CN115794472A (en) Chip error collection and processing method, device and storage medium
CN102890647A (en) Method and device for storing and updating data
CN110750219B (en) Storage cluster service processing method, device, equipment and readable storage medium
CN114860487A (en) Memory fault identification method and memory fault isolation method
CN111813604B (en) Data recovery method, system and related device of fault storage equipment
CN117591327A (en) core file generation method and device, electronic equipment and storage medium
WO2019037587A1 (en) Data restoration method and device
CN113051428B (en) Method and device for back-up storage at front end of camera
CN109857708B (en) Data access method of embedded system and computer readable storage medium
CN106406771B (en) Log recording method and logger
CN112084097A (en) Disk warning method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination