Search

CN-121996284-A - Method and device for determining version difference data and electronic equipment

CN121996284ACN 121996284 ACN121996284 ACN 121996284ACN-121996284-A

Abstract

The invention provides a method and a device for determining version difference data and electronic equipment, wherein the method and the device are used for acquiring 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 a reference version code in the process of processing each service request in a preset service request sequence and the performance of a second service system generated by a target version code in the process of processing each service request in the service request sequence, determining performance degradation parameters based on the first system operation parameter, the second system operation parameter and communication protocols corresponding to each service request in the service request sequence, and determining target difference data of the reference version code and the target version code based on the performance degradation parameters. The method can determine the difference part of performance degradation caused by the two version codes, improves the analysis efficiency of the plurality of version codes and reduces the labor cost.

Inventors

  • Yuan Yelin
  • Dai changyuan
  • SiTu Guanchen
  • WANG YAN
  • LIU HUAHONG
  • Zheng Tingjie

Assignees

  • 网易(杭州)网络有限公司

Dates

Publication Date
20260508
Application Date
20251217

Claims (14)

  1. 1. A method for determining version difference data, the method comprising: The method comprises the steps of obtaining a first system operation parameter and a second system operation parameter, wherein the first system operation parameter is used for indicating the performance of a first service system generated by a reference version code in the process of processing each service request in a preset service request sequence, the second system operation parameter is used for indicating the performance of a second service system generated by a target version code in the process of processing each service request in the service request sequence, each service request has a corresponding communication protocol, the operation environment of the first service system is consistent with the operation environment of the second service system, and the target version code is generated based on the reference version code; Determining performance degradation parameters based on the first system operation parameters, the second system operation parameters and communication protocols corresponding to the service requests in the service request sequence, wherein the performance degradation parameters are used for indicating performance degradation conditions of the second service system in the process of processing the service requests corresponding to different communication protocols compared with those of the first service system; and determining target difference data of the reference version code and the target version code based on the performance degradation parameter.
  2. 2. The method according to claim 1, wherein the method further comprises: generating a plurality of service requests, and determining protocol feature vectors corresponding to the service requests, wherein the protocol feature vectors are used for indicating communication protocols corresponding to the service requests; Based on the plurality of service requests, a sequence of service requests is determined.
  3. 3. The method of claim 2, wherein the step of determining a protocol feature vector for each of the service requests comprises: For each service request, acquiring an interface name, a protocol template identifier, a field mask and a request parameter corresponding to the service request; And generating a characteristic protocol vector corresponding to the service request based on the interface name, the protocol template identifier, the field mask and the request parameter.
  4. 4. The method according to claim 2, wherein the method further comprises: Registering a performance probe at a protocol entry of the service request.
  5. 5. The method of claim 1, wherein the step of determining the performance degradation parameter based on the first system operating parameter, the second system operating parameter, and a communication protocol corresponding to each service request in the sequence of service requests comprises: determining a first performance parameter corresponding to the first service system based on the first system operation parameter and communication protocols corresponding to the service requests in the service request sequence, wherein the first performance parameter is used for indicating the performance of the first service system in the process of processing the service requests corresponding to different communication protocols; determining a second performance parameter corresponding to the second service system based on the second system operation parameter and communication protocols corresponding to the service requests in the service request sequence, wherein the second performance parameter is used for indicating the performance of the second service system in the process of processing the service requests corresponding to different communication protocols; a performance degradation parameter is determined based on the first performance parameter and the second performance parameter.
  6. 6. The method of claim 5, wherein the first system operating parameters comprise a plurality of first sub-operating parameters corresponding to each service request, and wherein the first performance parameters comprise a plurality of first sub-performance parameters corresponding to each communication protocol; Based on the first system operation parameter and the communication protocol corresponding to each service request in the service request sequence, determining a first performance parameter corresponding to the first service system includes: Dividing the plurality of first sub-operation parameters into a plurality of first parameter sets based on the communication protocol of the service request corresponding to the plurality of first sub-operation parameters, wherein the communication protocol corresponding to the first sub-operation parameters in each first parameter set is the same; For each first parameter set, determining a first sub-performance parameter corresponding to a communication protocol corresponding to the first parameter set based on a first sub-operation parameter in the first parameter set.
  7. 7. The method of claim 6, wherein the communication protocol of the service request is represented by a protocol feature vector; The step of dividing the plurality of first sub-operation parameters into a plurality of first parameter sets based on a communication protocol of a service request corresponding to the plurality of first sub-operation parameters includes: clustering protocol feature vectors corresponding to a plurality of service requests in the service request sequence by adopting a clustering algorithm to obtain a plurality of clusters, wherein each cluster comprises at least one protocol feature vector; And establishing a first parameter set corresponding to each cluster, and dividing a first sub-operation parameter corresponding to the protocol feature vector in the cluster into the first parameter set corresponding to the cluster.
  8. 8. The method of claim 5, wherein the first performance parameter comprises a plurality of first sub-performance parameters corresponding to each communication protocol, wherein the second performance parameter comprises a plurality of second sub-performance parameters corresponding to each communication protocol, and wherein the performance degradation parameter comprises a sub-degradation parameter corresponding to each communication protocol; A step of determining a performance degradation parameter based on the first performance parameter and the second performance parameter, comprising: And calculating sub-degradation parameters corresponding to the communication protocols based on the first sub-performance parameters and the second sub-performance parameters corresponding to the communication protocols for each communication protocol.
  9. 9. The method of claim 1, wherein the performance degradation parameters include sub-degradation parameters corresponding to each communication protocol; a step of determining target difference data of the reference version code and the target version code based on the performance degradation parameter, comprising: judging whether the sub-degradation parameters are larger than or equal to a preset parameter threshold or not according to the sub-degradation parameters corresponding to each communication protocol; if so, determining target difference data of the reference version code and the target version code for the communication protocol.
  10. 10. The method of claim 9, wherein the step of determining target differential data for the communication protocol for the reference version code and the target version code comprises: Acquiring first log data generated by the first service system in the process of processing the service request corresponding to the communication protocol, and second log data generated by the second service system in the process of processing the service request corresponding to the communication protocol; Determining a first operation code sequence corresponding to the first log data and a second operation code sequence corresponding to the second log data; comparing the first and second operation code sequences; Determining a first code portion of the reference version code corresponding to the first operation code sequence and a second code portion of the target version code corresponding to the second operation code sequence if there is a difference between the first operation code sequence and the second operation code sequence; Target differential data for the communication protocol is determined based on the first code portion and the second code portion.
  11. 11. The method of claim 10, wherein the step of comparing the first and second operation code sequences comprises: generating a first hash feature corresponding to the first operation code sequence and a second hash feature corresponding to the second operation code sequence; judging whether the first hash characteristic is the same as the second hash characteristic; if so, a difference is determined between the first and second operation code sequences.
  12. 12. A device for determining version difference data, the device comprising: The system comprises a data acquisition module, a data acquisition module and a target version code, wherein the data acquisition module is used for acquiring a first system operation parameter and a second system operation parameter, the first system operation parameter is 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 second system operation parameter is used for indicating the performance of a second service system generated by the target version code in the process of processing each service request in the service request sequence, each service request has a corresponding communication protocol, the operation environment of the first service system is consistent with the operation environment of the second service system, and the target version code is generated based on the reference version code; The system comprises a degradation parameter determining module, a performance degradation parameter determining module and a processing module, wherein the degradation parameter determining module is used for determining a performance degradation parameter based on the first system operation parameter, the second system operation parameter and communication protocols corresponding to all service requests in the service request sequence; and the version difference data determining module is used for determining target difference data of the reference version code and the target version code based on the performance degradation parameter.
  13. 13. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the method of determining version difference data of any one of claims 1-11.
  14. 14. A machine-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of determining version difference data as claimed in any one of claims 1 to 11.

Description

Method and device for determining version difference data and electronic equipment Technical Field The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for determining version difference data, and an electronic device. Background Under a micro-service architecture, it is often necessary to frequently merge third party code and native code. When the service system realized after the combination of codes provides service to the outside, performance rollback problems such as reduced query rate per second (Queries Per Second, abbreviated as QPS) and reduced system response speed can occur. In the related art, performance of a service system may be monitored by applying performance monitoring software (Application Performance Management, abbreviated as APM). However, the software can only monitor the performance of the interface layer, and it is difficult to determine the cause of the performance degradation caused by the code merging. By adopting a manual investigation mode, flame patterns need to be grabbed by interfaces one by one, code differences before and after combination are determined, time consumption is long, and efficiency is low. Disclosure of Invention Accordingly, the present invention is directed to a method and apparatus for determining version difference data, and an electronic device, so as to improve analysis efficiency of multiple version codes and reduce labor cost. In a first aspect, an embodiment of the present invention provides a method for determining version difference data, where the method includes obtaining a first system operation parameter and a second system operation parameter, where the first system operation parameter is used to indicate performance of a first service system generated by a reference version code in processing service requests in a preset service request sequence, the second system operation parameter is used to indicate performance of a second service system generated by a target version code in processing service requests in the service request sequence, each service request has a corresponding communication protocol, an operation environment of the first service system is consistent with an operation environment of the second service system, the target version code is generated based on the reference version code, a performance degradation parameter is determined 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, and the performance degradation parameter is used to indicate performance degradation of the second service system in processing service requests corresponding to different communication protocols compared with the first service system, and the target difference data of the reference version code and the target version code is determined based on the performance degradation parameter. In a second aspect, the embodiment of the invention provides a device for determining version difference data, which comprises a data acquisition module, a degradation parameter determination module and a version difference data determination module, wherein the data acquisition module is used for acquiring first system operation parameters and second system operation parameters, the first system operation parameters are used for indicating performances of a first service system generated by a reference version code in a process of processing service requests in a preset service request sequence, the second system operation parameters are used for indicating performances of a second service system generated by a target version code in a process of processing service requests in the service request sequence, each service request has a corresponding communication protocol, the operation environment of the first service system is consistent with that of the second service system, the target version code is generated based on the reference version code, the degradation parameter determination module is used for determining performance degradation parameters based on the first system operation parameters, the second system operation parameters and communication protocols corresponding to the service requests in the service request sequence, and the performance degradation parameters are used for indicating performance degradation conditions of the second service system in the process of processing service requests corresponding to different communication protocols compared with the first service system, and the version difference data determination module is used for determining the version difference data based on the performance degradation parameters and the target version difference data. In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory stores machine executable instructions