Search

CN-122019272-A - Service transformation verification method and device and related equipment thereof

CN122019272ACN 122019272 ACN122019272 ACN 122019272ACN-122019272-A

Abstract

The embodiment of the application provides a service transformation verification method, a service transformation verification device and related equipment. In the embodiment of the application, the service access of the call request can be obtained in response to the call request of the application layer to the original service, the call of the micro service corresponding to the original service is initiated asynchronously by using the service access according to the mapping relation between the pre-configured original service and the micro service, the call return result of the original service and the micro service is received and recorded, the call return result of the original service is returned to the application layer for the application layer to continuously process the call request of the original service, and the call return result of the original service and the call return result of the micro service are compared according to the matching rule for judging the logical consistency between services so as to output the comparison result of the call return result of the original service and the call return result of the micro service and serve as the verification result of service transformation.

Inventors

  • SONG ZHAOZHAO
  • LI ZHIGUO
  • FANG RUI
  • HUANG JINZUO
  • ZHANG JUGUANG

Assignees

  • 中国移动通信集团河北有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20251230

Claims (10)

  1. 1.A service transformation verification method, comprising: Responding to a call request of an application layer to an original service, acquiring a business entry of the call request, and asynchronously initiating the call of a micro service corresponding to the original service by using the business entry according to a mapping relation between the pre-configured original service and the micro service; receiving and recording the calling return results of the original service and the micro service, and returning the calling return results of the original service to the application layer so that the application layer can continuously process the calling request of the original service; And comparing the calling return result of the original service with the calling return result of the micro service according to a matching rule for judging the logic consistency between services, so as to output the comparison result of the logic consistency of the calling return result of the original service and the calling return result of the micro service, and taking the comparison result as a verification result of service transformation.
  2. 2. The method of claim 1, wherein asynchronously initiating the call for the micro-service corresponding to the original service using the business participation according to the mapping relation between the pre-configured original service and the micro-service comprises: Determining an interface definition of a target micro-service corresponding to the original service based on the mapping relation; According to the interface definition, the business entry parameters are assembled into micro-service entry parameters which accord with the target micro-service calling format in an adapting mode; and initiating a call to the target micro-service through an asynchronous call framework by using the micro-service entry.
  3. 3. The method of claim 1, wherein the matching rules comprise at least one of: returning code consistency comparison rules; Mapping and equivalence comparison rules of key service fields; compatibility comparison rules for data formats.
  4. 4. The method of claim 3, wherein the mapping and equivalence comparison rules for critical traffic fields are performed by a pre-configured field mapping table defining a mapping relationship between fields in the returned results of the original service and corresponding fields in the returned results of the micro service.
  5. 5. The method of claim 1, wherein the matching rules further support at least one of: Setting an allowable error range for comparison of the numerical value fields; performing standardized format conversion on the timestamp field, and then comparing; predefined, non-critical auxiliary fields are ignored in the alignment.
  6. 6. The method of claim 1, wherein the method further comprises: according to a pre-configured service list to be verified and an execution plan, initiating a call request for one or more original services to trigger and complete the verification process corresponding to each service to be verified in the list; and acquiring the verification result, and when the task with verification failure is identified, automatically restarting and executing a corresponding verification process according to a preset retry strategy.
  7. 7. A service transformation verification apparatus, comprising: The asynchronous call module is used for responding to a call request of an application layer to an original service, acquiring a business entry of the call request, and asynchronously initiating call of a micro service corresponding to the original service by using the business entry according to a mapping relation between the pre-configured original service and the micro service; The log recording module is used for receiving and recording the calling return results of the original service and the micro service, and returning the calling return results of the original service to the application layer so that the application layer can continuously process the calling request of the original service; And the service verification module is used for comparing the calling return result of the original service with the calling return result of the micro service according to a matching rule for judging the logic consistency among the services so as to output a comparison result of the logic consistency of the calling return result of the original service and the calling return result of the micro service and serve as a verification result of service transformation.
  8. 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method according to any one of claims 1 to 6.
  9. 9. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps in the method according to any of claims 1 to 6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1 to 6.

Description

Service transformation verification method and device and related equipment thereof Technical Field The present application relates to the field of information technologies, and in particular, to a service transformation verification method and apparatus, and related devices. Background As enterprise informatization systems change to micro-service architecture, original single or centralized services need to be gradually transformed into independent and independently deployable micro-services. In the process, how to ensure that the micro service and the original service are consistent in aspects of business logic, data processing, interface response and the like becomes a key technical challenge for ensuring the smooth transition of the system. At present, the common micro-service transformation verification method mainly relies on manual execution of coverage test of key service scenes. After passing the multi-round verification, the manual comparison is carried out to determine whether the business flow, the data warehouse-in and the business logic of the micro service are consistent with those of the original service. If a discrepancy is found, the service codes are further compared to determine a modification point. In addition, some prior art adopts a log acquisition and forwarding mechanism, such as by configuring a log output format and pushing the log to a designated server for subsequent processing, so as to realize monitoring and problem positioning of the running state of the micro-service. The prior art has the following defects that firstly, verification is only carried out on key businesses, all the services are difficult to cover, the risk of missing verification exists, secondly, manual comparison is relied on, the efficiency is low, the experience is easy to influence, the development rhythm of quick iteration is difficult to adapt, thirdly, a systematic and automatic verification mechanism is lacking, batch, repeated and non-perception automatic verification cannot be realized, and the micro-service transformation period is long, the cost is high, and the quality is difficult to guarantee. Disclosure of Invention The application provides a service transformation verification method, device and equipment, which are used for solving the problems of incomplete verification coverage, low efficiency and dependence on manpower in the prior art by realizing full-quantity, automatic and high-accuracy logic consistency verification of micro-service transformation on the premise of not influencing on-line service. The embodiment of the application provides a service transformation verification method, which comprises the following steps: Responding to a call request of an application layer to an original service, acquiring a business entry of the call request, and asynchronously initiating the call of a micro service corresponding to the original service by using the business entry according to a mapping relation between the pre-configured original service and the micro service; receiving and recording the calling return results of the original service and the micro service, and returning the calling return results of the original service to the application layer so that the application layer can continuously process the calling request of the original service; And comparing the calling return result of the original service with the calling return result of the micro service according to a matching rule for judging the logic consistency between services, so as to output the comparison result of the logic consistency of the calling return result of the original service and the calling return result of the micro service, and taking the comparison result as a verification result of service transformation. The embodiment of the application also provides a service transformation verification device, which comprises the following steps: The asynchronous call module is used for responding to a call request of an application layer to an original service, acquiring a business entry of the call request, and asynchronously initiating call of a micro service corresponding to the original service by using the business entry according to a mapping relation between the pre-configured original service and the micro service; The log recording module is used for receiving and recording the calling return results of the original service and the micro service, and returning the calling return results of the original service to the application layer so that the application layer can continuously process the calling request of the original service; And the service verification module is used for comparing the calling return result of the original service with the calling return result of the micro service according to a matching rule for judging the logic consistency among the services so as to output a comparison result of the logic consistency of the calling return result of the original service and the calling return