Data storage processing methods, devices, electronic equipment and storage media

By dynamically allocating the optimal primary storage device and utilizing the backup storage device, the problems of unbalanced data storage load and easy data loss of terminal devices in the monitoring system are solved, realizing efficient utilization of system resources and continuity of data storage.

CN116225337BActive Publication Date: 2025-10-31ZHEJIANG SUPCON INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310237886.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2025-10-31
Estimated Expiration
2043-03-06

AI Technical Summary

Technical Problem

Traditional monitoring systems suffer from problems such as unbalanced data storage on terminal devices, high storage pressure, and easy data loss.

Method used

By acquiring the identifiers and corresponding relationships of terminal devices, the optimal target primary storage device is dynamically allocated, and in the event of a primary storage device failure, backup storage devices are used for data storage or retrieval, ensuring the continuity and integrity of data storage.

Benefits of technology

It achieves full utilization of system resources and optimal overall efficiency, avoids data loss, ensures the continuity and integrity of data storage, and supports the dynamic expansion of storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225337B_ABST
    Figure CN116225337B_ABST
Patent Text Reader

Abstract

This application provides a data storage processing method, apparatus, electronic device, and storage medium, relating to the field of data processing technology. The method, based on the acquired identifier of the terminal device and the currently recorded correspondence between the terminal device and storage devices, can determine whether the terminal device is a newly added device. When the terminal device is a newly added device, i.e., when the stored data of the terminal device is acquired for the first time, the performance of the storage devices can be compared based on the resource information of each main storage device. This allows for real-time dynamic selection of the storage device with the best current performance from among the main storage devices as the target main storage device for the terminal device. By allocating the target main storage device to the terminal device based on the real-time resource information of each main storage device, the resource usage on each main storage device can be kept basically the same, avoiding excessive resource utilization and load imbalance on individual main storage devices, thereby achieving full utilization of system resources and optimal overall efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a data storage processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] In recent years, surveillance systems have played an indispensable role in people's lives, with applications in scenarios such as intelligent buildings, electromechanical transportation, etc. The use of surveillance systems undoubtedly involves a series of data processing issues, including data storage and retrieval from terminal devices.

[0003] In traditional monitoring systems, the storage of terminal device data is based on a pre-configured correspondence between terminal devices and storage devices, storing the collected data from the terminal devices into their corresponding storage devices.

[0004] When the amount of data stored is too large, it will put a lot of pressure on the storage device, and the stored data can easily be lost due to storage device failure. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a data storage processing method, apparatus, electronic device, and storage medium, so as to solve the problems of unbalanced data storage load, high storage pressure, and easy data loss in the prior art.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, embodiments of this application provide a data storage processing method applied to a processing device in a data storage processing system, the data storage processing system including multiple main storage devices, the method comprising:

[0008] Obtain the stored data of the terminal device and the identifier of the terminal device;

[0009] Based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, it is determined whether the terminal device is a newly added device;

[0010] If so, then based on the identifier of the terminal device and the resource information of each main storage device in the data storage and processing system, a target main storage device is allocated to the terminal device, and the correspondence between the terminal device and the target main storage device is recorded. The resource information includes: the processing capacity of the storage device, memory usage information, and disk usage information.

[0011] The storage data of the terminal device is stored in the target main storage device.

[0012] Optionally, after determining whether the terminal device is a newly added device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, the method further includes:

[0013] If the terminal device is not a newly added device, then based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, the target main storage device corresponding to the terminal device is determined, and the target main storage device is allocated to the terminal device.

[0014] Optionally, storing the terminal device's storage data in the target main storage device includes:

[0015] Based on the primary / backup attribute information of the storage device recorded in the processing device, it is determined whether a backup storage device for the target primary storage device exists in the data storage processing system;

[0016] If so, then based on the most recent data update time of the target primary storage device and the most recent data update time of the backup storage device, it is determined whether the data storage of the target primary storage device and the backup storage device is synchronized;

[0017] If synchronization is achieved, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

[0018] If they are not synchronized, after synchronizing the data of the target primary storage device and the backup storage device, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

[0019] Optionally, before determining whether a backup storage device for the target primary storage device exists in the data storage processing system based on the primary / backup attribute information of the storage device recorded in the processing device, the method further includes:

[0020] Obtain the hardware attribute information of each storage device in the data storage and processing system;

[0021] Based on the hardware attribute information of each storage device, the primary and backup identifiers and primary and backup association information of each storage device are determined. The primary and backup association information is used to indicate the association relationship between storage devices that are each other's primary and backup.

[0022] Based on the primary / backup identifiers and primary / backup association information of each storage device, primary / backup attribute information of the storage devices is generated and recorded.

[0023] Optionally, after storing the terminal device's storage data in the target main storage device, the method further includes:

[0024] Obtain a data read request sent by the client, wherein the data read request includes at least: an identifier of at least one target terminal device;

[0025] The data read request is parsed, and based on the correspondence between the target terminal device and the main storage device, the storage data corresponding to the target terminal device is read from the main storage device corresponding to the target terminal device, and the read storage data is fed back to the client.

[0026] Optionally, based on the correspondence between the target terminal device and the main storage device, reading the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device includes:

[0027] The operating status of the main storage device and backup storage device corresponding to each target terminal device is detected by the security heartbeat message.

[0028] If the main storage device corresponding to the target terminal device is operating normally, then the storage data corresponding to the target terminal device is read from the main storage device corresponding to the target terminal device.

[0029] If the main storage device corresponding to the target terminal device is in an abnormal operating state while the backup storage device is in a normal operating state, then the storage data corresponding to the target terminal device is read from the backup storage device corresponding to the target terminal device.

[0030] Optionally, it also includes:

[0031] Acquire newly added storage devices in the data storage and processing system;

[0032] Configure the network information of the newly added storage device and the existing storage devices in the same environment, and add the attribute information of the newly added storage device to the storage device configuration file recorded in the processing device. The storage device configuration file records the attribute information of each existing storage device, including hardware attribute information and primary / backup attribute information.

[0033] Secondly, this application also provides a data storage processing apparatus, which is applied to a processing device in a data storage processing system. The data storage processing system includes multiple main storage devices, and the apparatus includes: an acquisition module, a determination module, an allocation module, and a storage module.

[0034] The acquisition module is used to acquire the stored data of the terminal device and the identifier of the terminal device;

[0035] The determining module is used to determine whether the terminal device is a newly added device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device.

[0036] The allocation module is configured to, if so, allocate a target primary storage device to the terminal device based on the identifier of the terminal device and the resource information of each primary storage device in the data storage processing system, and record the correspondence between the terminal device and the target primary storage device. The resource information includes: the processing capacity of the storage device, memory usage information, and disk usage information.

[0037] The storage module is used to store the terminal device's storage data into the target main storage device.

[0038] Optionally, the allocation module is further configured to, if the terminal device is not a newly added device, determine the target main storage device corresponding to the terminal device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, and allocate the target main storage device to the terminal device.

[0039] Optionally, the storage module is specifically used to determine whether there is a backup storage device for the target primary storage device in the data storage processing system based on the primary / backup attribute information of the storage device recorded in the processing device;

[0040] If so, then based on the most recent data update time of the target primary storage device and the most recent data update time of the backup storage device, it is determined whether the data storage of the target primary storage device and the backup storage device is synchronized;

[0041] If synchronization is achieved, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

[0042] If they are not synchronized, after synchronizing the data of the target primary storage device and the backup storage device, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

[0043] Optionally, the apparatus further includes: a generation module;

[0044] The acquisition module is also used to acquire hardware attribute information of each storage device in the data storage processing system;

[0045] The determining module is further configured to determine the primary / backup identifier and primary / backup association information of each storage device based on the hardware attribute information of each storage device, wherein the primary / backup association information is used to indicate the association relationship between storage devices that are each other's primary / backup.

[0046] The generation module is used to generate and record the primary and secondary attribute information of the storage devices based on the primary and secondary identifiers and primary and secondary association information of each storage device.

[0047] Optionally, it also includes a data reading module;

[0048] Optionally, the acquisition module is further configured to acquire a data read request sent by the client, the data read request including at least: the identifier of at least one target terminal device;

[0049] The data reading module is used to parse the data reading request, and according to the correspondence between the target terminal device and the main storage device, read the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device, and feed back the read storage data to the client.

[0050] Optionally, the data reading module is specifically used to detect the operating status of the main storage device and the backup storage device corresponding to each target terminal device through security heartbeat messages;

[0051] If the main storage device corresponding to the target terminal device is operating normally, then the storage data corresponding to the target terminal device is read from the main storage device corresponding to the target terminal device.

[0052] If the main storage device corresponding to the target terminal device is in an abnormal operating state while the backup storage device is in a normal operating state, then the storage data corresponding to the target terminal device is read from the backup storage device corresponding to the target terminal device.

[0053] Optionally, the device further includes: an adding module;

[0054] The acquisition module is also used to acquire newly added storage devices in the data storage and processing system;

[0055] The adding module is used to configure the network information of the newly added storage device and the existing storage devices in the same environment, and to add the attribute information of the newly added storage device to the storage device configuration file recorded in the processing device. The storage device configuration file records the attribute information of each existing storage device, including hardware attribute information and primary / backup attribute information.

[0056] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect.

[0057] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the method provided in the first aspect.

[0058] The beneficial effects of this application are:

[0059] This application provides a data storage processing method, apparatus, electronic device, and storage medium. The method, based on the acquired identifier of the terminal device and the currently recorded correspondence between the terminal device and the storage device, can determine whether the terminal device is a newly added device. When the terminal device is a newly added device, it can allocate the optimal target primary storage device to the terminal device according to the resource information of each primary storage device, thereby establishing a correspondence between the newly added terminal device and the target primary storage device, and storing the terminal device's storage data in the target primary storage device. When the terminal device is a newly added device, i.e., when the terminal device's storage data is acquired for the first time, this method can compare the performance of the storage devices based on the current resource information of each primary storage device, thereby dynamically selecting the storage device with the best current performance from among the primary storage devices as the target primary storage device for the terminal device in real time. By allocating the target primary storage device to the terminal device based on the real-time resource information of each primary storage device, it can ensure that the resource usage of each primary storage device is basically the same, avoiding excessive resource utilization and load imbalance of individual primary storage devices, thus achieving full utilization of system resources and optimal overall efficiency.

[0060] Secondly, by recording the correspondence between each storage device and each terminal device in real time, it is possible to save the storage data of the same terminal device to the same main storage device based on the recorded correspondence after the data storage processing system fails or restarts. This ensures the continuity and integrity of the storage data of the same terminal device and facilitates subsequent data management and maintenance.

[0061] In addition, this embodiment associates a primary storage device with a backup storage device, so that when the primary storage device fails, data can be stored or retrieved through the backup storage device, thus avoiding the loss of stored data caused by the failure of the primary storage device.

[0062] Finally, by dynamically expanding storage devices without stopping system operation, uninterrupted data storage and retrieval can be guaranteed, thereby improving the system's data processing performance. Attached Figure Description

[0063] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is a schematic diagram of the architecture of a data storage and processing system provided in an embodiment of this application;

[0065] Figure 2 This is a schematic diagram of the architecture of another data storage processing system provided in an embodiment of this application;

[0066] Figure 3 A schematic flowchart illustrating a data storage processing method provided in an embodiment of this application;

[0067] Figure 4 A flowchart illustrating another data storage processing method provided in an embodiment of this application;

[0068] Figure 5 This is a complete flowchart illustrating a data storage processing method provided in an embodiment of this application.

[0069] Figure 6 A flowchart illustrating another data storage processing method provided in an embodiment of this application;

[0070] Figure 7 A flowchart illustrating another data storage processing method provided in an embodiment of this application;

[0071] Figure 8 A flowchart illustrating another data storage processing method provided in an embodiment of this application;

[0072] Figure 9 A flowchart illustrating another data storage processing method provided in an embodiment of this application;

[0073] Figure 10 A schematic diagram of a data storage processing apparatus provided in an embodiment of this application;

[0074] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0076] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0077] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0078] Figure 1 This is a schematic diagram of the architecture of a data storage and processing system provided in an embodiment of this application, such as... Figure 1 As shown, the data storage processing system may include multiple clients, processing devices, and multiple storage devices. The processing devices can communicate with each client and each storage device to store data on the terminal device via a data storage request initiated by the client, or to query the stored data on the terminal device via a data query request initiated by the client. The processing device may be a data management server, and the storage devices may be storage servers.

[0079] Figure 2 This is a schematic diagram of another data storage processing system architecture provided in an embodiment of this application. In some possible embodiments, such as... Figure 2 As shown, the client may include a data request unit and a data receiving unit; the processing device may include a data query unit, an information parsing unit, a data receiving unit, and a data integration unit; the storage device may include a primary storage device and a backup storage device.

[0080] During the data query process, the data query unit of the processing device receives a data query request from at least one client through the data request unit and forwards the request to the information parsing unit. The information parsing unit sorts the terminal device information stored on different storage devices according to the terminal device data storage distribution table and requests data from the corresponding main storage device for each terminal device. When the main storage device is operating normally, it responds to the data query request and returns the query result. The processing device receives the query result through the data receiving unit and integrates it through the data integration unit, then feeds the integrated query result back to the client. The client then queries the result through the data receiving unit. Conversely, if the main storage device is not operating normally, the backup storage server responds to the data query request.

[0081] During the data storage process, the processing equipment monitors and acquires the data from the terminal devices in real time, determines the target main storage device from among the main storage devices, allocates it to the terminal devices, and stores the collected data from the terminal devices into the target main storage device.

[0082] Figure 3 This is a flowchart illustrating a data storage processing method provided in an embodiment of this application. The method is applied to... Figure 1 or Figure 2 The processing device in the data storage processing system shown, such as Figure 3 As shown, the method may include:

[0083] S101. Obtain the stored data of the terminal device and the identifier of the terminal device.

[0084] This method can be applied to monitoring scenarios, where processing equipment can monitor and collect data from terminal devices in real time for storage. In this scenario, terminal devices can refer to intelligent electromechanical products, such as air conditioners, refrigerators, and monitors. Of course, terminal devices here are not limited to intelligent electromechanical products; they can also be IoT terminals in IoT scenarios, such as temperature sensors and humidity sensors.

[0085] The stored data of the terminal device acquired in this embodiment may include the terminal device's status information, such as the temperature, fan speed, and mode of an air conditioner. In practical applications, the processing device can acquire all data from the terminal device, not limited to status information, but also including battery information, device hardware attribute information, etc.

[0086] While acquiring the stored data of the terminal device, the processing device can also acquire the identifier of the terminal device, which uniquely identifies the terminal device.

[0087] S102. Based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, determine whether the terminal device is a newly added device.

[0088] In some embodiments, after the storage data of the terminal device is collected and stored for the first time, the processing device can record the correspondence between the terminal device and the storage device storing the storage data of the terminal device, so that when the storage data of the terminal device is collected again in the future, the storage data of the same terminal device can be stored in a storage device, which facilitates data management.

[0089] Optionally, based on the acquired terminal device identifier and the currently recorded correspondence between each terminal device and each main storage device, it can be determined whether the terminal device is a newly added device. A newly added device refers to a terminal device that has not stored any data before.

[0090] S103. If so, then based on the identifier of the terminal device and the resource information of each main storage device in the data storage and processing system, a target main storage device is allocated to the terminal device, and the correspondence between the terminal device and the target main storage device is recorded. The resource information includes: the processing capacity of the storage device, memory usage information, and disk usage information.

[0091] When a terminal device is determined to be a new device, the optimal performance storage device can be selected from the main storage devices based on their resource information. This device can then be used as the target main storage device for the terminal device. Simultaneously, the correspondence between the terminal device and the target main storage device is recorded to update the recorded correspondence between each terminal device and each main storage device in real time.

[0092] As can be seen from the above description of the data storage system, the storage device may include the primary storage device and the backup storage device. When storing data, the target primary storage device corresponding to the terminal device is usually determined from the primary storage device, while the backup storage device is only used for data backup to replace the primary storage device in order to perform functions when the primary storage device fails.

[0093] Optionally, the resource information of the main storage device includes, but is not limited to: the processing capacity of the storage device (CPU utilization); memory usage information, which may include: current memory usage or remaining amount, average memory usage and peak usage over a continuous preset period of time; disk usage information, which may include: current disk usage or remaining amount, disk read and write speed; and network information, which may include: Ethernet transmit and receive speeds.

[0094] Based on the resource information of each main storage device, the storage device with the best current resources can be selected as the target main storage device for the terminal device, so as to ensure that the resource usage of each main storage device is basically the same, thereby achieving full utilization of system resources and optimal overall efficiency.

[0095] Recording the correspondence between terminal devices and target main storage devices allows the data storage location of terminal devices to be found using the existing correspondence after a failure or restart of the data storage processing system during use, thereby ensuring the continuity and integrity of the stored data on the same terminal device during storage.

[0096] S104. Store the terminal device's storage data into the target main storage device.

[0097] Optionally, based on the target main storage device allocated to the terminal device, the acquired storage data of the terminal device can be stored in the target main storage device.

[0098] In summary, the data storage processing method provided in this embodiment, based on the acquired terminal device identifier and the currently recorded correspondence between terminal devices and storage devices, can determine whether a terminal device is a newly added device. When a terminal device is a newly added device, the optimal target primary storage device can be allocated to the terminal device according to the resource information of each primary storage device, thereby establishing a correspondence between the newly added terminal device and the target primary storage device, and storing the terminal device's storage data in the target primary storage device. When the terminal device is a newly added device, that is, when the terminal device's storage data is acquired for the first time, this method can compare the performance of storage devices based on the resource information of each primary storage device, thereby dynamically selecting the storage device with the best current performance from each primary storage device as the target primary storage device for the terminal device in real time. By allocating the target primary storage device to the terminal device through the real-time resource information of each primary storage device, it can ensure that the resource usage of each primary storage device is basically the same, avoiding excessive resource utilization and load imbalance of individual primary storage devices, thereby achieving full utilization of system resources and optimal overall efficiency.

[0099] Optionally, in step S102, after determining whether a terminal device is a new device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, the method further includes: if the terminal device is not a new device, then determining the target main storage device corresponding to the terminal device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, and allocating the target main storage device to the terminal device.

[0100] In one optional embodiment, based on the identifier of the terminal device, it can be queried whether the correspondence between the terminal device and the main storage device currently recorded includes the correspondence between the terminal device and the main storage device. That is, it can be queried whether the correspondence between the identifier of the terminal device and the main storage device has been recorded before. If it has been recorded, it can be considered that this is not the first time the storage data of the terminal device has been obtained, that is, the terminal device is not a newly added device. If it has not been recorded, it can be considered that this is the first time the storage data of the terminal device has been obtained, that is, the terminal device is a newly added device.

[0101] When the terminal device is not a newly added device, since the correspondence between the terminal device and the main storage device has already been recorded, the correspondence can be queried to determine the target main storage device corresponding to the terminal device. This allows the storage data of the same terminal device to be saved to the same main storage device, thereby ensuring the storage continuity and integrity of the storage data of the same terminal device and facilitating subsequent data management and maintenance.

[0102] Figure 4 A flowchart illustrating another data storage processing method provided in this application embodiment is shown below. Figure 4 As shown, step S104, storing the terminal device's storage data into the target main storage device, may include:

[0103] S201. Based on the primary / backup attribute information of the storage device recorded in the processing device, determine whether there is a backup storage device for the target primary storage device in the data storage processing system.

[0104] After determining the target primary storage device corresponding to the terminal device, the primary and backup attribute information of each storage device can be used to determine whether the target primary storage device has a corresponding backup storage device.

[0105] It's worth noting that the data storage processing system includes multiple storage devices, each with corresponding primary / backup attribute information. This information indicates whether a storage device acts as a primary or backup device, and also indicates the associated backup device when acting as a primary device, and the associated primary device when acting as a backup device. Not all primary storage devices will have a corresponding backup device.

[0106] Based on the target primary storage device of the terminal device and the primary / backup attribute information of each storage device, it can be determined whether a backup storage device exists for the target primary storage device.

[0107] S202. If so, then determine whether the data storage of the target primary storage device and the backup storage device is synchronized based on the latest data update time of the target primary storage device and the latest data update time of the backup storage device.

[0108] If a backup storage device exists for the target primary storage device, the data storage synchronization between the target primary storage device and the backup storage device is determined based on the recorded latest data update time of the target primary storage device and the backup storage device.

[0109] Optionally, the processing device can store the correspondence between each terminal device and each storage device in the form of a data storage distribution table. When a new device is added, the correspondence between the new device and its corresponding primary storage device will be added to the data storage distribution table to update the data storage distribution table in real time. Furthermore, for each primary or secondary storage device, when new storage data is stored, the recorded last data update time of the primary or secondary storage device will be refreshed.

[0110] Here, the system can determine whether the data on the target primary storage device and the backup storage device of the terminal device are synchronized based on the most recent data update time of the primary or backup storage device.

[0111] Optionally, if the most recent data update time of the target primary storage device and the backup storage device is the same, then the data of the target primary storage device and the backup storage device is determined to be synchronized; otherwise, the data of the target primary storage device and the backup storage device is considered to be out of sync.

[0112] S203. If synchronization is required, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

[0113] When the data of the target primary storage device and the backup storage device are synchronized, the storage data of the terminal device can be directly stored in the target primary storage device and the backup storage device corresponding to the target primary storage device, and the data update time of the target primary storage device and the backup storage device can be refreshed.

[0114] S204. If not synchronized, after synchronizing the data of the target primary storage device and the backup storage device, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

[0115] When the data of the target primary storage device and the backup storage device are out of sync, the data of the target primary storage device or the backup storage device can be supplemented based on the most recent data update time of the target primary storage device and the most recent data update time of the backup storage device. In other words, data recovery can be performed to synchronize the data of the target primary storage device and the backup storage device.

[0116] For example: If the last data update time of the target primary storage device is 15:00 on January 10, 2023, and the last data update time of the backup storage device is 12:00 on January 10, 2023, and the backup storage device has lost data between 12:00 and 15:00, then the data stored in the target primary storage device between 12:00 and 15:00 can be replenished to the backup storage device.

[0117] After synchronizing the data between the target primary storage device and the backup storage device, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively.

[0118] It is worth noting that the most recent data update time of the target primary or backup storage device is only updated after the data stored on the terminal device has been successfully stored in the target primary or backup storage device. If the storage fails, the most recent data update time is not updated. This ensures the accuracy of the recorded most recent data update time for each storage device, facilitating subsequent data backup and synchronization.

[0119] Figure 5 This is a complete flowchart illustrating a data storage processing method provided in an embodiment of this application, as shown below. Figure 5 As shown, the method may include:

[0120] S301. Obtain the stored data of the terminal device and the identifier of the terminal device.

[0121] S302. Determine whether the terminal device is a newly added device.

[0122] S303. If it is a new device, then according to the identifier of the terminal device and the resource information of each main storage device in the data storage and processing system, the target main storage device is allocated to the terminal device, and the correspondence between the terminal device and the target main storage device is recorded.

[0123] S304. If it is not a newly added device, then based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, determine the target main storage device corresponding to the terminal device and allocate the target main storage device to the terminal device.

[0124] S305. Determine whether a backup storage device exists in the data storage processing system for the target primary storage device.

[0125] S306. If not, store the terminal device's storage data in the target main storage device.

[0126] S307. If yes, then determine whether the data storage of the target primary storage device and the backup storage device is synchronized.

[0127] S308. If synchronization is required, the storage data of the terminal device will be stored in the target primary storage device and the backup storage device respectively.

[0128] S309. If not synchronized, perform data synchronization on the target primary storage device and the backup storage device.

[0129] S3010: Store the terminal device's storage data to the target primary storage device and the backup storage device respectively.

[0130] S3011. Determine whether the data storage of the terminal device is successful.

[0131] S3012. If successful, refresh the data update time of the target primary storage device and / or backup storage device.

[0132] S3013. If unsuccessful, the data storage process will end.

[0133] The execution principles of each step will not be elaborated further.

[0134] Figure 6 This is a flowchart illustrating another data storage processing method provided in an embodiment of this application; optionally, in step S201, before determining whether a backup storage device for the target primary storage device exists in the data storage processing system based on the primary / backup attribute information of the storage device recorded in the processing device, the method may further include:

[0135] S401. Obtain the hardware attribute information of each storage device in the data storage processing system.

[0136] Unlike the primary / backup attribute information mentioned above, the hardware attribute information here can refer to the resource information mentioned above. To a certain extent, the hardware attribute information can indicate the performance priority of the storage device.

[0137] In some embodiments, hardware attribute information may also include: CPU utilization, average and peak memory usage over 30 consecutive seconds, disk read / write speed, remaining disk space, Ethernet transmit and receive speed, etc.

[0138] S402. Based on the hardware attribute information of each storage device, determine the primary / backup identifier and primary / backup association information of each storage device. The primary / backup association information is used to indicate the association relationship between storage devices that are each other's primary / backup.

[0139] During the installation and configuration of the data storage processing system, primary / standby identifiers and primary / standby association information can be assigned to each storage device based on its hardware attribute information. The primary / standby association information indicates the relationship between two storage devices that act as both primary and standby.

[0140] Optionally, in this embodiment, a group number can be set to indicate the primary and backup association information of each storage device. Two storage devices that are each other's primary and backup can be identified by the same group number. That is to say, two storage devices with the same group number are each other's primary and backup. Which one is the primary storage device and which one is the backup storage device can be determined according to the primary and backup identifier of the storage device.

[0141] S403. Generate and record the primary and secondary attribute information of each storage device based on the primary and secondary identifiers and primary and secondary association information of each storage device.

[0142] Optionally, the primary / standby identifiers and primary / standby association information of each storage device can be used as the primary / standby attribute information of the storage device.

[0143] In some embodiments, the relevant information of each storage device can be stored in the form of a configuration table. The configuration table can record the primary / backup attribute information, hardware attribute information, and network configuration information of each storage device. The network configuration information may include: the network address information and port number of the storage device.

[0144] Figure 7 This is a flowchart illustrating another data storage processing method provided in an embodiment of this application; in step S104, after storing the terminal device's storage data into the target main storage device, the method further includes:

[0145] S501. Obtain the data read request sent by the client. The data read request includes at least the identifier of at least one target terminal device.

[0146] This embodiment also provides a method for querying stored data on a terminal device. A user can initiate a data read request to the processing device via a client. The data read request may include at least one identifier of the target terminal device.

[0147] It should be noted that a data read request is not limited to containing only the identifier of a single target terminal device. A data read request may be used to read some or all of the stored data corresponding to different target terminal devices.

[0148] S502, parse the data read request, and according to the correspondence between the target terminal device and the main storage device, read the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device, and feed back the read storage data to the client.

[0149] By parsing the data read request, the identifiers of each target terminal device can be obtained.

[0150] In one scenario, when the data read request only contains the identifier of the target terminal device, the default is to read all stored data corresponding to the target terminal device.

[0151] In another scenario, in addition to the identifier of the target terminal device, the data read request may also include the identifier of the data to be read corresponding to the target terminal device. Taking the status information of the target terminal device as an example, the data read request may also include a list of status information corresponding to the target terminal device. Taking the target terminal device as an example, the status information list may include information such as temperature, mode, and fan speed. The data read request may instruct the reader to read the temperature, mode, and fan speed status information of the air conditioner.

[0152] Optionally, based on the parsed identifier of the target terminal device and the recorded correspondence between the target terminal device and the main storage device, the indicated data or all data can be read from the main storage device corresponding to the target terminal device.

[0153] Figure 8 This is a flowchart illustrating another data storage processing method provided in an embodiment of this application; optionally, in step S502, reading the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device according to the correspondence between the target terminal device and the main storage device may include:

[0154] S601. Detect the operating status of the main storage device and backup storage device corresponding to each target terminal device through security heartbeat messages.

[0155] In some embodiments, when reading stored data of a target terminal device from a primary storage device, the operating status of the primary storage device and the backup storage device corresponding to the target terminal device can be detected first through heartbeat detection.

[0156] The processing device can command the primary storage device and the backup storage device to send security heartbeat messages to each other. If the primary storage device can receive the security heartbeat message sent by the backup storage device, it is determined that the primary storage device is operating normally; otherwise, it is determined that the primary storage device is operating abnormally. Similarly, if the backup storage device can receive the security heartbeat message sent by the primary storage device, it is determined that the backup storage device is operating normally; otherwise, it is determined that the backup storage device is operating abnormally.

[0157] S602. If the main storage device corresponding to the target terminal device is operating normally, then read the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device.

[0158] When the main storage device corresponding to the target terminal device is operating normally, the main storage device responds to the data read request, and the processing device receives the data read result from the main storage device.

[0159] Optionally, the processing device receives the data reading results from the main storage device corresponding to each target terminal device, integrates the data reading results from each main storage device, and feeds them back to the client in a unified manner.

[0160] S603. If the main storage device corresponding to the target terminal device is in an abnormal operating state while the backup storage device is in a normal operating state, then read the storage data corresponding to the target terminal device from the backup storage device corresponding to the target terminal device.

[0161] When the primary storage device corresponding to the target terminal device is in an abnormal operating state while the backup storage device is in a normal operating state, the backup storage device will respond to the data read request.

[0162] In some embodiments, the processing device can receive data reading results from the same client's data reading request within a set time period, integrate them, and then feed them back to the client. If not all data reading results from the same client are received within the set time period, the currently received data reading results can be integrated and then fed back to the client.

[0163] Optionally, the data reading result may consist of the data to be read itself (e.g., the status information of the terminal device), the query error code, and the data reading result error message. The query error code is used to indicate whether there is an anomaly in the data reading result, while the data reading result error message is used to quickly locate the cause of the data reading error.

[0164] Figure 9 This is a flowchart illustrating another data storage processing method provided in an embodiment of this application; the method of this application may further include:

[0165] S701. Obtain newly added storage devices in the data storage processing system.

[0166] This embodiment also provides a method for expanding storage devices. The processing device can detect the addition of new storage devices to the data storage processing system in real time to obtain relevant information about the new storage devices.

[0167] Alternatively, the user can initiate a storage device expansion request to the processing device through a client. The expansion request may include relevant information about the new storage device.

[0168] S702. Configure the network information of the newly added storage device and the existing storage devices in the same environment, and add the attribute information of the newly added storage device to the storage device configuration file recorded in the processing device. The storage device configuration file records the attribute information of each existing storage device, including hardware attribute information and primary / backup attribute information.

[0169] This method of expansion involves adding new storage devices to an existing network, thereby increasing the number of storage devices. Therefore, the new storage devices must first be configured with the same network information as the existing storage devices. Optionally, this can be achieved by configuring the new storage devices with the same IP (Internet Protocol) gateway, DNS (Domain Name System), and switches as the existing storage devices.

[0170] Next, the relevant information of the newly added storage device is added to the configuration table that records the relevant information of each existing storage device. Optionally, the primary / standby attribute information, network configuration information, and resource information of the newly added storage device can all be recorded in the configuration table.

[0171] Another way to add new storage devices is to expand the resources of an existing storage device. In this case, the processing device can automatically obtain the resource information to be expanded and automatically expand the resources of the storage device. Optionally, from a hardware perspective, this could be to add memory modules to the storage device to be expanded, while from a software perspective, it could be to update the resource information of the storage device to be expanded.

[0172] Optionally, after adding the relevant information of the newly added storage device to the configuration table, the processing device can reload the configuration table and read the relevant information of each storage device in the configuration table into memory.

[0173] Based on the expanded storage devices, when new terminal devices need to store data, the primary storage device can be allocated to the new terminal devices from the newly added storage devices.

[0174] In summary, the data storage processing method provided in this embodiment, based on the acquired terminal device identifier and the currently recorded correspondence between terminal devices and storage devices, can determine whether a terminal device is a newly added device. When a terminal device is a newly added device, the optimal target primary storage device can be allocated to the terminal device according to the resource information of each primary storage device, thereby establishing a correspondence between the newly added terminal device and the target primary storage device, and storing the terminal device's storage data in the target primary storage device. When the terminal device is a newly added device, that is, when the terminal device's storage data is acquired for the first time, this method can compare the performance of storage devices based on the resource information of each primary storage device, thereby dynamically selecting the storage device with the best current performance from each primary storage device as the target primary storage device for the terminal device in real time. By allocating the target primary storage device to the terminal device through the real-time resource information of each primary storage device, it can ensure that the resource usage of each primary storage device is basically the same, avoiding excessive resource utilization and load imbalance of individual primary storage devices, thereby achieving full utilization of system resources and optimal overall efficiency.

[0175] Secondly, by recording the correspondence between each storage device and each terminal device in real time, it is possible to save the storage data of the same terminal device to the same main storage device based on the recorded correspondence after the data storage processing system fails or restarts. This ensures the continuity and integrity of the storage data of the same terminal device and facilitates subsequent data management and maintenance.

[0176] In addition, this embodiment associates a primary storage device with a backup storage device, so that when the primary storage device fails, data can be stored or retrieved through the backup storage device, thus avoiding the loss of stored data caused by the failure of the primary storage device.

[0177] Finally, by dynamically expanding storage devices without stopping system operation, uninterrupted data storage and retrieval can be guaranteed, thereby improving the system's data processing performance.

[0178] The following describes the apparatus, equipment, and storage medium used to execute the data storage processing method provided in this application. The specific implementation process and technical effects are described above and will not be repeated here.

[0179] Figure 10 This is a schematic diagram of a data storage processing apparatus provided in an embodiment of this application. The functions implemented by this data storage processing apparatus correspond to the steps performed by the method described above. This apparatus can be understood as the processing device described above, such as... Figure 10 As shown, the device may include: an acquisition module 110, a determination module 120, an allocation module 130, and a storage module 140;

[0180] The acquisition module 110 is used to acquire the stored data of the terminal device and the identifier of the terminal device.

[0181] The determination module 120 is used to determine whether a terminal device is a newly added device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device.

[0182] The allocation module 130 is used to allocate a target main storage device to the terminal device according to the identifier of the terminal device and the resource information of each main storage device in the data storage and processing system, and to record the correspondence between the terminal device and the target main storage device. The resource information includes: the processing capacity of the storage device, memory usage information, and disk usage information.

[0183] Storage module 140 is used to store the terminal device's storage data to the target main storage device.

[0184] Optionally, the allocation module 130 is further configured to, if the terminal device is not a newly added device, determine the target main storage device corresponding to the terminal device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, and allocate the target main storage device to the terminal device.

[0185] Optionally, the storage module 140 is specifically used to determine whether there is a backup storage device for the target primary storage device in the data storage processing system based on the primary / backup attribute information of the storage device recorded in the processing device.

[0186] If so, then determine whether the data storage of the target primary storage device and the backup storage device is synchronized based on the latest data update time of the target primary storage device and the latest data update time of the backup storage device;

[0187] If synchronization is required, the storage data of the terminal device will be stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device will be refreshed.

[0188] If they are not synchronized, the data of the target primary storage device and the backup storage device will be synchronized, and the storage data of the terminal device will be stored in the target primary storage device and the backup storage device respectively. The data update time of the target primary storage device and the backup storage device will be refreshed.

[0189] Optionally, the apparatus further includes: a generation module;

[0190] The acquisition module 110 is also used to acquire hardware attribute information of each storage device in the data storage processing system;

[0191] The determination module 120 is also used to determine the primary / backup identifier and primary / backup association information of each storage device based on the hardware attribute information of each storage device. The primary / backup association information is used to indicate the association relationship between storage devices that are each other's primary / backup.

[0192] The generation module is used to generate and record the primary and secondary attribute information of each storage device based on the primary and secondary identifiers and primary and secondary association information of each storage device.

[0193] Optionally, it also includes a data reading module;

[0194] Optionally, the acquisition module 110 is also used to acquire a data reading request sent by the client, wherein the data reading request includes at least: the identifier of at least one target terminal device;

[0195] The data reading module is used to parse data reading requests, and according to the correspondence between the target terminal device and the main storage device, read the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device, and feed the read storage data back to the client.

[0196] Optionally, the data reading module is specifically used to detect the operating status of the main storage device and the backup storage device corresponding to each target terminal device through security heartbeat messages;

[0197] If the main storage device corresponding to the target terminal device is operating normally, then read the storage data corresponding to the target terminal device from the main storage device corresponding to the target terminal device;

[0198] If the primary storage device corresponding to the target terminal device is in an abnormal operating state while the backup storage device is in a normal operating state, then the storage data corresponding to the target terminal device is read from the backup storage device corresponding to the target terminal device.

[0199] Optionally, the device may also include: an adding module;

[0200] The acquisition module 110 is also used to acquire newly added storage devices in the data storage processing system;

[0201] The add module is used to configure the network information of newly added storage devices and existing storage devices in the same environment, and to add the attribute information of the newly added storage devices to the storage device configuration file recorded in the processing device. The storage device configuration file records the attribute information of each existing storage device, including hardware attribute information and primary / backup attribute information.

[0202] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0203] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0204] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.

[0205] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The device may include: a processor 801 and a storage medium 802.

[0206] Storage medium 802 is used to store programs, and processor 801 calls the programs stored in storage medium 802 to execute the above method embodiments. The specific implementation and technical effects are similar, and will not be described in detail here.

[0207] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the methods according to various exemplary embodiments of this application described in the "Exemplary Methods" section above.

[0208] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0209] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The storage medium can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type storage medium, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage medium, magnetic disk, optical disk, etc. The storage medium is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, storage medium 802 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0210] Optionally, this application also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, performs the above-described method embodiments.

[0211] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0212] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0213] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0214] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. 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.

Claims

1. A data storage and processing method, characterized in that, A processing device applied in a data storage processing system, the data storage processing system including multiple main storage devices, the method comprising: Obtain the stored data of the terminal device and the identifier of the terminal device; Based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, it is determined whether the terminal device is a newly added device; If so, then based on the identifier of the terminal device and the real-time resource information of each main storage device in the data storage and processing system, a target main storage device is allocated to the terminal device, and the correspondence between the terminal device and the target main storage device is recorded. The real-time resource information includes: the processing capacity of the storage device, memory usage information, and disk usage information. The storage data of the terminal device is stored in the target main storage device; After determining whether the terminal device is a newly added device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, the process further includes: If the terminal device is not a newly added device, then based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, the target main storage device corresponding to the terminal device is determined, and the target main storage device is allocated to the terminal device. The method further includes: Acquire newly added storage devices in the data storage and processing system; Configure the network information of the newly added storage device and the existing storage devices in the same environment, and add the attribute information of the newly added storage device to the storage device configuration file recorded in the processing device. The storage device configuration file records the attribute information of each existing storage device, including hardware attribute information and primary / backup attribute information.

2. The method according to claim 1, characterized in that, The step of storing the terminal device's storage data into the target main storage device includes: Based on the primary / backup attribute information of the storage device recorded in the processing device, it is determined whether a backup storage device for the target primary storage device exists in the data storage processing system; If so, then based on the most recent data update time of the target primary storage device and the most recent data update time of the backup storage device, it is determined whether the data storage of the target primary storage device and the backup storage device is synchronized; If synchronization is achieved, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed. If they are not synchronized, after synchronizing the data of the target primary storage device and the backup storage device, the storage data of the terminal device is stored in the target primary storage device and the backup storage device respectively, and the data update time of the target primary storage device and the backup storage device is refreshed.

3. The method according to claim 2, characterized in that, Before determining whether a backup storage device for the target primary storage device exists in the data storage processing system based on the primary / backup attribute information of the storage device recorded in the processing device, the process further includes: Obtain the hardware attribute information of each storage device in the data storage processing system; Based on the hardware attribute information of each storage device, the primary and backup identifiers and primary and backup association information of each storage device are determined. The primary and backup association information is used to indicate the association relationship between storage devices that are each other's primary and backup. Based on the primary / backup identifiers and primary / backup association information of each storage device, primary / backup attribute information of the storage devices is generated and recorded.

4. The method according to any one of claims 1-3, characterized in that, After storing the terminal device's storage data into the target main storage device, the method further includes: Obtain a data read request sent by the client, wherein the data read request includes at least: an identifier of at least one target terminal device; The data read request is parsed, and based on the correspondence between the target terminal device and the main storage device, the storage data corresponding to the target terminal device is read from the main storage device corresponding to the target terminal device, and the read storage data is fed back to the client.

5. The method according to claim 4, characterized in that, Based on the correspondence between the target terminal device and the main storage device, the storage data corresponding to the target terminal device is read from the main storage device corresponding to the target terminal device, including: The operating status of the main storage device and backup storage device corresponding to each target terminal device is detected by the security heartbeat message. If the main storage device corresponding to the target terminal device is operating normally, then the storage data corresponding to the target terminal device is read from the main storage device corresponding to the target terminal device. If the main storage device corresponding to the target terminal device is in an abnormal operating state while the backup storage device is in a normal operating state, then the storage data corresponding to the target terminal device is read from the backup storage device corresponding to the target terminal device.

6. A data storage and processing apparatus, characterized in that, A processing device applied in a data storage processing system, the data storage processing system including multiple main storage devices, the device including: an acquisition module, a determination module, an allocation module, a storage module, and an addition module; The acquisition module is used to acquire the stored data of the terminal device and the identifier of the terminal device; The determining module is used to determine whether the terminal device is a newly added device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device. The allocation module is configured to, if so, allocate a target primary storage device to the terminal device based on the identifier of the terminal device and the real-time resource information of each primary storage device in the data storage processing system, and record the correspondence between the terminal device and the target primary storage device. The real-time resource information includes: the processing capacity of the storage device, memory usage information, and disk usage information. The storage module is used to store the terminal device's storage data into the target main storage device; The allocation module is further configured to, if the terminal device is not a newly added device, determine the target main storage device corresponding to the terminal device based on the identifier of the terminal device and the correspondence between each terminal device and each main storage device recorded in the processing device, and allocate the target main storage device to the terminal device. The acquisition module is also used to acquire newly added storage devices in the data storage and processing system; The adding module is used to configure the network information of the newly added storage device and the existing storage devices in the same environment, and to add the attribute information of the newly added storage device to the storage device configuration file recorded in the processing device. The storage device configuration file records the attribute information of each existing storage device, including hardware attribute information and primary / backup attribute information.

7. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the data storage processing method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of the data storage processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data transfer method and device, electronic equipment and storage medium

    CN113282571A

  • Resource management method and device, electronic equipment and storage medium

    CN115514777A