Service grid test flow generation method and device for large-scale data center network
By generating the end-to-end service test flow skeleton of the service mesh system and the target end-to-end service test flow, the path explosion problem in symbol execution test is solved, and the efficiency and accuracy of service mesh system testing is improved.
Patent Information
- Application Number
- CN202510238073.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-03-03
AI Technical Summary
In the prior art, when using symbols to perform testing on a service mesh system, path explosion problems are prone to occur, resulting in low testing efficiency and accuracy.
By generating an end-to-end service test flow skeleton based on the various service items and service interactions in the target service mesh system, the target end-to-end service test flow of the target service mesh system is generated based on the node metadata information and connector fields.
This method can accurately obtain the directionality between each service item, avoid path explosion problems, and improve the efficiency and accuracy of service grid system testing.
Smart Images

Figure CN119766708A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a method and device for generating a service grid test flow for a large-scale data center network. Background Art
[0002] Service grid is an important representative software for large-scale data center networks. Operation and maintenance personnel only need to provide a few lines of configuration files to complete complex and advanced application layer network functions. Since the service grid controls service traffic and affects the accuracy and performance of the entire application, with the rapid development and increasing popularity of the service grid system, higher requirements are placed on the reliability of the service grid. Therefore, it is necessary to test the service grid system to ensure the stability and reliability of the service grid.
[0003] In related technologies, the service grid system can be tested by symbolic execution. Symbolic execution uses symbolic values as input, rather than specific values used in general program execution. When reaching the target code to be tested, the analyzer can obtain the corresponding path constraints, and then obtain the specific values that can trigger the target code through the constraint solver, and finally obtain the test results based on the specific indicators.
[0004] However, using symbolic execution to test a service mesh system will suffer from the path explosion problem, because each service item has a large number of detailed rule options, and the combination of these resources will exponentially increase the input space, making the efficiency and accuracy of service mesh testing low. Summary of the invention
[0005] In view of the above problems, embodiments of the present application provide a method, device, electronic device and readable storage medium for generating a service grid test flow for a large-scale data center network, so as to overcome the above problems or at least partially solve the above problems.
[0006] In a first aspect, an embodiment of the present application provides a service grid test flow generation method for a large-scale data center network, the method comprising: Based on each first service item included in the target service grid system and the service interaction relationship between the first service items, generating an end-to-end service test flow skeleton of the target service grid system; Based on the service interaction relationship, generate first connector fields corresponding to each connection edge included in the end-to-end service test flow skeleton; Generate node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton; A target end-to-end service test flow of the target service grid system is generated based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
[0007] Optionally, the generating an end-to-end service test flow skeleton of the target service grid system based on each first service item included in the target service grid system and the service interaction relationship between the first service items includes: Based on the service interaction relationship between the first service items included in the target service grid system, create a service test directed connection between the first service items; Based on the service test directed connection, querying a first input terminal and a first output terminal from the first service item; An end-to-end service test flow skeleton of the target service grid system is generated based on the first input end, the first output end, and the service test directed connection.
[0008] Optionally, the testing the directed connection based on the service, querying the first input terminal and the first output terminal from the first service item, includes: Randomly select a second service item from the first service items; Determine a first service item type of the second service item; In a case where the first service item type is not an input type or an output type, based on the service test directed connection, determining from the first service item a third service item pointing to the second service item and a fourth service item pointed to by the second service item; determining a second service item type of the third service item and a third service item type of the fourth service item; In the case where the second service item type is an input type, determining the third service item as a first input end; In the case that the third service item type is an output type, the fourth service item is determined as a first output terminal.
[0009] Optionally, the method further comprises: When the first service item type is not an input type and there is no fifth service item pointing to the second service item in the first service item, based on the service interaction relationship, determining that the service interaction type is a sixth service item pointing to the second service item; In a case where the fourth service item type of the sixth service item is an input type, the sixth service item is determined as the first input end.
[0010] Optionally, the method further comprises: When the first service item type is not an output type and the seventh service item pointed to by the second service item does not exist in the first service item, based on the service interaction relationship, determining that the service interaction type is the eighth service item pointed to by the second service item; In a case where the fifth service item type of the eighth service item is an output type, the eighth service item is determined as the first output terminal.
[0011] Optionally, the generating, based on the service interaction relationship, first connector fields respectively corresponding to the connection edges contained in the end-to-end service test flow skeleton includes: Determine a first host name and a first port number of a first input end in the end-to-end service test flow skeleton; Based on the service interaction relationship, the first host name and the first port number are sent to each connection edge included in the end-to-end service test flow skeleton to obtain the first connector field corresponding to each connection edge.
[0012] Optionally, the node metadata information includes service type information and service name information, and the generating of the node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton includes: Based on the first string matching rule, the service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton is generated; based on the second string matching rule, the service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton is generated; wherein the first string matching rule and the second string matching rule both include at least one of exact matching, prefix matching and regular expression matching.
[0013] Optionally, the first host name contains a wildcard.
[0014] Optionally, there is no field conflict between the node metadata information and the first connector field.
[0015] In a second aspect, an embodiment of the present application provides a service grid test flow generation device for a large-scale data center network, the device comprising: A first generating module, configured to generate an end-to-end service test flow skeleton of the target service grid system based on each first service item included in the target service grid system and a service interaction relationship between the first service items; A second generating module is used to generate first connector fields corresponding to each connection edge included in the end-to-end service test flow skeleton based on the service interaction relationship; A third generating module is used to generate node metadata information corresponding to each first service item node contained in the end-to-end service test flow skeleton; A fourth generation module is used to generate a target end-to-end service test flow of the target service grid system based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
[0016] Optionally, the first generating module includes: A creation submodule is used to create a service test directed connection between each first service item based on the service interaction relationship between each first service item included in the target service grid system; A query submodule, configured to query a first input terminal and a first output terminal from the first service item based on the service test directed connection; The first generating submodule is used to generate an end-to-end service test flow skeleton of the target service grid system based on the first input end, the first output end and the service test directed connection.
[0017] Optionally, the query submodule includes: An extraction unit, configured to randomly extract a second service item from the first service item; A first determining unit, configured to determine a first service item type of the second service item; a second determining unit, configured to determine, when the first service item type is not an input type or an output type, based on the service test directed connection, from the first service item a third service item pointing to the second service item and a fourth service item pointed to by the second service item; A third determining unit, configured to determine a second service item type of the third service item and a third service item type of the fourth service item; a fourth determining unit, configured to determine the third service item as a first input terminal when the second service item type is an input type; The fifth determining unit is configured to determine the fourth service item as a first output terminal when the third service item type is an output type.
[0018] Optionally, the device further comprises: a first determining module, configured to determine, based on the service interaction relationship, that the service interaction type is a sixth service item pointing to the second service item when the first service item type is not an input type and there is no fifth service item pointing to the second service item in the first service item; The second determining module is configured to determine the sixth service item as the first input end when the fourth service item type of the sixth service item is an input type.
[0019] Optionally, the device further comprises: a third determining module, configured to determine, based on the service interaction relationship, that the service interaction type is the eighth service item pointed to by the second service item, if the first service item type is not an output type and the seventh service item pointed to by the second service item does not exist in the first service item; The fourth determining module is configured to determine the eighth service item as the first output terminal when the fifth service item type of the eighth service item is an output type.
[0020] Optionally, the second generating module includes: A first determination submodule, used to determine a first host name and a first port number of a first input end in the end-to-end service test flow skeleton; The sending submodule is used to send the first host name and the first port number to each connection edge included in the end-to-end service test flow skeleton based on the service interaction relationship, and obtain the first connector field corresponding to each connection edge.
[0021] Optionally, the node metadata information includes service type information and service name information, and the third generating module includes: The second generation submodule is used to generate the service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton based on the first string matching rule, and to generate the service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton based on the second string matching rule; wherein the first string matching rule and the second string matching rule both include at least one of exact matching, prefix matching and regular expression matching.
[0022] Optionally, the first host name contains a wildcard.
[0023] Optionally, there is no field conflict between the node metadata information and the first connector field.
[0024] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement a service mesh test flow generation method for a large-scale data center network as described in any one of the above items.
[0025] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, a service mesh test flow generation method for a large-scale data center network as described in any one of the above items is implemented.
[0026] The specific beneficial effects are: The embodiment of the present application generates an end-to-end service test flow skeleton of the target service grid system based on the service interaction relationships between the first service items included in the target service grid system, generates first connector fields corresponding to the connection edges included in the end-to-end service test flow skeleton based on the service interaction relationships, generates node metadata information corresponding to the first service item nodes included in the end-to-end service test flow skeleton, generates a target end-to-end service test flow of the target service grid system based on the node metadata information, the first connector field and the end-to-end service test flow skeleton, and can generate a target end-to-end service test flow according to the first service items included in the target service grid system and the service interaction relationships between the first service items. An end-to-end service test flow skeleton can generate the first connector fields corresponding to each connection edge in the test flow skeleton according to the service interaction relationship, and can generate node metadata information corresponding to each first service item node in the test flow skeleton. Finally, the target end-to-end service test flow of the target service grid system can be generated according to the node metadata information, the first connector field and the end-to-end service test flow skeleton, which can accurately obtain the directionality between each service item and avoid the path explosion problem caused by symbolic execution. Test flows that do not have service interaction will not affect each other. Therefore, when using the target end-to-end service test flow to test the target service grid system, the efficiency and accuracy of the service grid system test can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application 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 drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1 It is a flow chart of a method for generating a service grid test flow for a large-scale data center network provided in an embodiment of the present application; Figure 2 It is a flow chart of another method for generating a service grid test flow for a large-scale data center network provided in an embodiment of the present application; Figure 3 It is a logical block diagram of a service grid test flow generation device for a large-scale data center network provided by an embodiment of the present application; Figure 4 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The exemplary embodiments of the present application will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present application. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to enable the scope of the present application to be fully communicated to those skilled in the art.
[0030] Reference Figure 1 , Figure 1 A flow chart of a method for generating a service grid test flow for a large-scale data center network provided in an embodiment of the present application, the method comprising: Step 101: Generate an end-to-end service test flow skeleton of the target service grid system based on various first service items included in the target service grid system and the service interaction relationships between the various first service items.
[0031] In an embodiment of the present application, a service grid is a way to handle service communication in a microservice architecture. It is a layer of infrastructure located between services, which can provide functions such as service discovery and load balancing, traffic control and timeout processing, security and authentication, monitoring and authentication. The operating environment of the service grid can be a kubernetes (k8s) cluster in the Kind software. Accordingly, the execution environment of the service grid test prediction method of the present application can be the same as the operating environment of the service grid. The service grid can include two components, namely the data plane and the control plane. The data plane processes the actual request and response traffic. It is located between services and is responsible for request routing, load balancing, traffic control, etc.; the control plane manages the configuration and policy of the service grid and is responsible for service discovery, routing rules, security settings, etc. The target service grid system can be a service grid system to be detected. In the target service grid system, there can be multiple input ports and multiple output ports for performing different types of communication services. In the target service grid system, there can be multiple first service items, and there is a service interaction relationship between each first service item. This service interaction relationship is directed, which indicates the direction of the data flow between the service items. An end-to-end service test flow skeleton of the target service grid system can be generated according to each first service item included in the target service grid system and the service interaction relationship between each first service item. The end-to-end service test flow skeleton can be a framework capable of carrying data flow, and the end-to-end service test flow skeleton can include multiple service item nodes and multiple connection edges, wherein the service item nodes correspond to the first service items one by one, and the connection edges can be directed edges, which can be used to connect different service item nodes.
[0032] Step 102: Based on the service interaction relationship, generate first connector fields corresponding to the respective connection edges included in the end-to-end service test flow skeleton.
[0033] In an embodiment of the present application, a connector is a new communication method between user mode and kernel mode, and it is very convenient to use. In essence, a connector is a netlink, and its netlink protocol number is NETLINK_CONNECTOR. Compared with general netlink, it provides an easier interface and is more convenient to use. A connector field generally refers to a set of related information used to define its various attributes and behaviors during the design, configuration or use of a connector. Through the connector field, the function, performance and scope of application of the connector can be defined. According to the service interaction relationship between each first service item, the first connector field corresponding to each connection edge contained in the end-to-end service test flow skeleton can be generated. For the same end-to-end service test flow skeleton, each connection edge inside it can correspond to the same connector field to realize the data flow between each service item node in the skeleton in hardware. In an embodiment of the present application, the connector field may include but is not limited to a host name field and a port number field.
[0034] Step 103: Generate node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton.
[0035] In an embodiment of the present application, the end-to-end service test flow skeleton may include multiple first service item nodes. First, the description information type required for these first service item nodes, that is, the metadata information type (such as node type and node name) may be defined, and then the node metadata information corresponding to each first service item node may be generated to describe each first service item node.
[0036] Step 104: Generate a target end-to-end service test flow of the target service grid system based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
[0037] In an embodiment of the present application, a target end-to-end service test flow of a target service grid system can be generated according to the node metadata information, the first connector field and the end-to-end service test flow skeleton. Among them, the node metadata information and the first connector field can be directly added to the end-to-end service test flow skeleton, the node metadata information corresponds to the service item node, and the first connector field corresponds to the connection edge. The target end-to-end service test flow can be embodied in the code in the form of a function. When executing the target end-to-end service test flow, the function function corresponding to the target end-to-end service test flow can be called and given input data information, so that the target service grid system can be tested.
[0038] In an embodiment of the present application, an end-to-end service test flow skeleton of the target service grid system is generated based on each first service item included in the target service grid system and the service interaction relationship between each first service item, and based on the service interaction relationship, first connector fields corresponding to each connection edge included in the end-to-end service test flow skeleton are generated, and node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton is generated. Based on the node metadata information, the first connector field and the end-to-end service test flow skeleton, a target end-to-end service test flow of the target service grid system is generated. An end-to-end service test flow skeleton is generated, and the first connector fields corresponding to each connection edge in the test flow skeleton can be generated according to the service interaction relationship. Node metadata information corresponding to each first service item node in the test flow skeleton can be generated. Finally, the target end-to-end service test flow of the target service grid system can be generated according to the node metadata information, the first connector field and the end-to-end service test flow skeleton. The directionality between each service item can be accurately obtained, and the path explosion problem caused by symbolic execution can be avoided. Test flows that do not have service interaction will not affect each other. Therefore, when the target end-to-end service test flow is used to test the target service grid system, the efficiency and accuracy of the service grid system test can be improved.
[0039] Reference Figure 2 , Figure 2 A flow chart of another method for generating a service grid test flow for a large-scale data center network provided in an embodiment of the present application, the method may include: Step 201: based on the service interaction relationship between the first service items included in the target service grid system, create a service test directed connection between the first service items.
[0040] In an embodiment of the present application, the service interaction relationship between each first service item can be represented by an adjacency matrix, wherein the row number and column number of the adjacency matrix can correspond to different first service items. If there is a directed service relationship between two first service items, the matrix element corresponding to the above two first service items is 1, otherwise it is 0. Since the service interaction relationship is directed, at most one of the two matrix elements corresponding to the two first service items can have a value of 0. For example, if Aij=1, it means that there is a service interaction relationship in which the first service item i points to the first service item j, and Aji=0 at this time. In this way, the service interaction relationship between each first service item contained in the target service grid system can be obtained through the adjacency matrix, and then the service test directed connection between each first service item can be created based on this interaction relationship. Among them, the service format directed connection can be embodied in the code in a referenced or referenced manner. For example, if service item B references service item A, it means that the service test directed connection between A and B is A pointing to B.
[0041] Step 202: Based on the service test directed connection, query the first input terminal and the first output terminal from the first service item.
[0042] In an embodiment of the present application, the first input terminal and the first output terminal can be queried from the first service items according to the service test directed connection between the first service items. Among them, the first service item as the first input terminal may not have a precondition, that is, there are no other first service items pointing to the first input terminal; the first service item as the first output terminal may not have a postcondition, that is, there are no other first service items pointing to the first output terminal. The first input terminal and the first output terminal may also have specific port identifiers. A first service item can be randomly selected from the first service items, and then the service test directed connection can be queried upward and downward in sequence. When the first service item with the above-mentioned specific port identifier is found, the first service item with the above-mentioned specific port identifier can be determined as the first input terminal or the first output terminal. The port identifiers respectively possessed by the first input terminal and the first output terminal may be different.
[0043] Optionally, step 202 may include the following sub-steps: Sub-step 20201: randomly select from the first service items to obtain a second service item.
[0044] In the embodiment of the present application, a second service item may be obtained by randomly selecting from the first service item, wherein the number of the second service item may be one or more.
[0045] Sub-step 20202, determining the first service item type of the second service item.
[0046] In an embodiment of the present application, after extracting the second service item, the first service item type of the second service item can be determined. The first service item type can include input type, output type, and other types, which can be determined by whether the second service item includes a specific port identifier. For example, the port identifier of the input type can be the string "entry", and the port identifier of the output type can be the string "exit".
[0047] Sub-step 20203, when the first service item type is not an input type or an output type, based on the service test directed connection, determine from the first service item a third service item pointing to the second service item and a fourth service item pointed to by the second service item.
[0048] In an embodiment of the present application, if the first service item type is not an input type or an output type, the third service item pointing to the second service item and the fourth service item pointing to the second service item can be determined from the first service item based on the service test directed connection between the first service items.
[0049] Sub-step 20204, determining the second service item type of the third service item and the third service item type of the fourth service item.
[0050] In an embodiment of the present application, after obtaining the third service item and the fourth service item, the second service item type of the third service item and the third service item type of the fourth service item may be determined.
[0051] Sub-step 20205: When the second service item type is an input type, determine the third service item as a first input terminal.
[0052] In an embodiment of the present application, if the second service item type is an input type, the third service item may be determined as the first input terminal, and at this time, other first service items pointing to the third service item will no longer be searched.
[0053] Sub-step 20206: when the third service item type is an output type, determine the fourth service item as a first output terminal.
[0054] In the audience rating of the present application, if the third service item type is an output type, the fourth service item can be determined as the first output terminal. At this time, other first service items pointed to by the fourth service item will no longer be searched.
[0055] In an embodiment of the present application, a second service item is obtained by randomly selecting from a first service item, and a first service item type of the second service item is determined. When the first service item type is not an input type or an output type, based on a service test directed connection, a third service item pointing to the second service item and a fourth service item pointed to by the second service item are determined from the first service item, and a second service item type of the third service item and a third service item type of the fourth service item are determined. When the second service item type is an input type, the third service item is determined as a first input terminal. When the third service item type is an output type, the fourth service item is determined as a first output terminal. The first input terminal and the first output terminal can be searched from any one of the first service items, which can improve the convenience of querying to obtain the first input terminal and the first output terminal to a certain extent.
[0056] Sub-step 20207, when the first service item type is not an input type and there is no fifth service item pointing to the second service item in the first service item, based on the service interaction relationship, determine that the service interaction type is a sixth service item pointing to the second service item.
[0057] In an embodiment of the present application, if the first service item type is not an input type, and there is no fifth service item pointing to the second service item in the first service item, it can be considered that an omission occurs in the construction process of the end-to-end service test flow. In this case, the service interaction type can be determined as the sixth service item pointing to the second service item based on the service interaction relationship between the first service items.
[0058] For example, if the service interaction relationship between the sixth service item and the second service item is represented by matrix elements, the expression form may be Amn=1, where m represents the sixth service item and n represents the second service item.
[0059] Sub-step 20208, when the fourth service item type of the sixth service item is an input type, determining the sixth service item as the first input end.
[0060] In an embodiment of the present application, the fourth service item type of the sixth service item may be determined first, and if the fourth service item type of the sixth service item is an input type, the sixth service item may be determined as the first input terminal. If the fourth service item type is not an input type, other first service items pointing to the sixth service item may continue to be searched until a first service item whose service item type is an input type is found.
[0061] In an embodiment of the present application, when the first service item type is not an input type and there is no fifth service item pointing to the second service item in the first service item, based on the service interaction relationship, the service interaction type is determined to be a sixth service item pointing to the second service item; when the fourth service item type of the sixth service item is an input type, the sixth service item is determined as the first input end; when an exception occurs when searching for the first input end according to the service test directed connection, a qualified sixth service item can be obtained as the first input end according to the service interaction relationship query; to a certain extent, the problem of failure in creating the end-to-end service test flow skeleton caused by the exception of the service test directed connection can be avoided, and the accuracy and reliability of the first input end can be improved.
[0062] Sub-step 20209, when the first service item type is not an output type and the seventh service item pointed to by the second service item does not exist in the first service item, based on the service interaction relationship, determine that the service interaction type is the eighth service item pointed to by the second service item.
[0063] In the ratings of the present application, if the first service item type is not an output type, and the seventh service item pointed to by the second service item does not exist in the first service item, it can be considered that an omission occurs in the construction process of the end-to-end service test flow. In this case, the service interaction type can be determined to be the eighth service item pointed to by the second service item based on the service interaction relationship between the first service items.
[0064] For example, if the service interaction relationship between the eighth service item and the second service item is represented by matrix elements, the expression thereof may be Axy=1, wherein x represents the second service item, and y represents the eighth service item.
[0065] Sub-step 20210: when the fifth service item type of the eighth service item is an output type, determine the eighth service item as the first output end.
[0066] In an embodiment of the present application, the fifth service item type of the eighth service item can be determined first, and if the fifth service item type is an output type, the eighth service item can be determined as the first output terminal. If the fifth service item type is not an output type, other first service items pointed to by the eighth service item can be continuously searched until a first service item with an output type of service item is found.
[0067] In an embodiment of the present application, when the first service item type is not an output type and the seventh service item pointed to by the second service item does not exist in the first service item, based on the service interaction relationship, it is determined that the service interaction type is the eighth service item pointed to by the second service item; when the fifth service item type of the eighth service item is an output type, the eighth service item is determined as the first output end. When an exception occurs when searching for the first output end according to the service test directed connection, the qualified eighth service item can be obtained as the first output end according to the service interaction relationship query. This can avoid the problem of failure in creating the end-to-end service test flow skeleton due to the exception of the service test directed connection to a certain extent, and improve the accuracy and reliability of the first output end.
[0068] Step 203: Generate an end-to-end service test flow skeleton of the target service grid system based on the first input end, the first output end, and the service test directed connection.
[0069] In an embodiment of the present application, an end-to-end service test flow skeleton of the target service grid system can be generated according to the first input terminal, the first output terminal and the service test directed connection. The end-to-end service test flow skeleton can include multiple service item nodes and multiple connection edges, wherein the connection edges are used to connect the service item nodes. The end-to-end service test flow skeleton can start from the first input terminal and end at the first output terminal, and other first service items can be distributed between the first input terminal and the first output terminal according to the service test directed connection.
[0070] In an embodiment of the present application, by creating a service test directed connection between each first service item based on the service interaction relationship between each first service item included in the target service grid system, based on the service test directed connection, querying the first input terminal and the first output terminal from the first service item, and generating an end-to-end service test flow skeleton of the target service grid system based on the first input terminal, the first output terminal and the service test directed connection, an end-to-end service test flow skeleton with a first input terminal and a first output terminal can be obtained, which can improve the stability and reliability of the end-to-end service test flow skeleton to a certain extent.
[0071] Step 204: determine the first host name and the first port number of the first input end in the end-to-end service test flow skeleton.
[0072] In an embodiment of the present application, the first host name and the first port number of the first input terminal of the end-to-end service test flow skeleton can be determined. The first host name and the first port number can usually be set manually and can be used as inherent attributes of the first input terminal.
[0073] Optionally, the first host name contains a wildcard.
[0074] In an embodiment of the present application, it is allowed to use wildcards to replace certain fields in the first host name. If the host name is a server domain name, the first field of the server domain name can be a wildcard, such as the first host name can be "***.host.com", where the symbol "***" is a wildcard.
[0075] Step 205: Based on the service interaction relationship, the first host name and the first port number are sent to each connection edge included in the end-to-end service test flow skeleton to obtain the first connector field corresponding to each connection edge.
[0076] In an embodiment of the present application, the first host name and the first port number can be sent down to each connection edge included in the end-to-end service test flow skeleton according to the service interaction relationship between each first service item, so that the first connector field corresponding to each connection edge can be obtained. Among them, the first connector field can include the first host name and the first port number. After the end-to-end service test flow skeleton has a unified first connector field, data can flow normally in the hardware corresponding to the end-to-end service test flow skeleton.
[0077] In an embodiment of the present application, by determining the first host name and the first port number of the first input end in the end-to-end service test flow skeleton, based on the service interaction relationship, the first host name and the first port number are sent down to each connection edge included in the end-to-end service test flow skeleton, and the first connector field corresponding to each connection edge is obtained. The first host name and the first port number can be sent down as the first connector field to each connection edge, which can improve the reliability and stability of the first connector field to a certain extent.
[0078] Step 206: Based on the first string matching rule, generate the service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton; based on the second string matching rule, generate the service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton; wherein the first string matching rule and the second string matching rule both include at least one of exact matching, prefix matching and regular expression matching.
[0079] In an embodiment of the present application, the string matching problem is to search for all occurrences of a string P in a large string T, and the search rule becomes a string matching rule. In an embodiment of the present application, the node metadata information may include two types of service type information and service name information. The service type information may correspond to the first string matching rule, and the service name information may correspond to the second string matching rule. According to the first string matching rule, the service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton can be generated, and these service type information all satisfy the first string matching rule and can be attributed to the same functional service. According to the second string matching rule, the service name information corresponding to each first service item node in the end-to-end service test flow skeleton can also be generated. These service name information satisfy the second string matching rule and can be attributed to the same functional service. The first string matching rule and the second string matching rule may include at least one of exact matching, prefix matching and regular expression matching. The first string matching rule and the second string matching rule may be the same or different.
[0080] In an embodiment of the present application, based on the first string matching rule, service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton is generated, and based on the second string matching rule, service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton is generated; wherein the first string matching rule and the second string matching rule both include at least one of exact matching, prefix matching and regular expression matching, and the service type information and service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton can be generated according to the first string matching rule and the second string matching rule, which can avoid the generation of messy service type information and service name information, can improve the stability of the service type information and service name information to a certain extent, and can improve the reliability of the target end-to-end service test flow finally obtained.
[0081] Step 207: Generate a target end-to-end service test flow of the target service grid system based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
[0082] In the embodiments of the present application, the implementation content of this step can refer to the implementation content of step 104, which will not be repeated here.
[0083] Optionally, there is no field conflict between the node metadata information and the first connector field.
[0084] In an embodiment of the present application, field conflict detection can be performed on the node metadata information and the first connector field. Normally, the first connector field can have a specific format and value range, and the node metadata needs to avoid the above format and value range. At the same time, there are other possible conflicts. For example, when the communication protocol is set to DNS mode, the first connector field cannot contain wildcards. If the node metadata information and the first connector field meet the above conditions, it can be considered that there is no field conflict between the node metadata xnxi and the first connector field. This can effectively improve the robustness of the target service grid system.
[0085] Reference Figure 3 , Figure 3 A logical block diagram of a service grid test flow generation device for a large-scale data center network provided in an embodiment of the present application, the device 300 may include: A first generating module 301, configured to generate an end-to-end service test flow skeleton of the target service grid system based on the first service items included in the target service grid system and the service interaction relationships between the first service items; A second generating module 302 is used to generate first connector fields corresponding to each connection edge included in the end-to-end service test flow skeleton based on the service interaction relationship; The third generating module 303 is used to generate node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton; The fourth generating module 304 is configured to generate a target end-to-end service test flow of the target service grid system based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
[0086] Optionally, the first generating module 301 includes: A creation submodule is used to create a service test directed connection between each first service item based on the service interaction relationship between each first service item included in the target service grid system; A query submodule, configured to query a first input terminal and a first output terminal from the first service item based on the service test directed connection; The first generating submodule is used to generate an end-to-end service test flow skeleton of the target service grid system based on the first input end, the first output end and the service test directed connection.
[0087] Optionally, the query submodule includes: An extraction unit, configured to randomly extract a second service item from the first service item; A first determining unit, configured to determine a first service item type of the second service item; a second determining unit, configured to determine, when the first service item type is not an input type or an output type, based on the service test directed connection, from the first service item a third service item pointing to the second service item and a fourth service item pointed to by the second service item; A third determining unit, configured to determine a second service item type of the third service item and a third service item type of the fourth service item; a fourth determining unit, configured to determine the third service item as a first input terminal when the second service item type is an input type; The fifth determining unit is configured to determine the fourth service item as a first output terminal when the third service item type is an output type.
[0088] Optionally, the device 300 further includes: a first determining module, configured to determine, based on the service interaction relationship, that the service interaction type is a sixth service item pointing to the second service item when the first service item type is not an input type and there is no fifth service item pointing to the second service item in the first service item; The second determining module is configured to determine the sixth service item as the first input end when the fourth service item type of the sixth service item is an input type.
[0089] Optionally, the device 300 further includes: a third determining module, configured to determine, based on the service interaction relationship, that the service interaction type is the eighth service item pointed to by the second service item, if the first service item type is not an output type and the seventh service item pointed to by the second service item does not exist in the first service item; The fourth determining module is configured to determine the eighth service item as the first output terminal when the fifth service item type of the eighth service item is an output type.
[0090] Optionally, the second generating module 302 includes: A first determination submodule, used to determine a first host name and a first port number of a first input end in the end-to-end service test flow skeleton; The sending submodule is used to send the first host name and the first port number to each connection edge included in the end-to-end service test flow skeleton based on the service interaction relationship, and obtain the first connector field corresponding to each connection edge.
[0091] Optionally, the node metadata information includes service type information and service name information, and the third generating module 303 includes: The second generation submodule is used to generate the service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton based on the first string matching rule, and to generate the service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton based on the second string matching rule; wherein the first string matching rule and the second string matching rule both include at least one of exact matching, prefix matching and regular expression matching.
[0092] Optionally, the first host name contains a wildcard.
[0093] Optionally, there is no field conflict between the node metadata information and the first connector field.
[0094] The service grid test flow generation device for a large-scale data center network in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a GPUBOX, a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0095] The service grid test flow generation device for a large-scale data center network in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, a Linux operating system, a Windows operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0096] The service grid test flow generation device for large-scale data center networks provided in the embodiment of the present application can achieve Figure 1 to Figure 2 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0097] The present application embodiment provides an electronic device, see Figure 4 The electronic device 40 includes: a processor 401, a memory 402, and a computer program 4021 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the program, the service grid test flow generation method for a large-scale data center network of the aforementioned embodiment is implemented.
[0098] An embodiment of the present application also provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the service grid test flow generation method for a large-scale data center network as disclosed in an embodiment of the present application.
[0099] The embodiment of the present application also provides a computer program product, which, when executed on an electronic device, enables a processor to implement the steps in the service grid test flow generation method for a large-scale data center network as disclosed in the embodiment of the present application.
[0100] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0101] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices, electronic devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0105] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0106] The above is a detailed introduction to a service grid test flow generation method for a large-scale data center network provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A service grid test flow generation method for a large-scale data center network, characterized in that: The method comprises: Based on each first service item included in the target service grid system and the service interaction relationship between the first service items, generating an end-to-end service test flow skeleton of the target service grid system; Based on the service interaction relationship, generate first connector fields corresponding to each connection edge included in the end-to-end service test flow skeleton; Generate node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton; A target end-to-end service test flow of the target service grid system is generated based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
2. The method according to claim 1, characterized in that The step of generating an end-to-end service test flow skeleton of the target service grid system based on each first service item included in the target service grid system and the service interaction relationship between the first service items includes: Based on the service interaction relationship between the first service items included in the target service grid system, create a service test directed connection between the first service items; Based on the service test directed connection, querying a first input terminal and a first output terminal from the first service item; An end-to-end service test flow skeleton of the target service grid system is generated based on the first input end, the first output end, and the service test directed connection.
3. The method according to claim 2, characterized in that The step of testing the directed connection based on the service and querying the first input terminal and the first output terminal from the first service item includes: Randomly select a second service item from the first service items; Determine a first service item type of the second service item; In a case where the first service item type is not an input type or an output type, based on the service test directed connection, determining from the first service item a third service item pointing to the second service item and a fourth service item pointed to by the second service item; determining a second service item type of the third service item and a third service item type of the fourth service item; In the case where the second service item type is an input type, determining the third service item as a first input end; In the case that the third service item type is an output type, the fourth service item is determined as a first output terminal.
4. The method according to claim 3, characterized in that: The method further comprises: When the first service item type is not an input type and there is no fifth service item pointing to the second service item in the first service item, based on the service interaction relationship, determining that the service interaction type is a sixth service item pointing to the second service item; In a case where the fourth service item type of the sixth service item is an input type, the sixth service item is determined as the first input end.
5. The method according to claim 3, characterized in that: The method further comprises: When the first service item type is not an output type and the seventh service item pointed to by the second service item does not exist in the first service item, based on the service interaction relationship, determining that the service interaction type is the eighth service item pointed to by the second service item; In a case where the fifth service item type of the eighth service item is an output type, the eighth service item is determined as the first output terminal.
6. The method according to claim 1, characterized in that The step of generating, based on the service interaction relationship, first connector fields corresponding to the respective connection edges contained in the end-to-end service test flow skeleton, comprises: Determine a first host name and a first port number of a first input end in the end-to-end service test flow skeleton; Based on the service interaction relationship, the first host name and the first port number are sent to each connection edge included in the end-to-end service test flow skeleton to obtain the first connector field corresponding to each connection edge.
7. The method according to claim 1 or 6, characterized in that: The node metadata information includes service type information and service name information, and the node metadata information corresponding to each first service item node included in the end-to-end service test flow skeleton is generated, including: Based on the first string matching rule, the service type information corresponding to each first service item node contained in the end-to-end service test flow skeleton is generated; based on the second string matching rule, the service name information corresponding to each first service item node contained in the end-to-end service test flow skeleton is generated; wherein the first string matching rule and the second string matching rule both include at least one of exact matching, prefix matching and regular expression matching.
8. The method according to claim 6, characterized in that The first host name contains a wildcard.
9. The method according to claim 1, characterized in that: There is no field conflict between the node metadata information and the first connector field.
10. A service grid test flow generation device for a large-scale data center network, characterized in that: The device comprises: A first generating module, configured to generate an end-to-end service test flow skeleton of the target service grid system based on each first service item included in the target service grid system and a service interaction relationship between the first service items; A second generating module is used to generate first connector fields corresponding to each connection edge included in the end-to-end service test flow skeleton based on the service interaction relationship; A third generating module is used to generate node metadata information corresponding to each first service item node contained in the end-to-end service test flow skeleton; A fourth generation module is used to generate a target end-to-end service test flow of the target service grid system based on the node metadata information, the first connector field and the end-to-end service test flow skeleton.
Citation Information
Patent Citations
Traffic routing method and device based on service grid, storage medium, processor and server
CN115865795A
Debugging method and device, electronic equipment and computer readable storage medium
CN117435456A
Business process test method and device, electronic equipment and storage medium
CN117743183A
Resource decoupling-oriented service grid test oracle method and device
CN119377084A
Performance test method, device and equipment of business system and storage medium
CN119537224A