System verification method and device, computer equipment and readable storage medium
By building operation sequence sets and utilizing linear consistency verification model, the problem of isolation of verification points and difficult to detect deep defects in traditional verification methods is solved, and the accuracy of linear consistency verification of distributed resource management systems is improved.
Patent Information
- Application Number
- CN202411665352.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
When traditional methods verify the linear consistency of distributed resource management systems, they are prone to problems such as isolation of verification points and difficulty in discovering deep defects, resulting in low accuracy of verification results.
By obtaining the operation history set of the distributed resource management system, building the operation sequence set, using the linear consistency verification model to determine the resource existence and attribute verification results of the candidate operation sequence, and finally determining the linear consistency verification results of the system.
This method can more deeply verify the linear consistency of the distributed resource management system, improve verification accuracy, and ensure the authenticity and accuracy of verification results.
Smart Images

Figure CN119598442A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a system verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] As the cornerstone of most current mainstream information technologies, distributed resource management systems are widely used; however, due to their inherent distributed characteristics, the linear consistency of distributed resource management systems has always been their most concerned issue.
[0003] In traditional technology, when verifying the linear consistency of a distributed resource management system, consistency verification is mainly performed by executing operations in batches and then comparing batch results. However, this verification method only considers batch result comparison, which is prone to the disadvantages of isolated verification points and difficulty in discovering deep defects, resulting in low accuracy of the obtained verification results, and thus low accuracy of linear consistency verification of distributed resource management systems. Summary of the invention
[0004] Based on this, it is necessary to provide a system verification method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of linear consistency verification of distributed resource management systems in response to the above technical problems.
[0005] In a first aspect, the present application provides a system verification method, comprising:
[0006] Acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request;
[0007] According to the operation history set, an operation sequence set is obtained; the operation sequence set includes a plurality of candidate operation sequences, and each candidate operation sequence includes the plurality of operation requests;
[0008] Determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model;
[0009] The linear consistency verification result of the distributed resource management system is determined according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0010] In one embodiment, the step of obtaining an operation history set for the distributed resource management system to be verified includes:
[0011] According to the configuration file, multiple operation threads are started; each operation thread is used to send a corresponding operation request to the distributed resource management system to be verified, and receive an operation response to the operation request returned by the distributed resource management system;
[0012] Recording the operation request sent by each operation thread and the operation response of the operation request;
[0013] The operation history set is obtained according to the operation request sent by each operation thread and the operation response of the operation request.
[0014] In one embodiment, obtaining an operation sequence set according to the operation history set includes:
[0015] Determine the timing information corresponding to each operation request according to the initiation time of each operation request and the reception time of the operation response corresponding to each operation request;
[0016] According to the timing information corresponding to each operation request, filter out target operation requests with overlapping timing information from each operation request;
[0017] According to the timing information corresponding to each operation request and the permutation and combination information of the target operation request, each operation request is permuted and combined to obtain a plurality of candidate operation sequences;
[0018] The operation sequence set is constructed based on the multiple candidate operation sequences.
[0019] In one embodiment, determining the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model includes:
[0020] Obtaining a resource existence constraint condition of a resource existence verification model in a linear consistency verification model; the resource existence constraint condition is used to indicate that an operation response in a resource existence phase is a resource existence state, and an operation response in a resource non-existence phase is a resource non-existence state;
[0021] According to the resource existence constraint condition, the operation responses in the resource existence phase and the resource non-existence phase of each of the candidate operation sequences are verified respectively to obtain the resource existence verification result of each of the candidate operation sequences.
[0022] In one embodiment, determining the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model further includes:
[0023] Obtaining a resource attribute constraint condition of a resource attribute verification model in a linear consistency verification model; the resource attribute constraint condition is used to indicate that the attribute value returned by a resource query operation executed in a resource existence phase is a corresponding expected value;
[0024] According to the resource attribute constraint condition, the attribute values returned by the resource query operation executed in the resource existence phase of each candidate operation sequence are verified respectively to obtain the resource attribute verification result of each candidate operation sequence.
[0025] In one embodiment, determining the linearizability verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence includes:
[0026] If there is a candidate operation sequence in each of the candidate operation sequences, whose resource existence verification result and resource attribute verification result both indicate that the verification is passed, determining that the linear consistency verification of the distributed resource management system is passed;
[0027] When there is no resource existence verification result and resource attribute verification result of a candidate operation sequence in each of the candidate operation sequences both indicating that the verification is passed, it is determined that the linear consistency verification of the distributed resource management system has failed.
[0028] In a second aspect, the present application also provides a system verification device, including:
[0029] A set acquisition module, used to acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request;
[0030] A sequence determination module, configured to obtain an operation sequence set according to the operation history set; the operation sequence set includes a plurality of candidate operation sequences, each candidate operation sequence includes the plurality of operation requests;
[0031] A sequence verification module, used to determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model;
[0032] The result determination module is used to determine the linear consistency verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request;
[0035] According to the operation history set, an operation sequence set is obtained; the operation sequence set includes a plurality of candidate operation sequences, and each candidate operation sequence includes the plurality of operation requests;
[0036] Determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model;
[0037] The linear consistency verification result of the distributed resource management system is determined according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0039] Acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request;
[0040] According to the operation history set, an operation sequence set is obtained; the operation sequence set includes a plurality of candidate operation sequences, and each candidate operation sequence includes the plurality of operation requests;
[0041] Determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model;
[0042] The linear consistency verification result of the distributed resource management system is determined according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0044] Acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request;
[0045] According to the operation history set, an operation sequence set is obtained; the operation sequence set includes a plurality of candidate operation sequences, and each candidate operation sequence includes the plurality of operation requests;
[0046] Determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model;
[0047] The linear consistency verification result of the distributed resource management system is determined according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0048] The above-mentioned system verification method, apparatus, computer equipment, computer-readable storage medium and computer program product first obtain an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request; then, based on the operation history set, an operation sequence set is obtained; the operation sequence set includes multiple candidate operation sequences, and each candidate operation sequence includes multiple operation requests; then, through the linear consistency verification model, the resource existence verification result and resource attribute verification result of each candidate operation sequence are determined; finally, based on the resource existence verification result and resource attribute verification result of each candidate operation sequence, the linear consistency verification result of the distributed resource management system is determined. In this way, in the process of linear consistency verification of the distributed resource management system, multiple candidate operation sequences composed of multiple operation requests for the distributed resource management system are comprehensively considered, that is, the operation of the distributed resource management system under a large number of concurrent operations is comprehensively considered, so that the linear consistency of the distributed resource management system can be effectively verified, and the verification level is deeper, so that the final linear consistency verification result is more accurate, thereby improving the linear consistency verification accuracy of the distributed resource management system; at the same time, a linear consistency verification model is introduced, and the resource existence verification results and resource attribute verification results of each candidate operation sequence are determined, which is conducive to comprehensively considering the resource existence verification results and resource attribute verification results of each candidate operation sequence, so that the linear consistency of the distributed resource management system can be more realistically reflected, further improving the linear consistency verification accuracy of the distributed resource management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 An application environment diagram of a system verification method in an embodiment;
[0051] Figure 2 A schematic diagram of a flow chart of a system verification method in an embodiment;
[0052] Figure 3 A flowchart of steps for obtaining an operation history set in one embodiment;
[0053] Figure 4 A schematic diagram of operation histories of multiple clients in one embodiment;
[0054] Figure 5 A schematic diagram of a candidate operation sequence complying with a resource existence constraint in one embodiment;
[0055] Figure 6 A schematic diagram of an embodiment in which a candidate operation sequence does not meet resource existence constraints;
[0056] Figure 7 A schematic diagram of a corresponding relationship between a resource existence stage and an attribute value of a candidate operation sequencer in an embodiment;
[0057] Figure 8 is a flow chart of a system verification method in another embodiment;
[0058] Fig. 9 A schematic diagram of a flow chart of a linear consistency verification method for a distributed resource management system in one embodiment;
[0059] Fig.10 It is a structural block diagram of a linear consistency verification device of a distributed resource management system in one embodiment;
[0060] Fig.11 is a structural block diagram of a system verification device in an embodiment;
[0061] Fig.12 is an internal structure diagram of a computer device in one embodiment;
[0062] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0063] 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.
[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0065] As the cornerstone of most current mainstream information technologies, distributed systems are widely used. Different from traditional systems, distributed systems have the advantages of high reliability, strong scalability, good flexibility, and high performance ceiling. However, due to its inherent distributed characteristics, the consistency of distributed systems has always been its most concerned issue. If a distributed system cannot guarantee a certain degree of consistency, then the distributed system will not be trustworthy to users, and it cannot be guaranteed that the entire system will operate normally as expected. Among distributed systems, the most common system is the distributed resource management system. Certain resources are stored in a certain format in a distributed resource management system. At the same time, the distributed resource management system can provide parallel resource management capabilities to the outside world, allowing a large number of users to perform specific operations such as adding, modifying, deleting, and querying distributed resources.
[0066] The biggest problem that distributed systems need to solve in use is the problem of system consistency. Although various coordination schemes, transaction mechanisms and consistency algorithms are currently used to ensure the consistency of distributed systems, system inconsistencies caused by design problems, coding loopholes, etc. still occur in actual use. Therefore, it is necessary to fully verify the consistency capability of distributed systems to ensure the availability and reliability of the system. For the consistency capability of distributed resource management systems, the consistency verification is currently mainly carried out by batch execution of operations and then batch result comparison. For resource attributes, etc., the preset state is used for verification and comparison. The advantages of this verification method are simple schemes and efficient execution, but there are also disadvantages that the verification points are isolated and deep defects are difficult to find. Another more feasible verification scheme is to perform linear consistency analysis on all operation records as a whole. This method is relatively more complex in algorithm, and the algorithm model needs to be customized according to the characteristics of the distributed system. There is a certain threshold for use, but it is also better at discovering some deep consistency problems. Based on this, the present application proposes a system verification method for distributed resource management systems to improve the accuracy of linear consistency verification of distributed resource management systems.
[0067] The system verification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the verification device 102 communicates with the distributed resource management system 104 via a network. Specifically, refer to Figure 1, the verification device 102 sends an operation request to the distributed resource management system 104 through multiple operation threads, and receives the operation response returned by the distributed resource management system 104 for the operation request, and then obtains the operation history set for the distributed resource management system 104 to be verified according to the multiple operation requests for the distributed resource management system 104 and the operation response corresponding to each operation request; then obtains the operation sequence set according to the operation history set; the operation sequence set includes multiple candidate operation sequences, and each candidate operation sequence includes multiple operation requests; finally, through the linear consistency verification model, the resource existence verification result and resource attribute verification result of each candidate operation sequence are determined, and the linear consistency verification result of the distributed resource management system 104 is determined according to the resource existence verification result and resource attribute verification result of each candidate operation sequence. Among them, the verification device 102 refers to a device used to verify the linear consistency of the distributed resource management system 104, which can be a terminal or a server; the terminal can be but not limited to various personal computers, laptops, smart phones and tablet computers; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The distributed resource management system 104 refers to a distributed system that provides parallel resource management capabilities to the outside world, allowing a large number of users to perform specific operations such as adding, modifying, deleting, and querying distributed resources.
[0068] In an exemplary embodiment, Figure 2 As shown, a system verification method is provided, which is applied to Figure 1 The verification device in is taken as an example to illustrate, including the following steps S201 to S204. Among them:
[0069] Step S201 : obtaining an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request.
[0070] Among them, the distributed resource management system is a distributed system used to provide resource processing services to the outside.
[0071] The operation request refers to the operation on specific resources in the distributed resource management system, such as resource addition operation, resource deletion operation, resource modification operation, and resource query operation. For example, the verification device starts the created operation thread and simulates the external client through the operation thread to send the corresponding operation request to the distributed resource management system to be verified, so as to remotely operate the distributed resource management system.
[0072] It should be noted that the operation request involved in the present application refers to a predetermined operation request or a random operation request sent by an operation thread simulating an external client to the distributed resource management system to be verified.
[0073] The multiple operation requests for the distributed resource management system specifically include operation requests sent by multiple operation threads (also referred to as multiple external clients) to the distributed resource management system; each operation thread (also referred to as each external client) can send one or more operation requests to the distributed resource management system; for example, refer to Figure 4 , the operation request of client 1 is O 11 , O 12 , O 13 , the operation request of client 2 is O 21 , O 22 , the operation request of client 3 is O 31 , O 32 .
[0074] The operation response corresponding to the operation request refers to the response result of the distributed resource management system to the operation request. Each operation request may have two response results: normal and abnormal. For example, the response result of the resource addition operation may be that the addition is successful or the resource already exists; the response result of the resource deletion operation may be that the deletion is successful or the resource does not exist; the response result of the resource modification operation may be that the modification is successful or the resource does not exist; the response result of the resource query operation may be that the query is successful or the resource does not exist.
[0075] The operation history set refers to a set of multiple operation requests and their corresponding operation responses for the distributed resource management system, which are merged and sorted in chronological order; for example, Figure 4 , the operation history set is (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ).
[0076] Exemplarily, the verification device creates multiple operation threads, sends corresponding operation requests to the distributed resource management system through the multiple operation threads, receives and records the operation responses returned by the distributed resource management system for the operation requests, and then merges and sorts the multiple operation requests for the distributed resource management system and the operation responses corresponding to each operation request in chronological order to obtain an operation history set for the distributed resource management system to be verified.
[0077] For example, see Figure 4The verification device merges and sorts a series of operation requests and operation responses recorded by multiple operation threads in chronological order to generate an operation history set of all clients, such as (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ).
[0078] Step S202: obtaining an operation sequence set according to the operation history set; the operation sequence set includes a plurality of candidate operation sequences, and each candidate operation sequence includes a plurality of operation requests.
[0079] The candidate operation sequence refers to a possible operation sequence for the distributed resource management system. Each candidate operation sequence is composed of multiple operation requests, but the combination order of the operation requests in each candidate operation sequence is different. Figure 4 , a candidate operation sequence is (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ), another candidate operation sequence is (O 21 , O 11 , O 31 , O 12 , O 22 , O 32 , O 13 ).
[0080] It should be noted that due to the delay in the processing of the distributed resource management system, if there is an overlap in the time period between the operation requests of different clients, these operation requests are considered concurrent and their order cannot be determined. At this time, there will be multiple possible orders. Since there are generally multiple concurrent points in the operation history set, and each concurrent point has multiple possible operation orders, the total possible order (that is, all candidate operation sequences) composed of the multiple possible order of these multiple concurrent points is the operation sequence set of this operation history set. For example, refer to Figure 4 , O 11 With O 21 There is an intersection of time periods, O 12 With O 31 There is an intersection of time periods, O 13 With O 32 There is an intersection of time periods, and there are a total of 8 candidate operation sequences.
[0081] Exemplarily, the verification device determines multiple combination orders of the operation requests based on the timing information of the operation requests in the operation history set (including the time when the operation request is initiated and the time when the operation response is received); according to each combination order, these operation requests are arranged to obtain corresponding candidate operation sequences; finally, based on all candidate operation sequences, an operation sequence set corresponding to the operation history set is constructed.
[0082] For example, see Figure 4 , verify the device's operation request in the operation history set (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ) performs linear serialization processing, that is, searching and traversing candidate operation sequences according to the operation requests and their concurrency in the operation history set, such as (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 )、(O 21 , O 11 , O 31 , O 12 , O 22 , O 32 , O 13 ) etc., and finally obtain the operation sequence set corresponding to the operation history set.
[0083] Step S203: Determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through the linear consistency verification model.
[0084] Among them, the linear consistency verification model is a model used to verify the linear consistency of a distributed resource management system, specifically including a resource existence verification model and a resource attribute verification model, namely a resource existence constraint model and a resource attribute constraint model.
[0085] Among them, the resource existence verification model is a model used to verify the resource existence of a distributed resource management system; the resource attribute verification model is a model used to verify the resource attributes of a distributed resource management system.
[0086] Among them, the resource existence verification result of the candidate operation sequence refers to the result obtained after performing resource existence verification on the candidate operation sequence; for example, if all operation requests in the candidate operation sequence meet the resource existence constraint conditions, then it is determined that the resource existence verification of the candidate operation sequence is passed; if there is an operation request in the candidate operation sequence that does not meet the resource existence constraint conditions, then it is determined that the resource existence verification of the candidate operation sequence is failed.
[0087] Among them, the resource attribute verification result of the candidate operation sequence refers to the result obtained after performing resource attribute verification on the candidate operation sequence; for example, if the attribute value returned by the resource query operation executed during the resource existence phase of the candidate operation sequence meets the resource attribute constraint conditions, then the resource attribute verification of the candidate operation sequence is determined to be passed; if the attribute value returned by the resource query operation executed during the resource existence phase of the candidate operation sequence does not meet the resource attribute constraint conditions, then the resource attribute verification of the candidate operation sequence is determined to be failed.
[0088] Exemplarily, the verification device obtains a pre-built linear consistency verification model, and uses the linear consistency verification model to perform resource existence verification processing and resource attribute verification processing on each candidate operation sequence, thereby obtaining resource existence verification results and resource attribute verification results for each candidate operation sequence.
[0089] For example, see Figure 4 , the verification device respectively performs candidate operation sequence 1(O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ), candidate operation sequence 2 (O 21 , O 11 , O 31 , O 12 , O 22 , O 32 , O 13 ) etc. to perform resource existence verification and resource attribute verification, and obtain candidate operation sequence 1 (0 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ), candidate operation sequence 2 (O 21 , O 11 , O 31 , O 12 , O 22 , O 32 , O13 ) and other candidate operation sequences.
[0090] Step S204: Determine the linear consistency verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0091] The linear consistency verification result of the distributed resource management system refers to whether the distributed resource management system linear consistency verification passes or whether the distributed resource management system linear consistency verification fails.
[0092] Exemplarily, the verification device traverses the resource existence verification results and resource attribute verification results of each candidate operation sequence. If a candidate operation sequence is found and both the resource existence verification result and the resource attribute verification result of the candidate operation sequence are found to indicate that the verification has passed, it is determined that the linear consistency verification of the distributed resource management system has passed. If all candidate operation sequences are traversed and no candidate operation sequence is found and both the resource existence verification result and the resource attribute verification result of the candidate operation sequence are found to indicate that the verification has passed, it is determined that the linear consistency verification of the distributed resource management system has failed.
[0093] In the above system verification method, an operation history set for the distributed resource management system to be verified is first obtained; the operation history set includes multiple operation requests for the distributed resource management system, and the operation response corresponding to each operation request; then, based on the operation history set, an operation sequence set is obtained; the operation sequence set includes multiple candidate operation sequences, and each candidate operation sequence includes multiple operation requests; then, through the linear consistency verification model, the resource existence verification results and resource attribute verification results of each candidate operation sequence are determined; finally, based on the resource existence verification results and resource attribute verification results of each candidate operation sequence, the linear consistency verification result of the distributed resource management system is determined. In this way, in the process of linear consistency verification of the distributed resource management system, multiple candidate operation sequences composed of multiple operation requests for the distributed resource management system are comprehensively considered, that is, the operation of the distributed resource management system under a large number of concurrent operations is comprehensively considered, so that the linear consistency of the distributed resource management system can be effectively verified, and the verification level is deeper, so that the final linear consistency verification result is more accurate, thereby improving the linear consistency verification accuracy of the distributed resource management system; at the same time, a linear consistency verification model is introduced, and the resource existence verification results and resource attribute verification results of each candidate operation sequence are determined, which is conducive to comprehensively considering the resource existence verification results and resource attribute verification results of each candidate operation sequence, so that the linear consistency of the distributed resource management system can be more realistically reflected, further improving the linear consistency verification accuracy of the distributed resource management system.
[0094] In an exemplary embodiment, Figure 3 As shown, the above step S201, obtaining the operation history set for the distributed resource management system to be verified, includes the following steps S301 to S303. Among them:
[0095] Step S301, starting multiple operation threads according to the configuration file; each operation thread is used to send a corresponding operation request to the distributed resource management system to be verified, and receive an operation response to the operation request returned by the distributed resource management system.
[0096] Step S302: record the operation request sent by each operation thread and the operation response of the operation request.
[0097] Step S303: obtaining an operation history set according to the operation request sent by each operation thread and the operation response of the operation request.
[0098] The configuration file refers to an operation thread and operation request configuration file, which is used to generate an operation thread or start an operation thread, and to set an operation request (such as a predetermined operation request or a random operation request) sent by each operation thread.
[0099] Each operation thread is used to simulate an external client to send a corresponding operation request to the distributed resource management system to be verified, and receive an operation response to the operation request returned by the distributed resource management system.
[0100] Exemplarily, the verification device obtains a configuration file, and based on the configuration file, starts multiple operation threads, each operation thread sends a corresponding operation request to the distributed resource management system to be verified by simulating an external client, and receives an operation response to the operation request returned by the distributed resource management system; then, the operation request sent by each operation thread and the operation response to the operation request are recorded; finally, the operation request sent by each operation thread and the operation response to the operation request are merged and sorted in chronological order to obtain an operation history set for the distributed resource management system to be verified.
[0101] For example, the control center in the verification device starts several operation threads according to the configuration file requirements. Each operation thread independently runs a series of scheduled / random operation requests to remotely operate the distributed resource management system. In the distributed resource management system, operations on specific resources can generally be divided into addition, deletion, modification and query. Each operation may have two results: normal and abnormal. There are multiple external clients in the distributed resource management system that operate on distributed resources at the same time. The distributed resource management system needs to respond correctly according to the external operations. Here, the continuous operations of multiple external clients on distributed resources can form an operation sequence. Each unit in the sequence is divided into a specific operation and its response result. An operation unit can be expressed as:
[0102] Operation Oij{Treq,Tres,operType(reqAttr),operResult(resAttr)};
[0103] Among them, Oij represents the jth operation performed by the ith client, Treq represents the operation initiation time, Tres represents the operation response time, operType represents the operation type, reqAttr (this parameter is only valid for change operations) represents the operation request attributes, operResult represents the operation result, and resAttr (this parameter is only valid for query operations) represents the operation response attributes.
[0104] Finally, the verification device merges and sorts a series of operation requests and operation responses recorded by multiple operation threads in chronological order to generate an operation history set of all clients, such as Figure 4 As shown in (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ).
[0105] In this embodiment, the corresponding operation request is sent to the distributed resource management system to be verified through the operation thread, and the operation response to the operation request returned by the distributed resource management system is received. There is no need to manually collect the operation request and the operation response, which is beneficial to improving the efficiency of linear consistency verification. At the same time, by obtaining the operation history set for the distributed resource management system to be verified, it is beneficial to subsequently obtain an operation sequence set including multiple candidate operation sequences based on the operation history set, which is convenient for comprehensive consideration of multiple candidate operation sequences when performing linear consistency verification, which is beneficial to improving the efficiency of linear consistency verification.
[0106] In an exemplary embodiment, the above step S202 obtains an operation sequence set based on the operation history set, which specifically includes the following contents: determining the timing information corresponding to each operation request based on the initiation time of each operation request and the reception time of the operation response corresponding to each operation request; filtering out target operation requests with overlapping timing information from each operation request based on the timing information corresponding to each operation request; arranging and combining each operation request based on the timing information corresponding to each operation request and the permutation and combination information of the target operation request to obtain multiple candidate operation sequences; and constructing an operation sequence set based on the multiple candidate operation sequences.
[0107] The reception time of the operation response refers to the time when the verification device receives the operation response.
[0108] The timing information corresponding to each operation request includes the initiation time of the operation request and the reception time of the operation response corresponding to each operation request. Figure 4 , operation request O 11 The left side of indicates the initiation time of the operation request. 11 The right side of indicates the reception time of the operation response corresponding to the operation request.
[0109] The target operation request refers to the operation request with overlapping corresponding timing information, which is specifically used to characterize the concurrency point; for example, refer to Figure 4 , O 11 With O 21 There is an intersection of time periods, O 12 With O 31 There is an intersection of time periods, O 13 With O 32 There is an intersection of time periods, that is, there are three concurrent points.
[0110] The permutation and combination information of the target operation request refers to the permutation and combination method of the target operation request, which is specifically determined according to the number of the target operation requests; for example, Figure 4 , O 11 With O 21 There are two ways of permutation and combination when there is an intersection of time periods. One is O 11 In front, O 21 In the back; the other is O 21 In front, O 11 Behind.
[0111] There are multiple possible sequences (i.e., permutations and combinations) for the concurrent points corresponding to each target operation request. The total possible sequences formed by the combination of the multiple possible sequences of these multiple concurrent points is the operation sequence set of this operation history set.
[0112] Exemplarily, the verification device obtains the initiation time of each operation request and the reception time of the operation response corresponding to each operation request from the operation history set, and then determines the timing information corresponding to each operation request based on the initiation time of each operation request and the reception time of the operation response corresponding to each operation request; then, based on the timing information corresponding to each operation request, the operation requests with overlapping corresponding timing information are screened out from each operation request as target operation requests, thereby obtaining multiple target operation requests representing concurrent points; then, based on the timing information corresponding to each operation request and the permutation and combination information of the target operation request, all permutation and combination methods are determined, and all operation requests are permuted and combined according to each permutation and combination method, respectively, to obtain multiple candidate operation sequences, and finally, based on the multiple candidate operation sequences, an operation sequence set is constructed.
[0113] For example, see Figure 4 , client 1 has O 11 , O 12 , O 13 Three operations, client 2 has O 21 , O 22 Two operations, client 3 has O 31 , O 32 Two operations; O 11 With O 21 There is an intersection of time periods, O 12 With O 31 There is an intersection of time periods, O 13 With O 32 There is an intersection of time periods. At this time, the operation sequence corresponding to the operation history set exists in A2 2 (O 11 , O 21 )*A2 2 (O 12 , O 31 )*A1 1 (O 22 )*A2 2 (O 13 , O 32 ) There are 8 possible operation sequences, namely candidate operation sequence 1 (O 11 , O 21 , O 12 , O 31 , O 22 , O 32 , O 13 ), candidate operation sequence 2 (O 11 , O 21 , O 12 , O 31 , O 22 , O 13 , O32 ), candidate operation sequence 3 (O 11 , O 21 , O 31 , O 12 , O 22 , O 32 , O 13 ), candidate operation sequence 4 (O 11 , O 21 , O 31 , O 12 , O 22 , O 13 , O 32 ), candidate operation sequence 5 (O 21 , O 11 , O 12 , O 31 , O 22 , O 32 , O 13 ), candidate operation sequence 6 (O 21 , O 11 , O 12 , O 31 , O 22 , O 13 , O 32 ), candidate operation sequence 7 (O 21 , O 11 , O 31 , O 12 , O 22 , O 32 , O 13 ), candidate operation sequence 8 (O 21 , O 11 , O 31 , O 12 , O 22 , O 13 , O 32 ).
[0114] In this embodiment, each operation request is arranged and combined according to the timing information corresponding to each operation request and the permutation and combination information of the target operation requests with overlapping timing information, so as to obtain multiple candidate operation sequences obtained by combining these operation requests. This is beneficial for comprehensive consideration of the operation status of the distributed resource management system under a large number of concurrent operations in the subsequent linear consistency verification, and can effectively verify the linear consistency of the distributed resource management system with a deeper verification level, thereby improving the accuracy of the linear consistency verification of the distributed resource management system.
[0115] In an exemplary embodiment, the above step S203 determines the resource existence verification results and resource attribute verification results of each candidate operation sequence through a linear consistency verification model, which specifically includes the following contents: obtaining the resource existence constraint conditions of the resource existence verification model in the linear consistency verification model; the resource existence constraint conditions are used to indicate that the operation response in the resource existence stage is the resource existence state, and the operation response in the resource non-existence stage is the resource non-existence state; according to the resource existence constraint conditions, the operation responses in the resource existence stage and the resource non-existence stage of each candidate operation sequence are verified respectively to obtain the resource existence verification results of each candidate operation sequence.
[0116] Among them, the resource existence verification model has corresponding resource existence constraint conditions, which are mainly used to verify the rationality of resource existence at different stages and prove that all operations of a certain operation sequence meet the resource existence constraint requirements.
[0117] The resource existence constraint condition is specifically used to indicate that the operation response to an operation request in the resource existence phase must be a resource existence state, and the operation response to an operation request in the resource non-existence phase must be a resource non-existence state; for example, refer to Figure 5 , O 11 , O 21 , O 12 , O 31 , O 22 , O 32 , O 13 All satisfy the resource existence constraint conditions; reference Figure 6 , O 11 The resource existence constraint is not satisfied.
[0118] The resource existence verification result refers to whether the resource existence verification passes or whether the resource existence verification fails.
[0119] Exemplarily, the verification device obtains a resource existence verification model in a linear consistency verification model, and extracts resource existence constraints of the resource existence verification model; then, the operation responses in the resource existence phase and the resource non-existence phase of each candidate operation sequence are obtained, and according to the resource existence constraints, the operation responses in the resource existence phase and the resource non-existence phase of each candidate operation sequence are verified respectively to determine whether the operation responses in the resource existence phase and the resource non-existence phase of each candidate operation sequence meet the resource existence constraints, thereby obtaining the resource existence verification results of each candidate operation sequence.
[0120] For example, the operation sequence obtained by serializing the operation history may not all meet the linear consistency requirements. In this case, it is necessary to perform a linear consistency model judgment on the selected operation sequence. For distributed resource management systems, the linear consistency verification model mainly includes a resource existence constraint model and a resource attribute constraint model. Among them, the results of the four basic operations of distributed resources depend on the existence status of the current distributed resources. Therefore, the following linear consistency constraints can be given according to the existence status of distributed resources: 1) In the resource existence stage, all responses are resource existence status. At this time, the response of the new operation between the successful resource creation and the successful resource deletion is required to be "existing", the response of the change operation is "successful", the response of the query operation is "successful", and other deletion operations are prohibited; 2) In the resource non-existence stage, all responses are resource non-existence status. At this time, the response of the deletion operation between the successful resource deletion and the successful resource creation is required to be "non-existent", the response of the change operation is "non-existent", the response of the query operation is "non-existent", and other new operations are prohibited. Reference Figure 4 , currently a possible operation sequence is Seq1:O 11 ->O 21 ->O 12 ->O 31 ->O 22 ->O 32 ->O 13 , and assume that the client operations are as shown in Table 1 below:
[0121] Table 1 Client operation table
[0122]
[0123] Then, the existence of the current operation sequence is as follows Figure 5 As shown; after judgment, it can be known that the current operation sequence Seq1: 11 ->O 21 ->O 12 ->O 31 ->O 22 ->O 32 ->O 13 It conforms to the existence constraint model.
[0124] Consider another possible operation sequence Seq2: 21 ->O 11 ->O 12 ->O 31 ->O 22 ->O 32 ->O 13 , the existence model checking result of this sequence is as follows Figure 6 In this operation sequence, O 11The current stage is the resource existence stage, and the query result should not be non-existent. Therefore, the operation sequence Seq2 does not meet the existence model constraints.
[0125] In this embodiment, the resource existence verification results of each candidate operation sequence are determined through the resource existence verification model, which is conducive to comprehensively considering the resource existence verification results of each candidate operation sequence, so that the linear consistency of the distributed resource management system can be more realistically reflected, thereby improving the linear consistency verification accuracy of the distributed resource management system.
[0126] In an exemplary embodiment, the above step S203 determines the resource existence verification results and resource attribute verification results of each candidate operation sequence through a linear consistency verification model, which specifically includes the following contents: obtaining the resource attribute constraint conditions of the resource attribute verification model in the linear consistency verification model; the resource attribute constraint conditions are used to indicate that the attribute value returned by the resource query operation executed in the resource existence stage is the corresponding expected value; according to the resource attribute constraint conditions, the attribute value returned by the resource query operation executed in the resource existence stage of each candidate operation sequence is verified respectively to obtain the resource attribute verification results of each candidate operation sequence.
[0127] Among them, the resource attribute verification model has corresponding resource attribute constraints, which are mainly used to verify the attribute values returned by the resource query operation executed during the resource existence phase (for example, Figure 7 Whether a and b) shown are the corresponding expected values, thereby verifying the correctness of the resource query operation, and further verifying whether the resource query operation meets the resource attribute constraint requirements.
[0128] The resource attribute constraint condition is specifically used to indicate that the attribute value returned by the resource query operation executed during the resource existence phase is the corresponding expected value; for example, Figure 7 , in the resource existence stage, in O 31 The attribute value returned by the resource query operation previously executed should be a. 31 The attribute value returned by the resource query operation executed later should be b to meet the resource attribute constraint requirements, that is, the expected values here are a and b.
[0129] The resource attribute verification result refers to whether the resource attribute verification passes or fails.
[0130] Exemplarily, the verification device obtains a resource attribute verification model in a linear consistency verification model, and extracts resource attribute constraints of the resource attribute verification model; then, the attribute value returned by the resource query operation executed in the resource existence phase of each candidate operation sequence is obtained, and according to the resource attribute constraints, the attribute value returned by the resource query operation executed in the resource existence phase of each candidate operation sequence is verified respectively to determine whether the attribute value returned by the resource query operation executed in the resource existence phase of each candidate operation sequence meets the corresponding expected value, that is, whether the resource attribute constraints are satisfied, thereby obtaining the resource attribute verification results of each candidate operation sequence.
[0131] For example, in addition to the existence state, distributed resources also have attribute content, so linear consistency constraints are also required for the attribute content. The verification of attribute content is mainly verified through queries. For resource query operations, the query results are closely related to the current existence state and attribute state of the distributed resource. Therefore, it is necessary to deduce the resource state at the query time according to the determined operation sequence, and then verify the correctness of the query operation. Figure 7 , for the existence phase of the operation sequence, in O 31 The attribute value before the operation is required to be a. 31 The attribute value after the operation is required to be b. The attribute value returned by the query operation during these stages should be the same as Figure 7 The expected value of the inference must be consistent, otherwise the operation sequence does not meet the requirements of the resource attribute constraint model, that is, if the attribute value returned by the query operation performed in these stages is consistent with Figure 7 If the inferred expected values are consistent, it means that the operation sequence meets the requirements of the resource attribute constraint model; otherwise, it means that the operation sequence does not meet the requirements of the resource attribute constraint model.
[0132] In this embodiment, the resource attribute verification results of each candidate operation sequence are determined through the resource attribute verification model, which is conducive to comprehensively considering the resource attribute verification results of each candidate operation sequence, so that the linear consistency of the distributed resource management system can be more realistically reflected, making the final linear consistency verification result more accurate.
[0133] In an exemplary embodiment, the above step S204 determines the linear consistency verification result of the distributed resource management system based on the resource existence verification result and the resource attribute verification result of each candidate operation sequence, and specifically includes the following contents: when there is a candidate operation sequence in each candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification is passed, it is determined that the linear consistency verification of the distributed resource management system is passed; when there is not a candidate operation sequence in each candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification is passed, it is determined that the linear consistency verification of the distributed resource management system is not passed.
[0134] Exemplarily, the verification device traverses the resource existence verification results and resource attribute verification results of each candidate operation sequence respectively. If the resource existence verification result and resource attribute verification result of a candidate operation sequence are both verified to be passed, it is determined that the linear consistency verification of the distributed resource management system is passed. If all candidate operation sequences are traversed and there is no candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification is passed, it is determined that the linear consistency verification of the distributed resource management system is not passed.
[0135] For example, the verification device traverses and checks all possible operation sequences. If there is an operation sequence that can satisfy both the resource existence model constraints and the resource attribute model constraints, then the operation sequence is considered to meet the linear consistency requirements, and the test passes. If all operation sequences are traversed and no operation sequence that satisfies both the resource existence model constraints and the resource attribute model constraints is found, then the test is considered to have failed, and the system under test has problems that violate linear consistency.
[0136] In this embodiment, the linear consistency verification result of the distributed resource management system is determined by traversing the resource existence verification results and resource attribute verification results of each candidate operation sequence. That is, in the linear consistency verification process, the resource existence verification results and resource attribute verification results of each candidate operation sequence are comprehensively considered, which is conducive to accurately determining the linear consistency of the distributed resource management system, thereby improving the accuracy of the linear consistency verification of the distributed resource management system.
[0137] In an exemplary embodiment, Figure 8 As shown, another system verification method is provided, which is applied to Figure 1 The verification device in is taken as an example to illustrate, including the following steps S801 to S811. Among them:
[0138] Step S801, starting multiple operation threads according to the configuration file; each operation thread is used to send a corresponding operation request to the distributed resource management system to be verified, and receive an operation response to the operation request returned by the distributed resource management system.
[0139] Step S802: record the operation request sent by each operation thread and the operation response of the operation request.
[0140] Step S803: Obtain an operation history set for the distributed resource management system to be verified according to the operation request sent by each operation thread and the operation response to the operation request.
[0141] Step S804: determine the timing information corresponding to each operation request according to the initiation time of each operation request and the reception time of the operation response corresponding to each operation request.
[0142] Step S805 , according to the timing information corresponding to each operation request, filter out target operation requests with overlapping timing information from each operation request.
[0143] Step S806, according to the timing information corresponding to each operation request and the permutation and combination information of the target operation request, each operation request is permuted and combined to obtain multiple candidate operation sequences; based on the multiple candidate operation sequences, an operation sequence set is constructed.
[0144] After step S806, there are two step branches, namely, step S807 to step S808, and step S809 to step S810.
[0145] Step S807, obtain the resource existence constraint conditions of the resource existence verification model in the linear consistency verification model; the resource existence constraint conditions are used to indicate that the operation response in the resource existence stage is the resource existence state, and the operation response in the resource non-existence stage is the resource non-existence state.
[0146] Step S808: Verify the operation responses in the resource existence phase and the resource non-existence phase of each candidate operation sequence according to the resource existence constraint condition, and obtain the resource existence verification result of each candidate operation sequence.
[0147] Step S809, obtaining resource attribute constraints of the resource attribute verification model in the linear consistency verification model; the resource attribute constraints are used to indicate that the attribute values returned by the resource query operation executed in the resource existence phase are corresponding expected values.
[0148] Step S810: Verify the attribute values returned by the resource query operations executed in the resource existence phase of each candidate operation sequence according to the resource attribute constraint conditions, and obtain the resource attribute verification results of each candidate operation sequence.
[0149] Step S811, determining the linear consistency verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0150] Among them, when there is a candidate operation sequence among each candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification has passed, it is determined that the linear consistency verification of the distributed resource management system has passed; when there is not a candidate operation sequence among each candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification has passed, it is determined that the linear consistency verification of the distributed resource management system has failed.
[0151] In the above-mentioned system verification method, in the process of linear consistency verification of the distributed resource management system, multiple candidate operation sequences composed of multiple operation requests for the distributed resource management system are comprehensively considered, that is, the operation of the distributed resource management system under a large number of concurrent operations is comprehensively considered, which can effectively verify the linear consistency of the distributed resource management system, and the verification level is deeper, so that the final linear consistency verification result is more accurate, thereby improving the linear consistency verification accuracy of the distributed resource management system; at the same time, a linear consistency verification model is introduced, and the resource existence verification results and resource attribute verification results of each candidate operation sequence are determined, which is conducive to comprehensively considering the resource existence verification results and resource attribute verification results of each candidate operation sequence, so that the linear consistency of the distributed resource management system can be more realistically reflected, further improving the linear consistency verification accuracy of the distributed resource management system.
[0152] In order to more clearly illustrate the system verification method provided by the embodiment of the present application, the system verification method is specifically described below with a specific embodiment. In an exemplary embodiment, Fig. 9As shown, the present application also proposes a linear consistency verification method for a distributed resource management system, proposes an existence verification model and an attribute verification model as linear consistency constraints for general operations (addition, deletion, modification, and query) in a distributed resource management system, and provides an overall linear consistency verification scheme for a distributed resource management system, which can test the distributed resource management system in depth and effectively. The main process of the scheme includes: the control center starts multiple operation threads, each operation thread runs a series of operation requests, records all operation requests and response information, and merges all operation records to form an operation history; linearizes the operation history to generate a corresponding operation sequence set, establishes a distributed resource existence constraint model and an attribute constraint model, and uses the model to perform linear consistency verification on the operation sequence set, and finally gives the consistency verification conclusion of the tested system in this test according to the result of the linear consistency verification. In this way, by establishing a consistency verification model for a distributed resource management system, the problem discovery capability of verifying the distributed resource management system is improved; in addition, through a large number of concurrent operation records and multi-client operation merging processing, the relevance of the verification process can be improved, making the verification level more in-depth.
[0153] refer to Fig. 9 ,The main process of the linear consistency verification method for ,distributed resource management system is as follows:
[0154] 1) The control center starts multiple operation threads;
[0155] 2) The operation thread performs remote operations on the distributed resource management system;
[0156] 3) Record the request and response information of each operation;
[0157] 4) Multiple client operation records are merged to generate operation history;
[0158] 5) Linear serialization of operation history;
[0159] 6) Linear consistency model constraints (resource existence constraint model and resource attribute constraint model);
[0160] 7) Operation sequence traversal and verification result output.
[0161] like Fig.10 As shown, the present application also proposes a linear consistency verification device for a distributed resource management system, specifically comprising:
[0162] Control module: This module generates multiple operation threads according to the configuration file and drives the multiple operation threads to perform a series of operations on the distributed resource management system.
[0163] Operation record saving module: records the operation requests and operation responses of all operation threads, and merges them into the operation history set of this verification in chronological order.
[0164] Linear serialization module: Analyze the timing overlap of all operation records. There are many possible sequences of multiple operations with timing overlap. These branches are arranged and combined to form a series of operation sequence sets.
[0165] Resource existence constraint judgment module: establishes a temporal existence model of resources based on the current operation sequence, verifies the rationality of resource existence at different stages, and proves that all operations of a certain operation series meet the resource existence constraint requirements.
[0166] Resource attribute constraint judgment module: For the operation sequence that passes the resource existence constraint requirements, the resource attribute constraint conditions are used to generate the corresponding timing attribute model of the operation sequence, and the timing attribute model is compared with the actual query results to prove that the operation sequence meets the resource attribute constraint requirements.
[0167] Linear consistency verification result output module: traverse all operation sequences in the operation sequence set. If an operation sequence that satisfies both the resource existence constraint model and the resource attribute constraint model can be selected, it proves that the operation history of this test meets the linear consistency requirements; conversely, if no operation sequence can be found to meet the requirements, it proves that the distributed resource management system in this test has consistency problems.
[0168] The above embodiments can achieve the following technical effects: (1) Establish a linear consistency verification model to improve the problem detection capability: This solution provides a feasible and effective linear consistency verification model, including an existential consistency model and an attribute consistency model, which can more realistically reflect the consistency capability requirements of the distributed resource management system and improve the problem detection capability of the distributed resource management system. (2) Considering a large number of concurrent operations, providing consistency verification capabilities with strong correlation and deep verification levels: The method described in this solution is different from the traditional batch script verification method of distributed systems. It considers the operation of the distributed resource management system under a large number of concurrent operations, and can effectively verify the linear consistency of the distributed resource management system, and the verification level is deeper.
[0169] 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.
[0170] Based on the same inventive concept, the embodiment of the present application also provides a system verification device for implementing the system verification method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more system verification device embodiments provided below can refer to the limitations on the system verification method above, and will not be repeated here.
[0171] In an exemplary embodiment, Fig.11 As shown, a system verification device is provided, including: a set acquisition module 1110, a sequence determination module 1120, a sequence verification module 1130 and a result determination module 1140, wherein:
[0172] The set acquisition module 1110 is used to acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system and an operation response corresponding to each operation request.
[0173] The sequence determination module 1120 is used to obtain an operation sequence set according to the operation history set; the operation sequence set includes multiple candidate operation sequences, and each candidate operation sequence includes multiple operation requests.
[0174] The sequence verification module 1130 is used to determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model.
[0175] The result determination module 1140 is used to determine the linear consistency verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
[0176] In an exemplary embodiment, the collection acquisition module 1110 is also used to start multiple operation threads according to the configuration file; each operation thread is used to send a corresponding operation request to the distributed resource management system to be verified, and receive an operation response to the operation request returned by the distributed resource management system; record the operation request sent by each operation thread, and the operation response to the operation request; obtain an operation history collection based on the operation request sent by each operation thread, and the operation response to the operation request.
[0177] In an exemplary embodiment, the sequence determination module 1120 is also used to determine the timing information corresponding to each operation request based on the initiation time of each operation request and the reception time of the operation response corresponding to each operation request; based on the timing information corresponding to each operation request, filter out the target operation requests with overlapping timing information from each operation request; based on the timing information corresponding to each operation request and the permutation and combination information of the target operation request, arrange and combine each operation request to obtain multiple candidate operation sequences; and based on the multiple candidate operation sequences, construct an operation sequence set.
[0178] In an exemplary embodiment, the sequence verification module 1130 is also used to obtain the resource existence constraint conditions of the resource existence verification model in the linear consistency verification model; the resource existence constraint conditions are used to indicate that the operation response in the resource existence stage is the resource existence state, and the operation response in the resource non-existence stage is the resource non-existence state; according to the resource existence constraint conditions, the operation responses in the resource existence stage and the resource non-existence stage of each candidate operation sequence are verified respectively to obtain the resource existence verification results of each candidate operation sequence.
[0179] In an exemplary embodiment, the sequence verification module 1130 is also used to obtain resource attribute constraints of the resource attribute verification model in the linear consistency verification model; the resource attribute constraints are used to indicate that the attribute values returned by the resource query operations performed during the resource existence phase are corresponding expected values; according to the resource attribute constraints, the attribute values returned by the resource query operations performed during the resource existence phase of each candidate operation sequence are verified respectively to obtain the resource attribute verification results of each candidate operation sequence.
[0180] In an exemplary embodiment, the result determination module 1140 is also used to determine that the linear consistency verification of the distributed resource management system has passed when there is a candidate operation sequence among each candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification has passed; and to determine that the linear consistency verification of the distributed resource management system has failed when there is not a candidate operation sequence among each candidate operation sequence whose resource existence verification result and resource attribute verification result both indicate that the verification has passed.
[0181] Each module in the above system verification 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.
[0182] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as operation requests and operation responses. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a system verification method is implemented.
[0183] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.13As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, 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. Among them, 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 an 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 implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a system verification method is implemented. 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.
[0184] Those skilled in the art will understand that Fig.12 and Fig.13 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.
[0185] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0186] In an exemplary 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 steps in the above-mentioned method embodiments are implemented.
[0187] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0188] Those of ordinary skill 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 the present application can include at least one of non-volatile memory 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), magnetic 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, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0189] 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 application.
[0190] 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 system verification method, characterized in that: The method comprises: Acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request; According to the operation history set, an operation sequence set is obtained; the operation sequence set includes a plurality of candidate operation sequences, and each candidate operation sequence includes the plurality of operation requests; Determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model; The linear consistency verification result of the distributed resource management system is determined according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
2. The method according to claim 1, characterized in that The step of obtaining an operation history set for the distributed resource management system to be verified includes: According to the configuration file, multiple operation threads are started; each operation thread is used to send a corresponding operation request to the distributed resource management system to be verified, and receive an operation response to the operation request returned by the distributed resource management system; Recording the operation request sent by each operation thread and the operation response of the operation request; The operation history set is obtained according to the operation request sent by each operation thread and the operation response of the operation request.
3. The method according to claim 1, characterized in that The step of obtaining an operation sequence set according to the operation history set includes: Determine the timing information corresponding to each operation request according to the initiation time of each operation request and the reception time of the operation response corresponding to each operation request; According to the timing information corresponding to each operation request, filter out target operation requests with overlapping timing information from each operation request; According to the timing information corresponding to each operation request and the permutation and combination information of the target operation request, each operation request is permuted and combined to obtain a plurality of candidate operation sequences; The operation sequence set is constructed based on the multiple candidate operation sequences.
4. The method according to claim 1, characterized in that Determining the resource existence verification result and resource attribute verification result of each candidate operation sequence through the linear consistency verification model includes: Obtaining a resource existence constraint condition of a resource existence verification model in a linear consistency verification model; the resource existence constraint condition is used to indicate that an operation response in a resource existence phase is a resource existence state, and an operation response in a resource non-existence phase is a resource non-existence state; According to the resource existence constraint condition, the operation responses in the resource existence phase and the resource non-existence phase of each of the candidate operation sequences are verified respectively to obtain the resource existence verification result of each of the candidate operation sequences.
5. The method according to claim 1, characterized in that Determining the resource existence verification result and resource attribute verification result of each candidate operation sequence through the linear consistency verification model also includes: Obtaining a resource attribute constraint condition of a resource attribute verification model in a linear consistency verification model; the resource attribute constraint condition is used to indicate that the attribute value returned by a resource query operation executed in a resource existence phase is a corresponding expected value; According to the resource attribute constraint condition, the attribute values returned by the resource query operation executed in the resource existence phase of each candidate operation sequence are verified respectively to obtain the resource attribute verification result of each candidate operation sequence.
6. The method according to any one of claims 1 to 5, characterized in that: Determining the linear consistency verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence includes: If there is a candidate operation sequence in each of the candidate operation sequences, whose resource existence verification result and resource attribute verification result both indicate that the verification is passed, determining that the linear consistency verification of the distributed resource management system is passed; When there is no resource existence verification result and resource attribute verification result of a candidate operation sequence in each of the candidate operation sequences both indicating that the verification is passed, it is determined that the linear consistency verification of the distributed resource management system has failed.
7. A system verification device, characterized in that: The device comprises: A set acquisition module, used to acquire an operation history set for the distributed resource management system to be verified; the operation history set includes multiple operation requests for the distributed resource management system, and an operation response corresponding to each operation request; A sequence determination module, configured to obtain an operation sequence set according to the operation history set; the operation sequence set includes a plurality of candidate operation sequences, each candidate operation sequence includes the plurality of operation requests; A sequence verification module, used to determine the resource existence verification result and resource attribute verification result of each candidate operation sequence through a linear consistency verification model; The result determination module is used to determine the linear consistency verification result of the distributed resource management system according to the resource existence verification result and the resource attribute verification result of each candidate operation sequence.
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.