Data communication method, device and system
A multi-channel data communication system segregates and prioritizes data transmission to enhance security and reliability, addressing data leaks and command conflicts, thus improving energy management efficiency and load control accuracy.
Patent Information
- Application Number
- CN202510202418.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-07-15
AI Technical Summary
The existing data communication methods lack effective isolation measures between the power grid, resulting in serious security threats in the data sharing process, such as data leakage and counterfeiting attacks, and the real-time and security of key services cannot be guaranteed, which can easily lead to command conflicts that affect the stable operation of the power grid.
Receive target data through multiple physical channels, and select corresponding processing threads according to the physical channel identifier carried by the data for analysis and transmission. The encrypted channel and non-encrypted channel are used to transmit service data from different master stations separately, set priority arbitration scheduling instructions, and switch to a backup connection when the connection fails, realizing independent communication and network isolation.
It realizes independent isolation from the network of data communication, avoids data leakage and counterfeiting attacks, ensures real-time and security of key services, avoids instruction conflicts, and improves the security and stability of the power grid and energy scheduling efficiency.
Smart Images

Figure CN120320482A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technologies, and particularly to a data communication method, apparatus, and system. Background Art
[0002] With the global emphasis on the utilization of renewable energy and the transformation of the energy structure towards low-carbonization, the large-scale access of distributed energy resources (DERs), such as photovoltaic, wind power, and energy storage systems, has become an inevitable trend in the development of power systems. At the same time, the rapid development of new load types, such as electric vehicles and air-source heat pumps, has also brought new challenges to the operation and management of power systems. These changes require power systems to not only efficiently integrate these resources but also possess higher flexibility and security to ensure the stable operation of the entire power grid.
[0003] In some scenarios, a single-channel method is often used for data communication between power grids. In the single-channel mode, all data between the power grid dispatching master station and the user-side management master station is transmitted through the same physical path. Due to the lack of effective isolation measures, serious security threats are faced during the data sharing process, including but not limited to data leakage and spoofing attacks. Moreover, various service data is transmitted mixed together, and it is impossible to guarantee the real-time performance and security required for critical services (such as emergency control instructions). Once a failure occurs, the response time may be delayed due to the interference of other non-critical service traffic, increasing the risk of accident expansion. In addition, when the power grid dispatching master station and the user-side management master station simultaneously attempt to dispatch the same distributed energy resource or load, it is very easy to cause command conflicts, thereby affecting the safe and stable operation of the power grid. Therefore, the existing data communication methods have low reliability and security, seriously affecting the energy dispatching efficiency and the accuracy of load control. Summary of the Invention
[0004] In order to solve the technical problem of low reliability and security of data communication methods, the purpose of the present invention is to provide a data communication method, and the specific technical solution adopted is as follows: In a first aspect, an embodiment of the present invention provides a data communication method, including: receiving target data from the power grid side through multiple physical channels, where one physical channel is correspondingly connected to one master station; selecting a corresponding processing thread according to the identifier of the physical channel carried by the target data to parse the target data, and transmitting the parsed data to the corresponding master station; receiving a dispatching instruction issued by the master station through the corresponding physical channel; and executing the task corresponding to the dispatching instruction according to the priority of the dispatching instruction, where the priority of the dispatching instruction is pre-marked according to the type of the master station.
[0005] Optionally, before receiving target data from the grid side through multiple physical channels, the method further includes: in the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, switching to the standby connection port or standby IP of the master station, and performing heartbeat detection on the standby connection port or standby IP, the physical channel, and the grid side.
[0006] Optionally, selecting a corresponding processing thread to parse the target data according to the identifier of the physical channel carried in the target data includes: in the case where the identifier of the physical channel carried in the target data is the first identifier, selecting an encrypted channel processing thread to send the target data to the encryption chip for decryption to obtain the plaintext; parsing the task parameters in the plaintext and checking the legality of the task parameters, and in the case where the task parameters are legal, converting the data format in the plaintext into the communication protocol format of the master station.
[0007] Optionally, selecting a corresponding processing thread to parse the target data according to the identifier of the physical channel carried in the target data includes: in the case where the identifier of the physical channel carried in the target data is the second identifier, judging whether the task in the target data conflicts with the grid task command according to the previous task recorded in the history; if not, checking the legality of the task parameters in the target data; and in the case where the task parameters are legal, parsing the task parameters in the target data according to the format of the target protocol.
[0008] In a second aspect, an embodiment of the present invention provides a data communication device, including: a receiving module, configured to receive target data from the grid side through multiple physical channels, and one physical channel is correspondingly connected to one master station; a parsing module, configured to select a corresponding processing thread to parse the target data according to the identifier of the physical channel carried in the target data, and transmit the parsed data to the corresponding master station; the receiving module is further configured to receive a scheduling instruction sent by the master station through the corresponding physical channel; an execution module, configured to execute the task corresponding to the scheduling instruction according to the priority of the scheduling instruction, and the priority of the scheduling instruction is pre-marked according to the type of the master station.
[0009] Optionally, it further includes: a switching module, configured to switch to the standby connection port or standby IP of the master station in the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, and perform heartbeat detection on the standby connection port or standby IP, the physical channel, and the grid side.
[0010] In a third aspect, an embodiment of the present invention provides a data communication system, including: a communication device, a front-end machine, multiple master stations, and a power grid side. The communication device includes multiple communication modules; one end of each communication module is connected to the power grid side, and the other ends of some of the communication modules are connected to corresponding some of the master stations through the front-end machine, and the other ends of the other part of the communication modules are connected to the corresponding other part of the master stations. A communication channel is formed between a communication module and the connection port of the corresponding connected master station; the front-end machine is used to perform the following steps: receiving target data from the power grid side through multiple physical channels, and one physical channel is correspondingly connected to one master station; selecting a corresponding processing thread according to the identifier of the physical channel carried by the target data to parse the target data, and transmitting the parsed data to the corresponding master station; receiving scheduling instructions sent by the master station through the corresponding physical channel; executing the task corresponding to the scheduling instruction according to the priority of the scheduling instruction, and the priority of the scheduling instruction is pre-marked according to the type of the master station in advance.
[0011] Optionally, the data communication system further includes: an SOC module; the SOC module is respectively connected to each communication module, and respectively establishes multiple physically isolated communication channels, and each communication channel is respectively connected to each master station.
[0012] Optionally, the front-end machine is further used for: when the identifier of the physical channel carried by the target data is the first identifier, selecting an encryption channel processing thread to send the target data to the encryption chip for decryption to obtain plaintext; parsing the task parameters in the plaintext and checking the legality of the task parameters, and when the task parameters are legal, converting the data format in the plaintext into the communication protocol format of the master station.
[0013] Optionally, the front-end machine is further used for: when the identifier of the physical channel carried by the target data is the second identifier, judging whether the task in the target data conflicts with the power grid task command according to the previous task recorded in the history; if there is no conflict, checking the legality of the task parameters in the target data; when the task parameters are legal, parsing the task parameters in the target data according to the format of the target protocol.
[0014] The present invention has the following beneficial effects: Receive target data from the grid side through multiple physical channels, achieving communication independence and network isolation, and avoiding problems such as data leakage and spoofing attacks. Moreover, the service data of different master stations is transmitted separately through different physical channels, ensuring the real-time performance and security required for critical services. In addition, after receiving the scheduling instructions issued by the master station, the tasks corresponding to the scheduling instructions can be executed in sequence according to the priorities of the scheduling instructions, avoiding the problem of instruction conflicts, and thus ensuring the safe and stable operation of the power grid. In this way, the embodiments of the present invention improve the reliability and security of data communication, and thus improve the energy scheduling efficiency and the accuracy of load control. Brief Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0016] Figure 1 It is a schematic structural diagram of a data communication system provided by an embodiment of the present invention.
[0017] Figure 2 It is a schematic structural diagram of a communication device in a data communication system provided by an embodiment of the present invention.
[0018] Figure 3 It is a more specific schematic structural diagram of a data communication system provided by an embodiment of the present invention.
[0019] Figure 4 It is a schematic flowchart of a data communication method provided by an embodiment of the present invention.
[0020] Figure 5 It is a schematic structural diagram of a data communication device disclosed by an embodiment of the present invention. Detailed Embodiments
[0021] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following will, in combination with the accompanying drawings and preferred embodiments, detail the specific embodiments, structures, features, and effects of a data communication method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0023] The following specifically describes the specific solutions of a data communication method, device, and system provided by the present invention in conjunction with the accompanying drawings.
[0024] Please refer to Figures 1 to 3 , Figure 1 which is a schematic structural diagram of a data communication system provided by an embodiment of the present invention. Figure 2 which is a schematic structural diagram of a communication device in a data communication system provided by an embodiment of the present invention. Figure 3 which is a more specific schematic structural diagram of a data communication system provided by an embodiment of the present invention.
[0025] As Figure 1 shown, the data communication system 100 includes: a communication device 101, a front-end machine 102, multiple master stations 103, and a grid side 104. The communication device 101 includes multiple communication modules 1010; one end of each communication module 1010 is connected to the grid side 104, and the other ends of some of the communication modules in the communication module 1010 are connected to the corresponding part of the master stations through the front-end machine 102, and the other ends of the other part of the communication modules in the communication module 1010 are connected to the corresponding other part of the master stations. A communication channel is formed between a communication module 1010 and the connection port of the corresponding connected master station 103; the front-end machine 102 is used to perform the following steps: receiving target data from the grid side through multiple physical channels, and one physical channel is correspondingly connected to one master station; selecting a corresponding processing thread to parse the target data according to the identifier of the physical channel carried by the target data, and transmitting the parsed data to the corresponding master station; receiving the scheduling instructions sent by the master station through the corresponding physical channel; and executing the tasks corresponding to the scheduling instructions according to the priority of the scheduling instructions, and the priority of the scheduling instructions is pre-marked according to the type of the master station in advance.
[0026] Specifically, the communication module 1010 can be a 4 / 5G communication module, and multiple 4 / 5G communication modules respectively establish multiple physically isolated communication channels and are respectively connected to each master station. The master stations include, but are not limited to, a grid dispatching master station and a user-side management master station.
[0027] Further, when performing data communication, the main program of the front-end computer 102 queries the flag bits in the receive thread queues corresponding to the physical channels of multiple communication modules. The flag bits are used to identify the physical channels, and the types of physical channels include but are not limited to encrypted channels and non-encrypted channels. For encrypted channels, the number 1 can be used as the flag bit, and for non-encrypted channels, the number 2 can be used as the flag bit. After receiving the target data from the grid side on multiple physical channels, the type of the physical channel is judged through the identifier of the physical channel carried by the target data, that is, the flag bit. After determining the flag bit of the physical channel, the processing thread corresponding to the physical channel is determined to parse the target data and transmit the parsed data to the corresponding master station.
[0028] As an optional embodiment of the present invention, when the identifier of the physical channel carried by the target data is the first identifier, the encrypted channel processing thread is selected to send the target data to the encryption chip for decryption to obtain the plaintext; the task parameters in the plaintext are parsed and the legality of the task parameters is checked. When the task parameters are legal, the data format in the plaintext is converted into the communication protocol format of the master station.
[0029] Specifically, the first identifier can take the value of 1. When the identifier of the physical channel is 1, the encrypted channel processing thread can be selected. After receiving the target data sent in the task queue, the encrypted channel processing thread starts the task processing process, sends the received target data to the security encryption chip, and the security encryption chip decrypts it into the plaintext. Then the task parameters in the plaintext are parsed and the legality is judged. Among them, the task parameters include but are not limited to the task type of the target data and the relevance of the previous task. The task type includes but is not limited to clock polling and time synchronization, parameter setting and query, event reporting and recording, communication status, control command, maintenance command, upgrade command, and data frame. The relevance with the previous task includes but is not limited to judging whether the off-grid and on-grid control commands, time period control commands, power control (numerical control, proportional control) commands are contradictory. For example, if the off-grid command has been issued, but the on-grid command has not been issued subsequently, and the power control command is directly issued, it is considered contradictory, or the numerical control parameter and the proportional control parameter are contradictory, or the active power and the reactive power do not match and are contradictory, etc. When judging the legality, it includes but is not limited to that the parameters such as the voltage and power that need to be adjusted cannot exceed the nominal rated limit, the clock calibration error cannot exceed the module clock deviation by 10s, and the communication parameters of the remote initialization master station, etc. When the task parameters are legal, the data format of the target data is converted into the communication protocol format of the master station.
[0030] Among them, the target data can be a data frame, and the data format of the target data can be a data frame format.
[0031] Further, read or write parameter operations of the task can also be performed, and the task type, execution time, etc. are recorded at the master station. After receiving the data frame returned by the master station for the target data, the data frame returned by the master station is returned to the front-end machine, and the task type, execution time, etc. are recorded at the front-end machine.
[0032] Further, when the identifier of the physical channel carried by the target data is the second identifier, it is judged whether the task in the target data conflicts with the power grid task command according to the previous task recorded in history; if there is no conflict, the legality of the task parameters in the target data is checked; when the task parameters are legal, the task parameters in the target data are parsed according to the format of the target protocol.
[0033] Specifically, the second identifier can take the value of 2. When the identifier of the physical channel carried by the target data is 2, it indicates that the channel is for non-encrypted data transmitted through a non-encrypted channel. After the plaintext channel processing thread receives the target data forwarded by the task queue, the task processing process is started. Then the target data is forwarded to the arbitration thread, and the arbitration thread judges whether the priority of the task corresponding to the target data conflicts with the type, parameters, and priority of the power grid task command according to the recorded previous tasks in history. If there is no conflict, the legality of the task parameters in the target data is checked. Among them, the description of checking the legality of the task parameters in the target data can refer to the above embodiments, and the embodiments of the present invention will not be elaborated here. When the task parameters are legal, the task parameters in the target data can be parsed according to the format of the target protocol. Among them, the target protocol can be the inverter modbus protocol, and the numerical meaning of each byte or each bit in the target data can be parsed using the specific format definition of the inverter modbus protocol. After the parsing is completed, read or write parameter operations of the task can also be performed, and the task type, execution time, etc. are recorded at the master station. After receiving the data frame returned by the master station for the target data, the data frame returned by the master station and the read / write command operation are returned to the front-end machine. If the front-end machine accepts the read / write command operation, the task type and execution time, etc. are recorded at the front-end machine. If the front-end machine refuses to execute the read / write command operation, a refusal command frame is returned to the master station. In this way, communication independence and network isolation are achieved through multiple physical channels, avoiding problems such as data leakage and spoofing attacks. And the service data of different master stations are transmitted separately through different physical channels, ensuring the real-time performance and security required for key services.
[0034] Furthermore, each master station can issue power regulation scheduling instructions, reactive power regulation scheduling instructions, grid connection scheduling instructions, off-grid scheduling instructions, etc. Each master station has its own priority. For example, the priority of the grid dispatching master station is higher than that of the user-side management master station. When the grid dispatching master station and the user management-side master station issue scheduling instructions simultaneously, the scheduling instructions of the grid dispatching master station are preferentially executed through arbitration. By setting priorities to arbitrate scheduling instructions, the problem of scheduling conflicts is avoided, improving the safety and reliability of scheduling. Furthermore, the safe and stable operation of the power grid is ensured.
[0035] As Figure 2 shown, taking the communication module 1010 as two 4 / 5G communication modules as an example, the communication device 101 includes: 4 / 5G communication module 1, 4 / 5G communication module 2, antenna 1, antenna 2, Subscriber Identity Module (SIM), System on Chip (SOC) module, security encryption chip, Wireless Fidelity (WIFI) module, Bluetooth module, sampling circuit, Direct Current to Direct Current Converter (DC-DC) module, super capacitor, Ethernet / RS-485 / CAN interface conversion module, and adapter module, etc.
[0036] Specifically, the 4 / 5G communication module 1 and the 4 / 5G communication module 2 can have the same structure, which can adopt the structure in the prior art, and will not be elaborated in the embodiments of the present invention. The SIM can be an Internet of Things card for the dedicated access point name (APN) of the power system, which is used to distinguish mobile phone cards and is used for data communication. The communication device can initiate a dual connection by dialing into the network on the grid side through the SIM and access the IP address and connection port specified by the distributed front-end mechanism through the 4 / 5G wireless public network power APN channel.
[0037] The SOC module is respectively connected to each communication module to establish multiple physically isolated communication channels, and each communication channel is respectively connected to each master station. Taking the 4 / 5G communication module 1 and the 4 / 5G communication module 2 as an example of the communication module, the SOC module is used to host the 4 / 5G communication module 1 and the 4 / 5G communication module 2, establish two physically isolated communication channels respectively, and connect to the grid dispatching master station and the user-side management master station respectively. The SOC module realizes the sharing of data acquisition interface and control interface protocols in an agent manner, provides unified services externally, and realizes data channel isolation and network isolation internally.
[0038] The secure encryption chip is used for identity authentication and data encryption and decryption. During the identity authentication phase, it is used to generate random numbers, keys, and digital certificates. During the communication phase, it encrypts plaintext data frames and decrypts ciphertext data frames, etc. Among them, the data encryption algorithm can adopt the national encryption algorithm, such as the SM4 encryption algorithm for encryption, and attach dynamic tokens to key data and instructions.
[0039] The sampling circuit is used to collect the voltage, current, and IO pin status of the interface power supply circuit, and is used to detect the plugging and unplugging status, and judge whether there is a power outage or being unplugged manually.
[0040] The Ethernet / RS-485 / CAN interface conversion module is used for power isolation, surge protection, and external port format size conversion, etc.
[0041] The DC-DC module is used to convert the power supply voltage, convert 1-way power supply into multiple voltage levels of voltage to supply power to different components separately, such as converting 5V to 3.3V, 1.8V, 1.2V, etc.
[0042] The super capacitor is used for energy storage and temporary power supply. When there is power, the super capacitor is connected in parallel to the power supply circuit and slowly charged. When the peak current of the communication state is large, it is used for instantaneous power supply supplement. In the power outage state, it provides short-term power supply for reporting the power outage state and information, or reporting abnormal plugging and unplugging events.
[0043] The adapter module is used for data communication interface conversion, such as serial port to RS-485 / CAN / RJ45, etc.
[0044] The WIFI module integrates the Software Access Point (soft AP) and STA modes, and supports local parameter configuration management or online communication connection. When the deployment location supports wireless local area network connection, the data of the non-encrypted physical channel can be transmitted using the wireless local area network.
[0045] The Bluetooth module is used for local parameter configuration, query, debugging, and coordinate measurement of users, such as ranging and positioning, and obtaining accurate GPS coordinates through the relative distance calculation of the mobile operation terminal.
[0046] In this way, through the above communication devices with multiple physical channels, the target data from the grid side is received, communication independence and network isolation are achieved, and problems such as data leakage and spoofing attacks are avoided. Moreover, the service data of different master stations are transmitted separately through different physical channels, ensuring the real-time performance and security required for key services.
[0047] such as Figure 3As shown in the figure, the data communication system 100 includes a communication device 101, a main power grid dispatching station connected to the communication device 101 through a front-end machine 102, and a main user-side management station directly connected to the communication device 101. The communication device 101 is connected to a photovoltaic / storage inverter on the power grid side 104. The main power grid dispatching station includes, but is not limited to, a dispatching system, an Internet of Things management platform, a unified password service management platform, a power consumption information collection system, a data middle platform, a distribution automation system, and a new load management system, etc.
[0048] Specifically, the communication device 101 with multiple communication modules initiates a dual connection on the power grid side, and connects to the specified IP address, connection port, and Internet of Things management platform of the front-end machine through the 4 / 5G wireless public network power APN channel. Among them, the front-end machine can be a distributed front-end machine cluster. After the communication device 101 is connected to the Internet of Things management platform, identity security authentication and digital certificate update are performed on the Internet of Things management platform. After the Internet of Things management platform verifies that the identity is legal, the verification result is synchronized to the front-end machine.
[0049] Furthermore, after receiving the verification result, the front-end machine runs to establish a service connection between the main station and the power grid side. The front-end machine parses the content of the target data on the power grid side transmitted by the communication device 101 in real time, and pushes it to the data middle platform for use by the power consumption information collection system, the new load management system, and the distribution automation system.
[0050] Furthermore, the power consumption information collection system, the new load management system, and the distribution automation system can send task instructions to the front-end machine through the data middle platform, and the front-end machine transmits them to the power grid side through the communication device 101 to execute scheduled tasks or real-time tasks.
[0051] Furthermore, when the main power grid dispatching station needs to execute dispatching, it sends a load dispatching instruction to the new load management system or the power consumption information collection system. The new load management system or the power consumption information collection system decomposes the dispatching task to the connected devices in the associated area, generates a dispatching task queue, and sends it to the front-end machine. The front-end machine sends the dispatching task queue to the power grid side through one of the physical channels of the communication device 101. The power grid side executes the tasks in the dispatching task queue and feeds back the dispatching result to the main power grid dispatching station. The main power grid dispatching station counts the overall dispatching result and feeds back the completion status of the dispatching task to the dispatching system.
[0052] Furthermore, another independent physical channel in the communication device 101 is connected to the main user-side management station. Its data is physically isolated from the power grid channel, and it executes data collection and configuration management tasks. The dispatching task is entrusted by the power grid side.
[0053] Further, in the above data communication system, events such as real-time power outages, abnormal plugging and unplugging, cyber attacks, communication interruptions, and command conflicts on the grid side can also be transmitted by the communication device 101 to the user-side management master station and the IoT management platform. In the data communication system, these data recorded in the master station can be used to quickly locate faults, improve the efficiency of fault diagnosis, and ensure the stable operation of the power grid.
[0054] Further, in order to further improve the stability and reliability of the data communication system, an embodiment of the present invention also provides a standby line. In the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, it switches to the standby connection port or standby IP of the master station, and performs heartbeat detection on the standby connection port or standby IP, the physical channel, and the grid side. In this way, through the primary / standby dual-connection backup redundancy design of the dual physical channels, when the IP address and connection port default-connected to each physical channel fail or are interrupted, it automatically switches to the standby IP address and connection port. Therefore, through the redundant design solution, the stability and reliability of the data communication system are further improved.
[0055] Through a data communication system disclosed in the above embodiments of the present invention, target data from the grid side is received through multiple physical channels, realizing communication independence and network isolation, and avoiding problems such as data leakage and spoofing attacks. Moreover, the service data of different master stations is transmitted separately through different physical channels, ensuring the real-time performance and security required for key services. In addition, after receiving the scheduling instructions issued by the master station, the tasks corresponding to the scheduling instructions can be executed in sequence according to the priorities of the scheduling instructions, avoiding the problem of command conflicts, and thus ensuring the safe and stable operation of the power grid. In this way, the embodiments of the present invention improve the reliability and security of data communication, and further improve the energy scheduling efficiency and the accuracy of load control.
[0056] Based on the same inventive concept as the data communication system provided in the above embodiments, the present invention also discloses a data communication method, as Figure 4 shown, Figure 4 is a schematic flowchart of a data communication method provided by an embodiment of the present invention. The disclosed data communication method includes: Step S401, receiving target data from the grid side through multiple physical channels, where one physical channel corresponds to one master station.
[0057] Specifically, the physical channels can be multiple 4 / 5G communication modules respectively establishing multiple physically isolated communication channels, and each physical channel is respectively connected to each master station. The master station includes but is not limited to the grid dispatching master station and the user-side management master station. The target data includes but is not limited to various types of monitoring data in the operating state on the grid side.
[0058] Step S402: Select the corresponding processing thread according to the identifier of the physical channel carried in the target data to parse the target data, and transmit the parsed data to the corresponding master station.
[0059] Specifically, the types of physical channels include, but are not limited to, encrypted channels and non-encrypted channels. The number 1 can be used as the identifier for encrypted channels, and the number 2 can be used as the identifier for non-encrypted channels. After receiving the target data from multiple physical channels on the grid side, determine the type of the physical channel based on the identifier of the physical channel carried in the target data. After determining the identifier of the physical channel, determine the corresponding processing thread of the physical channel to parse the target data, and transmit the parsed data to the corresponding master station.
[0060] As an optional embodiment of the present invention, when the identifier of the physical channel carried in the target data is the first identifier, select the encrypted channel processing thread to send the target data to the encryption chip for decryption to obtain the plaintext; parse the task parameters in the plaintext and check the legality of the task parameters. When the task parameters are legal, convert the data format in the plaintext to the communication protocol format of the master station.
[0061] Specifically, the first identifier can take the value of 1. When the identifier of the physical channel is 1, the encrypted channel processing thread can be selected. After receiving the target data sent in the task queue, the encrypted channel processing thread starts the task processing process, sends the received target data to the security encryption chip, and the security encryption chip decrypts it to convert it into plaintext. Then parse the task parameters in the plaintext and judge the legality. The task parameters include, but are not limited to, the task type of the target data and the relevance of the previous task. The task type includes, but is not limited to, clock polling and timing, parameter setting and query, event reporting and recording, communication status, control command, maintenance command, upgrade command, and data frame. The relevance with the previous task includes, but is not limited to, judging whether the off-grid and on-grid control commands, time period control commands, power control (numerical control, proportional control) commands are contradictory. For example, if the off-grid command has been issued, but the on-grid command has not been issued subsequently, and the power control command is directly issued, it is considered contradictory, or the numerical control parameters and proportional control parameters are contradictory, or the active power and reactive power do not match and are contradictory, etc. When judging the legality, it includes, but is not limited to, that the parameters such as the voltage and power that need to be adjusted cannot exceed the nominal rated limit, the clock calibration error cannot exceed the module clock deviation by 10s, and remotely initialize the master station communication parameters, etc. When the task parameters are legal, convert the data format of the target data to the communication protocol format of the master station.
[0062] Among them, the target data can be a data frame, and the data format of the target data can be a data frame format.
[0063] Further, it is also possible to perform read or write parameter operations on the task, and record the task type, execution time, etc. in the master station. After receiving the data frame returned by the master station for the target data, return the data frame returned by the master station to the front-end machine, and record the task type, execution time, etc. in the front-end machine.
[0064] Further, when the identifier of the physical channel carried in the target data is the second identifier, judge whether the task in the target data conflicts with the grid task command according to the historical previous tasks; if there is no conflict, check the legality of the task parameters in the target data; when the task parameters are legal, parse the task parameters in the target data according to the format of the target protocol.
[0065] Specifically, the second identifier can take the value of 2. When the identifier of the physical channel carried in the target data is 2, it means that the data transmitted through the channel is non-encrypted data transmitted through a non-encrypted channel. After the plaintext channel processing thread receives the target data forwarded by the task queue, it starts the task processing process. Then forward the target data to the arbitration thread, and the arbitration thread judges whether the priority of the task corresponding to the target data conflicts with the type, parameters, and priority of the grid task command according to the recorded historical previous tasks. If there is no conflict, check the legality of the task parameters in the target data. Among them, the check of the legality of the task parameters in the target data can refer to the description of the above embodiments, and the embodiments of the present invention will not be elaborated here. When the task parameters are legal, the task parameters in the target data can be parsed according to the format of the target protocol. Among them, the target protocol can be the inverter modbus protocol, and the numerical meaning of each byte or each bit in the target data can be parsed using the specific format definition of the inverter modbus protocol. After the parsing is completed, it is also possible to perform read or write parameter operations on the task, and record the task type, execution time, etc. in the master station. After receiving the data frame returned by the master station for the target data, return the data frame returned by the master station and the execution read / write command operation to the front-end machine. If the front-end machine accepts the execution of the read / write command operation, record the task type and execution time, etc. in the front-end machine. If the front-end machine refuses to execute the read / write command operation, reply a rejection command frame to the master station. In this way, communication independence and network isolation are achieved through multiple physical channels, avoiding problems such as data leakage and spoofing attacks. And the service data of different master stations are transmitted separately through different physical channels, ensuring the real-time performance and security required for key services.
[0066] Step S403, receive the scheduling instruction sent by the master station through the corresponding physical channel.
[0067] Specifically, each master station can send power regulation scheduling instructions, reactive power regulation scheduling instructions, grid connection scheduling instructions, off-grid scheduling instructions, etc.
[0068] Step S404: Execute the task corresponding to the scheduling instruction according to the priority of the scheduling instruction. The priority of the scheduling instruction is pre-marked according to the type of the master station in advance.
[0069] Specifically, each master station has its own priority. In the embodiments of the present invention, the priorities of each master station are pre-marked. For example, it is marked that the priority of the power grid dispatching master station is higher than that of the user-side management master station. When the power grid dispatching master station and the user management side master station issue scheduling instructions simultaneously, the scheduling instruction of the power grid dispatching master station is arbitrated to be executed first. In this way, by setting priorities to arbitrate scheduling instructions, the problem of scheduling conflicts is avoided, and the scheduling security and reliability are improved. Furthermore, the safe and stable operation of the power grid is ensured.
[0070] It should be noted that according to the actual requirements of the power system, the priorities of each master station can be marked according to the actual situation, and the embodiments of the present invention do not limit this here.
[0071] In the embodiments of the present invention, target data from the power grid side is received through multiple physical channels, realizing communication independence and network isolation, and avoiding problems such as data leakage and spoofing attacks. Moreover, the service data of different master stations are transmitted separately through different physical channels, ensuring the real-time performance and security required for key services. In addition, after receiving the scheduling instruction issued by the master station, the tasks corresponding to the scheduling instruction can be executed in sequence according to the priority of the scheduling instruction, avoiding the problem of instruction conflicts, and further ensuring the safe and stable operation of the power grid. In this way, the embodiments of the present invention improve the reliability and security of data communication, and further improve the energy scheduling efficiency and the accuracy of load control.
[0072] Furthermore, in order to further improve the stability and reliability of the data communication system, the embodiments of the present invention also set up standby lines. As an optional embodiment of the present invention, before receiving target data from the power grid side through multiple physical channels, the method further includes: in the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, switching to the standby connection port or standby IP of the master station, and performing heartbeat detection on the standby connection port or standby IP, the physical channel, and the power grid side. In this way, through the dual-physical-channel master-slave dual-connection backup redundancy design, when the IP address and connection port default-connected to each physical channel fail or are interrupted, it automatically switches to the standby IP address and connection port. Therefore, through the redundant design solution, the stability and reliability of the data communication system are further improved.
[0073] Based on the same inventive concept as the data communication system and data communication method provided in the above embodiments, the present invention also discloses a data communication device, as Figure 5 shown, Figure 5Schematic diagram of the structure of a data communication device disclosed in an embodiment of the present invention. The disclosed data communication device 500 includes: a receiving module 501, configured to receive target data from the power grid side through multiple physical channels, with one physical channel corresponding to and connecting to one master station; an analysis module 502, configured to select a corresponding processing thread according to the identifier of the physical channel carried in the target data to analyze the target data, and transmit the analyzed data to the corresponding master station; the receiving module 501 is further configured to receive a scheduling instruction sent by the master station through the corresponding physical channel; an execution module 503, configured to execute the task corresponding to the scheduling instruction according to the priority of the scheduling instruction, and the priority of the scheduling instruction is pre-marked according to the type of the master station in advance.
[0074] In the embodiment of the present invention, target data from the power grid side is received through multiple physical channels, realizing communication independence and network isolation, and avoiding problems such as data leakage and spoofing attacks. Moreover, the service data of different master stations is transmitted separately through different physical channels, ensuring the real-time performance and security required for key services. In addition, after receiving the scheduling instruction sent by the master station, the tasks corresponding to the scheduling instruction can be executed in sequence according to the priority of the scheduling instruction, avoiding the problem of instruction conflict, and thus ensuring the safe and stable operation of the power grid. In this way, the embodiment of the present invention improves the reliability and security of data communication, and further improves the energy scheduling efficiency and the accuracy of load control.
[0075] As an optional embodiment of the present invention, it further includes: a switching module, configured to switch to the standby connection port or standby IP of the master station in the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, and perform heartbeat detection on the standby connection port or standby IP, the physical channel, and the power grid side.
[0076] It should be noted that the data communication system, data communication method, and data communication device provided in the above embodiments have the same inventive concept, and the technical solutions and beneficial effects are the same or similar, and can be referred to each other. The embodiments of the present invention will not repeat the same or similar parts.
[0077] It should be noted that: the above sequence of the embodiments of the present invention is only for description, and does not represent the superiority or inferiority of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0078] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A data communication method, characterized in that, Including: Receiving target data from the grid side through multiple physical channels, where one of the physical channels is correspondingly connected to one master station; Selecting a corresponding processing thread according to the identifier of the physical channel carried in the target data to parse the target data, and transmitting the parsed data to the corresponding master station; Receiving a scheduling instruction sent by the master station through the corresponding physical channel; Executing the task corresponding to the scheduling instruction according to the priority of the scheduling instruction, where the priority of the scheduling instruction is pre-marked according to the type of the master station in advance.
2. The data communication method according to claim 1, characterized in that, Before receiving the target data from the grid side through multiple physical channels, the method further includes: In the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, switching to the standby connection port or standby IP of the master station, and performing heartbeat detection on the standby connection port or standby IP, the physical channel, and the grid side.
3. The data communication method according to claim 1, characterized in that The step of selecting a corresponding processing thread according to the identifier of the physical channel carried in the target data to parse the target data includes: In the case where the identifier of the physical channel carried in the target data is the first identifier, selecting an encryption channel processing thread to send the target data to an encryption chip for decryption to obtain plaintext; Parsing the task parameters in the plaintext and checking the legality of the task parameters. In the case where the task parameters are legal, converting the data format in the plaintext into the communication protocol format of the master station.
4. The data communication method according to claim 1, characterized in that, The step of selecting a corresponding processing thread according to the identifier of the physical channel carried in the target data to parse the target data includes: In the case where the identifier of the physical channel carried in the target data is the second identifier, judging whether the task in the target data conflicts with the grid task command according to the previous task recorded in the history; If there is no conflict, checking the legality of the task parameters in the target data; In the case where the task parameters are legal, parsing the task parameters in the target data according to the format of the target protocol.
5. A data communication device, characterized in that, Including: A receiving module, configured to receive target data from the grid side through multiple physical channels, where one of the physical channels is correspondingly connected to one master station; An analysis module, configured to select a corresponding processing thread according to the identifier of the physical channel carried in the target data to parse the target data, and transmit the parsed data to the corresponding master station; The receiving module is further configured to receive a scheduling instruction sent by the master station through the corresponding physical channel; An execution module, configured to execute the task corresponding to the scheduling instruction according to the priority of the scheduling instruction, where the priority of the scheduling instruction is pre-marked according to the type of the master station in advance.
6. The data communication device according to claim 5, wherein, Further including: A switching module, configured to switch to the standby connection port or standby IP of the master station in the case of a failure of the connection port or connection IP of the master station corresponding to the physical channel, and perform heartbeat detection on the standby connection port or standby IP, the physical channel, and the grid side.
7. A data communication system, characterized in that, Including: A communication device, a front-end processor, multiple master stations, and a grid side, where the communication device includes multiple communication modules; One end of each communication module is connected to the grid side. The other ends of some of the communication modules in the communication module are connected to the corresponding part of the master station through the front-end machine, and the other ends of the other part of the communication modules in the communication module are connected to the corresponding other part of the master station. A communication channel is formed between a communication module and the connection port of the corresponding connected master station; The front-end machine is used to perform the following steps: Receive target data from the grid side through multiple physical channels, and one of the physical channels is correspondingly connected to one master station; Select a corresponding processing thread to parse the target data according to the identifier of the physical channel carried by the target data, and transmit the parsed data to the corresponding master station; Receive the scheduling instructions sent by the master station through the corresponding physical channel; Execute the task corresponding to the scheduling instruction according to the priority of the scheduling instruction, and the priority of the scheduling instruction is pre-marked according to the type of the master station in advance.
8. The data communication system according to claim 7, wherein The data communication system further includes: an SOC module; The SOC module is respectively connected to each communication module, and respectively establishes multiple physically isolated communication channels, and each communication channel is respectively connected to each master station.
9. The data communication system according to claim 7, wherein The front-end machine is further used for: In the case where the identifier of the physical channel carried by the target data is the first identifier, select an encryption channel processing thread to send the target data to the encryption chip for decryption to obtain the plaintext; Parse the task parameters in the plaintext and check the legality of the task parameters. In the case where the task parameters are legal, convert the data format in the plaintext to the communication protocol format of the master station.
10. The data communication system according to claim 7, characterized in that, The front-end machine is further used for: In the case where the identifier of the physical channel carried by the target data is the second identifier, judge whether the task in the target data conflicts with the grid task command according to the previous task recorded in history; If there is no conflict, check the legality of the task parameters in the target data; In the case where the task parameters are legal, parse the task parameters in the target data according to the format of the target protocol.