Information interaction method and device, equipment, storage medium and product
By employing a multi-threaded and dynamic link library loading approach in smart substations, the modeling and message processing issues of devices connected to multiple peer devices under the IEC 61850 protocol were resolved, achieving efficient information exchange and resource optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-03-31
AI Technical Summary
In smart substations, server or client devices based on the IEC 61850 protocol face challenges such as long modeling times, untimely message processing, and even message blocking when connecting to multiple peer devices. Existing technologies, such as multi-process technology, increase resource requirements and software development complexity, while multi-threaded technology suffers from inter-thread interference.
The local main functional device is started using multi-threading and dynamic link library loading. Information is exchanged with the peer device through memory-isolated multi-threaded concurrency technology to avoid interference between threads. The cache area is automatically allocated through dynamic link library to reduce human development costs.
It accelerates information processing speed, ensures the mutual exclusion of data in the global storage area, saves software development costs, improves the utilization rate of local terminal device resources, and reduces system equipment costs.
Smart Images

Figure CN121764549A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power communication technology for smart substations, and in particular to an information interaction method, device, equipment, storage medium, and product. Background Technology
[0002] Currently, smart substations commonly use the IEC 61850 communication protocol for data communication. Based on the Ethernet protocol and oriented towards TCP connections, the IEC 61850 communication protocol is divided into MMS client and MMS server. Among them, the various measurement and control devices and protection devices in the smart substation are server-side devices in the power communication system, while the substation's background management system and communication network management machine, etc., are client-side devices in the power communication system.
[0003] For related server or client devices based on the IEC 61850 protocol, acting as local devices, when exchanging information with peer devices, they primarily create a main functional unit on the local device that includes a basic data model and a message processing module. The message processing module establishes a network connection with the peer device and processes its messages. When the number of peer devices connected to the local device is large, problems such as long modeling times, untimely message processing, and even message congestion may occur. Summary of the Invention
[0004] This application provides an information interaction method, apparatus, device, storage medium, and product that uses multi-threaded isolation technology to solve problems such as long modeling time, untimely message processing, and even message blocking that occur when the number of peer devices connected is large, based on the IEC 61850 protocol and the server or client device is used as a local device.
[0005] In a first aspect, embodiments of this application provide an information interaction method, the method comprising:
[0006] Each local terminal main functional device is started and configured using a multi-threaded and dynamic link library loading method; the local terminal main functional devices are deployed on local terminal equipment based on the IEC 61850 protocol;
[0007] Each of the local main functional devices interacts with the peer device based on the IEC 61850 protocol.
[0008] Secondly, embodiments of this application provide an information interaction device, the device comprising:
[0009] The startup module is used to start each configured local main functional device using a multi-threaded and dynamic link library loading method; the local main functional devices are deployed on local devices based on the IEC 61850 protocol;
[0010] The interaction module is used to exchange information with the connected peer devices based on the IEC 61850 protocol through each of the local main functional devices.
[0011] Thirdly, embodiments of this application provide a terminal device, the terminal device comprising:
[0012] At least one processor; and
[0013] A memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the information interaction method described in any embodiment of this application.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions that are used to cause a processor to execute and implement the information interaction method described in any embodiment of this application.
[0016] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when executed by a processor, implements the information interaction method described in any embodiment of this application.
[0017] The technical solution of this application embodiment starts and completes the configuration of each local main functional device by using multi-threading and dynamic link library loading. The local main functional devices are deployed on local devices based on the IEC 61850 protocol. Information is exchanged between each local main functional device and the connected peer devices based on the IEC 61850 protocol. This enables each local main functional device to process interactive information in parallel based on multi-threading, which speeds up the processing of interactive information and solves the problems of long modeling time, untimely message processing, and even message blocking that occur when there are a large number of connected peer devices, such as server or client devices based on the IEC 61850 protocol. Furthermore, the operation behavior of each local main functional device on the global storage area is independent, which not only ensures the mutual exclusion of multi-threaded operations on global storage data, but also saves the manpower cost of software development. At the same time, compared with multi-process technology, it has lower requirements for local device resources, improves the utilization rate of local device resources, and helps to reduce system equipment costs.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating an information interaction method provided in Embodiment 1 of this application;
[0021] Figure 2 This is a schematic diagram of the information interaction method provided in Embodiment 1 of this application when the local terminal is a client device;
[0022] Figure 3 A schematic diagram of the information interaction method provided in Embodiment 1 of this application when the local terminal is a server device;
[0023] Figure 4 A flowchart of an information interaction method provided in Embodiment 2 of this application;
[0024] Figure 5 This is a schematic diagram of the structure of an information interaction device provided in Embodiment 3 of this application;
[0025] Figure 6 This is a schematic diagram of the structure of a terminal device that implements the information interaction method of the embodiments of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] In existing technical solutions, when a local device connects to multiple peer devices, either a server or a client based on the IEC 61850 protocol can act as the local device. This allows for the creation of multiple main functional units on the local device to handle information exchange with the peer devices. However, having a large number of processes on the local device increases the demand on local resources. Furthermore, enabling normal communication between multiple processes requires additional multi-process communication mechanisms, increasing the complexity of software development.
[0029] Servers or clients based on the IEC 61850 protocol can employ multi-threaded concurrency techniques. However, due to data sharing among multiple threads, interference between them can occur. To avoid this interference, additional thread isolation is required. For example, in Message Queuing Telemetry Transport (MQTT), a buffer needs to be manually set up for each client, ensuring that each client uses only its own buffer and isolating the data of each MQTT communication service thread within the buffer. This undoubtedly increases the development cost and difficulty.
[0030] To address the aforementioned issues, this application provides a method for starting local main functional devices using multi-threading and dynamic link library loading. Multiple main functional devices are loaded locally using dynamic link library loading, and then simultaneously started using multi-threading. This allows each local main functional device to interact with the connected peer device based on memory-isolated multi-threaded concurrency technology. Compared to MQTT technology, there is no need to manually create a buffer for each thread. Simply starting the main functional device using multi-threading when enabling the dynamic library allocates an independent buffer for each main functional device, eliminating manual operation and saving labor costs. Furthermore, compared to multi-process technology, it places lower demands on local device resources, improving resource utilization and reducing system equipment costs.
[0031] The following section provides a detailed description of an information interaction method provided in this application, using specific embodiments as examples.
[0032] Example 1
[0033] Figure 1 This is a flowchart of an information interaction method provided in Embodiment 1 of this application. This embodiment can be applied to information interaction between client devices and server devices based on the IEC 61850 protocol. The method can be executed by an information interaction device, which can be implemented in hardware and / or software. The information interaction device can be configured in the client device or the server device.
[0034] like Figure 1 As shown, the method includes:
[0035] S110. The main functional devices of each local terminal that have completed configuration are started using a multi-threaded and dynamic link library loading method.
[0036] The local main functional unit can be understood as the main functional unit configured in the local device. The local main functional unit is used to process messages sent by the peer device and load the basic data model. The local device can be a client device or a server device. A Dynamic Link Library (DLL) is a way to implement the concept of a shared function library in an operating system. The DLL loading method can be understood as the method of loading a DLL. Generally, a DLL is loaded by calling a DLL loading function. The DLL loading functions provided in different operating systems may differ; this embodiment of the invention does not limit the DLL loading function.
[0037] Multithreading refers to the technology of implementing concurrent execution of multiple threads through software or hardware.
[0038] Specifically, each local main functional device is used as a dynamic link library allocated to each thread. Each local main functional device is started using a multi-threaded approach and a dynamic link library loading function. Each thread is allocated an independent cache area to achieve memory isolation between multiple threads, thereby enabling each local main functional device to interact with the connected peer device based on memory-isolated multi-threaded communication.
[0039] As an optional embodiment of this application, it further includes: before starting each configured local main functional device in the local device using a multi-threaded and dynamic link library loading method, configuring the number of local main functional devices to be started and the device information of the server device.
[0040] The local device can be understood as the device that sends interactive messages during the information exchange process. The local device can be a client device based on the IEC 61850 protocol or a server device based on the IEC 61850 protocol.
[0041] The equipment information of the server-side device may include: the network information of the server-side device and the basic data model information of the server-side device. The basic data model information of the server-side device can be understood as the relevant information of the basic data model of the intelligent electronic device (IED) serving as the server. The IED basic data model refers to a model that provides a detailed description and model of industrial electronic equipment. Its core is to establish a corresponding mathematical model based on the characteristics and functions of the device in order to perform simulation, testing, and optimization operations.
[0042] In this embodiment, the local device is configured with at least two local main functional devices, each of which can connect to at least one peer device for processing interaction information from all connected peer devices. The number of local main functional devices that can be started can be determined based on the number of peer devices and the performance of the local main functional devices.
[0043] Specifically, in the local device, a configuration file is used to configure the number of local main functional devices to be started and the device information of related devices. If the local device is a client device based on the IEC 61850 protocol, the peer devices based on the IEC 61850 protocol that the local device needs to connect to are written into the configuration file; if the local device is a server device based on the IEC 61850 protocol, the device information of the local device is written into the configuration file.
[0044] In one alternative embodiment, a configuration file is pre-generated during initial system runtime to configure the number of local main functional devices to be started, as well as the device information of the relevant devices.
[0045] In another optional embodiment, during system operation, if it is necessary to update the number of local main functional devices started and / or the device information of peer devices connected to the local main functional devices, a configuration file can be generated. The daemon process of the current program sends an IPC command to the local main functional device to guide the local main functional device to clear the local cache and then reread the reconfigured configuration file to update the number of local main functional devices started and / or the device information of the server devices.
[0046] S120. Information exchange is conducted between each local terminal main function device and the access peer device.
[0047] In this context, the peer device can be understood as the end that interacts with the local device. When the local device is understood as a client device based on the IEC 61850 protocol, the peer device can be understood as a server device based on the IEC 61850 protocol; conversely, when the local device is understood as a server device based on the IEC 61850 protocol, the peer device can be understood as a client device based on the IEC 61850 protocol.
[0048] Specifically, after startup, each local main functional device in the local terminal device interacts with the connected peer device based on memory-isolated multi-threading technology, and processes the interaction messages in parallel using multiple threads.
[0049] In one optional embodiment, the main functional components of the local device include: a configuration file, a protocol message processing module, and a basic data model; the configuration file includes: a first configuration file and a second configuration file; the protocol message processing module is used to parse and process messages obtained by the local device from the access peer device, obtain message parsing results, and complete message interaction with the peer device; the basic data model is used to map the message parsing results. Each peer device includes at least one peer main functional component, which also includes: a configuration file, a protocol message processing module, and a basic data model.
[0050] The first configuration file is used to configure the number of startup parameters for the local main functional devices, and the second configuration file is used to configure the device parameters corresponding to the local main functional devices.
[0051] For example, Figure 2 This is a schematic diagram illustrating the structure of the information interaction method provided in Embodiment 1 of this application when the local terminal device is a client device. For example... Figure 2As shown, when the local device is a client device and the peer device is a server device, the local main functional device (i.e., the client main functional device) loads the basic data model during the initialization phase. In some cases, if the second configuration file (the number of local main functional devices started and / or the device information of the peer devices accessed by the local main functional device) is updated during system operation, the daemon process of the current program can send IPC commands to the local main functional device to guide it to reload the basic data model. After receiving the interaction message sent by the accessed server device, the local main functional device decrypts and parses the interaction message through the protocol message processing module to obtain the message parsing result; then, it performs data mapping on the message parsing result through the loaded basic data model to obtain the data mapping result; the data mapping result is stored in the cache space of the local device and stored in the data cache, waiting for instructions to send it to the front-end display screen for display; the data cache can be in the cloud or an external storage medium.
[0052] Figure 3 This is a schematic diagram illustrating the structure of the information interaction method provided in Embodiment 1 of this application when the local terminal device is a server terminal device. For example... Figure 3 As shown, when the local device is a server device and the peer device is a client device, the local main functional device (i.e., the server main functional device) loads the basic data model during the initialization phase. In some cases, if the second configuration file (the number of local main functional devices started and / or the device information of the peer devices connected to the local main functional device) is updated during system operation, the daemon process of the current program can send IPC commands to the local main functional device to guide it to load the data model a second time. After receiving the interaction message from the client, the local main functional device decrypts and parses the interaction message through the protocol message processing module to obtain the message parsing result; it then maps the message parsing result to data through the basic data model to obtain the data mapping result; and finally, it performs corresponding operations based on the mapping result.
[0053] It should be noted that, Figure 2 and Figure 3 A schematic diagram is given of a local main function device in a local device connecting to a peer device. The local main function device can also connect to multiple peer devices.
[0054] The technical solution of this application embodiment configures the number of local main functional devices started in the local terminal device and the device information of the peer devices connected to each local main functional device; it starts each configured local main functional device using multi-threading and dynamic link library loading; and it enables information interaction between each local main functional device and the connected peer devices. This allows each local main functional device to process interactive information in parallel based on multi-threading, thus accelerating the processing speed of interactive information; furthermore, the operation behavior of each local main functional device on the global storage area is independent of each other, ensuring the mutual exclusion of multi-threaded operations on global storage area data and saving the manpower cost of software development; at the same time, compared with multi-process technology, it has lower requirements for local terminal device resources, improves the utilization rate of local terminal device resources, and helps to reduce system equipment costs.
[0055] Example 2
[0056] Figure 4 This is a flowchart of an information interaction method provided in Embodiment 2 of this application. Based on the above embodiments, this embodiment further includes, before starting each configured local main functional device using a multi-threaded and dynamic link library loading method: obtaining a first configuration file and configuring the number of local main functional devices to be started based on the first configuration file; obtaining a second configuration file and configuring the local main functional devices based on the second configuration file; the second configuration file includes at least: device parameters of the server device.
[0057] like Figure 4 As shown, the method includes:
[0058] S210. Obtain the first configuration file and configure the startup quantity parameter of the local main function device based on the first configuration file.
[0059] The first configuration file can be understood as a configuration file for configuring parameters on the local device.
[0060] Specifically, since the local terminal device in this embodiment may contain one or more local terminal main functional devices, the number of local terminal main functional devices that need to be started in the local terminal device is configured based on the first configuration file.
[0061] In an optional embodiment, the step of obtaining the first configuration file includes: obtaining a preset number of peer devices that a single local main function device of the local device can support accessing and the total number of peer devices that the local device needs to access; determining the number of local main function devices to be started based on the total number and the maximum number; and writing the number of starts into the first configuration file.
[0062] The preset number of peer devices that the local main functional device supports access can be the maximum number of peer devices allowed to access, or it can be the optimal number of peer devices allowed to access when the performance of the local main functional device is optimal. This embodiment of the invention does not impose any restrictions on this.
[0063] Specifically, a single local main functional device can only connect to a limited number of peer devices and process a limited number of their interaction messages. Therefore, multiple local main functional devices need to be configured within the local device. The specific implementation method is as follows: Obtain the preset number of peer devices that a single local main functional device can support connecting to, and the total number of peer devices that the local device needs to connect to. Divide the total number by the maximum number. If the divisor is an integer, determine the number of local main functional devices that can be started; if the divisor is not an integer, round up the divisor to obtain the integer value, which is then determined as the number of local main functional devices that can be started. Write the number of starts to the first configuration file for configuring the number of starts parameter in the local device.
[0064] For example, the preset number of peer devices that a single local main functional device can support can be obtained by: estimating the number of peer devices that the local main functional device can support based on the performance parameters of the local device and the local main functional device; or by setting test indicators, gradually increasing the number of peer devices connected to the local main functional device, and performing performance tests on the local main functional device based on the set test indicators. If the number of peer devices connected to the local main functional device is N+1, and the test indicators are no longer met, then the maximum number of peer devices that a single local main functional device can support is considered to be N. The test objectives can include: real-time test indicators and performance test indicators, such as packet parsing efficiency, packet parsing accuracy, and packet parsing time.
[0065] S220. Obtain the second configuration file and configure the device parameters corresponding to each local terminal main function device based on the second configuration file.
[0066] The device parameters corresponding to the local main functional device can be understood as the devices involved in the information interaction process of the local main functional device. For example, it could be the local device deploying the local main functional device, or the peer device interacting with the local main functional device. The second configuration file can be understood as the configuration file for configuring the parameters of the local main functional device. The main functional device configuration file includes at least: the device parameters of the server device, such as the server device's network parameters and IED information; the IED information may include, for example, the IED device name and IED access point.
[0067] Specifically, for the client device deploying the local main functional device or the server device it interacts with, at least the server device's device parameters are written into the second configuration file to configure the server device's device parameters in the local main functional device. As an optional implementation of this application, the step of obtaining the second configuration file includes:
[0068] S221. If the local terminal device is a client device based on the IEC 61850 protocol, obtain the local terminal device information and the peer device information of the peer device that needs to access the local terminal main function device, and write the local terminal device information and the peer device information into the second configuration file.
[0069] Specifically, when the local device is a client device based on the IEC 61850 protocol, the local device information, i.e., the client device information, and the peer device information of the peer device that needs to access the local main functional device, i.e., the server device information of the server device that needs to access the client device, are written into the second configuration file to configure the client device parameters and server device parameters of the local main functional device.
[0070] S222. If the local terminal device is a server device based on the IEC 61850 protocol, obtain the local terminal device information and write the local terminal device information into the second configuration file.
[0071] Specifically, when the local device is a server device based on the IEC 61850 protocol, it is necessary to obtain at least the local device information, i.e. the server device information, and write the server device information into the second configuration file to configure the server device parameters of the local main functional device.
[0072] In an optional embodiment, if the local terminal device is a server device based on the IEC 61850 protocol, the method further includes: obtaining peer device information of the peer device that needs to access the local terminal main function device; and writing the peer device information into the second configuration file.
[0073] Specifically, when the local device is a server device based on the IEC 61850 protocol, in addition to writing the server device information into the second configuration file, it can also obtain the peer device information of the peer device that needs to access the local main functional device and write the peer device information into the second configuration file in advance, so that the server device knows the information of the client device that needs to be accessed in advance, which can improve the efficiency of information exchange.
[0074] As an optional implementation of this application, the step of obtaining the peer device information of the peer device that needs to access the local terminal main function device includes:
[0075] 1) Obtain the first average message transmission time from the local terminal device to each of the peer devices.
[0076] The first average message transmission time is the average time it takes for a message sent by the local device to be transmitted to each peer device.
[0077] Specifically, obtain the first transmission time {t1,t2,t3,…,t} from the local device to each peer device. s}, where S is the total number of peer devices in the smart substation; calculate the first average message transmission time from the local device to each peer device.
[0078] 2) Based on the number of peer devices that each local terminal main function device supports access to and the message transmission time from the local terminal device to the peer device, the peer devices accessed by the local terminal device are divided into a target number of peer device groups; wherein, the time difference between the second average message transmission time from the local terminal device to each peer device in the peer device group and the first average message transmission time is less than a preset value.
[0079] The second average message transmission time is the average time it takes for a message sent by the local device to be transmitted to each peer device in the peer device group.
[0080] Specifically, in order for each local main functional device to receive the interaction messages sent by the peer device within a similar time, and thus complete the message interaction with different peer devices within a similar time, the peer device group to which the local device can access can be determined based on the message transmission time from the local device to each peer device and the number of peer devices that each local main functional device can support access.
[0081] The method for dividing the target number of peer device groups based on the preset number of peer devices supported by each local main functional device and the message transmission time from the local device to the peer device can be as follows: Obtain the number N of peer devices supported by each local main functional device, and calculate the number of peer device groups to be divided. The peer device groups are divided according to the principle that each peer device group contains N peer devices, and the time difference between the second average message transmission time and the first average message transmission time of the peer devices within each peer device group is less than a preset value. The second average message transmission time of the N peer devices in a peer device group is... The preset value can be set to a very small value, that is, the second average message transmission time is similar to the first average message transmission time, so that the interactive messages transmitted between the local end device and the peer devices in each peer device group arrive in similar time.
[0082] 3) Assign each of the peer device groups to different local main functional devices, with each peer device group used to access one of the local main functional devices.
[0083] Specifically, after determining M peer device groups, the M peer device groups are assigned to different M local terminal main function devices, and each peer device group is used to access one of the local terminal main function devices.
[0084] 4) Obtain the peer device information corresponding to the peer devices included in the peer device group that needs to access the local terminal main function device.
[0085] Specifically, after determining the peer device group that each local terminal main functional device needs to access, the peer device information corresponding to the peer devices included in the peer device group is obtained.
[0086] S230: The local main functional devices that have completed configuration are started using a multi-threaded and dynamic link library loading method.
[0087] In an optional embodiment, the step of starting each configured local main functional device using a multi-threaded and dynamic link library loading method includes: encapsulating the local main functional device into a dynamic link library, calling the dynamic link library loading function, loading each local main functional device into the address space of the current process, and starting each local main functional device in a multi-threaded manner; wherein, each thread's local main functional device uses an independent cache area.
[0088] The dynamic link library loading function can be understood as a function used to load dynamic link libraries. Different operating systems provide different dynamic link library loading functions. This application embodiment does not impose any restrictions on this and can select one based on the system and requirements of the information interaction method application.
[0089] Specifically, the local main functional unit is encapsulated as a dynamic link library to enable multi-threaded startup. Then, the dynamic link library loading function is called to load each local main functional unit, encapsulated as a dynamic link library, into the address space of the current process, and start each local main functional unit in a multi-threaded manner, thereby achieving memory isolation for each thread.
[0090] S240. Information exchange is conducted between each local terminal main function device and the access peer device.
[0091] The technical solution of this application embodiment obtains a first configuration file and configures the number of local main functional devices to be started based on the first configuration file; obtains a second configuration file and configures the corresponding device parameters based on the second configuration file; the second configuration file includes at least server-side device information; each local main functional device is started and configured using a multi-threaded and dynamic link library loading method; each local main functional device interacts with the connected peer device; this enables each local main functional device to process interactive information in parallel based on multi-threading, thus accelerating the processing speed of interactive information; and the operation behavior of each local main functional device on the global storage area is independent of each other, which not only ensures the mutual exclusion of multi-threaded operation of global storage area data, but also saves the manpower cost of software development; at the same time, compared with multi-process technology, it has lower requirements for local device resources, improves the utilization rate of local device resources, and helps to reduce system equipment costs.
[0092] Example 3
[0093] Figure 5 This is a schematic diagram of the structure of an information interaction device provided in Embodiment 3 of this application. Figure 5 As shown, the device includes: a startup module 310 and an interaction module 330; wherein,
[0094] The startup module 310 is used to start each configured local main functional device using a multi-threaded and dynamic link library loading method; the local main functional devices are deployed on local devices based on the IEC 61850 protocol.
[0095] The interaction module 330 is used to exchange information with the peer device based on the IEC 61850 protocol through each of the local main functional devices.
[0096] The technical solution of this application embodiment employs a multi-threaded and dynamic link library loading method to start and configure each local main functional device. These local main functional devices are deployed on local devices based on the IEC 61850 protocol. Information exchange occurs between each local main functional device and the connected peer devices based on the IEC 61850 protocol. This enables each local main functional device to process interactive information in parallel using multi-threading, accelerating the processing speed. Furthermore, the operations of each local main functional device on the global storage area are independent, ensuring mutual exclusion of multi-threaded operations on global storage data and saving on software development manpower costs. Simultaneously, compared to multi-process technology, it places lower demands on local device resources, improving resource utilization and reducing system equipment costs.
[0097] Optionally, the startup module 320 is specifically used for:
[0098] The dynamic link library start function is called to load each of the local terminal main functional devices into the address space of the current process, and each of the local terminal main functional devices is started in a multi-threaded manner.
[0099] Each thread's local master function device uses an independent cache.
[0100] Optional, also includes:
[0101] The quantity configuration module is used to obtain the first configuration file and configure the startup quantity parameters of the local terminal main function device based on the first configuration file.
[0102] The device parameter configuration module is used to obtain a second configuration file and configure the device parameters corresponding to each of the local terminal main functional devices based on the second configuration file; the second configuration file includes at least server-side device information.
[0103] Optionally, the quantity configuration module is specifically used for:
[0104] Obtain the maximum number of peer devices that a single local main function device of the local terminal device can support access to, and the total number of peer devices that the local terminal device needs to access.
[0105] The number of local terminal main function devices to be started is determined based on the total number and the maximum number.
[0106] Write the number of startups into the first configuration file.
[0107] Optionally, when the local device is a client device based on the IEC 61850 protocol, the device parameter configuration module is used to obtain local device information and peer device information of peer devices that need to access the local main functional device, and write the local device information and the peer device information into a second configuration file.
[0108] When the local device is a server device based on the IEC 61850 protocol, the device parameter configuration module is used to obtain local device information and write the local device information into a second configuration file.
[0109] Optionally, when the local terminal device is a server device based on the IEC 61850 protocol, the second configuration information writing module is further configured to:
[0110] Obtain peer device information for peer devices that need to access the local terminal main function device;
[0111] Write the peer device information into the second configuration file.
[0112] Optionally, the device parameter configuration module is specifically used for:
[0113] Obtain the first average message transmission time from the local terminal device to each of the peer devices;
[0114] Based on the preset number of peer devices that each local terminal main function device supports access to and the message transmission time from the local terminal device to the peer device, the peer devices accessed by the local terminal device are divided into a target number of peer device groups; wherein, the time difference between the second average message transmission time from the local terminal device to the peer device in the peer device group and the first average message transmission time is less than a preset value.
[0115] Each of the peer device groups is assigned to a different local main functional device, and each peer device group is used to access a local main functional device; the peer device information corresponding to the peer devices included in the peer device group that needs to access the local main functional device is obtained.
[0116] Optionally, if the local device is a client device based on the IEC 61850 protocol, the peer device is a server device based on the IEC 61850 protocol; if the local device is a server device based on the IEC 61850 protocol, the peer device is a client device based on the IEC 61850 protocol.
[0117] Optionally, the local terminal main functional device includes: a configuration file, a protocol message processing module, and a basic data model; wherein, the configuration file includes: a first configuration file and a second configuration file; the basic data model is created based on the configuration file;
[0118] The protocol message processing module is used to parse and process the messages obtained by the local device from the access peer device, obtain the message parsing result, and complete the message interaction with the peer device.
[0119] The basic data model is used to map the data of the message parsing results.
[0120] The information interaction device provided in this application embodiment can execute the information interaction method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method.
[0121] Example 4
[0122] Figure 6A schematic diagram of a terminal device 10 that can be used to implement embodiments of this application is shown. The terminal device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The terminal device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0123] like Figure 6 As shown, the terminal device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the terminal device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0124] Multiple components in terminal device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows terminal device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0125] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as information interaction methods.
[0126] In some embodiments, the information interaction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on terminal device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the information interaction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the information interaction method by any other suitable means (e.g., by means of firmware).
[0127] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] In some embodiments, the information interaction method may be implemented as a computer program, which is implicitly included in a computer program product. When executed by a processor, the computer program implements the information interaction method of this application. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0129] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein can be implemented on a terminal device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the terminal device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0131] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0132] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0133] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0134] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An information exchange method, characterized in that, The method includes: Each local terminal main functional device is started and configured using a multi-threaded and dynamic link library loading method; the local terminal main functional devices are deployed on local terminal equipment based on the IEC 61850 protocol; Each of the local main functional devices interacts with the peer device based on the IEC 61850 protocol.
2. The information interaction method according to claim 1, characterized in that, The steps for starting the configured local main functional devices using multi-threading and dynamic link library loading include: Each of the aforementioned local terminal main functional devices is encapsulated as a dynamic link library; The dynamic link library start function is called to load each of the local terminal main functional devices into the address space of the current process, and each of the local terminal main functional devices is started in a multi-threaded manner. Each thread's local master function device uses an independent cache.
3. The information interaction method according to claim 1, characterized in that, Also includes: Obtain the first configuration file and configure the startup quantity parameter of the local terminal main function device based on the first configuration file; Obtain the second configuration file and configure the device parameters corresponding to each of the local terminal main function devices based on the second configuration file; the second configuration file includes at least server device information.
4. The information interaction method according to claim 3, characterized in that, The steps for obtaining the first configuration file include: Obtain the maximum number of peer devices that a single local main function device of the local terminal device can support access to, and the total number of peer devices that the local terminal device needs to access. The number of local terminal main function devices to be started is determined based on the total number and the maximum number. Write the number of startups into the first configuration file.
5. The information interaction method according to claim 3, characterized in that, The steps for obtaining the second configuration file include: When the local terminal device is a client device based on the IEC 61850 protocol, the local terminal device information and the peer device information of the peer device that needs to access the local terminal main function device are obtained, and the local terminal device information and the peer device information are written into the second configuration file. If the local device is a server device based on the IEC 61850 protocol, the local device information is obtained and written into the second configuration file.
6. The information interaction method according to claim 5, characterized in that, In the case where the local terminal device is a server device based on the IEC61850 protocol, it also includes: Obtain peer device information for peer devices that need to access the local terminal main function device; Write the peer device information into the second configuration file.
7. The information interaction method according to any one of claims 5-6, characterized in that, The steps for obtaining peer device information of peer devices that need to access the local terminal main function device include: Obtain the first average message transmission time from the local terminal device to each of the peer devices; Based on the preset number of peer devices that each local terminal main function device supports access to and the message transmission time from the local terminal device to the peer device, the peer devices accessed by the local terminal device are divided into a target number of peer device groups; wherein, the time difference between the second average message transmission time from the local terminal device to the peer device in the peer device group and the first average message transmission time is less than a preset value. Each of the peer device groups is assigned to a different local main functional device, and each peer device group is used to access a local main functional device; the peer device information corresponding to the peer devices included in the peer device group that needs to access the local main functional device is obtained.
8. The information interaction method according to any one of claims 1-5, characterized in that, When the local device is a client device based on the IEC 61850 protocol, the peer device is a server device based on the IEC 61850 protocol. When the local device is a server device based on the IEC 61850 protocol, the peer device is a client device based on the IEC 61850 protocol.
9. The information interaction method according to any one of claims 3-6, characterized in that, The local terminal main functional device includes: a configuration file, a protocol message processing module, and a basic data model; wherein, the configuration file includes: a first configuration file and a second configuration file; the basic data model is created based on the configuration file; The protocol message processing module is used to parse and process the messages obtained by the local device from the access peer device, obtain the message parsing result, and complete the message interaction with the peer device. The basic data model is used to map the data of the message parsing results.
10. An information interaction device, characterized in that, Applied to local end devices based on the IEC 61850 protocol, the device includes: The startup module is used to start each configured local main functional device using a multi-threaded and dynamic link library loading method; the local main functional devices are deployed on local devices based on the IEC 61850 protocol; The interaction module is used to exchange information with the connected peer devices based on the IEC 61850 protocol through each of the local main functional devices.
11. A terminal device, characterized in that, The terminal device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the information interaction method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the information interaction method according to any one of claims 1-9.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the information interaction method according to any one of claims 1-9.