Message generation method, device and electronic equipment based on distribution network
By assigning unique identifiers to terminal devices in the distribution network and generating specific addresses, and generating communication messages based on topological relationships, the problem of high configuration complexity of terminal devices is solved, and a simplified message interaction and configuration process is realized.
Patent Information
- Application Number
- CN202411063196.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-05
AI Technical Summary
In the prior art, the communication interaction configuration between terminal devices in the distribution network is complex, and configuration files need to be issued for each terminal device, resulting in operation and maintenance personnel needing to maintain multiple configuration files, which increases configuration complexity.
By assigning terminal unique identifiers to terminal devices in the distribution network, generating target multicast address and source MAC address, and generating communication messages based on topological relationships, automatic identification and message interaction between terminal devices are realized, and operation and maintenance are reduced personnel intervention.
It reduces the configuration complexity of terminal equipment, realizes the communication of packets of multiple terminal equipment without the need for separate configuration, and simplifies the configuration process of the distribution network.
Smart Images

Figure CN118590467B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of distribution network technology and digital communication technology, and in particular to a method, device and electronic equipment for generating a message based on a distribution network. Background Art
[0002] With the development of smart grid, distributed feeder automation technology is increasingly used in distribution systems. Among them, distributed feeder automation technology based on generic object-oriented substation events is an important implementation method. This technology uses GOOSE (Generic Object Event Substation Event, a communication protocol used in power systems) messages to exchange information between distribution terminals. However, the configuration of GOOSE messages is relatively complex and requires professional configuration tools and technicians, which to some extent limits the promotion and application of distributed feeder automation technology.
[0003] In the existing technology, GOOSE messages are mainly configured through the SCD (Substation Configuration Description) tool. The SCD tool can generate and manage the configuration files of the entire distribution system, including the format, content and transmission path of the GOOSE message. In this way, the interconnection between distribution terminals can be achieved, thereby realizing the function of distributed feeder automation.
[0004] However, it can be seen from the above content that in order to realize communication interaction between terminal devices in the distribution network in the prior art, it is necessary to issue a configuration file to each terminal device. This means that when there are multiple terminal devices in the distribution network, the operation and maintenance personnel need to maintain multiple configuration files at the same time, which leads to technical problems with high configuration complexity.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The present application provides a message generation method, device and electronic device based on a distribution network, so as to at least solve the technical problem of high configuration complexity existing in the process of realizing communication interaction of terminal devices in the distribution network in the prior art.
[0007] According to one aspect of the present application, a message generation method based on a distribution network is provided, including: allocating a terminal unique identifier for a first terminal device in the distribution network; generating a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier, wherein different terminal devices in the distribution network have different target multicast addresses, and different terminal devices in the distribution network have different source MAC addresses; generating a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network, wherein the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network.
[0008] Optionally, the message generation method based on the distribution network also includes: selecting a value without a target mark from a preset value range as the terminal unique identifier of the first terminal device, wherein the value carrying the target mark has been used as the terminal unique identifier of any terminal device in the distribution network.
[0009] Optionally, the message generation method based on the distribution network also includes: obtaining an initial multicast address; modifying the characters in the first preset position in the initial multicast address to the terminal unique identifier of the first terminal device, and obtaining the target multicast address of the first terminal device; obtaining an initial MAC address; modifying the characters in the second preset position in the initial MAC address to the terminal unique identifier of the first terminal device, and obtaining the source MAC address of the first terminal device.
[0010] Optionally, the message generation method based on the distribution network also includes: obtaining a topological relationship diagram between all terminal devices constituting the distribution network and status data of a first terminal device, wherein the status data includes at least first data or second data, wherein the first data is used to characterize that there is no fault in the line where the first terminal device is located; and the second data is used to characterize that there is a fault in the line where the first terminal device is located; determining the topological relationship between the first terminal device and the second terminal device in the distribution network from the topological relationship diagram; and generating a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network.
[0011] Optionally, the second data also includes at least the following sub-data: first sub-data, used to characterize the fault isolation operation of the first terminal device; second sub-data, used to characterize the fault isolation result of the first terminal device; third sub-data, used to characterize the voltage data at both ends of the first terminal device; fourth sub-data, used to characterize the current data of the first terminal device.
[0012] Optionally, the message generation method based on the distribution network also includes: when the first terminal device corresponds to a maintenance pressure plate, obtaining a maintenance identifier of the first terminal device, wherein the maintenance identifier is used to characterize the position status of the maintenance pressure plate; generating a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the maintenance identifier, the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the distribution network.
[0013] Optionally, the message generation method based on the distribution network also includes: when the topology relationship diagram is updated, redetermining the topology relationship between the first terminal device and the second terminal device in the distribution network based on the updated topology relationship diagram; based on the redetermined topology relationship between the first terminal device and the second terminal device in the distribution network, generating a communication message from the first terminal device to the second terminal device, and / or a communication message from the second terminal device to the first terminal device.
[0014] According to another aspect of the present application, a message generation device based on a distribution network is also provided, wherein the message generation device based on the distribution network includes: an allocation unit, used to allocate a terminal unique identifier to a first terminal device in the distribution network; a first processing unit, used to generate a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier, wherein different terminal devices in the distribution network have different target multicast addresses, and different terminal devices in the distribution network have different source MAC addresses; a second processing unit, used to generate a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network, wherein the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network.
[0015] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes any one of the above-mentioned methods for generating messages based on the distribution network.
[0016] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors execute any one of the above-mentioned distribution network-based message generation methods.
[0017] In the present application, a method of redesigning the communication message generated by the terminal device in the distribution network is adopted. First, a terminal unique identifier is assigned to the first terminal device in the distribution network, and then a target multicast address and a source MAC address of the first terminal device are generated based on the terminal unique identifier, wherein different terminal devices in the distribution network have different target multicast addresses, and different terminal devices in the distribution network have different source MAC addresses. Finally, based on the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network, a communication message is generated from the first terminal device to the second terminal device, wherein the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network.
[0018] It can be seen from the above content that by adopting the technical solution of the present application, there is no need to issue a configuration file to each terminal device. By allocating a terminal unique identifier to each terminal device (such as the first terminal device), and generating the target multicast address and source MAC address of the first terminal device based on the terminal unique identifier, finally, according to the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the power distribution network, a communication message sent by the first terminal device to the second terminal device is generated. Since the target multicast address and the source MAC address are both unique and non-repetitive addresses, the second terminal device can automatically identify the topological relationship between it and the first terminal device after receiving the communication message, and accurately determine the identity of the first terminal device based on the target multicast address and the source MAC address of the first terminal device. In the process of generating and transmitting the message, there is no need for operation and maintenance personnel to participate, thereby achieving the technical effect of reducing the configuration complexity of the terminal device.
[0019] It can be seen that through the technical solution of the present application, the purpose of completing the message interaction of multiple terminal devices in the distribution network is achieved without the need to configure each terminal device separately, thereby achieving the technical effect of reducing the configuration difficulty of the distribution network, and further solving the technical problem of high configuration complexity existing in the process of realizing communication interaction of terminal devices in the distribution network in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a flowchart of an optional method for generating a message based on a distribution network according to an embodiment of the present application;
[0022] Figure 2is a flow chart of generating an optional communication message according to an embodiment of the present application;
[0023] Figure 3 is an optional topological relationship diagram according to an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of a message generation device based on a distribution network according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] It should also be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) collected by this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0028] According to an embodiment of the present application, an embodiment of a message generation method based on a distribution network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] Figure 1 is a flowchart of an optional method for generating a message based on a distribution network according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0030] Step S101, allocating a terminal unique identifier to a first terminal device in a distribution network.
[0031] In an optional embodiment, a message processing system based on a distribution network (hereinafter referred to as a message processing system) can be used as the execution subject of the message generation method based on the distribution network in the embodiment of the present application, wherein the message processing system can be a software system or an embedded system combining software and hardware. In addition, in addition to the message processing system, other types of devices and equipment can also be used as the execution subject of the message generation method in the embodiment of the present application, and the specific type of the execution subject of the present application is not particularly limited. For the convenience of explanation, the message processing system is selected as the execution subject below.
[0032] Optionally, the distribution network includes, but is not limited to, various terminal devices such as tie switches, ordinary switches, transformers, power supply equipment, power consumption equipment, etc. In addition, there is no particular restriction on the number of each terminal device.
[0033] Optionally, the first terminal device may be any terminal device in the distribution network.
[0034] Optionally, the terminal unique identifier allocated to the first terminal device may be referred to as the APPID of the first terminal device, wherein in the distribution network, different terminal devices have different APPIDs.
[0035] Step S102: Generate a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier.
[0036] In step S102, different terminal devices in the distribution network have different target multicast addresses and different source MAC addresses.
[0037] Optionally, a multicast address is a special IP address used to send data packets from one source point to multiple receivers during network communication. A multicast address allows a data packet to be copied and sent to a specific group of receivers, rather than a single receiver or broadcast to the entire network. This communication method can effectively save bandwidth resources and improve network transmission efficiency.
[0038] Optionally, the source MAC address refers to the unique identifier of the sender device in a network data packet. The MAC (Media Access Control) address is the address of a network device (such as a router, switch, computer, mobile phone, etc.) at the physical layer. It is a 48-bit (or 64-bit) hexadecimal number, usually expressed as 6 (or 8) hexadecimal digits, with the digits separated by colons (:) or hyphens (-).
[0039] Unlike the prior art that requires operation and maintenance personnel to configure the multicast address and MAC address in the GOOSE message through the SCD tool, the technical solution of the present application does not require the intervention of operation and maintenance personnel. The message processing system can generate the target multicast address and source MAC address of the first terminal device based on the terminal unique identifier of the first terminal device, thereby reducing the configuration cost and complexity of the distribution network.
[0040] Step S103, generating a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the power distribution network.
[0041] In step S103, the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network.
[0042] It should be noted that in the prior art, when using the SCD tool to configure GOOSE messages, it is necessary to generate a configuration file for each terminal device in the distribution network, wherein the configuration file of each terminal device is used to record the mapping relationship and topological relationship between the terminal device and other terminal devices, wherein the mapping relationship includes but is not limited to the name mapping relationship of different terminal devices for the same transaction and the identifier mapping relationship for the same rule.
[0043] It is easy to notice that if the topological relationship between the terminal devices in the distribution network changes, the operation and maintenance personnel must update the configuration files of the terminal devices involved. However, the use of SCD tools requires professional knowledge and skills, which is a challenge for on-site maintenance personnel. Secondly, the configuration process of SCD tools is relatively complicated and requires a lot of time and effort.
[0044] In order to solve the above problems, the present application provides an improved communication protocol applied to the power distribution network. Based on the communication protocol provided by the present application, a communication message sent by the first terminal device to the second terminal device is generated mainly according to the target multicast address, source MAC address and the topological relationship between the first terminal device and the second terminal device in the power distribution network of the first terminal device. Specifically, the communication message sent by the first terminal device to the second terminal device includes at least the target multicast address, source MAC address and the topological relationship between the first terminal device and the second terminal device in the power distribution network of the first terminal device. Similarly, the communication message sent by the second terminal device to the first terminal device also includes at least the target multicast address, source MAC address and the topological relationship between the first terminal device and the second terminal device in the power distribution network of the second terminal device.
[0045] In addition, the communication protocol provided in the present application also presets a transaction naming strategy and a rule naming strategy, wherein the transaction naming rule is used to ensure that different terminal devices have the same name for the same transaction, and the rule naming strategy is used to ensure that different terminal devices have the same name and interpretation for the same rule.
[0046] It should be noted that the terminal devices mentioned above may be of various types in the distribution network. Generally speaking, the same type of terminal devices use the same rules to set multicast addresses and MAC addresses. However, different types of terminal devices may have different rules for setting multicast addresses and MAC addresses, which results in the multicast addresses and MAC addresses corresponding to multiple terminal devices in the distribution network being complex and diverse, difficult to unify, and even having a certain probability of having multicast addresses and / or MAC addresses with the same configuration but conflicting with each other, which makes it difficult for operation and maintenance personnel to promptly and effectively determine the identity of the terminal device when a failure occurs.
[0047] However, by adopting the technical solution of the present application, it is not necessary to issue a configuration file to each terminal device. By allocating a terminal unique identifier to each terminal device (such as the first terminal device), and generating the target multicast address and source MAC address of the first terminal device based on the terminal unique identifier, finally, according to the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the power distribution network, a communication message sent from the first terminal device to the second terminal device is generated. Since the target multicast address and the source MAC address are both unique and non-repetitive addresses, the second terminal device can automatically identify the topological relationship between it and the first terminal device after receiving the communication message, and accurately determine the identity of the first terminal device based on the target multicast address and the source MAC address of the first terminal device. In the process of generating and transmitting the message, there is no need for operation and maintenance personnel to participate, thereby achieving the technical effect of reducing the configuration complexity of the terminal device.
[0048] Furthermore, by adopting the technical solution of the present application, since the communication message generated by the first terminal device records the topological relationship between the first terminal device and the second terminal device in the distribution network, different terminal devices can determine the topological relationship between each other based on the transmission of the communication message, thereby omitting the configuration process of the terminal device. Even if the topological relationship of the distribution network changes, the terminal devices in the distribution network only need to complete the transmission of the communication message at most once, so as to ensure that the terminal devices in the distribution network can perceive the changes in the topological relationship in a timely manner.
[0049] It can be seen that through the technical solution of the present application, the purpose of completing the message interaction of multiple terminal devices in the distribution network is achieved without the need to configure each terminal device separately, thereby achieving the technical effect of reducing the configuration difficulty of the distribution network, and further solving the technical problem of high configuration complexity existing in the process of realizing communication interaction of terminal devices in the distribution network in the prior art.
[0050] In an optional embodiment, when allocating a terminal unique identifier for a first terminal device in a distribution network, the message processing system may select a value that does not carry a target tag from a preset value range as the terminal unique identifier of the first terminal device, wherein the value that carries the target tag has been used as the terminal unique identifier of any terminal device in the distribution network.
[0051] Optionally, the preset value interval may be 000 to 16383. In addition, in addition to allocating terminal unique identifiers to terminal devices in the distribution network, the message processing system may also allocate the same network identifier (VLAN-ID) to terminal devices belonging to the same local area network to achieve network isolation and improve network bandwidth utilization.
[0052] As shown in Table 1, the configuration list of the terminal unique identifier (APPID) and the network identifier (VLAN-ID) can be as follows:
[0053] Table 1
[0054]
[0055] It should be noted that by setting a target mark for the used numerical value, it can be ensured that when assigning terminal unique identifiers to other terminal devices, a numerical value that has never been used is selected as the terminal unique identifier of other terminal devices, thereby achieving the purpose of each terminal device in the distribution network being assigned a unique terminal identifier.
[0056] In an optional embodiment, in the process of generating the target multicast address and source MAC address of the first terminal device according to the terminal unique identifier, the message processing system can obtain the initial multicast address, and then modify the characters in the first preset position in the initial multicast address to the terminal unique identifier of the first terminal device, so as to obtain the target multicast address of the first terminal device. In addition, the message processing system can also obtain the initial MAC address, and then modify the characters in the second preset position in the initial MAC address to the terminal unique identifier of the first terminal device, so as to obtain the source MAC address of the first terminal device.
[0057] Optionally, for the distribution network, the initial multicast address is globally consistent. According to the communication protocol provided in the present application, the characters in the first preset position in the initial multicast address are modified to the terminal unique identifier of a terminal device, and the target multicast address of the terminal device can be obtained. For example, the last two bytes of characters in the initial multicast address are modified to the APPID of the first terminal device to obtain the target multicast address of the first terminal device.
[0058] It should be noted that the first preset position may be any position, and the above-mentioned "the last two bytes in the initial multicast address" is only an example. In actual applications, there may be more options.
[0059] Optionally, for the distribution network, the initial MAC address is also globally consistent. According to the communication protocol provided by this application, the characters in the second preset position in the initial MAC address are modified to the terminal unique identifier of a certain terminal device, and the source MAC address of the terminal device can be obtained. For example, the last two bytes of characters in the initial MAC address are modified to the APPID of the first terminal device, and the source MAC address of the first terminal device can be obtained.
[0060] Similarly, the above-mentioned “the last two bytes in the initial MAC address” is only an example. In actual applications, the second preset position may also be other bytes in the initial MAC address.
[0061] It should also be noted that, since the communication protocol provided by the present application specifies that the characters at the first preset position in the initial multicast address are modified to the terminal unique identifier of the first terminal device, so as to obtain the target multicast address of the first terminal device; and the characters at the second preset position in the initial MAC address are modified to the terminal unique identifier of the first terminal device, so as to obtain the source MAC address of the first terminal device. Therefore, after the second terminal device receives the communication message sent by the first terminal device, by identifying the characters at the first preset position on the target multicast address or the characters at the second preset position on the source MAC address, the terminal unique identifier of the first terminal device can be determined, and then the identity of the first terminal device can be determined.
[0062] It can be seen that this application has designed a new and unified identity authentication mechanism between terminal devices based on the multicast address and MAC address, which can ensure that different terminal devices can effectively identify each other's identities without human intervention.
[0063] In an optional embodiment, Figure 2 is an optional flow chart of generating a communication message according to an embodiment of the present application, such as Figure 2 As shown, the following steps are included:
[0064] Step S201, obtaining a topological relationship diagram between all terminal devices constituting a distribution network and status data of a first terminal device.
[0065] In step S201, the status data includes at least first data or second data, wherein the first data is used to indicate that there is no fault in the line where the first terminal device is located; and the second data is used to indicate that there is a fault in the line where the first terminal device is located.
[0066] Optionally, assuming that the first terminal device is an ordinary switch or a connecting switch, the first data indicates that there is no fault in the line between the first terminal device and the power supply (i.e., the line where the first terminal device is located), and the second data indicates that there is a fault in the line between the first terminal device and the power supply, such as a ground fault or a disconnection fault.
[0067] Step S202: determining a topological relationship between the first terminal device and the second terminal device in the distribution network from a topological relationship diagram.
[0068] Optionally, the topology diagram is maintained by operation and maintenance personnel, and the topology diagram is used to describe the topology relationship between all terminal devices in the distribution network. The message processing system can parse the topology relationship between the first terminal device and the second terminal device in the distribution network from the topology diagram by image recognition and semantic analysis.
[0069] Step S203, generating a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the distribution network.
[0070] Optionally, the communication message sent by the first terminal device to the second terminal device includes at least status data of the first terminal device, a target multicast address, a source MAC address, and a topological relationship between the first terminal device and the second terminal device in the distribution network.
[0071] In addition, the second data mentioned above also includes at least the following sub-data:
[0072] The first sub-data is used to characterize the fault isolation operation of the first terminal device;
[0073] The second sub-data is used to characterize the fault isolation result of the first terminal device;
[0074] The third sub-data is used to represent the voltage data at both ends of the first terminal device;
[0075] The fourth sub-data is used to represent the current data of the first terminal device.
[0076] It should be noted that the data types of the above-mentioned sub-data are of the same type. By adding status data to the communication message sent by the first terminal device to the second terminal device, when the second terminal device receives the communication message, it can combine the topological relationship between the two devices and the status data of the first terminal device to determine the operation it should perform.
[0077] For example, Figure 3 An optional topological relationship diagram according to an embodiment of the present application is shown, such as Figure 3 As shown, the two ends of the distribution network are power supply station 1 and power supply station 2, the power supply station 1 is connected to the power consumption equipment through the first switch, and the power supply station 2 is connected to the power consumption equipment through the tie switch. Assuming that the first switch is the first terminal device, the tie switch is the second terminal device, and the line between the first switch and the power supply station 1 fails, then the first switch actively disconnects at this time to complete the fault isolation, and the first switch sends a communication message to the tie switch, and the communication message at least includes: the target multicast address of the first switch, the source MAC address, the topological relationship between the first terminal device and the second terminal device in the distribution network, the line between the first switch and the power supply station 1 fails, and the first switch has completed the fault isolation through the disconnection operation. After receiving the communication message sent by the first switch, the tie switch starts the closing operation based on the topological relationship between the two and the status data of the first switch, thereby connecting the line between the power supply station 2 and the power consumption equipment, and the power supply station 2 supplies power to the power consumption equipment instead.
[0078] In an optional embodiment, when the first terminal device corresponds to a maintenance platen, the message processing system can also obtain a maintenance identifier of the first terminal device, wherein the maintenance identifier is used to characterize the position status of the maintenance platen. Then, the message processing system generates a communication message from the first terminal device to the second terminal device based on the status data of the first terminal device, the maintenance identifier, the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network.
[0079] Optionally, the first terminal device can also inform the second terminal device of the position status of the maintenance pressure plate through a communication message, so that the second terminal device can determine the maintenance status of the first terminal device based on the position status of the maintenance pressure plate of the first terminal device, and then when a fault occurs in the first terminal device, the second terminal device can perform a fault isolation operation in a timely manner.
[0080] Optionally, Table 2 is an example of a communication message according to an embodiment of the present application. As shown in Table 2, in addition to the status data of the terminal device, maintenance identification, target multicast address, source MAC address and topological relationship between different terminal devices, the communication message may also include priority tags, Ethernet types, lifetime and other information.
[0081] Table 2
[0082]
[0083]
[0084] In an optional embodiment, when the topology relationship diagram is updated, the message processing system redefines the topology relationship between the first terminal device and the second terminal device in the distribution network based on the updated topology relationship diagram. According to the redetermined topology relationship between the first terminal device and the second terminal device in the distribution network, a communication message is generated from the first terminal device to the second terminal device, and / or a communication message is generated from the second terminal device to the first terminal device.
[0085] It can be seen that since the communication message generated by the first terminal device or the second terminal device records the topological relationship between the first terminal device and the second terminal device in the distribution network, the first terminal device and the second terminal device can determine the topological relationship between each other based on the transmission of the communication message. Even if the topological relationship of the distribution network changes, the first terminal device and the second terminal device only need to complete the transmission of the communication message at most once to ensure that the two devices can perceive the changes in the topological relationship in time, and there is no need to update the configuration files of the two devices separately.
[0086] It can be seen from the above content that by adopting the technical solution of the present application, there is no need to issue a configuration file to each terminal device. By allocating a terminal unique identifier to each terminal device (such as the first terminal device), and generating the target multicast address and source MAC address of the first terminal device based on the terminal unique identifier, finally, according to the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the power distribution network, a communication message sent by the first terminal device to the second terminal device is generated. Since the target multicast address and the source MAC address are both unique and non-repetitive addresses, the second terminal device can automatically identify the topological relationship between it and the first terminal device after receiving the communication message, and accurately determine the identity of the first terminal device based on the target multicast address and the source MAC address of the first terminal device. In the process of generating and transmitting the message, there is no need for operation and maintenance personnel to participate, thereby achieving the technical effect of reducing the configuration complexity of the terminal device.
[0087] According to another aspect of the embodiment of the present application, a message generation device based on a distribution network is also provided, wherein: Figure 4 is a schematic diagram of a message generation device based on a distribution network according to an embodiment of the present application, such as Figure 4 As shown, it includes: an allocation unit 401, a first processing unit 402, and a second processing unit 403.
[0088] Optionally, the allocation unit 401 is used to allocate a terminal unique identifier for a first terminal device in the distribution network; the first processing unit 402 is used to generate a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier, wherein different terminal devices in the distribution network have different target multicast addresses, and different terminal devices in the distribution network have different source MAC addresses; the second processing unit 403 is used to generate a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network, wherein the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network.
[0089] Optionally, the allocation unit 401 includes: a first processing subunit, used to select a numerical value without a target mark from a preset numerical range as a terminal unique identifier of a first terminal device, wherein the numerical value carrying the target mark has been used as a terminal unique identifier of any terminal device in the distribution network.
[0090] Optionally, the first processing unit 402 includes: a first acquisition subunit, a first modification subunit, a second acquisition subunit, and a second modification subunit. The first acquisition subunit is used to acquire an initial multicast address; the second acquisition subunit is used to modify the characters in the first preset position of the initial multicast address to the terminal unique identifier of the first terminal device, and obtain the target multicast address of the first terminal device; the second acquisition subunit is used to acquire an initial MAC address; the second modification subunit is used to modify the characters in the second preset position of the initial MAC address to the terminal unique identifier of the first terminal device, and obtain the source MAC address of the first terminal device.
[0091] Optionally, the second processing unit 403 includes: a third acquisition subunit, a first determination subunit, and a second determination subunit. The third acquisition subunit is used to obtain a topological relationship diagram between all terminal devices constituting the distribution network and status data of the first terminal device, wherein the status data includes at least first data or second data, wherein the first data is used to indicate that there is no fault in the line where the first terminal device is located; the second data is used to indicate that there is a fault in the line where the first terminal device is located; the first determination subunit is used to determine the topological relationship between the first terminal device and the second terminal device in the distribution network from the topological relationship diagram; the second determination subunit is used to generate a communication message sent by the first terminal device to the second terminal device based on the status data of the first terminal device, the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network.
[0092] Optionally, the second data also includes at least the following sub-data: first sub-data, used to characterize the fault isolation operation of the first terminal device; second sub-data, used to characterize the fault isolation result of the first terminal device; third sub-data, used to characterize the voltage data at both ends of the first terminal device; fourth sub-data, used to characterize the current data of the first terminal device.
[0093] Optionally, the second determination subunit includes: an acquisition module and a message generation module, wherein the acquisition module is used to obtain the maintenance identifier of the first terminal device when the first terminal device corresponds to a maintenance pressure plate, wherein the maintenance identifier is used to characterize the position status of the maintenance pressure plate; the message generation module is used to generate a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the maintenance identifier, the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the distribution network.
[0094] Optionally, the message generation device based on the distribution network further includes: a first determination unit and a second determination unit. The first determination unit is used to redetermine the topological relationship between the first terminal device and the second terminal device in the distribution network based on the updated topological relationship diagram when the topological relationship diagram is updated; the second determination unit is used to generate a communication message sent by the first terminal device to the second terminal device, and / or a communication message sent by the second terminal device to the first terminal device, based on the redetermined topological relationship between the first terminal device and the second terminal device in the distribution network.
[0095] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes any one of the above-mentioned methods for generating messages based on the distribution network.
[0096] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors execute any one of the above-mentioned distribution network-based message generation methods.
[0097] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0098] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0101] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0103] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A message generation method based on a distribution network, characterized in that: include: Allocating a terminal unique identifier to a first terminal device in the distribution network; Generate a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier, wherein different terminal devices in the distribution network have different target multicast addresses and different source MAC addresses of different terminal devices in the distribution network; Generate a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network, wherein the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network; Wherein, generating a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the distribution network includes: obtaining a topological relationship diagram between all terminal devices constituting the distribution network and status data of the first terminal device, wherein the status data includes at least first data or second data, wherein the first data is used to characterize that there is no fault in the line where the first terminal device is located; and the second data is used to characterize that there is a fault in the line where the first terminal device is located; determining the topological relationship between the first terminal device and the second terminal device in the distribution network from the topological relationship diagram; generating a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the target multicast address, the source MAC address and the topological relationship between the first terminal device and the second terminal device in the distribution network; In the case where the topology relationship diagram is updated, the topology relationship between the first terminal device and the second terminal device in the distribution network is redetermined based on the updated topology relationship diagram; based on the redetermined topology relationship between the first terminal device and the second terminal device in the distribution network, a communication message sent by the first terminal device to the second terminal device and / or a communication message sent by the second terminal device to the first terminal device is generated.
2. The message generation method based on the distribution network according to claim 1 is characterized in that: Allocating a terminal unique identifier to a first terminal device in a distribution network includes: A value without a target tag is selected from a preset value interval as the terminal unique identifier of the first terminal device, wherein the value carrying the target tag has been used as the terminal unique identifier of any terminal device in the distribution network.
3. The message generation method based on the distribution network according to claim 1 is characterized in that: Generating a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier includes: Get the initial multicast address; Modify the character at the first preset position in the initial multicast address into a terminal unique identifier of the first terminal device to obtain a target multicast address of the first terminal device; Get the initial MAC address; The character at the second preset position in the initial MAC address is modified into a terminal unique identifier of the first terminal device to obtain a source MAC address of the first terminal device.
4. The message generation method based on the distribution network according to claim 1 is characterized in that: The second data also includes at least the following sub-data: first sub-data, used to characterize the fault isolation operation of the first terminal device; The second sub-data is used to characterize the fault isolation result of the first terminal device; The third sub-data is used to represent the voltage data at both ends of the first terminal device; The fourth sub-data is used to characterize the current data of the first terminal device.
5. The method for generating a message based on a distribution network according to claim 1, characterized in that: Generating a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the power distribution network, including: In the case where the first terminal device corresponds to a maintenance platen, obtaining a maintenance identifier of the first terminal device, wherein the maintenance identifier is used to indicate the position status of the maintenance platen; A communication message is generated that the first terminal device sends to the second terminal device based on the status data of the first terminal device, the maintenance identifier, the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network.
6. A message generating device based on a distribution network, characterized in that: include: An allocating unit, configured to allocate a unique terminal identifier to a first terminal device in the distribution network; A first processing unit, configured to generate a target multicast address and a source MAC address of the first terminal device according to the terminal unique identifier, wherein different terminal devices in the distribution network have different target multicast addresses and different source MAC addresses of different terminal devices in the distribution network; A second processing unit, configured to generate a communication message sent by the first terminal device to the second terminal device according to the target multicast address, the source MAC address, and a topological relationship between the first terminal device and the second terminal device in the distribution network, wherein the second terminal device is a terminal device other than the first terminal device in the distribution network, and the second terminal device and the first terminal device belong to the same local area network; Wherein, the second processing unit includes: a third acquisition subunit, used to acquire a topological relationship diagram between all terminal devices constituting the distribution network and status data of the first terminal device, wherein the status data includes at least first data or second data, wherein the first data is used to indicate that there is no fault in the line where the first terminal device is located; and the second data is used to indicate that there is a fault in the line where the first terminal device is located; a first determination subunit, used to determine the topological relationship between the first terminal device and the second terminal device in the distribution network from the topological relationship diagram; and a second determination subunit, used to generate a communication message sent by the first terminal device to the second terminal device according to the status data of the first terminal device, the target multicast address, the source MAC address, and the topological relationship between the first terminal device and the second terminal device in the distribution network; The message generation device based on the distribution network also includes: a first determination unit, which is used to redetermine the topological relationship between the first terminal device and the second terminal device in the distribution network based on the updated topological relationship diagram when the topological relationship diagram is updated; a second determination unit, which is used to generate a communication message sent by the first terminal device to the second terminal device, and / or a communication message sent by the second terminal device to the first terminal device, based on the redetermined topological relationship between the first terminal device and the second terminal device in the distribution network.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the message generation method based on the distribution network according to any one of claims 1 to 5.
8. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the message generation method based on the distribution network as described in any one of claims 1 to 5.
