Data processing method and device, equipment, storage medium and program product
By acquiring and combining the monitoring status information of the power-keeping memory in the storage controller, determining its current status and performing data processing, the problem of low reliability of the power-keeping memory is solved and the efficiency of business data processing is improved.
Patent Information
- Application Number
- CN202411829156.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, the reliability of power-keeping memory is low, resulting in increased difficulty in processing business data.
By acquiring the first topological information and the second topological information, combining both, the current state of the target power-keeping memory is determined, and data processing is performed in the operable state. The first topological information includes a first monitoring state of the power-keeping memory in each storage controller, and the second topological information includes a second monitoring state of the power-keeping memory.
Improve the reliability of the target power-keeping memory, thereby improving the efficiency of business data processing.
Smart Images

Figure CN119917015A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer device storage technology, and in particular to a data processing method, apparatus, device, storage medium and program product. Background Art
[0002] Conventional storage area network (SAN) type storage devices usually use a battery backup unit (BBU) power-saving memory solution to ensure that data is not lost as much as possible. In this solution, the power-saving memory on each controller can be divided into multiple memory objects (memObj) as the smallest memory unit, and then the memObj on multiple different controllers are combined into a memory segment (memSeg), and each memObj in a memSeg is used as a power-saving memory copy to store business data.
[0003] However, the reliability of the above-mentioned power-saving memory is low, which makes it more difficult to process business data through the power-saving memory. Summary of the invention
[0004] Based on this, it is necessary to provide a data processing method, device, equipment, storage medium and program product that can improve the reliability of power-saving memory and improve the efficiency of business data processing in response to the above technical problems.
[0005] In a first aspect, the present application provides a data processing method, the method comprising:
[0006] Upon receiving a data processing request, obtaining first topology information and second topology information; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller;
[0007] The current state of the target power preservation memory corresponding to the data processing request is determined according to the first topology information and the second topology information, and the data processing request is processed based on the target power preservation memory when the current state is an operational state.
[0008] The data processing method provided in the embodiment of the present application obtains the first topology information and the second topology information when receiving a data processing request, and determines the current state of the target power-preservation memory corresponding to the data processing request based on the first topology information and the second topology information, and processes the data processing request based on the target power-preservation memory when the current state is an operational state. The first topology information includes the first monitoring state of the power-preservation memory in each storage controller, and the second topology information includes the second monitoring state of the power-preservation memory in each storage controller. In the above method, by combining the first topology information and the second topology information, the current state of the target power-preservation memory can be analyzed hierarchically, the state of the target power-preservation memory can be accurately analyzed, the reliability of the target power-preservation memory can be improved, and the efficiency of business data processing can be improved.
[0009] In one embodiment, determining the current state of the target power-preserving memory corresponding to the data processing request according to the first topology information and the second topology information includes:
[0010] Reading a first target monitoring state of the target power-preserving memory from the first topology information, and determining a current state of the target power-preserving memory according to the first target monitoring state;
[0011] If the first target monitoring state is a valid state, determining that the current state of the target power-saving memory is an operational state;
[0012] If the first target monitoring state is an uncertain state, the current state of the target power-saving memory is determined according to the first target monitoring state and the second topology information.
[0013] In one embodiment, determining the current state of the target power-saving memory according to the first target monitoring state and the second topology information includes:
[0014] Reading a second target monitoring state of the target power-saving memory from the second topology information;
[0015] The current state of the target power-saving memory is determined according to the second target monitoring state and the first target monitoring state; the second target monitoring state includes any one of an idle state, a non-idle state, a pending state, a read-only state, a pending state and a read-only state.
[0016] The method described in the embodiment of the present application further analyzes the state of the target power-preserving memory by combining the second topology information when the first target monitoring state is an uncertain state. This double verification mechanism can effectively prevent state misjudgment caused by errors in a single information source, thereby improving the reliability of the power-preserving memory.
[0017] In one embodiment, determining a current state of a target power-saving memory according to a second target monitoring state and a first target monitoring state includes:
[0018] If the second target monitoring state is an idle state, determining the current state of the target power preservation memory according to the first version number of the target power preservation memory in the first topology information and the second version number of the target power preservation memory in the second topology information;
[0019] If the second target monitoring state is a non-idle state, it is determined that the current state of the target power-saving memory is an inoperable state.
[0020] In one embodiment, determining a current state of a target power-saving memory according to a second target monitoring state and a first target monitoring state includes:
[0021] If the second target monitoring state is a pending state, the current state of the target power-preserving memory is determined according to the first application number of the target memory segment of the target power-preserving memory in the first topology information and the second application number of the target memory segment of the target power-preserving memory in the second topology information; the target power-preserving memory includes multiple memory segments;
[0022] If the second target monitoring state is a read-only state, and the type of the data processing request is a read-only type, determining that the current state of the target power-saving memory is an operational state;
[0023] If the second target monitoring state is pending and read-only, the current state of the target power-saving memory is determined according to the type of the data processing request, the first application number and the second application number.
[0024] In one embodiment, determining the current state of the target power-saving memory according to the type of the data processing request, the first application number, and the second application number includes:
[0025] If the type of the data processing request is a read-only type, and the first application number is greater than the second application number, then ensuring that the current state of the target power-saving memory is an operational state;
[0026] If the type of the data processing request is not a read-only type, it is determined that the current state of the target power-saving memory is an inoperable state.
[0027] The method described in the embodiment of the present application uses different methods to judge the current state of the target power-preserving memory for different types of second target monitoring states, thereby achieving one-to-one precise matching, which can greatly improve the accuracy of judging the current state of the target power-preserving memory.
[0028] In a second aspect, the present application further provides a data processing device, the device comprising:
[0029] An acquisition module, configured to acquire first topology information and second topology information upon receiving a data processing request; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller;
[0030] The processing module is used to determine the current state of the target power-preserving memory corresponding to the data processing request according to the first topology information and the second topology information, and process the data processing request based on the target power-preserving memory when the current state is an operational state.
[0031] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0032] Upon receiving a data processing request, obtaining first topology information and second topology information; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller;
[0033] The current state of the target power preservation memory corresponding to the data processing request is determined according to the first topology information and the second topology information, and the data processing request is processed based on the target power preservation memory when the current state is an operational state.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0035] Upon receiving a data processing request, obtaining first topology information and second topology information; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller;
[0036] The current state of the target power preservation memory corresponding to the data processing request is determined according to the first topology information and the second topology information, and the data processing request is processed based on the target power preservation memory when the current state is an operational state.
[0037] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0038] Upon receiving a data processing request, obtaining first topology information and second topology information; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller;
[0039] The current state of the target power preservation memory corresponding to the data processing request is determined according to the first topology information and the second topology information, and the data processing request is processed based on the target power preservation memory when the current state is an operational state.
[0040] The above-mentioned data processing method, device, equipment, storage medium and program product, the method obtains the first topology information and the second topology information when receiving the data processing request, and determines the current state of the target power-preservation memory corresponding to the data processing request according to the first topology information and the second topology information, and processes the data processing request based on the target power-preservation memory when the current state is an operational state. Among them, the first topology information includes the first monitoring state of the power-preservation memory in each storage controller, and the second topology information includes the second monitoring state of the power-preservation memory in each storage controller. In the above-mentioned method, in combination with the first topology information and the second topology information, the current state of the target power-preservation memory can be analyzed hierarchically, the state of the target power-preservation memory can be accurately analyzed, the reliability of the target power-preservation memory can be improved, and the efficiency of business data processing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 An application environment diagram of a data processing method in an embodiment;
[0042] Figure 2 is a schematic diagram of the structure of a data processing system in one embodiment;
[0043] Figure 3 is a flow chart of a data processing method in one embodiment;
[0044] Figure 4 is a schematic diagram of first topology information in an embodiment;
[0045] Figure 5 is a schematic diagram of second topology information in one embodiment;
[0046] Figure 6 is a flow chart of a data processing method in another embodiment;
[0047] Figure 7 is a flow chart of a data processing method in another embodiment;
[0048] Figure 8 is a flow chart of a data processing method in another embodiment;
[0049] Fig. 9 is a flow chart of a data processing method in another embodiment;
[0050] Fig.10 is a flow chart of a data processing method in another embodiment;
[0051] Fig.11 is a structural block diagram of a data processing device in one embodiment;
[0052] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] Conventional storage area network (SAN) type storage devices usually use a battery backup unit (BBU) power-saving memory solution to ensure that data is not lost as much as possible. In this solution, the power-saving memory on each controller can be divided into multiple memory objects (MemoryObject, memObj) as the smallest memory unit, and then the memObj on multiple different controllers are combined into a memory segment (memSeg), and each memObj in the memSeg is used as a power-saving memory copy to store business data. However, the reliability of the above-mentioned power-saving memory is low, which makes it more difficult to process business data through the power-saving memory.
[0055] The present application provides a data processing method, aiming to solve the above-mentioned technical problems. The following embodiments will specifically illustrate the data processing method described in the present application.
[0056] The data processing method provided in the embodiment of the present application can be applied to Figure 1The data processing system shown includes a computer device 101 and multiple storage devices 102. Each storage device 102 is provided with a controller 1021. The controller 1021 is used to manage the memory information on the corresponding storage device. The memory information includes ordinary memory and power-preservation memory. The controller 1021 is used to maintain and manage the first topology information and the second topology information to monitor the status of the power-preservation memory in real time. The computer device 101 is used to analyze the current status of the power-preservation memory by calling the first topology information and the second topology information on the controller 1021 when receiving a data processing request, and process the data processing request based on the power-preservation memory when the current status of the power-preservation memory is an operational state. Figure 2 As shown, the data processing system includes two controllers (controller 1 and controller 2, and the two controllers synchronize information through a communication link link). The power-saving memory can be divided into multiple memory objects (Memory Object, referred to as memObj), and then the memObj on two different controllers are combined into memory segments (Memory Segment, referred to as memSeg), such as memObj1 and memObj2. Each memory object (memObj) is placed in the memory segment (memSeg) as a copy. The redundant setting of the power-saving memory copies can be achieved through the memory segments (memSeg) on multiple controllers. When data is written, the power-saving memory copies on multiple controllers will be written at the same time. When one controller fails, the data of memObj on another controller can be used to ensure high reliability. It should be noted that Figure 2 Only two controllers are illustrated in the example. In actual applications, the number of controllers can be 4, 8 or more according to performance requirements and business requirements. The embodiment of the present application does not limit the number of controllers.
[0057] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the data processing system to which the scheme of the present application is applied. The specific data processing system may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0058] In one embodiment, Figure 3 As shown, a data processing method is provided, which is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0059] S201: upon receiving a data processing request, obtaining first topology information and second topology information.
[0060] The data processing request includes the identifier of the controller. The first topology information (mSegLibTopo) includes the first monitoring state of the power-saving memory in each storage controller, and the second topology information includes the second monitoring state of the power-saving memory in each storage controller.
[0061] like Figure 4 As shown, the first topology information includes a controller identifier (i.e., controller ID), a current version number, and a first monitoring state. The version number in the first topology information is determined by the version number in the second topology information. The first monitoring state includes a valid state (valid) and an uncertain state (uncertain). The valid state (valid) indicates that the current power-saving memory is available, and the uncertain state (uncertain) indicates that the available state of the current memory segment needs to be analyzed and determined in combination with the second topology information.
[0062] like Figure 5 As shown, the second topology information (memSegTopo) includes a controller identifier (i.e., controller ID), an identifier of the current memory segment (i.e., memSeg ID), a current version number, and a second monitoring state. The current version number is used to indicate the update status of all data in the power-saving memory or the recovery status after a controller failure. Specifically, when a controller fails and the controller is restored (i.e., all data in the power-saving memory is loaded), the version number will be updated. For example, the version number before the controller failure is 1. When the controller is restored and all data in the power-saving memory is restored, the current version number is 2. When the version number is updated, the version number in the second topology information is updated first, and then the version number in the first topology information is updated according to the version number in the second topology information. The second monitoring state includes an idle state (valid), a non-idle state (invalid), a state to be checked (needcheck), a read-only state (readonly), and a state to be checked and read-only (readonly and check). The non-idle state (invalid) indicates that the current power-saving memory is unavailable. The idle state (valid) indicates that the current power-saving memory is available. The need-check state (needcheck) indicates that the availability of the current memory segment needs to be further checked. The read-only state (readonly) indicates that the controller of the current memory segment can only read but not write. The need-check and read-only state (readonly and check) indicates that the availability of the current memory segment needs to be further checked and the controller of the current memory segment can only read but not write.
[0063] In the embodiment of the present application, a power-saving memory management module (memSegMgr) and a business process library (memSegLib) may be pre-set in each controller. The power-saving memory management modules on each controller communicate with each other (link), and the power-saving memory management modules monitor the status of the power-saving memory in real time, and construct the second topology information (memSegTopo) to record the status of the power-saving memory monitored in real time. The business process library (memSegLib) on each controller provides an interface for the business process to perform business processing, and constructs the first topology information (mSegLibTopo) to record the status of the controller.
[0064] The process of real-time monitoring of the status of the power-saving memory in the power-saving memory management module (memSegMgr) is as follows: Figure 6As shown, A0 indicates that upon receiving a service request, the initialization operation of the power-saving memory structure is performed. A1 indicates that the power-saving memory is successfully registered. A2 indicates that the controller communication link link prompts that the current controller is reconnected or the OS system is restarted. A3 indicates that the power of the backup battery unit BBU is insufficient when the power-saving memory is registered. A4 indicates that the power of the backup battery unit BBU on the controller meets the requirements of the persistent memory object. A5 indicates that all or part of the loading fails when the power-saving memory is registered, and the power of the backup battery unit BBU is sufficient. A6 indicates that the ID of the memSeg to which the allocated memObj on the controller belongs is greater than the maximum existing memSegID recorded on the memSegMgr when the controller is registered, that is, the identifier of the current memory segment on the controller is greater than the maximum memSegID before the controller fails. In this case, it indicates that the data in the power-saving memory is the latest and most complete state. A7 indicates that all or part of the loading fails when the power-saving memory is registered, and the power of the backup battery unit BBU is insufficient when the power-saving memory is registered. A8 indicates that the power of the backup battery unit BBU on the controller meets the requirements of the persistent memory object. A9 indicates that the IDs of the memSegs to which the allocated memObj on the controller belongs are all greater than the maximum existing memSegID recorded on the memSegMgr when the controller is registered, that is, the identifier of the current memory segment on the controller is greater than the maximum memSegID before the controller fails. In this case, the data in the power-saving memory is the latest and most complete. The S0 state indicates the non-idle state (invalid). In this scenario, the power-saving memory on the controller is unavailable. The S1 state indicates the idle state (valid). In this scenario, the power-saving memory on the controller is available. The S2 state indicates the read-only state (readonly). In this scenario, the controller of the current memory segment can only read but not write. The S3 state indicates the pending check state (needcheck). In this scenario, the maximum existing memSegID recorded on the memSegMgr when the controller is registered is less than the ID of the memSeg to which the allocated memObj belongs. The S4 state indicates the readonly and check state. In this scenario, it means that the maximum existing memSegID recorded on the memSegMgr when the controller is registered is smaller than the ID of the memSeg to which the allocated memObj belongs, and the controller of the current memory segment can only read but not write.
[0065] The business process library (memSegLib) records the state of the controller. Figure 7As shown, A0 indicates that when the business process library is initialized, it is checked that the state of the controller in the second topology information is idle. A1 indicates that the controller communication link link prompts the current controller to reconnect or the OS system to restart. A2 indicates that the state of the controller in the local second topology information is idle, and the current version number of the controller in the second topology information is higher than or equal to the current version number in the first topology information. In this case, it means that the data recorded in the power-saving memory in the second topology information has been loaded, and the data is in a trusted state, so the business process can directly use the data for business processing. A3 means that when the business process library is initialized, it is checked that the controller in the second topology information is in an invalid state, or the controller cannot be found.
[0066] The computer device may be integrated with the business process library (memSegLib) or may be independently configured to process the business on the business process library. After receiving the data processing request, the computer device may obtain the first topology information from the business process library (memSegLib) and / or obtain the second topology information from the power-saving memory management module (memSegMgr).
[0067] S202, determining a current state of a target power-preserving memory corresponding to a data processing request according to the first topology information and the second topology information, and processing the data processing request based on the target power-preserving memory when the current state is an operational state.
[0068] The target power-saving memory is a memory segment (memSeg) required to process the request.
[0069] In an embodiment of the present application, after receiving a data processing request, the computer device may also parse the data processing request, parse out the controller and memory segment (memSeg) required for the data processing request, and determine the controller required for the data processing request as the target controller and the memory segment (memSeg) required for the processing request as the target power-preserving memory. After the computer device obtains the first topology information and the second topology information based on the above steps, it can determine the current state of the target power-preserving memory according to the state of the controller and the state of the target power-preserving memory recorded in the first topology information and the second topology information, and process the data processing request based on the target power-preserving memory when the current state is an operational state. Specifically, the first topology information can be used for preliminary analysis first, and then combined with the second topology information for secondary analysis. Optionally, the second topology information can be used for preliminary analysis first, and then combined with the first topology information for secondary analysis. Optionally, the first topology information and the second topology information can be used simultaneously for analysis.
[0070] The data processing method provided in the embodiment of the present application obtains the first topology information and the second topology information when receiving a data processing request, and determines the current state of the target power-preservation memory corresponding to the data processing request based on the first topology information and the second topology information, and processes the data processing request based on the target power-preservation memory when the current state is an operational state. The first topology information includes the first monitoring state of the power-preservation memory in each storage controller, and the second topology information includes the second monitoring state of the power-preservation memory in each storage controller. In the above method, in combination with the first topology information and the second topology information, the current state of the target power-preservation memory can be analyzed hierarchically, the state of the target power-preservation memory can be accurately analyzed, the reliability of the target power-preservation memory can be improved, and the efficiency of business data processing can be improved.
[0071] In one embodiment, a specific implementation method for determining the current state of the target power-saving memory corresponding to the data processing request is also provided, such as Figure 8 As shown, the above step S202 of "determining the current state of the target power-preserving memory corresponding to the data processing request according to the first topology information and the second topology information" includes:
[0072] S301, reading a first target monitoring state of a target power preservation memory from first topology information, and determining a current state of the target power preservation memory according to the first target monitoring state.
[0073] The first target monitoring state is the current state of the target power-saving memory corresponding to the target controller. The first target monitoring state includes a valid state (valid) and an uncertain state (uncertain).
[0074] In an embodiment of the present application, after obtaining the first topology information, the computer device can read the first target monitoring state of the target power preservation memory from the first topology information according to the identification of the target controller, and determine the first target monitoring state as the current state of the target power preservation memory.
[0075] S302: If the first target monitoring state is a valid state, determine that the current state of the target power-saving memory is an operable state.
[0076] In the embodiment of the present application, if the first target monitoring state is a valid state, the current state of the target power preservation memory is determined to be an operational state, and then the computer device can process the data processing request based on the target power preservation memory.
[0077] S303: If the first target monitoring state is an uncertain state, determine the current state of the target power-saving memory according to the first target monitoring state and the second topology information.
[0078] In the embodiment of the present application, if the first target monitoring state is an uncertain state, the second topology information is acquired, and the current state of the target power-saving memory is determined according to the first target monitoring state and the second topology information.
[0079] Specifically, Fig. 9 As shown, the above step S303 of "determining the current state of the target power-saving memory according to the first target monitoring state and the second topology information" includes:
[0080] S401, reading a second target monitoring state of a target power-saving memory from second topology information.
[0081] In the embodiment of the present application, after acquiring the second topology information, the computer device can read the second target monitoring state of the target power-saving memory from the second topology information according to the identifier of the target controller.
[0082] S402: Determine a current state of a target power-saving memory according to a second target monitoring state and a first target monitoring state.
[0083] The second target monitoring state includes any one of an idle state, a non-idle state, a pending check state, a read-only state, a pending check state and a read-only state.
[0084] In the embodiment of the present application, when the computer device determines that the first target monitoring state is an uncertain state, the computer device can determine the current state of the target power-preserving memory according to the second target monitoring state and the first target monitoring state.
[0085] The method described in the embodiment of the present application further analyzes the state of the target power-preserving memory by combining the second topology information when the first target monitoring state is an uncertain state. This double verification mechanism can effectively prevent state misjudgment caused by errors in a single information source, thereby improving the reliability of the power-preserving memory.
[0086] In one embodiment, a specific implementation method for determining the current state of the target power-preserving memory according to the second target monitoring state and the first target monitoring state is also provided. The “determining the current state of the target power-preserving memory according to the second target monitoring state and the first target monitoring state” in the above step S402 includes:
[0087] S501: If the second target monitoring state is an idle state, determine a current state of the target power preservation memory according to a first version number of the target power preservation memory in the first topology information and a second version number of the target power preservation memory in the second topology information.
[0088] The first version number is the current version number in the first topology information, and the second version number is the current version number in the second topology information.
[0089] In the embodiment of the present application, when the computer device determines that the second target monitoring state is an idle state (valid), it can further obtain the first version number of the target power-preserving memory from the first topology information and the second version number of the target power-preserving memory from the second topology information, and then determine the current state of the target power-preserving memory according to the first version number and the second version number. If the second version number is greater than the first version number, it is determined that the current state of the target power-preserving memory is an operational state, and the first version number is updated to the second version number in the first topology information. If the second version number is less than or equal to the first version number, it is determined that the current state of the target power-preserving memory is an inoperable state, and an alarm prompt is issued.
[0090] S502: If the second target monitoring state is a non-idle state (invalid), determining that the current state of the target power-saving memory is an inoperable state.
[0091] In the embodiment of the present application, when the computer device determines that the second target monitoring state is a non-idle state, it determines that the current state of the target power-saving memory is an inoperable state and issues an alarm prompt.
[0092] S503, if the second target monitoring state is a pending state, determine the current state of the target power-preserving memory according to the first application number of the target memory segment of the target power-preserving memory in the first topology information and the second application number of the target memory segment of the target power-preserving memory in the second topology information.
[0093] The first application number is the identifier of the currently applied memory segment. The second application number represents the memSegID in the second topology information, that is, the identifier of the largest memory segment before the controller fails. The target power-saving memory includes multiple memory segments.
[0094] In an embodiment of the present application, the computer device can determine the identifier of the currently requested memory segment each time it receives a business processing request, and store it in the first topology information. When the computer device determines that the second target monitoring state is a pending state (need check), it can further determine the current first application number, or obtain the first application number of the target memory segment of the target power-preserving memory from the first topology information, and obtain the second application number of the target memory segment of the target power-preserving memory from the second topology information. If the first application number is greater than the second application number, determine whether the first application number is greater than the second application number. If the first application number is greater than the second application number, in this case, it means that the currently requested memory segment is the latest, then determine that the current state of the target power-preserving memory is an operational state; if the first application number is greater than the second application number, then determine that the current state of the target power-preserving memory is an operational state. The number is not greater than the second application number. In this case, it means that the currently requested memory segment is not the latest one and there may be an abnormality. For example, when the system applies for memory segment 1, memory segment 2, and memory segment 3, and the controller fails, then after the controller fails, the system re-applies for memory segment 5 and memory segment 6. At this time, memory segment 1, memory segment 2, and memory segment 3 may have faults, while memory segment 5 and memory segment 6 are normal. If the first application number is not greater than the second application number, it means that the target memory segment that may be requested by the current business request may be memory segment 1, memory segment 2, and memory segment 3, that is, fault data may be obtained, so it is determined that the current state of the target power-saving memory is inoperable.
[0095] S504: If the second target monitoring state is a read-only state, and the type of the data processing request is a read-only type, determine that the current state of the target power-saving memory is an operable state.
[0096] In an embodiment of the present application, when the computer device determines that the second target monitoring state is a read-only state (readonly), it can further determine the type of data processing request. If the type of the data processing request is a read-only type, the current state of the target power-preservation memory is determined to be an operational state. If the type of the data processing request is not a read-only type, the current state of the target power-preservation memory is determined to be an inoperable state.
[0097] S505: If the second target monitoring state is pending and read-only, determine the current state of the target power-saving memory according to the type of the data processing request, the first application number and the second application number.
[0098] In the embodiment of the present application, when the computer device determines that the second target monitoring state is to be checked and read-only (readonly and check), the current state of the target power-saving memory can be determined according to the type of data processing request, the first application number and the second application number, that is, the current state of the target power-saving memory is determined in combination with steps S503 and S504. Specifically, it can be determined at the same time whether the type of data processing request is a read-only type, and whether the first application number is greater than the second application number. If both are satisfied, the current state of the target power-saving memory is determined to be an operational state. If any one is not satisfied, the current state of the target power-saving memory is determined to be an inoperable state.
[0099] Optionally, if the type of the data processing request is read-only and the first application number is greater than the second application number, the current state of the target power-preserving memory is determined to be an operational state; if the type of the data processing request is not read-only, the current state of the target power-preserving memory is determined to be an inoperable state.
[0100] In an embodiment of the present application, it can be determined first whether the type of the data processing request is a read-only type. If the type of the data processing request is a read-only type, it is determined whether the first application number is greater than the second application number. If the first application number is greater than the second application number, it is determined that the current state of the target power-preservation memory is an operational state. If the first application number is not greater than the second application number, it is determined that the current state of the target power-preservation memory is an inoperable state. If the type of the data processing request is not a read-only type, it is determined that the current state of the target power-preservation memory is an inoperable state.
[0101] The method described in the embodiment of the present application uses different methods to judge the current state of the target power-preserving memory for different types of second target monitoring states, thereby achieving one-to-one precise matching, which can greatly improve the accuracy of judging the current state of the target power-preserving memory.
[0102] Based on all the above embodiments, a data processing method is also provided. Fig.10 As shown, the method includes:
[0103] S601, upon receiving a data processing request, obtaining first topology information and second topology information, wherein the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller.
[0104] S602: Read a first target monitoring state of a target power preservation memory from the first topology information, and determine a current state of the target power preservation memory according to the first target monitoring state.
[0105] S603: If the first target monitoring state is a valid state, determine that the current state of the target power-saving memory is an operable state.
[0106] S604: If the first target monitoring state is an uncertain state, read the second target monitoring state of the target power-saving memory from the second topology information.
[0107] S605, determining the current state of the target power-saving memory according to the second target monitoring state and the first target monitoring state. The second target monitoring state includes any one of an idle state, a non-idle state, a pending state, a read-only state, a pending state and a read-only state.
[0108] S606: If the second target monitoring state is an idle state, determine the current state of the target power preservation memory according to the first version number of the target power preservation memory in the first topology information and the second version number of the target power preservation memory in the second topology information.
[0109] S607: If the second target monitoring state is a non-idle state, determine that the current state of the target power-saving memory is an inoperable state.
[0110] S608, if the second target monitoring state is a pending state, determine the current state of the target power-saving memory according to the first application number of the target memory segment of the target power-saving memory in the first topology information and the second application number of the target memory segment of the target power-saving memory in the second topology information. The target power-saving memory includes multiple memory segments.
[0111] S609: If the second target monitoring state is a read-only state, and the type of the data processing request is a read-only type, determine that the current state of the target power-saving memory is an operable state.
[0112] S610, if the second target monitoring state is pending and read-only, if the type of the data processing request is read-only, and the first application number is greater than the second application number, it is determined that the current state of the target power-saving memory is an operational state.
[0113] S611: If the type of the data processing request is not a read-only type, determine that the current state of the target power-saving memory is an inoperable state.
[0114] S612: When the current state is an operable state, the data processing request is processed based on the target power-saving memory.
[0115] In the embodiment of the present application, the two-level topology tables, mSegLibTopo and memSegTopo, are combined to determine the power-saving memory status before data processing.
[0116] When memSegLib reads and writes a certain memSeg, the specific operation is on the memObj under it. The state of the target controller to which memObj belongs is checked through the local mSegLibTopo. If it is valid, the check passes (that is, the current state of the target power-saving memory is operational), and reading and writing are possible. If it is in the uncertain state, it means that the state of the target controller may have changed, and it is necessary to continue to check the state of the target controller in memSegTopo on the local controller. If the state of the target controller in memSegTopo is valid, it is necessary to check whether the version number of memSegTopo is higher than the version number of mSegLibTopo. If it is higher, it means that the control state is credible and the check passes (that is, the current state of the target power-saving memory is operational). If it is lower, it means that the memSegTopo state has not been updated and the check fails (that is, the current state of the target power-saving memory is inoperable). If the target controller is in the invalid state, the check fails directly. The target controller is in the needcheck state. It is necessary to compare the memSeg ID used by the user with the intercepted memSegID size of the controller recorded in memSegTopo. If it is greater, the check passes, otherwise it fails. The target controller is in the readonly state. The user passes the read request check, but fails the write request check. The target controller is in the readonlyandcheck state. It is necessary to meet the check rules for the target controller in the needcheck and readonly states at the same time.
[0117] The method described in the embodiment of the present application is to divide the power-saving memory on each controller into multiple small units, and then assemble these small units on different controllers into power-saving memory segments. Data can be written directly to the power-saving memory on multiple controllers to ensure high data reliability. At the same time, the user can obtain the data in time on another controller. By adding memSegTopo in the management power-saving memory segment service, the status recorded therein and the maximum power-saving memory segment ID data allocated are broadcast to all controllers immediately after the status is updated, so that each controller can perceive the power-saving memory status of all controllers at the first time. By adding mSegLibTopo of the power-saving memory user position, through the inter-control link status recorded by it, the user can perceive the change of the status of a certain controller at the first time, and then go to memSegTopo to query whether the power-saving memory status of the control is available. By combining mSegLibTopo and memSegTopo, when using the power-saving memory segment, it can be accurate to whether a specific memory segment is available on a specific controller. Accurately intercept the user's potentially risky read and write operations, allowing the user to perceive the fault in time, and then let the user use a new power-saving memory segment or directly write to the disk and other emergency measures. 2) Use the memSegTopo topology table to identify the available status of each controller's power-saving memory, and use the mSegLibTopo topology table to identify whether each controller has a fault. The two-level topology table, combined with the maximum power-saving memory segment ID generated by the record, accurately intercepts read and write faults to a specific segment, rather than the entire power-saving memory being unavailable for a long time.
[0118] The methods described in the above steps are all described in the above embodiments. Please refer to the above description for details and will not be repeated here.
[0119] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0120] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.
[0121] In one embodiment, Fig.11 As shown, a data processing device is provided, comprising:
[0122] The acquisition module 11 is used to obtain the first topology information and the second topology information when receiving a data processing request; the first topology information includes the first monitoring status of the power-saving memory in each storage controller, and the second topology information includes the second monitoring status of the power-saving memory in each storage controller.
[0123] The processing module 12 is used to determine the current state of the target power preservation memory corresponding to the data processing request according to the first topology information and the second topology information, and process the data processing request based on the target power preservation memory when the current state is an operational state.
[0124] In one embodiment, the processing module includes:
[0125] The first determining unit is configured to read a first target monitoring state of the target power preservation memory from the first topology information, and determine a current state of the target power preservation memory according to the first target monitoring state.
[0126] The second determining unit is configured to determine that the current state of the target power-saving memory is an operable state if the first target monitoring state is a valid state.
[0127] The third determining unit is configured to determine a current state of the target power-preserving memory according to the first target monitoring state and the second topology information if the first target monitoring state is an uncertain state.
[0128] In one embodiment, the third determining unit includes:
[0129] The reading subunit is used to read the second target monitoring state of the target power-saving memory from the second topology information.
[0130] The determination subunit is used to determine the current state of the target power-saving memory according to the second target monitoring state and the first target monitoring state; the second target monitoring state includes any one of an idle state, a non-idle state, a to-be-checked state, a read-only state, a to-be-checked state and a read-only state.
[0131] In one embodiment, the above-mentioned determination subunit is specifically used to determine the current state of the target power preservation memory based on the first version number of the target power preservation memory in the first topology information and the second version number of the target power preservation memory in the second topology information if the second target monitoring state is an idle state; if the second target monitoring state is a non-idle state, determine that the current state of the target power preservation memory is an inoperable state.
[0132] In one embodiment, the above-mentioned determination subunit is also specifically used to determine the current state of the target power-preservation memory according to the first application number of the target memory segment of the target power-preservation memory in the first topology information and the second application number of the target memory segment of the target power-preservation memory in the second topology information if the second target monitoring state is a pending state; the target power-preservation memory includes multiple memory segments. If the second target monitoring state is a read-only state, and the type of the data processing request is a read-only type, then the current state of the target power-preservation memory is determined to be an operational state; if the second target monitoring state is a pending state and a read-only state, then the current state of the target power-preservation memory is determined according to the type of the data processing request, the first application number, and the second application number.
[0133] In one embodiment, the determination subunit is further specifically used to determine the current state of the target power-saving memory according to the type of the data processing request, the first application number and the second application number, including:
[0134] If the data processing request type is read-only and the first application number is greater than the second application number, the current state of the target power-saving memory is determined to be an operational state; if the data processing request type is not read-only, the current state of the target power-saving memory is determined to be an inoperable state.
[0135] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0136] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. The internal structure diagram thereof may be as follows: Fig.12As shown, the computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0137] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0138] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the data processing method described in any of the above embodiments is implemented.
[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data processing method described in any of the above embodiments is implemented.
[0140] In one embodiment, a computer program product is provided, including a computer program, which implements the data processing method described in any of the above embodiments when executed by a processor.
[0141] The above embodiment provides a computer program product, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0142] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0144] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: The method comprises: Upon receiving a data processing request, obtaining first topology information and second topology information; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller; The current state of the target power-preserving memory corresponding to the data processing request is determined according to the first topology information and the second topology information, and when the current state is an operational state, the data processing request is processed based on the target power-preserving memory.
2. The method according to claim 1, characterized in that: The determining, according to the first topology information and the second topology information, a current state of the target power-preserving memory corresponding to the data processing request includes: Reading a first target monitoring state of the target power-preserving memory from the first topology information, and determining a current state of the target power-preserving memory according to the first target monitoring state; If the first target monitoring state is a valid state, determining that the current state of the target power-saving memory is the operable state; If the first target monitoring state is an uncertain state, the current state of the target power-saving memory is determined according to the first target monitoring state and the second topology information.
3. The method according to claim 2, characterized in that The determining the current state of the target power-preserving memory according to the first target monitoring state and the second topology information includes: Reading a second target monitoring state of the target power-saving memory from the second topology information; The current state of the target power-saving memory is determined according to the second target monitoring state and the first target monitoring state; the second target monitoring state includes any one of an idle state, a non-idle state, a pending state, a read-only state, a pending state and a read-only state.
4. The method according to claim 3, characterized in that The determining the current state of the target power-saving memory according to the second target monitoring state and the first target monitoring state includes: If the second target monitoring state is the idle state, determining the current state of the target power preservation memory according to the first version number of the target power preservation memory in the first topology information and the second version number of the target power preservation memory in the second topology information; If the second target monitoring state is the non-idle state, it is determined that the current state of the target power preservation memory is the inoperable state.
5. The method according to claim 3, characterized in that: The determining the current state of the target power-saving memory according to the second target monitoring state and the first target monitoring state includes: If the second target monitoring state is the pending state, determining the current state of the target power-preserving memory according to the first application number of the target memory segment of the target power-preserving memory in the first topology information and the second application number of the target memory segment of the target power-preserving memory in the second topology information; the target power-preserving memory includes multiple memory segments; If the second target monitoring state is the read-only state, and the type of the data processing request is the read-only type, determining that the current state of the target power-saving memory is the operable state; If the second target monitoring state is the pending and read-only state, the current state of the target power-saving memory is determined according to the type of the data processing request, the first application number and the second application number.
6. The method according to claim 5, characterized in that The determining, according to the type of the data processing request, the first application number, and the second application number, a current state of the target power-saving memory includes: If the type of the data processing request is a read-only type, and the first application number is greater than the second application number, determining that the current state of the target power-saving memory is the operable state; If the type of the data processing request is not a read-only type, it is determined that the current state of the target power-saving memory is the inoperable state.
7. A data processing device, characterized in that: The device comprises: An acquisition module, configured to acquire first topology information and second topology information upon receiving a data processing request; the first topology information includes a first monitoring state of a power-saving memory in each storage controller, and the second topology information includes a second monitoring state of a power-saving memory in each storage controller; A processing module is used to determine the current state of the target power-preserving memory corresponding to the data processing request according to the first topology information and the second topology information, and to process the data processing request based on the target power-preserving memory when the current state is an operational state.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.