Communication device, method and system and computer storage medium
By adopting virtual subnet isolation and GOOSE communication in the residential photovoltaic-storage-charging system, the communication reliability problem between the inverter, charging pile and gateway is solved, and efficient and reliable communication is achieved.
Patent Information
- Application Number
- CN202411612750.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-01-07
AI Technical Summary
In existing technologies, the communication reliability between inverters and charging piles and gateways in residential photovoltaic-storage-charging systems is insufficient, with problems such as communication interference, signal attenuation, and protocol instability.
Multiple virtual subnets are used to isolate communication between different types of target devices, and the GOOSE communication method is used for one-way repeated transmission to ensure that data is transmitted multiple times at different time intervals.
It improves the reliability and efficiency of communication, avoids communication interference and signal attenuation, and ensures the real-time performance and reliability of communication.
Smart Images

Figure CN119276934A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and more specifically, to a communication device, method, system and computer storage medium. Background Art
[0002] Household solar storage and charging systems are generally composed of energy storage batteries, inverters, gateways, charging piles, etc. In specific implementation, in order to achieve device control and data reporting, the inverter and charging pile communicate with the gateway respectively.
[0003] During communication, how to ensure the communication reliability between the inverter, charging pile and gateway is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] In view of this, the present application provides a communication device, method, system and computer storage medium to solve the problem of urgently needing to ensure the communication reliability of the inverter, charging pile and gateway.
[0005] In order to solve the above technical problems, this application adopts the following technical solutions:
[0006] A communication device, comprising a plurality of wired ports; the communication device is configured with a plurality of virtual subnets;
[0007] Different wired ports correspond to different virtual subnets;
[0008] Different wired ports are connected to different types of target devices, so that different types of target devices can communicate within the corresponding virtual subnet; wherein the target communication mode during communication is to send the same data unidirectionally repeatedly at different time intervals.
[0009] In one implementation, the target device includes an inverter or a charging pile;
[0010] The inverter is connected to a first port of the plurality of wired ports to communicate in a first virtual subnet of the plurality of virtual subnets;
[0011] The charging pile is connected to a second port among the plurality of wired ports to communicate in a second virtual subnet among the plurality of virtual subnets.
[0012] In one implementation, the wired port is connected to the corresponding target device via Ethernet.
[0013] In one implementation, the communication device is directly connected to the control terminal for communication, or the communication device is indirectly connected to the control terminal for communication via a router.
[0014] In one implementation, the virtual subnet is obtained by configuring different ports of a switch inside the communication device to be connected.
[0015] In one implementation, the target communication method is a general object oriented substation event GOOSE communication method.
[0016] A communication method, applied to the above communication device, the communication method comprising:
[0017] When receiving a control instruction for the target device, converting the control instruction into a first message that conforms to the target communication mode;
[0018] The first message is sent to the target device through the virtual subnet where the target device is located in the target communication mode.
[0019] In one implementation, converting the control instruction into a first message that complies with the target communication mode includes:
[0020] When the control contents of the control instruction and the processed instruction are different, a message conversion operation is performed on the contents of the control instruction to obtain a first message that meets the communication requirements of the target communication mode; the processed instruction is the same as the target device controlled by the control instruction.
[0021] In one implementation, the method further includes:
[0022] Receiving a second message sent by the target device;
[0023] Extracting the state number and the sequence number in the second message;
[0024] When it is determined according to the status number and the sequence number that the second message needs to be responded to, the operating status of the target device is updated based on the second message.
[0025] In one implementation, before updating the operating status of the target device based on the second message, the method further includes:
[0026] Obtaining the status sequence number of the last message received by the target device;
[0027] If the status sequence number is different from the status sequence number of the previous message, it is determined that the second message needs to be responded to;
[0028] If the status sequence number is the same as the status sequence number of the previous message, and the sequence number is greater than the sequence number in the previous message received, it is determined that there is no need to respond to the second message.
[0029] A communication system comprises a target device and a communication apparatus for executing the above communication method; the target device is connected to a corresponding wired port in the communication apparatus.
[0030] A computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the above-mentioned communication method.
[0031] The present application provides a communication device, method, system and computer storage medium. In the present application, the communication device is configured with multiple virtual subnets, and different types of target devices communicate in the corresponding virtual subnets. Due to the communication isolation between different virtual subnets, it is possible to avoid the problem of communication interference when multiple devices communicate in the same communication network, thereby improving communication reliability. In addition, in the present application, the target communication method used during communication is a method of unidirectionally repeating the same data at different time intervals. Due to multiple repeated transmissions, the success rate of the receiving device receiving the transmitted data can be improved, thereby improving communication reliability. In addition, since the data is sent unidirectionally, the receiving device does not need to reply to the corresponding information, reducing the time for the receiving device to reply to the information, which can improve the efficiency of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0033] Figure 1 A schematic diagram of a communication architecture provided for an embodiment of the present application;
[0034] Figure 2 A schematic diagram of a scenario of a communication device provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of a GOOSE communication method provided in an embodiment of the present application;
[0036] Figure 4 A schematic diagram of another communication device provided in an embodiment of the present application;
[0037] Figure 5 A flow chart of a communication method provided in an embodiment of the present application;
[0038] Figure 6 A flowchart of a status update method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] Household solar storage and charging systems are generally composed of energy storage batteries, inverters, gateways, charging piles, etc. In specific implementation, in order to achieve device control and data reporting, the inverter and charging pile communicate with the gateway respectively. The specific structure is as follows Figure 1 shown.
[0041] Figure 1 The solid line in the figure represents the energy line, and the dotted line represents the communication line. In the energy line indicated by the solid line, the inverter acts as the hub, converting the DC power of the photovoltaic into AC power, and then charging the energy storage battery. In addition, the electric energy can be incorporated into the power grid or used by household loads such as charging piles. In special scenarios, the inverter can even convert the DC power of the energy storage battery into AC power for household loads.
[0042] On the communication line indicated by the dotted line, the inverter and the energy storage battery are generally connected by wire through CAN (Controller Area Network), and then the inverter is connected to the charging pile, mobile phone APP (application) and the cloud through the gateway. The gateway here can be part of the inverter, or a home router or a special embedded device. The charging pile can be connected to the gateway through wireless network communication technology WIFI or Ethernet, or directly connected to the inverter through 485 or CAN. In addition, the mobile phone APP is also wirelessly connected to the gateway through WIFI.
[0043] This communication method has the following problems:
[0044] 1. When the equipment is deployed and installed in a distributed manner, using 485 or CAN communication to connect various parts will make on-site wiring troublesome and easy to connect incorrectly. The reliability of long-distance 485 or CAN communication is not high. 485 also needs to set the address, which is not user-friendly.
[0045] 2. When wireless communication is used to connect various parts, the signal will be attenuated due to factors such as obstruction and reflection, resulting in unstable communication and serious communication delay and packet loss;
[0046] 3. Although the use of Ethernet wired communication can solve the communication interference of hardware, the actual software development process often uses UDP (User Datagram Protocol) or TCP (Transmission Control Protocol) protocols for application data transmission. UDP communication is not connection-oriented reliable communication. Due to the characteristics of the TCP protocol itself, there are often problems such as network sticking and retransmission, which affect the real-time communication and even affect the system security.
[0047] In order to solve the problem of low communication reliability in the above-mentioned 485, CAN, Ethernet, and wireless communication methods, in an embodiment of the present application, the communication device is configured with multiple virtual subnets, and different types of target devices communicate in the corresponding virtual subnets. Due to the communication isolation between different virtual subnets, it is possible to avoid communication interference when multiple devices communicate in the same communication network, thereby improving communication reliability.
[0048] In addition, in the present application, the communication mode adopted during communication is a target communication mode of unidirectionally repeating the same data at different time intervals. Due to multiple repeated transmissions, the success rate of the receiving device receiving the transmitted data can be improved, thereby improving the reliability of communication. In addition, since the data is sent unidirectionally, the receiving device does not need to reply to the corresponding information, reducing the time for the receiving device to reply to the information, which can improve the efficiency of communication. Among them, the target communication mode can be GOOSE (Generic Object Oriented Substation Event). The communication device and inverters, charging piles and other equipment communicate directly through GOOSE (Generic Object Oriented Substation Event) messages at the data link layer through VLAN (Virtual Local Area Network), which ensures the real-time and reliability of communication, and avoids the problems of data sticking, unstable communication real-time, and unreliable links caused by network layer and application layer protocols.
[0049] In addition, in the present application, Ethernet communication is used for communication, which has simple wiring and does not require consideration of processes such as differential wiring and address setting of 485 or CAN. There is also no problem of unreliable communication caused by communication distance, wireless signal obstruction and attenuation, etc.
[0050] Based on the above content, the embodiment of the present application provides a communication device, including multiple wired ports. Figure 2As shown, the communication device is provided with wired ports such as port 1, port 2, ..., port N. These ports are physical ports.
[0051] In addition, the communication device is configured with multiple virtual subnets, and the virtual subnets are obtained by connecting and configuring different ports of switches inside the communication device. Specifically, the communication device includes multiple switches inside, and different networks of multiple switches can be connected to build a communication subnet. For example, the communication device includes two switches inside, and virtual subnet 1 can be obtained by connecting port 1 of switch 2 with port 1 of switch 2, and virtual subnet 2 can be obtained by connecting port 2 of switch 2 with port 2 of switch 2. In addition, the number of switches can be increased to increase the number of virtual subnets built.
[0052] It should be noted that the communication device can be implemented by a controller, a processor, or other devices that are internally configured with a switch. In addition, the communication device can also be composed of a controller, a processor, or other devices and a switch. In this case, the switch and the electronic device are two independent devices, and the two are connected through a network cable or other connecting cables.
[0053] When the number of devices that need to be connected to the communication device is large, the wired port can be connected to the optical storage and charging device, such as each wired port of the communication device can be connected to an optical storage and charging device, and then a VLAN (Virtual Local Area Network) is divided to achieve virtual subnet expansion, thereby achieving the expansion of the connected devices. Among them, the virtual subnet in this application is VLAN.
[0054] After obtaining the wired port and the virtual subnet, different wired ports correspond to different virtual subnets. Figure 2 As shown, port 1 of the communication device corresponds to VLAN 1, port 2 of the communication device corresponds to VLAN 2, and other ports can be configured with corresponding VLANs as required.
[0055] Furthermore, different wired ports are connected to different types of target devices, so that different types of target devices can communicate within the corresponding virtual subnet.
[0056] Specifically, different types of target devices are devices that need to communicate with the communication device. Different types indicate that they are not the same device. The different types of target devices in this application may be inverters or charging piles.
[0057] like Figure 2 As shown, the inverter is connected to a first port (such as Figure 2 1) to the first virtual subnet in the plurality of virtual subnets (such as Figure 2 The two devices communicate in VLAN 1).
[0058] The charging pile is connected to a second port (such as Figure 2 port 12 in the plurality of virtual subnets is connected to a second virtual subnet in the plurality of virtual subnets (such as Figure 2 The two devices communicate in VLAN 2).
[0059] It should be noted that if there are multiple inverters and charging piles, all inverters can be connected to port 1), all inverters communicate in VLAN 1, and all charging piles can be connected to port 2), all charging piles communicate in VLAN 2.
[0060] As can be seen from the above, the communication device in the embodiment of the present application has a switch and VLAN division function. The inverter is connected to port 1 of the communication device via a network cable to form subnet VLAN1, and the charging pile is connected to port 2 via a network cable to form VLAN2.
[0061] When the inverter, the charging pile and the communication device communicate, in order to improve the reliability of communication, the target communication mode during communication is to repeatedly send the same data in one direction at different time intervals. Specifically, the target communication mode is the GOOSE communication mode.
[0062] GOOSE is a fast message transmission mechanism in IEC61850, generally used to transmit important real-time signals in substations. GOOSE uses network signals to replace the hard-wired communication method between conventional substation devices, greatly simplifying the secondary cable wiring of substations.
[0063] GOOSE messages are sent by combining heartbeat messages and fast retransmission of bit-changing messages. Figure 3 The rules shown are implemented.
[0064] Figure 3 In the figure, T0 is called the heartbeat time. When the data in the GOOSE data set does not change, the communication end, such as a device, sends the current state, that is, the heartbeat message, once every T0 time on average. The state number stNum (StateNumber is used to record the total number of times the GOOSE data changes) in the message remains unchanged, and the sequence number sqNum (SequenceNumber is used to record the number of frames sent by the message in the steady state) increases.
[0065] When an event occurs in the device (such as a switch state change), the data in the GOOSE data set changes, and the device immediately sends all the data in the data set, and then sends the second and third frames at intervals of T1 (which can be customized according to the actual system network performance, or can be set according to the standard), and sends the fourth and fifth frames at intervals of T2 and T3. T2 is 2T1, T3 is 4T1, and the subsequent messages are analogous. The sending interval gradually increases by a factor of 2 until it increases to T0, and the message becomes a heartbeat message again. Among them, when the above event occurs, the data in the GOOSE data set changes. When the stNum in the first frame message after the data changes, it increases by 1, and sqNum starts from zero. Subsequently, stNum in the message remains unchanged, and sqNum increases. That is, stNum increases only when the data changes, and sqNum becomes 0 at the same time. If the data does not change subsequently, stNum remains unchanged, and sqNum increases once each time the data is sent. That is, stNum indicates how many times the data version has changed, and sqNum indicates how many times the current version of the data has been sent.
[0066] When the GOOSE message is received by the receiving device, the receiving device filters the updated data message according to the value changes of the stNum and sqNum parameters and sends it to the upper-layer application for parsing, while discarding the duplicate old data.
[0067] During the specific screening, the receiving device records the last stNum and sqNum, with the initial value being 0. If the stNum received this time is larger than the last time, it means that the data has changed, and it needs to be reported for processing. If stNum has not changed, but only sqNum has changed, it means that the data has been received before and does not need to be processed, so that the data will not be reported repeatedly.
[0068] It should be noted that, since the GOOSE message is a data transmission end that repeatedly sends data to the receiving end, the GOOSE communication method adopts a one-way data transmission method, and the transmitting end repeatedly sends the same data, and the receiving end cannot provide feedback to the transmitting end, which can reduce the time for the receiving end to feedback messages and improve data transmission efficiency. In addition, when data is repeatedly sent, the one-way data is repeatedly sent multiple times at different time intervals, specifically referring to the above-mentioned T1, T2, T3, etc.
[0069] In this embodiment, the GOOSE message transmission mechanism is introduced to solve the real-time and reliability problems of application data transmission. Goose communication is at the data link layer and does not involve protocols such as TCP or UDP. It avoids problems such as data sticking, unstable communication real-time, and unreliable links caused by network layer and application layer protocols.
[0070] It should be noted that in the above embodiment, since the inverter is connected to port 1 of the communication device via a network cable to form subnet VLAN1, and the charging pile is connected to port 2 via a network cable to form VLAN2, the inverter can subsequently communicate with the communication device via GOOSE messages, and the charging pile can also communicate with the communication device via GOOSE messages. If in an actual scenario, there is a communication requirement between the inverter and the charging pile, the inverter and the charging pile can be connected to the same port in the communication device, such as connecting to port 3 at the same time, to achieve direct communication between the inverter and the charging pile. At this time, the communication device only plays a transit role and does not perform data processing operations.
[0071] In addition, in order to improve the reliability of data transmission, the wired port is connected to the corresponding target device via Ethernet. For example, the inverter is connected to port 1 via Ethernet, and the charging pile is connected to port 2 via Ethernet. In this embodiment, Ethernet wired communication is used to improve the reliability of physical layer transmission, and Ethernet wired connection has simple wiring, and there is no need to consider the differential wiring and address setting of 485 or CAN, and there is no problem of unreliable communication caused by communication distance, wireless signal shielding and attenuation.
[0072] Figure 2 There is also an energy route in the system. The inverter serves as the hub, converting the photovoltaic DC power into AC power to charge the energy storage battery. In addition, the electric energy can be connected to the power grid or used for household loads such as charging piles.
[0073] In another implementation of the present application, the communication device can communicate with the control terminal in addition to the inverter and the charging pile. During the communication, the communication device can be directly connected to the control terminal, or indirectly connected to the control terminal through a router. Specific details are shown in 4.
[0074] Figure 4 In the embodiment of the present application, the control terminal can be a mobile phone APP or a cloud, and the communication device is connected to a router through a wired port or wirelessly, and then connected to a cloud server and a mobile phone APP through the router to achieve indirect communication. In addition, the mobile phone APP can also connect to the communication device through the WIFI hotspot generated by the WIFI communication module of the communication device, issue control instructions or read the status of related devices to achieve direct communication.
[0075] It should be noted that Figure 4 The specific implementation of the energy circuit in Figure 1 Refer to the corresponding instructions in .
[0076] In this embodiment, the communication device is configured with multiple virtual subnets, and different types of target devices communicate in the corresponding virtual subnets. Since the communication between different virtual subnets is isolated, it is possible to avoid the problem of communication interference when multiple devices communicate in the same communication network, thereby improving communication reliability. In addition, in this application, the communication method used during communication is a target communication method in which the same data is repeatedly sent unidirectionally at different time intervals. Due to multiple repeated transmissions, the success rate of the receiving device receiving the sent data can be improved, thereby improving communication reliability. In addition, since the data is sent unidirectionally, the receiving device does not need to reply to the corresponding information, reducing the time for the receiving device to reply to the information, which can improve the efficiency of communication.
[0077] In another implementation of the present application, a communication method is provided, which is applied to the above-mentioned communication device, referring to Figure 5 , the communication method may include:
[0078] S11. When a control instruction for the target device is received, convert the control instruction into a first message that complies with a target communication mode.
[0079] In the embodiment of the present application, if the control terminal has a control demand for the target device, the control instructions corresponding to the target device can be sent to the communication device through a mobile phone APP or the cloud. For example, the user sends control instructions based on the WIFI hotspot of the communication device through a mobile phone APP. Or the cloud sends control instructions to the communication device through a router. The control instructions in the embodiment of the present application may be instructions such as power on and off instructions, current and voltage setting instructions, etc. The control instructions sent may be control instructions for the inverter, or control instructions for controlling the charging pile, which can be specifically configured according to the actual scenario.
[0080] When a control instruction for the target device is received, the control instruction is converted into a first message that complies with the target communication mode.
[0081] Taking the target device as an inverter as an example, since the communication device and the inverter communicate through GOOSE messages, and the control terminal, such as a mobile phone APP, communicates with the communication device in a non-GOOSE message manner, it is necessary to convert the control instruction into the first message of the GOOSE communication method.
[0082] In order to perform message conversion operations, it is necessary to model the upstream and downstream data sets of VLAN1 and VLAN2 respectively according to actual business needs in advance, and generate data set files for GOOSE message configuration. The data set file can be a point table, which is a configuration file formed according to the data points of the actual device, generally in XML (Extensible Markup Language) format. The content in the point table configured for different types of devices is different. For example, the content configured for the charging pile includes charging power, charging current, voltage, etc. The inverter may configure other data points according to actual needs.
[0083] The data set file configured by the above-mentioned GOOSE message needs to be pre-configured into the communication device and the target device. For example, for the point table data of the inverter, the corresponding data set file configured by the GOOSE message can be configured into the inverter and the communication device. For the point table data of the charging pile, the corresponding data set file configured by the GOOSE message can be configured into the charging pile and the communication device.
[0084] In addition to configuring the point table in advance, you also need to set up the corresponding subscription function. Specifically, in order to achieve communication between the inverter and the communication device, on VLAN1, the data set published by the communication device is called D11, and the inverter subscribes to D11 to check D11 in time. Data set D11 includes all control instruction data of the communication device to the inverter. The inverter publishes data set D12, and the communication device subscribes to D12. Data set D12 includes all status information that the inverter needs to report.
[0085] Similarly, on VLAN2, the communication device issues control commands to the charging pile by publishing data set D21, and the charging pile subscribes to data set D21 to obtain control instructions. In addition, the charging pile publishes data set D22 to report status information, and the communication device subscribes to data set D22 to obtain status information of the charging pile.
[0086] After the above-mentioned data set file and subscription function are preconfigured, in an actual operation scenario, if the communication device receives a control instruction, it can perform conversion based on the data set file to obtain a first message.
[0087] In another implementation of the present application, when issuing control instructions, there may be a situation of repeated issuance. For example, when a user issues an instruction to adjust the voltage through a mobile phone APP, due to an accidental touch, he clicks to issue twice. At this time, two repeated control instructions will be issued. The former instruction needs to be executed, and the latter instruction does not need to be executed, so as to avoid repeatedly executing the same control instruction and causing a waste of resources. Therefore, in this case, after receiving the control instruction, the communication device will determine whether the control instruction is different from the control content of the processed instruction, wherein the processed instruction is the same as the target device controlled by the control instruction. For example, it is determined whether the current control instruction sent to the inverter has a different control content from the instruction processed by the inverter.
[0088] In the case where the control contents of the control instruction and the processed instruction are different, a message conversion operation is performed on the contents in the control instruction to obtain a first message that meets the communication requirements of the target communication mode.
[0089] For example, the user issues two control instructions of "setting the voltage of the inverter to XX". When the communication device receives the instruction for the first time, it determines the processed historical instructions and finds that the control instruction has not been processed, so it issues it to the inverter for voltage regulation. When the control instruction is received again, it is found to be the same as the control instruction just processed, so it does not respond to the instruction. If they are different, the content in the control instruction is converted into a message to obtain the first message corresponding to the GOOSE communication method.
[0090] In this embodiment, if the communication device receives repeated control instructions, only the first control instruction is executed, and subsequent repeated instructions are no longer executed, so as to avoid repeated operations and save resources.
[0091] S13: Send the first message to the target device through the virtual subnet where the target device is located in the target communication mode.
[0092] In this embodiment, after obtaining the first message, the target device to be controlled can be sent to the inverter via VLAN1 in GOOSE communication mode, for example, when the target device is an inverter. For another example, when the target device is a charging pile, the first message can be sent to the charging pile via VLAN2 in GOOSE communication mode.
[0093] After receiving the first message, the target device will process the first message. In the specific processing, because the same data will be sent repeatedly in the GOOSE communication mode, the target device will determine whether to process the first message based on the state number and the sequence number in the first message. If the state number stNum in the first message increases compared to the stNum in the previous message, it means that the control content in the first message has changed compared to the control content in the previous message. At this time, the first message needs to be processed, and the target device executes the corresponding operation in the first message. If the control instruction is "set the voltage to XX", the target device will set the operating voltage to XX.
[0094] If the state sequence number stNum in the first message is the same as the stNum in the previous message, and only sqNum increases, it means that the target device has received the same first message, and the first message does not need to be processed.
[0095] In this embodiment, the GOOSE communication method is adopted to ensure the real-time and reliability of communication, and avoid the problems of data packet sticking, unstable communication real-time, unreliable links, etc. caused by network layer and application layer protocols.
[0096] In addition, in the present application, data transmission is performed through a virtual subnet, which can avoid interference problems caused by data transmission by multiple devices in the same network.
[0097] In another implementation of the present application, in addition to issuing control instructions through the communication link of the control terminal-communication device-target device, the target device can also actively report its own operating status when its own operating status changes. At this time, when the operating status changes, a second message including the changed operating status is immediately generated and sent to the communication device, and the second message is still sent through the GOOSE communication method. At this time, the steps performed by the communication device side are as follows: Figure 6 shown.
[0098] S21. Receive a second message sent by the target device.
[0099] In the present application, the communication device receives the second message sent by the target device through the GOOSE communication method. Since the GOOSE communication method will be sent repeatedly for multiple times, the target device will continuously receive multiple second messages.
[0100] S22. Extract the state number and the sequence number in the second message.
[0101] When receiving the second message, the communication device will determine whether the message has been processed, and can extract the state number stNum and the sequence number sqNum in the second message to determine whether to process the message based on these two values.
[0102] S23: When it is determined according to the status number and the sequence number that a response to the second message is required, update the operating status of the target device based on the second message.
[0103] Specifically, when it is determined that it is necessary to respond to the second message based on the status number and the sequence number, the status number of the previous message received by the target device is obtained. If the status number is different from the status number of the previous message, it is determined that it is necessary to respond to the second message. If the status number is the same as the status number of the previous message and the sequence number is greater than the sequence number in the previous message received, it is determined that it is not necessary to respond to the second message.
[0104] Specifically, it is determined whether the state sequence number stNum is the same as the state sequence number stNum of the last message received. If the state sequence numbers stNum are different, it is determined that the second message needs to be responded to. If the state sequence numbers stNum are the same and the sequence number sqNum is greater than the sequence number sqNum in the last message received, it is determined that the second message does not need to be responded to. The specific implementation refers to the corresponding process above.
[0105] If a response is required, the operating status of the target device is updated based on the second message.
[0106] Specifically, based on the running status reported by the target device in the second message, the running status of the target device stored in the device is updated to update the running status of the target device in real time, and when the control terminal needs to query the running status of the target device, it can be fed back to the control terminal in time. For example, a status query instruction sent by the control terminal can be received, and the status query instruction is used to query the running status of the target device, determine the running status updated based on the second message sent by the target device, and output it.
[0107] In an embodiment of the present application, when the operating status of the target device is updated, the target device reports the latest operating status to the communication device, so that the communication device stores the latest operating status, and promptly feeds back to the control terminal when the control terminal queries the status. Compared with the method in which the communication device requests the latest operating status from the target device when receiving a status query instruction, the efficiency of status feedback to the control terminal can be improved.
[0108] The embodiments of the present application illustrate the process of issuing control instructions and updating the operating status.
[0109] Data sending process: When the user sends the control command of the inverter through the mobile phone APP or the cloud, the communication device receives the relevant command and compares it with the data of the current S11 data set to determine whether the control content has changed. If there is no change, the command is ignored. Because the current command has been sent regularly, the network driver of the inverter determines whether to report to the application layer to execute the command based on the changes in the stNum and sqNum parameters.
[0110] If the command changes, the communication device will update the S11 data set and then communicate through port 1 on VLAN 1 according to Figure 3 Similarly, if the user issues an instruction to control the charging pile, the communication device will send the S21 data set on VLAN2 through port 2 according to the GOOSE message sending sequence.
[0111] Data upload process: After the inverter detects that it is connected to the communication device, it will Figure 3 The GOOSE message sending sequence publishes the S12 data set on VLAN1. Similarly, the charging pile will publish the S22 data set on VLAN2. After the communication device obtains the status information of the relevant equipment in the corresponding VLAN, it compares and updates the status information of the inverter and the charging pile. When the user queries, it directly returns the relevant status information, thereby improving the system response speed.
[0112] In addition to communicating with the communication device, the inverter and the charging pile can also communicate with each other by connecting to the same port of the communication device, such as port 3.
[0113] For example, suppose the inverter reports the data set S25 to the charging pile, and the charging pile reports S52 to the inverter. Both parties send in Goose order. Assuming that the charging pile now outputs 500V, you can add a data point to the data reported by the charging pile: output voltage 500V, and then the inverter updates S25, which contains a command data point: set the charging pile output voltage to 600V. After it is sent, if the current output voltage in S52 reported by the subsequent charging pile becomes 600V, it means that the charging pile has been executed according to the requirements of the inverter. If it is still 500V, it means that the charging pile has not been executed as required.
[0114] In this embodiment, a repeated execution detection scheme is set when communicating through GOOSE messages, which can avoid repeated execution of instructions and reduce resource waste.
[0115] In addition, after receiving the instructions sent by the user through the mobile phone APP or the cloud, the communication device sends the control command through the GOOSE message in the corresponding VLAN. At the same time, the communication device obtains the relevant status information of the inverter and the charging pile by monitoring the GOOSE message in the corresponding VLAN, and reports it to the mobile phone APP or the cloud server as needed, so as to realize timely update and on-demand reporting of the status.
[0116] In another implementation of the present application, a communication system is provided, including a target device and a communication device for executing the above communication method; the target device is connected to a corresponding wired port in the communication device. The connection structure between the target device and the communication device can be as follows: Figure 2 shown.
[0117] The target device is used to receive a first message sent by the communication apparatus and process the first message.
[0118] Wherein, when the target device is used to process the first message, it is specifically used to:
[0119] Based on the status sequence number and the sequence number in the first message, determine whether to respond to the first message; if it is necessary to respond to the first message, execute the corresponding operation in the first message.
[0120] Wherein, the target device is also used for:
[0121] When the operating state of the target device changes, a second message including the changed operating state is output to the communication device.
[0122] It should be noted that for the specific implementation process of the target device and the communication device in the embodiments of the present application, please refer to the corresponding description in the above embodiments.
[0123] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the communication methods provided in the embodiments of the present application.
[0124] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any communication method provided in the embodiment of the present application.
[0125] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A communication device, characterized in that: comprising a plurality of wired ports; the communication device being configured with a plurality of virtual subnets; Different wired ports correspond to different virtual subnets; Different wired ports are connected to different types of target devices, so that different types of target devices can communicate within the corresponding virtual subnet; wherein the target communication mode during communication is to send the same data unidirectionally repeatedly at different time intervals.
2. The communication device according to claim 1, characterized in that The target device includes an inverter or a charging pile; The inverter is connected to a first port of the plurality of wired ports to communicate in a first virtual subnet of the plurality of virtual subnets; The charging pile is connected to a second port among the plurality of wired ports to communicate in a second virtual subnet among the plurality of virtual subnets.
3. The communication device according to claim 1, characterized in that The wired port is connected to the corresponding target device via Ethernet.
4. The communication device according to claim 1, characterized in that: The communication device is directly connected to the control terminal for communication, or the communication device is indirectly connected to the control terminal for communication via a router.
5. The communication device according to claim 1, characterized in that: The virtual subnet is obtained by connecting and configuring different ports of the switch inside the communication device.
6. The communication device according to claim 1, characterized in that: The target communication mode is a general object-oriented substation event GOOSE communication mode.
7. A communication method, characterized in that: Applied to the communication device according to any one of claims 1 to 6, the communication method comprises: When receiving a control instruction for the target device, converting the control instruction into a first message that conforms to the target communication mode; The first message is sent to the target device through the virtual subnet where the target device is located in the target communication mode.
8. The communication method according to claim 7, characterized in that: Converting the control instruction into a first message conforming to the target communication mode includes: When the control contents of the control instruction and the processed instruction are different, a message conversion operation is performed on the contents of the control instruction to obtain a first message that meets the communication requirements of the target communication mode; the processed instruction is the same as the target device controlled by the control instruction.
9. The communication method according to claim 7, characterized in that: Also includes: Receiving a second message sent by the target device; Extracting the state number and the sequence number in the second message; When it is determined according to the status number and the sequence number that the second message needs to be responded to, the operating status of the target device is updated based on the second message.
10. The communication method according to claim 9, characterized in that: Before updating the running status of the target device based on the second message, the method further includes: Obtaining the status sequence number of the last message received by the target device; If the status sequence number is different from the status sequence number of the previous message, it is determined that the second message needs to be responded to; If the status sequence number is the same as the status sequence number of the previous message, and the sequence number is greater than the sequence number in the previous message received, it is determined that there is no need to respond to the second message.
11. A communication system, characterized in that: It comprises a target device and a communication apparatus for executing the communication method according to any one of claims 7 to 10; the target device is connected to a corresponding wired port in the communication apparatus.
12. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the communication method as described in any one of claims 7 to 10.
Citation Information
Patent Citations
Method and device for transmitting data packet under high-speed transmission environment
CN101765147A
Wireless sensor information transmission device and method for building and industrial control
CN104113940A
Equipment access method and device of Internet of Things platform, electronic equipment and storage medium
CN112583910A
Smart home gateway and data processing method
CN114915521A
GOOSE abnormal message detection method based on counting sequence analysis
CN115580557A