CN112565194A - Transaction link tracking method, electronic device and storage medium - Google Patents

Transaction link tracking method, electronic device and storage medium Download PDF

Info

Publication number
CN112565194A
CN112565194A CN202011238760.8A CN202011238760A CN112565194A CN 112565194 A CN112565194 A CN 112565194A CN 202011238760 A CN202011238760 A CN 202011238760A CN 112565194 A CN112565194 A CN 112565194A
Authority
CN
China
Prior art keywords
link
information
link tracking
transaction
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011238760.8A
Other languages
Chinese (zh)
Inventor
熊钊隆
赵泽栋
林卫华
李燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Huaxing Bank Co ltd
Original Assignee
Guangdong Huaxing Bank Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Huaxing Bank Co ltd filed Critical Guangdong Huaxing Bank Co ltd
Priority to CN202011238760.8A priority Critical patent/CN112565194A/en
Publication of CN112565194A publication Critical patent/CN112565194A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Abstract

The invention provides a transaction link tracking method, which comprises the steps of setting up a sidecar for each service system sending a service message, and acquiring the service messages sent by different service systems, wherein each service message comprises a message header and a message body; analyzing the service message to obtain a message header and a message body, judging whether the message header contains link tracking information, if so, performing link tracking information assembly, and if not, performing link tracking information generation; generating link tracking information according to the stored parameter information and a preset generation rule; respectively carrying out analysis processing, separation processing and assembly processing on the link tracking information to obtain link fragmentation information; and sending the service message containing the link fragmentation information to a back-end service system for transaction link tracking. The invention provides a transaction link tracking method, which analyzes and assembles the link tracking information in the message header by a sidecar, shields the implementation framework of a bank system and realizes effective transaction link tracking on the bank system.

Description

Transaction link tracking method, electronic device and storage medium
Technical Field
The present invention relates to the field of link tracking, and in particular, to a transaction link tracking method, an electronic device, and a storage medium.
Background
The link tracking in the industry is mature, and the link tracking is essentially performed by using a probe technology, that is, adding link tracking information to an http header, wherein the skywalk (an application performance monitoring system for opening sources, including index monitoring, distributed tracking and distributed system performance diagnosis), a zipin (an opening source project for Twitter, allowing a developer to collect monitoring data on each service of Twitter and providing an inquiry interface), and the like.
However, for the daily business processing process of the bank, the above method of link tracking has the following problems: 1. first, the core systems of the bank are generally written in C language, or a low-version JAVA such as JAVA5 is used, so that the above products cannot be directly used in these core systems. 2. The existing communication protocols of the bank system not only include HTTP, gPRC (gPRC is a high-performance, open-source and universal RPC framework, and is designed for mobile and HTTP/2), but also include fixed-length messages and delimiter messages based on TCP, and the communication protocols have sealing property, and open-source products cannot be directly supported. Therefore, the existing link tracking products cannot perform transaction link tracking in the process of bank transaction.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a transaction link tracking method, which can solve the problem that the existing link tracking product cannot perform transaction link tracking in the process of bank transaction.
The second objective of the present invention is to provide an electronic device, which can solve the problem that the existing link tracking product cannot perform transaction link tracking in the process of bank transaction.
It is another object of the present invention to provide a computer-readable storage medium, which can solve the problem that the existing link tracking product cannot perform transaction link tracking during the bank transaction.
One of the purposes of the invention is realized by adopting the following technical scheme:
a transaction link tracking method builds a side car for each service system sending a service message, the method is executed by the side car, and the method comprises the following steps:
acquiring messages, and acquiring service messages sent by different service systems, wherein the service messages comprise message headers and message bodies;
analyzing the message, analyzing the service message to obtain a message header and a message body, judging whether the message header contains link tracking information, if so, performing link tracking information assembly, and if not, performing link tracking information generation;
generating link tracking information, and generating the link tracking information according to the stored parameter information and a preset generation rule;
link tracking information is assembled, and the link tracking information is respectively subjected to analysis processing, separation processing and assembly processing to obtain link fragmentation information;
and tracking the transaction link, namely sending the service message containing the link fragmentation information to a back-end service system for tracking the transaction link.
Further, the link trace information assembly specifically includes: the link tracking information is firstly analyzed, the analyzed link tracking information is separated according to a preset separator to obtain a global TraceId, a link Id and a father node link Id, and the global TraceId, the link Id and the father node link Id are assembled to obtain link fragmentation information.
Further, when the service message containing the link fragment information is sent to the back-end service system, the link fragment information is asynchronously sent to the collector, and the collector performs uniform assembly to obtain a complete link.
Further, the unified assembly is assembly by using an opentraining protocol.
Further, the parameter information includes service name information, thread number information, and globally unique sequence number information, and the generating link tracking information specifically includes: and generating link tracking information by the service name information, the thread number information and the global unique sequence number information according to a preset rule.
A transaction link tracking method, the method being performed by a business system, comprising the steps of:
reserving link tracking information, judging whether the link tracking information exists in the context of the service processing thread, if so, copying the link tracking information into a message header in the service message, and if not, not processing;
and sending the service message to a corresponding side car.
A transaction link tracking method, the method performed by a collector, comprising the steps of:
receiving link fragmentation information and receiving link fragmentation information sent by different side cars;
and link assembling, namely assembling different link fragment information to obtain a complete link.
Further, the link assembly specifically includes: and acquiring the global TraceId, the link Id and the father node link Id in each link fragmentation information, and assembling to obtain a complete link according to the global TraceId, the link Id and the father node link Id in each link fragmentation information.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device, comprising: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a transaction link tracking method of the present application.
The third purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium having stored thereon a computer program for execution by a processor of a transaction link tracking method of the present application.
Compared with the prior art, the invention has the beneficial effects that: according to the transaction link tracking method, a side car is set up for each service system sending a service message, the service messages sent by different service systems are obtained through the side car, and the service messages comprise message headers and message bodies; analyzing the service message to obtain a message header and a message body, judging whether the message header contains link tracking information, if so, performing link tracking information assembly, and if not, performing link tracking information generation; generating link tracking information according to the stored parameter information and a preset generation rule; respectively carrying out analysis processing, separation processing and assembly processing on the link tracking information to obtain link fragmentation information; the service message containing the link fragment information is sent to a back-end service system for transaction link tracking, and the link tracking information in the message header is analyzed and assembled by the sidecar, so that the implementation framework of the bank system is shielded, and the effective transaction link tracking of the bank system is realized.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings. The detailed description of the present invention is given in detail by the following examples and the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flow chart illustrating a transaction link tracking method according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
As shown in fig. 1, in the transaction link tracking method in the present application, a sidecar is first built in front of different business systems, and the sidecar in the present embodiment is explained as follows: so called Sidecar, also called Sidecar, just as a Sidecar is connected to a motorcycle, similarly in software architecture, a Sidecar application is connected to a parent application and extends or enhances the functionality for it, dividing the functionality of the application into separate processes can be seen as a Sidecar mode; the sidecar design model allows the operator to add many functions to the application without the configuration and code of additional third party components; for some functions irrelevant to actual services, the functions can be realized by moving to a sidecar, the services only need to realize own service codes, the sidecar application is loosely coupled with a main application program, and the sidecar does not need to care about information such as service realization logic, language framework and the like; the sidecar mode is an important architecture mode in a service grid, and functions such as monitoring, logging, current limiting, fusing, service registration and the like in the service grid are generally unrelated to specific services, so that the service grid can realize the functions in the sidecar and realize grid management capabilities such as monitoring, current control and the like under the condition that service codes are not sensed. The method in the embodiment specifically comprises the following steps:
reserving link tracking information, judging whether the link tracking information exists in the context of a service processing thread by a service system, if so, copying the link tracking information into a message header in the service message, and if not, not processing;
and sending the service message, wherein each service system sends the service message to the corresponding side car.
And acquiring a message, and acquiring service messages sent by different service systems by a sidecar, wherein the service messages comprise message headers and message bodies.
And analyzing the message, analyzing the service message by the sidecar to obtain a message header and a message body, judging whether the message header contains link tracking information, if so, performing link tracking information assembly, and if not, performing link tracking information generation.
And generating link tracking information, and generating the link tracking information by the sidecar according to the stored parameter information and a preset generation rule. The method specifically comprises the following steps: the parameter information comprises service name information, thread number information and global unique sequence number information, the sidecar takes the service name information, the thread number information and the global unique sequence number information as IDs, namely takes the sequence numbers in the three information as global TraceId, link Id and father node link Id according to a preset rule, and the specific preset rule is a sequence rule of the sequence numbers actually.
And assembling the link tracking information, wherein the sidecar respectively analyzes, separates and assembles the link tracking information to obtain link fragment information. The method specifically comprises the following steps: the link tracking information is firstly analyzed, the analyzed link tracking information is separated according to a preset separator to obtain a global TraceId, a link Id and a father node link Id, and the global TraceId, the link Id and the father node link Id are assembled to obtain link fragmentation information. For example: adopting a separator @ @ to separate the analyzed link tracking information, assuming that the link tracking information is 13.62688.1582113104331000013.62688.158211310433100019.65006.15821131043360000, and obtaining the result after adopting the separator @ @ to separate: 13.62688.15821131043310000@ 13.62688.15821131043310001@ 9.65006.15821131043360000.
And tracking the transaction link, wherein each side car sends a corresponding service message containing link fragment information to a back-end service system for tracking the transaction link, and simultaneously, the side cars asynchronously send the link fragment information to a collector for uniform assembly to obtain a complete link. The uniform assembly here is assembly by using opentraining protocol (assembly by opentraining protocol is a standard specification for distributed link tracking, and is one of items under CNCF (cloud computing foundation)).
And receiving link fragmentation information, wherein the collector receives the link fragmentation information sent by different side cars.
And link assembling, namely assembling different link fragment information to obtain a complete link. The method specifically comprises the following steps: and acquiring the global TraceId, the link Id and the father node link Id in each link fragmentation information, and assembling to obtain a complete link according to the global TraceId, the link Id and the father node link Id in each link fragmentation information. The OpenTracing protocol is adopted for assembly in the step.
According to the transaction link tracking method, a side car is set up for each service system sending a service message, the service messages sent by different service systems are obtained through the side car, and the service messages comprise message headers and message bodies; analyzing the service message to obtain a message header and a message body, judging whether the message header contains link tracking information, if so, performing link tracking information assembly, and if not, performing link tracking information generation; generating link tracking information according to the stored parameter information and a preset generation rule; respectively carrying out analysis processing, separation processing and assembly processing on the link tracking information to obtain link fragmentation information; the service message containing the link fragment information is sent to a back-end service system for transaction link tracking, and the link tracking information in the message header is analyzed and assembled by the sidecar, so that the implementation framework of the bank system is shielded, and the effective transaction link tracking of the bank system is realized.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner; those skilled in the art can readily practice the invention as shown and described in the drawings and detailed description herein; however, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the scope of the invention as defined by the appended claims; meanwhile, any changes, modifications, and evolutions of the equivalent changes of the above embodiments according to the actual techniques of the present invention are still within the protection scope of the technical solution of the present invention.

Claims (10)

1. A transaction link tracking method, characterized by: the method is implemented by the side car and comprises the following steps:
acquiring messages, and acquiring service messages sent by different service systems, wherein the service messages comprise message headers and message bodies;
analyzing the message, analyzing the service message to obtain a message header and a message body, judging whether the message header contains link tracking information, if so, performing link tracking information assembly, and if not, performing link tracking information generation;
generating link tracking information, and generating the link tracking information according to the stored parameter information and a preset generation rule;
link tracking information is assembled, and the link tracking information is respectively subjected to analysis processing, separation processing and assembly processing to obtain link fragmentation information;
and tracking the transaction link, namely sending the service message containing the link fragmentation information to a back-end service system for tracking the transaction link.
2. A transaction link tracking method as claimed in claim 1, wherein: the link tracking information assembly specifically comprises the following steps: the link tracking information is firstly analyzed, the analyzed link tracking information is separated according to a preset separator to obtain a global TraceId, a link Id and a father node link Id, and the global TraceId, the link Id and the father node link Id are assembled to obtain link fragmentation information.
3. A transaction link tracking method as claimed in claim 1, wherein: and when the service message containing the link fragment information is sent to a back-end service system, the link fragment information is asynchronously sent to the collector, and the collector performs uniform assembly to obtain a complete link.
4. A transaction link tracking method as claimed in claim 3, wherein: the unified assembly is assembly by adopting an OpenTracing protocol.
5. A transaction link tracking method as claimed in claim 3, wherein: the parameter information includes service name information, thread number information, and globally unique sequence number information, and the link tracking information generation specifically includes: and generating link tracking information by the service name information, the thread number information and the global unique sequence number information according to a preset rule.
6. A transaction link tracking method, characterized by: the method is executed by a business system and comprises the following steps:
reserving link tracking information, judging whether the link tracking information exists in the context of the service processing thread, if so, copying the link tracking information into a message header in the service message, and if not, not processing;
and sending the service message to a corresponding side car.
7. A transaction link tracking method, characterized by: the method is performed by a collector, comprising the steps of:
receiving link fragmentation information and receiving link fragmentation information sent by different side cars;
and link assembling, namely assembling different link fragment information to obtain a complete link.
8. A transaction link tracking method as claimed in claim 7, wherein: the link assembly specifically comprises: and acquiring the global TraceId, the link Id and the father node link Id in each link fragmentation information, and assembling to obtain a complete link according to the global TraceId, the link Id and the father node link Id in each link fragmentation information.
9. An electronic device, characterized by comprising: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a transaction link tracking method of any one of claims 1-5 or a transaction link tracking method of claim 6 or a transaction link tracking method of any one of claims 7-8.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program is executed by a processor to perform a method of transaction link tracking according to any one of claims 1 to 5 or a method of transaction link tracking according to claim 6 or a method of transaction link tracking according to any one of claims 7 to 8.
CN202011238760.8A 2020-11-09 2020-11-09 Transaction link tracking method, electronic device and storage medium Pending CN112565194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011238760.8A CN112565194A (en) 2020-11-09 2020-11-09 Transaction link tracking method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011238760.8A CN112565194A (en) 2020-11-09 2020-11-09 Transaction link tracking method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112565194A true CN112565194A (en) 2021-03-26

Family

ID=75041682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011238760.8A Pending CN112565194A (en) 2020-11-09 2020-11-09 Transaction link tracking method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112565194A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114357044A (en) * 2021-12-28 2022-04-15 南威软件股份有限公司 Big data full life cycle management method, system and application based on-duty tracking

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357463A (en) * 2016-11-07 2017-01-25 深圳盛灿科技股份有限公司 Non-intrusive access link tracking implementation method and system thereof
CN111277643A (en) * 2020-01-18 2020-06-12 深圳市麦谷科技有限公司 HTTP link tracking recording method and system
CN111752799A (en) * 2020-06-24 2020-10-09 中国建设银行股份有限公司 Service link tracking method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357463A (en) * 2016-11-07 2017-01-25 深圳盛灿科技股份有限公司 Non-intrusive access link tracking implementation method and system thereof
CN111277643A (en) * 2020-01-18 2020-06-12 深圳市麦谷科技有限公司 HTTP link tracking recording method and system
CN111752799A (en) * 2020-06-24 2020-10-09 中国建设银行股份有限公司 Service link tracking method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
谭柱钢等: "微服务治理与服务网格化推动银行IT架构转型的实践研究", 《中国金融电脑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114357044A (en) * 2021-12-28 2022-04-15 南威软件股份有限公司 Big data full life cycle management method, system and application based on-duty tracking

Similar Documents

Publication Publication Date Title
CN107645562B (en) Data transmission processing method, device, equipment and system
US8161468B2 (en) Processing of expressions
US9442822B2 (en) Providing a visual representation of a sub-set of a visual program
CN110753050B (en) Method and device for generating protocol document, computer storage medium and electronic equipment
CN114297028A (en) Micro-service log link tracking method and system
CN109800259A (en) Collecting method, device and terminal device
CN110688828A (en) File processing method and device, file processing system and computer equipment
US20090063395A1 (en) Mapping log sets between different log analysis tools in a problem determination environment
CN109547430B (en) Development service gateway system and development service gateway
CN112565194A (en) Transaction link tracking method, electronic device and storage medium
CN112214967A (en) Message format conversion method and device
CN110008267B (en) Data processing system and method
CN112905567B (en) Database replacement method, device, system and medium based on network protocol conversion
US6886113B2 (en) System and method for determining and presenting network problems
CN107172013B (en) Data transmission method and system
CN110620819B (en) Block chain interaction method and device, computer equipment and readable storage medium
CN112883088B (en) Data processing method, device, equipment and storage medium
CN110825538A (en) MQ-based method for dynamically interacting data by self-defining data types
CN113485942A (en) Automatic testing method and device based on independent module
CN113032341A (en) Log processing method based on visual configuration
CN108874625B (en) Information processing method and device, electronic equipment and storage medium
CN112468340A (en) Pre-audit business data configuration system for multiple tenants
CN111104390A (en) Method and system for merging and checking multiple CSV files
CN113285997B (en) Data processing method, device, medium and product based on heterogeneous system
CN114025031B (en) Data processing method and device based on ground measurement and control system data transmission protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination