CN115865832A - Service link generation method and device, electronic equipment and storage medium - Google Patents

Service link generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115865832A
CN115865832A CN202211059650.4A CN202211059650A CN115865832A CN 115865832 A CN115865832 A CN 115865832A CN 202211059650 A CN202211059650 A CN 202211059650A CN 115865832 A CN115865832 A CN 115865832A
Authority
CN
China
Prior art keywords
information
service
service node
traffic
traffic information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211059650.4A
Other languages
Chinese (zh)
Inventor
高深
王旭亮
武宇亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211059650.4A priority Critical patent/CN115865832A/en
Publication of CN115865832A publication Critical patent/CN115865832A/en
Priority to PCT/CN2023/111049 priority patent/WO2024046027A1/en
Pending legal-status Critical Current

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/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/78Architectures of resource allocation
    • H04L47/783Distributed allocation of resources, e.g. bandwidth brokers

Abstract

The embodiment of the application discloses a method and a device for generating a service link, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a plurality of pieces of flow information, and determining service information corresponding to the plurality of pieces of flow information according to the plurality of pieces of flow information; the service information is used for representing the flow direction of the traffic; determining a service node corresponding to each flow information and an adjacent service node of the service node corresponding to each flow information according to the service information corresponding to the flow information; and splicing the service node corresponding to each flow information with the adjacent service node to obtain a service link. The technical scheme of the embodiment of the application can realize distributed tracking without invasion.

Description

Service link generation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a service link, an electronic device, and a computer-readable storage medium.
Background
The cloud native business system comprises a large number of nodes, containers, services and other components, and is a brand new mode of product research and development and operation based on the idea of micro-service architecture and taking container technology as a carrier. The service system under the micro-service architecture has the advantages of flexible development, convenient expansion and the like, but also brings new challenges for operation and maintenance work. In the cloud native business system, due to the black-boxing of the application service in the cloud native business system, fault location and problem troubleshooting are more difficult compared with a traditional virtual machine. To this end *** first proposed the idea of distributed tracking and issued a tracking system Dapper. After that, distributed tracking systems such as Zipkin, pinpoint, jaeger, skywalking and the like are successively released by each large enterprise and an open source community, so that the observability of a service system under a micro-service architecture is enhanced, and the operation and maintenance difficulty and cost are reduced.
At present, two technical routes are mainly adopted for corresponding tools of a mainstream distributed tracking system. One is an SDK (Software Development Kit) based method, and the implementation of distributed trace by this method requires modification of the source code of the service system, which may increase Development cost and may have a certain impact on the performance of the original service. The other method is an agent-based method, which mainly aims at non-compiled languages such as Java and the like, and realizes tracking by inserting a new method into a class loader in the running process of the method, but the method can only be deployed in a business system realized under a specific language and has certain limitation.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present application provide a method and an apparatus for generating a service link, an electronic device, and a computer-readable storage medium, which are used to solve the technical problem that existing distributed tracking needs to be performed in a specific language environment or a business system needs to be modified.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a method for generating a service link, including:
acquiring a plurality of pieces of flow information, and determining service information corresponding to the plurality of pieces of flow information according to the plurality of pieces of flow information; the service information is used for representing the flow direction of the traffic;
determining a service node corresponding to each flow information and an adjacent service node of the service node corresponding to each flow information according to the service information corresponding to the flow information;
and splicing the service node corresponding to each flow information with the adjacent service node to obtain a service link.
According to an aspect of an embodiment of the present application, there is provided an apparatus for generating a service link, including:
the acquisition module is configured to acquire a plurality of pieces of traffic information and determine service information corresponding to the plurality of pieces of traffic information according to the plurality of pieces of traffic information; the service information is used for representing the flow direction of the traffic;
the determining module is configured to determine a service node corresponding to each piece of traffic information and an adjacent service node of the service node corresponding to each piece of traffic information according to the service information corresponding to the plurality of pieces of traffic information;
and the splicing module is configured to splice the service node corresponding to each piece of traffic information with the adjacent service node to obtain a service link.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the method for generating a service link as described above.
According to an aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon computer-readable instructions, which, when executed by a processor of a computer, cause the computer to execute the method for generating a service link as described above.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method for generating a service link provided in the various alternative embodiments described above.
In the technical scheme provided by the embodiment of the application, the corresponding service node and the adjacent service node are determined through the service information corresponding to the flow information, and then the whole complete service link is obtained, so that distributed tracking is realized, the limitation that a distributed tracking tool has invasiveness on a service system is broken through, the service system is not required to be modified, the service system can be subjected to distributed tracking without intrusiveness, the insertion of piles in codes is not required, and class loaders are not required to be modified during the code running.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 is a schematic structural diagram of a service link generation system according to the present application;
fig. 2 is a flow chart of a method of generating a service link to which the present application relates;
FIG. 3 is a flowchart of step S220 in one embodiment to which the present application relates;
FIG. 4 is a flowchart of step S310 in one embodiment to which the present application relates;
FIG. 5 is a flowchart of step S420 in one embodiment to which the present application relates;
fig. 6 is a flowchart of step S310 in another embodiment to which the present application relates;
FIG. 7 is a flowchart of step S610 in one embodiment to which the present application relates;
FIG. 8 is a flow chart of another method of service link generation to which the present application relates;
fig. 9 is a block diagram of a service link generation apparatus according to the present application;
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should also be noted that: reference to "a plurality" in this application means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The microservice architecture is a distributed architecture that partitions service units by service, and a distributed system often has many service units. Due to the large number of service units and the complexity of the service, if errors and exceptions occur, the positioning is difficult to carry out. This is mainly reflected in that a request may require a lot of services to be invoked, and the complexity of internal service invocation determines that it is difficult to locate after errors and exceptions occur. Therefore, in the micro-service architecture, distributed link tracking must be realized to follow up which services participate in a request, and the participation sequence is in any order, so that the steps of each request are clearly visible, and a certain service unit can be positioned quickly when a problem occurs.
For example, in a microservice system, a request from a user needs to go through a plurality of services, the request first reaches a front end (such as a front end interface), then reaches middleware (such as load balancing, a gateway and the like) of the microservice system through remote invocation, and finally reaches a back end service, and the back end returns data corresponding to the request to the user after a series of business logic calculations. For such a request, the session needs to go through multiple services, and the service link can record the data of its request process.
The micro-service architecture divides services through services, a plurality of services may be needed to cooperate to complete a corresponding function of an interface exposed to the outside through REST calling, and if any one service on a service link has a problem or a network is overtime, interface calling failure is caused. With the continuous expansion of services, the mutual calling between services becomes more and more complex.
As mentioned in the background, the existing distributed tracking tools all have certain drawbacks, and therefore, the present application provides a new service link generation system, please refer to fig. 1, where fig. 1 is a schematic structural diagram of the service link generation system related to the present application. The generation system of the service link comprises a service information extraction module, a link generation module, a threshold calculation module and an operation and maintenance display module, wherein the modules can communicate with one another through a wired or wireless network, and the detailed introduction of the specific functions of the modules is as follows:
the service information extraction module acquires application layer network flow by using a service grid, obtains a plurality of flow information, and determines service information corresponding to the plurality of flow information. Specifically, the service grid is a new micro-service architecture and is used for solving a series of problems of mutual discovery between services, service flow management and the like in a multi-language micro-service architecture scene. In the service grid architecture, each business process has a companion Sidecar process for proxying the Inbound traffic and Outbound traffic of the business process. For a micro service, the traffic accessing the micro service is called Inbound traffic; the traffic that this microservice accesses other microservices is called Outbound traffic, i.e., egress traffic. All the Inbound traffic and the Outbound traffic of the service process are proxied through the accompanying Sidecar process and then handed over to the service process for processing. All the Sidecar processes in the micro-service architecture are connected with each other to form a grid structure, so the micro-service architecture is called a service grid architecture. For example, the ingress traffic Inbound of a micro-service M may be redirected to the side car process corresponding to the micro-service M by using a traffic redirection technology (e.g., iptables rule), and the ingress traffic Inbound is processed by the side car process and then sent to the micro-service M; the egress traffic Outbound of one microservice M accessing another microservice N is redirected to the sidecr process corresponding to the microservice M, processed by the sidecr process, and then sent to another microservice N. Similarly, the ingress traffic Inbound of the microservice N is redirected to the sidecr process corresponding to the microservice N, and is processed by the sidecr process corresponding to the microservice N and then sent to the microservice N; the egress traffic Outbound of the microservice N is also redirected to the sid process corresponding to the microservice N, and is processed by the sid process and then sent to the target service process.
And the link generation module determines a corresponding service node and an adjacent service node according to the service information of each flow information by utilizing the characteristic that the service processing service flow delay has fixity, and then splices the service nodes to generate the service link.
The threshold calculation module performs multiple tests on various services processed by each service node in the micro-service system, records service processing time delay, calculates a time delay average value and a standard deviation, and generates a service processing time threshold according to the time delay average value and a standard layer, so that the link generation module can determine corresponding first target flow and second target flow when a service link is generated.
The operation and maintenance display module is used for displaying the generated service link in real time so that operation and maintenance personnel can observe, analyze, study and judge the service link and the like.
The service link generation system provided in the embodiment of the application implements a service link generation method through the combined action of modules, obtains application layer network traffic by using a service grid, matches each current service node with a corresponding second target traffic by using the characteristic that service processing service flow delay has fixity, further determines a corresponding adjacent next service node, and generates an operation and maintenance reliable service link. According to the method and the device, the corresponding service node and the adjacent service node are determined through the service information corresponding to the flow information, and then the whole complete service link is obtained, the limitation that a distributed tracking tool has invasiveness on the service system is broken through, distributed tracking can be conducted on the service system without invasiveness, the insertion of a pile in a code is not needed, or a class loader is modified when the code runs, the service grid is used for collecting the flow of an application layer, the flow information is guided into a kernel to be calculated and the service link is generated, and the normal operation of the service system cannot be influenced in the whole process.
Fig. 2 is a flow chart illustrating a method of generation of a service link in accordance with an example embodiment. The method can be applied to the generation system of the service link shown in fig. 1, and is executed by each module in the generation system of the service link shown in fig. 1.
As shown in fig. 2, in an exemplary embodiment, the method for generating the service link may include steps S210 to S230, which are described in detail as follows:
step S210, obtaining a plurality of flow information, and determining service information corresponding to the plurality of flow information according to the plurality of flow information; the service information is information for characterizing traffic flow direction.
In the embodiment of the application, the service grid is used for obtaining the network flow of the application layer, obtaining a plurality of flow information, and determining the service information corresponding to each flow information, wherein the service information indicates the flow direction of each flow information, that is, the flow information is indicated to flow from a certain service node to a certain service node. As described above, each traffic information needs to flow into the Sidecar process for processing, and then the Sidecar process sends the processed traffic information to the corresponding service node, so that the source service information and the destination service information corresponding to each traffic information are determined according to the result of the Sidecar process processing. Therefore, the source service information and the destination service information corresponding to each traffic information are set as the service information of the corresponding traffic information.
Step S220, according to the service information corresponding to the multiple pieces of traffic information, a service node corresponding to each piece of traffic information and a service node adjacent to the service node corresponding to each piece of traffic information are determined.
In the embodiment of the application, each piece of traffic information has corresponding service information, and since the service information indicates the traffic flow direction of each piece of traffic information, a service node corresponding to each piece of traffic information and an adjacent service node corresponding to each service node can be determined according to the service information. In this embodiment of the application, the adjacent service node may be an adjacent previous service node of the corresponding service node or an adjacent next service node of the corresponding service node, where the adjacent previous service node represents the corresponding traffic information and is sent to the current service node by the previous service node, and similarly, the adjacent next service node represents the corresponding traffic information and is sent to the next service node by the corresponding service node.
In an exemplary embodiment of the present application, referring to fig. 3, the service information includes source service information and destination service information, and the plurality of traffic information includes a plurality of first traffic information and a plurality of second traffic information; in step S220, according to the service information corresponding to the plurality of pieces of traffic information, a service node corresponding to each piece of traffic information and a service node adjacent to the service node corresponding to each piece of traffic information are determined, which includes step S310 and step S320, and the following details are introduced:
step S310, determining a current service node according to the source service information of each first traffic information, and determining a next service node adjacent to the current service node according to the current service node and the destination service information of each second traffic information.
In this embodiment, the first traffic information is outbound traffic information indicating egress traffic, the second traffic information is inbound traffic information indicating ingress traffic, and the service information of the first traffic information and the second traffic information is corresponding source service information and destination service information.
The source service information indicates which service node the corresponding flow information is sent, the current service node is determined according to the source service information of the first flow information, and the target service information indicates that the corresponding flow information needs to be sent to a specific certain service node, so that the next adjacent service node of the current service node can be determined according to the current service node and the target service information of the second flow information.
Step S320, using the next service node adjacent to the current service node as the current service node, and skipping to execute the step of determining the next service node adjacent to the current service node according to the current service node and the destination service information of each second traffic information until the next service node adjacent to the current service node is not determined according to the current service node and the destination service information of each second traffic information.
In the embodiment of the application, after a current service node is determined, a next adjacent service node of the current service node is determined, the next adjacent service node of the current service node is taken as the current service node, and the step of determining the next adjacent service node of the current service node according to the current service node and the destination service information of each piece of second traffic information is skipped to, so that the next adjacent service node is further determined, and the next adjacent service node is cycled for many times until the next adjacent service node of the current service node is not determined according to the destination service information of the current service node and each piece of second traffic information. Specifically, when a new current service node is obtained, it is determined whether source service information of first traffic information exists as a latest current service node in the plurality of first traffic information, if the source service information of the first traffic information exists as the latest current service node, that is, a next service node of the latest current service node exists, and when the source service information of the first traffic information does not exist in the plurality of first traffic information is the latest current service node, it is determined that the current service node does not exist to send traffic information to other service nodes, that is, the current service node is an end service node of a service link, and a complete service link can be obtained by splicing all the determined service nodes.
In other embodiments, a current service node may be determined by traversing one piece of first traffic information according to the time stamps of the first traffic information and the sequence of the time stamps, and then a next adjacent service node of the current service node may be determined according to the current service node and the destination service information of each piece of second traffic information; and traversing a first traffic information according to the timestamp to determine a current service node, determining a next adjacent service node of the current service node according to the current service node and the target service information of each second traffic information, determining the current service node and the corresponding next service node according to all the first traffic information, and correspondingly splicing to obtain a service link.
In an exemplary embodiment of the present application, referring to fig. 4, the determining a current service node according to source service information of each first traffic information in step S310 includes steps S410 to S430, which are described in detail as follows:
step S410, sorting the first traffic information according to the timestamp of the first traffic information, so as to obtain a traffic information sequence.
In the embodiment of the application, the time stamps of all the flow information are recorded, and the first flow information is sequenced according to the time stamps of the first flow information to obtain a flow information sequence.
Step S420, sequentially matching the source service information of each first traffic information with the destination service information of the plurality of second traffic information according to the traffic information sequence.
In the embodiment of the application, the sequenced first traffic information is traversed, and the source service information of each first traffic information is sequentially matched with the target service information of the second traffic information according to the sequence of the timestamps.
Step S430, if the source service information of the first traffic information is not matched with the destination service information of the plurality of second traffic information, determining an initial service node according to the source service information of the first traffic information, and using the initial service node as a current service node.
In the embodiment of the present application, when source service information of a certain first traffic information does not match destination service information of multiple second traffic information, it is characterized that no second traffic information is sent to a service node corresponding to the source service information of the first traffic information, that is, it can be determined that the service node corresponding to the source service information of the first traffic information is an initial service node of the entire service link, and the initial service node is used as a current service node, so as to further determine a next service node adjacent to the initial service node.
In an exemplary embodiment of the present application, referring to fig. 5, in step S420, sequentially matching the source service information of each first traffic information with the destination service information of a plurality of second traffic information, respectively, includes steps S510 to S530, which are described in detail as follows:
step S510, a first preset time period of each first traffic information is obtained, and a first time range corresponding to each first traffic information is determined according to the first preset time period and the timestamp of each first traffic information.
In this embodiment of the present application, when matching source service information of first traffic information with destination service information of a plurality of second traffic information, each first traffic information has a corresponding first preset time period, where the first preset time period may be different from a service processing time threshold of a service node corresponding to the source service information of the corresponding first traffic information. In other embodiments, the first preset time period of each first traffic information may be the same.
During the traversal of the first flow information, a corresponding first preset time period is forwards pushed along a timestamp corresponding to the traversed first flow information, a corresponding first time range is formed according to the time obtained by the forward pushing and the corresponding timestamp, and each piece of first flow information can obtain a corresponding first time range.
Step S520, determining the second traffic information with the timestamp within the first time range as the first target traffic of the corresponding first traffic information.
In the embodiment of the application, each traversed first traffic information takes the second traffic information with the timestamp within the first time range as the first target traffic corresponding to the first traffic information.
Step S530 detects whether the source service information of each first traffic information matches the destination service information of the corresponding first target traffic.
In the embodiment of the application, the source service information of each first traffic information is matched with the destination service information of the corresponding first target traffic, the source service information of each first traffic information does not need to be matched with all the destination services of the second traffic information, the calculated amount related to matching is reduced, meanwhile, the service node processing service flow delay has the characteristic of fixity, the corresponding first target traffic is determined for each first traffic information, and the matching is performed in the first target traffic, so that the matching can be performed more accurately, and further, a reliable service link for operation and maintenance can be generated subsequently.
In an exemplary embodiment of the present application, referring to fig. 6, the step S310 of determining the next service node adjacent to the current service node according to the current service node and the destination service information of each second traffic information includes steps S610 and S620, which are described in detail as follows:
step S610, detecting whether the source service information of each second traffic information matches the current service node.
In the embodiment of the application, the current service node is matched with the source service information of the second traffic information, and when the current service node is matched with the source service information of the second traffic information, the second traffic information is represented to be sent to the destination service node corresponding to the corresponding destination service information through the Sidecar process after being sent to the corresponding Sidecar process by the current service node.
Step S620, if the source service information of the second traffic information matches the current service node, determining a next service node adjacent to the current service node according to the destination service information of the second traffic information.
In this embodiment of the application, when the source service information of the second traffic information is matched with the current service node, the destination service node corresponding to the destination service information of the second traffic information may be directly used as the next service node adjacent to the current service node.
In an exemplary embodiment of the present application, referring to fig. 7, detecting whether the source service information of each second traffic information matches the current service node in step S610 includes steps S710 to S730, which are described in detail as follows:
step S710, a second preset time period of the current service node is obtained, and a second time range of the current service node is determined according to the timestamp of the current service node and the second preset time period.
In the embodiment of the application, the second preset time period is a service processing time threshold of the corresponding current service node, the service processing time threshold is a service processing time threshold for performing multiple tests on various services processed by the service node in the micro-service system, the service processing time delay of the service node is recorded, the average value and the standard deviation of the time delay are calculated, and then the service processing time threshold is generated according to the average value and the standard deviation of the time delay, the service processing time threshold is represented in the threshold, and the service node completes service processing under normal conditions. Likewise, the second preset time period may be different for each current serving node. In other embodiments, the second preset time period may be the same for each current serving node.
When the current service node is matched with the source service information of each second flow information, a corresponding second preset time period is pushed backwards along a time stamp corresponding to the current service node, a corresponding second time range is formed according to the corresponding time stamp and the time obtained by pushing backwards, and each current service node can obtain a corresponding second time range.
Step S720, determining second traffic information with a timestamp in a second time range as a second target traffic of the current service node.
In this embodiment of the application, each current time node determines second traffic information with a timestamp located in a corresponding second time range as a corresponding second target traffic. If some current service nodes do not have corresponding second target traffic, that is, after the current service nodes pass through a second preset time period, no second traffic information is sent, and at this time, the current service nodes can be determined as end service nodes.
Step S730, detecting whether the current service node is respectively matched with the source service information of the corresponding second target traffic.
In the embodiment of the application, when the current service node is matched with the source service information of each second traffic information, the current service node is only matched with the corresponding second target traffic, the current service node is not required to be matched with all the source service information of the second traffic information, the calculated amount of matching is reduced, meanwhile, the service node processing traffic delay has the characteristic of fixity, the corresponding first target traffic is determined for each first traffic information, the matching is removed in the second target traffic, the next adjacent service node of the current service node can be matched more accurately, and then the operation and maintenance reliable service link can be generated subsequently.
In one exemplary embodiment of the present application, the service information includes source service information and destination service information; in step S220, according to the service information corresponding to the multiple pieces of traffic information, determining a service node corresponding to each piece of traffic information and a service node adjacent to the service node corresponding to each piece of traffic information includes:
and determining a service node corresponding to each flow message according to the source service message, and determining a service node adjacent to the service node corresponding to each flow message according to the target service message.
In the embodiment of the application, the service information of the traffic information can represent that the traffic information is sent by a certain service node and finally reaches the certain service node, so that the service node corresponding to the corresponding traffic information is determined according to the source service information of the traffic information, and then the adjacent service node is determined according to the target service information.
In an embodiment, the plurality of traffic information includes a plurality of first traffic information and a plurality of second traffic information, and the corresponding service node and the neighboring service node may be determined only by the service information of the first traffic information or the second traffic information, and the determination is not required to be performed according to all the traffic information, so that the calculation amount can be reduced to a certain extent.
Step S230, the service node corresponding to each traffic information is spliced with the adjacent service node to obtain a service link.
In the embodiment of the application, each service node and the corresponding adjacent service node are spliced to form a plurality of service node pairs, then the service network deployment position is obtained, and all the service node pairs generate a complete service link according to the service grid deployment position.
In the embodiment of the application, the corresponding service node and the adjacent service nodes are determined through the service information corresponding to the flow information, so that the whole complete service link is obtained, the limitation that a distributed tracking tool has invasiveness on a service system is broken through, the distributed tracking can be performed on the service system without invasiveness, the insertion of a pile in a code is not needed, or a class loader is modified when the code runs, the service grid is used for collecting the flow of an application layer and guiding the flow information into a kernel for calculation and generating the service link, and the normal operation of the service system cannot be influenced in the whole process.
In an exemplary embodiment of the present application, please refer to fig. 8, where fig. 8 is a method for generating a service link according to an exemplary embodiment, where the method includes steps S810 to S880, and the following is described in detail:
step S810, acquiring a plurality of flow information, and determining service information corresponding to the plurality of flow information according to the plurality of flow information; the service information is used for representing the flow direction of the traffic; the service information includes source service information and destination service information, and the plurality of traffic information includes a plurality of first traffic information and a plurality of second traffic information.
In the embodiment of the application, as described above, the service grid is used to obtain the network traffic of the application layer, obtain a plurality of traffic information, and determine the service information corresponding to each traffic information, where the plurality of traffic information includes two types of traffic information.
Step S820, sorting the first traffic information according to the timestamp of the first traffic information, to obtain a traffic information sequence.
In the embodiment of the application, all the first traffic information is sequenced according to the time stamps to obtain a traffic information sequence, and the first traffic information with the earlier time stamps is sequenced at the earlier position and is sequentially processed according to the time stamps. And during subsequent traversal, if the first traffic information is traversed, deleting the first traffic information from the traffic information sequence, so as to avoid subsequent repeated traversal.
And step S830, sequentially matching the source service information of each first traffic information with the corresponding first target traffic according to the traffic information sequence, and determining whether the service node corresponding to the source service information of the first traffic information is the initial service node according to the matching result.
In the embodiment of the application, according to the traffic information sequence, each piece of first traffic information is sequentially traversed, each piece of first traffic information is provided with a corresponding first target traffic as in steps S510 to S530, and each piece of first traffic information is matched with the corresponding first target traffic to determine whether the first traffic information is an initial service node.
Step 840, if the matching result represents that the service node corresponding to the source service information of the first traffic information is an initial service node, taking the initial service node as a current service node; and if the service node corresponding to the source service information of the first flow information is not the initial service node, taking the service node corresponding to the source service information of the first flow information as the current service node.
In the embodiment of the application, if the initial service node is determined, the initial service node is used as the current service node, and if the service node corresponding to the source service information of the first traffic information is not the initial service node, the service node corresponding to the source service information of the first traffic information is directly used as the current service node.
Step S850, matching the current service node with the source service information of the corresponding second target traffic.
In this embodiment of the application, each current service node is provided with a corresponding second target traffic as described in steps S710 to S730, and the current service node is matched with the corresponding second target traffic.
In step S860, if the current service node matches the source service information of the corresponding second target traffic, the service node corresponding to the destination service information of the second target traffic is used as the next service node adjacent to the current service node.
In this embodiment of the present application, if the current service node matches the source service information of the corresponding second target traffic, which indicates that the second target traffic is sent based on the current service node, it may be determined that the service node corresponding to more destination service information of the second target traffic is the next service node adjacent to the current service node. When determining the next service node adjacent to the current service node, the current service node may be matched with the source service information of the plurality of second target flows, indicating that the next service node adjacent to the current service node may include a plurality of nodes.
Step S870, splicing the current service node and the next adjacent service node, and taking the next adjacent service node as the current service node, and skipping to perform the step of matching the current service node with the source service information of the corresponding second target traffic.
In the embodiment of the application, the current service node and the next adjacent service solution are spliced, the next adjacent service node is used as the current service node, and when the number of the next adjacent service nodes is multiple, the multiple next adjacent service nodes are used as the current service node to further determine the next adjacent service node. And after multiple cycles, splicing all the current service nodes and the next adjacent service node to obtain the corresponding service link.
Step S880, if the current service node is not matched with the source service information of the corresponding second target traffic, determining that the current service node is an end service node, and obtaining a service link.
In this embodiment of the present application, when the current service node is not matched with the source service information of the corresponding second target traffic, it may be that the current service node does not have the corresponding second target traffic, or the current service node has the corresponding second target traffic, but the service node corresponding to the source service information of the corresponding second target traffic is different from the current service node, in both cases, it may be considered that the current service node is not matched with the corresponding second target traffic, and when the current service node is not matched with the corresponding second target traffic, the current service node is taken as an end service node, and a service link is obtained.
In the embodiment of the application, when service nodes are called, corresponding application layer data packets are generated in an application layer, and one application layer data packet only contains service communication information once. According to the method and the device, the corresponding service node and the adjacent service node are determined through the service information corresponding to the flow information, and then the whole complete service link is obtained, the limitation that a distributed tracking tool has invasiveness on the service system is broken through, the distributed tracking can be performed on the service system without invasiveness, the insertion of a pile in a code is not needed, or a class loader is modified when the code runs, the service grid is used for collecting the flow of an application layer, the flow information is guided into a kernel to be calculated and generate the service link, and the normal operation of the service system cannot be influenced in the whole process.
In an exemplary embodiment of the present application, please refer to fig. 9, fig. 9 is a generating apparatus of a service link according to an exemplary embodiment, including:
an obtaining module 910, configured to obtain a plurality of pieces of traffic information, and determine service information corresponding to the plurality of pieces of traffic information according to the plurality of pieces of traffic information; the service information is used for representing the flow direction of the traffic;
a determining module 920, configured to determine, according to the service information corresponding to the multiple pieces of traffic information, a service node corresponding to each piece of traffic information and a service node adjacent to the service node corresponding to each piece of traffic information;
the splicing module 930 is configured to splice the service node corresponding to each piece of traffic information with the neighboring service node to obtain a service link.
In an exemplary embodiment of the present application, the service information includes source service information and destination service information, and the plurality of traffic information includes a plurality of first traffic information and a plurality of second traffic information; a determining module 920, comprising:
the first determining submodule is configured to determine a current service node according to source service information of each first traffic information, and determine an adjacent next service node of the current service node according to the current service node and destination service information of each second traffic information;
and the skip submodule is configured to take the next adjacent service node of the current service node as the current service node, and skip to execute the step of determining the next adjacent service node of the current service node according to the current service node and the target service information of each piece of second traffic information until the next adjacent service node of the current service node is not determined according to the current service node and the target service information of each piece of second traffic information.
In an exemplary embodiment of the present application, the first determining sub-module includes:
the sequencing unit is configured to sequence the first traffic information according to the timestamp of the first traffic information to obtain a traffic information sequence;
the matching unit is configured to sequentially match the source service information of each first traffic information with the target service information of the plurality of second traffic information according to the traffic information sequence;
and the first determining unit is configured to determine an initial service node according to the source service information of the first traffic information and take the initial service node as a current service node if the source service information of the first traffic information is not matched with the destination service information of the plurality of second traffic information.
In an exemplary embodiment of the present application, a matching unit includes:
the first acquiring subunit is configured to acquire a first preset time period of each piece of first traffic information, and determine a first time range corresponding to each piece of first traffic information according to the first preset time period and the timestamp of each piece of first traffic information;
a first determining subunit configured to determine second traffic information with a timestamp within a first time range as a first target traffic of the corresponding first traffic information; and detecting whether the source service information of each first flow information is respectively matched with the target service information of the corresponding first target flow.
In an exemplary embodiment of the present application, the first determination submodule includes:
the detection unit is configured to detect whether source service information of each second traffic information is matched with a current service node;
and the second determining unit is configured to determine the next adjacent service node of the current service node according to the destination service information of the second traffic information if the source service information of the second traffic information matches with the current service node.
In an exemplary embodiment of the present application, a detection unit includes:
the second obtaining subunit is configured to obtain a second preset time period of the current service node, and determine a second time range of the current service node according to the timestamp of the current service node and the second preset time period;
the second determining subunit is configured to determine second traffic information with a timestamp within a second time range as a second target traffic of the current service node;
and the detection subunit is configured to detect whether the current service node is respectively matched with the source service information of the corresponding second target traffic.
In an exemplary embodiment of the present application, the service information includes source service information and destination service information; a determining module 920, comprising:
and the second determining submodule is configured to determine a service node corresponding to each piece of traffic information according to the source service information, and determine an adjacent service node of the service node corresponding to each piece of traffic information according to the destination service information.
It should be noted that the apparatus provided in the foregoing embodiment and the method provided in the foregoing embodiment belong to the same concept, and specific ways for each module, sub-module, unit, and sub-unit to perform operations have been described in detail in the method embodiment, and are not described herein again.
An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the electronic device to implement the method for generating a service link provided in the foregoing embodiments.
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use to implement the electronic device of the embodiments of the subject application.
It should be noted that the computer system 1000 of the electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU) 1001 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage portion 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for system operation are also stored. The CPU1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An Input/Output (I/O) interface 1005 is also connected to the bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. When the computer program is executed by a Central Processing Unit (CPU) 1001, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Yet another aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various embodiments described above.
The above description is only a preferred exemplary embodiment of the present application, and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make various changes and modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for generating a service link, comprising:
acquiring a plurality of pieces of flow information, and determining service information corresponding to the plurality of pieces of flow information according to the plurality of pieces of flow information; the service information is information for characterizing traffic flow direction;
determining a service node corresponding to each flow information and an adjacent service node of the service node corresponding to each flow information according to the service information corresponding to the flow information;
and splicing the service node corresponding to each flow information with the adjacent service node to obtain a service link.
2. The method of claim 1, wherein the service information comprises source service information and destination service information, and the plurality of traffic information comprises a plurality of first traffic information and a plurality of second traffic information; the determining, according to the service information corresponding to the plurality of pieces of traffic information, a service node corresponding to each piece of traffic information and a service node adjacent to the service node corresponding to each piece of traffic information includes:
determining a current service node according to source service information of each first traffic information, and determining a next service node adjacent to the current service node according to the current service node and destination service information of each second traffic information;
and taking the next service node adjacent to the current service node as the current service node, and skipping to execute the step of determining the next service node adjacent to the current service node according to the current service node and the destination service information of each piece of second traffic information until the next service node adjacent to the current service node is not determined according to the current service node and the destination service information of each piece of second traffic information.
3. The method of claim 2, wherein determining the current serving node based on the source service information for each of the first traffic information comprises:
sequencing the first traffic information according to the timestamp of the first traffic information to obtain a traffic information sequence;
according to the flow information sequence, sequentially matching the source service information of each first flow information with the target service information of a plurality of second flow information;
and if the source service information of the first flow information is not matched with the target service information of the plurality of second flow information, determining an initial service node according to the source service information of the first flow information, and taking the initial service node as the current service node.
4. The method of claim 3, wherein the sequentially matching the source service information of each first traffic information with the destination service information of the plurality of second traffic information comprises:
acquiring a first preset time period of each first flow information, and determining a first time range corresponding to each first flow information according to the first preset time period and the timestamp of each first flow information;
determining second traffic information with a timestamp within the first time range as a corresponding first target traffic of the first traffic information;
and detecting whether the source service information of each first flow information is respectively matched with the target service information of the corresponding first target flow.
5. The method as claimed in claim 2, wherein said determining the next serving node adjacent to the current serving node according to the current serving node and the destination service information of each second traffic information comprises:
detecting whether the source service information of each second traffic information is matched with the current service node;
and if the source service information of the second traffic information is matched with the current service node, determining the next adjacent service node of the current service node according to the destination service information of the second traffic information.
6. The method of claim 5, wherein said detecting whether source service information of each second traffic information matches the current service node comprises:
acquiring a second preset time period of the current service node, and determining a second time range of the current service node according to the timestamp of the current service node and the second preset time period;
determining second traffic information with a timestamp within the second time range as a second target traffic of the current service node;
and detecting whether the current service node is respectively matched with the source service information of the corresponding second target flow.
7. The method of claim 1, wherein the service information comprises source service information and destination service information; the determining, according to the service information corresponding to the plurality of pieces of traffic information, a service node corresponding to each piece of traffic information and a service node adjacent to the service node corresponding to each piece of traffic information includes:
and determining a service node corresponding to each flow information according to the source service information, and determining an adjacent service node of the service node corresponding to each flow information according to the target service information.
8. An apparatus for generating a service link, comprising:
the acquisition module is configured to acquire a plurality of pieces of traffic information and determine service information corresponding to the plurality of pieces of traffic information according to the plurality of pieces of traffic information; the service information is information for characterizing traffic flow direction;
the determining module is configured to determine a service node corresponding to each piece of traffic information and an adjacent service node of the service node corresponding to each piece of traffic information according to the service information corresponding to the plurality of pieces of traffic information;
and the splicing module is configured to splice the service node corresponding to each piece of traffic information with the adjacent service node to obtain a service link.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the service link generation method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the service link generation method of any one of claims 1 to 7.
CN202211059650.4A 2022-08-30 2022-08-30 Service link generation method and device, electronic equipment and storage medium Pending CN115865832A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211059650.4A CN115865832A (en) 2022-08-30 2022-08-30 Service link generation method and device, electronic equipment and storage medium
PCT/CN2023/111049 WO2024046027A1 (en) 2022-08-30 2023-08-03 Service link generation method and apparatus, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211059650.4A CN115865832A (en) 2022-08-30 2022-08-30 Service link generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115865832A true CN115865832A (en) 2023-03-28

Family

ID=85660731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211059650.4A Pending CN115865832A (en) 2022-08-30 2022-08-30 Service link generation method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115865832A (en)
WO (1) WO2024046027A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024046027A1 (en) * 2022-08-30 2024-03-07 中国电信股份有限公司 Service link generation method and apparatus, electronic device and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10389596B2 (en) * 2017-03-30 2019-08-20 Ca, Inc. Discovering application topologies
US11153412B1 (en) * 2020-08-26 2021-10-19 Software Ag Systems and/or methods for non-intrusive injection of context for service mesh applications
CN112491634B (en) * 2020-12-21 2021-09-24 北京云思畅想科技有限公司 Full-link intelligent fault simulation and assessment defense method in micro-service scene
CN113014435B (en) * 2021-03-15 2022-10-11 杭州米络星科技(集团)有限公司 Link detection method, link detection device, electronic equipment and storage medium
CN114185708A (en) * 2021-12-15 2022-03-15 中国农业银行股份有限公司 Data analysis method and device based on distributed link tracking and electronic equipment
CN114666238B (en) * 2022-03-16 2023-07-25 平安科技(深圳)有限公司 Visual monitoring method, system, equipment and medium for data link
CN115865832A (en) * 2022-08-30 2023-03-28 中国电信股份有限公司 Service link generation method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024046027A1 (en) * 2022-08-30 2024-03-07 中国电信股份有限公司 Service link generation method and apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
WO2024046027A1 (en) 2024-03-07

Similar Documents

Publication Publication Date Title
US20170004067A1 (en) Debugging through causality and temporal patterning in an event processing system
US10235143B2 (en) Generating a predictive data structure
CN110858172A (en) Automatic test code generation method and device
WO2024046027A1 (en) Service link generation method and apparatus, electronic device and storage medium
CN110008111A (en) A kind of service test method and device
CN110503297B (en) Service scene acquisition method and device, electronic equipment and medium
CN112732576A (en) Automatic testing method, device and equipment based on user interface
CN112559635A (en) Service processing method, device, equipment and medium for Ether house alliance link node
CN111046312A (en) Page sharing method and device, electronic equipment and storage medium
CN116225886A (en) Test case generation method, device, equipment, storage medium and program product
CN112199261A (en) Application program performance analysis method and device and electronic equipment
CN109240928A (en) A kind of test method, device, equipment and storage medium
CN112507265A (en) Method and device for anomaly detection based on tree structure and related products
US20200364313A1 (en) Generating and adding additional control information to logic under test to facilitate debugging and comprehension of a simulation
CN116955148A (en) Service system testing method, device, equipment, storage medium and product
CN114071391B (en) Content charging test method, management device, terminal device and storage medium
US11210156B1 (en) Intelligent distributed tracing
CN112379967B (en) Simulator detection method, device, equipment and medium
CN110213667B (en) Network guarantee method, system, equipment and storage medium for online video interaction
CN112799956B (en) Asset identification capability test method, device and system device
Restrepo et al. Validation of SDL-based architectural design models using communication-based coverage criteria
Hanakawa et al. Software and Infrastructure Log-Based Framework for Identifying the Causes of System Faults
CN109614566A (en) Traffic source analysis method, system and device
CN114374635B (en) Route detection method, device, equipment and storage medium
CN117312126A (en) Stability testing method, device, equipment, readable storage medium and product

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