Front node servo communication method and system based on kafka

Through the Kafka bus and plug-in communication service framework, front-end nodes are dynamically managed, which solves the problems of code rewriting and heavy workload in the existing technology, and realizes the flexible adaptation of front-end nodes in the power system and the rapid construction and construction of the system. Extension.

CN118740845APending Publication Date: 2024-10-01XJ GRP CORP +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310350457.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing technology, when the backend system needs to dynamically add or modify front-end nodes, the code needs to be rewritten, resulting in a heavy workload and the inability to quickly build a communication system, which cannot meet the dynamic and irregular needs of control instructions in the power system.

Method used

Adopt the front-end node servo communication method based on Kafka, connect the back-end system and front-end nodes through the Kafka bus, realize dynamic addition, deletion and balanced management of front-end nodes, use the plug-in communication service framework and Zookeeper to cooperate with the Kafka bus to implement a distributed system , reduce code duplication and development workload.

Benefits of technology

It enables front-end nodes to flexibly respond to background needs, reduces system operating pressure, improves system scalability and convenience, and significantly reduces the construction and testing workload of engineering personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740845A_ABST
    Figure CN118740845A_ABST
Patent Text Reader

Abstract

The invention provides a kafka-based front-end node servo communication method and system. The method comprises the following steps: modeling a front-end system comprising a plurality of front-end nodes; setting a protocol library and a medium library, and operating conventional services of a front-end system; a kafka bus service is operated; the front node runs an initial service and waits for a background system to issue a command through kafka; the plurality of front nodes are connected with the background system through kafka; the background system collects data received by the plurality of front nodes through kafka, and issues a command to the terminal device through the front nodes; and setting an on-duty plug-in, and managing a plurality of front nodes. The front-end node service provided by the invention has the capability of flexibly adapting to background requirements, reduces the operation pressure for the front-end system or meets the requirements of increasing or decreasing terminals or protocols under the condition of not interfering the normal operation of the system, and effectively reduces the construction and test workload of engineers; the expandability and the convenience of the system can be remarkably improved through the requirement of the servo background system in the original system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a front-end node servo communication method and system based on Kafka, belonging to the technical field of power system communication. Background Art

[0002] Front-end communication plays a very important role in the field of power system communication. It enables commands and data to be transmitted between devices and the background, among which the interaction between the background and front-end nodes is particularly important.

[0003] In the front-end communication, the front-end node often runs the basic functions, sending the "four remote" (telemetry, telesignaling, teleadjustment, and telecontrol) data and returning the remote control instructions of the device; however, in the field of power system communication, the front-end nodes running basic functions are difficult to meet the requirements of dynamic and irregular control instructions required by large systems such as centralized control and regulation.

[0004] Node servo, currently the mainstream is servo drive, servo motor, control and other operations of the control instructions issued by CAN, Modbus, etc. For the front-end communication field of the power system, there is currently a lack of corresponding Kafka bus front-end node servo as a service implementation method.

[0005] The above problems are specifically manifested in the following aspects: when the background system needs to add new protocols to access or remove some unused data sources, or needs to temporarily suspend a certain front-end node process, the system is generally unable to achieve seamless online updates due to the binding of the code to specific scenarios, which interferes with the normal operation of the system; when the background system needs to add a front-end node to share the operating pressure of the entire front-end system, it needs to be manually added again, or even the code needs to be rewritten, which greatly increases the workload of system development and testing, is not conducive to the rapid construction of the communication system, and requires repeated development work at the code level, which increases the workload of developers. At the same time, the newly developed modules also bring communication risks to the on-site communication system. Summary of the invention

[0006] The purpose of the present invention is to provide a front-end node servo communication method and system based on Kafka, the first purpose of which is to solve the problem in the prior art that when the background system needs to dynamically add temporary tasks, the code needs to be rewritten, the workload increases and the communication system cannot be quickly constructed; the second purpose is to provide a servo processing method, when the system is running normally, ordinary data is sent up and down, and when the background (background system) has a demand, it can respond at any time, so as to solve the problem in the prior art that the workload increases due to the need to rewrite the code due to background needs, and the communication system cannot be quickly constructed.

[0007] In order to solve the above technical problems, the solution of the present invention includes:

[0008] The present invention provides a front-end node servo communication method based on Kafka, comprising the following steps:

[0009] Modeling a front-end system including multiple front-end nodes; setting a protocol library and a media library, running the conventional services of the front-end system; running the Kafka bus service; the front-end node runs the initial service and waits for the back-end system to issue a command through the Kafka bus; multiple front-end nodes are connected to the back-end system through the Kafka bus; the back-end system collects data received by multiple front-end nodes through the Kafka bus, and also issues commands to the terminal device RTU through the front-end node;

[0010] A duty plug-in is set to manage the plurality of the front-end nodes and to perform duty guarding on the front-end nodes; the plurality of the front-end nodes are managed through the duty plug-in to realize dynamic addition and deletion of the front-end nodes and maintain dynamic balance among the front-end nodes.

[0011] The present invention provides a front-end node servo communication method, which enables the front-end node to flexibly respond to various needs of the background through the Kafka bus; the method mainly transmits information (sending and receiving messages / information) through the Kafka bus, wherein the command issued by the background is transmitted to the front-end node through the Kafka bus; by running the main program of the plug-in communication service framework, the communication processing plug-in of each communication channel is dynamically generated, and each communication processing plug-in processes the corresponding data source to realize network communication; wherein the background can dynamically make modification calls to the front-end node through the Kafka bus, which can effectively shorten the cycle of system software development and debugging; through command JSON and medium plug-in, it can be expanded at any time according to the standard interface, making the maintenance and expansion of the background and the plug-in communication framework more convenient.

[0012] Furthermore, the protocol library and the media library are formed by building a plug-in service framework, setting protocol plug-ins and media plug-ins based on the protocol plug-in resources and media plug-in resources in the front-end processor running the corresponding front-end node.

[0013] Furthermore, the Zookeeper service is also run before the Kafka bus service is run. The present invention can realize a distributed and partitionable system by cooperating with the Kafka bus through Zookeeper.

[0014] Furthermore, the dynamic balance among the plurality of said front-end nodes is such that, in response to the addition or deletion of a front-end node, the front-end machine on duty corresponding to the front-end node is changed.

[0015] Furthermore, it also includes: setting a timer to monitor the operating status of multiple front-end nodes; the timer is used to monitor the front-end nodes in real time and upload the abnormal status of the front-end nodes to the background system in time.

[0016] The front-end node service implemented by the present invention through the method has the ability to flexibly adapt to background requirements. Without interfering with the normal operation of the system, it can reduce the operating pressure of the front-end system, or meet the needs of increasing or decreasing terminals or protocols, and effectively reduce the workload of engineering personnel in construction and testing; by serving the needs of the background system in the original system, the scalability and convenience of the system can be significantly improved.

[0017] The present invention provides a front-end node servo communication system based on Kafka, comprising a background system, a plurality of front-end nodes, and a terminal device connected to the front-end nodes in communication; the background system is connected to each front-end node through a Kafka bus; the front-end system including a plurality of front-end nodes is modeled; a protocol library and a medium library are set, and conventional services of the front-end system are run; a Kafka bus service is run; the front-end node runs an initial service and waits for the background system to issue a command through the Kafka bus; the background system collects data received by the plurality of front-end nodes through the Kafka bus, and also issues a command to a terminal device RTU through the front-end node; a duty plug-in is set to manage the plurality of front-end nodes; the plurality of front-end nodes are managed through the duty plug-in, so as to realize dynamic addition and deletion of the front-end nodes and maintain dynamic balance among the front-end nodes.

[0018] The present invention provides a front-end node servo communication system, which enables the front-end node to flexibly respond to various needs of the background through the Kafka bus; it mainly transmits information (sending and receiving messages / information) through the Kafka bus, wherein the command issued by the background is transmitted to the front-end node through the Kafka bus; by running the main program of the plug-in communication service framework, the communication processing plug-in of each communication channel is dynamically generated, and each communication processing plug-in processes the corresponding data source to realize network communication; wherein the background can dynamically make modification calls to the front-end node through the Kafka bus, which can effectively shorten the cycle of system software development and debugging; through command JSON and medium plug-ins, it can be expanded at any time according to the standard interface, making the maintenance and expansion of the background and the plug-in communication framework more convenient.

[0019] Furthermore, the protocol library and the media library are formed by building a plug-in service framework, setting protocol plug-ins and media plug-ins based on the protocol plug-in resources and media plug-in resources in the front-end processor running the corresponding front-end node.

[0020] Furthermore, the Zookeeper service is also run before the Kafka bus service is run. The present invention can realize a distributed and partitionable system by cooperating with the Kafka bus through Zookeeper.

[0021] Furthermore, the dynamic balance among the plurality of said front-end nodes is such that, in response to the addition or deletion of a front-end node, the front-end machine on duty corresponding to the front-end node is changed.

[0022] Furthermore, it also includes: setting a timer to monitor the operating status of multiple front-end nodes; the timer is used to monitor the front-end nodes in real time and upload the abnormal status of the front-end nodes to the background system in time.

[0023] The front-end node service implemented by the system of the present invention has the ability to flexibly adapt to background requirements. Without interfering with the normal operation of the system, it can reduce the operating pressure of the front-end system, or meet the needs of increasing or decreasing terminals or protocols, and effectively reduce the workload of engineering personnel in construction and testing; by serving the needs of the background system in the original system, the scalability and convenience of the system can be significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a schematic diagram of the front-end node servo communication based on Kafka. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0026] An embodiment of a front-end node servo communication method:

[0027] The normal operation of the power system front-end communication depends on Kafka services and front-end conventional services, such as Figure 1 As shown, the specific implementation steps are as follows:

[0028] Model the front-end system including multiple front-end nodes; set up the protocol library and media library, and run the general services of the front-end system; run zookeeper and kafka bus services; the front-end node runs the initial service, waits for the background system to send commands through the kafka bus, and responds at any time; set up network communication, dynamically respond to the communication processing plug-in of each communication channel, each communication processing plug-in processes the corresponding data source, and realizes the network communication of the embedded system; multiple front-end nodes are connected to the background system through the kafka bus; the background system collects the data received by multiple front-end nodes through the kafka bus, and also sends commands to the terminal device RTU through the front-end node; set up the duty plug-in, manage multiple front-end nodes, and perform duty guarding on the front-end nodes; multiple front-end nodes are managed through the duty plug-in to realize the dynamic addition and deletion of front-end nodes, and maintain the dynamic balance between the front-end nodes. For the addition and deletion of front-end nodes, the front-end machine on duty running the corresponding front-end node is changed.

[0029] Kafka bus is used as a data transmission system for data exchange. The coordination service Zookeeper provides consistency services for distributed applications, including configuration maintenance, domain name services, distributed synchronization, group services, etc. Kafka+Zookeeper can be used to implement a distributed and partitionable system.

[0030] The Chinese name of RTU is remote measurement and control terminal, which is used for monitoring, control and data acquisition applications. As a control device, it has excellent communication capabilities and large storage capacity, strong applicability, and has telemetry, telesignaling, teleadjustment and remote control functions.

[0031] The backend issues commands, which are then sent to the terminal device through front-end communication; the terminal data is uploaded to the backend system.

[0032] The protocol library and the media library are formed by building a plug-in service framework and setting protocol plug-ins and media plug-ins based on the protocol plug-in resources and media plug-in resources in the front-end machine running the corresponding front-end node.

[0033] Specifically, the media library includes serial port, GPRS, Ethernet CPServer, Ethernet TCPClient, Ethernet UDP; the protocol library includes IEC101 / 102 / 103 / 104 / 61850, OPC, MODBUS, CDT and user terminal protocol.

[0034] The messages (information) in the Kafka bus are in JSON format, and the data is visualized and easy to expand.

[0035] In the process of each communication processing plug-in processing the corresponding data source, the protocol plug-in is responsible for the analysis and processing of the data source data, uplink and downlink transmission and business logic analysis, and the media plug-in is responsible for network connection, link control and data sending and receiving; the front-end node responds to the background command and can dynamically control the protocol plug-in or data source.

[0036] The front node servo process is as follows:

[0037] The timer monitors the entire front-end service status in real time, including each process's own information and status information, changes in each process's survival flag, etc. It guards abnormal processes and sends them to the background; it monitors the connection status between the front-end node and Kafka in a "heartbeat" manner.

[0038] According to the specific application scenario requirements, the servo receives the service message of the kakfa bus:

[0039] a) The backend requests to add (disable) a certain protocol, the frontend node responds, reads the configuration library to start (stop) the protocol to drive the data source, and feeds the information back to the backend in JSON format through Kafka;

[0040] b) The backend requests to add (block) a data source, and the frontend node responds, reads the data source under the configuration library start (stop) protocol, and feeds the information back to the backend in JSON format through Kafka;

[0041] c) The backend needs to check the information of a data source under a certain protocol, and the front-end node responds and feeds the data source information back to the backend in JSON format through Kafka;

[0042] d) The backend needs to check the messages from a certain data source for a period of time, and the front-end node responds and feeds the message information back to the backend in JSON format through Kafka;

[0043] e) The backend requires the front-end node to send data in another format, and the front-end node responds and starts the conversion module plug-in to implement data format conversion;

[0044] f) The backend requires the front-end node to transfer the data in and out to different data sources respectively. The front-end node responds and starts the conversion plug-in to realize the data transfer function.

[0045] The present invention provides a front-end node servo communication method, which enables the front-end node to flexibly respond to various needs of the background through the Kafka bus; it mainly transmits information (sending and receiving messages / information) through the Kafka bus, wherein the command issued by the background is transmitted to the front-end node through the Kafka bus; by running the main program of the plug-in communication service framework, the communication processing plug-in of each communication channel is dynamically generated, and each communication processing plug-in processes the corresponding data source to realize network communication; wherein the background can dynamically make modification calls to the front-end node through the Kafka bus, which can effectively shorten the cycle of system software development and debugging; through the unified command (json) format and the medium plug-in, it can be expanded at any time according to the standard interface, so that the maintenance and expansion of the background and the plug-in communication framework are more convenient.

[0046] The front-end node service provided by the present invention has the ability to flexibly adapt to background requirements without interfering with the normal operation of the system. It can either reduce the operating pressure of the front-end system or meet the needs of increasing or decreasing terminals or protocols, effectively reducing the workload of engineering personnel in construction and testing. By serving the needs of the background system in the original system, the scalability and convenience of the system can be significantly improved.

[0047] An embodiment of a front-end node servo communication system:

[0048] A front-end node servo communication system based on Kafka specifically includes a background system, a plurality of front-end nodes, and a terminal device RTU connected to the front-end nodes for communication; the background system connects the front-end nodes via a Kafka bus; the background system collects data received by the front-end nodes via the Kafka bus, and also sends commands to the terminal device RTU via the front-end nodes. The specific operation method of the system embodiment can refer to the specific operation method of the method embodiment, which will not be repeated here.

Claims

1. A front-end node servo communication method based on Kafka, It is characterized in that The following steps are involved: Modeling a front-end system including multiple front-end nodes; Set up the protocol library and media library, run the conventional services of the front-end system; run the kafka bus service; The front-end node runs the initial service and waits for the back-end system to send commands through the Kafka bus; The plurality of front-end nodes are connected to the back-end system via the Kafka bus; The backend system collects data received by the plurality of said front-end nodes through the kafka bus, and also sends commands to the terminal device RTU through the front-end node; Setting a duty plug-in to manage the plurality of said front-end nodes; The plurality of front-end nodes are managed through a duty plug-in to dynamically add and delete front-end nodes and maintain a dynamic balance among the front-end nodes.

2. The front-end node servo communication method based on kafka according to claim 1, It is characterized in that The protocol library and the media library are formed by building a plug-in service framework, setting protocol plug-ins and media plug-ins based on the protocol plug-in resources and media plug-in resources in the front-end machine running the corresponding front-end node.

3. The front-end node servo communication method based on kafka according to claim 1, It is characterized in that Before running the kafka bus service, also run the Zookeeper service.

4. The front-end node servo communication method based on kafka according to claim 1, It is characterized in that Dynamic balance among the plurality of said front-end nodes, for the addition and deletion of the front-end nodes, the front-end machines on duty corresponding to the front-end nodes are changed.

5. The front-end node servo communication method based on Kafka according to claim 1, It is characterized in that Also includes: Setting a timer to monitor the operating status of the plurality of front nodes; The timer is used to monitor the front node in real time and upload the abnormal status of the front node to the background system in time.

6. A front-end node servo communication system based on Kafka, It is characterized in that It includes a backend system, several frontend nodes, and a terminal device connected to the frontend nodes for communication; the backend system is connected to each frontend node via a Kafka bus; and a frontend system including multiple frontend nodes is modeled; Set up the protocol library and media library, run the conventional services of the front-end system; run the kafka bus service; The front-end node runs the initial service and waits for the back-end system to send commands through the Kafka bus; The backend system collects data received by the plurality of said front-end nodes through the kafka bus, and also sends commands to the terminal device RTU through the front-end node; Setting a duty plug-in to manage the plurality of said front-end nodes; The plurality of front-end nodes are managed through a duty plug-in to dynamically add and delete front-end nodes and maintain a dynamic balance among the front-end nodes.

7. The front-end node servo communication system based on Kafka according to claim 6, It is characterized in that The protocol library and the media library are formed by building a plug-in service framework, setting protocol plug-ins and media plug-ins based on the protocol plug-in resources and media plug-in resources in the front-end machine running the corresponding front-end node.

8. The front-end node servo communication system based on Kafka according to claim 6, It is characterized in that Before running the kafka bus service, also run the Zookeeper service.

9. The front-end node servo communication system based on Kafka according to claim 6, It is characterized in that Dynamic balance among the plurality of said front-end nodes, for the addition and deletion of the front-end nodes, the front-end machines on duty corresponding to the front-end nodes are changed.

10. The front-end node servo communication system based on Kafka according to claim 6, It is characterized in that Also includes: Setting a timer to monitor the operating status of the plurality of front nodes; The timer is used to monitor the front node in real time and upload the abnormal status of the front node to the background system in time.