[go: up one dir, main page]

CN109600254B - Method for generating full-link log and related system - Google Patents

Method for generating full-link log and related system Download PDF

Info

Publication number
CN109600254B
CN109600254B CN201811442226.1A CN201811442226A CN109600254B CN 109600254 B CN109600254 B CN 109600254B CN 201811442226 A CN201811442226 A CN 201811442226A CN 109600254 B CN109600254 B CN 109600254B
Authority
CN
China
Prior art keywords
service
list
calling
program
level list
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.)
Active
Application number
CN201811442226.1A
Other languages
Chinese (zh)
Other versions
CN109600254A (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.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
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 Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN201811442226.1A priority Critical patent/CN109600254B/en
Publication of CN109600254A publication Critical patent/CN109600254A/en
Application granted granted Critical
Publication of CN109600254B publication Critical patent/CN109600254B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method and a related system for generating a full-link log, wherein in the method for generating the full-link log, after a call request is received, whether a service corresponding to the call request belongs to a monitored service is judged; and generating a link log only after the service corresponding to the calling request is called after judging that the service corresponding to the calling request belongs to the monitored service, so that the problem that unnecessary link logs are increased due to the fact that the link log is generated when the service is called for any one request is solved.

Description

Method for generating full-link log and related system
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method for generating a full link log and a related system.
Background
For a request sent by a requestor, it is generally necessary to perform multiple service calls through multiple nodes. The call link formed between nodes from the requester is called a full link. The full link log is used to record the state of each service invoked by the node.
At present, the generation process of the full link log is generally realized by modifying a program for calling a service, so that the service generates and transmits a corresponding link log after being called. However, modifying the program that invokes the service means that a link log needs to be generated when the service is invoked for any one request, which adds many unnecessary link logs.
Disclosure of Invention
Based on the defects of the prior art, the application provides a method and a related system for generating a full link log, so as to solve the problem that unnecessary link logs are increased due to generation of the link log when a service is called for any one request.
To solve the above problems, the following solutions are proposed:
a method for generating a full link log comprises the following steps:
receiving a calling request, wherein the calling request is used for calling a service;
judging whether the service corresponding to the calling request belongs to the monitored service or not;
and if the service corresponding to the calling request belongs to the monitored service, generating a link log after the service corresponding to the calling request is called.
Optionally, in the method, the determining whether the service corresponding to the invocation request belongs to a monitored service includes:
acquiring a list which is preset to be constructed, wherein the list comprises at least one of a blacklist and a white list; the blacklist is used for storing service information which does not need to be monitored, and the white list is used for storing service information which needs to be monitored;
matching the service corresponding to the calling request with the service information in the list;
and if the service corresponding to the calling request is not matched with the service information in the blacklist and/or the service corresponding to the calling request is matched with the service information in the white list, judging that the service corresponding to the calling request belongs to the monitored service.
Optionally, in the above method, the list includes a blacklist, and the blacklist includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services;
the matching the service corresponding to the call request with the service information in the list includes:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the blacklist, and matching the method name of the determined service calling with a program-level list in the blacklist;
and if the determined type information of the service does not belong to a container-level list in the blacklist and the determined type information does not belong to a program-level list in the blacklist, judging that the service corresponding to the call request belongs to the monitored service.
Optionally, in the above method, the list includes a white list, and the white list includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services;
the matching the service corresponding to the call request with the service information in the list includes:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the white list, and matching the determined method name called by the service with a program-level list in the white list;
if the determined type information of the service belongs to a container-level list in the white list and the determined type information belongs to a program-level list in the white list, determining that the service corresponding to the call request belongs to the monitored service.
Optionally, in the above method, the list includes a black list and a white list, and the white list includes a container-level list and a program-level list, and the black list includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services;
the matching the service corresponding to the call request with the service information in the list includes:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container level list of a white list and a container level list of a black list respectively, and matching the determined method name called by the service with a program level list of the white list and a program level list of the black list respectively;
if the determined type information of the service belongs to the container level list of the white list and does not belong to the container level list of the black list, and the determined method name of the service calling belongs to the program level list of the white list and does not belong to the container level list of the black list, the service corresponding to the calling request is judged to belong to the monitored service.
Optionally, in the above method, after the generating the link log, the method further includes:
acquiring a transaction ID and a service call chain sequence number in the call request;
updating the service call chain sequence number;
and generating a calling request according to the transaction ID and the updated service calling chain sequence number, and transmitting the calling request to the next service.
Optionally, in the above method, further comprising:
and if the transaction ID and the service call chain sequence number in the call request cannot be acquired, creating a unique transaction ID and setting the service call chain sequence number as an initial value.
An apparatus for generating a full link log, comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a calling request, and the calling request is used for calling a service;
the judging unit is used for judging whether the service corresponding to the calling request belongs to the monitored service or not;
and the generating unit is used for generating a link log after the service corresponding to the calling request is called if the judging unit judges that the service corresponding to the calling request belongs to the monitored service.
Optionally, in the above apparatus, the determining unit includes:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a list which is preset and constructed, and the list comprises at least one of a black list and a white list; the blacklist is used for storing service information which does not need to be monitored, and the white list is used for storing service information which needs to be monitored;
the matching unit is used for matching the service corresponding to the calling request with the service information in the list;
and if the service corresponding to the calling request is not matched with the service information in the blacklist and/or the service corresponding to the calling request is matched with the service information in the white list, judging that the service corresponding to the calling request belongs to the monitored service.
Optionally, in the above apparatus, the list includes a black list and a white list, and the white list includes a container-level list and a program-level list, and the black list includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit includes:
the determining unit is used for determining the type information of the service corresponding to the calling request and the calling method name;
a matching subunit, configured to match the determined type information of the service with the container-level list of the white list and the container-level list of the black list, respectively, and match the determined method name called by the service with the program-level list of the white list and the program-level list of the black list, respectively;
if the determined type information of the service belongs to the container level list of the white list and does not belong to the container level list of the black list, and the determined method name of the service calling belongs to the program level list of the white list and does not belong to the container level list of the black list, the service corresponding to the calling request is judged to belong to the monitored service.
An electronic device, comprising:
a memory and a processor; wherein the memory is operable to store computer instructions; the processor is configured to execute the computer instructions stored in the memory, and specifically, to execute any one of the methods for generating the full link log.
A storage medium storing a program for implementing the method for generating a full link log according to any one of the above items when the program is executed.
In the method for generating the full-link log, after a call request is received, whether a service corresponding to the call request belongs to a monitored service is judged; and generating a link log only after the service corresponding to the calling request is called after judging that the service corresponding to the calling request belongs to the monitored service, so that the problem that unnecessary link logs are increased due to the fact that the link log is generated when the service is called for any one request is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for generating a full link log according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of one implementation of step S102 disclosed in another embodiment of the present application;
FIG. 3 is a flowchart of one implementation of step S202 disclosed in another embodiment of the present application;
FIG. 4 is a flowchart of one implementation of step S202 disclosed in another embodiment of the present application;
FIG. 5 is a flowchart of one implementation of step S202 disclosed in another embodiment of the present application;
FIG. 6 is a black and white list display diagram disclosed in another embodiment of the present application;
FIG. 7 is a flowchart of a method for generating a full link log according to another embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a full link log generation apparatus according to another embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to another embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The application provides a method and a device for generating a full link log, which are used for solving the problem that unnecessary link logs are increased due to the fact that the link logs are generated when a service is called for any request.
As shown in fig. 1, a method for generating a full link log disclosed in the embodiment of the present application includes the steps of:
s101, receiving a calling request, wherein the calling request is used for calling service.
The requester transmits a call request to the receiver to call each service of the receiver. And after receiving the call request, the receiver serving as any node determines that the call request is used for the requested service, namely the service corresponding to the call request.
S102, judging whether the service corresponding to the calling request belongs to the monitored service.
For a service that needs to be monitored, a node needs to generate a link log. Therefore, after the receiver receives the call request and determines the service corresponding to the call request, it needs to further determine whether the service corresponding to the call request belongs to the monitored service.
As an implementation manner, a tag is set for a monitored service in advance, a call request sent by a sender carries a tag of a service corresponding to the call request, and if the receiver determines that the service corresponding to the call request is the service corresponding to the call request, whether the service corresponding to the call request belongs to the monitored service can be judged by using a tag matching manner.
Optionally, in another embodiment of the present application, in another implementation manner of step S102, two lists may be set, specifically, a black list and a white list, where the black list is used to store the service information that does not need to be monitored, and the white list is used to store the service information that needs to be monitored. In addition, in this embodiment, the service information may also be a tag of the service, and of course, may also be other information as long as the service can be uniquely identified.
Specifically, the determining whether the service corresponding to the invocation request belongs to the monitored service disclosed in this embodiment, as shown in fig. 2, includes:
s201, obtaining a list which is preset and constructed.
In this step, the obtained list includes at least one of a black list and a white list. Therefore, only the white list or only the black list may be acquired, and certainly, the black list and the white list may also be acquired, and whether the service corresponding to the call request belongs to the monitored service is determined through the two lists.
S202, matching the service corresponding to the calling request with the service information in the acquired list.
According to the different lists obtained in step S201, the service corresponding to the call request is matched with the call request. Wherein, the matching in this step means: and comparing the similarity of the service corresponding to the calling request with the service information included in the acquired list, and if the similarity of the service corresponding to the calling request and certain service information included in the list is judged to be higher, indicating that the service corresponding to the calling request is matched with the service information in the list.
Optionally, in another embodiment of the present application, the list acquired in step S201 includes a blacklist, and the blacklist includes a container-level list and a program-level list; wherein the container-level list includes information on a plurality of service types, and the program-level list includes a calling method of a service.
It should be noted that the calling method corresponding to the service may include multiple types, for example: the http service calling method comprises the following steps: save and edit, and the like. However, all of the multiple calling methods of a service need not be monitored, and therefore, in this embodiment, the calling methods of the service to be monitored and the service to be monitored are set by setting the container-level list and the program-level list, respectively.
In addition, if only the service of a specific calling method needs to be monitored, the service can be set by the container-level list and the program-level list.
In this embodiment, an implementation manner of step S202, as shown in fig. 3, includes:
s301, determining the type information of the service corresponding to the calling request and the calling method name.
The requester sends a call request, which may carry the type information of the service requested to be called and the name of the method called, so that the type information of the service and the name of the method called can be directly read from the call request. Of course, if the call request does not include the type information of the service and the called method name, but the call request is used for specifying the called service and the access path of the service, the called service is determined according to the call request, and then the determined type information of the service is acquired. Further, since the access path of the service is the method name of the service call, the method name of the service call may be specified from the call request.
S302, matching the determined type information of the service with a container-level list in the blacklist, and matching the method name of the determined service call with a program-level list in the blacklist.
If the determined type information of the service does not belong to a container-level list in the blacklist and the determined type information does not belong to a program-level list in the blacklist, determining that the service corresponding to the call request belongs to the monitored service.
In this embodiment, the blacklist is used to store service information that does not need to be monitored, so a container-level list in the blacklist stores type information of a service that does not need to be monitored, and a program-level list stores a method for calling a service that does not need to be monitored.
Therefore, the determined type information of the service is matched with the container-level list in the blacklist, and the determined service calling method is matched with the program-level list in the blacklist. And the results of the two matching processes are: and the determined type information of the service does not belong to a container-level list in the blacklist, and the determined type information does not belong to a program-level list in the blacklist, which indicates that the service corresponding to the call request does not belong to the blacklist, and the service needs to be monitored.
Optionally, in another embodiment of the present application, the list acquired in step S201 includes a white list, and the white list includes a container-level list and a program-level list; wherein the container-level list includes information on a plurality of service types, and the program-level list includes a calling method of a service.
In this embodiment, another implementation manner of step S202, as shown in fig. 4, includes:
s401, determining the type information of the service corresponding to the calling request and the calling method name.
S402, matching the determined type information of the service with a container-level list in the white list, and matching the determined method name called by the service with a program-level list in the white list.
If the determined type information of the service belongs to a container-level list in the white list and the determined type information belongs to a program-level list in the white list, determining that the service corresponding to the call request belongs to the monitored service.
In this embodiment, whether the service corresponding to the call request needs to be monitored is determined by using the service information in the white list. Specifically, the determined type information of the service is matched with a container-level list in a white list, and the determined service calling method is matched with a program-level list in the white list.
The result of the two matching processes described above is: and the determined type information of the service belongs to a container-level list in the white list, and the determined type information belongs to a program-level list in the white list, which indicates that the service corresponding to the call request belongs to the white list, and the service needs to be monitored.
Optionally, in another embodiment of the present application, the list acquired in step S201 includes a black list and a white list, and the white list includes a container-level list and a program-level list, and the black list includes a container-level list and a program-level list; wherein the container-level list includes information on a plurality of service types, and the program-level list includes a calling method of a service.
In this embodiment, another implementation manner of step S202, as shown in fig. 5, includes:
s501, determining the type information of the service corresponding to the calling request and the calling method name.
S502, the determined type information of the service is respectively matched with the container level list of the white list and the container level list of the black list, and the determined method name of the service calling is respectively matched with the program level list of the white list and the program level list of the black list.
If the determined type information of the service belongs to the container level list of the white list and does not belong to the container level list of the black list, and the determined method name of the service calling belongs to the program level list of the white list and does not belong to the container level list of the black list, the service corresponding to the calling request is judged to belong to the monitored service.
In this embodiment, in order to determine whether the service corresponding to the invocation request needs to be monitored more fully, the type information of the service corresponding to the invocation request and the invoked method name need to be matched with each other in a black list and a white list.
For example: referring to fig. 6, in the white list, the HTTP service and the JDBC service are included in the container-level list, and the program-level list includes the mysql. In the blacklist, the container-level list includes HTTP services and JDBC services, and the program-level list includes user controller.
When the black list and the white list in the example are used for service monitoring, MySQL.
S203, if the service corresponding to the calling request is not matched with the service information in the blacklist and/or the service corresponding to the calling request is matched with the service information in the white list, judging that the service corresponding to the calling request belongs to the monitored service.
The service information in the black list is not required to be monitored, and the service information in the white list is required to be monitored. Therefore, in step S201, when the obtained list is a blacklist, the service corresponding to the invocation request is not matched with the service information in the blacklist, and it is determined that the service corresponding to the invocation request belongs to the monitored service; in step S201, when the obtained list is a white list, the service corresponding to the call request is matched with the service information in the white list, and it is determined that the service corresponding to the call request belongs to the monitored service; in step S201, when the acquired list includes a white list and a black list, the service corresponding to the invocation request matches with the service information in the white list, and does not match with the service information in the black list, and it is determined that the service corresponding to the invocation request belongs to the monitored service.
If the service corresponding to the call request is determined to belong to the monitored service, step S103 is executed, and after the service corresponding to the call request is called, a link log is generated.
If it is determined in step S102 that the service corresponding to the invocation request belongs to the monitored service, it indicates that a link log needs to be generated, and therefore, after the service corresponding to the invocation request is invoked, a link log is generated. Wherein the link log may include: a transaction ID of the call request, an identification of a receiver of the call request, an identification of a service called by the call request, a call time, a call interface, and the like.
It should be noted that, if in step S102, it is determined that the service corresponding to the invocation request does not belong to the monitored service, the flow of this embodiment may be exited.
Another embodiment of the present application further discloses a method for generating a full link log, as shown in fig. 7, including the steps of:
s701, receiving a calling request, wherein the calling request is used for calling service.
S702, judging whether the service corresponding to the calling request belongs to the monitored service.
If the service corresponding to the call request is determined to belong to the monitored service, step S703 is executed, and after the service corresponding to the call request is called, a link log is generated.
S704, acquiring the transaction ID and the service call chain sequence number in the call request.
The call request received in step S701 may be required for calling a plurality of services. Therefore, after one node receives the call request and generates the link log, the call request needs to be transmitted to the next node. Specifically, in order to indicate that the link corresponding to the call request is a link, the transaction ID and the service call chain sequence number in the call request need to be acquired.
Optionally, in another embodiment of the present application, when it is determined that the transaction ID and the service invocation chain number in the invocation request cannot be obtained, it is determined that the invocation request is the start of the entire link, and therefore, a unique transaction ID needs to be created for the entire link, and the service invocation chain number is set as an initial value.
S705, updating the service call chain sequence number.
In order to distinguish different nodes of the link, the initial value of the service call chain number may be set to 0. And, the service call chain sequence number is updated by adding one on the basis of the original service call chain sequence number, which is used for indicating that the service call chain sequence number passes through one node.
S706, generating a calling request according to the transaction ID and the updated service calling chain sequence number, and transmitting the calling request to the next service.
Specifically, the call request generated in this step is used as a call request to be generated, and one embodiment of the generation manner is as follows: and establishing an association relation among the transaction ID, the updated service call chain sequence number and the call request to be generated, so that the transaction ID and the updated service call chain sequence number can be obtained in the association relation by utilizing the call request to be generated after the call request to be generated is sent to the next service. In another embodiment, the ID and the updated service call chain sequence number may be carried in the call request to be generated, so that the carried transaction ID and the updated service call chain sequence number may be obtained from the call request to be generated.
After the next service receives the call request, whether a link log is generated can be judged according to a black and white list set by the node where the next service is located.
It should be further noted that, in this embodiment, the specific working processes of steps S701 to S703 may refer to the contents of the above embodiments, and are not described herein again.
Another embodiment of the present application further discloses a device for generating a full link log, as shown in fig. 8, including:
a receiving unit 801, configured to receive a call request, where the call request is used to call a service.
A determining unit 802, configured to determine whether a service corresponding to the invocation request belongs to a monitored service.
A generating unit 803, configured to, if the determining unit determines that the service corresponding to the invocation request belongs to the monitored service, generate a link log after the service corresponding to the invocation request is invoked.
For the specific working process of each unit in the embodiment of the present application, reference may be made to the content of the embodiment corresponding to fig. 1, and details are not described here again.
Optionally, in another embodiment of the present application, the determining unit 802 includes:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a list which is preset and constructed, and the list comprises at least one of a black list and a white list; the blacklist is used for storing service information which does not need to be monitored, and the white list is used for storing service information which needs to be monitored.
And the matching unit is used for matching the service corresponding to the calling request with the service information in the list.
And if the service corresponding to the calling request is not matched with the service information in the blacklist and/or the service corresponding to the calling request is matched with the service information in the white list, judging that the service corresponding to the calling request belongs to the monitored service.
For the specific working process of each unit in the embodiment of the present application, reference may be made to the content of the embodiment corresponding to fig. 2, which is not described herein again.
Optionally, in another embodiment of the present application, the list includes a black list and a white list, and the white list includes a container-level list and a program-level list, and the black list includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit includes:
and the determining unit is used for determining the type information of the service corresponding to the calling request and the called method name.
And the matching subunit is configured to match the determined type information of the service with the container level list of the white list and the container level list of the black list, respectively, and match the determined method name of the service call with the program level list of the white list and the program level list of the black list, respectively.
If the determined type information of the service belongs to the container level list of the white list and does not belong to the container level list of the black list, and the determined method name of the service calling belongs to the program level list of the white list and does not belong to the container level list of the black list, the service corresponding to the calling request is judged to belong to the monitored service.
Optionally, in another embodiment of the present application, the list includes a blacklist, and the blacklist includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit is used for:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the blacklist, and matching the method name of the determined service calling with a program-level list in the blacklist;
and if the determined type information of the service does not belong to a container-level list in the blacklist and the determined type information does not belong to a program-level list in the blacklist, judging that the service corresponding to the call request belongs to the monitored service.
Optionally, in another embodiment of the present application, the list includes a white list, and the white list includes a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit is used for:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the white list, and matching the determined method name called by the service with a program-level list in the white list;
if the determined type information of the service belongs to a container-level list in the white list and the determined type information belongs to a program-level list in the white list, determining that the service corresponding to the call request belongs to the monitored service.
For specific working processes of the units disclosed in the foregoing embodiments of the present application, reference may be made to the contents of the corresponding method embodiments, which are not described herein again.
Another embodiment of the present application further discloses an electronic device, as shown in fig. 9, including: a memory 901 and a processor 902; the memory 901 is used for storing computer instructions; the processor 902 is configured to execute the computer instructions stored in the memory 901, and specifically, to execute any one of the methods for generating the full link log described above.
Another embodiment of the present application further discloses a storage medium, which is used for storing a program, and when the program is executed, the storage medium is used for implementing the method for generating the full link log.
In the above-described embodiments of the present application, the implementation may be wholly or partially realized by software, hardware, or a combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer, which may be through a computer, a special purpose computer, a computer network, or other editable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, such as: the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wire (e.g., coaxial cable, twisted pair, fiber optics) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy disks, hard disks, magnetic tape), an optical medium (e.g., compact disks), or a semiconductor medium (e.g., Solid State Disks (SSDs)), among others.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for generating a full link log, comprising:
receiving a calling request, wherein the calling request is used for calling a service;
judging whether the service corresponding to the calling request belongs to the monitored service or not;
if the service corresponding to the calling request is judged to belong to the monitored service, a link log is generated after the service corresponding to the calling request is called;
wherein the judging whether the service corresponding to the call request belongs to the monitored service includes:
acquiring a list which is preset to be constructed, wherein the list comprises at least one of a blacklist and a white list; the blacklist is used for storing service information which does not need to be monitored, and the white list is used for storing service information which needs to be monitored; the blacklist and the white list both comprise a container-level list and a program-level list, wherein the container-level list comprises a plurality of service type information, and the program-level list comprises a service calling method;
matching the service corresponding to the calling request with the service information in the list, wherein the service corresponding to the calling request comprises type information and a calling method name;
and if the service corresponding to the calling request is not matched with the service information in the blacklist and/or the service corresponding to the calling request is matched with the service information in the white list, judging that the service corresponding to the calling request belongs to the monitored service.
2. The method of claim 1, wherein the list comprises a blacklist, and wherein the blacklist comprises a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services;
the matching the service corresponding to the call request with the service information in the list includes:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the blacklist, and matching the method name of the determined service calling with a program-level list in the blacklist;
and if the determined type information of the service does not belong to a container-level list in the blacklist and the determined method name of the service calling does not belong to a program-level list in the blacklist, judging that the service corresponding to the calling request belongs to the monitored service.
3. The method of claim 1, wherein the list comprises a white list, and wherein the white list comprises a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services;
the matching the service corresponding to the call request with the service information in the list includes:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the white list, and matching the determined method name called by the service with a program-level list in the white list;
if the determined type information of the service belongs to a container-level list in the white list and the determined method name of the service call belongs to a program-level list in the white list, the service corresponding to the call request is judged to belong to the monitored service.
4. The method of claim 1, wherein the list comprises a blacklist and a whitelist, and wherein the whitelist comprises a container-level list and a program-level list, and wherein the blacklist comprises a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services;
the matching the service corresponding to the call request with the service information in the list includes:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container level list of a white list and a container level list of a black list respectively, and matching the determined method name called by the service with a program level list of the white list and a program level list of the black list respectively;
if the determined type information of the service belongs to the container level list of the white list and does not belong to the container level list of the black list, and the determined method name of the service calling belongs to the program level list of the white list and does not belong to the program level list of the black list, the service corresponding to the calling request is judged to belong to the monitored service.
5. The method of claim 1, wherein after generating the link log, further comprising:
acquiring a transaction ID and a service call chain sequence number in the call request;
updating the service call chain sequence number;
and generating a calling request according to the transaction ID and the updated service calling chain sequence number, and transmitting the calling request to the next service.
6. The method of claim 5, further comprising:
and if the transaction ID and the service call chain sequence number in the call request cannot be acquired, creating a unique transaction ID and setting the service call chain sequence number as an initial value.
7. An apparatus for generating a full link log, comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a calling request, and the calling request is used for calling a service;
the judging unit is used for judging whether the service corresponding to the calling request belongs to the monitored service or not;
a generating unit, configured to, if the determining unit determines that the service corresponding to the call request belongs to the monitored service, generate a link log after the service corresponding to the call request is called;
wherein, the judging unit comprises:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a list which is preset and constructed, and the list comprises at least one of a black list and a white list; the blacklist is used for storing service information which does not need to be monitored, and the white list is used for storing service information which needs to be monitored; the blacklist and the white list both comprise a container-level list and a program-level list, wherein the container-level list comprises a plurality of service type information, and the program-level list comprises a service calling method;
the matching unit is used for matching the service corresponding to the calling request with the service information in the list, wherein the service corresponding to the calling request comprises type information and a calling method name;
and if the service corresponding to the calling request is not matched with the service information in the blacklist and/or the service corresponding to the calling request is matched with the service information in the white list, judging that the service corresponding to the calling request belongs to the monitored service.
8. The generation apparatus of claim 7, wherein the list comprises a blacklist and a whitelist, and the whitelist comprises a container-level list and a program-level list, and wherein the blacklist comprises a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit includes:
the determining unit is used for determining the type information of the service corresponding to the calling request and the calling method name;
a matching subunit, configured to match the determined type information of the service with the container-level list of the white list and the container-level list of the black list, respectively, and match the determined method name called by the service with the program-level list of the white list and the program-level list of the black list, respectively;
if the determined type information of the service belongs to the container level list of the white list and does not belong to the container level list of the black list, and the determined method name of the service calling belongs to the program level list of the white list and does not belong to the program level list of the black list, the service corresponding to the calling request is judged to belong to the monitored service.
9. The generation apparatus of claim 7, wherein the list comprises a blacklist, and wherein the blacklist comprises a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit is used for:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the blacklist, and matching the method name of the determined service calling with a program-level list in the blacklist;
and if the determined type information of the service does not belong to a container-level list in the blacklist and the determined method name of the service calling does not belong to a program-level list in the blacklist, judging that the service corresponding to the calling request belongs to the monitored service.
10. The generation apparatus of claim 7, wherein the list comprises a white list, and wherein the white list comprises a container-level list and a program-level list; the container-level list comprises information of various service types, and the program-level list comprises calling methods of the services; the matching unit is used for:
determining the type information of the service corresponding to the calling request and the calling method name;
matching the determined type information of the service with a container-level list in the white list, and matching the determined method name called by the service with a program-level list in the white list;
if the determined type information of the service belongs to a container-level list in the white list and the determined method name of the service call belongs to a program-level list in the white list, the service corresponding to the call request is judged to belong to the monitored service.
11. An electronic device, comprising:
a memory and a processor; wherein the memory is operable to store computer instructions; the processor is configured to execute the computer instructions stored in the memory, and in particular, to perform the method for generating a full link log according to any one of claims 1 to 6.
12. A storage medium storing a program for implementing the method of generating a full link log according to any one of claims 1 to 6 when the program is executed.
CN201811442226.1A 2018-11-29 2018-11-29 Method for generating full-link log and related system Active CN109600254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811442226.1A CN109600254B (en) 2018-11-29 2018-11-29 Method for generating full-link log and related system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811442226.1A CN109600254B (en) 2018-11-29 2018-11-29 Method for generating full-link log and related system

Publications (2)

Publication Number Publication Date
CN109600254A CN109600254A (en) 2019-04-09
CN109600254B true CN109600254B (en) 2022-04-26

Family

ID=65959723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811442226.1A Active CN109600254B (en) 2018-11-29 2018-11-29 Method for generating full-link log and related system

Country Status (1)

Country Link
CN (1) CN109600254B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124819B (en) * 2019-12-10 2023-09-22 中国建设银行股份有限公司 Method and device for full link monitoring
CN112363855B (en) * 2020-11-13 2021-06-18 北京基调网络股份有限公司 Call chain data generation method, topology generation method and system and computer equipment
CN114884807B (en) * 2022-05-20 2024-07-19 远景智能国际私人投资有限公司 Link log generation method and device, internet of things platform and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203039704U (en) * 2012-08-07 2013-07-03 北京鼎震科技有限责任公司 Web log storage system
CN105653943A (en) * 2015-12-24 2016-06-08 北京奇虎科技有限公司 Log auditing method and system for android applications

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9367813B2 (en) * 2011-10-28 2016-06-14 Xerox Corporation Methods and systems for identifying frequently occurring intradomain episodes and interdomain episodes in multiple service portals using average user session length
CN103220277B (en) * 2013-04-01 2016-12-28 新浪技术(中国)有限公司 The monitoring method of cross-site scripting attack, Apparatus and system
CN104346365B (en) * 2013-07-30 2017-10-13 阿里巴巴集团控股有限公司 It is determined that the method and apparatus of the association daily record related to specific transactions
CN104065657A (en) * 2014-06-26 2014-09-24 北京思特奇信息技术股份有限公司 Method for dynamically controlling user behavior based on IP access and system thereof
CN105827522A (en) * 2015-11-10 2016-08-03 广东亿迅科技有限公司 Gateway equipment for processing log files
CN106777371B (en) * 2017-01-23 2019-12-06 北京齐尔布莱特科技有限公司 Log collection system and method
CN108462598B (en) * 2017-02-21 2022-03-11 阿里巴巴集团控股有限公司 Log generation method, log analysis method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203039704U (en) * 2012-08-07 2013-07-03 北京鼎震科技有限责任公司 Web log storage system
CN105653943A (en) * 2015-12-24 2016-06-08 北京奇虎科技有限公司 Log auditing method and system for android applications

Also Published As

Publication number Publication date
CN109600254A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
EP3817333B1 (en) Method and system for processing requests in a consortium blockchain
CN109213604B (en) Data source management method and device
CN109600254B (en) Method for generating full-link log and related system
CN110825309B (en) Data reading method, device and system, distributed system
CN103370695A (en) Database update notification method
CN115118583A (en) Log query method and device, electronic equipment and computer readable storage equipment
CN112579682A (en) Data model change notification method and device, electronic device and storage medium
CN110619022B (en) Node detection method, device, equipment and storage medium based on block chain network
CN116383081A (en) Software testing method, system, storage medium and electronic device
CN115037693B (en) Distributed current limiting method and distributed current limiting device based on token bucket
CN110930253A (en) Intelligent contract internal main key generation method and device, computer equipment and storage medium
CN113342275B (en) Method, apparatus and computer readable storage medium for accessing data at block link points
CN110784479B (en) Data verification method and device, electronic equipment and storage medium
CN110213314B (en) Method, device and server for determining storage node
CN113535780A (en) User request processing method and device, computer equipment and storage medium
CN113360939A (en) Control method and device for security access
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN113672248A (en) A patch acquisition method, device, server and storage medium
CN110347632B (en) Communication method and device
CN112732471A (en) Error correction method and error correction device for interface return data
CN113572824B (en) Dynamic updating method and device for timeout duration, electronic equipment and storage medium
CN113986987B (en) A method and device for identifying abnormal users
CN113778969B (en) A log processing method and device
CN116155772B (en) Abnormality determination method and device, electronic equipment and storage medium
CN113938465B (en) Information sending method and device, electronic equipment and storage medium

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