Dual-controller data management method, electronic device, storage medium and product

By calculating the coupling factor of the data to be dropped, the data interaction and storage path between the dual controllers are optimized, and the problem of insufficient coordination and coordination between the dual controllers is solved, and data storage efficiency and system stability are improved.

CN118885131BActive Publication Date: 2024-12-20INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411367222.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-20
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

In high-end storage devices, coordination between dual controllers is ignored, resulting in abnormal controller status affecting the efficiency and reliability of data storage.

Method used

By calculating the coupling factor of the data to be dropped, determining the data drop path and target hard disk array, optimizing the data interaction and storage path between the dual controllers, ensuring that the data drops more efficiently when the controller is loaded at full load.

Benefits of technology

Improve data storage efficiency, reduce business delay problems, and ensure system stability and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885131B_ABST
    Figure CN118885131B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a dual-controller data management method, electronic device, storage medium and product, the method comprising: dividing the stored data to obtain data to be written to disk; determining the coupling factor corresponding to the data to be written to disk according to the data type and total amount of the data to be written to disk; determining the writing path and target hard disk array of the data to be written to disk according to the coupling factor corresponding to the data to be written to disk; sending the data to be written to disk to the target hard disk array for storage according to the writing path. The embodiment of the present invention achieves more efficient writing of data to disk when the controller of the storage system is fully loaded by optimizing the controller side and the hard disk side in parallel, and by analyzing the fastest path for writing data to disk, thereby improving data storage efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data management technology, and in particular, to a dual-controller data management method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In the era of big data, higher requirements are placed on the reliability and high performance of storage arrays. Especially in high-end storage devices, the read and write rates and IOPS (Input / Output Operations Per Second) of storage devices need to meet high baseline standards. For example, high-end storage requires IOPS to reach more than 1 million, and terminal storage requires IOPS to reach more than 400,000, and data can be read and written continuously at these rates to meet the needs of the current Internet companies' increasing data volume. To this end, the CPU of storage devices is constantly updated, and the bandwidth resources of the CPU (Central Processing Unit) are constantly doubling and improving. However, in the data storage process, the coordination between the dual controllers is often ignored. The storage device is composed of dual controllers, and the data interaction between the dual controllers will affect the current data storage efficiency. Both dual controllers are cascaded with the back-end data disk, and the processed data is stored on the disk. When the data processing is completed, during the disk storage process, if one of the dual controllers has an abnormal state, it will affect the overall work efficiency of data storage. Summary of the invention

[0003] The embodiment of the present invention provides a dual-controller data management method, electronic device, computer-readable storage medium and computer program product to solve the problem of neglected coordination between the dual controllers and the problem of data storage caused by abnormal controller status.

[0004] An embodiment of the present invention discloses a dual-controller data management method, which is applied to the dual controller, wherein the dual controller includes a first controller and a second controller, and the first controller and the second controller are respectively connected to a plurality of hard disk arrays. The method includes:

[0005] Divide the stored data to obtain the data to be written to the disk;

[0006] Determine a coupling factor corresponding to the data to be written to disk according to the data type and the total amount of the data to be written to disk; the coupling factor corresponding to the data to be written to disk is used to characterize the degree of association between the data in the first controller and the second controller, and the degree of association is used to characterize the dependency and consistency between the data;

[0007] Determine the disk placement path and the target hard disk array of the data to be placed on disk according to the coupling factor corresponding to the data to be placed on disk; the disk placement path is used to determine the controller that sends the data to be placed on disk, and the target hard disk array is determined from the multiple hard disk arrays;

[0008] The data to be written to the disk is sent to the target hard disk array for storage according to the writing path.

[0009] Optionally, determining the disk placement path and the target hard disk array of the data to be placed on disk according to the coupling factor corresponding to the data to be placed on disk includes:

[0010] Determining the disk placement time and the target hard disk array of the data to be placed on disk according to the coupling factor corresponding to the data to be placed on disk;

[0011] The placement path of the data to be placed on disk is determined according to the placement time of the data to be placed on disk.

[0012] Optionally, dividing the stored data to obtain the data to be written to the disk includes:

[0013] Classify and package the stored data according to data types to obtain a plurality of data to be written to the disk;

[0014] Determine multiple historical data to be written to disk in dual controllers;

[0015] Integrate the data to be placed on disk and the historical data to be placed on disk to obtain integrated data;

[0016] The integrated data is divided into a plurality of data to be written to disk, so as to obtain first data to be written to disk of the first controller and second data to be written to disk of the second controller.

[0017] Optionally, the first data to be written to disk includes first target data to be written to disk of multiple data types, and the second data to be written to disk includes second target data to be written to disk of multiple data types, and determining the coupling factor corresponding to the data to be written to disk according to the data type and total amount of the data to be written to disk includes:

[0018] Determine first target data to be stored in disk and second target data to be stored in disk of the same data type according to the data type of the data to be stored in disk;

[0019] Comparing the total amount of the first target data to be written to the disk with the total amount of the second target data to be written to the disk, to obtain a total amount difference of data;

[0020] The coupling factors corresponding to the data to be written to the disk of different data types are determined according to the total amount difference of the data.

[0021] Optionally, determining the storage time of the data to be stored and the target hard disk array according to the coupling factor corresponding to the data to be stored, includes:

[0022] Determine a first disk-writing time and a second disk-writing time according to the coupling factor corresponding to the data to be written to disk and the total amount of the data to be written to disk; the first disk-writing time is the time required for the first controller to process the data to be written to disk, and the second disk-writing time is the time required for the second controller to process the data to be written to disk;

[0023] When the coupling factor corresponding to the data to be written to the disk is greater than a preset threshold, determining the target hard disk array as the first hard disk array;

[0024] When the coupling factor corresponding to the data to be written to the disk is less than or equal to the preset threshold, the target hard disk array is determined to be the second hard disk array.

[0025] Optionally, determining a disk placement path for the data to be placed on disk according to a placement time of the data to be placed on disk includes:

[0026] When the first disk placement time is less than the second disk placement time, determining a placement path of the data to be placed on disk as from the first controller to the target hard disk array;

[0027] When the first disk placement time is greater than or equal to the second disk placement time, the placement path of the data to be placed on disk is determined to be from the second controller to the target hard disk array.

[0028] Optionally, after sending the data to be written to the disk to the target hard disk array for storage according to the writing path, the method further includes:

[0029] Combining the data stored in the first hard disk array and the second hard disk array to obtain the data to be written to the disk;

[0030] The data to be written to the disk are coupled according to the coupling factors corresponding to the data to be written to the disk to obtain the stored data.

[0031] Optionally, dividing the plurality of data to be written to disk according to the integrated data to obtain first data to be written to disk of the first controller and second data to be written to disk of the second controller includes:

[0032] Verifying the integrated data to obtain a verification result;

[0033] If there is no bit error information in the verification result, determining a controller corresponding to the historical data to be written to the disk in the integrated data;

[0034] When the controller corresponding to the historical data to be written to disk is the first controller, determining the data to be written to disk in the integrated data as first data to be written to disk of the first controller;

[0035] When the controller corresponding to the historical data to be written to disk is the second controller, the data to be written to disk in the integrated data is determined as second data to be written to disk of the second controller.

[0036] Optionally, determining the coupling factors corresponding to the to-be-written data of different data types according to the total amount of data difference includes:

[0037] Adding the data total amount differences of different data types to obtain a target data total amount difference;

[0038] The ratio between the total data difference and the target data total data difference is determined as the coupling factor corresponding to the data to be written to the disk.

[0039] Optionally, before dividing the stored data to obtain the data to be written to the disk, the method further includes:

[0040] When the first controller is in a full-load operation state and the second controller is not in the full-load operation state, an analysis instruction for analyzing the stored data is obtained.

[0041] Optionally, the larger the coupling factor corresponding to the data to be stored on disk is, the higher the overlap between the first target data to be stored on disk and the second target data to be stored on disk is, and the lower the priority of the data to be stored on disk is.

[0042] Optionally, after coupling the data to be written to the disk according to the coupling factor corresponding to the data to be written to the disk to obtain the stored data, the method further includes:

[0043] Determine a storage result corresponding to the stored data; the storage result is used to indicate whether the data to be stored on the disk has been stored on the disk.

[0044] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0045] The memory is used to store computer programs;

[0046] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0047] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0048] The embodiment of the present invention further discloses a computer program product, including a computer program / instruction, and the computer program product is executed by at least one processor to implement the method described in the embodiment of the present invention.

[0049] The embodiments of the present invention include the following advantages:

[0050] In an embodiment of the present invention, the stored data is divided to obtain data to be dropped on disk; the coupling factor corresponding to the data to be dropped on disk is determined according to the data type and the total amount of data of the data to be dropped on disk; the coupling factor corresponding to the data to be dropped on disk is used to characterize the degree of association between the data in the first controller and the second controller, and the degree of association is used to characterize the dependency and consistency between the data; the drop-off path and the target hard disk array of the data to be dropped on disk are determined according to the coupling factor corresponding to the data to be dropped on disk; the drop-off path is used to determine the controller to send the data to be dropped on disk, and the target hard disk array is determined from multiple hard disk arrays; the data to be dropped on disk is sent to the target hard disk array for storage according to the drop-off path. The embodiment of the present invention achieves more efficient data drop-off when the controller of the storage system is fully loaded by optimizing the control end and the hard disk end in parallel, and by analyzing the fastest path for data drop-off, thereby improving data storage efficiency and ensuring that customers will not encounter service delay problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a schematic diagram of an application environment provided in an embodiment of the present invention;

[0052] Figure 2 is a flowchart of a dual-controller data management method provided in an embodiment of the present invention;

[0053] Figure 3 is a schematic diagram of a flow chart of a dual-controller data transmission optimization algorithm provided in an embodiment of the present invention;

[0054] Figure 4 It is a flowchart of a method for storing hard disk arrays provided in an embodiment of the present invention;

[0055] Figure 5 is a flow chart of a dual-controller data analysis method based on coupling factors provided in an embodiment of the present invention;

[0056] Figure 6 is a schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention;

[0057] Figure 7 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] Reference Figure 1 , shows a schematic diagram of an application environment provided in an embodiment of the present invention, specifically including: dual controllers and hard disks. The dual controllers include: a first controller and a second controller, the hard disk includes multiple hard disk arrays, and the multiple hard disk arrays in the embodiment of the present invention are respectively the first hard disk array and the second hard disk array. The first controller and the second controller respectively include a CPU end, a CPLD (Complex Programmable Logic Device) end and an NTB (Non-Transparent Bridge), the CPU end and the CPLD end in each controller are connected, and the NTB end of the first controller is connected to the NTB end of the second controller to realize information sharing between the dual controllers. The first controller and the second controller are both connected to the hard disk to realize that the first controller and the second controller are respectively connected to multiple hard disk arrays.

[0060] In an embodiment of the present invention, when one of the dual controllers is in full load and the other controller has not yet reached full load, the data type and total amount of data to be dropped in the whole system are obtained first, and then the drop time required for the dual controllers to process the drop time of the data to be dropped is obtained by the coupling factor optimization method according to the data type and total amount of data, which are recorded as the first drop time and the second drop time, and the drop path to be dropped in the whole system is determined according to the first drop time and the second drop time. After the drop path is confirmed, the data in the dual controllers is continued to be stored in arrays from the hard disk end. After the storage of the arrays is completed, the data stored in the arrays are recoupled according to the coupling factor to achieve the final data drop. The embodiment of the present invention achieves more efficient data drop when the controller of the storage system is fully loaded by optimizing the control end and the hard disk end in parallel, and by analyzing the fastest path for data drop, thereby improving data storage efficiency and avoiding business delay problems.

[0061] Reference Figure 2 , shows a flow chart of the steps of a dual-controller data management method provided in an embodiment of the present invention, which may specifically include the following steps:

[0062] Step 201: Divide the stored data to obtain data to be written to the disk;

[0063] In an embodiment of the present invention, when one controller (the first controller) of the dual controllers is in a full-load operation state (for example, the CPU utilization rate reaches 90%), and the other controller (the second controller) has not yet reached the full-load operation state, the CPU end of the first controller sends a status message that the utilization rate has reached the upper limit, and the CPLD end sends an abnormal reporting control instruction to the CPU end. The CPU end sends the full-load status information to the NTB end, and then the NTB end transmits it to the controller to realize the sharing of status information between the dual controllers.

[0064] When the second controller receives the status information, the second controller sends a data analysis instruction to the server, requiring the server to classify and package the data. The data on the server side needs to undergo certain processing (such as classification and packaging) before the data to be stored on the disk is obtained. For the dual controllers of the storage device, the data to be transmitted from the current server to the storage dual controller is divided. The division method is specifically through calling historical data. After the historical data is packaged, it is integrated with the current server-side data. The integrated data end is a complete data end, and no error information will appear during the verification process, indicating that this part of the data and the historical data will belong to the controller. The division is performed in sequence. After the division is completed, the first data to be stored in the first controller and the second data to be stored in the second controller are obtained.

[0065] In actual applications, the data on the server side does not need to be processed. Therefore, in the embodiment of the present invention, by classifying and packaging the data on the server side, the data to be stored on the disk can be quickly obtained, thereby speeding up the data processing speed and improving the system response speed. In addition, by calling the historical data, after the historical data is packaged, it is integrated with the current server-side data, which can more efficiently divide the data and ensure the integrity and accuracy of the data after integration. In addition, by assigning data processing tasks to two controllers, the system can achieve parallel processing, improve data processing capabilities, and meet the high requirements of the storage array in the big data era.

[0066] Step 202: determining a coupling factor corresponding to the data to be written to disk according to the data type and the total amount of the data to be written to disk; the coupling factor corresponding to the data to be written to disk is used to characterize the degree of association between the data in the first controller and the data in the second controller, and the degree of association is used to characterize the dependency and consistency between the data;

[0067] In the embodiment of the present invention, the coupling factor corresponding to the data to be written to the disk is used to characterize the degree of association between the first controller and the second controller. The larger the coupling factor, the stronger the association between the data of the two controllers; the smaller the coupling factor, the weaker the association between the data of the two controllers.

[0068] The coupling factor in the embodiment of the present invention is obtained by analyzing the correlation of the data between the dual controllers after the previous division. Specifically, the data of various formats in the first controller are compared with the data of various formats in the second controller to compare the difference in the data volume (total data volume) of each format of data. After the comparison is completed, the data differences of various formats are summarized. The data difference of each format of data is normalized, and the coupling factor is obtained after the normalization is completed.

[0069] In another embodiment of the present invention, the coupling factor is used to characterize the degree of correlation of data between controllers. In addition to obtaining the ratio through the difference between the data amounts, the correlation between the data in the dual controllers can also be determined through the access frequency, access time, access sequence, etc. of the data between the dual controllers to obtain the coupling factor.

[0070] Specifically, by analyzing the access frequency of data, the relevance of data between controllers can be more accurately determined; by analyzing the access time of data, the usage pattern and periodicity of data can be understood, thereby more accurately determining the relevance of data between controllers; by analyzing the access sequence of data, the usage logic and dependency of data can be understood, thereby more accurately determining the relevance of data between controllers. Therefore, the coupling factor can be calculated more accurately.

[0071] The embodiment of the present invention determines the coupling factor by the degree of association of the data between the controllers, so that the storage and processing resources can be allocated more reasonably, and then the data storage path can be optimized by the coupling factor, so that the data can be accessed faster, thereby improving the data access efficiency. In addition, by analyzing the degree of association of the data between the controllers, the system can better perform fault isolation and load balancing, ensuring that when one controller fails, other controllers can still work normally, thereby improving the stability of the system. By determining the coupling factor by the degree of association of the data between the controllers, data redundancy can also be reduced, ensuring that the same or similar data is stored only once, thereby improving the utilization of the storage space.

[0072] Step 203: determining a disk placement path and a target hard disk array of the data to be placed on disk according to the coupling factor corresponding to the data to be placed on disk; the disk placement path is used to determine a controller for sending the data to be placed on disk, and the target hard disk array is determined from a plurality of hard disk arrays;

[0073] In the embodiment of the present invention, according to the data type and total amount of data to be written to disk, the time required for the dual controllers to process the written data to disk is calculated by the coupling factor optimization method, which are recorded as the writing time of the first controller and the writing time of the second controller respectively. The larger the coupling factor, the shorter the writing time: the larger the coupling factor, the stronger the correlation between the data and the higher the repetition, so the duplicate data can be deleted, thereby reducing the writing time.

[0074] According to the first disk drop time and the second disk drop time, the priority of the data can be determined, and then the drop path and the target hard disk array can be determined. Data with a high priority will be dropped first. According to the priority of the data, it can be determined whether the data to be dropped is sent by the first controller to the target hard disk array corresponding to the priority (the first hard disk array or the second hard disk array), or by the second controller to the target hard disk array corresponding to the priority (the first hard disk array or the second hard disk array). Specifically, data with a high priority will be sent to the first hard disk array, and data with a lower priority will be sent to the second hard disk array.

[0075] The embodiment of the present invention calculates the time required for dual controllers to process the data to be written to disk based on the coupling factor corresponding to the data to be written to disk, determines the priority of the data based on the writing time, and then determines the writing path and the target hard disk array. The system can efficiently send data to the target hard disk array, optimize the data storage path, and improve storage efficiency and system reliability.

[0076] Since there is a corresponding relationship between the coupling factor and the first controller, the smaller the coupling factor, the smaller the impact of the corresponding dual controllers or the higher the storage priority of the data. Allocating the computing resources required for full-speed execution to background tasks with coupling factors less than the preset factor can ensure that some background tasks can be executed normally while ensuring that the execution speed of foreground resources is not affected. This not only improves the overall performance of the storage array, but also can control each background task individually, avoiding the problem of foreground task congestion, thereby improving the availability of the storage array.

[0077] Step 204: Send the data to be written to the disk to the target hard disk array for storage according to the writing path.

[0078] In an embodiment of the present invention, the final data coupling relationship (coupling factor) is obtained by the coupling factor analysis method described above, the coupling relationship corresponding to the dual controllers in each data segment is obtained according to the coupling factor, and the coupling relationships are sorted based on this.

[0079] The data at the first half of the capacity points in the sorting (with small coupling factors) are divided into high-priority data. The remaining data (with large coupling factors) are divided into medium- and low-priority data. This ensures that the capacity of high-priority data and medium- and low-priority data is balanced. After the division is completed, the data is stored on the disk.

[0080] The embodiment of the present invention can more accurately identify and process the data correlation between the dual controllers by dividing the data to be written to the disk and determining the coupling factor, which helps to optimize the data storage path and reduce unnecessary data interaction between the controllers, thereby improving the overall storage efficiency; and the embodiment of the present invention can more effectively utilize the resources of the storage device by reasonably allocating the storage path of the data to be written to the disk and the target hard disk array; in addition, the embodiment of the present invention can reduce the bottlenecks and delays of the system in the data storage process by optimizing the data interaction and storage path between the dual controllers, thereby improving the overall stability and response speed of the system.

[0081] In an embodiment of the present invention, the step 203 of determining the disk placement path and the target hard disk array of the data to be placed on disk according to the coupling factor corresponding to the data to be placed on disk includes:

[0082] Determining the disk placement time and the target hard disk array of the data to be placed on disk according to the coupling factor corresponding to the data to be placed on disk;

[0083] The placement path of the data to be placed on disk is determined according to the placement time of the data to be placed on disk.

[0084] In an embodiment of the present invention, the time to drop the data to be dropped can be calculated based on the coupling factor. The larger the coupling factor, the shorter the time to drop; the smaller the coupling factor, the longer the time to drop. The target hard disk array of the data to be dropped can also be determined based on the coupling factor. Highly correlated data is usually stored on a high-performance hard disk array to ensure fast access and efficient storage. The drop path refers to the specific path for data to be transferred from the controller to the hard disk. Based on the drop time, the system can determine the optimal drop path to ensure that the data can be stored on the hard disk efficiently and quickly.

[0085] Therefore, the embodiment of the present invention can efficiently send the data to be written to the disk to the target hard disk array for storage, optimize the data storage path, and improve the storage efficiency and system reliability.

[0086] Reference Figure 3 , shows a schematic flow chart of a dual-controller data transmission optimization algorithm provided in an embodiment of the present invention, which specifically includes:

[0087] Step 301, dual-controller status determination: when the first controller in the dual-controller storage is running at full load, and the second controller has not yet reached the full load state.

[0088] Step 302, dual controller status information transmission: dual controllers share status information through NTB non-transparent bridge. When the CPU end of the first controller sends a status message that the utilization rate reaches about 90%, the CPLD end sends an abnormal reporting control instruction to the CPU, and the CPU end sends the full load status information to the NTB end, which is then transmitted to the second controller by the NTB end.

[0089] Step 303, data classification and packaging: Prioritize obtaining the data type and total amount of data to be stored in the entire system. At this time, the controller sends a data analysis instruction to the server, classifies and packages the data on the server by type, and calculates the total amount of data in each package and passes it to the storage end. The packaging process packages the data according to format types such as pictures, videos, and texts, and counts the usage of each type of format. After the statistics are completed, the data to be transmitted from the current server to the storage dual controller is divided for the dual controllers of the storage device. The division method is to call historical data, package the historical data, and then integrate it with the current server-side data after it is packaged. The integrated data end is a complete data end, and no error information will appear in the verification process, indicating that this part of the data and the historical data will belong to the controller. The division is carried out in sequence, and after the division is completed, the first data to be stored in the first controller and the second data to be stored in the second controller are obtained.

[0090] Step 304, establishing and optimizing coupling factors: according to the data type and the total amount of data, the coupling factor optimization method is used to obtain the disk placement time required for the dual controllers to process the data to be placed on disk, which are recorded as the first disk placement time and the second disk placement time.

[0091] Step 305: Confirm the disk placement path. Determine the disk placement path to be placed in the entire system according to the first disk placement time and the second disk placement time.

[0092] In an embodiment of the present invention, the step 201 of dividing the stored data to obtain the data to be written to the disk includes:

[0093] Classify and package the stored data according to data types to obtain a plurality of data to be written to the disk;

[0094] Determine multiple historical data to be written to disk in dual controllers;

[0095] Integrate the data to be placed on disk and the historical data to be placed on disk to obtain integrated data;

[0096] The integrated data is divided into a plurality of data to be written to disk, so as to obtain first data to be written to disk of the first controller and second data to be written to disk of the second controller.

[0097] The storage data in the embodiment of the present invention refers to the data that the server needs to store on the hard disk, and the storage data can be divided into different data types, such as pictures, videos, texts, etc. In a dual-controller storage system, each controller has its own historical data to be stored on the disk, and the historical data to be stored on the disk refers to the data that has been processed and stored before, which can be used as a reference for better data division in the future.

[0098] In the embodiment of the present invention, first, the stored data is classified and packaged according to the data type to obtain multiple data to be written to the disk, and each data to be written to the disk corresponds to a data type; then the historical data to be written to the disk is called from the dual controllers, and the current data to be written to the disk and the historical data to be written to the disk are integrated according to the data type to obtain integrated data, and each integrated data corresponds to a data type. The integrated data contains current and historical data, and can perform data division more comprehensively; in addition, the integrated data (integrated data) needs to be verified to ensure the integrity and accuracy of the data; according to the integrated data, the data to be written to the disk is divided among the multiple data, and the divided data is allocated to the first controller and the second controller.

[0099] The embodiments of the present invention can efficiently divide the stored data, obtain the data to be written to the disk, and distribute it to different controllers for storage, thereby optimizing the data storage path and improving the storage efficiency and system reliability.

[0100] In an embodiment of the present invention, the first data to be written to disk includes first target data to be written to disk of multiple data types, and the second data to be written to disk includes second target data to be written to disk of multiple data types, and determining the coupling factor corresponding to the data to be written to disk according to the data type and the total amount of the data to be written to disk includes:

[0101] Determine first target data to be stored in disk and second target data to be stored in disk of the same data type according to the data type of the data to be stored in disk;

[0102] Comparing the total amount of the first target data to be written to the disk with the total amount of the second target data to be written to the disk, to obtain a total amount difference of data;

[0103] The coupling factors corresponding to the data to be written to the disk of different data types are determined according to the total amount difference of the data.

[0104] In the first data to be stored in the embodiment of the present invention, there are multiple data types of first target data to be stored in the disk, and the second data to be stored in the disk include multiple data types of second target data to be stored in the disk. At this time, it is necessary to find data of the same data type in the first data to be stored in the disk and the second data to be stored in the disk, and determine the first target data to be stored in the disk and the second target data to be stored in the disk of the same data type. The total amount of data of the first target data to be stored in the disk and the total amount of data of the second target data to be stored in the disk are calculated respectively, and the total amount of data of the first target data to be stored in the disk and the total amount of data of the second target data to be stored in the disk are compared to obtain the total amount difference of data. The total amount difference of data is analyzed to determine the correlation between the data to be stored in the disk of different data types, and then the coupling factors corresponding to the data to be stored in the disk of different data types can be calculated.

[0105] The embodiments of the present invention can efficiently determine the coupling factor corresponding to the data to be written to the disk, optimize the data storage path, and improve the storage efficiency and system reliability.

[0106] In an embodiment of the present invention, determining the disk placement time of the data to be placed on disk and the target hard disk array according to the coupling factor corresponding to the data to be placed on disk includes:

[0107] Determine a first disk-writing time and a second disk-writing time according to the coupling factor corresponding to the data to be written to disk and the total amount of the data to be written to disk; the first disk-writing time is the time required for the first controller to process the data to be written to disk, and the second disk-writing time is the time required for the second controller to process the data to be written to disk;

[0108] When the coupling factor corresponding to the data to be written to the disk is greater than a preset threshold, determining the target hard disk array as the first hard disk array;

[0109] When the coupling factor corresponding to the data to be written to the disk is less than or equal to the preset threshold, the target hard disk array is determined to be the second hard disk array.

[0110] In the embodiment of the present invention, the first hard disk array is set as a high-performance hard disk array for storing high-priority data, and the second hard disk array is set as a relatively low-performance hard disk array for storing medium- and low-priority data. Specifically, the hard disk is equally divided into the first hard disk array and the second hard disk array according to the current remaining space, and the two have the same capacity. After the hard disk array partition is completed, the controller sends its corresponding instructions to the controller end. After receiving the instructions, the current hard disk array and the controller end establish a link relationship in turn. The dual controllers determine the space available for storage in each disk according to the corresponding instructions, that is, the space occupied by the first hard disk array and the second hard disk array.

[0111] The embodiment of the present invention determines the target hard disk array corresponding to the data to be written to the disk according to the coupling factor corresponding to the data to be written to the disk. Specifically, based on the coupling factor and the total amount of data, the first writing time required for the first controller to process the data to be written to the disk and the second writing time required for the second controller to process the data to be written to the disk are calculated. The coupling factor corresponding to the data to be written to the disk is compared with the preset threshold value to further determine the target hard disk array. If the coupling factor is greater than the preset threshold value, it means that the data is high priority data, and the target hard disk array is determined to be the first hard disk array. If the coupling factor is less than or equal to the preset threshold value, it means that the data is medium or low priority data, and the target hard disk array is determined to be the second hard disk array.

[0112] The embodiment of the present invention determines the disk placement time and target hard disk array of the data to be placed on the disk through the coupling factor, and can dynamically adjust the data storage path to ensure that high-priority data is stored on the high-performance first hard disk array, thereby improving data storage efficiency, and can continue to store the data in the dual controllers in separate arrays from the hard disk end. At the same time, high-priority data can be accessed faster, reducing data access delays and improving system response speed.

[0113] In an embodiment of the present invention, determining the disk placement path of the data to be placed on disk according to the placement time of the data to be placed on disk includes:

[0114] When the first disk placement time is less than the second disk placement time, determining a placement path of the data to be placed on disk as from the first controller to the target hard disk array;

[0115] When the first disk placement time is greater than or equal to the second disk placement time, the placement path of the data to be placed on disk is determined to be from the second controller to the target hard disk array.

[0116] In the embodiment of the present invention, determination of the disk drop path mainly depends on the disk drop time. It can be understood that by comparing the first disk drop time and the second disk drop time, the disk drop path can be determined according to the controller corresponding to the shorter disk drop time.

[0117] Specifically, if the disk placement time of the first controller is less than the disk placement time of the second controller, it means that the first controller has a shorter time to process data, so the disk placement path of the data to be placed on disk is determined to be from the first controller to the target hard disk array to ensure that the data can be quickly stored on the hard disk. If the disk placement time of the first controller is greater than or equal to the disk placement time of the second controller, it means that the second controller has a shorter or equal time to process data, so the disk placement path of the data to be placed on disk is determined to be from the second controller to the target hard disk array to ensure that the data can be quickly stored on the hard disk.

[0118] By comparing the disk placement time of the first controller and the second controller, the embodiment of the present invention can more reasonably allocate data processing tasks, ensure efficient use of resources, achieve load balancing, avoid overloading of a single controller, and thus improve the overall system performance; at the same time, by allocating data processing tasks to controllers with shorter disk placement times, the system can complete data processing tasks faster, reduce data processing delays, and improve user experience.

[0119] In an embodiment of the present invention, after sending the data to be written to the disk to the target hard disk array for storage according to the writing path, the method further includes:

[0120] Combining the data stored in the first hard disk array and the second hard disk array to obtain the data to be written to the disk;

[0121] The data to be written to the disk are coupled according to the coupling factors corresponding to the data to be written to the disk to obtain the stored data.

[0122] During the data placement process, the hard disk reads the coupling factor of the storage data generated in the previous algorithm; sends the high-priority data to the first hard disk array unit, and sends the medium and low-priority data to the second hard disk array unit. At the same time, the coupling factor is sent for the first hard disk array unit to store data for association. After the association is completed, the storage data between the two controllers is recoupled on the hard disk side, and the data placement is completed. The coupling method is to screen the data in the hard disk (the reverse process of classification), obtain the data capacity contained in each data format, combine the data in each format, and obtain the storage results of each type of data after decoupling, and the data placement is completed.

[0123] In the embodiment of the present invention, after the sub-array storage is completed, the sub-array storage data is recoupled according to the coupling factor to achieve the final data storage. Specifically, high priority data is extracted from the first hard disk array, medium and low priority data is extracted from the second hard disk array, and these data are combined to obtain complete data to be stored on the disk. The coupling factor corresponding to the data to be stored on the disk is analyzed to determine the degree of correlation between the data, and the data to be stored on the disk is coupled according to the coupling factor to obtain the final storage data.

[0124] Reference Figure 4 , shows a schematic flow chart of a method for placing disks in a hard disk array provided in an embodiment of the present invention, which specifically includes the following steps:

[0125] Step 401, hard disk space capacity division: the hard disk is equally divided according to the current remaining space, and is equally divided into a first hard disk array and a second hard disk array, the two having the same capacity. After the hard disk array partitioning is completed, the respective corresponding instructions are sent to the controller end. After receiving the instructions, the current hard disk array and the controller end establish a link relationship in turn. The dual controllers determine the space available for storage in each disk according to the corresponding instructions, that is, the space occupied by the first hard disk array and the second hard disk array.

[0126] Step 402, data segment coupling relationship sorting: the second controller sends the coupling factor for the first hard disk array unit to store data for association, and obtains the final data coupling relationship (coupling factor) through the above coupling factor analysis method. The coupling relationship corresponding to the dual controllers in each data segment is obtained according to the coupling relationship, and the coupling relationship of each data segment in the total data set is analyzed to obtain the coupling relationship of each data segment, and the coupling relationship is sorted based on the order.

[0127] Step 403, high, medium and low priority classification: the data of the first half of the capacity points in the sorting are regarded as high priority data, and the remaining data are regarded as medium and low priority data, so as to ensure that the capacity of high priority data and medium and low priority data is balanced.

[0128] Step 404, data storage: after the high, medium and low priorities are determined, the data storage operation is performed.

[0129] Step 405, data re-coupling: When all high-priority data and medium- and low-priority data are stored, a re-coupling instruction is sent to re-combine the high-priority data stored in the first hard disk array and the medium- and low-priority data in the second hard disk array, so that it can be determined that the storage data between the dual controllers is re-coupled on the hard disk side after the association is completed.

[0130] In an embodiment of the present invention, dividing the integrated data into the plurality of data to be written to disk to obtain first data to be written to disk of the first controller and second data to be written to disk of the second controller includes:

[0131] Verifying the integrated data to obtain a verification result;

[0132] If there is no bit error information in the verification result, determining a controller corresponding to the historical data to be written to the disk in the integrated data;

[0133] When the controller corresponding to the historical data to be written to disk is the first controller, determining the data to be written to disk in the integrated data as first data to be written to disk of the first controller;

[0134] When the controller corresponding to the historical data to be written to disk is the second controller, the data to be written to disk in the integrated data is determined as second data to be written to disk of the second controller.

[0135] In the embodiment of the present invention, the integrated data is verified to ensure the integrity and accuracy of the data. After the verification is completed, a verification result is obtained to determine whether there is bit error information in the data. If there is no bit error information in the verification result, the controller corresponding to the historical data to be written to the disk in the integrated data is determined, and the corresponding controller is determined according to the storage location of the historical data to be written to the disk.

[0136] Specifically, if the controller corresponding to the historical data to be written to disk is the first controller, the data to be written to disk in the integrated data is determined as the first data to be written to disk of the first controller, and the first data to be written to disk is allocated to the first controller for storage. If the controller corresponding to the historical data to be written to disk is the second controller, the data to be written to disk in the integrated data is determined as the second data to be written to disk of the second controller, and the second data to be written to disk is allocated to the second controller for storage.

[0137] The embodiments of the present invention can efficiently divide the integrated data to obtain the data to be stored on the disk, and distribute it to different controllers for storage, thereby optimizing the data storage path and improving the storage efficiency and system reliability.

[0138] In an embodiment of the present invention, determining the coupling factors corresponding to the to-be-written data of different data types according to the total amount of data difference includes:

[0139] Adding the data total amount differences of different data types to obtain a target data total amount difference;

[0140] The ratio between the total data difference and the target data total data difference is determined as the coupling factor corresponding to the data to be written to the disk.

[0141] In an embodiment of the present invention, the total data volume difference of different data types is calculated, and these differences are added to obtain the target total data volume difference, the ratio between the total data volume difference and the target total data volume difference is calculated, and this ratio is determined as the coupling factor corresponding to the data to be stored on the disk.

[0142] Assume the following data types and total amounts: data type 1: image, data type 2: video, and data type 3: text;

[0143] The total amount of data for each data type is as follows:

[0144] First controller: Pictures: 100MB, Videos: 200MB, and Texts: 50MB;

[0145] Second controller: Pictures: 150MB, Videos: 100MB, and Text: 75MB;

[0146] 1. Calculate the difference in the total amount of data for each data type:

[0147] Image: 150MB-100MB=50MB

[0148] Video: 200MB-100MB=100MB

[0149] Text: 75MB-50MB=25MB

[0150] 2. Add the total data difference of different data types to get the target data total difference:

[0151] Target data total difference = 50MB + 100MB + 25MB = 175MB

[0152] 3. The ratio between the total data difference and the total target data difference is determined as the coupling factor corresponding to the data to be stored on the disk:

[0153] Calculate the ratio between the total data difference of each data type and the total target data difference, and determine these ratios as the coupling factors corresponding to the data to be stored on disk:

[0154] Image: 50MB / 175MB=0.2857

[0155] Video: 100MB / 175MB=0.5714

[0156] Text: 25MB / 175MB=0.1429

[0157] The coupling factor in the embodiment of the present invention reflects the degree of association between different data types. The larger the coupling factor, the stronger the association between the two parts of data; the smaller the coupling factor, the weaker the association between the two parts of data. Through these coupling factors, the system can optimize the data storage path and improve storage efficiency and system reliability.

[0158] Reference Figure 5 , shows a schematic flow chart of a dual-controller data analysis method based on coupling factors provided in an embodiment of the present invention, which specifically includes the following steps:

[0159] Step 501, total data volume difference statistics: data of various formats in the first controller are compared with data of various formats in the second controller to obtain the total data volume difference of each format of data.

[0160] Step 502, normalize the total data difference: After the comparison is completed, the data differences of each format are summarized, and the data difference of each format data is normalized. During the normalization process, the data of each format is compared according to the capacity of the current storage end, and finally the ratio of each format data is obtained, and the current data difference is normalized according to the ratio. For example, if the ratio of video data to text data is 2:1, the video data difference is scaled in equal proportion and recorded in the normalized data.

[0161] Step 503, establishing coupling factors: after normalization is completed, the coupling factors are obtained.

[0162] Step 504, coupling factor comparison and sorting: performing coupling factor comparison and sorting.

[0163] Step 505, data overlap determination: the smaller the coupling factor is, the less overlapped data there is in the dual controllers in the data segment, and the higher the priority is.

[0164] In the embodiment of the present invention, under the premise of ensuring full-speed execution of the first controller, corresponding computing resources are allocated to the second controller according to the size of the coupling factors in various types of data to be written to the disk, so as to ensure the execution speed of the second controller.

[0165] In an embodiment of the present invention, before dividing the stored data to obtain the data to be written to the disk, the method further includes:

[0166] When the first controller is in a full-load operation state and the second controller is not in the full-load operation state, an analysis instruction for analyzing the stored data is obtained.

[0167] In the embodiment of the present invention, when one of the dual controllers (the first controller) is in full load operation (for example, the CPU utilization reaches 90%), and the other controller (the second controller) has not yet reached full load operation, the CPU end of the first controller sends a status message that the utilization reaches the upper limit, the CPLD end sends an abnormal reporting control instruction to the CPU end, and the CPU end sends the full load status information to the NTB end, which is then transmitted to the controller by the NTB end to realize the sharing of status information between the dual controllers. When the second controller receives the status information, it will divide the stored data.

[0168] The embodiment of the present invention shares status information through the NTB non-transparent bridge, and the second controller can quickly receive the full load status information of the first controller, thereby timely starting the data analysis and division process, reducing the system response time, and improving the system response speed; by real-time analysis of the status information of the first controller, the second controller can dynamically adjust the data processing tasks to ensure that resources are reasonably used, avoid resource waste, achieve load balancing, and improve the overall system performance; by analyzing the status information of the first controller, the second controller can take over the data processing tasks in time to ensure that when one controller fails, other controllers can still work normally, thereby enhancing the stability of the system.

[0169] In an embodiment of the present invention, the larger the coupling factor corresponding to the data to be stored on disk is, the higher the overlap between the first target data to be stored on disk and the second target data to be stored on disk is, and the lower the priority of the data to be stored on disk is.

[0170] In the embodiment of the present invention, the coupling factor can be used to determine not only the degree of overlap between the first target data to be stored on disk and the second target data to be stored on disk, but also the priority of the data to be stored on disk.

[0171] In the embodiment of the present invention, the larger the coupling factor is, the stronger the correlation between the first target data to be stored and the second data to be stored is, that is, the higher the similarity between the two parts of data is, the higher the overlap is. In this case, the priority of the data is lower, because data with high overlap is usually repeated or redundant data and does not need to be stored first.

[0172] Similarly, the smaller the coupling factor, the weaker the correlation between the first target data to be stored and the second target data to be stored, that is, the lower the similarity between the two parts of data, the lower the overlap. In this case, the data has a higher priority because data with low overlap is usually unique or important data and needs to be stored first.

[0173] In an embodiment of the present invention, after coupling the data to be written to the disk according to the coupling factor corresponding to the data to be written to the disk to obtain the stored data, the method further includes:

[0174] Determine a storage result corresponding to the stored data; the storage result is used to indicate whether the data to be stored on the disk has been stored on the disk.

[0175] In the embodiment of the present invention, after the data to be written to the disk is sent to the target hard disk array for storage, the system needs to confirm whether the data is successfully stored on the hard disk, and the system will generate a storage result to indicate whether the data to be written to the disk has been written to the disk. The storage result can be a status code, log record or other forms of feedback information.

[0176] In the embodiment of the present invention, the system can monitor the state of data storage in real time through the storage results to ensure the reliability and consistency of data storage. If the storage results show that the data storage fails, the system can handle the failure in time and try to store the data again to ensure that the data is not lost. In addition, by analyzing the storage results, the system can optimize the data storage path and resource allocation to improve storage efficiency and system performance.

[0177] The embodiment of the present invention achieves more efficient data storage when the storage system controller is fully loaded by optimizing the control end and the hard disk end in parallel, and by analyzing the fastest path for data to be stored on disk, thereby improving data storage efficiency and ensuring that customers will not encounter service delay issues. The embodiment of the present invention can more accurately identify and process the data correlation between the dual controllers by dividing the data to be stored on disk and determining the coupling factor, which helps to optimize the data storage path and reduce unnecessary data interaction between controllers, thereby improving the overall storage efficiency; and the embodiment of the present invention can more effectively utilize the resources of the storage device by reasonably allocating the storage path and the target hard disk array for the data to be stored on disk; in addition, the embodiment of the present invention can reduce the bottlenecks and delays of the system in the data storage process by optimizing the data interaction and storage path between the dual controllers, thereby improving the overall stability and response speed of the system.

[0178] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0179] In addition, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to implement the various processes of the above-mentioned dual-controller data management method embodiment when executing the program stored in the memory, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0180] The embodiment of the present invention further provides a computer-readable storage medium on which instructions are stored. When executed by one or more processors, the processors execute the various processes of the above-mentioned dual-controller data management method embodiment, and can achieve the same technical effect. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0181] An embodiment of the present invention also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the data management method embodiment of the dual controller as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0182] Figure 6 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0183] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0184] It should be understood that in the embodiment of the present invention, the radio frequency unit 601 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 610 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 601 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 601 can also communicate with the network and other devices through a wireless communication system.

[0185] The electronic device provides users with wireless broadband Internet access through the network module 602, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0186] The audio output unit 603 can convert the audio data received by the RF unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output it as sound. Moreover, the audio output unit 603 can also provide audio output related to a specific function performed by the electronic device 600 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, etc.

[0187] The input unit 604 is used to receive audio or video signals. The input unit 604 may include a graphics processor (GPU) 6041 and a microphone 6042. The graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 606. The image frame processed by the graphics processor 6041 can be stored in the memory 609 (or other storage medium) or sent via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 601 in the case of a telephone call mode.

[0188] The electronic device 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 6061 and / or the backlight when the electronic device 600 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 605 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0189] The display unit 606 is used to display information input by the user or information provided to the user. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0190] The user input unit 607 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch panel 6071). The touch panel 6071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 610, receives the command sent by the processor 610 and executes it. In addition, the touch panel 6071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 6071, the user input unit 607 may also include other input devices 6072. Specifically, other input devices 6072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0191] Furthermore, the touch panel 6071 may be overlaid on the display panel 6061. When the touch panel 6071 detects a touch operation on or near it, it is transmitted to the processor 610 to determine the type of touch event. Then, the processor 610 provides corresponding visual output on the display panel 6061 according to the type of touch event. Figure 6 In the figure, the touch panel 6071 and the display panel 6061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 6071 and the display panel 6061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0192] The interface unit 608 is an interface for connecting an external device to the electronic device 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 600 or may be used to transmit data between the electronic device 600 and an external device.

[0193] The memory 609 can be used to store software programs and various data. The memory 609 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 609 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0194] The processor 610 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 609 and calling data stored in the memory 609, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 610.

[0195] The electronic device 600 may also include a power supply 611 (such as a battery) for supplying power to various components. Preferably, the power supply 611 may be logically connected to the processor 610 via a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0196] In addition, the electronic device 600 includes some functional modules not shown, which will not be described in detail here.

[0197] like Figure 7 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 701 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the dual-controller data management method described in the above embodiment.

[0198] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0199] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0200] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0201] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0203] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0205] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0206] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0207] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A dual-controller data management method, characterized in that: Applied to the dual controller, the dual controller includes a first controller and a second controller, the first controller and the second controller are respectively connected to a plurality of hard disk arrays, the method includes: When the first controller is in a full-load operation state and the second controller has not reached the full-load operation state, the stored data is divided to obtain data to be written to the disk; Determine a coupling factor corresponding to the data to be written to disk according to the data type and the total amount of the data to be written to disk; the coupling factor corresponding to the data to be written to disk is used to characterize the degree of association between the data in the first controller and the second controller, and the degree of association is used to characterize the dependency and consistency between the data; Determine the disk placement time and target hard disk array required for the dual controllers to process the data to be placed on disk respectively according to the coupling factor corresponding to the data to be placed on disk; the placement time includes a first placement time and a second placement time, and the target hard disk array is determined from a plurality of hard disk arrays; Determine a disk placement path for the data to be placed on disk according to the first placement time and the second placement time; the placement path is used to determine a controller that sends the data to be placed on disk; Sending the data to be written to the disk to the target hard disk array for storage according to the writing path; The data in the target hard disk array is recoupled according to the coupling factor corresponding to the data to be written to the disk to obtain the stored data.

2. The method according to claim 1, characterized in that The step of dividing the stored data to obtain the data to be written to the disk includes: Classify and package the stored data according to data types to obtain a plurality of data to be written to the disk; Determine multiple historical data to be written to disk in dual controllers; Integrate the data to be placed on disk and the historical data to be placed on disk to obtain integrated data; The integrated data is divided into a plurality of data to be written to disk, so as to obtain first data to be written to disk of the first controller and second data to be written to disk of the second controller.

3. The method according to claim 2, characterized in that The first data to be written to disk includes first target data to be written to disk of multiple data types, the second data to be written to disk includes second target data to be written to disk of multiple data types, and determining the coupling factor corresponding to the data to be written to disk according to the data type and the total amount of the data to be written to disk includes: Determine first target data to be stored in disk and second target data to be stored in disk of the same data type according to the data type of the data to be stored in disk; Comparing the total amount of the first target data to be written to the disk with the total amount of the second target data to be written to the disk, to obtain a total amount difference of data; The coupling factors corresponding to the data to be written to the disk of different data types are determined according to the total amount difference of the data.

4. The method according to claim 1, characterized in that: The step of determining the disk placement time and the target hard disk array required for the dual controllers to process the data to be placed on disk respectively according to the coupling factor corresponding to the data to be placed on disk comprises: Determine the first and second storage time according to the coupling factor corresponding to the data to be stored and the total amount of the data to be stored; the first storage time is the time required for the first controller to process the data to be stored, and the second storage time is the time required for the second controller to process the data to be stored; When the coupling factor corresponding to the data to be written to the disk is greater than a preset threshold, determining the target hard disk array as the first hard disk array; When the coupling factor corresponding to the data to be written to the disk is less than or equal to the preset threshold, the target hard disk array is determined to be the second hard disk array.

5. The method according to claim 4, characterized in that The determining the disk placement path of the data to be placed on disk according to the first disk placement time and the second disk placement time includes: When the first disk placement time is less than the second disk placement time, determining a placement path of the data to be placed on disk as from the first controller to the target hard disk array; When the first disk placement time is greater than or equal to the second disk placement time, the placement path of the data to be placed on disk is determined to be from the second controller to the target hard disk array.

6. The method according to claim 4, characterized in that The step of re-coupling the data in the target hard disk array according to the coupling factor corresponding to the data to be written to the disk to obtain the stored data includes: Combining the data stored in the first hard disk array and the second hard disk array to obtain the data to be written to the disk; The data to be written to the disk are coupled according to the coupling factors corresponding to the data to be written to the disk to obtain the stored data.

7. The method according to claim 2, characterized in that: The step of dividing the integrated data into the plurality of data to be written to disk to obtain first data to be written to disk of the first controller and second data to be written to disk of the second controller includes: Verifying the integrated data to obtain a verification result; If there is no bit error information in the verification result, determining a controller corresponding to the historical data to be written to the disk in the integrated data; When the controller corresponding to the historical data to be written to disk is the first controller, determining the data to be written to disk in the integrated data as first data to be written to disk of the first controller; When the controller corresponding to the historical data to be written to disk is the second controller, the data to be written to disk in the integrated data is determined as second data to be written to disk of the second controller.

8. The method according to claim 3, characterized in that The determining, according to the total amount difference of data, the coupling factors corresponding to the data to be written to the disk of different data types includes: Adding the data total amount differences of different data types to obtain a target data total amount difference; The ratio between the total data difference and the target data total data difference is determined as the coupling factor corresponding to the data to be written to the disk.

9. The method according to claim 3, characterized in that: The larger the coupling factor corresponding to the data to be stored on disk is, the higher the overlap between the first target data to be stored on disk and the second target data to be stored on disk is, and the lower the priority of the data to be stored on disk is.

10. The method according to claim 6, characterized in that After coupling the data to be written to the disk according to the coupling factors corresponding to the data to be written to the disk to obtain the stored data, the method further includes: Determine a storage result corresponding to the stored data; the storage result is used to indicate whether the data to be stored on the disk has been stored on the disk.

11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 10 when executing the program stored in the memory.

12. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 10.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.