CN110830577A - Service request call tracking method and device, computer equipment and storage medium - Google Patents

Service request call tracking method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110830577A
CN110830577A CN201911086482.6A CN201911086482A CN110830577A CN 110830577 A CN110830577 A CN 110830577A CN 201911086482 A CN201911086482 A CN 201911086482A CN 110830577 A CN110830577 A CN 110830577A
Authority
CN
China
Prior art keywords
service
request
service method
tracking
service request
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.)
Granted
Application number
CN201911086482.6A
Other languages
Chinese (zh)
Other versions
CN110830577B (en
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.)
Shenzhen Qianhai Huanlianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanlianyi Information Technology Service 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 Shenzhen Qianhai Huanlianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanlianyi Information Technology Service Co Ltd
Priority to CN201911086482.6A priority Critical patent/CN110830577B/en
Publication of CN110830577A publication Critical patent/CN110830577A/en
Application granted granted Critical
Publication of CN110830577B publication Critical patent/CN110830577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Abstract

The invention discloses a service request calling tracking method, a service request calling tracking device, computer equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining a target service method corresponding to a service request in a method call database, if the service request meets a call tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between target service methods according to tracking item information of the target service method and request information of the service request, and recording the data stream processing process of the service request according to the configured link tracking identifier to obtain a request processing tracking log corresponding to the service request. By the method, the link tracking identifier corresponding to the tracking item information of each target service method can be configured, the flexibility of configuring the link tracking identifier is improved, the request processing tracking log is greatly improved, and the information contained in the request processing tracking log can be conveniently and quickly inquired.

Description

Service request call tracking method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service request invocation tracking method, apparatus, computer device, and storage medium.
Background
The management server processes the service request from the user terminal in a concurrent manner to provide the service to the user terminal, the management server usually calls a plurality of service methods in the process of processing the service request, and the management server processes a large number of service methods at the same time, so that the data stream processing process in each service method is very complicated. In order to track the data stream processing process to facilitate the inspection of the processing flow of the abnormal service request, a tracking identifier may be added to the recorded information of the data stream processing process, so that the obtained recorded information of the data stream processing process corresponding to each service request includes the tracking identifier, and the processing flow of the abnormal service request is inspected through the tracking identifier. Therefore, the method in the prior art has the problem that the tracking identifier cannot be flexibly added.
Disclosure of Invention
The embodiment of the invention provides a service request calling tracking method, a service request calling tracking device, computer equipment and a storage medium, and aims to solve the problem that a tracking identifier cannot be flexibly added in the prior art.
In a first aspect, an embodiment of the present invention provides a service request invocation tracking method, including:
if a service request from any client is received, acquiring a service method corresponding to the service request in a preset method calling database as a target service method required to be called by the service request;
judging whether the service request meets a preset calling tracking condition or not according to the preset calling tracking condition and the target service method;
if the service request meets the calling tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between the target service methods according to the tracking item information of the target service methods and the request information of the service request;
recording the data stream processing process of the service request according to the configured link tracking identifier so as to generate a request processing tracking log corresponding to the service request.
In a second aspect, an embodiment of the present invention provides a service request call tracking apparatus, including:
a target service method obtaining unit, configured to, if a service request from any one of the clients is received, obtain a service method corresponding to the service request in a preset method call database as a target service method to be called by the service request;
the judging unit is used for judging whether the service request meets the preset calling tracking condition or not according to the preset calling tracking condition and the target service method;
a link trace identifier configuration unit, configured to configure, if the service request satisfies the call trace condition, a corresponding link trace identifier for a data stream processing procedure between the target service methods according to the trace item information of the target service method and the request information of the service request;
and the trace log generating unit is used for recording the data stream processing process of the service request according to the configured link trace identifier so as to generate a request processing trace log corresponding to the service request.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the service request call tracing method according to the first aspect when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the service request call tracing method according to the first aspect.
The embodiment of the invention provides a service request calling tracking method, a service request calling tracking device, computer equipment and a storage medium. The method comprises the steps of obtaining a target service method corresponding to a service request in a method call database, if the service request meets a call tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between target service methods according to tracking item information of the target service method and request information of the service request, and recording the data stream processing process of the service request according to the configured link tracking identifier to obtain a request processing tracking log corresponding to the service request. By the method, the link tracking identifier corresponding to the tracking item information of each target service method can be configured, the flexibility of configuring the link tracking identifier is improved, the request processing tracking log is greatly improved, and the information contained in the request processing tracking log can be conveniently and quickly inquired.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a service request call tracking method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of a service request call tracking method according to an embodiment of the present invention;
FIG. 3 is a sub-flow diagram illustrating a service request call tracking method according to an embodiment of the present invention;
FIG. 4 is a schematic view of another sub-flow of a service request call tracking method according to an embodiment of the present invention;
FIG. 5 is a schematic view of another sub-flow of a service request call tracking method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a service request call tracking method according to another embodiment of the present invention;
FIG. 7 is a schematic block diagram of a service request call tracking device according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic flowchart of a service request call tracing method according to an embodiment of the present invention, and fig. 2 is a schematic application scenario diagram of the service request call tracing method according to the embodiment of the present invention. The service request calling tracking method is applied to the management server 10, and is executed through application software installed in the management server 10, and the user terminal 20 performs data information transmission by establishing a network connection with the management server 10, wherein the user terminal 20 is a terminal device capable of sending a service request to the management server, such as a desktop computer, a notebook computer, a tablet computer or a mobile phone, and the management server 10 is an enterprise terminal for processing the service request and tracking and recording a data stream processing process. In addition, in the embodiment, only one user terminal 20 is illustrated to establish network connection with the management server 10, and in an actual application process, multiple user terminals 20 can establish network connection with the management server 10 at the same time.
As shown in fig. 1, the method includes steps S110 to S140.
S110, if a service request from any client is received, acquiring a service method corresponding to the service request in a preset method calling database as a target service method required to be called by the service request.
And if a service request from any client is received, acquiring a service method corresponding to the service request in a preset method calling database as a target service method required to be called by the service request. The method calling database comprises a plurality of request processing flows and a service method corresponding to each request processing flow, and the service methods are embodied in the form of computer codes. The method call database stores various service methods which can be called by the management server when processing the service request, the service request comprises specific request types, the method call database also stores request processing flows corresponding to each service request, the request processing flows are specific flows for calling the service methods when processing a certain service request, each request processing flow comprises a name corresponding to the service method to be called, and the target service method corresponding to the service request can be obtained according to the method call database.
For example, the request category of the service request may be an information acquisition request, a voice recognition request, a picture recognition request, or the like.
In one embodiment, as shown in FIG. 3, step S110 includes sub-steps S111 and S112.
S111, acquiring a request processing flow matched with the service request according to the request information of the service request.
And acquiring a request processing flow matched with the service request according to the request information of the service request. The method corresponding to each service request calls a request processing flow in the database, namely the management server has the same processing mode for the same service request, and the request information of the service request contains specific request types, so that the request processing flow matched with the service request can be obtained according to the request types in the request information, and the request processing flow contains the name of the service method corresponding to the required call.
And S112, acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
And acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
For example, the call flow of the request processing flow corresponding to the voice recognition request to the service method is as follows: method010 → Method011 → (Method020 → Method021) & (Method030 → Method031 → Method032), then the service Method corresponding to the name stored in the Method call database is taken as the target service Method.
And S120, judging whether the service request meets the preset calling tracking condition or not according to the preset calling tracking condition and the target service method.
And judging whether the service request meets the preset calling tracking condition or not according to the preset calling tracking condition and the target service method. Before configuring the link tracking identifier, whether the service request meets the call tracking condition needs to be judged, the service request meeting the call tracking condition can be used for configuring the link tracking identifier, and the service request not meeting the call tracking condition needs not to be configured with the link tracking identifier and is directly processed. Specifically, the call tracing condition may be configured to meet a part of request types, include mutual calls between service methods, or have the number of service methods greater than a preset threshold, and if the call tracing condition is configured to meet the part of request types, the service requests corresponding to other request types do not meet the call tracing condition; if the call tracing condition is configured to include mutual call between the service methods, the service request not including the mutual call between the service methods does not satisfy the call tracing condition; if the call tracing condition is configured such that the number of the service methods is greater than a preset threshold, the service requests whose number of the service methods is less than the preset threshold do not satisfy the call tracing condition.
For example, a certain call tracing condition is configured to conform to a voice recognition request or a picture recognition request, and includes a mutual call between service methods. Then, the target service Method corresponding to the voice recognition request in the above example includes mutual call between service methods (Method010 → Method011, that is, when processing the target service Method of Method010, the target service Method of Method011 needs to be further called, and Method011 is a sub-service Method of Method 010), and the voice recognition request satisfies the above call tracing condition.
S130, if the service request meets the calling tracking condition, configuring a corresponding link tracking identifier for the data stream processing process between the target service methods according to the tracking item information of the target service methods and the request information of the service request.
And if the service request meets the calling tracking condition, configuring a corresponding link tracking identifier for the data stream processing process between the target service methods according to the tracking item information of the target service methods and the request information of the service request. The request information of the service request comprises request types and other information, each target service method can be configured with tracking item information, the item value corresponding to the tracking item information in the request information of the service request can be obtained according to the tracking item information, and the item value is configured as a link tracking identifier corresponding to the data flow processing process between the target service methods.
For example, if the request information of a certain voice recognition request further includes information "App _ number" 10991 ", the trace item information of a certain target service method is" App _ number ", and the link trace flag is represented by a traceID in the code, the link trace flag" 10991 "is assigned to the data stream processing procedure corresponding to the target service method.
In an embodiment, as shown in fig. 4, step S130 includes sub-steps S131, S132, S133, S134, S135 and S136.
S131, acquiring a first target service method called by the service request as a service method to be marked.
S132, traversing the next level of the service method to be marked to obtain the sub-service method called by the service method to be marked.
S133, acquiring an item value corresponding to the tracking item information of the service method to be marked in the request information, and configuring the item value as a link tracking identifier of a data flow processing process between the service method to be marked and the sub-service method.
S134, judging whether the sub-service method comprises the next level.
And S135, if the sub-service method comprises the next level, taking the sub-service method as a service method to be marked, and returning to execute the next level for traversing the service method to be marked so as to obtain the sub-service method called by the service method to be marked.
And S136, if the sub-service methods do not comprise the next level, ending the process of traversing the service methods to be marked.
Specifically, the data stream processing procedure between the target service method and the corresponding sub-service method includes a data sending processing procedure and a data receiving processing procedure, where the data sending processing procedure is a procedure in which the target service method sends parameter value information to be processed to the sub-service method, and a link tracking identifier can be configured for the processing procedure; the received data processing procedure is a procedure that the target service method receives the data processing result from the sub-service method, a link tracking identifier can be configured for the processing procedure, and the sent data processing procedure and the received data processing procedure are specific procedures that the target service method calls the sub-service method. If a certain target service method comprises a corresponding sub-service method, a corresponding link tracking identifier is configured for the data stream processing process between the target service method and the sub-service method contained in the target service method, and if the certain target service method does not comprise the corresponding sub-service method, the link tracking identifier is not required to be configured.
S140, recording the data stream processing process of the service request according to the configured link tracking identifier to generate a request processing tracking log corresponding to the service request.
Recording the data stream processing process of the service request according to the configured link tracking identifier so as to generate a request processing tracking log corresponding to the service request. The management server operates the target service method according to the corresponding request processing flow, namely processes the processing request, transmits and processes corresponding data in the process of operating the target service method, namely a data stream processing process, and records the data stream processing process according to the configured link tracking identifier to generate a corresponding request processing tracking log.
In an embodiment, as shown in fig. 5, step S140 includes sub-steps S141, S142, S143, S144, and S145.
S141, recording the sending data processing process of the target service method to obtain a sending processing record.
And recording the sending data processing process of the target service method to obtain a sending processing record. The target service method calls a certain sub-service method contained in the target service method, the target service method sends the parameter value information to be processed to the sub-service method, the processing process of the sending data is recorded, and the corresponding sending processing record can be obtained.
And S142, adding a sending time stamp and the link tracking identifier corresponding to the sending data processing process into the sending processing record to obtain a corresponding sending processing tracking record.
And adding a sending time stamp and the link tracking identifier corresponding to the sending data processing process in the sending processing record to obtain a corresponding sending processing tracking record. In order to facilitate tracking of the transmitted data processing process, a transmission timestamp and a link tracking identifier configured by the target service method need to be added to the transmission processing record, and specifically, the transmission timestamp is time information of parameter values transmitted by the target processing method to the corresponding sub-service method.
S143, recording the received data processing process of the target service method to obtain a receiving processing record.
And recording the received data processing process of the target service method to obtain a receiving processing record. After the sub-service method of the target service method processes the parameter value, the data processing result is fed back to the target service method, and the process of receiving the data processing result by the target service method can be recorded, that is, the process of receiving the data processing is recorded, so that the corresponding receiving processing record is obtained.
S144, adding a receiving timestamp and the link trace identifier corresponding to the received data processing procedure to the receiving processing record to obtain a corresponding receiving processing trace record.
And adding a receiving time stamp and the link tracking identifier corresponding to the received data processing process in the receiving processing record to obtain a corresponding receiving processing tracking record. In order to facilitate tracking of the received data processing process, a receiving timestamp and a link tracking identifier configured by the target service method need to be added to the receiving processing record, and specifically, the receiving timestamp is time information of the target processing method for receiving the data processing result from the corresponding sub-method.
S145, obtaining a sending processing trace record and a receiving processing trace record corresponding to the service request to obtain a request processing trace log corresponding to the service request.
And acquiring a sending processing trace record and a receiving processing trace record corresponding to the service request to obtain a request processing trace log corresponding to the service request. The request processing trace log of the service request comprises a sending processing trace record and a receiving processing trace record of each target service method with the sub-service method corresponding to the service request, and the request processing trace logs corresponding to a plurality of service requests can be stored in a preset log database.
In an embodiment, as shown in fig. 6, step S150 is further included after step S140.
S150, if log query information is received, acquiring a processing trace record matched with the log query information according to the log query information and the link trace identifier of each processing trace record in the request processing trace log.
And if log query information is received, acquiring a processing trace record matched with the log query information according to the log query information and the link trace identifier of each processing trace record in the request processing trace log. If the log query information is received, the link tracking identifier in the processing tracking log can be retrieved according to the log query information to obtain a processing tracking record matched with the log query information, wherein the processing tracking record comprises a sending processing tracking record and a receiving processing tracking record matched with the log query information.
The service request call tracking method provided by the embodiment of the invention obtains a target service method corresponding to a service request in a method call database, if the service request meets a call tracking condition, configures a corresponding link tracking identifier for a data stream processing process between the target service methods according to tracking item information of the target service method and request information of the service request, and records the data stream processing process of the service request according to the configured link tracking identifier, so that a request processing tracking log corresponding to the service request can be obtained. By the method, the link tracking identifier corresponding to the tracking item information of each target service method can be configured, the flexibility of configuring the link tracking identifier is improved, the request processing tracking log is greatly improved, and the information contained in the request processing tracking log can be conveniently and quickly inquired. .
The embodiment of the invention also provides a service request call tracking device, which is used for executing any embodiment of the service request call tracking method. Specifically, referring to fig. 7, fig. 7 is a schematic block diagram of a service request call tracking device according to an embodiment of the present invention. The service request call tracking means may be configured in the management server 10.
As shown in fig. 7, the service request invocation tracking device 100 includes a target service method acquisition unit 110, a judgment unit 120, a link trace identification configuration unit 130, and a trace log generation unit 140.
A target service method obtaining unit 110, configured to, if a service request from any one of the clients is received, obtain a service method corresponding to the service request in a preset method call database as a target service method that needs to be called by the service request.
In other embodiments of the present invention, the target service method obtaining unit 110 includes sub-units: a request processing flow matching unit and a target service method determining unit.
The request processing flow matching unit is used for acquiring a request processing flow matched with the service request according to the request information of the service request; and the target service method determining unit is used for acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
The determining unit 120 is configured to determine whether the service request meets a preset call tracing condition according to the preset call tracing condition and the target service method.
A link trace identifier configuring unit 130, configured to configure, if the service request meets the call trace condition, a corresponding link trace identifier for a data stream processing procedure between the target service methods according to the trace item information of the target service method and the request information of the service request.
In other embodiments of the present invention, the link trace identifier configuration unit 130 includes sub-units: the system comprises a service method to be marked determining unit, a service method traversing unit, an identification configuration unit, a hierarchy judging unit, a return execution unit and a traversing ending unit.
A service method to be marked determining unit, configured to obtain a first target service method called by the service request as a service method to be marked; the service method traversing unit is used for traversing the next level of the service method to be marked to obtain the sub-service method called by the service method to be marked; the identification configuration unit is used for acquiring an item value corresponding to the tracking item information of the service method to be marked in the request information and configuring the item value as a link tracking identification of a data flow processing process between the service method to be marked and the sub-service method; a hierarchy determining unit for determining whether the sub-service method includes a next hierarchy; a return execution unit, configured to, if the sub-service method includes a next level, use the sub-service method as a service method to be marked and return to execute the step of traversing the next level of the service method to be marked to obtain the sub-service method called by the service method to be marked; and the traversal ending unit is used for ending the process of traversing the service method to be marked if the sub-service methods do not comprise the next level.
A trace log generating unit 140, configured to record a data stream processing procedure of the service request according to the configured link trace identifier, so as to generate a request processing trace log corresponding to the service request.
In other embodiments of the present invention, the trace log generating unit 140 includes sub-units: the device comprises a first recording unit, a sending processing trace record acquisition unit, a second recording unit, a receiving processing trace record acquisition unit and a trace log acquisition unit.
The first recording unit is used for recording the sending data processing process of the target service method to obtain a sending processing record; a sending processing trace record obtaining unit, configured to add a sending timestamp and the link trace identifier corresponding to the sending data processing procedure to the sending processing record to obtain a corresponding sending processing trace record; the second recording unit is used for recording the received data processing process of the target service method to obtain a received processing record; a receiving processing trace record obtaining unit, configured to add a receiving timestamp and the link trace identifier corresponding to the received data processing procedure to the receiving processing record to obtain a corresponding receiving processing trace record; a trace log obtaining unit, configured to obtain a sending processing trace record corresponding to the service request and a receiving processing trace record to obtain a request processing trace log corresponding to the service request.
In other embodiments of the invention, the service request invocation tracking device 100 further comprises sub-units: the trace record query unit is processed.
And the processing trace record query unit is used for acquiring the processing trace record matched with the log query information according to the log query information and the link trace identifier of each processing trace record in the request processing trace log if the log query information is received.
The service request call tracking device provided by the embodiment of the invention is used for executing the service request call tracking method, acquiring a target service method corresponding to the service request in the method call database, if the service request meets a call tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between the target service methods according to tracking item information of the target service method and request information of the service request, and recording the data stream processing process of the service request according to the configured link tracking identifier, so that a request processing tracking log corresponding to the service request can be obtained. By the method, the link tracking identifier corresponding to the tracking item information of each target service method can be configured, the flexibility of configuring the link tracking identifier is improved, the request processing tracking log is greatly improved, and the information contained in the request processing tracking log can be conveniently and quickly inquired. .
The service request call tracing means described above may be implemented in the form of a computer program which may be run on a computer device as shown in figure 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Referring to fig. 8, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, causes the processor 502 to perform the service request call tracing method.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 may be caused to execute the service request call tracking method.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 8 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following functions: if a service request from any client is received, acquiring a service method corresponding to the service request in a preset method calling database as a target service method required to be called by the service request; judging whether the service request meets a preset calling tracking condition or not according to the preset calling tracking condition and the target service method; if the service request meets the calling tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between the target service methods according to the tracking item information of the target service methods and the request information of the service request; recording the data stream processing process of the service request according to the configured link tracking identifier so as to generate a request processing tracking log corresponding to the service request.
In an embodiment, when executing the step of acquiring, if a service request from any one of the clients is received, a service method corresponding to the service request in a preset method call database as a target service method that needs to be called by the service request, the processor 502 executes the following operations: acquiring a request processing flow matched with the service request according to the request information of the service request; and acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
In an embodiment, when executing the step of configuring, according to the trace item information of the target service method and the request information of the service request, a corresponding link trace identifier for a data stream processing procedure between the target service methods if the service request satisfies the call trace condition, the processor 502 performs the following operations: acquiring a first target service method called by the service request as a service method to be marked; traversing the next level of the service method to be marked to obtain a sub-service method called by the service method to be marked; acquiring an item value corresponding to the tracking item information of the service method to be marked in the request information, and configuring the item value as a link tracking identifier of a data flow processing process between the service method to be marked and the sub-service method; judging whether the sub-service method comprises a next level; if the sub-service method comprises the next level, taking the sub-service method as a service method to be marked and returning to execute the next level for traversing the service method to be marked so as to obtain the sub-service method called by the service method to be marked; and if the sub-service methods do not comprise the next level, ending the process of traversing the service method to be marked.
In an embodiment, the processor 502, when executing the step of recording the data stream processing procedure of the service request according to the configured link trace identifier to generate a request processing trace log corresponding to the service request, performs the following operations: recording the sending data processing process of the target service method to obtain a sending processing record; adding a sending time stamp and the link tracking identifier corresponding to the sending data processing process into the sending processing record to obtain a corresponding sending processing tracking record; recording the received data processing process of the target service method to obtain a receiving processing record; adding a receiving time stamp and the link tracking identifier corresponding to the received data processing process in the receiving processing record to obtain a corresponding receiving processing tracking record; and acquiring a sending processing trace record and a receiving processing trace record corresponding to the service request to obtain a request processing trace log corresponding to the service request.
In an embodiment, after the step of recording the data stream processing procedure of the service request according to the configured link trace identifier to generate a request processing trace log corresponding to the service request, the processor 502 further performs the following operations: and if log query information is received, acquiring a processing trace record matched with the log query information according to the log query information and the link trace identifier of each processing trace record in the request processing trace log.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 8 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 8, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the steps of: if a service request from any client is received, acquiring a service method corresponding to the service request in a preset method calling database as a target service method required to be called by the service request; judging whether the service request meets a preset calling tracking condition or not according to the preset calling tracking condition and the target service method; if the service request meets the calling tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between the target service methods according to the tracking item information of the target service methods and the request information of the service request; recording the data stream processing process of the service request according to the configured link tracking identifier so as to generate a request processing tracking log corresponding to the service request.
In an embodiment, the step of acquiring, if a service request from any one of the clients is received, a service method corresponding to the service request in a preset method call database as a target service method to be called by the service request includes: acquiring a request processing flow matched with the service request according to the request information of the service request; and acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
In an embodiment, if the service request satisfies the call tracing condition, the step of configuring a corresponding link tracing identifier for a data stream processing procedure between the target service methods according to the tracing item information of the target service method and the request information of the service request includes: acquiring a first target service method called by the service request as a service method to be marked; traversing the next level of the service method to be marked to obtain a sub-service method called by the service method to be marked; acquiring an item value corresponding to the tracking item information of the service method to be marked in the request information, and configuring the item value as a link tracking identifier of a data flow processing process between the service method to be marked and the sub-service method; judging whether the sub-service method comprises a next level; if the sub-service method comprises the next level, taking the sub-service method as a service method to be marked and returning to execute the next level for traversing the service method to be marked so as to obtain the sub-service method called by the service method to be marked; and if the sub-service methods do not comprise the next level, ending the process of traversing the service method to be marked.
In an embodiment, the step of recording the data stream processing procedure of the service request according to the configured link trace identifier to generate a request processing trace log corresponding to the service request includes: recording the sending data processing process of the target service method to obtain a sending processing record; adding a sending time stamp and the link tracking identifier corresponding to the sending data processing process into the sending processing record to obtain a corresponding sending processing tracking record; recording the received data processing process of the target service method to obtain a receiving processing record; adding a receiving time stamp and the link tracking identifier corresponding to the received data processing process in the receiving processing record to obtain a corresponding receiving processing tracking record; and acquiring a sending processing trace record and a receiving processing trace record corresponding to the service request to obtain a request processing trace log corresponding to the service request.
In an embodiment, after the step of recording the data stream processing procedure of the service request according to the configured link trace identifier to generate a request processing trace log corresponding to the service request, the method further includes: and if log query information is received, acquiring a processing trace record matched with the log query information according to the log query information and the link trace identifier of each processing trace record in the request processing trace log.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a computer-readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A service request call tracking method applied to a management server, the management server communicating with at least one client, the method comprising:
if a service request from any client is received, acquiring a service method corresponding to the service request in a preset method calling database as a target service method required to be called by the service request;
judging whether the service request meets a preset calling tracking condition or not according to the preset calling tracking condition and the target service method;
if the service request meets the calling tracking condition, configuring a corresponding link tracking identifier for a data stream processing process between the target service methods according to the tracking item information of the target service methods and the request information of the service request;
recording the data stream processing process of the service request according to the configured link tracking identifier so as to generate a request processing tracking log corresponding to the service request.
2. The method according to claim 1, wherein the method call database includes a plurality of request processing flows and a service method corresponding to each request processing flow, and the obtaining of the service method corresponding to the service request in the preset method call database as the target service method to be called by the service request includes:
acquiring a request processing flow matched with the service request according to the request information of the service request;
and acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
3. The method for tracking service request invocation according to claim 1, wherein said configuring a corresponding link trace identifier for a data flow processing procedure between said target service methods according to said trace identifier of said target service method and said request information of said service request comprises:
acquiring a first target service method called by the service request as a service method to be marked;
traversing the next level of the service method to be marked to obtain a sub-service method called by the service method to be marked;
acquiring an item value corresponding to the tracking item information of the service method to be marked in the request information, and configuring the item value as a link tracking identifier of a data flow processing process between the service method to be marked and the sub-service method;
judging whether the sub-service method comprises a next level;
if the sub-service method comprises the next level, taking the sub-service method as a service method to be marked and returning to execute the next level for traversing the service method to be marked so as to obtain the sub-service method called by the service method to be marked;
and if the sub-service methods do not comprise the next level, ending the process of traversing the service method to be marked.
4. The method according to claim 1, wherein the data stream processing procedure comprises a sending data processing procedure and a receiving data processing procedure, and the recording the data stream processing procedure of the service request according to the configured link trace identifier to generate a request processing trace log corresponding to the service request comprises:
recording the sending data processing process of the target service method to obtain a sending processing record;
adding a sending time stamp and the link tracking identifier corresponding to the sending data processing process into the sending processing record to obtain a corresponding sending processing tracking record;
recording the received data processing process of the target service method to obtain a receiving processing record;
adding a receiving time stamp and the link tracking identifier corresponding to the received data processing process in the receiving processing record to obtain a corresponding receiving processing tracking record;
and acquiring a sending processing trace record and a receiving processing trace record corresponding to the service request to obtain a request processing trace log corresponding to the service request.
5. The method for tracking service request invocation according to claim 1, wherein after said recording the data stream processing procedure of said service request according to said configured link trace identifier to generate a request processing trace log corresponding to said service request, further comprising:
and if log query information is received, acquiring a processing trace record matched with the log query information according to the log query information and the link trace identifier of each processing trace record in the request processing trace log.
6. A service request call tracing apparatus, comprising:
a target service method obtaining unit, configured to, if a service request from any one of the clients is received, obtain a service method corresponding to the service request in a preset method call database as a target service method to be called by the service request;
the judging unit is used for judging whether the service request meets the preset calling tracking condition or not according to the preset calling tracking condition and the target service method;
a link trace identifier configuration unit, configured to configure, if the service request satisfies the call trace condition, a corresponding link trace identifier for a data stream processing procedure between the target service methods according to the trace item information of the target service method and the request information of the service request;
and the trace log generating unit is used for recording the data stream processing process of the service request according to the configured link trace identifier so as to generate a request processing trace log corresponding to the service request.
7. The service request call tracing apparatus according to claim 6, wherein said target service method obtaining unit comprises:
the request processing flow matching unit is used for acquiring a request processing flow matched with the service request according to the request information of the service request;
and the target service method determining unit is used for acquiring a service method corresponding to the request processing flow as a target service method required to be called by the service request.
8. The service request invocation tracking device according to claim 6, wherein said link trace identification configuration unit comprises:
a service method to be marked determining unit, configured to obtain a first target service method called by the service request as a service method to be marked;
the service method traversing unit is used for traversing the next level of the service method to be marked to obtain the sub-service method called by the service method to be marked;
the identification configuration unit is used for acquiring an item value corresponding to the tracking item information of the service method to be marked in the request information and configuring the item value as a link tracking identification of a data flow processing process between the service method to be marked and the sub-service method;
a hierarchy determining unit for determining whether the sub-service method includes a next hierarchy;
a return execution unit, configured to, if the sub-service method includes a next level, use the sub-service method as a service method to be marked and return to execute the step of traversing the next level of the service method to be marked to obtain the sub-service method called by the service method to be marked;
and the traversal ending unit is used for ending the process of traversing the service method to be marked if the sub-service methods do not comprise the next level.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the service request call tracing method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the service request call tracing method of any of claims 1 to 5.
CN201911086482.6A 2019-11-08 2019-11-08 Service request call tracking method and device, computer equipment and storage medium Active CN110830577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911086482.6A CN110830577B (en) 2019-11-08 2019-11-08 Service request call tracking method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911086482.6A CN110830577B (en) 2019-11-08 2019-11-08 Service request call tracking method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110830577A true CN110830577A (en) 2020-02-21
CN110830577B CN110830577B (en) 2022-02-11

Family

ID=69553392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911086482.6A Active CN110830577B (en) 2019-11-08 2019-11-08 Service request call tracking method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110830577B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290965A (en) * 2020-03-06 2020-06-16 腾讯科技(深圳)有限公司 Test method, test device, computer equipment and storage medium
CN111427780A (en) * 2020-03-10 2020-07-17 畅捷通信息技术股份有限公司 Method and device for tracking function information and computer readable storage medium
CN111460338A (en) * 2020-03-31 2020-07-28 北京创鑫旅程网络技术有限公司 Information query method and device
CN112134739A (en) * 2020-09-24 2020-12-25 平安科技(深圳)有限公司 Link state tracking method and device, electronic equipment and computer storage medium
CN112286776A (en) * 2020-11-04 2021-01-29 中国电力财务有限公司 Method and system for tracking micro-service link
CN112350890A (en) * 2020-10-27 2021-02-09 广州虎牙科技有限公司 Message processing method, device, server and storage medium
CN113407458A (en) * 2021-07-09 2021-09-17 广州博冠信息科技有限公司 Interface testing method and device, electronic equipment and computer readable medium
CN114817340A (en) * 2022-06-30 2022-07-29 深圳红途科技有限公司 Data tracing method and device, computer equipment and storage medium
CN115118583A (en) * 2022-06-29 2022-09-27 北京奇艺世纪科技有限公司 Log query method and device, electronic equipment and computer readable storage equipment
CN115665098A (en) * 2022-10-11 2023-01-31 浪潮云信息技术股份公司 Transaction recording method under distributed architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070005776A1 (en) * 2005-06-30 2007-01-04 Irontrack Technology, Inc. Method and system to use a telephone extension number to identify a session, such as an internet session that browses real estate information
CN101114930A (en) * 2006-07-26 2008-01-30 华为技术有限公司 Service tracing method and tracing equipment and system
CN102695181A (en) * 2011-03-24 2012-09-26 华为技术有限公司 Signaling tracing method, apparatuses and system
EP2670176A1 (en) * 2012-05-30 2013-12-04 Nagravision S.A. Method for tracking a mobile device onto a remote displaying unit through a mobile switching center and a head-end
CN110262889A (en) * 2019-06-27 2019-09-20 深圳前海微众银行股份有限公司 A kind of link tracing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070005776A1 (en) * 2005-06-30 2007-01-04 Irontrack Technology, Inc. Method and system to use a telephone extension number to identify a session, such as an internet session that browses real estate information
CN101114930A (en) * 2006-07-26 2008-01-30 华为技术有限公司 Service tracing method and tracing equipment and system
CN102695181A (en) * 2011-03-24 2012-09-26 华为技术有限公司 Signaling tracing method, apparatuses and system
EP2670176A1 (en) * 2012-05-30 2013-12-04 Nagravision S.A. Method for tracking a mobile device onto a remote displaying unit through a mobile switching center and a head-end
CN110262889A (en) * 2019-06-27 2019-09-20 深圳前海微众银行股份有限公司 A kind of link tracing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱泽民: "会话跟踪技术及其应用", 《农业网络信息》 *
葛雅川等: "智能变电站基于IEC 61850服务跟踪模型研究", 《中国电力》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290965A (en) * 2020-03-06 2020-06-16 腾讯科技(深圳)有限公司 Test method, test device, computer equipment and storage medium
CN111427780A (en) * 2020-03-10 2020-07-17 畅捷通信息技术股份有限公司 Method and device for tracking function information and computer readable storage medium
CN111460338A (en) * 2020-03-31 2020-07-28 北京创鑫旅程网络技术有限公司 Information query method and device
CN111460338B (en) * 2020-03-31 2023-06-23 北京创鑫旅程网络技术有限公司 Information query method and device
CN112134739A (en) * 2020-09-24 2020-12-25 平安科技(深圳)有限公司 Link state tracking method and device, electronic equipment and computer storage medium
CN112350890B (en) * 2020-10-27 2022-08-19 广州虎牙科技有限公司 Message processing method, device, server and storage medium
CN112350890A (en) * 2020-10-27 2021-02-09 广州虎牙科技有限公司 Message processing method, device, server and storage medium
CN112286776A (en) * 2020-11-04 2021-01-29 中国电力财务有限公司 Method and system for tracking micro-service link
CN113407458A (en) * 2021-07-09 2021-09-17 广州博冠信息科技有限公司 Interface testing method and device, electronic equipment and computer readable medium
CN113407458B (en) * 2021-07-09 2023-07-14 广州博冠信息科技有限公司 Interface testing method and device, electronic equipment and computer readable medium
CN115118583A (en) * 2022-06-29 2022-09-27 北京奇艺世纪科技有限公司 Log query method and device, electronic equipment and computer readable storage equipment
CN115118583B (en) * 2022-06-29 2024-03-26 北京奇艺世纪科技有限公司 Log query method and device, electronic equipment and computer readable storage equipment
CN114817340B (en) * 2022-06-30 2022-09-13 深圳红途科技有限公司 Data tracing method and device, computer equipment and storage medium
CN114817340A (en) * 2022-06-30 2022-07-29 深圳红途科技有限公司 Data tracing method and device, computer equipment and storage medium
CN115665098A (en) * 2022-10-11 2023-01-31 浪潮云信息技术股份公司 Transaction recording method under distributed architecture

Also Published As

Publication number Publication date
CN110830577B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN110830577B (en) Service request call tracking method and device, computer equipment and storage medium
CN110647438B (en) Event monitoring method and device, computer equipment and storage medium
CN109558748B (en) Data processing method and device, electronic equipment and storage medium
CN110362455B (en) Data processing method and data processing device
CN110991154A (en) Report generation method, system, computer equipment and computer readable storage medium
CN110826799B (en) Service prediction method, device, server and readable storage medium
CN111092745A (en) Log processing method and device based on block chain, computer equipment and storage medium
WO2020155508A1 (en) Suspicious user screening method and apparatus, computer device and storage medium
CN111694644A (en) Message processing method and device based on robot operating system and computer equipment
CN110808877A (en) Statistical analysis method and device based on interface response duration and computer equipment
CN114116426A (en) Trace log generation method, device, equipment and medium based on microservice
CN108989365B (en) Information processing method, server, terminal equipment and storage medium
CN112181832B (en) Test data generation method and device, computer equipment and storage medium
CN106790380A (en) Data reporting method and device
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN114817340B (en) Data tracing method and device, computer equipment and storage medium
CN108647139B (en) System test method, device, storage medium and electronic device
CN114860608A (en) Scene construction based system automation testing method, device, equipment and medium
CN115328734A (en) Cross-service log processing method and device and server
CN115242872A (en) Data processing method and device, computer equipment and readable storage medium
CN110147379B (en) Information acquisition method and device based on data lock and computer equipment
CN109040990B (en) Information acquisition method and device, computer equipment and storage medium
CN109508356B (en) Data abnormality early warning method, device, computer equipment and storage medium
CN108471411B (en) Key processing method and device
CN109684342A (en) Data managing method and device

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
GR01 Patent grant
GR01 Patent grant