Optimization effect analysis method based on distributed link tracking and electronic equipment
By obtaining interfaces in the field of financial technology and using interface risk prediction regression models, the optimization effect of distributed link tracking is automatically evaluated, which solves the inefficiency problem caused by relying on manual experience, and achieves efficient and reliable optimization effect evaluation.
Patent Information
- Application Number
- CN202510611349.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-15
AI Technical Summary
In the field of fintech, the evaluation of the optimization effect of distributed link tracking tools depends on the personal experience of the tester, resulting in inefficient testing and inconsistent evaluation results.
By obtaining the interface formed during the execution of the interface and database, performing SQL snapshots, using the pre-trained interface risk prediction regression model, combining type coverage, and automatically assessing the optimization effect.
It realizes automated evaluation of interface optimization effects in distributed link tracking, improving the testing efficiency and evaluation reliability during product optimization.
Smart Images

Figure CN120492344A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to an optimization effect analysis method and electronic device based on distributed link tracing. Background Art
[0002] In the fintech sector, distributed systems are often used for functional testing as product features are updated. To improve the quality and efficiency of testing, distributed tracing tools are introduced during testing, enabling testers to comprehensively monitor the test code and the operating status of the test system.
[0003] However, in distributed tracing link tools, the optimization effect often depends on the personal experience of the tester, resulting in low testing efficiency during product optimization. In addition, due to the reliance on personal ability, the test optimization evaluation results are uneven.
[0004] Therefore, there is an urgent need to provide an automated optimization effect analysis method for distributed link tracing to help testers understand the optimization effect. Summary of the Invention
[0005] The present invention provides an optimization effect analysis method and electronic equipment based on distributed link tracing to automatically evaluate and test optimization effects.
[0006] According to one aspect of the present invention, a method for analyzing optimization effects based on distributed link tracing is provided, the method comprising:
[0007] Obtaining an interface execution SQL snapshot formed during the execution of the interface and the database, and obtaining multiple versions of test data from the interface execution SQL snapshot;
[0008] Input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface;
[0009] Compare test data from multiple versions of the target interface to determine the coverage of optimization types covered by the current version and all optimization types during distributed link tracing.
[0010] An optimization effect of the target interface during distributed link tracing is determined according to the interface risk prediction value and the category coverage of the target interface.
[0011] According to another aspect of the present invention, there is provided an optimization effect analysis device based on distributed link tracing, the device comprising:
[0012] A test data acquisition module is used to obtain an interface execution SQL snapshot formed during the execution of the interface and the database, and to obtain multiple versions of test data from the interface execution SQL snapshot;
[0013] An interface risk prediction module is used to input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface;
[0014] A category coverage determination module is used to compare test data of multiple versions of the target interface to determine the category coverage between the optimization categories covered by the current version and all optimization categories during distributed link tracing of the target interface;
[0015] The optimization effect determination module is used to determine the optimization effect of the target interface during distributed link tracing according to the interface risk prediction value and the category coverage of the target interface.
[0016] According to another aspect of the present invention, an electronic device is provided, comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the optimization effect analysis method based on distributed link tracing described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the optimization effect analysis method based on distributed link tracing described in any embodiment of the present invention when executed.
[0021] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the optimization effect analysis method based on distributed link tracing according to any embodiment of the present invention.
[0022] The technical solution of the embodiment of the present invention obtains an interface execution SQL snapshot formed during the execution of the interface and the database, and obtains multiple versions of test data in the interface execution SQL snapshot; inputs the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface; compares the test data of multiple versions of the target interface to determine the type coverage between the optimization types covered by the current version execution of the target interface and all optimization types during distributed link tracing; determines the optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and type coverage of the target interface, solves the problem of automatic evaluation of the optimization effect during the test process, can automatically evaluate the interface optimization effect in distributed link tracing, and improves the testing efficiency during product optimization.
[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 This is a flowchart of an optimization effect analysis method based on distributed link tracing according to the first embodiment of the present invention;
[0026] Figure 2 This is a flowchart of an optimization effect analysis method based on distributed link tracing according to the second embodiment of the present invention;
[0027] Figure 3 This is a flowchart of an application example of an optimization effect analysis method based on distributed link tracing provided in accordance with the second embodiment of the present invention;
[0028] Figure 4 2 is a schematic structural diagram of an optimization effect analysis device based on distributed link tracing according to a third embodiment of the present invention;
[0029] Figure 5 It is a structural diagram of an electronic device that implements the optimization effect analysis method based on distributed link tracing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Example 1
[0033] Figure 1 This is a flowchart of an optimization effect analysis method based on distributed link tracing provided according to Example 1 of the present invention. This embodiment can be applied to the situation of automatically evaluating test performance in distributed link tracing. The method can be executed by an optimization effect analysis device based on distributed link tracing. The optimization effect analysis device based on distributed link tracing can be implemented in the form of hardware and / or software. The optimization effect analysis device based on distributed link tracing can be configured in an electronic device such as a computer, a mobile phone, a controller or a processor.
[0034] In distributed systems, optimization requirements can be derived based on changes in online traffic and data volume, as well as user feedback. Optimization is then completed through a series of steps: problem discovery, problem confirmation, problem remediation, and problem verification. Optimization typically involves adjustments made to online operations that are inconsistent with product usage or to identify potential risks. Adjustments made to address product non-compliance typically have clear functional indicators. However, when optimizing to identify potential risks, quality control metrics are difficult to establish, making it difficult to evaluate optimization results.
[0035] Distributed link tracing is a concept in distributed systems. Its purpose is to comprehensively control the operation of test code and test systems, improving the quality and efficiency of testing. In distributed link tracing, a distributed request can be restored to a call link, centrally displaying the call status of a distributed request.
[0036] like Figure 1 As shown, the optimization effect analysis method based on distributed link tracing includes:
[0037] Step 110: Obtain an interface execution SQL snapshot formed during the execution of the interface and the database, and obtain multiple versions of test data from the interface execution SQL snapshot.
[0038] During the service deployment process, a distributed link agent can be introduced on the application side to collect and monitor data. When the optimization task is started, a snapshot of the Structured Query Language (SQL) executed by the interface can be obtained by setting parameters in the startup command. For example, for a MySQL database, a general query log can be turned on to record all SQL statements executed by interfaces connected to the database. In the MySQL configuration file, general_log can be set to ON and the log file path can be specified. The SQL statements executed by the interface will be recorded in the file, and the file can be consulted later to obtain a snapshot of the interface execution SQL. For the slow query log, the time threshold for slow SQL statements can be set, such as recording if it exceeds 1 second. Set slow_query_log = ON in the configuration file, specify the slow query log file path, and set long_query_time (such as long_query_time = 1 means query records exceeding 1 second) to obtain a snapshot of the interface execution SQL.
[0039] During distributed task execution, multiple optimization passes are typically required. Therefore, multiple versions of test data can be obtained. To standardize test data versions, the service name and service ID of the distributed task can be specified when launching the command. For example, the service ID can be formed by concatenating the service name and the container identifier (pod ID). The pod ID can be centrally managed by an organization-level container orchestration engine (Kubernetes, k8s) and is unique, ensuring that no duplicate services are launched. For example, the service name is IPP and the service ID is IPP20240428001021. During the optimization service, multiple versions of test data can be obtained using the service ID to evaluate the current optimization effect.
[0040] Step 120: Input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface.
[0041] The test data may include at least one of the following: number of case executions, number of automations, number of associated systems, link length, number of faults (bugs), performance measurement identification, and identification of SQL statements to be optimized.
[0042] The interface risk prediction regression model can be a logistic regression model. The pre-trained interface risk prediction regression model can obtain an interface risk prediction value based on test data.
[0043] Optionally, before inputting the test data of the current version of the target interface into the interface risk prediction regression model generated by pre-training to obtain the interface risk prediction value of the current version of the target interface, it also includes: obtaining test data of multiple historical versions, and calibrating the risk values of the test data of the historical versions of each interface; training the interface risk prediction regression model based on the test data of multiple historical versions and the calibrated risk values, determining the optimal coefficient of the regression model, and obtaining the interface risk prediction regression model generated by pre-training.
[0044] Among them, risk value calibration can be achieved in a variety of ways. For example, risk value calibration can be obtained through expert scoring and evaluation. Alternatively, risk value calibration can be obtained by statistically analyzing test data according to preset rules, and then reviewed by experts. For example, Table 1 is a test data schematic table provided according to Example 1 of the present invention. The number of case executions, number of automations, number of associated systems, link length, number of bugs, performance measurement identification, and SQL identification to be optimized in Table 1 can be used as independent variables in the training of the interface risk prediction regression model, and the corresponding risk value calibration can be used as the dependent variable. When there is missing data in the independent variable, it can be supplemented, for example, zero can be added.
[0045] Assume that there is a relationship between the independent variable x and the dependent variable y By combining the logistic function (Sigmoid), the interface risk prediction value is obtained The gradient descent algorithm is used to obtain the optimal coefficients ω and b of the regression model, and the interface risk prediction regression model can be obtained. During the training process, the interface risk prediction regression model can be trained for multiple parameter tuning, and the reliability of the model training results can be evaluated by the loss function. When the loss function is minimized or the number of iterations is reached, the interface risk prediction regression model is obtained. By inputting the test data of the current version into the pre-trained interface risk prediction regression model, the interface risk prediction value of the current version of the target interface can be obtained.
[0046] Table 1
[0047]
[0048] By combining the logistic regression model with the Sigmoid function for data fitting, the risk value of the interface can be predicted, thereby improving the risk prediction performance.
[0049] Step 130 : Compare test data of multiple versions of the target interface to determine the type coverage between the optimization types covered by the current version and all optimization types during distributed link tracing of the target interface.
[0050] Test data can include multiple optimization types. Test data for each optimization type can be stored at the interface class level. For an interface, the test data for the current version may only include some optimization types, i.e., covered optimization types. The ratio of covered optimization types to all optimization types can be used as type coverage.
[0051] Step 140: Determine the optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and category coverage of the target interface.
[0052] Based on the interface risk prediction value and category coverage, optimization effect evaluation rules can be established. Through relationship mapping, the optimization effect of the target interface during distributed link tracing can be obtained. For example, when the interface risk prediction value is greater than 0.5 and the category coverage is greater than 90%, it can be determined that the optimization effect of the target interface during distributed link tracing has achieved the expected optimization.
[0053] Alternatively, the interface risk prediction value and type coverage can be numerically calculated to obtain an optimized evaluation value, which can be used to represent the optimization effect of the target interface during distributed link tracing. For example, through the formula Determine the optimization evaluation value, where a is the category coverage, b is the interface risk prediction value, and γ is the optimization evaluation value. If γ is greater than or equal to 1, the target interface is considered to have achieved the expected optimization during distributed link tracing; otherwise, the target interface is considered to have not achieved the expected optimization during distributed link tracing.
[0054] By evaluating the optimization effect based on the interface risk prediction value and the type coverage, differentiated optimization effect evaluations can be performed on different interfaces to improve the reliability of the optimization effect evaluation.
[0055] The technical solution of this embodiment is to obtain an interface execution SQL snapshot formed during the execution process of the interface and the database, and obtain multiple versions of test data in the interface execution SQL snapshot; input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface; compare the test data of multiple versions of the target interface to determine the type coverage between the optimization types covered by the current version execution of the target interface and all optimization types during distributed link tracing; determine the optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and type coverage of the target interface, solve the problem of automatic evaluation of the optimization effect during the test process, and perform risk analysis on the interface through the interface risk prediction regression model to improve the accuracy of interface risk prediction; differentiated optimization effect evaluation can be performed through the interface risk prediction value and type coverage, so as to realize automatic evaluation of the interface optimization effect in distributed link tracing and improve the testing efficiency during product optimization.
[0056] Example 2
[0057] Figure 2 This is a flow chart of an optimization effect analysis method based on distributed link tracing provided in accordance with the second embodiment of the present invention. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method includes:
[0058] Step 210: Perform a liveness detection request on the link in the distributed link tracking, and continuously collect link execution data in the liveness detection request.
[0059] For example, you can determine whether the liveness request has ended by checking status == 200. Link execution data can be continuously collected during the liveness request. If no liveness data is received within a preset time period, link execution data collection can be considered complete. By collecting link execution data based on the liveness request, the integrity of the collected data can be guaranteed.
[0060] Step 220: When the liveness detection request ends, a current interface list formed based on the collected link execution data is obtained, and data comparison is performed between the current interface list and the previous interface list.
[0061] The interface list may include interfaces for each database call and link execution data corresponding to the interface. In an embodiment of the present invention, data comparison between the current interface list and the previous interface list may be performed to determine whether the current task is an optimization task for distributed link tracking.
[0062] Specifically, when performing data comparison, the data corresponding to the current service ID and the previous service ID of the same interface in the current interface list and the previous interface list can be compared to determine whether the data is consistent. For example, whether the call links corresponding to the current service ID and the previous service ID of the same interface are the same.
[0063] Step 230: When the current interface list is inconsistent with the previous interface list data, determine that the current task is an optimization task of distributed link tracing.
[0064] For example, when the call links corresponding to the current service ID and the previous service ID of the same interface are different, the current task is determined to be an optimization task of distributed link tracing of the interface.
[0065] Step 240: In the distributed link tracing optimization task, obtain an interface execution SQL snapshot formed during the interface and database execution process, and obtain multiple versions of test data from the interface execution SQL snapshot.
[0066] When evaluating optimization results, it can be a product-specific optimization task. Therefore, in the distributed link tracing optimization task, you can obtain the interface execution SQL snapshot formed during the interface and database execution process.
[0067] Optionally, in the optimization task of distributed link tracing, an interface execution SQL snapshot formed during the execution of the interface and the database is obtained, and multiple versions of test data are obtained in the interface execution SQL snapshot, including: in the optimization task of distributed link tracing, determining the target interface to be analyzed in the optimization task based on the current interface list; obtaining an interface execution SQL snapshot formed during the execution of the target interface and the database, and obtaining multiple versions of test data in the interface execution SQL snapshot.
[0068] For example, the latest interface list obtained through the interface registration service is [IPP001, IPP002, IPP003, IPP004]. If an interface changes during synchronization—for example, the original IPP005 interface is no longer in the interface list during this synchronization—IPP005 becomes unused. Such unused interfaces are excluded from the optimization analysis process. Therefore, interfaces [IPP001, IPP002, IPP003, IPP004] are selected as target interfaces through the interface list. Execution data for the corresponding links is collected for the target interfaces, generating a SQL snapshot of the current interface execution. Combined with historical SQL snapshots of interface execution, multiple versions of test data can be generated.
[0069] The test data may include table data corresponding to the SQL executed in the database service based on the SQL snapshot executed by the interface, such as the number of tables, link length, etc. The test data may also include data obtained by processing the SQL snapshot executed by the interface, such as the identification of SQL statements to be optimized.
[0070] Optionally, multiple versions of test data are obtained in the interface execution SQL snapshot, including: when the target SQL statement in the interface execution SQL snapshot meets the optimization screening conditions, adding a SQL identifier to be optimized to the interface corresponding to the target SQL statement; and generating multiple versions of test data based on multiple versions of the interface execution SQL snapshot and the SQL identifier to be optimized.
[0071] The optimization screening conditions can include whether the target SQL statement hits an index or whether there are slow SQL statements. For example, slow SQL statements or SQL statements with over 1 million data points that do not use an index can be screened. The interface corresponding to the target SQL statement is determined by executing a SQL snapshot through the interface, and a SQL statement to be optimized is identified in the interface. The data in the SQL snapshot and the SQL statement to be optimized are used to generate test data. This process can be repeated for multiple versions of the interface execution SQL snapshot to generate multiple versions of test data.
[0072] When generating test data, real-time link data, such as response time, can also be obtained from the detection server. Optionally, the test data includes at least one of the following: number of case executions, number of automations, number of associated systems, link length, number of bugs, performance measurement indicators, and indicators of SQL statements requiring optimization. The number of case executions, number of automations, number of associated systems, link length, number of bugs, and performance measurement indicators can all be obtained from the SQL statement snapshot executed on the interface.
[0073] Step 250: Input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface.
[0074] Step 260 : Compare test data of multiple versions of the target interface to determine the type coverage between the optimization types covered by the current version and all optimization types during distributed link tracing of the target interface.
[0075] Step 270: Determine the optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and category coverage of the target interface.
[0076] Optionally, the optimization effect of the target interface during distributed link tracking is determined based on the interface risk prediction value and type coverage of the target interface, including: when the target interface is determined to be a first risk type interface based on the interface risk prediction value of the target interface, and when the type coverage of the target interface is determined to be greater than or equal to a first coverage threshold based on the type coverage, the optimization effect of the target interface during distributed link tracking is determined to have achieved expected optimization; when the target interface is determined to be a second risk type interface based on the interface risk prediction value of the target interface, and when the type coverage of the target interface is determined to be greater than or equal to a second coverage threshold based on the type coverage, the optimization effect of the target interface during distributed link tracking is determined to have achieved expected optimization; otherwise, the optimization effect of the target interface during distributed link tracking is determined to have not achieved expected optimization; wherein, the risk level of the first risk type interface is higher than that of the second risk type interface, and the first coverage threshold is greater than the second coverage threshold.
[0077] Specifically, the first risk category interface is a high-risk interface, and the second risk category interface is a low-risk interface. For example, when the interface risk prediction value is greater than or equal to 0.5, the interface is determined to be a first risk category interface, i.e., a high-risk interface. When the interface risk prediction value is less than 0.5, the interface is determined to be a second risk category interface, i.e., a low-risk interface.
[0078] Exemplarily, when the type coverage of high-risk interfaces is 100%, and when the test data of the current version does not include any new SQL statements to be optimized compared with the test data of the historical version, the optimization effect of the target interface during distributed link tracing is determined to have achieved the expected optimization. When the type coverage of low-risk interfaces is greater than or equal to 80%, and when the test data of the current version does not include any new SQL statements to be optimized compared with the test data of the historical version, the optimization effect of the target interface during distributed link tracing is determined to have achieved the expected optimization. For interfaces that do not meet the above conditions, the optimization effect of the target interface during distributed link tracing is determined to have not achieved the expected optimization.
[0079] By evaluating different types of interfaces separately, differentiated optimization effect evaluation can be achieved and the accuracy of optimization effect evaluation can be improved.
[0080] Optionally, after determining the optimization effect of the target interface during distributed link tracking based on the interface risk prediction value and type coverage of the target interface, it also includes: when the optimization effect does not reach the expected optimization, based on multiple versions of test data, interface risk prediction values and type coverage, an optimization failure alarm is issued for the target interface.
[0081] Alert methods include, but are not limited to, sound alerts, light alerts, SMS alerts, pop-up alerts, phone alerts, and email alerts. By providing alerts for optimization failures, testers can promptly identify issues and make adjustments to product testing optimizations, eliminating the need for testers to evaluate optimization results. Furthermore, under-optimized interfaces can be identified and adjusted promptly.
[0082] The technical solution of the embodiment of the present invention is to perform a live link request on the link in distributed link tracing, and continuously collect link execution data in the live link request; at the end of the live link request, obtain a current interface list formed according to the collected link execution data, and compare the current interface list with the previous interface list; when the data of the current interface list is inconsistent with the previous interface list, determine that the current task is an optimization task of distributed link tracing; in the optimization task of distributed link tracing, obtain an interface execution SQL snapshot formed during the interface and database execution process, and obtain multiple versions of test data in the interface execution SQL snapshot; input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface; compare the test data of multiple versions of the target interface to determine the type coverage between the optimization types covered by the current version execution of the target interface and all optimization types during distributed link tracing; determine the optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and type coverage of the target interface, solve the problem of automatic evaluation of the optimization effect during the test process, and can automatically evaluate the optimization effect of the target interface in distributed link tracing in the optimization task, thereby improving the testing efficiency during product optimization.
[0083] Figure 3 This is a flowchart of an application example of an optimization effect analysis method based on distributed link tracing provided in accordance with the second embodiment of the present invention. Figure 3 As shown, when analyzing the optimization effect, you can first register the service label and generate the service name and service number; then check the environment to determine whether it is an optimization task; when the environment is an optimization task, determine the target interface according to the interface list, and obtain link data, slow queries, index hits, response time, and processor memory according to the interface list to generate test data; and mark whether there are SQL identifiers to be optimized in the test data; input the test data into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface; according to the interface risk prediction value and type coverage of the target interface, determine the optimization effect of the target interface during distributed link tracking, realize the automated difference analysis and evaluation of the optimization effect, and ensure the reliability of the analysis results.
[0084] Example 3
[0085] Figure 4Schematic diagram of the structure of an optimization effect analysis device based on distributed link tracing according to the third embodiment of the present invention. Figure 4 As shown, the apparatus includes: a test data acquisition module 410, an interface risk prediction module 420, a category coverage determination module 430 and an optimization effect determination module 440. Among them:
[0086] The test data acquisition module 410 is used to obtain the interface execution SQL snapshot formed during the interface and database execution process, and obtain multiple versions of test data from the interface execution SQL snapshot;
[0087] The interface risk prediction module 420 is used to input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface;
[0088] A category coverage determination module 430 is configured to compare test data of multiple versions of a target interface to determine category coverage between the optimization categories covered by the current version and all optimization categories during distributed link tracing of the target interface.
[0089] The optimization effect determination module 440 is used to determine the optimization effect of the target interface during distributed link tracing according to the interface risk prediction value and category coverage of the target interface.
[0090] Optionally, the test data acquisition module 410 includes:
[0091] A link execution data collection unit is used to make liveness detection requests for links in distributed link tracking and continuously collect link execution data during the liveness detection requests;
[0092] A data comparison unit is used to obtain a current interface list formed according to the collected link execution data when the liveness detection request ends, and compare the current interface list with the previous interface list;
[0093] An optimization task determination unit, configured to determine that the current task is an optimization task of distributed link tracing when the current interface list is inconsistent with the previous interface list data;
[0094] The test data acquisition unit in the optimization task is used to obtain the interface execution SQL snapshot formed during the execution process of the interface and the database in the optimization task of distributed link tracing, and obtain multiple versions of test data in the interface execution SQL snapshot.
[0095] Optionally, the test data acquisition unit in the optimization task includes:
[0096] A target interface determination subunit is used to determine the target interface to be analyzed in the optimization task of distributed link tracing based on the current interface list;
[0097] The test data acquisition subunit of the target interface is used to obtain the interface execution SQL snapshot formed during the execution of the target interface and the database, and obtain multiple versions of test data from the interface execution SQL snapshot.
[0098] Optionally, the test data acquisition module 410 includes:
[0099] The identification adding unit is used to add an SQL identification to be optimized to the interface corresponding to the target SQL statement when the target SQL statement in the interface execution SQL snapshot meets the screening condition to be optimized;
[0100] The test data generating unit is used to generate multiple versions of test data according to the SQL snapshots of the interface execution of multiple versions and the SQL identifications that need to be optimized.
[0101] Optionally, the device further includes:
[0102] The risk value calibration module is used to obtain the test data of multiple historical versions and perform risk value calibration on the test data of the historical versions of each interface before inputting the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface;
[0103] The model training module is used to train the interface risk prediction regression model based on test data from multiple historical versions and calibrated risk values, determine the optimal coefficients of the regression model, and obtain the pre-trained interface risk prediction regression model;
[0104] The test data includes at least one of the following: number of case executions, number of automations, number of related systems, link length, number of bugs, performance measurement identification, and identification of SQL statements to be optimized.
[0105] Optionally, the optimization effect determination module 440 includes:
[0106] a first optimization effect determination unit, configured to determine, based on the interface risk prediction value of the target interface, that the target interface is a first risk category interface, and, when it is determined based on the category coverage that the category coverage of the target interface is greater than or equal to a first coverage threshold, determine that the optimization effect of the target interface during distributed link tracing is expected optimization;
[0107] a second optimization effect determination unit, configured to determine, based on the interface risk prediction value of the target interface, that the target interface is a second risk category interface, and when, based on the category coverage, it is determined that the category coverage of the target interface is greater than or equal to a second coverage threshold, determine that the optimization effect of the target interface during distributed link tracing is to achieve expected optimization;
[0108] a third optimization effect determination unit, configured to determine that the optimization effect of the target interface during distributed link tracing does not achieve expected optimization when the target interface is an interface of the first risk category and the category coverage is less than a first coverage threshold, or when the target interface is an interface of the second risk category and the category coverage is less than a second coverage threshold;
[0109] The risk level of the first risk type interface is higher than that of the second risk type interface, and the first coverage threshold is greater than the second coverage threshold.
[0110] Optionally, the device further includes:
[0111] The optimization alarm module is used to determine the optimization effect of the target interface during distributed link tracking based on the interface risk prediction value and type coverage of the target interface. If the optimization effect does not reach the expected optimization, the optimization failure alarm of the target interface will be issued based on multiple versions of test data, interface risk prediction values and type coverage.
[0112] The optimization effect analysis device based on distributed link tracing provided in an embodiment of the present invention can execute the optimization effect analysis method based on distributed link tracing provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0113] Example 4
[0114] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0115] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0116] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0117] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the optimization effect analysis method based on distributed link tracing.
[0118] In some embodiments, the optimization effect analysis method based on distributed link tracing can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the optimization effect analysis method based on distributed link tracing described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the optimization effect analysis method based on distributed link tracing in any other appropriate manner (for example, by means of firmware).
[0119] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0124] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0125] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0126] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for analyzing optimization effects based on distributed link tracing, characterized in that: include: Obtaining an interface execution SQL snapshot formed during the execution of the interface and the database, and obtaining multiple versions of test data from the interface execution SQL snapshot; Input the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface; Compare test data from multiple versions of the target interface to determine the coverage of optimization types covered by the current version and all optimization types during distributed link tracing. An optimization effect of the target interface during distributed link tracing is determined according to the interface risk prediction value and the category coverage of the target interface.
2. The method according to claim 1, characterized in that Obtain an interface execution SQL snapshot formed during the execution of the interface and the database, and obtain multiple versions of test data from the interface execution SQL snapshot, including: In distributed link tracing, a liveness request is made to the link, and link execution data is continuously collected during the liveness request. When the liveness detection request ends, the current interface list formed based on the collected link execution data is obtained, and the current interface list is compared with the previous interface list; When the current interface list is inconsistent with the previous interface list data, the current task is determined to be an optimization task of distributed link tracing; In the distributed link tracing optimization task, an interface execution SQL snapshot formed during the execution of the interface and the database is obtained, and multiple versions of test data are obtained from the interface execution SQL snapshot.
3. The method according to claim 2, characterized in that In the distributed link tracing optimization task, obtaining an interface execution SQL snapshot formed during the interface and database execution process, and obtaining multiple versions of test data from the interface execution SQL snapshot, including: In the distributed link tracing optimization task, determining a target interface to be analyzed in the optimization task according to the current interface list; An interface execution SQL snapshot formed during the execution of the target interface and the database is obtained, and multiple versions of test data are obtained from the interface execution SQL snapshot.
4. The method according to claim 1, wherein Multiple versions of test data are obtained from the SQL snapshot executed on the interface, including: When the target SQL statement in the SQL snapshot executed by the interface meets the screening condition to be optimized, an SQL identifier to be optimized is added to the interface corresponding to the target SQL statement; Multiple versions of test data are generated based on the SQL snapshots of the interface execution of multiple versions and the SQL identifications that need to be optimized.
5. The method according to claim 1, characterized in that Before inputting the test data of the current version of the target interface into the pre-trained interface risk prediction regression model to obtain the interface risk prediction value of the current version of the target interface, the following steps are also included: Acquire multiple historical versions of test data, and calibrate the risk value of the historical versions of the test data of each interface; The interface risk prediction regression model is trained based on test data from multiple historical versions and calibrated risk values to determine the optimal coefficient of the regression model and obtain a pre-trained interface risk prediction regression model. The test data includes at least one of the following: number of case executions, number of automations, number of associated systems, link length, number of bugs, performance measurement identification, and identification of SQL statements to be optimized.
6. The method according to claim 1, wherein Determining an optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and the category coverage of the target interface includes: When the target interface is determined to be a first risk category interface according to the interface risk prediction value of the target interface, and the category coverage of the target interface is determined to be greater than or equal to a first coverage threshold according to the category coverage, it is determined that the optimization effect of the target interface during distributed link tracing reaches expected optimization; When the target interface is determined to be a second risk category interface according to the interface risk prediction value of the target interface, and the category coverage of the target interface is determined to be greater than or equal to a second coverage threshold according to the category coverage, it is determined that the optimization effect of the target interface during distributed link tracing reaches expected optimization; Otherwise, it is determined that the optimization effect of the target interface during distributed link tracing does not achieve the expected optimization; The risk level of the first risk type interface is higher than that of the second risk type interface, and the first coverage threshold is greater than the second coverage threshold.
7. The method according to claim 6, characterized in that After determining the optimization effect of the target interface during distributed link tracing based on the interface risk prediction value and the category coverage of the target interface, the method further includes: When the optimization effect fails to achieve the expected optimization, an optimization failure alarm is issued for the target interface based on the test data of multiple versions, the interface risk prediction value, and the type coverage.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the optimization effect analysis method based on distributed link tracing according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the optimization effect analysis method based on distributed link tracing according to any one of claims 1 to 7 when executed.
10. A computer program product, comprising a computer program, wherein when executed by a processor, the computer program implements the optimization effect analysis method based on distributed link tracing according to any one of claims 1 to 7.