CN116737508A - Link tracking method, device, electronic equipment and storage medium - Google Patents

Link tracking method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116737508A
CN116737508A CN202310789248.XA CN202310789248A CN116737508A CN 116737508 A CN116737508 A CN 116737508A CN 202310789248 A CN202310789248 A CN 202310789248A CN 116737508 A CN116737508 A CN 116737508A
Authority
CN
China
Prior art keywords
link tracking
kernel
controller
distributed system
agent
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
CN202310789248.XA
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.)
Beijing Shengneng Energy Technology Co Ltd
Original Assignee
GCL Hong Kong Cloud Technology Hainan Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GCL Hong Kong Cloud Technology Hainan Co Ltd filed Critical GCL Hong Kong Cloud Technology Hainan Co Ltd
Priority to CN202310789248.XA priority Critical patent/CN116737508A/en
Publication of CN116737508A publication Critical patent/CN116737508A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a link tracking method, a link tracking device, an electronic device and a nonvolatile computer readable storage medium. The link tracking method comprises the steps of sending a first request to the distributed system to enable the distributed system to deploy an agent and a controller, wherein the agent is deployed in a daemon set manner; monitoring and processing kernel events of an operating system by an agent to generate event data, wherein the distributed system runs in the operating system; creating a custom controller through a controller to obtain cluster resource objects of the distributed system; binding the cluster resource object and the event data through the controller; and carrying out aggregation processing on the kernel events according to the binding result to generate a link tracking result. In this way, links are formed by associating applications in the distributed system, and related personnel can grasp the operation architecture of the distributed system and the connectivity between the applications, so that the network service and the security of the distributed system can be observed, and related network problems can be rapidly diagnosed.

Description

Link tracking method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of link tracking technology, and more particularly, to a link tracking method, a link tracking apparatus, an electronic device, and a non-volatile computer readable storage medium.
Background
The cloud protogenesis technology is a set of cloud technology product system based on the technologies of containers, micro services, devOps and the like and based on distributed cloud deployment and unified transportation. After the cloud primary technology is used, a developer does not need to consider the technical realization of the bottom layer, the elasticity and the distributed advantages of the cloud platform can be fully exerted, and quick deployment, on-demand expansion, delivery without shutdown and the like are realized.
At present, the business architecture of the cloud primary technology is easy to have the phenomena of a large number of services and very complex calling protocols and relations because of the division of work, so that relevant openers cannot accurately and clearly know and control the overall system operation architecture, and cannot answer whether the connectivity between applications is correct or not.
Disclosure of Invention
The embodiment of the application provides a link tracking method, a link tracking device, electronic equipment and a nonvolatile computer readable storage medium.
The embodiment of the application provides a link tracking method for an eBPF program, which comprises the following steps:
Sending a first request to a distributed system to enable the distributed system to deploy an agent and a controller, wherein the distributed system runs in the operating system, the agent is deployed in a daemon set mode, the agent monitors and processes kernel events of the operating system to generate event data, and the controller creates a custom controller to acquire cluster resource objects of the distributed system and binds the cluster resource objects with the event data; and
and carrying out aggregation processing on the kernel events according to the binding result to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
In some embodiments, the link tracking method further comprises:
a second request is sent to the distributed system to cause the distributed system to deploy a database and store the link tracking results into the database.
In some embodiments, the link tracking method further comprises:
and sending a third request to the distributed system so that the controller reads the target link tracking result in the database and sends the target link tracking result to a user interface.
In some embodiments, the sending a third request to the distributed system to cause the controller to read the target link tracking result in the database includes:
and screening the link tracking result according to the cluster resource object to obtain the target link tracking result.
In some embodiments, the agent listens for and processes kernel events of an operating system to generate event data, including:
constructing an execution engine in a kernel where the operating system is;
attaching the execution engine to the kernel event to monitor the kernel event;
processing the kernel event according to a network protocol to generate the event data.
In some embodiments, the processing the kernel event according to a network protocol to generate the event data includes:
performing protocol deduction on the network protocol to screen out a target network protocol;
processing the kernel event according to the target network protocol to generate event data;
and sending the event data to a ring buffer/data structure.
The application also provides a link tracking method for a distributed system, wherein the distributed system runs in an operating system, and the link tracking method comprises the following steps:
Receiving a first request sent by an eBPF program to deploy an agent and a controller according to the first request, wherein the agent is deployed in a daemon set manner;
monitoring and processing kernel events of the operating system by the agent to generate event data;
creating a custom controller through the controller to obtain a cluster resource object;
binding, by the controller, the cluster resource object and the event data; and
and sending a binding result to the eBPF program so that the eBPF aggregates the kernel events to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
In some embodiments, the link tracking method further comprises:
and receiving a second request sent by the eBPF program, deploying a database according to the second request, and storing the link tracking result into the database.
In some embodiments, the link tracking method further comprises:
and receiving a third request sent by the eBPF program so that the controller reads the target link tracking result in the database and sends the target link tracking result to a user interface.
In some embodiments, the receiving the third request sent by the eBPF program to cause the controller to read the link tracking result in the database includes:
And screening the link tracking result by the controller according to the cluster resource object to obtain the target link tracking result.
In some embodiments, the monitoring and processing, by the agent, kernel events of the operating system to generate event data includes:
constructing an execution engine in a kernel where the operating system is through the agent;
attaching the execution engine to the kernel event by the intelligent agent so as to monitor the kernel event;
and processing the kernel event by the intelligent agent according to a network protocol to generate the event data.
In some embodiments, the processing, by the agent, the kernel event according to a network protocol to generate the event data includes:
performing protocol deduction on the network protocol to screen out a target network protocol;
processing the kernel event according to the target network protocol to generate event data;
and sending the event data to a ring buffer/data structure.
The application also provides a link tracking device for eBPF program, comprising:
a first sending module, configured to send a first request to a distributed system to enable the distributed system to deploy an agent and a controller, where the distributed system runs in the operating system, the agent deploys in a daemon set manner, monitors and processes a kernel event of the operating system to generate event data, and the controller creates a custom controller to obtain a cluster resource object of the distributed system, and binds the cluster resource object with the event data;
And the aggregation module is used for carrying out aggregation processing on the kernel events according to the binding result to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
The present application also provides a link tracking device for a distributed system, the distributed system running in the operating system, the link tracking device comprising:
the system comprises a receiving module, a monitoring module and a control module, wherein the receiving module is used for receiving a first request sent by an eBPF program to deploy an agent and a controller according to the first request, and the agent is deployed in a daemon set manner;
the generating module is used for monitoring and processing the kernel event of the operating system through the intelligent agent to generate event data;
the acquisition module is used for creating a custom controller through the controller to acquire the cluster resource object;
the binding module is used for binding the cluster resource object and the event data through the controller; and
and the second sending module is used for sending the binding result to the eBPF program so that the eBPF aggregates the kernel events to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
The application also provides an electronic device comprising a processor and a memory storing a computer program which, when executed by the processor, causes the processor to perform the link tracking method of any of the above.
The application also provides a non-transitory computer readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the link tracking method of any one of the above.
The application deploys an Agent (Agent) and a Controller (Controller) in the distributed system based on the eBPF, the Agent can monitor and process kernel events to obtain event data, the Controller can generate a self-defined Controller to acquire cluster resource objects of the distributed system, the Controller can bind the cluster resource objects with the event data, and thus the kernel events are processed according to binding results to generate link tracking results, thus, the applications in the distributed system are associated with each other to form links, and related personnel can grasp the operation architecture of the distributed system and connectivity between the applications, so that the network service and security of the distributed system can be observed, and related network problems can be rapidly diagnosed.
Additional aspects and advantages of embodiments of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 2 is a block diagram of a link tracking device according to some embodiments of the application;
FIG. 3 is a schematic diagram of the framework of certain embodiments of the present application;
FIG. 4 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 5 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 6 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 7 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 8 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 9 is a block diagram of a link tracking device according to some embodiments of the application;
FIG. 10 is a flow chart of a link tracking method according to some embodiments of the present application;
FIG. 11 is a flow chart of a link tracking method according to some embodiments of the present application;
fig. 12 is a flow chart of a link tracking method according to some embodiments of the application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the embodiments of the present application and are not to be construed as limiting the embodiments of the present application.
Referring to fig. 1, an embodiment of the present application provides a link tracking method, where the link tracking method is used for an eBPF program, and the link tracking method includes:
s10: sending a first request to a distributed system to enable the distributed system to deploy an agent and a controller, wherein the distributed system operates in an operating system, the agent is deployed in a daemon set mode, the agent monitors and processes kernel events of the operating system to generate event data, and the controller creates a custom controller to acquire cluster resource objects of the distributed system and binds the cluster resource objects with the event data;
s20: and carrying out aggregation processing on the kernel events according to the binding result to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
Referring to fig. 2, the present application further provides a link tracking device 100, where the link tracking device 100 is used for an eBPF program, the link tracking device 100 includes a first sending module 10 and an aggregation module 20, S10 may be implemented by the first sending module 10, S20 may be implemented by the aggregation module 20, that is, the first sending module 10 is configured to send a first request to a distributed system to enable the distributed system to deploy an agent and a controller, the distributed system operates in an operating system, the agent deploys in a daemon mode, the agent listens to and processes kernel events of the operating system to generate event data, the controller creates a custom controller to obtain a cluster resource object of the distributed system, and binds the cluster resource object and the event data, and the aggregation module 20 is configured to aggregate the kernel events according to a binding result to generate a link tracking result.
The application also provides an electronic device, which comprises a processor and a memory, wherein the memory stores a computer program, the processor is used for sending a first request to a distributed system to enable the distributed system to deploy an agent and a controller when executing the computer program, the distributed system operates in an operating system, the agent is deployed in a daemon set mode, the agent monitors and processes kernel events of the operating system to generate event data, the controller creates a custom controller to acquire cluster resource objects of the distributed system, binds the cluster resource objects with the event data, and is used for carrying out aggregation processing on the kernel events according to binding results to generate link tracking results, wherein the link tracking results are correlations among a plurality of applications.
Specifically, referring to fig. 3, the link tracking method of the present application is implemented based on a eBPF (Extended Berkeley Packet Filter) program, and the eBPF can efficiently and flexibly capture network data packets from an operating system kernel, and the operating system can be Linux. The distributed system is a software system built on the network, and can process various auxiliary tasks and then integrate the results. The distributed system may include Kubernetes (K8 s), where K8s is a lightweight and extensible open source platform for managing containerized applications and services, where in K8s multiple containers may be created, each running an application instance within the container, and then managing, discovering, accessing the set of application instances through built-in load balancing policies, without requiring the operator to perform complex manual configuration and processing of these details, and where K8s makes it simple to deploy and manage micro-service architecture applications by forming an abstraction layer over the cluster, and allows development teams to smoothly deploy the applications.
The eBPF may send a first request to K8s, where K8s deploys the agent and the controller according to the first request, where the agent deploys in a Daemon set (Daemon set) that has the main function of running one Daemon Pod in the K8s cluster, where the Daemon set only manages Pod objects and ensures that there is and only one Pod per node, where Pod is the smallest unit in K8s, where a Pod may consist of a set, one or more containers. The kernel is the core of the operating system, and can manage the processes, the memory, the device drivers, the files and the network system of the operating system, determine the performance and the stability of the operating system, and the eBPF can run the sandbox program in the kernel, so that the kernel is monitored, that is, the intelligent agent can monitor the events in the kernel and process the kernel events to generate event data.
Further, the controller can create a custom controller of the distributed system, the custom controller can automatically acquire cluster resource objects of the distributed system, the cluster resource objects can comprise various contexts such as K8s objects, applications and cloud services, the cluster resource objects and event data are bound through the controller, so that kernel events are aggregated according to a binding result, a link tracking result is generated, and a link can be a chain and a path for business activities among a plurality of applications.
In some embodiments, the link tracking method may be used for a power exchange station, a power exchange operation platform of the power exchange station may be built in a distributed K8s system, and a user may initiate a charging request to the power exchange operation platform, and a kernel of the operation system may obtain the charging request and send a charging instruction to the charging station. The event data of the kernel event may be a charging request and a charging instruction sent, and the cluster resource object may be various charging data such as a charging start time, a charging pile number, a charging duration, a charging cost, etc., and further, the event data and the cluster resource object are bound, so that a communication relationship between a service of the power conversion operation platform and a network may be displayed by searching the charging data.
According to the application, based on eBPF, an agent and a controller are deployed in a distributed system, the agent can monitor and process kernel events to obtain event data, the controller can generate a self-defined controller to acquire cluster resource objects of the distributed system, the cluster resource objects and the event data can be bound through the controller, so that the kernel events are processed according to the binding result to generate a link tracking result, thus, the applications in the distributed system are associated with each other to form a link, related personnel can grasp the running architecture of the distributed system and the connectivity between the applications, and the network service and the security of the distributed system can be observed, so that related network problems can be diagnosed rapidly.
Referring to fig. 4, in some embodiments, the link tracking method further includes:
s30: sending a second request to the distributed system to enable the distributed system to deploy the database and store the link tracking result into the database;
s40: a third request is sent to the distributed system to cause the controller to read the target link tracking results in the database and send the target link tracking results to the user interface.
In some embodiments, the processor is configured to send a second request to the distributed system to cause the distributed system to deploy the database and store the link tracking results in the database, and to send a third request to the distributed system to cause the controller to read the target link tracking results in the database and send the target link tracking results to the user interface.
Specifically, the database may be MySql, postgreSQL, etc., the eBPF program may send a second request to the K8s, so that the K8s deploys the database and stores the link tracking result in the database, further, the controller may provide a user interface of the Web, where the user interface is used to screen and display the target link tracking result, the eBPF program may send a third request to the K8s, so that the controller reads the link tracking result in the database and sends the target link tracking result to the user interface, and the user may view and screen the data through the user interface.
Further, referring to fig. 5, S40 includes:
s41: and screening the link tracking result according to the cluster resource object to obtain a target link tracking result.
In some embodiments, the processor is configured to filter the link tracking result according to the cluster resource object to obtain a target link tracking result.
Specifically, the user may input a corresponding cluster resource object in the user interface, for example, the user may input a corresponding cluster resource object such as a charging start time, a charging pile number, and the like to perform filtering, and the controller may obtain corresponding charging data and event data according to the cluster resource object input by the user, and send the charging data and the event data to the user interface, so that the user may view the target link tracking result through the user interface.
Therefore, the user can view the link tracking result through the user interface and intuitively display the communication relationship between the network and the service by storing the link tracking result into the database and sending the link tracking result in the database to the user interface through the controller.
Referring to fig. 6, in some embodiments, S10 includes:
s11: constructing an execution engine in a kernel where an operating system is;
s12: attaching an execution engine to the kernel event to monitor the kernel event;
s13: the kernel events are processed according to a network protocol to generate event data.
In some embodiments, S11, S12, and S13 may be implemented by the first sending module 10, that is, the first sending module 10 is configured to build an execution engine on a kernel where an operating system is located, and to attach the execution engine to a kernel event to monitor the kernel event, and to process the kernel event according to a network protocol to generate event data.
In some embodiments, the processor is configured to build an execution engine on a kernel in which the operating system is located, and to attach the execution engine to kernel events to monitor the kernel events, and to process the kernel events according to a network protocol to generate event data.
Specifically, the agent may construct an execution engine in a kernel of the operating system, where the execution engine is used for monitoring, and attach the execution engine to a certain kernel event under the call of the kernel, so as to monitor the kernel event, where the kernel event may include multiple kernel events, and a user may select to attach the execution engine to one or multiple kernel events, for example, in a case that the link tracking method is used in a power exchange station, the kernel event may be a kernel event that obtains a charging request, sends a charging instruction, and the user may select, at a power exchange operation platform, to attach the execution engine to a kernel event that obtains the charging request and a kernel event that sends the charging instruction. Further, the monitored kernel events are processed according to the network protocol, so that event data are generated. The monitored kernel event may be a link between a plurality of applications, and the link formed by the association between the plurality of applications is processed according to the network protocol, and is stored in a data form.
Therefore, by constructing the execution engine in the kernel of the operating system, the kernel can be adopted to attach the execution engine to the kernel event, monitor the kernel event, and process the monitored kernel event through the network protocol, so that event data can be obtained.
Referring to fig. 7, in some embodiments, S13 includes:
s131: performing protocol deduction on the network protocol to screen out a target network protocol;
s132: processing the kernel event according to the target network protocol to generate event data;
s133: event data is sent to the ring buffer/data structure.
In some embodiments, S131, S132, and S133 may be implemented by the first sending module 10, that is, the first sending module 10 is configured to perform protocol derivation on a network protocol to screen out a target network protocol, process a kernel event according to the target network protocol, generate event data, and send the event data to a ring buffer/data structure.
In some embodiments, the processor is configured to perform protocol derivation on the network protocol to screen out the target network protocol, and to process the kernel event according to the target network protocol, generate event data, and to send the event data into the ring buffer/data structure.
In particular, a network protocol is a set of rules, standards, or conventions established for data exchange in a computer network, and the same network protocol must be used between different computers to communicate. The intelligent agent can carry out protocol deduction on the network protocol, screen out the target network protocol corresponding to the kernel event of the distributed system, and process the kernel event according to the target network protocol, thereby generating event data.
Further, the event data is sent to a ring buffer (ring buffer) or a data structure Map for storage, for example, the event data may be sent to the ring buffer for storage, where the ring buffer is a data structure used to represent a buffer area with a fixed size and connected end to end, and is suitable for buffering a data stream, and a user may read data stored in the ring buffer or write data to be stored in the ring buffer. The ring buffer is arranged in the kernel, and the data structure Map is arranged in the eBPF.
In this way, the target network protocol is obtained through deduction of the network protocol, and the kernel event is processed according to the target network protocol, so that the generated event data is stored in the ring buffer or the data structure Map, and the event data can be read through the ring buffer or the data structure Map.
Referring to fig. 8, an embodiment of the present application provides a link tracking method, which is used for a distributed system, where the distributed system runs in an operating system, and the link tracking method includes:
s01: receiving a first request sent by an eBPF program to deploy an agent and a controller according to the first request, wherein the agent is deployed in a daemon set manner;
S02: monitoring and processing kernel events of an operating system by an agent to generate event data;
s03: creating a custom controller through a controller to obtain a cluster resource object;
s04: binding the cluster resource object and the event data through the controller; and
s05: and sending the binding result to an eBPF program so that the eBPF aggregates the kernel events to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
Referring to fig. 9, the present application further provides a link tracking device 200, where the link tracking device 200 is used in a distributed system, and the link tracking device 200 includes a receiving module 01, a generating module 02, an obtaining module 03, a binding module 04, and a second sending module 05, S01 may be implemented by the receiving module 01, S02 may be implemented by the generating module 02, S03 may be implemented by the obtaining module 03, S04 may be implemented by the binding module 04, S05 may be implemented by the second sending module 05, that is, the receiving module 01 is configured to receive a first request sent by an eBPF program to deploy an agent and a controller according to the first request, the agent is deployed in a daemon set manner, the generating module 02 is configured to monitor and process kernel events of an operating system through the agent to generate event data, the obtaining module 03 is configured to create a custom controller through the controller to obtain a cluster resource object, the binding module 04 is configured to bind the cluster resource object and the event data through the controller, and the second sending module 05 is configured to send a binding result to the eBPF, so that the eBPF aggregates kernel events to generate link tracking results.
The application also provides an electronic device, which comprises a processor and a memory, wherein the memory stores a computer program, when the processor executes the computer program, the processor can be used for receiving a first request sent by an eBPF program to deploy an agent and a controller according to the first request, the agent is deployed in a daemon set mode, and is used for monitoring and processing kernel events of an operating system to generate event data, and is used for creating a custom controller through the controller to acquire cluster resource objects, and is used for binding the cluster resource objects and the event data through the controller, and sending a binding result to the eBPF program, so that the eBPF can carry out aggregation processing on the kernel events to generate the link tracking result.
In particular, the distributed system may include Kubernetes (K8 s), where K8s is a lightweight and extensible open source platform for managing containerized applications and services, where in K8s multiple containers may be created, each running an application instance within each container, and then through built-in load balancing policies, the management, discovery, access to the set of application instances is achieved without requiring the operator to do complex manual configuration and processing, and where K8s makes deployment and management of micro-service architecture applications simple by forming an abstraction layer over the cluster, and allows the development team to smoothly deploy the applications. The eBPF can efficiently and flexibly grasp network data packets from the kernel of the operating system, which may be Linux.
The K8s may receive the first request sent by the eBPF, so that the K8s deploys the agent and the controller according to the first request, where the agent deploys in a Daemon set (Daemon set) that is mainly used to run a Daemon Pod in the K8s cluster, where the Daemon set only manages Pod objects, and ensures that there is and only one Pod per node, where the Pod is the smallest unit in the K8s, and where the Pod may consist of a set of one or more containers. The kernel is the kernel of the operating system Linux, and can manage processes, memory, device drivers, files and network systems of the operating system to determine the performance and stability of the operating system. K8s can monitor the kernel through the agent and process the kernel event to generate event data.
Further, the K8s may create a custom controller through the controller and obtain a cluster resource object, where the cluster resource object may include various contexts such as a K8s object, an application, and a cloud service, and bind the cluster resource object and event data through the controller, so that a binding result is sent to the eBPF, so that the eBPF may aggregate kernel events to generate a link tracking result, and the link may be a chain and a path for performing business activities between multiple applications.
According to the application, based on eBPF, an agent and a controller are deployed in a distributed system, the agent can monitor and process kernel events to obtain event data, the controller can generate a self-defined controller to acquire cluster resource objects of the distributed system, the cluster resource objects and the event data can be bound through the controller, so that the kernel events are processed according to the binding result to generate a link tracking result, thus, the applications in the distributed system are associated with each other to form a link, related personnel can grasp the running architecture of the distributed system and the connectivity between the applications, and the network service and the security of the distributed system can be observed, so that related network problems can be diagnosed rapidly.
Referring to fig. 10, in some embodiments, the link tracking method further includes:
s06: receiving a second request sent by the eBPF program, deploying a database according to the second request, and storing a link tracking result into the database;
s07: and receiving a third request sent by the eBPF program so that the controller reads the target link tracking result in the database and sends the target link tracking result to the user interface.
In some embodiments, the processor is configured to receive a second request sent by the eBPF program and deploy the database according to the second request to store the link tracking result in the database, and to receive a third request sent by the eBPF program to cause the controller to read the target link tracking result in the database and send the target link tracking result to the user interface.
Specifically, the database may be MySql, postgreSQL, etc., where the K8s receives the second request sent by the eBPF program, and deploys the database according to the second request, so as to store the link tracking result in the database. Further, the controller may provide a Web user interface, where the user interface is configured to screen and display a target link tracking result, and the K8s receives a third request sent by the eBPF program, so that the controller reads the link tracking result in the database and sends the link tracking result to the user interface, for example, a user may input a corresponding cluster resource object such as a charging start time and a charging pile number to screen, and the controller may obtain corresponding charging data and event data according to the cluster resource object input by the user and send the charging data and event data to the user interface, so that the user may view the target link tracking result through the user interface.
In this way, the K8s stores the link tracking result into the database, and sends the link tracking result in the database to the user interface through the controller, so that the user can view the link tracking result through the user interface, and the communication relationship between the network and the service is intuitively displayed.
Referring to fig. 11, in some embodiments, S02 includes:
s021: constructing an execution engine in a kernel of an operating system through an agent;
s022: attaching an execution engine to the kernel event through the intelligent agent so as to monitor the kernel event;
s023: the kernel events are processed by the agent according to the network protocol to generate event data.
In some embodiments, S021, S022 and S023 may be implemented by the generation module 02, that is, the generation module 02 is configured to build an execution engine on a kernel where an operating system is located by an agent, and to attach the execution engine to the kernel event by the agent to monitor the kernel event, and to process the kernel event by the agent according to a network protocol to generate event data.
In some embodiments, the processor is configured to build an execution engine on a kernel where the operating system is located by the agent, and to attach the execution engine to the kernel event by the agent to monitor the kernel event, and to process the kernel event by the agent according to a network protocol to generate event data.
Specifically, the K8s may construct an execution engine in a kernel of the operating system through the agent, the execution engine is used for monitoring, the execution engine is attached to a certain kernel event under the call of the kernel, so as to monitor the kernel event, the kernel event may include a plurality of kernel events, a user may select to attach the execution engine to one or more kernel events, for example, in the case that the link tracking method is used for a power exchange station, the kernel event may be a kernel event of acquiring a charging request, sending a charging instruction, etc., and the user may select to attach the execution engine to the kernel event of acquiring the charging request and the kernel event of sending the charging instruction at the power exchange operation platform. Further, the monitored kernel events are processed according to the network protocol, so that event data are generated. The monitored kernel event may be a link between a plurality of applications, and the link formed by the association between the plurality of applications is processed according to the network protocol, and is stored in a data form.
Therefore, by constructing the execution engine in the kernel of the operating system, the kernel can be adopted to attach the execution engine to the kernel event, monitor the kernel event, and process the monitored kernel event through the network protocol, so that event data can be obtained.
Referring to fig. 12, in some embodiments, S023 includes:
s0231: performing protocol deduction on the network protocol to screen out a target network protocol;
s0232: processing the kernel event according to the target network protocol to generate event data;
s0233: event data is sent to the ring buffer/data structure.
In some embodiments, S0231, S0232, and S0233 may be implemented by the generation module 02, that is, the generation module 02 is configured to perform protocol derivation on the network protocol to screen out the target network protocol, and to process the kernel event according to the target network protocol, generate event data, and to send the event data into the ring buffer/data structure.
In some embodiments, the processor is configured to perform protocol derivation on the network protocol to screen out the target network protocol, and to process the kernel event according to the target network protocol, generate event data, and to send the event data into the ring buffer/data structure.
In particular, a network protocol is a set of rules, standards, or conventions established for data exchange in a computer network, and the same network protocol must be used between different computers to communicate. The intelligent agent can carry out protocol deduction on the network protocol, screen out the target network protocol corresponding to the kernel event of the distributed system, and process the kernel event according to the target network protocol, thereby generating event data.
Further, the event data is sent to a ring buffer (ring buffer) or a data structure Map for storage, for example, the event data may be sent to the ring buffer for storage, where the ring buffer is a data structure used to represent a buffer area with a fixed size and connected end to end, and is suitable for buffering a data stream, and a user may read data stored in the ring buffer or write data to be stored in the ring buffer. The ring buffer is arranged in the kernel, and the data structure Map is arranged in the eBPF.
In this way, the target network protocol is obtained through deduction of the network protocol, and the kernel event is processed according to the target network protocol, so that the generated event data is stored in the ring buffer or the data structure Map, and the event data can be read through the ring buffer or the data structure Map.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the method of any of the above embodiments.
Thus, the present application provides a non-transitory computer readable storage medium storing a computer program which, when executed by one or more processors, causes the processors to perform a link tracking method.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program, and the program may be stored in a non-volatile computer readable storage medium, where the program, when executed, may include processes in the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
In the description of the present specification, reference to the terms "certain embodiments," "in one example," "illustratively," and the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiments or examples is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (16)

1. A link tracking method for an eBPF program, the link tracking method comprising:
sending a first request to a distributed system to enable the distributed system to deploy an agent and a controller, wherein the distributed system runs in an operating system, the agent is deployed in a daemon set mode, the agent monitors and processes kernel events of the operating system to generate event data, and the controller creates a custom controller to acquire cluster resource objects of the distributed system and binds the cluster resource objects with the event data; and
And carrying out aggregation processing on the kernel events according to the binding result to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
2. The link tracking method according to claim 1, characterized in that the link tracking method further comprises:
a second request is sent to the distributed system to cause the distributed system to deploy a database and store the link tracking results in the database.
3. The link tracking method according to claim 2, characterized in that the link tracking method further comprises:
and sending a third request to the distributed system so that the controller reads the target link tracking result in the database and sends the target link tracking result to a user interface.
4. The link tracking method of claim 3, wherein the sending a third request to the distributed system to cause the controller to read the target link tracking result in the database comprises:
and screening the link tracking result according to the cluster resource object to obtain the target link tracking result.
5. The link tracking method of claim 1, wherein the agent listens for and processes kernel events of an operating system to generate event data, comprising:
Constructing an execution engine in a kernel where the operating system is;
attaching the execution engine to the kernel event to monitor the kernel event;
processing the kernel event according to a network protocol to generate the event data.
6. The link tracking method according to claim 5, wherein said processing said core event according to a network protocol to generate said event data comprises:
performing protocol deduction on the network protocol to screen out a target network protocol;
processing the kernel event according to the target network protocol to generate event data;
and sending the event data to a ring buffer/data structure.
7. A link tracking method for a distributed system, wherein the distributed system runs in an operating system, the link tracking method comprising:
receiving a first request sent by an eBPF program to deploy an agent and a controller according to the first request, wherein the agent is deployed in a daemon set manner;
monitoring and processing kernel events of the operating system by the agent to generate event data;
creating a custom controller through the controller to obtain a cluster resource object;
Binding, by the controller, the cluster resource object and the event data; and
and sending a binding result to the eBPF program so that the eBPF aggregates the kernel events to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
8. The link tracking method according to claim 7, characterized in that the link tracking method further comprises:
and receiving a second request sent by the eBPF program, deploying a database according to the second request, and storing the link tracking result into the database.
9. The link tracking method according to claim 8, characterized in that the link tracking method further comprises:
and receiving a third request sent by the eBPF program so that the controller reads the target link tracking result in the database and sends the target link tracking result to a user interface.
10. The link tracking method according to claim 9, wherein the receiving the third request sent by the eBPF program to cause the controller to read the link tracking result in the database includes:
and screening the link tracking result by the controller according to the cluster resource object to obtain the target link tracking result.
11. The link tracking method of claim 7, wherein the listening and processing, by the agent, kernel events of the operating system to generate event data comprises:
constructing an execution engine in a kernel where the operating system is through the agent;
attaching the execution engine to the kernel event by the intelligent agent so as to monitor the kernel event;
and processing the kernel event by the intelligent agent according to a network protocol to generate the event data.
12. The link tracking method according to claim 11, wherein said processing of said kernel event by said agent according to a network protocol to generate said event data comprises:
performing protocol deduction on the network protocol to screen out a target network protocol;
processing the kernel event according to the target network protocol to generate event data;
and sending the event data to a ring buffer/data structure.
13. A link tracking device for an eBPF procedure, the link tracking device comprising:
a first sending module, configured to send a first request to a distributed system to enable the distributed system to deploy an agent and a controller, where the distributed system runs in an operating system, the agent deploys in a daemon set manner, monitors and processes a kernel event of the operating system to generate event data, and creates a custom controller to obtain a cluster resource object of the distributed system, and binds the cluster resource object with the event data;
And the aggregation module is used for carrying out aggregation processing on the kernel events according to the binding result to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
14. A link tracking device for a distributed system, the distributed system running in an operating system, the link tracking device comprising:
the system comprises a receiving module, a monitoring module and a control module, wherein the receiving module is used for receiving a first request sent by an eBPF program to deploy an agent and a controller according to the first request, and the agent is deployed in a daemon set manner;
the generating module is used for monitoring and processing the kernel event of the operating system through the intelligent agent to generate event data;
the acquisition module is used for creating a custom controller through the controller to acquire the cluster resource object;
the binding module is used for binding the cluster resource object and the event data through the controller; and
and the second sending module is used for sending the binding result to the eBPF program so that the eBPF aggregates the kernel events to generate a link tracking result, wherein the link tracking result is the association among a plurality of applications.
15. An electronic device comprising a processor and a memory, the memory storing a computer program that, when executed by the processor, causes the processor to implement the link tracking method of any of claims 1-12.
16. A non-transitory computer readable storage medium containing a computer program, which when executed by a processor causes the processor to implement the link tracking method of any one of claims 1-12.
CN202310789248.XA 2023-06-29 2023-06-29 Link tracking method, device, electronic equipment and storage medium Pending CN116737508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310789248.XA CN116737508A (en) 2023-06-29 2023-06-29 Link tracking method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310789248.XA CN116737508A (en) 2023-06-29 2023-06-29 Link tracking method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737508A true CN116737508A (en) 2023-09-12

Family

ID=87918363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310789248.XA Pending CN116737508A (en) 2023-06-29 2023-06-29 Link tracking method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737508A (en)

Similar Documents

Publication Publication Date Title
US10878355B2 (en) Systems and methods for incident queue assignment and prioritization
US10861013B2 (en) Containerization of network services
WO2021047332A1 (en) Data analysis method and device, apparatus, and storage medium
CN102652410B (en) Cloud computing supervision and management system
US11159385B2 (en) Topology based management of second day operations
US20190028356A1 (en) Management of the lifecycle of a cloud service modeled as a topology
CN112035228B (en) Resource scheduling method and device
US20170302531A1 (en) Topology based management with compliance policies
CN113612970B (en) Intelligent analysis management and control platform for safety event of industrial monitoring video
WO2017204699A1 (en) Automatic network management system, method and computer program product
CN112968789A (en) Data acquisition method and device, computer equipment and computer readable medium
CN115827008B (en) Cloud primary big data component management system based on cloud primary platform Kubernetes
CN113867600A (en) Development method and device for processing streaming data and computer equipment
Rusti et al. Smart city as a 5G ready application
CN109614164B (en) Method, device and equipment for realizing configurable plug-in and readable storage medium
CN110971439A (en) Policy decision method and device, system, storage medium, policy decision unit and cluster
WO2017204700A1 (en) Automatic network management system, methods and computer program product
CN113094053A (en) Product delivery method and device and computer storage medium
CN109314697B (en) Automatic network management system and method
CN110336712B (en) Method and device for capturing empty packet by mobile terminal, storage medium and mobile terminal
CN116755799A (en) Service arrangement system and method
CN116737508A (en) Link tracking method, device, electronic equipment and storage medium
CN116489024A (en) Method, device, equipment and medium for improving application performance of K8S cluster container
CN109144884A (en) Program error localization method, device and computer readable storage medium
CN114461501A (en) Resource abnormality detection method and device, storage medium, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20240906

Address after: 100176 101, 1st to 3rd floors, Building 5, Yard 11, Rongxing North 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing (Yizhuang Cluster, High end Industrial Zone, Beijing Pilot Free Trade Zone)

Applicant after: Beijing Shengneng Energy Technology Co.,Ltd.

Country or region after: China

Address before: Room 1001, 4th Floor, Incubation Building, Hainan Ecological Software Park, Laocheng High tech Industry Demonstration Zone, Chengmai County, Sanya City, Hainan Province, 571924

Applicant before: GCL Hong Kong Cloud Technology (Hainan) Co.,Ltd.

Country or region before: China