Method and device for determining version difference data and electronic equipment

By acquiring and analyzing the runtime parameters of the version code under the microservice architecture, the cause of performance degradation can be automatically located, solving the problem of performance degradation after code merging, improving analysis efficiency and reducing manual costs.

CN121996284APending Publication Date: 2026-05-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511915012.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In a microservice architecture, performance degradation issues caused by code merging are difficult to locate quickly. Existing technical tools such as APM can only monitor interface-level performance, and manual troubleshooting is inefficient and time-consuming.

Method used

By obtaining the runtime parameters of the benchmark and target version code, performance degradation parameters are determined. Then, clustering algorithms and performance probes are used to automatically analyze version differences and generate target difference data.

Benefits of technology

It improves the efficiency of version code analysis, reduces labor costs, significantly shortens the regression testing-fixing cycle, reduces false positive rate, and outputs source code line-level reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996284A_ABST
    Figure CN121996284A_ABST
Patent Text Reader

Abstract

The invention provides a version difference data determination method and apparatus, and an electronic device. The method comprises the steps of obtaining a first system operation parameter and a second system operation parameter; the first system operation parameter and the second system operation parameter are respectively used for indicating the performance of a first service system generated by the reference version code in the process of processing each service request in a preset service request sequence; the performance of a second service system generated by the target version code in each service request process in the service request sequence processing process is obtained; determining a performance degradation parameter based on the first system operation parameter, the second system operation parameter and a communication protocol corresponding to each service request in the service request sequence; based on the performance degradation parameter, target difference data for the reference version code and the target version code is determined. According to the mode, the difference part of performance degradation caused by the two version codes can be determined, the analysis efficiency of the multiple version codes is improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically, to a method, apparatus, and electronic device for determining version difference data. Background Technology

[0002] In a microservices architecture, it is often necessary to frequently merge third-party code and local code. When the service system implemented through code merging provides services to the outside world, performance regression issues such as a decrease in Queries Per Second (QPS) and a decrease in system response speed may occur.

[0003] In related technologies, application performance management (APM) software can be used to monitor the performance of service systems. However, this software can only monitor the performance at the interface level and is difficult to determine the cause of performance degradation due to code merging. Manual investigation requires capturing flame graphs for each interface and determining the code differences before and after merging, which is time-consuming and inefficient. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for determining version difference data, so as to improve the efficiency of analyzing multiple versions of code and reduce labor costs.

[0005] In a first aspect, embodiments of the present invention provide a method for determining version difference data, the method comprising: acquiring first system operating parameters and second system operating parameters; the first system operating parameters indicating the performance of a first service system generated from a baseline version code in processing each service request in a preset service request sequence; the second system operating parameters indicating the performance of a second service system generated from a target version code in processing each service request in the service request sequence; each service request having a corresponding communication protocol; the operating environment of the first service system being consistent with the operating environment of the second service system; the target version code being generated based on the baseline version code; determining performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence; the performance degradation parameters indicating the performance degradation of the second service system compared to the first service system in processing service requests corresponding to different communication protocols; and determining target difference data between the baseline version code and the target version code based on the performance degradation parameters.

[0006] Secondly, embodiments of the present invention provide an apparatus for determining version difference data; the apparatus includes: a data acquisition module, used to acquire first system operating parameters and second system operating parameters; the first system operating parameters are used to indicate the performance of a first service system generated from a baseline version code in processing each service request in a preset service request sequence; the second system operating parameters are used to indicate the performance of a second service system generated from a target version code in processing each service request in the service request sequence; each service request has a corresponding communication protocol; the operating environment of the first service system is consistent with the operating environment of the second service system; the target version code is generated based on the baseline version code; a degradation parameter determination module, used to determine performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence; the performance degradation parameters are used to indicate the performance degradation of the second service system compared to the first service system in processing service requests corresponding to different communication protocols; and a version difference data determination module, used to determine target difference data between the baseline version code and the target version code based on the performance degradation parameters.

[0007] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for determining version difference data. Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the aforementioned method for determining version difference data.

[0008] The embodiments of the present invention bring the following beneficial effects: The aforementioned method, apparatus, and electronic device for determining version difference data acquire first system operating parameters and second system operating parameters. The first system operating parameters indicate the performance of a first service system generated from a baseline version code in processing each service request in a preset service request sequence. The second system operating parameters indicate the performance of a second service system generated from a target version code in processing each service request in the service request sequence. Each service request has a corresponding communication protocol. The operating environment of the first service system is consistent with that of the second service system. The target version code is generated based on the baseline version code. Based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence, performance degradation parameters are determined. These performance degradation parameters indicate the performance degradation of the second service system compared to the first service system when processing service requests corresponding to different communication protocols. Based on these performance degradation parameters, target difference data between the baseline version code and the target version code is determined. This method forms service systems by running the baseline version code and the target version code respectively, and determines the difference in performance degradation caused by the two version codes based on the operating parameters of the two service systems when processing the same service request sequence. This improves the efficiency of analyzing multiple version codes and reduces labor costs.

[0009] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0011] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a method for determining version difference data provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a device for determining version difference data provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] In microservice architectures, frequent merging of third-party code is common. Merging often results in performance regressions such as decreased QPS and increased P99 (99th Percentile Latency). In related technologies, APM tools only refine to the "interface" granularity, failing to distinguish performance differences caused by different protocols (such as different field combinations or serialization methods) within the same interface. Manual investigation requires capturing flame graphs and pulling code for comparison for each interface, averaging 3-5 person-days, thus lengthening the iteration window. Protocol differences are often hidden in the serialization / deserialization of the Hypertext Preprocessor (PHP), reflection calls, or opcodes in editing software (OPcache), making version code differences difficult to identify visually.

[0015] Based on this, embodiments of the present invention provide a method, apparatus, and electronic device for determining version difference data, which can be applied to scenarios involving version code comparison.

[0016] See Figure 1 First, a method for determining version difference data provided by an embodiment of the present invention will be introduced. This method includes the following steps: Step S102: Obtain the first system operating parameters and the second system operating parameters; the first system operating parameters are used to indicate the performance of the first service system generated from the baseline version code in processing each service request in the preset service request sequence; the second system operating parameters are used to indicate the performance of the second service system generated from the target version code in processing each service request in the service request sequence; each service request has a corresponding communication protocol; the operating environment of the first service system is consistent with the operating environment of the second service system; the target version code is generated based on the baseline version code.

[0017] The aforementioned baseline version code is typically the code released by the code generator (also known as a "third party"). The target version code is generated based on the baseline version code. This can be achieved by modifying the baseline version code, or by merging other code with the baseline version data.

[0018] Running the base version of the code generates the first service system, and running the target version generates the second service system. The first and second service systems can be run separately using different containers. In practice, the Kubernetes Topology Manager can be used to bind virtual CPUs (vCPUs) to the same Non-Uniform Memory Access (NUMA) node and fix the memory bandwidth, ensuring complete consistency in network and data infrastructure, eliminating environmental noise, and reducing environmental drift. Then, different vCPUs are used to run the first and second service systems respectively, ensuring a consistent operating environment for both systems.

[0019] A service request sequence can be pre-generated. This sequence typically includes multiple service requests. These requests may be partially repeated or completely unique. Each service request has a corresponding communication protocol. Service requests corresponding to the same communication protocol share the same interface name, protocol template identifier, field mask, and request parameters. These parameters can be set when generating each service request.

[0020] Service requests from the service request sequence can be sent to both the first and second service systems, allowing them to process the received requests. During the first service system's processing, parameters such as response time, CPU time, and memory allocation are obtained and used as its operating parameters. Similarly, during the second service system's processing, parameters such as response time, CPU time, and memory allocation are obtained and used as its operating parameters.

[0021] Step S104: Based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence, determine the performance degradation parameters; the performance degradation parameters are used to indicate the performance degradation of the second service system compared to the first service system in the process of processing service requests corresponding to different communication protocols.

[0022] To determine the performance degradation at the communication protocol level, the operating parameters of the first service system can be divided into multiple sets of data based on the communication protocol corresponding to the service requests processed by the first service system. This can also be viewed as generating multiple parameter sets. For each set of data, the performance of the first service system in processing service requests can be determined based on the operating parameters of the first system in that set. Specifically, this can include average response time, median response time, average memory allocation, etc. The operating parameters of the second service system can also be processed in the same way to determine the performance of the second service system in processing service requests corresponding to various communication protocols.

[0023] After determining the performance of the first and second service systems in handling service requests corresponding to various communication protocols, a performance degradation parameter of the second service system relative to the first service system can be calculated. For example, for a specific communication protocol, the average response time of the second service system can be subtracted from the average response time of the first service system, and then the result can be divided by the average response time of the first system to obtain the performance degradation parameter corresponding to the average response time. In specific implementations, the calculation method of the performance degradation parameter can be determined according to requirements, and no restrictions are imposed here.

[0024] Step S106: Based on performance degradation parameters, determine the target difference data between the baseline version code and the target version code.

[0025] After determining the performance degradation parameters for each communication protocol, we can use these parameters to judge whether the degree of degradation for each protocol is high. If the degree of degradation is high, we need to identify the code portions in the baseline and target versions that handle that communication protocol.

[0026] When the functions of each code segment in both the baseline and target versions of the code are clearly labeled—for example, if a code segment is used to process a specific communication protocol—the labels in the code can be directly read to determine the code segment corresponding to that protocol. Then, by comparing the code segments corresponding to that communication protocol in the baseline version and the target version, the target difference data can be obtained.

[0027] In practical applications, code functionality is often not annotated, or the accuracy of the annotation is difficult to assess. It's advisable to require each service system to record the opcodes used to process each service request, typically in log form. When it's necessary to determine the code portion corresponding to a specific communication protocol, the opcodes used to process that protocol can be identified from the logs of the first service system. This can then be mapped back to the specific code lines used to generate the base version code of the first service system, thus identifying the code portion in the base version code used to process that communication protocol. The same method can be used to determine the code portion processing the communication protocol for the target version code. By comparing the code portion corresponding to the communication protocol in the baseline version code with the code portion corresponding to the communication protocol in the target version code, target difference data can be obtained.

[0028] Alternatively, the opcodes used by the first service system and the second service system when processing the communication protocol can be compared first. If they match, it can be determined that the corresponding code portions in the base version code and the target version code have not been modified, and there is no need to perform opcode reverse mapping. If they do not match, the method described above for reverse mapping opcodes to codes is used to determine the code portions in the base version code and the target version code corresponding to the communication protocol, thereby determining the target difference data corresponding to the two code portions.

[0029] The aforementioned method for determining version difference data involves acquiring first system operating parameters and second system operating parameters. The first system operating parameters indicate the performance of a first service system generated from a baseline version code during the processing of each service request in a preset service request sequence. The second system operating parameters indicate the performance of a second service system generated from a target version code during the processing of each service request in the service request sequence. Based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence, performance degradation parameters are determined. These performance degradation parameters indicate the performance degradation of the second service system compared to the first service system when processing service requests corresponding to different communication protocols. Based on these performance degradation parameters, target difference data between the baseline version code and the target version code is determined. This method generates service systems by running the baseline version code and the target version code respectively, and determines the performance degradation differences between the two version codes based on the operating parameters of the two service systems when processing the same service request sequence. This improves the efficiency of analyzing multiple version codes and reduces manual costs.

[0030] In one specific embodiment, the service request sequence is generated in the following manner.

[0031] First, multiple service requests need to be generated, also known as "URL requests." Here, URL stands for Uniform Resource Locator. The process of generating multiple service requests is also called assembling the protocol URL, which specifically includes the URL address, interface name, and interface parameters. Service requests can be generated using PHP extensions (such as XHProf / Tideways). PHP (Hypertext Preprocessor) is a widely used open-source server-side scripting language. PHP extensions are plugins used to enhance the functionality of the PHP language; they are modules written in C that extend the core functionality of PHP, improving performance or adding new features.

[0032] While generating service requests, it's also necessary to determine the corresponding protocol feature vector. This protocol feature vector indicates the communication protocol associated with the service request. In practice, for each service request, the interface name, protocol template identifier, field mask, and request parameters need to be obtained. Specifically, the interface name, request parameter names, and parameter value ranges can be obtained from the protocol documentation corresponding to the service request. Based on the interface name, protocol template identifier, field mask, and request parameters, a feature protocol vector is generated for the service request. This feature protocol vector is uniquely determined by a four-tuple formed by the interface name, protocol template identifier (ID), field mask, and request parameters, used to distinguish different payloads within the same interface.

[0033] To obtain the performance of the service system when processing service requests, a performance probe can be registered at the protocol entry point of the service request. This allows the system to obtain performance-related values ​​and write them to the logs after processing the service request.

[0034] In its implementation, xhprof intercepts functions by replacing PHP's function execution table (zend_function). Each PHP function has a corresponding zend_function structure in memory, containing information such as the function's name, parameters, and opcode. xhprof modifies this structure during extension loading, inserting its own hook code. xhprof first saves the original PHP function execution pointer, then replaces it with its own wrapper function. Thus, whenever PHP executes a function, it first enters the xhprof wrapper function. Within the wrapper function, xhprof records the function's entry and exit times, memory changes, and other information, before calling the original function to complete the actual logic.

[0035] xhprof implements the performance data collection logic in the wrapper function, which mainly includes: timestamp recording, specifically using high-precision timing functions such as gethrtime() to record the start and end times of functions; memory monitoring, specifically using functions such as memory_get_usage() to record memory changes; and call chain tracing, specifically using stack backtrace (debug_backtrace()) to record the function call relationship and build a call tree.

[0036] Furthermore, a service request sequence can be determined based on multiple service requests. Multiple service requests can be arranged sequentially according to a specified order (such as generation order or random order) to obtain a service request sequence. Typically, service requests can be sent to two service systems sequentially according to the order of requests in the service request sequence.

[0037] The following embodiments provide a specific method for determining performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocol corresponding to each service request in the service request sequence.

[0038] After obtaining the system operating parameters, it is necessary to determine the performance of each service system in handling service requests corresponding to different communication protocols. The performance of the first service system can be represented by a first performance parameter, and the performance of the second service system can be represented by a second performance parameter.

[0039] In practical applications, it is necessary to determine the first performance parameters corresponding to the first service system based on the first system operating parameters and the communication protocols corresponding to each service request in the service request sequence. The aforementioned first system operating parameters include multiple first sub-operating parameters corresponding to each service request. These first sub-operating parameters indicate the performance of the first service system when processing the service request corresponding to that parameter, such as response speed and memory allocation. The aforementioned first performance parameters include multiple first sub-performance parameters corresponding to each communication protocol, such as average response speed and average memory allocation.

[0040] First, based on the communication protocols of the service requests corresponding to multiple first sub-running parameters, the multiple first sub-running parameters can be divided into multiple first parameter sets; the communication protocols corresponding to the first sub-running parameters in each first parameter set are the same. In specific implementation, the communication protocol of the service request can be represented by a protocol feature vector. A clustering algorithm can be used to cluster the protocol feature vectors corresponding to multiple service requests in the service request sequence, resulting in multiple clusters. Each cluster includes one or more protocol feature vectors. Protocol feature vectors in the same cluster usually correspond to the same communication protocol. For each cluster, a first parameter set corresponding to the cluster is established, and the first sub-running parameters corresponding to the protocol feature vectors in the cluster are assigned to the first parameter set corresponding to the cluster.

[0041] After dividing the first parameter set, for each first parameter set, it is necessary to determine the first sub-performance parameter corresponding to the communication protocol based on the first sub-operational parameter in the first parameter set. For example, if the first sub-performance parameter includes the average response time, all response times in the first parameter set can be added together and then averaged. The result can be used as the parameter value of the first sub-performance parameter.

[0042] In practical implementation, the first sub-performance parameter can be P99 latency. P99 latency (99th Percentile Latency) is a key indicator for measuring system performance, indicating that 99% of request response times are below or equal to this value, and only 1% of requests may exceed this latency. It is used to capture tail latency issues in the worst-case scenario of the system and avoid the misleading nature of average latency.

[0043] The P99 latency can be calculated as follows: First, record the response time of all requests and store this data in an array; then, sort the collected response time data in ascending order; finally, use the formula: Position = (Percentile × Total Number of Data Points) - 1 to determine the P99 position. Here, the percentile is 0.99, and the total number of data points is the number of response time data points collected.

[0044] Furthermore, based on the calculated position, the corresponding data value can be found, which is the P99 delay value. If the calculated position is an integer, the data value at that position is directly taken; if the position is a decimal, the weighted average of two adjacent data points is taken.

[0045] When determining the position of P99 using the above formula, it can be understood as follows: assuming there are n data points and the percentile is p, then the position of P99 is (p×n)−1. This position is based on an index starting from 0.

[0046] Suppose we have 1000 data points and want to find the position of P99. The total number of data points is n = 1000, and the quantile p = 0.99. The position of P99 is calculated as: position = (0.99 × 1000) − 1 = 990 − 1 = 989. Therefore, P99 is located at the 989th position in the sorted data (counting from 0), and the value at this position is the P99 value.

[0047] Similar to the method described above, it is also necessary to determine the second performance parameters corresponding to the second service system based on the second system's operating parameters and the communication protocols corresponding to each service request in the service request sequence. The second performance parameters include multiple second sub-performance parameters corresponding to each communication protocol.

[0048] Furthermore, performance degradation parameters are determined based on the first performance parameter and the second performance parameter. Generally, performance degradation parameters include sub-degradation parameters corresponding to each communication protocol. Sub-degradation parameters need to be determined at the communication protocol level. Specifically, for each communication protocol, the corresponding sub-degradation parameters need to be calculated based on the first and second sub-performance parameters. Sub-degradation parameters can include relative sub-degradation parameters, typically the ratio of the difference between the first and second sub-performance parameters to the first sub-performance parameter; sub-degradation parameters can also include absolute sub-degradation parameters, typically the difference between the first and second sub-performance parameters.

[0049] The following embodiments provide a specific method for determining target difference data between a baseline version code and a target version code based on performance degradation parameters.

[0050] As mentioned above, performance degradation parameters typically include sub-degradation parameters corresponding to each communication protocol. In practical applications, for each sub-degradation parameter corresponding to a communication protocol, it can be determined whether the sub-degradation parameter is greater than or equal to a preset parameter threshold. For example, when the sub-degradation parameter is expressed as a relative value, the parameter threshold can be set to 10%. If the sub-degradation parameter is greater than the parameter threshold, the communication protocols with sub-degradation parameters exceeding 10% and related data are saved to the log to further determine the target difference data between the baseline version code and the target version code for the communication protocol.

[0051] When determining the target differences between two versions of the code for the communication protocol, we can obtain the first log data generated by the first service system during the processing of service requests corresponding to the communication protocol, and the second log data generated by the second service system during the same process. Specifically, we need to read the logs corresponding to protocols where the sub-degradation parameters exceed 10%. Then, we determine the first opcode sequence (also known as the "opcode hotspot basic block") corresponding to the first log data, and the second opcode sequence corresponding to the second log data. In practical applications, we can use the VLD extension in the PHP library to extract the opcode sequence from the logs. This involves using tools such as the php-vld plugin to generate PHP command sequences and obtain the opcodes. Specifically, we need to first install the php-vld extension, and then run `php-dvld.active=1-dvld.execute=0 script.php` via the command line to view the script's opcode information.

[0052] Further, it is necessary to compare the first opcode sequence and the second opcode sequence. First, both opcode sequences need to be analyzed separately to extract key features, such as opcode type and operands. The opcode sequences can also be segmented into multiple parts as needed. A hash algorithm (such as SHA-256) is used to hash the extracted opcode features, obtaining the hash value of each opcode feature. The entire opcode feature sequence is then hashed to obtain its hash value. This generates the first hash feature corresponding to the first opcode sequence and the second hash feature corresponding to the second opcode sequence.

[0053] After determining the first and second hash features, it's necessary to check if they are the same. If they are different, a difference exists between the first and second opcode sequences. Further analysis of the specific differences in the opcode sequences can identify the opcode features that lead to the different hash values, thus revealing the differences in execution logic between the two versions of the code.

[0054] If there is a difference between the first opcode sequence and the second opcode sequence, determine the first code portion in the base version code corresponding to the first opcode sequence, and the second code portion in the target version code corresponding to the second opcode sequence. The first code portion corresponding to the first opcode sequence and the second code portion corresponding to the second opcode sequence can be determined through a reverse mapping mechanism.

[0055] Specifically, you can use `vld` to extend the mapping between example opcodes and source code lines, and view the opcode information of a PHP script via the command line. For example: `php -dvld.active=1 -dvld.execute=0 test.php`. In the output, each opcode is labeled with its corresponding source code line number.

[0056] Furthermore, the first code section and the second code section can be compared to determine the target difference data for the communication protocol.

[0057] This approach provides an automated, protocol-level, and minute-level solution for locating the root causes of performance degradation, significantly shortening the regression testing-repair cycle and directly outputting line-level reports from the source code. In practical applications, this approach reduces the location time from 3 person-days to 14 minutes; through Bayesian shrinkage, the false positive rate is reduced from 12% to 2.3%, and the output can be directly clicked to jump to Gitcommit, enabling zero-cost secondary analysis for developers.

[0058] For the above method embodiments, see Figure 2 An apparatus for determining version difference data is shown, the apparatus comprising: Data acquisition module 202 is used to acquire first system operating parameters and second system operating parameters; the first system operating parameters indicate the performance of the first service system generated from the baseline version code in processing each service request in a preset service request sequence; the second system operating parameters indicate the performance of the second service system generated from the target version code in processing each service request in the service request sequence; each service request has a corresponding communication protocol; the operating environment of the first service system is consistent with the operating environment of the second service system; the target version code is generated based on the baseline version code; The degradation parameter determination module 204 is used to determine performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence; the performance degradation parameters are used to indicate the performance degradation of the second service system compared to the first service system in the process of processing service requests corresponding to different communication protocols. Version difference data determination module 206 is used to determine the target difference data between the baseline version code and the target version code based on performance degradation parameters.

[0059] The aforementioned device for determining version difference data acquires first system operating parameters and second system operating parameters. The first system operating parameters indicate the performance of a first service system generated from a baseline version code in processing each service request in a preset service request sequence. The second system operating parameters indicate the performance of a second service system generated from a target version code in processing each service request in the service request sequence. Each service request has a corresponding communication protocol. The operating environment of the first service system is consistent with that of the second service system. The target version code is generated based on the baseline version code. Based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence, performance degradation parameters are determined. These performance degradation parameters indicate the performance degradation of the second service system compared to the first service system when processing service requests corresponding to different communication protocols. Based on these performance degradation parameters, target difference data between the baseline version code and the target version code is determined. This method forms service systems by running the baseline version code and the target version code respectively, and determines the performance degradation differences caused by the two version codes based on the operating parameters of the two service systems when processing the same service request sequence. This improves the efficiency of analyzing multiple version codes and reduces labor costs.

[0060] The above-mentioned apparatus further includes: a protocol feature vector determination module, used to generate multiple service requests and determine the protocol feature vector corresponding to each service request; the protocol feature vector is used to indicate the communication protocol corresponding to the service request; and a service request sequence determination module, used to determine the service request sequence based on multiple service requests.

[0061] The aforementioned protocol feature vector determination module is also used to: for each service request, obtain the interface name, protocol template identifier, field mask, and request parameters corresponding to the service request; and generate a feature protocol vector corresponding to the service request based on the interface name, protocol template identifier, field mask, and request parameters.

[0062] The aforementioned apparatus also includes a performance probe registration module, used to register performance probes at the protocol entry point of service requests.

[0063] The aforementioned degradation parameter determination module is further configured to: determine a first performance parameter corresponding to the first service system based on the first system operating parameters and the communication protocol corresponding to each service request in the service request sequence; the first performance parameter indicates the performance of the first service system in processing service requests corresponding to different communication protocols; determine a second performance parameter corresponding to the second service system based on the second system operating parameters and the communication protocol corresponding to each service request in the service request sequence; the second performance parameter indicates the performance of the second service system in processing service requests corresponding to different communication protocols; and determine performance degradation parameters based on the first performance parameter and the second performance parameter.

[0064] The aforementioned first system operating parameters include multiple first sub-operating parameters corresponding to each service request; the first performance parameters include multiple first sub-performance parameters corresponding to each communication protocol; the aforementioned degradation parameter determination module is further configured to: divide the multiple first sub-operating parameters into multiple first parameter sets based on the communication protocols of the service requests corresponding to the multiple first sub-operating parameters; the communication protocols corresponding to the first sub-operating parameters in each first parameter set are the same; for each first parameter set, determine the first sub-performance parameters corresponding to the communication protocols of the first parameter set based on the first sub-operating parameters in the first parameter set.

[0065] The communication protocol of the above service request is represented by a protocol feature vector; the above degradation parameter determination module is also used to: use a clustering algorithm to cluster the protocol feature vectors corresponding to multiple service requests in the service request sequence to obtain multiple clusters; each cluster includes at least one protocol feature vector; for each cluster, establish a first parameter set corresponding to the cluster, and divide the first sub-running parameters corresponding to the protocol feature vectors in the cluster into the first parameter set corresponding to the cluster.

[0066] The aforementioned first performance parameter includes multiple first sub-performance parameters corresponding to each communication protocol; the second performance parameter includes multiple second sub-performance parameters corresponding to each communication protocol; the performance degradation parameter includes sub-degradation parameters corresponding to each communication protocol; the aforementioned degradation parameter determination module is further configured to: for each communication protocol, calculate the sub-degradation parameter corresponding to the communication protocol based on the first sub-performance parameters and second sub-performance parameters corresponding to the communication protocol.

[0067] The aforementioned performance degradation parameters include sub-degradation parameters corresponding to each communication protocol; the version difference data determination module is also used to: determine whether the sub-degradation parameter corresponding to each communication protocol is greater than or equal to a preset parameter threshold; if so, determine the target difference data of the base version code and the target version code for the communication protocol.

[0068] The aforementioned version difference data determination module is further configured to: acquire first log data generated by the first service system during the processing of service requests corresponding to the communication protocol, and second log data generated by the second service system during the processing of service requests corresponding to the communication protocol; determine the first opcode sequence corresponding to the first log data, and the second opcode sequence corresponding to the second log data; compare the first opcode sequence and the second opcode sequence; if there is a difference between the first opcode sequence and the second opcode sequence, determine the first code portion in the baseline version code corresponding to the first opcode sequence, and the second code portion in the target version code corresponding to the second opcode sequence; and determine the target difference data for the communication protocol based on the first code portion and the second code portion.

[0069] The aforementioned version difference data determination module is also used to: generate a first hash feature corresponding to the first opcode sequence and a second hash feature corresponding to the second opcode sequence; determine whether the first hash feature and the second hash feature are the same; if they are different, determine that there is a difference between the first opcode sequence and the second opcode sequence.

[0070] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-mentioned method for determining version difference data, for example: Obtain the operating parameters of the first system and the second system. The first system operating parameters indicate the performance of the first service system, generated from the baseline version code, in processing each service request in a preset service request sequence. The second system operating parameters indicate the performance of the second service system, generated from the target version code, in processing each service request in the service request sequence. Each service request has a corresponding communication protocol. The operating environment of the first service system is consistent with that of the second service system. The target version code is generated based on the baseline version code. Based on the operating parameters of the first system, the second system, and the communication protocols corresponding to each service request in the service request sequence, determine the performance degradation parameters. The performance degradation parameters indicate the performance degradation of the second service system compared to the first service system in processing service requests corresponding to different communication protocols. Based on the performance degradation parameters, determine the target difference data between the baseline version code and the target version code.

[0071] The above method forms service systems by running a baseline version of the code and a target version of the code, and then determines the differences in performance degradation caused by the two versions of the code based on the running parameters of the two service systems when processing the same service request sequence. This improves the efficiency of analyzing multiple versions of the code and reduces manual costs.

[0072] Optionally, the above method further includes: generating multiple service requests and determining the protocol feature vector corresponding to each service request; the protocol feature vector is used to indicate the communication protocol corresponding to the service request; and determining a service request sequence based on the multiple service requests.

[0073] Optionally, the steps for determining the protocol feature vector corresponding to each service request include: for each service request, obtaining the interface name, protocol template identifier, field mask, and request parameters corresponding to the service request; and generating the feature protocol vector corresponding to the service request based on the interface name, protocol template identifier, field mask, and request parameters.

[0074] Optionally, the above method also includes: registering a performance probe at the protocol entry point of the service request.

[0075] Optionally, the step of determining performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence includes: determining a first performance parameter corresponding to the first service system based on the first system operating parameters and the communication protocols corresponding to each service request in the service request sequence; the first performance parameter indicates the performance of the first service system in processing service requests corresponding to different communication protocols; determining a second performance parameter corresponding to the second service system based on the second system operating parameters and the communication protocols corresponding to each service request in the service request sequence; the second performance parameter indicates the performance of the second service system in processing service requests corresponding to different communication protocols; and determining performance degradation parameters based on the first and second performance parameters.

[0076] Optionally, the aforementioned first system operating parameters include multiple first sub-operating parameters corresponding to each service request; the first performance parameters include multiple first sub-performance parameters corresponding to each communication protocol; the step of determining the first performance parameter corresponding to the first service system based on the first system operating parameters and the communication protocol corresponding to each service request in the service request sequence includes: dividing the multiple first sub-operating parameters into multiple first parameter sets based on the communication protocol of the service requests corresponding to the multiple first sub-operating parameters; the communication protocol corresponding to the first sub-operating parameters in each first parameter set is the same; for each first parameter set, determining the first sub-performance parameter corresponding to the communication protocol of the first parameter set based on the first sub-operating parameters in the first parameter set.

[0077] Optionally, the communication protocol of the above service request is represented by a protocol feature vector; the step of dividing the multiple first sub-running parameters into multiple first parameter sets based on the communication protocol of the service request corresponding to multiple first sub-running parameters includes: using a clustering algorithm to cluster the protocol feature vectors corresponding to multiple service requests in the service request sequence to obtain multiple clusters; each cluster includes at least one protocol feature vector; for each cluster, establish a first parameter set corresponding to the cluster, and divide the first sub-running parameters corresponding to the protocol feature vectors in the cluster into the first parameter set corresponding to the cluster.

[0078] Optionally, the first performance parameter includes multiple first sub-performance parameters corresponding to each communication protocol; the second performance parameter includes multiple second sub-performance parameters corresponding to each communication protocol; the performance degradation parameter includes sub-degradation parameters corresponding to each communication protocol; the step of determining the performance degradation parameter based on the first performance parameter and the second performance parameter includes: for each communication protocol, calculating the sub-degradation parameter corresponding to the communication protocol based on the first sub-performance parameter and the second sub-performance parameter corresponding to the communication protocol.

[0079] Optionally, the aforementioned performance degradation parameters include sub-degradation parameters corresponding to each communication protocol; the step of determining the target difference data between the baseline version code and the target version code based on the performance degradation parameters includes: for each sub-degradation parameter corresponding to the communication protocol, determining whether the sub-degradation parameter is greater than or equal to a preset parameter threshold; if so, determining the target difference data between the baseline version code and the target version code for the communication protocol.

[0080] Optionally, the steps described above for determining the target difference data of the baseline version code and the target version code for the communication protocol include: obtaining first log data generated by the first service system during the processing of service requests corresponding to the communication protocol, and second log data generated by the second service system during the processing of service requests corresponding to the communication protocol; determining the first opcode sequence corresponding to the first log data, and the second opcode sequence corresponding to the second log data; comparing the first opcode sequence and the second opcode sequence; if there is a difference between the first opcode sequence and the second opcode sequence, determining the first code portion in the baseline version code corresponding to the first opcode sequence, and the second code portion in the target version code corresponding to the second opcode sequence; and determining the target difference data for the communication protocol based on the first code portion and the second code portion.

[0081] Optionally, the step of comparing the first opcode sequence and the second opcode sequence includes: generating a first hash feature corresponding to the first opcode sequence and a second hash feature corresponding to the second opcode sequence; determining whether the first hash feature and the second hash feature are the same; if they are different, determining that there is a difference between the first opcode sequence and the second opcode sequence.

[0082] See Figure 3 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the method for determining the version difference data described above.

[0083] Furthermore, Figure 3 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.

[0084] The memory 101 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0085] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams of the invention in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method invented in conjunction with the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0086] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-mentioned method for determining version difference data.

[0087] The present invention provides a method, apparatus, and electronic device for determining version difference data, comprising a computer-readable storage medium storing program code, wherein the program code includes instructions that can be used to execute the methods described in the preceding method embodiments, for example: Obtain the operating parameters of the first system and the second system. The first system operating parameters indicate the performance of the first service system, generated from the baseline version code, in processing each service request in a preset service request sequence. The second system operating parameters indicate the performance of the second service system, generated from the target version code, in processing each service request in the service request sequence. Each service request has a corresponding communication protocol. The operating environment of the first service system is consistent with that of the second service system. The target version code is generated based on the baseline version code. Based on the operating parameters of the first system, the second system, and the communication protocols corresponding to each service request in the service request sequence, determine the performance degradation parameters. The performance degradation parameters indicate the performance degradation of the second service system compared to the first service system in processing service requests corresponding to different communication protocols. Based on the performance degradation parameters, determine the target difference data between the baseline version code and the target version code.

[0088] The above method forms service systems by running a baseline version of the code and a target version of the code, and then determines the differences in performance degradation caused by the two versions of the code based on the running parameters of the two service systems when processing the same service request sequence. This improves the efficiency of analyzing multiple versions of the code and reduces manual costs.

[0089] Optionally, the above method further includes: generating multiple service requests and determining the protocol feature vector corresponding to each service request; the protocol feature vector is used to indicate the communication protocol corresponding to the service request; and determining a service request sequence based on the multiple service requests.

[0090] Optionally, the steps for determining the protocol feature vector corresponding to each service request include: for each service request, obtaining the interface name, protocol template identifier, field mask, and request parameters corresponding to the service request; and generating the feature protocol vector corresponding to the service request based on the interface name, protocol template identifier, field mask, and request parameters.

[0091] Optionally, the above method also includes: registering a performance probe at the protocol entry point of the service request.

[0092] Optionally, the step of determining performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence includes: determining a first performance parameter corresponding to the first service system based on the first system operating parameters and the communication protocols corresponding to each service request in the service request sequence; the first performance parameter indicates the performance of the first service system in processing service requests corresponding to different communication protocols; determining a second performance parameter corresponding to the second service system based on the second system operating parameters and the communication protocols corresponding to each service request in the service request sequence; the second performance parameter indicates the performance of the second service system in processing service requests corresponding to different communication protocols; and determining performance degradation parameters based on the first and second performance parameters.

[0093] Optionally, the aforementioned first system operating parameters include multiple first sub-operating parameters corresponding to each service request; the first performance parameters include multiple first sub-performance parameters corresponding to each communication protocol; the step of determining the first performance parameter corresponding to the first service system based on the first system operating parameters and the communication protocol corresponding to each service request in the service request sequence includes: dividing the multiple first sub-operating parameters into multiple first parameter sets based on the communication protocol of the service requests corresponding to the multiple first sub-operating parameters; the communication protocol corresponding to the first sub-operating parameters in each first parameter set is the same; for each first parameter set, determining the first sub-performance parameter corresponding to the communication protocol of the first parameter set based on the first sub-operating parameters in the first parameter set.

[0094] Optionally, the communication protocol of the above service request is represented by a protocol feature vector; the step of dividing the multiple first sub-running parameters into multiple first parameter sets based on the communication protocol of the service request corresponding to multiple first sub-running parameters includes: using a clustering algorithm to cluster the protocol feature vectors corresponding to multiple service requests in the service request sequence to obtain multiple clusters; each cluster includes at least one protocol feature vector; for each cluster, establish a first parameter set corresponding to the cluster, and divide the first sub-running parameters corresponding to the protocol feature vectors in the cluster into the first parameter set corresponding to the cluster.

[0095] Optionally, the first performance parameter includes multiple first sub-performance parameters corresponding to each communication protocol; the second performance parameter includes multiple second sub-performance parameters corresponding to each communication protocol; the performance degradation parameter includes sub-degradation parameters corresponding to each communication protocol; the step of determining the performance degradation parameter based on the first performance parameter and the second performance parameter includes: for each communication protocol, calculating the sub-degradation parameter corresponding to the communication protocol based on the first sub-performance parameter and the second sub-performance parameter corresponding to the communication protocol.

[0096] Optionally, the aforementioned performance degradation parameters include sub-degradation parameters corresponding to each communication protocol; the step of determining the target difference data between the baseline version code and the target version code based on the performance degradation parameters includes: for each sub-degradation parameter corresponding to the communication protocol, determining whether the sub-degradation parameter is greater than or equal to a preset parameter threshold; if so, determining the target difference data between the baseline version code and the target version code for the communication protocol.

[0097] Optionally, the steps described above for determining the target difference data of the baseline version code and the target version code for the communication protocol include: obtaining first log data generated by the first service system during the processing of service requests corresponding to the communication protocol, and second log data generated by the second service system during the processing of service requests corresponding to the communication protocol; determining the first opcode sequence corresponding to the first log data, and the second opcode sequence corresponding to the second log data; comparing the first opcode sequence and the second opcode sequence; if there is a difference between the first opcode sequence and the second opcode sequence, determining the first code portion in the baseline version code corresponding to the first opcode sequence, and the second code portion in the target version code corresponding to the second opcode sequence; and determining the target difference data for the communication protocol based on the first code portion and the second code portion.

[0098] Optionally, the step of comparing the first opcode sequence and the second opcode sequence includes: generating a first hash feature corresponding to the first opcode sequence and a second hash feature corresponding to the second opcode sequence; determining whether the first hash feature and the second hash feature are the same; if they are different, determining that there is a difference between the first opcode sequence and the second opcode sequence.

[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0100] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0101] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0102] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0103] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for determining version difference data, characterized in that, The method includes: Obtain first system operating parameters and second system operating parameters; the first system operating parameters indicate the performance of the first service system generated from the baseline version code in processing each service request in a preset service request sequence; the second system operating parameters indicate the performance of the second service system generated from the target version code in processing each service request in the service request sequence; each service request has a corresponding communication protocol; the operating environment of the first service system is consistent with the operating environment of the second service system; the target version code is generated based on the baseline version code; Based on the operating parameters of the first system, the operating parameters of the second system, and the communication protocols corresponding to each service request in the service request sequence, performance degradation parameters are determined; the performance degradation parameters are used to indicate the performance degradation of the second service system compared to the first service system when processing service requests corresponding to different communication protocols. Based on the performance degradation parameters, the target difference data between the baseline version code and the target version code is determined.

2. The method according to claim 1, characterized in that, The method further includes: Multiple service requests are generated, and a protocol feature vector corresponding to each service request is determined; the protocol feature vector is used to indicate the communication protocol corresponding to the service request. Based on the multiple service requests, a service request sequence is determined.

3. The method according to claim 2, characterized in that, The steps for determining the protocol feature vector corresponding to each of the aforementioned service requests include: For each of the service requests, obtain the interface name, protocol template identifier, field mask, and request parameters corresponding to the service request; Based on the interface name, the protocol template identifier, the field mask, and the request parameters, a feature protocol vector corresponding to the service request is generated.

4. The method according to claim 2, characterized in that, The method further includes: Register a performance probe at the protocol entry point of the service request.

5. The method according to claim 1, characterized in that, The step of determining performance degradation parameters based on the first system operating parameters, the second system operating parameters, and the communication protocols corresponding to each service request in the service request sequence includes: Based on the operating parameters of the first system and the communication protocols corresponding to each service request in the service request sequence, a first performance parameter corresponding to the first service system is determined; the first performance parameter is used to indicate the performance of the first service system in the process of processing service requests corresponding to different communication protocols. Based on the operating parameters of the second system and the communication protocol corresponding to each service request in the service request sequence, a second performance parameter corresponding to the second service system is determined; the second performance parameter is used to indicate the performance of the second service system in processing service requests corresponding to different communication protocols. Based on the first performance parameter and the second performance parameter, the performance degradation parameter is determined.

6. The method according to claim 5, characterized in that, The first system operating parameters include multiple first sub-operating parameters corresponding to each service request; the first performance parameters include multiple first sub-performance parameters corresponding to each communication protocol. The step of determining the first performance parameter corresponding to the first service system based on the first system operating parameters and the communication protocol corresponding to each service request in the service request sequence includes: Based on the communication protocol of the service requests corresponding to the plurality of first sub-running parameters, the plurality of first sub-running parameters are divided into a plurality of first parameter sets; the communication protocol corresponding to the first sub-running parameters in each first parameter set is the same; For each of the first parameter sets, based on the first sub-operational parameters in the first parameter set, determine the first sub-performance parameter corresponding to the communication protocol of the first parameter set.

7. The method according to claim 6, characterized in that, The communication protocol of the service request is represented by a protocol feature vector; The step of dividing the multiple first sub-running parameters into multiple first parameter sets based on the communication protocol of the service requests corresponding to the multiple first sub-running parameters includes: A clustering algorithm is used to cluster the protocol feature vectors corresponding to multiple service requests in the service request sequence to obtain multiple clusters; each cluster includes at least one protocol feature vector. For each cluster, a first parameter set corresponding to the cluster is established, and the first sub-running parameters corresponding to the protocol feature vectors in the cluster are assigned to the first parameter set corresponding to the cluster.

8. The method according to claim 5, characterized in that, The first performance parameter includes multiple first sub-performance parameters corresponding to each communication protocol; the second performance parameter includes multiple second sub-performance parameters corresponding to each communication protocol; the performance degradation parameter includes sub-degradation parameters corresponding to each communication protocol. The step of determining the performance degradation parameter based on the first performance parameter and the second performance parameter includes: For each of the communication protocols, a sub-degradation parameter corresponding to the communication protocol is calculated based on the first sub-performance parameter and the second sub-performance parameter corresponding to the communication protocol.

9. The method according to claim 1, characterized in that, The performance degradation parameters include sub-degradation parameters corresponding to each communication protocol; The step of determining the target difference data between the baseline version code and the target version code based on the performance degradation parameters includes: For each communication protocol, determine whether the sub-degradation parameter is greater than or equal to a preset parameter threshold. If so, determine the target difference data between the baseline version code and the target version code for the communication protocol.

10. The method according to claim 9, characterized in that, The step of determining the target difference data between the baseline version code and the target version code for the communication protocol includes: Obtain first log data generated by the first service system during the process of processing the service request corresponding to the communication protocol, and second log data generated by the second service system during the process of processing the service request corresponding to the communication protocol; Determine the first opcode sequence corresponding to the first log data, and the second opcode sequence corresponding to the second log data; Compare the first opcode sequence and the second opcode sequence; If there is a difference between the first opcode sequence and the second opcode sequence, determine the first code portion in the baseline version code corresponding to the first opcode sequence, and the second code portion in the target version code corresponding to the second opcode sequence; Based on the first code portion and the second code portion, target difference data for the communication protocol is determined.

11. The method according to claim 10, characterized in that, The step of comparing the first opcode sequence and the second opcode sequence includes: Generate a first hash feature corresponding to the first opcode sequence and a second hash feature corresponding to the second opcode sequence; Determine whether the first hash feature is the same as the second hash feature; If they are different, it is determined that there is a difference between the first opcode sequence and the second opcode sequence.

12. A device for determining version difference data, characterized in that, The device includes: The data acquisition module is used to acquire first system operating parameters and second system operating parameters; the first system operating parameters indicate the performance of the first service system generated from the baseline version code in processing each service request in a preset service request sequence; the second system operating parameters indicate the performance of the second service system generated from the target version code in processing each service request in the service request sequence; each service request has a corresponding communication protocol; the operating environment of the first service system is consistent with the operating environment of the second service system; the target version code is generated based on the baseline version code; The degradation parameter determination module is used to determine performance degradation parameters based on the operating parameters of the first system, the operating parameters of the second system, and the communication protocols corresponding to each service request in the service request sequence; the performance degradation parameters are used to indicate the performance degradation of the second service system compared to the first service system when processing service requests corresponding to different communication protocols. The version difference data determination module is used to determine the target difference data between the baseline version code and the target version code based on the performance degradation parameters.

13. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method for determining version difference data as described in any one of claims 1-11.

14. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for determining version difference data as described in any one of claims 1-11.