Test method, device, equipment, medium and program product
By obtaining the full-link topology map and calculating link priority and risk, the problem of low testing efficiency was solved, efficient business testing and troubleshooting were achieved, and the stability and progress of the test environment were improved.
Patent Information
- Application Number
- CN202511124510.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-10-03
AI Technical Summary
In the field of software testing, the R&D methods under agile iteration and rapid prototyping have led to the transformation of black-box testing into gray-box testing. Unavailability occurs during the iteration of business logic. Traditional test application links cannot quickly locate the cause of the problem by tracing the microservice link analysis, resulting in reduced testing efficiency.
By obtaining the full-link topology map, calculating and quantifying the associated parameters of the nodes to determine the link priority and risk, using machine learning models to guide business test priority and troubleshooting, establishing the full-link topology map and generating a unique business code, tracking business call relationships, and realizing full-link test automation.
It improves testing efficiency, ensures the stability and progress of the testing environment, and reduces environment maintenance costs and test blocking time.
Smart Images

Figure CN120750822A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, to the application of large models in financial technology scenarios, and specifically to a testing method, device, equipment, medium and program product. Background Art
[0002] In the field of software testing, full-chain automated testing has become a core means of ensuring the quality of complex business systems. Agile iteration and rapid prototyping have led to a shift from black-box testing to gray-box testing. Issues such as non-standard development manuals and complex business chain combinations can lead to unavailability during business logic iteration. Traditional testing of application chains involves tracing microservice chains for chain analysis, but this technology struggles to quickly pinpoint the root cause of issues, reducing testing efficiency. Summary of the Invention
[0003] In view of the above problems, the present application provides a testing method, apparatus, device, medium and program product for improving testing efficiency.
[0004] According to the first aspect of the present application, a testing method is provided, which includes: obtaining a full-link topology diagram of L business scenarios, the full-link topology diagram including L quantized nodes, the quantized nodes including corresponding associated parameters, and L being a positive integer; calculating P link priorities based on the associated parameters corresponding to the L quantized nodes, where P is a positive integer, and the link priorities are used to guide business test priorities; and / or calculating P link risks based on the associated parameters corresponding to the L quantized nodes, and the link risks are used to guide business test troubleshooting.
[0005] According to an embodiment of the present application, the method for establishing the full-link topology map includes: obtaining first business data, second business data and generating a timestamp; generating a unique business code based on the first business data, second business data and generating a timestamp, and the unique business code corresponds one-to-one to the quantization node; obtaining a business call relationship; and establishing the full-link topology map based on the business call relationship and the unique business code.
[0006] According to an embodiment of the present application, generating a unique business code based on the first business data, the second business data and the generation timestamp includes: calculating a first business identifier based on the first business data through a first encryption algorithm; calculating a second business identifier based on the second business data through a second encryption algorithm; calculating a third business identifier based on the generation timestamp through a third encryption algorithm; and obtaining the unique business code based on the first business identifier, the second business identifier and the third business identifier.
[0007] According to an embodiment of the present application, obtaining the service call relationship includes: generating a service tracer; performing a service test based on the service tracer; obtaining log information after the service test; and extracting the service call relationship based on the log information.
[0008] According to an embodiment of the present application, the calculation of P link priorities based on the associated parameters corresponding to the L quantized nodes includes: obtaining a quantized node set of P links; calculating P link scores based on the quantized node set of the P links; and obtaining the P link priorities based on the sorting of the P link scores.
[0009] According to an embodiment of the present application, the P link scores are calculated based on the set of quantized nodes of the P links, including: for any link, obtaining the unique service code and the associated parameters corresponding to the quantized nodes contained in the link; outputting a dynamic weight based on a preset machine learning model with the unique service code and the associated parameters as input; and calculating the link score based on the dynamic weight.
[0010] According to an embodiment of the present application, the calculating of P link risks based on the associated parameters corresponding to the L quantized nodes includes: obtaining a quantized node set of P links; and calculating P link risks based on the quantized node set of the P links.
[0011] According to an embodiment of the present application, the P link risks are calculated based on the set of quantized nodes of the P links, including: for any link, obtaining the historical weights and business log data corresponding to the quantized nodes contained in the link; and calculating the link risk based on the historical weights and the business logs.
[0012] The second aspect of the present application provides a testing device, including: an acquisition module, used to obtain a full-link topology map of L business scenarios, the full-link topology map includes L quantized nodes, the quantized nodes include corresponding associated parameters, and L is a positive integer; a priority calculation module, used to calculate P link priorities based on the associated parameters corresponding to the L quantized nodes, P is a positive integer, and the link priority is used to guide the business test priority; and / or a link risk calculation module, used to calculate P link risks based on the associated parameters corresponding to the L quantized nodes, and the link risk is used to guide business test troubleshooting.
[0013] According to an embodiment of the present application, the device also includes a full-link topology map establishment module, which is used to obtain first business data, second business data and generate a timestamp; based on the first business data, the second business data and the generated timestamp, generate a unique business code, and the unique business code corresponds one-to-one to the quantization node; obtain a business call relationship; and establish the full-link topology map based on the business call relationship and the unique business code.
[0014] According to an embodiment of the present application, the full-link topology map establishment module is specifically used to calculate the first business identifier based on the first business data through a first encryption algorithm; calculate the second business identifier based on the second business data through a second encryption algorithm; calculate the third business identifier based on the generated timestamp through a third encryption algorithm; and obtain the unique business code based on the first business identifier, the second business identifier and the third business identifier.
[0015] According to an embodiment of the present application, the full-link topology map establishment module is further specifically used to generate a business tracer; perform business testing based on the business tracer; obtain log information after the business test; and extract the business call relationship based on the log information.
[0016] According to an embodiment of the present application, the priority calculation module is specifically used to obtain a quantized node set of P links; calculate P link scores based on the quantized node set of the P links; and obtain the P link priorities based on the sorting of the P link scores.
[0017] According to an embodiment of the present application, the priority calculation module is further specifically used to obtain, for any link, the unique service code and the associated parameters corresponding to the quantized node contained in the link; output a dynamic weight based on a preset machine learning model with the unique service code and the associated parameters as input; and calculate the link score based on the dynamic weight.
[0018] According to an embodiment of the present application, the link risk calculation module is configured to obtain a quantized node set of P links; and calculate P link risks based on the quantized node set of the P links.
[0019] According to an embodiment of the present application, the link risk calculation module is used to obtain, for any link, the historical weights and business log data corresponding to the quantized nodes contained in the link; and calculate the link risk based on the historical weights and the business logs.
[0020] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0021] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0022] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0023] To address the technical issue of low testing efficiency, the embodiments of this application obtain a pre-established full-link topology map and, based on each quantized node in the topology map, calculate the service test priority and link risk of the service link to which the quantized node belongs, thereby guiding subsequent manual testing and test troubleshooting. This can greatly increase testing efficiency, ensure test environment stability and test progress, and significantly reduce environmental maintenance costs and test block time. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0025] Figure 1 Schematically illustrates an application scenario diagram of the test method, apparatus, device, medium, and program product according to an embodiment of the present application;
[0026] Figure 2 The following schematically shows a flow chart of a testing method according to an embodiment of the present application;
[0027] Figure 3 A structural block diagram of a testing device according to an embodiment of the present application is schematically shown; and
[0028] Figure 4 A block diagram of an electronic device suitable for implementing a testing method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0029] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0030] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0032] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0033] An embodiment of the present application provides a testing method, which includes: obtaining a full-link topology map of L business scenarios, the full-link topology map including L quantized nodes, the quantized nodes including corresponding associated parameters, and L being a positive integer; calculating P link priorities based on the associated parameters corresponding to the L quantized nodes, where P is a positive integer, and the link priority is used to guide the business test priority; and / or calculating P link risks based on the associated parameters corresponding to the L quantized nodes, and the link risk is used to guide business test troubleshooting.
[0034] To address the technical issue of low testing efficiency, the embodiments of this application obtain a pre-established full-link topology map and, based on each quantized node in the topology map, calculate the service test priority and link risk of the service link to which the quantized node belongs, thereby guiding subsequent manual testing and test troubleshooting. This can greatly increase testing efficiency, ensure test environment stability and test progress, and significantly reduce environmental maintenance costs and test block time.
[0035] Figure 1The following schematically illustrates an application scenario diagram of the testing method according to an embodiment of the present application.
[0036] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0037] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0038] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0039] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0040] It should be noted that the test method provided in the embodiment of the present application can generally be executed by the server 105. Accordingly, the test device provided in the embodiment of the present application can generally be set in the server 105. The test method provided in the embodiment of the present application can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the test device provided in the embodiment of the present application can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0041] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0042] The following will be based on Figure 1 The scene described by Figure 2 The testing method of the disclosed embodiment is described in detail.
[0043] Figure 2 The flowchart of the testing method according to the embodiment of the present application is schematically shown.
[0044] like Figure 2 As shown, the testing method of this embodiment includes operations S210 to S230 , and the testing method can be executed by the server 105 .
[0045] In operation S210, a full-link topology graph of L business scenarios is obtained, where the full-link topology graph includes L quantized nodes, each of which includes corresponding associated parameters, and L is a positive integer.
[0046] Specifically, the full-link topology diagram is a full-scale link topology diagram, which contains L business scenarios. Each business scenario can correspond to a quantitative node. Each business scenario is not isolated, and there is a top-down dependency relationship between business scenarios. For example, when executing a service, you can jump from the result of business scenario A to business scenario B, and then jump from business scenario B to business scenario C.
[0047] Specifically, the associated parameters refer to the corresponding execution data in the business scenario, including, for example, interface call requests, message queue messages, and database operations, etc. The metadata with a mapping relationship therewith can be located through the full-link topology diagram.
[0048] Figure 3 The flowchart of the method for establishing a full-link topology map according to an embodiment of the present application is schematically shown.
[0049] like Figure 3 As shown, the method for establishing the full-link topology map of this embodiment includes operations S310 to S340.
[0050] In operation S310 , first business data and second business data are acquired, and a timestamp is generated.
[0051] Among them, the first business data is a business sector label, and the second business data is a business scenario label. Multiple business scenario labels can be classified under one business sector label.
[0052] In a typical scenario, business segment tags are built-in, commonly used tags. Leveraging existing business architecture assets, they map business segment and link application information and import business operations and maintenance segments, such as acquiring and quick payment. Business scenario tags are customized based on specific business segments and scenarios, such as inventory deductions and payment methods for merchant acquiring scenarios, and risk assessment levels and transaction limits for financial scenarios. Graph databases (relational databases) are used to store complex relationships: data object (type, name, service / module) -- ownership -- > tag (name, type, constraint value), recording the tag's assigner, time, and business segment / business scenario. For certain tags (such as payment status and failed re-draw), specific constraint values can be defined (e.g., payment status (pending, paid, canceled, refunded)) and failed re-draw (timeout x seconds, retry x times).
[0053] The business scenario tags may be as shown in Table 1 below:
[0054] Table 1
[0055] Business operation and maintenance segment classification Business operation and maintenance section name Application and service group information within the section Product and Service Acquiring business operation and maintenance section A, B, C, etc.; Business basic services Quick payment business operation and maintenance section E, F, G, H, etc. Ecological chain service Business operation and maintenance section A, C, E, etc. …… …… ……
[0056] The business operation and maintenance section can include section classifications, such as product and service, business foundation, and ecological chain. The section classification can also include section names such as acquiring business, quick payment business operation and maintenance, and bank business.
[0057] Furthermore, each step and expected outcome of a business scenario can be associated with a combination of required or optional tags. For example, in the step "Submit Order," the data object requiring operation is tagged with "order," "quantity," and so on. In the verification point "Inventory Reduction," the data object requiring verification is tagged with "inventory," "deduction," and "quantity." In the entire "Payment" scenario, a data object tagged with "payment method" is required. These combined business scenarios form a business chain.
[0058] The generated timestamp is a precise timestamp generated to uniquely identify the data.
[0059] In operation S320 , a unique service code is generated based on the first service data, the second service data, and a generation timestamp, where the unique service code corresponds one-to-one to the quantization node.
[0060] Specifically, a unique business code can be formed based on the first business data, the second business data and the generation timestamp. By simplifying the first business data, the second business data and the generation timestamp, a unique business code is formed. The unique business code is used to subsequently mark and distinguish quantization nodes to ensure that the code of the quantization node is unique.
[0061] According to an embodiment of the present application, the generation of a unique business code based on the first business data, the second business data and the generation timestamp includes: calculating a first business identifier based on the first business data through a first encryption algorithm; calculating a second business identifier based on the second business data through a second encryption algorithm; calculating a third business identifier based on the generation timestamp through a third encryption algorithm; and obtaining the unique business code based on the first business identifier, the second business identifier and the third business identifier.
[0062] Specifically, three different encryption algorithms can be used to encrypt the first service data, the second service data, and generate a timestamp. For example, different hash algorithms can be used to calculate different service identifiers. After calculating the different service identifiers, they are combined to obtain a unique service code with a certain number of digits. It can be understood that the process of generating a unique service code is to generate different service identifiers using different encryption algorithms, which increases the confidentiality of each service identifier and improves the confidentiality of the unique service code as a whole.
[0063] In a typical scenario, the process of establishing a unique business code is as follows:
[0064] First, generate a business module fingerprint (i.e., the first business identifier): Technically encode the existing business module library and output the business module fingerprint. Using a hash algorithm (e.g., MD5), a unique digital fingerprint for the business module is extracted. For example, if we input the version number and the "Quick Payment" business module, we output an 8-digit business identifier such as d3b5f1a4. This identifier acts as the "DNA" of the business module. The generated identifier for business modules of the same version is always consistent, but it will be completely different for different systems or versions.
[0065] Next, a business scenario signature code (i.e., the second business identifier) is generated. This step uses a hash algorithm (such as SHA1) based on the user's data type, business scenario, and business rule parameters. For example, the key parameters for the quick payment credit card timeout scenario are {0022 region credit card, timeout duration: 5 seconds, number of retries: 3}, resulting in an 8-digit scenario signature code of 9a8f7b6c. This signature code is a "digital mirror" of the scenario parameters. The same parameter combination generates the same signature code, and any parameter changes (such as a 10-second timeout) immediately change the signature code.
[0066] Next, generate a time dimension serial number (the third business identifier): This step uniquely identifies the data and generates an accurate timestamp. Using a hash algorithm (such as the ULID generation algorithm), a unique serial number is generated based on international standard time specifications, outputting a 16-digit time serial number: a1b2c3d4e5f67890. This serial number ensures that even if multiple test data sets are generated within the same millisecond for the same scenario, each piece of data remains uniquely identified.
[0067] Finally, synthesize a unique identifier: combine the three-layer identifier according to the rule of "business fingerprint (8 bits) + scenario feature code (8 bits) + time serial number (16 bits)" to generate a complete data identifier: d3b5f1a4-9a8f7b6c-a1b2c3d4e5f67890.
[0068] When the subsequent test system uses this unique identifier, it can be quickly parsed: the first 8 digits d3b5f1a4 → quick payment - credit card payment; the middle 8 digits 9a8f7b6c → payment timeout scenario (delay of 5 seconds + 3 retries); the last 16 digits a1b2...7890 → yy-mm-dd 14:30:00 generation. The corresponding related data is obtained from the parsed data for subsequent testing.
[0069] In addition, a data lineage tracking index table can be established: When a service generates new derived data (such as creating a new order record) based on upstream data (with parent data identifier = P) during processing, it needs to record the relationship between the new data identifier = C and the parent identifier = P. Specifically, when the new data generation service creates data identifier = C, it also records the parent data identifier = P in the current context, and this relationship is written to a dedicated "data lineage tracking index table." During link tracking, if derived data C is discovered, this table can be used to trace back to its source data P, thereby expanding the tracking scope and building a more complete end-to-end business scenario link.
[0070] In a typical scenario, the data lineage tracking index table is shown in Table 2 below:
[0071] Table 2
[0072] Field Example Value Complete data identification d3b5f1a4-9a8f7b6c-a1b2c3d4e5f67890 Parent data identifier (simulated data source) 8e7f6a5b-2a1b0c9d-87654321c3d4e5f6 Application system identification A, B SHA1 Scenario Feature Summary 9a8f7b6c5d4e3f2a1b0c9d8e7f6a5b4c Data generation timestamp yy-mm-dd 14:30:00
[0073] According to Table 2, data that can realize data lineage tracking are recorded, such as complete data identification, parent data identification (simulated data source), application system identification, SHA1 scenario feature summary data generation timestamp, etc.
[0074] This unique data identifier allows reverse analysis of test scenarios and the system version under test. It also automatically triggers identifier changes when business rule parameters are adjusted in business scenarios, preventing confusion with historical data and ensuring the establishment of unique data identifiers. For example, when the error identifier d3b5f1a4-9a8f7b6c-a1b2c3d4e5f67890 appears in the test log, business personnel can easily understand that this is a test scenario involving a timeout (5-second delay + 3 retries) for a quick payment / credit card payment executed at 2:30:00 PM on yy-mm-dd without contacting technical personnel. Subsequent link analysis also allows topological relationships to be derived directly from the unique data identifier. For example, if an anomaly is detected in data prefixed with "d3b5f1a4," it can be immediately associated with the relevant test scenarios affecting the quick payment / credit card payment system.
[0075] In operation S330 , the service call relationship is obtained.
[0076] Specifically, the business call relationship corresponds to the service one-to-one. When executing a service, different business scenarios need to be called in sequence. Therefore, the call relationship can be obtained, for example, by using an automated tool.
[0077] According to an embodiment of the present application, obtaining the service call relationship includes: generating a service tracer; performing a service test based on the service tracer; obtaining log information after the service test; and extracting the service call relationship based on the log information.
[0078] Specifically, a generated service tracer can be set in a service request, and a service test can be performed using the request carrying the service tracer. After the service test, test log information can be obtained, and the flow of the service tracer can be obtained from the log to obtain the service call relationship. It can be understood that by generating a service tracer, performing a service test based on the service tracer, and transferring the service tracer between services, the service call relationship can be obtained, effectively obtaining the service call relationship.
[0079] In operation S340, the full-link topology graph is established based on the service call relationship and the unique service code.
[0080] Specifically, unique service codes can be used to mark quantized nodes, and service call relationships can be used as edges to identify the flow relationships between quantized nodes, thereby achieving the establishment of a full-link topology graph. It can be understood that by generating unique service codes based on the details of service data and establishing a full-link topology graph based on the one-to-one correspondence between unique service codes and quantized nodes, each quantized node and the relationship between them can be effectively identified.
[0081] In a typical scenario, the process of establishing the full-link topology diagram is to obtain the interface call situation, analyze the log, and automatically retrieve the data identification + business segment application / interface / database / table index / database statement and other application information from the message queue, map the identification with the link information, deduce the link nodes and dependencies corresponding to the business scenario, record key application information such as application, node, interface, etc., form a full-link topology diagram, and establish a full-link diagram library. The specific process is as follows:
[0082] First, perform the initial injection of data identifiers: When the test platform or data generation service generates test data (or simulated requests) based on business tags, data identifiers are generated as core metadata. This data identifier is strongly bound to the specific test data instance or initial interface request. For interface requests, the data identifier is injected into the relevant field. For message queue messages, the data identifier is written into the message body as a message attribute. For database operations, the data identifier can be written into the relevant business table as a special business field or explicitly recorded in the operation log. Perform the initial injection of data identifiers, association and link construction, topology map construction, and link map visualization in sequence.
[0083] Next, association and link building: When the complete link for a specific business scenario (with the initially generated data identifier = X) needs to be traced, the link building engine initiates a query to the log storage system: data identifier = X. The log system returns all log records containing X (which may come from multiple services and multiple time points). Sorting and analysis: The link engine chronologically sorts and analyzes the call relationships based on the log timestamp, service name, group information, and operation type (interface call, database operation, message event).
[0084] Next, build a topology diagram, specifically including: Nodes: involved services, databases, and message queues. Edges: call relationships between services (inferred from caller / callee information and message producer / consumer information in logs). Events: key operations on each node (interface entry / exit, database operations, message events).
[0085] Finally, a visual link diagram is created: the analyzed node, edge, and event information is combined with a timeline to create a visual business link topology diagram, clearly showing the flow path and status changes of the business data identified by "data identifier = X" throughout the system. The diagram can be annotated with the business label, parameters, time consumption, and success / failure status of each link. The specific process is: User -> Tagging System -> Machine Learning Model Engine -> Execution Engine -> Submit scenario label ("Payment Timeout") -> Generate data identifier d3b5f1a4-9a8f7b6c-01H5ZYXW -> Request similar links (with identification vector) -> Graph Database Retrieve flow nodes -> Return a visual link solution -> Confirm execution of link A → B → E → ...
[0086] In operation S220, P link priorities are calculated based on the associated parameters corresponding to the L quantized nodes, where P is a positive integer. The link priorities are used to guide service test priorities.
[0087] L quantized nodes can constitute P links. The same quantized node can be in different links according to business logic. The associated parameters include at least various events of the node. Specifically, the overall full-link topology diagram and the corresponding associated parameters are used as inputs to the preset machine learning model to output the priorities of different links. In particular, the business test priority can guide testers to prioritize testing links with higher priority in the chain when an anomaly occurs.
[0088] According to an embodiment of the present application, the calculation of P link priorities based on the associated parameters corresponding to the L quantized nodes includes: obtaining a quantized node set of P links; calculating P link scores based on the quantized node set of the P links; and obtaining the P link priorities based on the sorting of the P link scores.
[0089] Specifically, the preset machine learning model outputs a priority score for each of the P links. This priority score is then used to form a priority for guiding service testing. It is understood that the link score is calculated by comprehensively calculating each quantized node in the link. Calculating the score for each quantized node in each link effectively identifies the importance of each link.
[0090] According to an embodiment of the present application, the calculation of P link scores based on the set of quantized nodes of the P links includes: for any link, obtaining the unique service code and the associated parameters corresponding to the quantized nodes included in the link; outputting a dynamic weight based on a preset machine learning model using the unique service code and the associated parameters as input; and calculating the link score based on the dynamic weight. It is understood that the calculation method of a single link score, which obtains the link score by combining the associated parameters with the machine learning model, is simple and efficient.
[0091] The dynamic weight is used to represent the call frequency. The larger the dynamic weight, the higher the call frequency of the link. The link score is then calculated based on the dynamic weight combined with other indicators (such as business criticality).
[0092] In a typical scenario, a graph neural network model is used to evaluate the comprehensive importance of each node (technical component) in the system and output high-frequency critical links. By analyzing the system call relationship graph, the comprehensive importance of each technical component (service / node) is quantified, providing a decision basis for resource allocation and troubleshooting. The specific steps are as follows:
[0093] First, the data identification embedding layer: each node has a unique data identification (such as service name, database identifier, etc.), and these discrete identifications are first converted into 64-dimensional continuous vector representations.
[0094] Second, feature concatenation: The identifier embedding vector is concatenated with the other three original features of the node to form a 128-dimensional input feature. Examples of original features include node type (such as interface gateway, database, microservice, etc.), historical average response time (reflecting performance), and timeout threshold (maximum tolerable delay set by the business).
[0095] Third, the graph convolution layer: The first graph convolution layer uses a 128-dimensional input and a 256-dimensional output, employing an activation function. This layer captures the first-order neighborhood topology of nodes, such as which services frequently call each other. The second graph convolution layer maintains a 256-dimensional output and further aggregates second-order neighborhood information, such as indirect service dependencies. Through these two layers of convolution, the node's position and influence within the entire call chain are perceived.
[0096] Fourth, perform dynamic weight generation: Call frequency weight FL: Based on the 256-dimensional features after convolution, the fully connected layer outputs a value between 0 and 1, indicating how frequently the node is called (for example, the payment service is called more frequently than the log service).
[0097] Fifth, obtain the business criticality (CL): Reference the existing business criticality score and output a value between 0 and 1 using the same structure to assess the impact of node failures on the business.
[0098] Sixth, calculate the overall importance score: Final score = 60% × call frequency weight + 40% × business criticality. This score is used in decision-making scenarios (such as resource allocation priority and troubleshooting sequence). For example, a high-frequency, critical service (score 0.92) should be prioritized, while a low-frequency, non-critical service (score 0.31) can be downgraded. For example, consider a business application (assuming the entire link has three nodes): Payment service: High frequency calls (FL=0.95), business-critical (CL=0.99) → Score = 0.95×0.6 + 0.99×0.4 = 0.966; Risk control service: Medium frequency calls (FL=0.7), high criticality (CL=0.9) → Score = 0.78; Email service: Low frequency calls (FL=0.2), non-critical (CL=0.3) → Score = 0.24. This can guide business and technical personnel to rank services based on their scores: Payment services must be monitored in real time, with a higher threshold for resource expansion; Risk control services should be the focus of daily inspections; and Email services can allow for resource reuse or delayed processing.
[0099] In operation S230 , P link risks are calculated based on the associated parameters corresponding to the L quantized nodes, and the link risks are used to guide service test troubleshooting.
[0100] In addition to calculating the comprehensive link score, the risk of the current link can also be calculated. Similarly, the link risk can be comprehensively calculated through the associated parameters corresponding to L quantitative nodes, so that if an abnormality occurs during the test, the abnormal point can be directly located to implement troubleshooting. Among them, the associated parameters also include the abnormal logs of each node.
[0101] According to an embodiment of the present application, the calculating of P link risks based on the associated parameters corresponding to the L quantized nodes includes: obtaining a quantized node set of P links; and calculating P link risks based on the quantized node set of the P links.
[0102] Specifically, a pre-defined calculation method is used to output the link risk of each of the P links. This link risk can be expressed as a score or a risk level, and this link risk is then used to guide anomaly troubleshooting. It is understood that calculating the link risk of each link effectively identifies the probability of each link risk occurring.
[0103] According to an embodiment of the present application, the P link risks are calculated based on the set of quantized nodes of the P links, including: for any link, obtaining the historical weights and business log data corresponding to the quantized nodes contained in the link; and calculating the link risk based on the historical weights and the business logs.
[0104] This historical weight, unlike the dynamic weight described above, is used to determine the overall link risk value. It is understood that the calculation of a single link risk, combined with the historical weight, allows for dynamic updates of link risk and ensures its certainty.
[0105] In a typical scenario, a sliding window attenuation factor of β = 0.9 is introduced to update link weights in real time and calculate the link failure risk index. The sliding window attenuation factor can prevent the system from fluctuating drastically due to a single failure while continuously reflecting the link quality trend. The details are as follows:
[0106] First, let's calculate the risk index: η = β × historical weight + (1-β) × call failure rate. β controls how quickly the historical weight decays; a larger value indicates a more persistent impact of historical data. A β of 0.9 means: the new failure rate accounts for 10% (1-β) and the historical weight accounts for 90% (β).
[0107] Then, dynamic β value adjustment: β is automatically adjusted according to the severity of the fault. If the call failure rate is > 10%, β = 0.85 focuses more on recent problems. Otherwise, β = 0.93 maintains stability. The dynamic β value is selected based on the current actual test requirements.
[0108] Finally, the call failure rate is calculated as follows: Call failure rate = α * program failure + γ * environment failure + λ * performance degradation, where (α = 0.6, γ = 0.3, λ = 0.1). The weighted alarm mechanism improves response speed and reduces false alarm rates compared to traditional static threshold methods. An alarm is triggered when the new weight η exceeds the threshold for three consecutive cycles; the threshold is the historical P99 weight + a safety margin (15%).
[0109] For link business scenarios with high final risk indexes, the corresponding technical personnel can be directly notified to resolve the issue. At the same time, business personnel can be notified that they can circumvent the issue through temporary testing. After the risk index drops, the business scenario test corresponding to the link can be conducted to avoid wasting too much testing time.
[0110] To address the technical issue of low testing efficiency, the embodiments of this application obtain a pre-established full-link topology map and, based on each quantized node in the topology map, calculate the service test priority and link risk of the service link to which the quantized node belongs, thereby guiding subsequent manual testing and test troubleshooting. This can greatly increase testing efficiency, ensure test environment stability and test progress, and significantly reduce environmental maintenance costs and test block time.
[0111] It is understandable that this application aims to solve the three core problems of the existing technology: the disconnection between business scenarios and technical links, the high cost of test case generation and maintenance, and the inefficient location of environmental link faults. Through the four-layer technical closed loop of "business label → semantic identification → topological link → intelligent evaluation", business-driven testing, improved link generation efficiency, improved fault location accuracy, and intelligent scheduling of test resources are achieved. Specifically, it is reflected in:
[0112] (1) Establish a business and technology link mapping mechanism: Use business segment + user-defined business scenario tags (such as @payment status, @failed re-draw) to mark test data, and use a three-layer hash algorithm (business segment MD5 + scenario SHA1 + timestamp ULID) to generate a unique data identifier that can be reverse-parsed into business scenarios, so as to connect the test cognition between business personnel and technical implementation, and help track the unique data identifier flow link.
[0113] (2) Automated generation and reuse of full-link tests: Automatically associate interface call sequences in logs or message queues based on data identifiers, and output a full-link topology diagram for business scenarios. Graph neural networks are then used to quantify node importance (call frequency × business criticality), identifying high-frequency critical links and resource priority strategies.
[0114] (3) Improve the efficiency of fault location and risk prediction: Segmented fault location: quickly locate the source of the problem through data identification prefix (business segment), infix (business scenario + parameter), and suffix (time environment), triggering self-healing actions (such as automatically extending the timeout threshold); Dynamic risk warning: Use the β sliding window algorithm to dynamically calculate the link fault risk index, and realize automatic adjustment of the β value based on the severity of the fault (focus on recent problems when the failure rate is >10%) and adaptive threshold alarm (historical P99 percentile + 15% safety margin), narrowing the problem location scope from "system level" to "scenario parameter level", helping business personnel temporarily avoid link business scenarios with high risk index, and technical personnel give priority to solving link business scenarios with high risk index, while improving environmental stability and improving testing efficiency.
[0115] Based on the above test method, this application also provides a test device. Figure 3 The device is described in detail.
[0116] Figure 3 The structural block diagram of the testing device according to an embodiment of the present application is schematically shown.
[0117] like Figure 3 As shown, the testing device 300 of this embodiment includes an acquisition module 310 , a priority calculation module 320 and a link risk calculation module 330 .
[0118] The acquisition module 310 is used to obtain a full-link topology diagram for L business scenarios, wherein the full-link topology diagram includes L quantized nodes, each of which includes corresponding associated parameters, where L is a positive integer. In one embodiment, the acquisition module 310 can be used to perform operation S210 described above, which will not be repeated here.
[0119] The priority calculation module 320 is used to calculate P link priorities based on the associated parameters corresponding to the L quantized nodes, where P is a positive integer. The link priorities are used to guide the service test priority. In one embodiment, the priority calculation module 320 can be used to perform the operation S220 described above, which will not be repeated here.
[0120] The link risk calculation module 330 is used to calculate P link risks based on the associated parameters corresponding to the L quantized nodes. The link risks are used to guide service test troubleshooting. In one embodiment, the link risk calculation module 330 can be used to perform the operation S230 described above, which will not be repeated here.
[0121] To address the technical issue of low testing efficiency, the embodiments of this application obtain a pre-established full-link topology map and, based on each quantized node in the topology map, calculate the service test priority and link risk of the service link to which the quantized node belongs, thereby guiding subsequent manual testing and test troubleshooting. This can greatly increase testing efficiency, ensure test environment stability and test progress, and significantly reduce environmental maintenance costs and test block time.
[0122] According to an embodiment of the present application, the device also includes a full-link topology map establishment module, which is used to obtain first business data, second business data and generate a timestamp; based on the first business data, the second business data and the generated timestamp, generate a unique business code, and the unique business code corresponds one-to-one to the quantization node; obtain a business call relationship; and establish the full-link topology map based on the business call relationship and the unique business code.
[0123] According to an embodiment of the present application, the full-link topology map establishment module is specifically used to calculate the first business identifier based on the first business data through a first encryption algorithm; calculate the second business identifier based on the second business data through a second encryption algorithm; calculate the third business identifier based on the generated timestamp through a third encryption algorithm; and obtain the unique business code based on the first business identifier, the second business identifier and the third business identifier.
[0124] According to an embodiment of the present application, the full-link topology map establishment module is further specifically used to generate a business tracer; perform business testing based on the business tracer; obtain log information after the business test; and extract the business call relationship based on the log information.
[0125] According to an embodiment of the present application, the priority calculation module is specifically used to obtain a quantized node set of P links; calculate P link scores based on the quantized node set of the P links; and obtain the P link priorities based on the sorting of the P link scores.
[0126] According to an embodiment of the present application, the priority calculation module is further specifically used to obtain, for any link, the unique service code and the associated parameters corresponding to the quantized node contained in the link; output a dynamic weight based on a preset machine learning model with the unique service code and the associated parameters as input; and calculate the link score based on the dynamic weight.
[0127] According to an embodiment of the present application, the link risk calculation module is configured to obtain a quantized node set of P links; and calculate P link risks based on the quantized node set of the P links.
[0128] According to an embodiment of the present application, the link risk calculation module is used to obtain, for any link, the historical weights and business log data corresponding to the quantized nodes contained in the link; and calculate the link risk based on the historical weights and the business logs.
[0129] According to embodiments of the present application, any multiple modules among the acquisition module 310, priority calculation module 320, and link risk calculation module 330 can be combined into a single module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the acquisition module 310, priority calculation module 320, and link risk calculation module 330 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of these. Alternatively, at least one of the acquisition module 310, priority calculation module 320, and link risk calculation module 330 can be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.
[0130] Figure 4 A block diagram of an electronic device suitable for implementing a testing method according to an embodiment of the present application is schematically shown.
[0131] like Figure 4As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0132] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.
[0133] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.
[0134] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0135] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0136] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided in the embodiments of the present application.
[0137] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0138] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0139] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0140] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0143] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A testing method, characterized in that: The method comprises: Obtain a full-link topology graph of L business scenarios, where the full-link topology graph includes L quantized nodes, each quantized node includes a corresponding associated parameter, and L is a positive integer; Calculating P link priorities based on the associated parameters corresponding to the L quantized nodes, where P is a positive integer, and the link priorities are used to guide service test priorities; and / or P link risks are calculated based on the associated parameters corresponding to the L quantized nodes, and the link risks are used to guide service test troubleshooting.
2. The method according to claim 1, characterized in that The method for establishing the full-link topology graph includes: Obtaining first business data, second business data, and generating a timestamp; Generate a unique service code based on the first service data, the second service data, and a generation timestamp, where the unique service code corresponds one-to-one to the quantization node; Obtaining business call relationships; and Based on the service call relationship and the unique service code, the full-link topology diagram is established.
3. The method according to claim 2, characterized in that The generating a unique service code based on the first service data, the second service data, and the generation timestamp includes: Calculating a first service identifier based on the first service data using a first encryption algorithm; Calculating a second service identifier based on the second service data using a second encryption algorithm; Calculating a third service identifier using a third encryption algorithm based on the generated timestamp; The unique service code is obtained by concatenating the first service identifier, the second service identifier, and the third service identifier.
4. The method according to claim 2, characterized in that The obtaining of the service call relationship includes: Generate business tracking symbols; performing a service test based on the service tracer; Obtain log information after business testing; and The business call relationship is extracted based on the log information.
5. The method according to any one of claims 2 to 4, characterized in that: The calculating P link priorities based on the association parameters corresponding to the L quantized nodes includes: Get the quantized node set of P links; Calculating P link scores based on the quantized node sets of the P links; and The P link priorities are obtained based on the sorting of the P link scores.
6. The method according to claim 5, characterized in that The calculating of the P link scores based on the quantized node set of the P links includes: For any link, obtaining the unique service code and the associated parameters corresponding to the quantized node included in the link; Outputting a dynamic weight based on a preset machine learning model using the unique service code and the associated parameters as input; and The link score is calculated based on the dynamic weight.
7. The method according to any one of claims 2 to 4, characterized in that: The calculating P link risks based on the associated parameters corresponding to the L quantized nodes includes: Obtaining a quantized node set of P links; and P link risks are calculated based on the quantized node sets of the P links.
8. The method according to claim 7, characterized in that The calculating of the P link risks based on the quantized node set of the P links includes: For any link, obtain the historical weights and service log data corresponding to the quantized nodes included in the link; and The link risk is calculated based on the historical weight and the service log.
9. A testing device, characterized in that: The device comprises: An acquisition module is used to obtain a full-link topology graph of L business scenarios, where the full-link topology graph includes L quantized nodes, each of which includes corresponding associated parameters, where L is a positive integer; a priority calculation module, configured to calculate P link priorities based on the associated parameters corresponding to the L quantized nodes, where P is a positive integer, and the link priorities are used to guide service test priorities; and / or The link risk calculation module is used to calculate P link risks based on the associated parameters corresponding to the L quantized nodes, and the link risks are used to guide service test troubleshooting.
10. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Test data construction method and device, equipment and storage medium
CN120973694A