CN-121681427-B - Data loading method and electronic equipment
Abstract
The application provides a data loading method and electronic equipment, which relate to the technical field of storage, and the method and the electronic equipment are used for detecting whether a target memory is replaced or not by constructing a key product data management mechanism with a configuration process as a core, and acquiring key product data from a configuration cache file and writing the key product data into a new target memory when the target memory is replaced.
Inventors
- SONG YIQIANG
- SUN MINGGANG
- DONG QIANGQIANG
Assignees
- 苏州元脑智能科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251029
Claims (10)
- 1. A data loading method, applied to a storage system including a configuration process and a business process, comprising: periodically reading key product data from a target memory in the storage system through a first protocol or a second protocol by using the configuration process, serializing the key product data and storing the serialized key product data as a configuration cache file; when the business process is started or restarted, a data request is sent to the configuration process through an inter-process communication mechanism so as to acquire the key product data, wherein the configuration process calls a monitoring thread to monitor the data request sent by the business process through the inter-process communication mechanism; acquiring a preset marking bit in a target memory in the storage system based on the configuration process, and determining the replacement state of the target memory based on the marking bit; if the target memory is determined to be the replaced memory, verifying whether the configuration process has preloaded key product data stored in the original memory into a configuration cache file; If the key product data is determined to be preloaded into the configuration cache file, analyzing the configuration cache file to obtain the key product data, and writing the key product data into the replaced target memory through the first protocol or the second protocol.
- 2. The data loading method of claim 1, wherein verifying whether the configuration process has preloaded critical product data stored in the primary memory into the configuration cache file comprises: Checking whether the configuration cache file is stored in a preset position or not, and executing data format verification on the configuration cache file stored in the preset position; And if the data format check is passed, determining that the key product data is preloaded to the configuration cache file.
- 3. The data loading method according to claim 2, wherein the parsing the configuration buffer file to obtain the critical product data and writing the critical product data to the replaced target memory through the first protocol or the second protocol includes: analyzing key product data in the configuration cache file; establishing a first protocol communication link or a second protocol communication link with the target memory; The critical product data is written to the target memory based on the first protocol communication link or the second protocol communication link.
- 4. The data loading method of claim 2, further comprising: And if the key product data is determined not to be preloaded in the configuration cache file, generating first alarm information and terminating writing the key product data into the target memory.
- 5. The data loading method of claim 1, further comprising: And reading the written key product data, comparing the key product data with the original key product data in the configuration cache file one by one, and if the key product data are inconsistent, executing a re-writing operation, wherein the re-writing operation is repeated for a preset number of times.
- 6. The data loading method of claim 1, further comprising: and if the target memory is not replaced, continuously reading the key product data from the target memory according to a preset period based on the configuration process, and preloading the key product data to a configuration cache file.
- 7. The data loading method according to claim 6, wherein the continuing to read the critical product data from the target memory based on the configuration process according to a preset period and preloading the critical product data into a configuration cache file includes: Calling a reading subprocess to read key product data in the target memory in a preset period, wherein the reading subprocess is created by the configuration process and is connected with the target memory through the first protocol or the second protocol; performing data processing on the key product data according to a preset format to generate key product data in the preset format; And storing the key product data in the preset format to the configuration cache file at a preset position.
- 8. The data loading method of claim 6, further comprising: responding to the data request, and searching whether the configuration cache file exists or not; And if the configuration cache file exists, returning the key product data, and if the configuration cache file does not exist, returning second alarm information.
- 9. The data loading method according to claim 7, wherein the acquiring a flag bit preset in a target memory in the storage system based on the configuration process and determining the replacement state of the target memory based on the flag bit includes: reading a preset mark bit in the target memory by using the reading subprocess; if the marking bit is a first preset value, determining that the target memory is not replaced; and if the marking bit is a second preset value, determining that the target memory is replaced.
- 10. An electronic device, comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data loading method of any one of claims 1-9.
Description
Data loading method and electronic equipment Technical Field The present application relates to the field of storage technologies, and in particular, to a data loading method and an electronic device. Background The key product data (Vital Product Data, VPD) is used as metadata in the storage device for identifying key information such as device identity, hardware configuration and firmware version, and the reading efficiency directly affects the high availability and service continuity of the system. In the related art, an Electrically Erasable Programmable Read Only Memory (EEPROM) is generally used to store VPD. And the business process directly reads the data through a serial reading mode when needed. EEPROM as physical storage medium has single point failure risk, which can cause VPD permanent loss, and after the failure EEPROM is replaced, the EEPROM lacks effective automatic data write-back mechanism, and has the advantages of manual writing, complicated operation and maintenance flow and easy error. Therefore, the data loading and management architecture for the VPD in the related art has obvious defects, and the realization of the high availability target of the storage system is restricted. Disclosure of Invention The application provides a data loading method and electronic equipment, which at least solve the problem that the data loading and management architecture aiming at VPD in the related technology has obvious defects. The application provides a data loading method, which comprises the following steps: periodically reading key product data from a target memory in a storage system through a first protocol or a second protocol by using a configuration process, serializing the key product data and storing the serialized key product data as a configuration cache file; When a business process is started or restarted, a data request is sent to a configuration process through an inter-process communication mechanism to obtain key product data, wherein the configuration process calls a monitoring thread to monitor the data request sent by the business process through the inter-process communication mechanism; acquiring a preset marking bit in a target memory in a storage system based on a configuration process, and determining a replacement state of the target memory based on the marking bit; If the target memory is determined to be the replaced memory, verifying whether the configuration process has preloaded key product data stored in the original memory into a configuration cache file; If the key product data is determined to be preloaded into the configuration cache file, the configuration cache file is analyzed to obtain the key product data, and the key product data is written into the replaced target memory through the first protocol or the second protocol. The application also provides a data loading device, which comprises: the storage unit is used for periodically reading key product data from a target memory in the storage system through a first protocol or a second protocol by utilizing a configuration process, serializing the key product data and storing the serialized key product data into a configuration cache file; The system comprises an acquisition unit, a configuration process and a monitoring thread, wherein the acquisition unit is used for transmitting a data request to the configuration process through an inter-process communication mechanism when a service process is started or restarted so as to acquire key product data, and the configuration process calls the monitoring thread to monitor the data request transmitted by the service process through the inter-process communication mechanism; The determining unit is used for acquiring a preset marking bit in a target memory in the storage system based on the configuration process and determining the replacement state of the target memory based on the marking bit; The verification unit is used for verifying whether the configuration process pre-loads the key product data stored in the original memory into the configuration cache file if the target memory is determined to be the replaced memory; And the writing unit is used for analyzing the configuration cache file to acquire the key product data if the key product data is determined to be preloaded into the configuration cache file, and writing the key product data into the replaced target memory through the first protocol or the second protocol. The application also provides electronic equipment, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor is used for realizing any data loading method when executing the computer program. The application also provides a computer readable storage medium having a computer program stored therein, wherein the computer program when executed by a processor implements the steps of any of the data loading methods described above. The application also provides a computer program