A data storage method, system, apparatus, and computer-readable storage medium
By optimizing the data storage process in the server, the processor parses and transmits the received preset information in stages, ensuring that the FIR data is completely stored in the PNOR flash memory. This solves the problem of incomplete data transmission in the prior art and improves the success rate of RAS testing and the reliability of the server.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR BUSINESS MACHINE CO LTD
- Filing Date
- 2023-03-24
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, when a server performs RAS testing, the FIR data cannot be fully written to the PNOR flash memory within 5 seconds, resulting in injection failure and affecting the reliability and availability of the test.
After receiving the preset information, the processor parses the information within a first preset time and divides it into preset bytes and transmits it to the BMC in a first preset number of times. After receiving all the information, the BMC divides it into a second preset number of times and transmits it to the PNOR flash memory within a second preset time, ensuring that all the information is stored within the preset target time.
By optimizing the data transmission process, transmission time was reduced, the success rate of error injection was improved, and the reliability and availability of the server were enhanced.
Smart Images

Figure CN116340041B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage, and in particular to a data storage method, system, apparatus, and computer-readable storage medium. Background Technology
[0002] With the rapid development of the internet, servers are becoming increasingly common. Server reliability, availability, and serviceability are crucial indicators for evaluating server quality. A server typically includes: a hardware error checker, fault isolation registers, PNOR flash memory, an on-chip controller, and a BMC (Baseboard Management Controller). To verify the reliability, availability, and serviceability of servers, especially OpenPower servers, tools are generally used to inject error information into the system to perform RAS (Reliability, Availability, and Serviceability) testing.
[0003] In existing technology, after an injection error, the hardware error checker detects an unrecoverable error and sets the corresponding FIR (Fault Isolation Register) bit, issuing a platform checkstop signal. The OCC (On-Chip Controller), after collecting the checkstop signal, analyzes it to obtain the required FIR data. Then, the OCC saves 8 bytes of FIR data to a memory space of the BMC each time, and sends an IPMI (Intelligent Platform Management Interface) command to instruct the BMC to store these 8 bytes of FIR data in the PNOR flash memory, until all FIR data is stored. This method requires multiple IPMI commands to ensure all FIR data is transferred to the PNOR flash memory via the BMC. However, because the OCC can only operate for 5 seconds after starting to collect the checkstop signal, it cannot guarantee that all FIR data will be written to the PNOR flash memory within 5 seconds, potentially leading to injection failure and affecting RAS testing. Summary of the Invention
[0004] The purpose of this invention is to provide a data storage method, system, device, and computer-readable storage medium. After determining that the received information is preset information, the processor parses the preset information within a first preset time period and transmits the information to the BMC in the form of preset bytes a first preset number of times. Once the BMC receives all the parsed preset information, the processor controls the BMC to transmit all the information to the PNOR flash memory in a second preset number of times within the first preset time period, thus completing the data storage. Because the sum of the first preset time and the second preset time is less than a preset target time, it can be guaranteed that all the parsed preset information can be stored in the PNOR flash memory, reducing data transmission time and greatly improving the error injection success rate.
[0005] To address the aforementioned technical problems, this invention provides a data storage method, which includes:
[0006] Determine whether the preset information has been received;
[0007] If the preset information is received, the preset information is parsed according to the preset parsing method within a first preset time, and the parsed preset information is transmitted to the BMC in the form of preset bytes in a first preset number of times.
[0008] Determine whether the BMC has received all the parsed preset information;
[0009] If the BMC receives all the parsed preset information, it controls the BMC to transmit the parsed preset information to the PNOR flash memory in a second preset time. The sum of the first preset time and the second preset time is less than the preset target time, and the second preset number is less than the first preset number.
[0010] Preferably, determining whether preset information has been received includes:
[0011] Determine whether the preset information meets the preset conditions;
[0012] If so, it is determined that the preset information has been received;
[0013] If not, it is determined that the preset information has not been received.
[0014] Preferably, determining whether the preset information meets preset conditions includes:
[0015] Determine the prompt bit for the preset information;
[0016] Determine whether the prompt bit is the same as the preset prompt bit;
[0017] If so, it is determined that the preset information meets the preset conditions;
[0018] If not, then the preset information is determined to not meet the preset conditions.
[0019] Preferably, after transmitting the parsed preset information to the BMC in the form of preset bytes in a first preset number of times, the method further includes:
[0020] The parsed preset information is marked so that the marked preset information can be used to determine whether the BMC has received all the parsed preset information.
[0021] Preferably, determining whether the BMC has received all the parsed preset information includes:
[0022] Determine whether the BMC has received the preset information after the tag;
[0023] If so, it is determined that the BMC has received all the parsed preset information;
[0024] If not, it is determined that the BMC has not received all the parsed preset information.
[0025] Preferably, after determining whether the BMC has received all the parsed preset information, the method further includes:
[0026] If the BMC does not receive all the parsed preset information, the alarm control module will issue an alarm.
[0027] Preferably, the alarm includes: audible alarm and / or visual alarm.
[0028] To address the aforementioned technical problems, the present invention also provides a data storage system, the system comprising:
[0029] The first judgment unit is used to determine whether preset information has been received. If so, the first transmission unit is triggered.
[0030] The first transmission unit is configured to parse the preset information according to a preset parsing method within a first preset time, and transmit the parsed preset information to the BMC in the form of preset bytes in a first preset number of times;
[0031] The first judgment unit is used to determine whether the BMC has received all the parsed preset information; if so, the second transmission unit is triggered.
[0032] The second transmission unit is used to control the BMC to transmit the parsed preset information to the PNOR flash memory in a second preset number of times within a second preset time period. The sum of the first preset time and the second preset time is less than the preset target time, and the second preset number of times is less than the first preset number of times.
[0033] To address the aforementioned technical problems, the present invention also provides a data storage device, which includes:
[0034] Memory, used to store computer programs;
[0035] A processor for implementing the data storage method as described above when executing the computer program.
[0036] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data storage method described above.
[0037] The purpose of this invention is to provide a data storage method, system, device, and computer-readable storage medium. After determining that the received information is preset information, the processor parses the preset information within a first preset time period and transmits the information to the BMC in the form of preset bytes a first preset number of times. Once the BMC receives all the parsed preset information, the processor controls the BMC to transmit all the information to the PNOR flash memory in a second preset number of times within the first preset time period, thus completing the data storage. Because the sum of the first preset time and the second preset time is less than a preset target time, it can be guaranteed that all the parsed preset information can be stored in the PNOR flash memory, reducing data transmission time and greatly improving the error injection success rate. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and 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.
[0039] Figure 1 A process flowchart of a data storage method provided by the present invention;
[0040] Figure 2 A schematic diagram illustrating data transmission provided by the present invention;
[0041] Figure 3 This is a schematic diagram of a data storage device provided by the present invention. Detailed Implementation
[0042] The core of this invention is to provide a data storage method, system, device, and computer-readable storage medium. After determining that the received information is preset information, the processor parses the preset information within a first preset time period and transmits it to the BMC in the form of preset bytes a first preset number of times. Once the BMC receives all the parsed preset information, the processor controls the BMC to transmit all the information to the PNOR flash memory in a second preset number of times within the first preset time period, completing the data storage. Because the sum of the first preset time and the second preset time is less than a preset target time, it can be guaranteed that all the parsed preset information can be stored in the PNOR flash memory, reducing data transmission time and greatly improving the error injection success rate.
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0044] Please refer to Figure 1 , Figure 1 A process flowchart of a data storage method provided by the present invention includes:
[0045] S10: Determine whether preset information has been received;
[0046] In this invention, because the hardware error checker detects an unrecoverable error and sets the corresponding fault isolation register (FIR) bit, it sends a preset message. The processor will only parse the message and complete the subsequent data storage operation after receiving the preset message. Therefore, it is necessary to first determine whether the processor has received the preset message, which improves the reliability of the solution.
[0047] S11: If preset information is received, the preset information is parsed according to the preset parsing method within the first preset time, and the parsed preset information is transmitted to BMC in the form of preset bytes in the form of a first preset number of times.
[0048] In this invention, if the processor determines that it has received preset information, it needs to parse this preset information and transmit it to the BMC within a first preset time and through a first preset number of times, thus ensuring the integrity of data transmission.
[0049] It should be noted that in practical applications, the processor typically adds 8 bytes of data to the BMC memory space at a time.
[0050] S12: Determine whether the BMC has received all the parsed preset information;
[0051] In this invention, after the processor sends the parsed data to the BMC, it also needs to determine whether the BMC has received all the parsed preset information to ensure that the BMC can receive all the parsed preset information, thus laying the foundation for subsequent storage in the PNOR flash memory and preventing injection failure due to the BMC not receiving all the parsed preset information.
[0052] S13: If the BMC receives all the parsed preset information, it controls the BMC to transmit the parsed preset information to the PNOR flash memory in a second preset time. The sum of the first preset time and the second preset time is less than the preset target time, and the second preset number is less than the first preset number.
[0053] In this invention, after determining that the BMC has received all the parsed preset information, the information is transmitted to the BMC within a second preset time and through a second preset number of times. However, it is crucial to ensure that the sum of the first and second preset times is less than a preset target time. This is because the processor can only operate for the preset target time after receiving the preset information. This ensures that all parsed data is stored in the PNOR flash memory while the processor is operating, resulting in successful error injection. Furthermore, it is necessary to ensure that the second preset number of times is less than the first preset number of times. Only in this way can the data transmission time from the BMC to the PNOR flash memory be shortened compared to existing technologies, thus improving the reliability of the solution.
[0054] It should be noted that in practical applications, the processor sends an IPMI msg (writeFlush) to instruct the BMC to write all FIR data from the BMC memory space to the PNOR flash. A data transfer diagram is shown below. Figure 2 As shown, Figure 2 LPC (LowPin Count) is used for data transmission between BMC and OCC. SPI (Serial Peripheral Interface) is used for data transmission between BMC and PNOR. BMC includes IPMI BT and SCRAM (Fast Getaway). IPMI BT indicates that the IPMI signal travels through the BT channel. SCRAM is a representation of the BMC rapidly transmitting data to PNOR based on OCC control.
[0055] This embodiment provides a data storage method. After determining that the received information is preset information, the processor parses the preset information within a first preset time period and transmits it to the BMC in the form of preset bytes in a first preset number of times. Once the BMC receives all the parsed preset information, the processor controls the BMC to transmit all the information to the PNOR flash memory in a second preset number of times within the first preset time period, completing the data storage. Because the sum of the first preset time and the second preset time is less than a preset target time, it can be guaranteed that all the parsed preset information can be stored in the PNOR flash memory, reducing data transmission time and greatly improving the error injection success rate.
[0056] Based on the above embodiments:
[0057] In one preferred embodiment, determining whether preset information has been received includes:
[0058] Determine whether the preset information meets the preset conditions;
[0059] If so, it is determined that the preset information has been received;
[0060] If not, it is determined that the preset information has not been received.
[0061] In this invention, the method for determining whether preset information has been received is to determine whether the preset information meets preset conditions. If the preset information meets the preset conditions, it is determined that the preset information has been received; if the preset information does not meet the preset conditions, it is determined that the preset information has not been received. This method can more accurately determine whether the preset information has been received, thus improving the accuracy of the solution.
[0062] In practical applications, methods to determine whether preset information meets preset conditions include judging whether the prompt bits of the preset information are the same as the preset prompt bits or other methods.
[0063] As a preferred embodiment, determining whether preset information meets preset conditions includes:
[0064] Determine the prompt position for the preset information;
[0065] Determine if the prompt position is the same as the preset prompt position;
[0066] If so, then it is determined that the preset information meets the preset conditions;
[0067] If not, then the preset information is determined to be inconsistent with the preset conditions.
[0068] In this invention, the method for determining whether preset information meets preset conditions is to determine whether the prompt bit of the preset information is the same as the preset prompt bit. If the prompt bit of the preset information is the same as the preset prompt bit, it is determined that the preset information meets the preset conditions; if the prompt bit of the preset information is not the same as the preset prompt bit, it is determined that the preset information meets the preset conditions. This method can determine whether the preset information meets the preset conditions more quickly.
[0069] In a preferred embodiment, after transmitting the parsed preset information to the BMC in the form of preset bytes a first preset number of times, the method further includes:
[0070] The parsed preset information is marked so that the marked preset information can be used to determine whether the BMC has received all the parsed preset information.
[0071] In this invention, after transmitting the parsed preset information to the BMC in the form of preset bytes in a first preset number of times, the parsed preset information is marked. In this way, the subsequent judgment on whether the BMC has received all the parsed preset information can be based on this marked preset information, thereby improving the reliability of the solution.
[0072] It should be noted that the method for marking the parsed preset information is not specifically limited in this invention.
[0073] As a preferred embodiment, determining whether the BMC has received all the parsed preset information includes:
[0074] Determine whether the BMC has received the preset information after the tag;
[0075] If so, it is determined that the BMC has received all the parsed preset information;
[0076] If not, it is determined that BMC has not received all the parsed preset information.
[0077] In this invention, the method for determining whether the BMC has received the marked preset information after marking the parsed preset information becomes: determine whether the BMC has received the marked preset information; if the BMC has received the marked preset information, it is determined that the BMC has received all the parsed preset information; if the BMC has not received the marked preset information, it is determined that the BMC has not received all the parsed preset information, thus more accurately determining whether the BMC has received all the parsed preset information.
[0078] In a preferred embodiment, after determining whether the BMC has received all the parsed preset information, the method further includes:
[0079] If the BMC does not receive all the parsed preset information, the alarm control module will issue an alarm.
[0080] In this invention, if the BMC fails to receive all the parsed preset information, the alarm module will issue an alarm to inform the user, promptly alerting the BMC to any faults that occur when receiving the preset information. This facilitates subsequent maintenance and improves the reliability and security of the solution.
[0081] In practical applications, alarms issued by the alarm module can be audible alarms, visual alarms, or a combination of both.
[0082] As a preferred embodiment, the alarm includes: audible alarm and / or visual alarm.
[0083] In this invention, the alarm module issues audible alarms, display alarms, and both audible and display alarms, promptly alerting users to faults that occur when the BMC receives preset information.
[0084] The present invention also provides an embodiment of a data storage system, the system comprising:
[0085] The first judgment unit is used to determine whether preset information has been received. If so, the first transmission unit is triggered.
[0086] The first transmission unit is used to parse the preset information according to the preset parsing method within a first preset time, and transmit the parsed preset information to the BMC in the form of preset bytes in a first preset number of times.
[0087] The first judgment unit is used to determine whether the BMC has received all the parsed preset information. If so, the second transmission unit is triggered.
[0088] The second transmission unit is used to control the BMC to transmit the parsed preset information to the PNOR flash memory in a second preset number of times within a second preset time. The sum of the first preset time and the second preset time is less than the preset target time, and the second preset number of times is less than the first preset number of times.
[0089] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, and they will not be repeated here.
[0090] Please refer to Figure 3 , Figure 3 A schematic diagram of a data storage device provided by the present invention. The device includes:
[0091] Memory 20 is used to store computer programs;
[0092] The processor 21 is used to implement the data storage method described above when executing a computer program.
[0093] The data storage device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0094] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0095] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the data storage method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, data storage methods.
[0096] In some embodiments, the data storage device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0097] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the data storage device and may include more or fewer components than illustrated.
[0098] The purpose of this embodiment is to provide a data storage device in which the memory 20 is used to store computer programs and the processor 21 is used to execute the computer programs to implement the steps of the data storage method described above, so as to make the data transmission process more efficient and accurate.
[0099] The present invention also provides an embodiment corresponding to a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the data storage method described above.
[0100] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0101] The computer-readable storage medium provided in this embodiment corresponds to the method described above, and therefore has the same beneficial effects as the method described above. Therefore, for the embodiments of the computer-readable storage medium, please refer to the description of the embodiments in the method section, which will not be repeated here.
[0102] It should be noted that, in this specification, 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.
[0103] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data storage method, characterized in that, include: Determine whether a preset message has been received; the preset message is the message sent by the hardware error checker when it detects an unrecoverable error and sets the corresponding fault isolation register bit. If the preset information is received, the preset information is parsed according to the preset parsing method within a first preset time, and the parsed preset information is transmitted to the BMC in the form of preset bytes in a first preset number of times. Determine whether the BMC has received all the parsed preset information; If the BMC receives all the parsed preset information, it controls the BMC to transmit the parsed preset information to the PNOR flash memory in a second preset time. The sum of the first preset time and the second preset time is less than the preset target time, and the second preset number is less than the first preset number. After transmitting the parsed preset information to the BMC in the form of preset bytes in a first preset number of times, the process also includes: The parsed preset information is marked so that the marked preset information can be used to determine whether the BMC has received all the parsed preset information; Determining whether the BMC has received all the parsed preset information includes: Determine whether the BMC has received the preset information after the tag; If so, it is determined that the BMC has received all the parsed preset information; If not, it is determined that the BMC has not received all the parsed preset information.
2. The data storage method as described in claim 1, characterized in that, Determine whether preset information has been received, including: Determine whether the preset information meets the preset conditions; If so, it is determined that the preset information has been received; If not, it is determined that the preset information has not been received.
3. The data storage method as described in claim 2, characterized in that, Determining whether the preset information meets preset conditions includes: Determine the prompt bit of the preset information; Determine whether the prompt bit is the same as the preset prompt bit; If so, it is determined that the preset information meets the preset conditions; If not, then the preset information is determined to not meet the preset conditions.
4. The data storage method according to any one of claims 1 to 3, characterized in that, After determining whether the BMC has received all the parsed preset information, the process further includes: If the BMC does not receive all the parsed preset information, the alarm control module will issue an alarm.
5. The data storage method as described in claim 4, characterized in that, The alarms include: audible alarms and / or visual alarms.
6. A data storage system, characterized in that, include: The first judgment unit is used to determine whether preset information has been received. If so, the first transmission unit is triggered. The preset information is the information issued by the hardware error checker when it detects an unrecoverable error and sets the corresponding fault isolation register bit. The first transmission unit is configured to parse the preset information according to a preset parsing method within a first preset time, and transmit the parsed preset information to the BMC in the form of preset bytes in a first preset number of times; The first judgment unit is used to determine whether the BMC has received all the parsed preset information; if so, the second transmission unit is triggered. The second transmission unit is used to control the BMC to transmit the parsed preset information to the PNOR flash memory in a second preset number of times within a second preset time period, wherein the sum of the first preset time and the second preset time is less than a preset target time, and the second preset number of times is less than the first preset number of times; After transmitting the parsed preset information to the BMC in the form of preset bytes in a first preset number of times, the process also includes: The parsed preset information is marked so that the marked preset information can be used to determine whether the BMC has received all the parsed preset information; Determining whether the BMC has received all the parsed preset information includes: Determine whether the BMC has received the preset information after the tag; If so, it is determined that the BMC has received all the parsed preset information; If not, it is determined that the BMC has not received all the parsed preset information.
7. A data storage device, characterized in that, include: Memory, used to store computer programs; A processor for implementing the data storage method as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data storage method as described in any one of claims 1 to 5.