Real-time library data service and interface management system based on memory security language
Through the real-time library data service and interface management system developed using the Rust language in the data acquisition and communication system of the energy field, the lack of dynamic control and hot loading mode is solved, and memory security, efficient concurrency and real-time data push capabilities are achieved.
Patent Information
- Application Number
- CN202411621156.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art cannot achieve dynamic control or adjustment in data acquisition and communication systems in energy field, lacks thermal loading mode, and it is difficult to dynamically respond to changes in business needs.
It adopts a real-time library data service and interface management system based on the memory security language Rust, providing synchronous or asynchronous interfaces, native client interfaces and script hot loading modes, and implements dynamic configuration and data transmission through FFI and policy scripts.
It realizes memory security, efficient concurrency performance and real-time data push capabilities, supports I/O-intensive tasks, provides flexible hot loading mode and data transmission mechanism, and enhances the dynamics and responsiveness of the system.
Smart Images

Figure CN119691034A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of interface management, and in particular to a real-time library data service and interface management system based on a memory-safe language. Background Art
[0002] The energy site involves the management of various power equipment and conversion equipment. The energy sites of power equipment are distributed over a wide area and have many types of equipment. How to connect various power source sites and make full use of various energy sources to reduce energy consumption and reduce environmental impact is a problem that needs to be solved at present.
[0003] According to some information, the edge computing gateway uses data collection functions as a basis to achieve data optimization, real-time response, agile connection, and intelligent analysis at the edge nodes of the industrial Internet; significantly reduce data traffic between the site and the cloud to avoid bottlenecks in cloud computing capabilities; optimize network architecture, respond more safely and quickly, and realize on-site business more intelligently.
[0004] Chinese patent document CN111163002A discloses a "container-based edge gateway system and energy data processing method". The system includes a cloud and at least one edge gateway end, and the edge gateway end includes a device communication module, a cloud communication interface module, a metadata management module, a container-based business processing module and a data storage module; wherein the container-based business processing module is used to run the cloud-trained or tested program encapsulated in a docker container, and transmit the program's running results to the cloud or the device, so that the edge gateway end reversely controls the device. The above technical solution cannot achieve dynamic control or adjustment during operation, and lacks a sufficiently convenient hot loading mode to dynamically respond to changes in business needs. Summary of the invention
[0005] The present invention mainly solves the technical problems that the original technical solution cannot realize dynamic control or adjustment during operation, and lacks a sufficiently convenient hot loading mode to dynamically respond to changes in business needs. It provides a real-time library data service and interface management system based on a memory-safe language, provides a synchronous or asynchronous external interface based on memory safety, and a native client interface, for strong experience of human-computer interaction and intensive calls to upstream systems; provides a script-based hot loading mode, abandons the previous protocol loading mode, and can flexibly validate and execute the code in real time without compiling and restarting; provides a data transmission mechanism based on the MQ mode to facilitate data transfer between systems.
[0006] The above-mentioned technical problems of the present invention are mainly solved by the following technical solutions: the present invention includes a system access layer, a collection control layer and a business service layer. The collection control layer includes communication protocols and protocol services for decoding the collected original messages and encoding the plain text data to be sent, as well as external uploading services and internal sending services for semi-business packaging of data services. The business service layer includes FFI that accesses the device collection control layer using a cross-language external function interface, and a policy service that configures and sends policy scripts based on business models.
[0007] This system is developed in Rust language, which ensures memory safety through its unique ownership system, borrowing and reference mechanism, lifecycle management, immutability and safe concurrency. The compiler performs strict checks at compile time to prevent problems such as memory leaks, dangling references and data competition, thereby providing an efficient and memory-safe business service operating environment. Through Rust language's own asynchronous programming model, such as asynchronous functions, asynchronous code blocks and asynchronous executors, the concurrent performance and responsiveness of the service are improved, further enhancing the system's support for I / O-intensive tasks such as real-time data push.
[0008] Preferably, the device acquisition control layer is responsible for data exchanges with various physical communication devices, and the communication protocols and protocol services realize the mutual conversion between data messages and data values, encode the data to be forwarded into a specific message format and send it to the communication device management module, interpret the data message sent by the communication device management module into a data value recognized by the system according to a specific format, and at the same time convert the system's various control commands to the remote end into a specific data message format.
[0009] Preferably, the communication protocol and protocol service include the following functions: a) Read the data message in the channel data receiving buffer, interpret the message into data values that the system can recognize, and then put these data values into the data storage area of the specific path; b) Read the data value from the data storage area of a certain path, convert it into a data message format according to a pre-defined protocol format, and then put the data message into the data sending buffer of the channel connected to the path; c) Receive various control commands to the remote end, convert them into data messages in a certain protocol format and put them into the channel data sending buffer; d) Manage the communication protocol library.
[0010] Preferably, the device acquisition control layer also includes a communication device management service, which is responsible for maintaining the smooth flow of data channels with access devices, receiving and sending original data messages, and includes the following functions: a) Status monitoring of data channels; b) Read and write operations on data channels; c) Management of channel read and write buffers; d) Processing of communication equipment operation request events; e) Communication equipment library.
[0011] Preferably, the device acquisition control layer also includes a data service, which is responsible for caching and sharing the collected data, broadcasting the changed data or the full data to the subscribers by monitoring the data changes and maintaining the data subscribers, and includes the following functions: a) Receive various data request commands such as full data and changed data from data processing nodes; b) When receiving the instruction to obtain all data, scan the entire shared data area and send all data to the data processing node; c) Circularly scan the entire shared data area, and when any changed data is found, send the changed data to the data processing node in a timely manner; d) When receiving an instruction to obtain specific data, the value of the data is read from the shared data area and sent to the requester; e) Send various data information to the data processing node according to the data request command of the data processing node.
[0012] Preferably, the business service layer is responsible for the access, collection and intelligent regulation of various physical communication devices, as well as further forwarding and persistence of data. In addition to writing scripts that run in the running domain, the policy service also needs to set static parameters for the scripts and parameters that can be dynamically modified at runtime.
[0013] Preferably, the business service layer includes FFI, which uses a cross-language external function interface to access the device acquisition control layer and consumes the upload and download services provided by the device acquisition control layer in the form of a dynamic link library.
[0014] Preferably, the business service layer also includes a collection configuration service, which is responsible for configuring and issuing collection parameters of access equipment, configuring the telemetry, telesignaling, remote control and remote adjustment of the equipment and making them take effect dynamically.
[0015] Preferably, the business service layer also includes data services to perform second-level and millisecond-level persistent storage of real-time data. a) Real-time data storage is to cache the current real-time data in sections after data parsing, event generation and stream computing. The cache depends on device division, and data from different devices is stored in different namespaces. b) Historical data storage: sub-second data storage and minute-level data storage. Second-level data storage is asynchronous storage, and minute-level data storage is full data storage.
[0016] Preferably, the business service layer also includes external interface services, which package complete business interfaces with more widely used protocols, including WebSocket interfaces and HTTP interface services.
[0017] a) The WebSocket interface is mainly used for real-time data subscription, transmission and upstream data push. All data is divided into different services based on the namespace dimension. b) HTTP interface service is mainly used for scenarios such as historical data acquisition and system configuration delivery. The upper-level system performs system authentication by carrying fields in the request header.
[0018] The beneficial effects of the present invention are: 1. Adopt the new generation of system-level programming Rust language to ensure memory safety.
[0019] 2. Introducing the Python script runtime written in Rust, so that the policy script supports hot loading and hot execution while having more efficient execution performance.
[0020] 3. Introduce the Actix-Web asynchronous API interface framework written in Rust to support the response of I / O intensive tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the principle structure of the present invention.
[0022] Figure 2 It is a schematic diagram of the principle structure of the equipment acquisition control layer of the present invention.
[0023] Figure 3 It is a collection configuration service workflow diagram of the present invention.
[0024] Figure 4 This is an example diagram of establishing a connection, sending a packet, confirming, and disconnecting a connection according to the present invention.
[0025] Figure 5 This is an example diagram of an HTTP interface service of the present invention.
[0026] Figure 6 The invention relates to a data acquisition and communication system of the prior art.
[0027] Figure 7 The present invention is a module software framework diagram of the prior art. DETAILED DESCRIPTION
[0028] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the technical solutions of the present application are further described in detail below through embodiments and in combination with the accompanying drawings. It should be understood that the specific implementation method described here is only an optimal embodiment of the present application, which is only used to explain the present application and does not limit the protection scope of the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] like Figure 6 As shown, the data acquisition and communication system can access various devices and systems, and these access channels can be centrally managed and controlled. The data acquisition and communication systems are required to be efficiently combined, so considering the efficiency of data processing, it is necessary to design an efficient interface.
[0030] Information interaction uses efficient shared memory exchange. The interface is encapsulated according to the standard for application requirements, and provides management interface, control interface, and real-time data interaction interface, so that the data acquisition and communication system can not only interact efficiently in real-time data, but also can be effectively embedded in the background system for unified control in terms of control functions. This greatly improves the versatility of the data acquisition and communication system and the efficiency of interconnection with the background.
[0031] like Figure 7 As shown in Figure 1, the link monitor is responsible for managing the overall work of establishing a link, including establishing, maintaining, and disconnecting remote connections. This includes monitoring and controlling the status of all links (including active and standby nodes), communicating with background nodes, and switching and normal communication of the monitoring subsystems on the active and standby nodes due to failures.
[0032] The protocol scanner is responsible for executing the communication request and converting the obtained results and returning them to the link monitor. The protocol scanner is responsible for notifying the link monitor of link status changes. It is responsible for counting the status of each connection, including the number of sent packets, the number of received packets, the number of timeouts, the number of invalid packets, and the number of checksum errors. These statuses will be notified to the network management agent when necessary.
[0033] The network management agent module is mainly used to maintain the real-time library. It encapsulates the management interface of the real-time library. All real-time information about the front-end system's links, equipment, remote control center, etc. is updated through the network management agent.
[0034] The front-end communication database contains all the configuration information of the current communication network. It is completely owned by the network management agent, and all changes are completed through the network management agent. The front-end communication database defines information such as the front-end node, acquisition node, channel, and communication path, as well as related information such as the protocol used by the channel and the serial baud rate.
[0035] The front-end communication database is a standard memory database, which is divided into two parts: static and dynamic. The static part describes the front-end nodes, acquisition nodes, channels and paths, etc., and also includes the relationship between them. The dynamic part contains the current status of these objects. The reference library of the front-end communication database is changed by the network management agent, and the propagation of the copy library is also realized by the network management agent. In order to reduce the amount of propagated data, it is divided into static and dynamic parts.
[0036] Defects of the existing technical solutions: 1. As the core component of energy management, the existing system lacks external interfaces to provide functional support. During the operation of the system, it can only rely on the configuration table pre-configured in the database, and dynamic control or adjustment cannot be achieved during operation. The system does not provide relevant external interfaces for other programs to call for configuration modification or data display.
[0037] 2. The existing system lacks a visual interface for data display and configuration, which means that all operations can only be performed by manually modifying the database. This operation method increases the risk of configuration errors, especially in terms of table relationships and foreign key management, which can easily lead to program operation abnormalities due to configuration errors.
[0038] 3. The existing system lacks a sufficiently convenient hot loading mode to dynamically respond to changes in business needs. Since the system is mainly for energy storage management, the business environments of different users are different, and the functional requirements in energy storage scenarios are also different. Therefore, the policy codes involved in energy storage management in the system need to be frequently adjusted to adapt to the needs of different users. In this case, it is urgent to provide a platform mechanism that supports dynamic loading of scripts so that the policy code can be flexibly modified before the system is released or during operation, thereby meeting the real-time changes in energy storage business logic.
[0039] This system is developed in Rust language, which ensures memory safety through its unique ownership system, borrowing and reference mechanism, lifecycle management, immutability and safe concurrency. The compiler performs strict checks at compile time to prevent problems such as memory leaks, dangling references and data competition, thereby providing an efficient and memory-safe business service operating environment. Through Rust language's own asynchronous programming model, such as asynchronous functions, asynchronous code blocks and asynchronous executors, the concurrent performance and responsiveness of the service are improved, further enhancing the system's support for I / O-intensive tasks such as real-time data push.
[0040] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0041] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.
[0042] Embodiment: This embodiment is a real-time library data service and interface management system based on a memory-safe language, such as Figure 1 As shown, it includes a system access layer, a collection control layer and a business service layer. The collection control layer includes communication protocols and protocol services for decoding the collected original messages and encoding the plain text data to be sent, as well as external uploading services and internal sending services for semi-business packaging of data services. The business service layer includes FFI that uses a cross-language external function interface to access the device collection control layer, and a policy service that configures and sends policy scripts based on business models.
[0043] The equipment acquisition control layer is responsible for data exchange with various physical communication devices. The communication protocol and protocol services realize the mutual conversion between data messages and data values, encode the data to be forwarded into a specific message format and send it to the communication equipment management module, interpret the data message sent by the communication equipment management module into a data value recognized by the system according to a specific format, and convert various control commands of the system to the remote end into a specific data message format. The communication protocol and protocol services include the following functions: a) Read the data message in the channel data receiving buffer, interpret the message into data values that the system can recognize, and then put these data values into the data storage area of the specific path; b) Read the data value from the data storage area of a certain path, convert it into a data message format according to a pre-defined protocol format, and then put the data message into the data sending buffer of the channel connected to the path; c) Receive various control commands to the remote end, convert them into data messages in a certain protocol format and put them into the channel data sending buffer; d) Manage the communication protocol library.
[0044] The equipment acquisition control layer also includes communication equipment management services, which are responsible for maintaining the smooth flow of data channels with access equipment, receiving and sending original data messages, including the following functions: a) Status monitoring of data channels; b) Read and write operations on data channels; c) Management of channel read and write buffers; d) Processing of communication equipment operation request events; e) Communication equipment library.
[0045] The device collection control layer also includes data services, which are responsible for caching and sharing the collected data. By monitoring data changes and maintaining data subscribers, the changed data or full data is broadcast to subscribers. The functions include the following: a) Receive various data request commands such as full data and changed data from data processing nodes; b) When receiving the instruction to obtain all data, scan the entire shared data area and send all data to the data processing node; c) Circularly scan the entire shared data area, and when any changed data is found, send the changed data to the data processing node in a timely manner; d) When receiving an instruction to obtain specific data, the value of the data is read from the shared data area and sent to the requester; e) Send various data information to the data processing node according to the data request command of the data processing node.
[0046] The business service layer is responsible for the access, collection and intelligent regulation of various physical communication devices, as well as further forwarding and persistence of data. In addition to writing scripts that run in the running domain, the policy service also needs to set static parameters for the scripts and parameters that can be dynamically modified at runtime.
[0047] The business service layer includes FFI, which uses a cross-language external function interface to access the device acquisition control layer and consumes the upload and download services provided by it in the form of a dynamic link library. The business service layer also includes acquisition configuration services, which are responsible for configuring and issuing acquisition parameters for access devices, configuring the telemetry, telesignaling, remote control, and remote adjustment of the device and making them take effect dynamically. The business service layer also includes data services, which store real-time data persistently in seconds and milliseconds. a) Real-time data storage is to cache the current real-time data in sections after data parsing, event generation and stream computing. The cache depends on device division, and data from different devices is stored in different namespaces. b) Historical data storage: sub-second data storage and minute-level data storage. Second-level data storage is asynchronous storage, and minute-level data storage is full data storage.
[0048] The business service layer also includes external interface services, which package complete business interfaces with more widely used protocols, including WebSocket interfaces and HTTP interface services.
[0049] a) The WebSocket interface is mainly used for real-time data subscription, transmission and upstream data push. All data is divided into different services based on the namespace dimension. b) HTTP interface service is mainly used for scenarios such as historical data acquisition and system configuration delivery. The upper-level system performs system authentication by carrying fields in the request header.
[0050] Example 1 This system is developed in Rust language, and its unique ownership system, borrowing and reference mechanism, lifecycle management, immutability and safe concurrency ensure memory safety. The compiler performs strict checks at compile time to prevent problems such as memory leaks, dangling references and data competition, thereby providing an efficient and memory-safe business service operating environment. Through Rust language's own asynchronous programming model, such as asynchronous functions, asynchronous code blocks and asynchronous executors, the concurrent performance and responsiveness of the service are improved, and the support for I / O-intensive tasks such as real-time data push of the system is further enhanced. The solution is divided into three layers: the top layer is the external system, which is responsible for user-oriented business configuration, data presentation and message notification, which will not be explained here.
[0051] 1. Equipment collection control layer, responsible for data exchange with various physical communication devices. Among them: 1. The communication equipment management service is responsible for maintaining the smooth flow of data channels with access equipment and receiving and sending original data messages. Figure 2 As shown, it is divided into the following main functions: a) Data channel status monitoring b) Read and write operations on data channels c) Management of channel read and write buffers d) Handling of communication equipment operation request events e) Communication equipment library 2. The communication protocol and protocol service is responsible for decoding the collected original messages and encoding the plain text data sent down. It realizes the conversion between data messages and data values. It encodes the data to be forwarded into a specific message format and sends it to the communication device management module. It interprets the data message sent by the communication device management module into a data value that can be recognized by the system according to a specific format. At the same time, it converts various control commands of the system to the remote end into a specific data message format. It has the following main functions: a) Read the data message in the channel data receiving buffer, interpret the message into data values that the system can recognize, and then put these data values into the data storage area of the specific path.
[0052] b) Read the data value from the data storage area of a certain path, convert it into a data message format according to a pre-defined protocol format, and then put the data message into the data sending buffer of the channel connected to the path.
[0053] c) Receive various control commands to the remote end, convert them into data messages in a certain protocol format and put them into the channel data sending buffer.
[0054] d) Manage the communication protocol library.
[0055] 3. The data service is responsible for caching and sharing the collected data, monitoring data changes and maintaining data subscribers, and broadcasting the changed data or all data to subscribers. It has the following main functions: a) Receive various data request commands such as full data and changed data from data processing nodes.
[0056] b) When receiving the instruction to obtain all data, scan the entire shared data area and send all data to the data processing node.
[0057] c) Circularly scan the entire shared data area, and when any changed data is found, send the changed data to the data processing node in a timely manner.
[0058] d) When an instruction to obtain specific data is received, the value of the data is read from the shared data area and sent to the requester.
[0059] e) Send various data information to the data processing node according to the data request command of the data processing node.
[0060] 4. Send services externally and internally, and be responsible for the semi-business packaging of data services for the business service layer to call and output.
[0061] 2. Business service layer, responsible for the access, collection, intelligent control, further forwarding and persistence of data of various physical communication devices. Among them: 1. FFI mainly uses a cross-language external function interface to access the device acquisition control layer and consume the upload and download services it provides. This system uses a dynamic link library.
[0062] 2. The acquisition configuration service is responsible for configuring and issuing the acquisition parameters of the access device. It mainly configures the telemetry, telesignaling, remote control and remote adjustment of the device and makes them take effect dynamically. The main steps are as follows: Figure 3 shown.
[0063] 3. The policy service is responsible for configuring and issuing the control policy scripts formulated according to the business model, so as to facilitate the execution of policy scripts in the script running domain of the device acquisition control layer.
[0064] In addition to writing scripts that run in the running domain, policy scripts also need to set static parameters for the scripts and parameters that can be dynamically modified at runtime to facilitate users to modify policies.
[0065] 4. The data service is responsible for persistent storage of real-time data at the second and millisecond levels.
[0066] a) Real-time data storage is to cache the current real-time data in sections after data parsing, event generation, and stream computing. Caching depends on device division, and data from different devices is stored in different namespaces to facilitate interface acquisition.
[0067] b) Historical data storage: split-second data storage and minute-level data storage. Second-level data storage is asynchronous storage, with selectable storage point number and storage time of 1 month. Minute-level data storage is full data storage, with selectable storage step size: 1, 5, 10, 15, 30, 60 minutes; storage time of 1 year; 5. The external interface service is responsible for packaging the complete business interface with a more widely used protocol for external systems or human-computer interfaces to call and execute.
[0068] a) The WebSocket interface is mainly used for real-time data subscription, transmission and upstream data push. All data is divided into different services based on the namespace dimension. The data packet types and uses are shown in the following table: Table 1 Comparison table of data packet types and uses type Identification id use CONNECT 0 Use when connecting to a namespace DISCONNECT 1 Used when disconnecting from a namespace EVENT 2 Used to send data to the other party ACK 3 To confirm an event CONNECT_ERROR 4 Use when connecting to a namespace BINARY_EVENT 5 Used to send binary data to the other party BINARY_ACK 6 Used to confirm events (responses include binary data) Examples of establishing a connection, sending packets, confirming, and disconnecting are as follows: Figure 4 shown.
[0069] b) HTTP interface service is mainly used for historical data acquisition and system configuration delivery. The upper-layer system performs system authentication by carrying the following fields in the request header: Table 2 Request header fields Field Name Explanation and Use satoken Session key for authentication x-zg-system The system ID of the request source The unified structure of the returned data is as follows: Table 3 Return data unified structure table Field Name Explanation and Use status The data status of this response, 0: success, non-0: exception statusText Detailed description of the status code data Data content Examples include Figure 5 shown.
[0070] Beneficial effects: 1. The native human-computer interaction interface based on the C / S architecture written in the flutter language improves the stability and fluency of the system on the resistive screen of small industrial computers and reduces memory usage.
[0071] 2. It provides a complete set of configuration and display visualization interfaces, which improves the operation and maintenance efficiency of system deployment by installation and maintenance personnel, reduces the complexity of operation and maintenance, and also facilitates users to directly view operating data and perform business operations on small industrial computers.
[0072] 3. Provide timing or real-time calculation modules based on dynamic script loading to connect data collection and publish-subscribe services, so that the system can control energy storage equipment according to the algorithm.
[0073] 4. The system provides interfaces for third-party systems, such as http interface, WebSocket interface, mqtt interface, and kafka-based data transmission capabilities, which provide effective system-to-system interaction capabilities during system interaction, making it convenient for other systems to transmit data and control commands to this system. This system can also perform edge capabilities such as uploading data to the cloud through the MQTT interface.
[0074] The specific embodiments described herein are merely examples of the spirit of the present invention. The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that a technician in the technical field to which the present application belongs may make various modifications or supplements to the described specific embodiments or replace them in a similar manner, but will not deviate from the spirit of the present application or exceed the scope defined in the attached claims. For a person of ordinary skill in the art, multiple variations and improvements may also be made without departing from the concept of the present application. Therefore, the scope of protection of this patent shall be subject to the attached claims.
Claims
1. A real-time library data service and interface management system based on a memory-safe language, comprising a system access layer, characterized in that: It also includes an acquisition control layer and a business service layer. The acquisition control layer includes a communication protocol service for decoding the collected original messages and encoding the plain text data sent, as well as an external upload service and an internal delivery service for semi-business packaging of data services. The business service layer includes an FFI that uses a cross-language external function interface to access the device acquisition control layer, and a policy service that configures and sends according to the control policy script formulated according to the business model.
2. A real-time library data service and interface management system based on a memory-safe language according to claim 1, characterized in that: The device acquisition control layer is responsible for data exchanges with various physical communication devices. The communication protocol service realizes the mutual conversion between data messages and data values, encodes the data to be forwarded into a specific message format and sends it to the communication device management module, interprets the data message sent by the communication device management module into a data value recognized by the system according to a specific format, and converts various control commands of the system to the remote end into a specific data message format.
3. A real-time library data service and interface management system based on a memory-safe language according to claim 2, characterized in that: The communication protocol service includes: reading data messages in the channel data receiving buffer, interpreting the messages into data values recognized by the system and placing them into the data storage area; reading data values from the data storage area and converting them into data message format and placing them into the channel data sending buffer; receiving control commands to the remote end and converting them into data messages and placing them into the channel data sending buffer.
4. A real-time library data service and interface management system based on a memory-safe language according to claim 1 or 2, characterized in that: The device acquisition control layer also includes a communication device management service, which is responsible for maintaining the smooth flow of data channels with access devices and receiving and sending original data messages, including: data channel status monitoring; read and write operations on data channels; management of channel read and write buffers; processing of communication device operation request events; and communication device library.
5. A real-time library data service and interface management system based on a memory-safe language according to claim 1 or 2, characterized in that: The device acquisition control layer also includes a data service, which is responsible for caching and sharing the collected data, broadcasting the changed data or all data to subscribers by monitoring data changes and maintaining data subscribers, including: receiving data request commands from data processing nodes; sending various data information to data processing nodes according to the data request commands of data processing nodes; when receiving an instruction to obtain specific data, reading the value of the data from the shared data area and sending it to the requester.
6. A real-time library data service and interface management system based on a memory-safe language according to claim 1, characterized in that: The business service layer is responsible for the access, collection and intelligent regulation of various physical communication devices, as well as further forwarding and persistence of data. In addition to writing scripts that run in the running domain, the policy service also needs to set static parameters for the scripts and parameters that can be dynamically modified at runtime.
7. A real-time library data service and interface management system based on a memory-safe language according to claim 1 or 6, characterized in that: The business service layer includes FFI, which uses a cross-language external function interface to access the device acquisition control layer and consumes the uploading and downloading services provided by the device acquisition control layer in the form of a dynamic link library.
8. A real-time library data service and interface management system based on a memory-safe language according to claim 1 or 6, characterized in that: The business service layer also includes a collection configuration service, which is responsible for configuring and issuing collection parameters of access equipment, configuring the telemetry, telesignaling, remote control and remote adjustment of the equipment and making them take effect dynamically.
9. A real-time library data service and interface management system based on a memory-safe language according to claim 1 or 6, characterized in that: The business service layer also includes data services, which perform persistent storage of real-time data at the second and millisecond levels, specifically including: real-time data storage performs section caching of current real-time data, which depends on device division during caching, and data of different devices are stored in different namespaces; historical data storage includes sub-second data storage and minute-level data storage, with second-level data storage being asynchronous storage and minute-level data storage being full data storage.
10. A real-time library data service and interface management system based on a memory-safe language according to claim 1 or 6, characterized in that: The business service layer also includes external interface services, which package complete business interfaces with more widely used protocols, including WebSocket interfaces and HTTP interface services.
Citation Information
Patent Citations
Container-based edge gateway system and energy data processing method
CN111163002A
Cited By
A centralized data management method, device and equipment based on cache comparison linkage
CN122601729A