Power message processing method and system, electronic equipment and medium

By receiving power messages and determining the types of communication protocols, the decoder made of pre -made by choosing a pre -made decoder can solve the problem of electrical equipment to codec with multiple communication protocols, and reduce maintenance and storage costs.

CN119383249AInactive Publication Date: 2025-01-28BEIJING SIFANG JIBAO ENG TECH +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411945408.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to meet the encoding and decoding requirements of power equipment for a variety of communication protocols, and is difficult to maintain and manage, which wastes storage space.

Method used

By receiving power messages and obtaining its message characteristics, determine the corresponding types of communication protocols, and select the decoder corresponding to the various application language systems by pre -pre -generated a variety of application language systems for decoding to realize the coding of multiple communication protocols.

Benefits of technology

The functional needs of the electrical equipment to codec with a variety of communication protocols have been realized, and the development costs of the maintenance and transplantation of the codecs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383249A_ABST
    Figure CN119383249A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of power message processing, and provides a power message processing method and system, electronic equipment and a medium, and the method comprises the steps: receiving a target power message sent by power message sending equipment, and obtaining a target message feature of the target power message; determining a target communication protocol type corresponding to the target power message based on the target message feature; determining a corresponding target decoder based on a target communication protocol type corresponding to the target power message, wherein the target decoder is one of decoders respectively corresponding to a plurality of communication protocols generated according to a plurality of application language systems in advance; and decoding the target power message based on the target decoder to obtain decoded target semantic data. Therefore, the functional requirements of the power equipment on coding (decoding) of various communication protocols are met, and meanwhile, the development cost of maintenance, transplantation and the like of the coding (decoding) device is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power message processing, and in particular to a method, system, electronic device and medium for processing power messages. Background Art

[0002] As global energy demand increases, the power equipment industry is showing a trend of diversification, intelligence and efficiency, which has also made the scale and complexity of power system communication networks unprecedented. In the process of power equipment communication, the sender needs to encode the original data according to a specific communication protocol, and the receiver needs to decode it according to the same communication protocol.

[0003] In the current mainstream distributed power generation network, with the rapid increase in the types and number of power equipment, the communication protocols of the power system are becoming more and more diversified, such as the common MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, SV and other communication protocols. In order to ensure the interoperability between power equipment in multi-protocol scenarios, power equipment manufacturers have adopted two design schemes. One is to directly add corresponding communication software interfaces to terminal power equipment, and the other is to add additional communication protocol conversion devices. Although the two schemes differ in hardware network topology, both require corresponding communication interfaces to implement the encoding and decoding of the above-mentioned different communication protocols. Implementing the encoding and decoding of various communication protocols through software interfaces is cumbersome and error-prone, and is not easy to read and communicate. Even if an open source encoding and decoding code library is used, it is not easy to expand. In order to continuously and quickly integrate new or improved communication protocols into the existing power system, there is a need for a unified communication protocol standard or an effective general communication protocol conversion solution that covers communication technology and application data. The former includes rigid standards such as IEC60870-5-103 and IEC61850, while the latter mostly uses abstract syntax notation (such as Abstract Syntax Notation One, ASN) as the encoding and decoding conversion medium.

[0004] An existing method and system for universal decoding and display of CMS messages based on data script definition automatically generates data encoding and decoding rules in the system by reading the data script definition file describing the data structure, and performs semantic parsing based on the decoder generated after receiving the protocol message. This solution uses the decoder generated by ASN.1 to realize message decoding. For the power system, the data protocol of its communication is no longer limited to a single protocol. Customized codecs can no longer meet the current power system's encoding and decoding needs for MMS, Modbus, IEC101, IEC103, IEC104, Goose, SV and other communications.

[0005] Another transcoding implementation method and device, when processing communication data, first transcodes the received data with ASN.1 data structure to convert it into intermediate data with a general object structure; after completing the operation processing of the intermediate data, the intermediate data obtained after the operation processing is converted into data with ASN.1 data structure and sent to the next level. In the power system, the relevant communication protocols do not directly use the ASN.1 data format for communication. At the same time, there are communication protocols with a high degree of compatibility, such as MMS and CMS, Goose and SV, IEC101, IEC103 and IEC104. Creating a complete decoder for all protocols is not only inconvenient for maintenance and management, but also wastes a lot of storage space. Summary of the invention

[0006] The present invention provides a method, system, electronic device and medium for processing electric power messages, so as to solve the defects in the prior art that the needs of electric power equipment for encoding (decoding) multiple communication protocols cannot be met, maintenance and management are difficult, and storage space is wasted, so as to realize the functional requirements of electric power equipment for encoding (decoding) multiple communication protocols and reduce the development costs of maintenance and transplantation of encoders (decoders).

[0007] The present invention provides a method for processing a power message, which is applied to a power message receiving device, comprising: Receive a target power message sent by a power message sending device, and obtain a target message feature of the target power message; Determining a target communication protocol type corresponding to the target power message based on the target message characteristics; Determine a corresponding target decoder based on the target communication protocol type corresponding to the target power message, wherein the target decoder is one of decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; The target power message is decoded based on the target decoder to obtain decoded target semantic data.

[0008] In a possible implementation, the method further includes: The target message feature at least includes a protocol type feature; The target communication protocol type corresponding to the target power message is determined based on the protocol type characteristics.

[0009] In a possible implementation, the method further includes: Determining target communication protocol characteristics based on the target communication protocol type; The target communication protocol feature is compared with feature matching functions in decoders corresponding to a plurality of communication protocols respectively, and a target decoder that meets the target communication protocol feature is determined.

[0010] In a possible implementation, the method further includes: Extracting the encoded data in the target power message; The encoded data is decoded based on the target decoder to obtain the target semantic data.

[0011] The present invention provides a method for processing a power message, which is applied to a power message sending device, comprising: Obtain the target semantic data to be sent and the current communication protocol type; Determine a target encoder based on the current communication protocol type, wherein the target encoder is one of encoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; Encoding the target semantic data by the target encoder to obtain a target power message; The target power message is sent to the power message receiving device through the current communication protocol.

[0012] In a possible implementation, the method further includes: Encoding the target semantic data according to the data encoding requirement by the target encoder to obtain encoded target semantic data; The encoded target semantic data is encapsulated based on the current communication protocol to obtain the target power message.

[0013] In a possible implementation, the method further includes: Generate feature description files corresponding to multiple communication protocols in advance; Generate a feature matching function corresponding to each communication protocol based on the feature description file; A feature matching function corresponding to each communication protocol is added to a decoder corresponding to each communication protocol.

[0014] The present invention also provides a power message processing system, comprising a power message sending device and a power message receiving device; The power message sending device is used to obtain target semantic data to be sent and the current communication protocol type; determine a target encoder based on the current communication protocol type, wherein the target encoder is one of encoders corresponding to multiple communication protocols generated in advance according to multiple application language systems; encode the target semantic data through the target encoder to obtain a target power message; and send the target power message to the power message receiving device through the current communication protocol; The power message receiving device is used to receive a target power message sent by a power message sending device, and obtain a target message feature of the target power message; determine a target communication protocol type corresponding to the target power message based on the target message feature; determine a corresponding target decoder based on the target communication protocol type corresponding to the target power message, the target decoder being one of the decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; and decode the target power message based on the target decoder to obtain decoded target semantic data.

[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for processing power messages as described in any one of the above when executing the computer program.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for processing a power message as described in any one of the above is implemented.

[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for processing power messages.

[0018] The power message processing method, system, electronic device and medium provided by the present invention receive the target power message sent by the power message sending device and obtain the target message characteristics of the target power message; determine the target communication protocol type corresponding to the target power message based on the target message characteristics; determine the corresponding target decoder based on the target communication protocol type corresponding to the target power message, and the target decoder is one of the decoders corresponding to the multiple communication protocols generated in advance according to multiple application language systems; decode the target power message based on the target decoder to obtain the decoded target semantic data. Compared with the defects of the prior art that the power equipment cannot meet the encoding (decoding) needs of multiple communication protocols and is difficult to maintain and manage, and wastes storage space, this solution realizes the functional requirements of the power equipment for encoding (decoding) multiple communication protocols, while reducing the development costs of maintenance and transplantation of encoders (decoders). BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 It is one of the flow charts of the method for processing power messages provided by the present invention.

[0021] Figure 2 This is the second flow chart of the method for processing power messages provided by the present invention.

[0022] Figure 3 It is a schematic diagram of the encoding (decoding) flow of the application communication protocol provided by the present invention.

[0023] Figure 4 It is a schematic diagram of nested calling of the encoder (decoder) provided by the present invention.

[0024] Figure 5 It is a structural schematic diagram of the power message processing system provided by the present invention.

[0025] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0028] The purpose of the present invention is to propose a method that can meet the encoding (decoding) needs of power equipment for different communication protocols such as MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, SV, etc., while reducing the development costs of maintenance and transplantation of encoders (decoders).

[0029] Figure 1 It is one of the flow charts of the method for processing power messages provided by the present invention, such as Figure 1 As shown, the method includes the following: S11. Receive a target power message sent by a power message sending device, and obtain a target message feature of the target power message.

[0030] Embodiments of the present invention are combined Figure 3 The schematic diagram of the application communication protocol encoding (decoding) process shown is described in detail and is applied to power message receiving equipment.

[0031] First, a target power message from the power equipment is received and the target message characteristics of the target power message are obtained. These target power messages usually follow specific communication protocols, such as MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, SV, etc.

[0032] Message features include but are not limited to: Header: Contains the address information of the sender and receiver, as well as the fragment information used for fragmentation and reassembly. The header is an important part of network communication. It contains control information to guide the correct transmission and parsing of data.

[0033] Payload: The data content actually transmitted, that is, the application layer data carried by the message.

[0034] Checksum: Used to detect errors during data transmission and ensure data integrity.

[0035] Source address and destination address: Identify the IP address and port number of the sender and receiver, and determine the source and destination of the communication.

[0036] Protocol type: Identify the protocol used (such as TCP, UDP, or ICMP) to understand the nature and purpose of the communication.

[0037] Transmission path: Observe the transmission path of data packets and understand the network devices such as routers and switches that the data passes through.

[0038] Timestamp: View the timestamp of each data packet to understand the real-time and latency of communication.

[0039] Traffic characteristics: Analyze the traffic characteristics of data packets, such as data volume, rate, and duration, to evaluate network performance and bottlenecks.

[0040] Sequence number and acknowledgment number: In the TCP protocol, they are used to ensure the orderly transmission and confirmation of data.

[0041] Window size: In the TCP protocol, it is used for flow control and indicates how much data the receiver can receive.

[0042] Flag bit: In the TCP protocol, it is used to control specific functions of the TCP segment, such as SYN (synchronization sequence number) for establishing a connection and ACK (acknowledgement) for responding.

[0043] Urgent data offset: In the TCP protocol, it indicates the end position of the urgent data.

[0044] S12. Determine the target communication protocol type corresponding to the target power message based on the target message characteristics.

[0045] The target communication protocol type corresponding to the target power message is determined by analyzing and judging the above-mentioned target message characteristics.

[0046] S13. Determine a corresponding target decoder based on the target communication protocol type corresponding to the target power message, wherein the target decoder is one of decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems.

[0047] Determine the target communication protocol characteristics based on the target communication protocol type; compare the target communication protocol characteristics with the feature matching functions in the decoders corresponding to the multiple communication protocols, and determine the target decoder that meets the target communication protocol characteristics.

[0048] Specifically, after determining the type of communication protocol, the system will select the corresponding decoder to decode the message. These decoders are pre-generated based on a variety of application language systems, and each communication protocol has a corresponding decoder. For example, depending on the application language system, you can choose to generate a corresponding decoder for each communication protocol through tools such as asn1c and asn1bean (abstract syntax notation). In an embodiment of the present invention, decoders for MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, and SV are created based on C programs and JAVA programs.

[0049] When the power equipment receives the power message, it first detects whether it meets the corresponding communication protocol characteristics based on the feature matching function of each decoder. If it meets the characteristics, the corresponding decoder is directly selected for decoding. If it does not meet the feature matching function, the general feature matching function is used to detect the communication protocol type. Furthermore, if it is detected that the network message is a general message such as Modbus, the corresponding decoder is used for decoding. Otherwise, it is prompted that the network message has no decoding module.

[0050] S14. Decode the target power message based on the target decoder to obtain decoded target semantic data.

[0051] Decode the power message using the selected decoder. The decoding process involves converting the binary data of the message into readable information, such as status information, measurement values, etc. The decoder will parse the various parts of the message, including the control field, address field, and link user data, according to the specific rules of the protocol to extract useful information.

[0052] Specifically, the encoded data in the target power message is extracted; the encoded data is decoded based on the target decoder to obtain the target semantic data.

[0053] The method for processing electric power messages provided by the present invention receives a target electric power message sent by an electric power message sending device, and obtains the target message characteristics of the target electric power message; determines the target communication protocol type corresponding to the target electric power message based on the target message characteristics; determines the corresponding target decoder based on the target communication protocol type corresponding to the target electric power message, and the target decoder is one of the decoders corresponding to the multiple communication protocols generated in advance according to multiple application language systems; decodes the target electric power message based on the target decoder to obtain the decoded target semantic data. Compared with the defects of the prior art that the power equipment cannot meet the encoding (decoding) needs of multiple communication protocols, is difficult to maintain and manage, and wastes storage space, this method can meet the functional requirements of the power equipment for encoding (decoding) different communication protocols such as MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, SV, etc.; the encoder (decoder) is generated by tools such as asn1c and asn1bean, which is more convenient to transplant and has higher stability than the direct implementation of traditional code.

[0054] Figure 2 FIG. 2 is a flow chart of a method for processing electric power messages provided by the present invention. Figure 2 As shown, the method includes the following: S21. Obtain target semantic data to be sent and the current communication protocol type.

[0055] Embodiments of the present invention are combined Figure 3 The schematic diagram of the application communication protocol encoding (decoding) process shown is described in detail and is applied to power message sending equipment.

[0056] First, the target semantic data to be sent is obtained, which contains specific information to be transmitted, such as control commands, status information, measurement values, etc. At the same time, the system also needs to know the type of communication protocol currently used, such as MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, SV, etc. This information will guide the subsequent encoding and packaging process.

[0057] S22. Determine a target encoder based on the current communication protocol type, wherein the target encoder is one of encoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems.

[0058] After determining the type of the current communication protocol, the system will select a corresponding target encoder. The target encoder is pre-generated based on a variety of communication protocols, each of which has its own specific encoding rules. For example, if the current communication protocol is IEC 60870-5-104, the system will select the corresponding 104 protocol encoder to process the semantic data.

[0059] Optionally, pre-generate feature description files corresponding to multiple communication protocols, such as MMS, CMS, Modbus, IEC101, IEC103, IEC104, Goose, SV, etc.; generate corresponding feature matching functions based on the feature description files; add the feature matching function corresponding to each communication protocol to the decoder corresponding to each communication protocol.

[0060] Specifically, when generating an encoder and decoder for the same communication protocol, only one ASN file is needed to describe the encoding format of the semantic data of the communication protocol. For example, when describing the CMS communication protocol, part of the ASN file is as follows, which defines in detail the required parameters and encoding format of the TimeActivatedOperateTermination operation command in the CMS protocol:

[0061] In the power communication system, it is common for a communication channel to use multiple application communication protocols, and a single power device will simultaneously receive network messages of these different protocols. Therefore, in addition to the semantic data encoding format in the ASN file describing the communication protocol, additional protocol descriptions are also required to match the characteristics of network messages and protocols, thereby realizing automatic classification of application communication protocols.

[0062] In order to realize the automatic classification of application communication protocols, the present invention adds a feature description file PCR (Protocol Check Rec) of the communication protocol in the network message. For example, in describing the Goose protocol, the feature information of the Goose message can be set in the PCR file as the MAC address 01-0C-CD-01-00-00~01-0C-CD-01-01-ff. When generating the encoder (decoder), the corresponding feature matching function is generated and added to the decoder. The example is as follows:

[0063] When designing ASN files, due to the compatibility between various application protocols, for compatible protocols that comply with multiple application protocols, you can choose to treat it as an independent compatible protocol and design the corresponding ASN file. The ASN file of the application protocol does not need to define the details of the compatible protocol in detail, but only needs to nest the ASN files containing these independent compatible protocols. At the same time, during the encoding (decoding) process, if it is necessary to process these compatible coded (semantic) data, the encoder (decoder) of the compatible protocol is nested. Furthermore, in order to reduce the degree of coupling between independent compatible protocols, such as Figure 4 As shown, independent compatible protocol encoders (decoders) can nestedly call other independent compatible protocol encoders (decoders).

[0064] The embodiment of the present invention defines the semantic data encoding format of the communication protocol through an ASN (Abstract Language Description) file, which not only facilitates the reading and communication of the communication protocol format, but also greatly reduces the transplantation cost of the communication protocol in different programming language systems.

[0065] Combined with the characteristics of the power communication protocol, each application communication protocol has compatible parts. If a complete codec is designed for all application communication protocols, it is not convenient to maintain and manage these compatible parts. In view of this situation, the present invention makes the compatible protocol part in the application communication protocol independent, and multiple application communication protocols can use a common compatible codec to encode and decode part of the data, thereby reducing the maintenance cost and difficulty of the codec.

[0066] Furthermore, in order to further reduce the degree of coupling between various codecs, it is allowed to continue to nest compatible protocols in compatible protocols, and it is also allowed to nest calls of related codecs.

[0067] S23. Encode the target semantic data according to data encoding requirements through the target encoder to obtain encoded target semantic data.

[0068] Use the selected target encoder to convert the target semantic data into encoded data that conforms to the format of a specific communication protocol. This process may include packaging the data into frames, adding necessary control fields, calculating checksums, etc. The encoding process ensures that the data can be correctly transmitted in the network and can be correctly parsed by the target power device.

[0069] S24. Encapsulate the encoded target semantic data based on the current communication protocol to obtain the target power message.

[0070] After the encoding is completed, the system encapsulates the encoded data into a complete target power message. This includes adding a message header, address information, length information, etc. to meet the requirements of the current communication protocol. The encapsulation process ensures the integrity and correctness of the message during transmission.

[0071] S25. Send the target power message to the power message receiving device through the current communication protocol.

[0072] The encapsulated target power message is sent to the target power device through the current communication protocol. This process may involve network transmission, serialization and deserialization of the message, and ensuring that the message is sent in the timing and format required by the protocol. After the sending is completed, the system may also need to wait for the response or confirmation of the target power device to ensure the successful transmission and processing of the message.

[0073] The method for processing electric power messages provided by the present invention obtains the target semantic data to be sent and the current communication protocol type; determines the target encoder based on the current communication protocol type, wherein the target encoder is one of the encoders corresponding to the multiple communication protocols generated in advance according to multiple application language systems; encodes the target semantic data by the target encoder to obtain the target electric power message; and sends the target electric power message to the electric power message receiving device through the current communication protocol. Compared with the defects of the prior art that the power equipment cannot meet the encoding (decoding) needs of multiple communication protocols, is difficult to maintain and manage, and wastes storage space, this method uses the ASN file as the description file of the application communication protocol encoding format, which facilitates the reading and communication of the application communication format; allows the ASN file and the corresponding encoder (decoder) to be nested and called, and reduces the maintenance cost of the encoder (decoder) of the compatible part in the application communication protocol.

[0074] The power message processing system provided by the present invention is described below. The power message processing system described below and the power message processing method described above can be referred to each other.

[0075] Figure 5 It is a structural schematic diagram of a power message processing system provided by the present invention, which specifically includes: A power message sending device 501 and a power message receiving device 502; The power message sending device 501 is used to obtain the target semantic data to be sent and the current communication protocol type; determine the target encoder based on the current communication protocol type, and the target encoder is one of the encoders corresponding to the multiple communication protocols generated in advance according to multiple application language systems; encode the target semantic data through the target encoder to obtain the target power message; and send the target power message to the power message receiving device through the current communication protocol. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.

[0076] The power message receiving device 502 is used to receive the target power message sent by the power message sending device, and obtain the target message characteristics of the target power message; determine the target communication protocol type corresponding to the target power message based on the target message characteristics; determine the corresponding target decoder based on the target communication protocol type corresponding to the target power message, and the target decoder is one of the decoders corresponding to multiple communication protocols generated in advance according to multiple application language systems; decode the target power message based on the target decoder to obtain the decoded target semantic data. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.

[0077] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the power message processing method, which includes: receiving a target power message sent by a power message sending device, and obtaining a target message feature of the target power message; determining a target communication protocol type corresponding to the target power message based on the target message feature; determining a corresponding target decoder based on the target communication protocol type corresponding to the target power message, wherein the target decoder is one of the decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; decoding the target power message based on the target decoder to obtain decoded target semantic data. Acquire target semantic data to be sent and the current communication protocol type; determine a target encoder based on the current communication protocol type, wherein the target encoder is one of encoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; encode the target semantic data through the target encoder.

[0078] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0079] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the power message processing method provided by the above methods, the method comprising: receiving a target power message sent by a power message sending device, and obtaining a target message feature of the target power message; determining a target communication protocol type corresponding to the target power message based on the target message feature; determining a corresponding target decoder based on the target communication protocol type corresponding to the target power message, the target decoder is one of the decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; decoding the target power message based on the target decoder to obtain decoded target semantic data. Obtain the target semantic data to be sent and the current communication protocol type; determine a target encoder based on the current communication protocol type, the target encoder is one of the encoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; encode the target semantic data by the target encoder.

[0080] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to execute the power message processing method provided by the above methods, the method comprising: receiving a target power message sent by a power message sending device, and obtaining the target message characteristics of the target power message; determining the target communication protocol type corresponding to the target power message based on the target message characteristics; determining the corresponding target decoder based on the target communication protocol type corresponding to the target power message, the target decoder is one of the decoders corresponding to the multiple communication protocols generated in advance according to multiple application language systems; decoding the target power message based on the target decoder to obtain the decoded target semantic data. Obtain the target semantic data to be sent and the current communication protocol type; determine the target encoder based on the current communication protocol type, the target encoder is one of the encoders corresponding to the multiple communication protocols generated in advance according to multiple application language systems; encode the target semantic data through the target encoder.

[0081] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing electric power messages, applied to an electric power message receiving device, characterized in that: include: Receive a target power message sent by a power message sending device, and obtain a target message feature of the target power message; Determining a target communication protocol type corresponding to the target power message based on the target message characteristics; Determine a corresponding target decoder based on the target communication protocol type corresponding to the target power message, wherein the target decoder is one of decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; The target power message is decoded based on the target decoder to obtain decoded target semantic data.

2. The method according to claim 1, characterized in that The target message feature at least includes a protocol type feature; The determining the target communication protocol type corresponding to the target power message based on the target message feature includes: The target communication protocol type corresponding to the target power message is determined based on the protocol type characteristics.

3. The method according to claim 2, characterized in that The determining a corresponding target decoder based on a target communication protocol type corresponding to the target power message includes: Determining target communication protocol characteristics based on the target communication protocol type; The target communication protocol feature is compared with feature matching functions in decoders corresponding to a plurality of communication protocols respectively, and a target decoder that meets the target communication protocol feature is determined.

4. The method according to claim 3, characterized in that The step of decoding the target power message based on the target decoder to obtain decoded target semantic data includes: Extracting the encoded data in the target power message; The encoded data is decoded based on the target decoder to obtain the target semantic data.

5. A method for processing electric power messages, applied to electric power message sending equipment, characterized in that: include: Obtain the target semantic data to be sent and the current communication protocol type; Determine a target encoder based on the current communication protocol type, wherein the target encoder is one of encoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; Encoding the target semantic data by the target encoder to obtain a target power message; The target power message is sent to the power message receiving device through the current communication protocol.

6. The method according to claim 5, characterized in that The step of encoding the target semantic data by the target encoder to obtain a target power message includes: Encoding the target semantic data according to the data encoding requirement by the target encoder to obtain encoded target semantic data; The encoded target semantic data is encapsulated based on the current communication protocol to obtain the target power message.

7. The method according to claim 5, characterized in that The method further comprises: Generate feature description files corresponding to multiple communication protocols in advance; Generate a feature matching function corresponding to each communication protocol based on the feature description file; A feature matching function corresponding to each communication protocol is added to a decoder corresponding to each communication protocol.

8. A power message processing system, characterized in that: It includes a power message sending device and a power message receiving device; The power message sending device is used to obtain target semantic data to be sent and the current communication protocol type; determine a target encoder based on the current communication protocol type, wherein the target encoder is one of encoders corresponding to multiple communication protocols generated in advance according to multiple application language systems; encode the target semantic data through the target encoder to obtain a target power message; and send the target power message to the power message receiving device through the current communication protocol; The power message receiving device is used to receive a target power message sent by a power message sending device, and obtain target message characteristics of the target power message, wherein the target message characteristics at least include protocol type characteristics; determine the type of target communication protocol corresponding to the target power message based on the target message characteristics; determine the corresponding target decoder based on the type of target communication protocol corresponding to the target power message, wherein the target decoder is one of the decoders corresponding to a plurality of communication protocols generated in advance according to a plurality of application language systems; and decode the target power message based on the target decoder to obtain decoded target semantic data.

9. The system according to claim 8, characterized in that The power message sending device is also used to encode the target semantic data according to the data encoding requirements through the target encoder to obtain the encoded target semantic data; and encapsulate the encoded target semantic data based on the current communication protocol to obtain the target power message.

10. The system according to claim 8, characterized in that The power message sending device is also used to pre-generate feature description files corresponding to multiple communication protocols; generate feature matching functions corresponding to each communication protocol based on the feature description files; and add the feature matching functions corresponding to each communication protocol to the decoder corresponding to each communication protocol.

11. The system according to claim 8, characterized in that The power message receiving device is further used to determine the target communication protocol type corresponding to the target power message based on the protocol type characteristics.

12. The system according to claim 11, characterized in that The power message receiving device is further used to determine the target communication protocol characteristics based on the target communication protocol type; The target communication protocol feature is compared with feature matching functions in decoders corresponding to a plurality of communication protocols respectively, and a target decoder that meets the target communication protocol feature is determined.

13. The system according to claim 12, characterized in that The power message receiving device is also used to extract the encoded data in the target power message; decode the encoded data based on the target decoder to obtain the target semantic data.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for processing the power message according to any one of claims 1 to 7 is implemented.

15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing power messages according to any one of claims 1 to 7 is implemented.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for processing power messages according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, system and apparatus for generating source code from table and using the same

    CN109992253A

  • Automatic distributed unified link device and use method thereof

    CN117097724A

  • Communication processing method and device, computer equipment and readable storage medium

    CN117579719A

  • Multi-layered application classification and decoding

    US8112800B1