CN113347152A - Method for converting and transmitting communication message between Ethernet format and E1 format - Google Patents

Method for converting and transmitting communication message between Ethernet format and E1 format Download PDF

Info

Publication number
CN113347152A
CN113347152A CN202110493650.4A CN202110493650A CN113347152A CN 113347152 A CN113347152 A CN 113347152A CN 202110493650 A CN202110493650 A CN 202110493650A CN 113347152 A CN113347152 A CN 113347152A
Authority
CN
China
Prior art keywords
communication message
format
communication
conversion device
protocol conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110493650.4A
Other languages
Chinese (zh)
Inventor
孔凡坊
游亦强
邓潘
周泰斌
杨剑友
吴佳毅
潘益伟
周芳
屠德然
张品信
王瑞
刘尚孟
钟薇薇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Zhejiang Electric Power Co Ltd
Wenzhou Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Power Construction of Wenzhou
Original Assignee
State Grid Zhejiang Electric Power Co Ltd
Wenzhou Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Power Construction of Wenzhou
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Zhejiang Electric Power Co Ltd, Wenzhou Power Supply Co of State Grid Zhejiang Electric Power Co Ltd, Power Construction of Wenzhou filed Critical State Grid Zhejiang Electric Power Co Ltd
Priority to CN202110493650.4A priority Critical patent/CN113347152A/en
Publication of CN113347152A publication Critical patent/CN113347152A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The invention discloses a method for converting and receiving communication messages between an Ethernet format and an E1 format, which comprises the steps of setting an RJ45 electric port for receiving and transmitting the Ethernet format communication messages, setting an E1 interface for receiving and transmitting the E1 format communication messages, sequentially judging and verifying the communication messages after the RJ45 electric port receives the Ethernet format communication messages, then coding the judged and verified communication messages to obtain the E1 format communication messages, and transmitting the E1 messages through the E1 interface. After receiving the communication message in the E1 format, the E1 interface decodes the communication message to obtain an Ethernet-type communication message, then checks the Ethernet-type communication message, and finally sends the Ethernet-type communication message through the RJ45 electric interface. The invention realizes the conversion and the receiving of the communication message between the Ethernet format and the E1 format, and provides effective technical support for realizing the virtual simulation test aiming at the safety and stability control system.

Description

Method for converting and transmitting communication message between Ethernet format and E1 format
Technical Field
The invention belongs to the field of information transmission of power equipment, and particularly relates to a method for converting and receiving a communication message between an Ethernet format and an E1 format.
Background
As a second defense line of the power system, the safety and stability control system is a system formed by the communication of two or more safety and stability control devices of a power plant and a transformer substation through communication equipment. The system is generally divided into a stable control main station, a stable control substation, a stable control execution station and the like, wherein the stable control plant station realizes the transmission of tide, operation state and element fault information of a plurality of elements in the system through an electric power communication network, and when a power grid has a serious fault, centralized or scattered load shedding and load shedding measures are taken to ensure the safe and stable operation of the power system. The stability control system needs to perform factory test, installation, debugging test and later maintenance test to ensure stable operation of the stability control system, but stability control equipment in the stability control system is wide in distribution region, multiple in stations and complex and changeable in control strategy, a mode of testing the stability control equipment in the stability control system in the prior art is mainly to test a tester through manual work, and more test items result in more required professional operators and long test time, and effective test cannot be performed due to the fact that part of the test items cannot obtain millimeter-level synchronization.
The virtual simulation test technology which is raised in various fields at present is gradually applied, one-key type and automatic test can be realized through the virtual simulation technology, and a prospect is opened up for solving the technical problems. However, particularly in the case of a safety and stability control system, data interaction is required between the stability control device and the virtual simulation device, and ethernet-type communication packets (packets containing test item data) received and transmitted by the virtual simulation device and E1-type communication packets received and transmitted by the stability control device in the prior art cannot be converted into each other (where the E1-type communication packets refer to that the communication packets can satisfy the transmission of the E1 communication protocol between the communication devices, and the ethernet-type communication packets refer to that the communication packets can satisfy the transmission of the TCP/IP protocol between the communication devices), so that corresponding communication packets cannot be received and transmitted between the stability control device and the virtual simulation device, and thus data interaction cannot be performed.
Disclosure of Invention
The invention aims to provide a method for converting and receiving communication messages between an Ethernet format and an E1 format, which can effectively solve the problem that the virtual simulation equipment and the stability control equipment in the prior art cannot convert and receive the communication messages mutually so as to finally realize the virtual simulation test aiming at a safety and stability control system.
In order to solve the technical problems, the invention adopts the following technical scheme: the method for converting and transmitting the communication message between the Ethernet format and the E1 format comprises a method for receiving the Ethernet format communication message and converting and sending out the E1 format communication message and a method for receiving the E1 format communication message and converting and sending out the Ethernet format communication message;
the method for receiving the communication message in the Ethernet format and converting and sending the communication message in the E1 format comprises the following steps:
s100: using a protocol conversion device to obtain and receive the Ethernet type communication message through an RJ45 electrical port;
s200: the protocol conversion device judges whether the transmission mode of the communication message is the same as the transmission mode set by the protocol conversion device, and the protocol conversion device judges whether the destination address in the communication message is the same as the dial address in the dial information of the protocol conversion device;
s300: when the transmission mode of the communication message is the same as the transmission mode set by the protocol conversion device, and the destination address in the communication message is also the same as the dial address in the dial information of the protocol conversion device, executing the step S400, otherwise, abandoning the communication message;
s400: the protocol conversion device accumulates the communication messages, performs CRC16 verification and CRC32 verification, extracts communication data from the communication messages passing the verification, stores the communication data into an RAM memory of the protocol conversion device, generates new events, adds the new events into a queue to be sent of an FIFO memory of the protocol conversion device, queues the new events in the queue to be sent, and discards the communication messages not passing the verification;
s500: the protocol conversion device reads a queue to be sent in the FIFO memory according to the sequence according to the frequency of 0.6k (1.667 ms/frame), extracts corresponding communication messages in the RAM memory in sequence according to the initial address of the communication message in an event in the RAM memory, codes the extracted communication messages to obtain the communication message in the E1 format, and then sends the communication message in the E1 format through an E1 interface;
the method for receiving the communication message in the E1 format and converting and sending the communication message in the Ethernet format comprises the following steps:
s600: the protocol conversion device decodes the communication message in the E1 format received by the E1 interface to obtain the communication message in the Ethernet format;
s700: the protocol conversion device adds a frame head identifier and a frame tail identifier (0x7e) to the communication message according to a transmission mode set by the protocol conversion device, then the protocol conversion device accumulates, checks CRC16 and checks CRC32 the communication message, the communication message passing the check is temporarily stored in the RAM memory, meanwhile, the total frame number, the frame length and the cycle number in the RAM memory are updated, and the communication message not passing the check is discarded;
s800: the protocol conversion device generates three kinds of information at intervals of t, the three kinds of information comprise enabling signals, the initial address of a communication message in an RAM memory and the byte length of the communication message, and the protocol conversion device extracts the corresponding communication message from the RAM memory according to the three kinds of information;
s900: the protocol conversion device adds a destination address, a source address, a message type and a communication message length to the extracted communication message, judges whether the communication message length is greater than or equal to 44 bytes, performs CRC32 verification on the communication message when the communication message length is greater than or equal to 44 bytes, sends the Ethernet-type communication message through the RJ45 electric port after the verification is passed, and discards the communication message which cannot be verified; and when the length of the communication message is less than 44 bytes, filling the communication message at the frame tail of the communication message until the length is 44 bytes, then carrying out CRC32 verification on the filled communication message, sending the Ethernet-type communication message through the RJ45 electric port after the verification is passed, and discarding the communication message which cannot be verified.
Preferably, in step S500, the protocol conversion device encodes the extracted communication packet to obtain a communication packet in an E1 format, including the following steps:
s510: the protocol conversion device performs CRC16 verification on the communication message to be sent, executes the step S520 on the communication message passing the verification, and discards the communication message failing the verification at the same time;
s520: the protocol conversion device converts the byte state of the communication message into the bit state, and sequentially performs HDLC coding, 1B4B coding and HDB3 coding on the communication message in the bit state to obtain the communication message in the E1 format.
Preferably, in step S600, the decoding, by the protocol conversion device, the communication packet in the E1 format received through the E1 interface includes the following specific steps:
s610: the protocol conversion device sequentially performs HDB3 decoding, 4B1B decoding and HDLC decoding on the communication message in the E1 format;
s620: the protocol conversion device converts the decoded communication message from a bit state to a byte state to obtain an ethernet-type communication message, and then performs CRC16 verification on the ethernet-type communication message, and executes step S700 on the communication message passing the verification, and discards the communication message failing the verification.
Preferably, in step S200, the dial information includes a transmission mode and a dial address, the dial information is a binary code, the binary code has eight bits, the first bit and the second bit of the binary code are used for setting the transmission mode, and the third bit to the eighth bit of the binary code are used for setting the dial address.
Preferably, in step S400, the queue to be sent includes at least one queued event, where the event includes a starting address of the communication packet in the RAM memory.
Preferably, in step S500, when there is no queued event in the queue to be sent, the communication packet corresponding to the last event sent is repeatedly sent.
Preferably, in step S800, the time t is 10 ms.
Preferably, in step S900, the destination address and the source address are both determined by a dial address in dial information of the protocol conversion device.
Preferably, in step S900, the filling at the end of the frame of the communication packet includes the following specific steps: and adding 0 at the tail of the communication message until the filled communication message reaches 44 bytes.
Preferably, the protocol conversion device includes an RJ45 electrical port, a PHY (physical layer), a control module, an E1 conversion module, and an E1 interface, which are connected in sequence, the control module is further connected with an FIFO memory, an RAM memory, a dial switch, and a power supply module, the RAM memory includes a first RAM memory and a second RAM memory, where:
the RJ45 electric port is used for receiving and sending Ethernet type communication messages;
the E1 interface is used for receiving and sending communication messages in an E1 format;
the control module is used for receiving a communication message sent by an E1 conversion module or a PHY (physical layer), and executing corresponding operation according to a transmission mode set by the dial switch;
the PHY (physical layer) is used for converting the communication message received by the RJ45 electric port and sending the converted message to the control module, or receiving and converting the communication message sent by the control module and then sending the converted message through the RJ45 electric port;
the E1 conversion module is used for decoding the communication message received through the E1 interface and sending the communication message to the control module, or receiving the communication message sent by the control module, coding the communication message and sending the coded communication message through the E1 interface;
the FIFO memory is used for generating corresponding events according to the storage sequence of the first storage module and adding the events into a queue to be sent for the control module to call;
the first RAM memory is used for storing communication messages received by the control module and sent by a PHY (physical layer);
the second RAM memory is used for storing the communication message received by the control module and sent by the E1 conversion module;
the dial switch is used for setting dial information, and the dial information comprises a transmission mode and a dial address;
the power module is used for supplying power to the protocol conversion device.
Compared with the prior art, the invention has the following beneficial effects: the RJ45 electric port is used for receiving and sending Ethernet type communication messages, the E1 interface is used for receiving and sending E1 format communication messages, the RJ45 electric port sequentially judges and verifies the communication messages after receiving the Ethernet type communication messages, then the communication messages which are judged and verified are encoded to obtain the E1 format communication messages, the conversion of the Ethernet type communication messages to the E1 format communication messages is achieved, and then the E1 format communication messages are sent out through the E1 interface. The E1 interface decodes the communication message after receiving the E1 format communication message, obtains the Ethernet format communication message, realizes the conversion from the E1 format communication message to the Ethernet format communication message, then checks the Ethernet format communication message, then ensures the communication message length equal to or larger than 44 bytes by filling bytes for the checked communication message to accord with the receiving and sending regulation, and then sends the Ethernet format communication message through the RJ45 electric port. The invention realizes the conversion and the receiving of the communication message between the Ethernet format and the E1 format, so that the virtual simulation equipment and the stability control equipment can mutually convert and receive the communication message, further data interaction can be carried out, and effective technical support is provided for realizing the virtual simulation test aiming at the safety and stability control system.
Drawings
FIG. 1 is a flow chart of the present invention for receiving and converting an Ethernet format communication message and sending out an E1 format communication message;
FIG. 2 is a flow chart of the present invention for receiving a communication message in E1 format and converting the communication message into an Ethernet format;
FIG. 3 is a schematic diagram of a protocol conversion apparatus according to the present invention;
fig. 4 is a schematic diagram of implementing communication message conversion transceiving between two stable control stations by applying the present invention.
The system comprises a virtual simulation test device 1, a protocol conversion device 2, an RJ45 power port 20, a PHY (physical layer) 21, a control module 22, an E1 conversion module 24, an E1 interface 25, an FIFO memory 26, an RAM memory 261, a first RAM memory 262, a second RAM memory 27, a dial switch 28, a power module 3, an A stable control station 30, an A stable control station host, an A stable control station submachine 4, a B stable control station host, a B stable control station submachine 41, a switch 5, a power dispatching data network 6 and a photoelectric conversion device 7.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the device or element so referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be considered as limiting the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Unless expressly stated or limited otherwise, the terms "mounted," "connected," "secured," and the like are intended to be inclusive and mean that they may be fixedly connected, detachably connected, or integrally formed; may be mechanically coupled, may be electrically coupled or may be in communication with each other; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Example (b): as shown in fig. 1, fig. 2 and fig. 3, the method for converting and sending the communication packet between the ethernet format and the E1 format provided in this embodiment includes a method for receiving the ethernet format communication packet and converting and sending out the E1 format communication packet and a method for receiving the E1 format communication packet and converting and sending out the ethernet format communication packet;
as shown in fig. 1, the method for receiving and converting the ethernet format communication packet and sending out the E1 format communication packet includes the following steps:
s100: using the protocol conversion device 2 to obtain and receive the Ethernet type communication message through the RJ45 electrical port 20;
s200: the protocol conversion device 2 judges whether the transmission mode of the communication message is the same as the transmission mode set by the protocol conversion device 2, and the protocol conversion device 2 judges whether the destination address in the communication message is the same as the dial address in the dial information of the protocol conversion device 2; specifically, the dial information includes a transmission mode and a dial address, the dial information is a binary code, the binary code has eight bits in total, the first bit and the second bit of the binary code are used for setting the transmission mode, and the third bit to the eighth bit of the binary code are used for setting the dial address.
S300: when the transmission mode of the communication message is the same as the transmission mode set by the protocol conversion device 2 itself, and the destination address in the communication message is also the same as the dial address in the dial information of the protocol conversion device 2, executing the step S400, otherwise, discarding the communication message;
s400: the protocol conversion device 2 accumulates the communication messages, performs CRC16 verification and CRC32 verification, extracts communication data from the communication messages passing the verification, stores the communication data into the RAM memory 26 of the protocol conversion device 2, generates new events, adds the new events into a queue to be sent of the FIFO memory 25 of the protocol conversion device 2, queues the new events, and discards the communication messages not passing the verification; specifically, the queue to be sent includes at least one queued event, and the event includes the start address of the communication packet in the RAM memory 26.
S500: the protocol conversion device 2 reads the queue to be sent in the FIFO memory 25 according to the sequence at the frequency of 0.6k (1.667 ms/frame), sequentially extracts corresponding communication messages in the RAM memory 26 according to the initial address of the communication message in the event in the RAM memory 26, wherein when there is no queued event in the queue to be sent, the communication message corresponding to the last sent event is repeatedly sent, and the protocol conversion device 2 encodes the extracted communication message to obtain a communication message in the format of E1, and then sends the communication message in the format of E1 through the E1 interface 24. Specifically, the protocol conversion device 2 encodes the extracted communication packet to obtain the communication packet in the E1 format, including the following steps:
s510: the protocol conversion device 2 performs CRC16 verification on the communication message to be sent, executes step S520 on the communication message passing the verification, and discards the communication message failing the verification at the same time;
s520: the protocol conversion device 2 converts the communication message from the byte state to the bit state, and sequentially performs HDLC encoding, 1B4B encoding and HDB3 encoding on the communication message in the bit state to obtain the communication message in the E1 format.
And when no queued event exists in the queue to be sent, repeatedly sending the communication message corresponding to the last event to be sent.
As shown in fig. 2, the method for receiving the communication message in E1 format and converting the communication message in ethernet format includes the following steps:
s600: the protocol conversion device 2 decodes the communication message in the E1 format received through the E1 interface 24 to obtain the communication message in the Ethernet format; specifically, the decoding of the E1 format communication packet received via the E1 interface 24 by the protocol conversion device 2 includes the following specific steps:
s610: the protocol conversion device 2 sequentially performs HDB3 decoding, 4B1B decoding and HDLC decoding on the communication message in the E1 format;
s620: the protocol conversion device 2 converts the decoded communication message from a bit state to a byte state to obtain an ethernet communication message, and the protocol conversion device 2 performs CRC16 check on the ethernet communication message, and executes step S700 on the communication message passing the check, and discards the communication message failing the check.
S700: the protocol conversion device 2 adds a frame head identifier and a frame tail identifier (0x7e) to the communication message according to the transmission mode set by the protocol conversion device 2, then the protocol conversion device 2 accumulates, checks CRC16 and checks CRC32 to the communication message, the communication message passing the check is temporarily stored in the RAM memory 26, meanwhile, the total frame number, the frame length and the cycle frequency in the RAM memory 26 are updated, and the communication message not passing the check is discarded;
s800: the protocol conversion device 2 generates three kinds of information at an interval t, the time t is 10ms, the three kinds of information comprise an enabling signal, an initial address of a communication message in the RAM memory 26 and the byte length of the communication message, and the protocol conversion device 2 extracts the corresponding communication message from the RAM memory 26 according to the three kinds of information;
s900: the protocol conversion device 2 adds a destination address, a source address, a message type and a communication message length to the extracted communication message, judges whether the communication message length is greater than or equal to 44 bytes, performs CRC32 verification on the communication message when the communication message length is greater than or equal to 44 bytes, transmits the Ethernet-type communication message through the RJ45 electric port 20 after the verification is passed, and discards the communication message which is not passed through the verification; and when the length of the communication message is less than 44 bytes, filling the communication message at the frame tail of the communication message until the length is 44 bytes, then carrying out CRC32 verification on the filled communication message, sending the Ethernet-type communication message by the RJ45 electric port 20 after the verification is passed, and discarding the communication message which cannot be verified. Wherein the destination address and the source address are both determined by the dial address in the dial information of the protocol conversion device 2. In addition, the filling at the end of the frame of the communication message comprises the following specific steps: and adding 0 at the tail of the communication message until the filled communication message reaches 44 bytes.
The invention sets RJ45 electric port 20 for receiving and transmitting Ethernet type communication message, sets E1 interface 24 for receiving and transmitting E1 format communication message, RJ45 electric port 20 receives Ethernet type communication message and then judges and checks the communication message in turn, then codes the judged and checked communication message to obtain E1 format communication message, realizes the conversion of Ethernet type communication message to E1 format communication message, then sends E1 format communication message through E1 interface 24. The E1 interface 24 decodes the communication message after receiving the communication message in the E1 format, obtains the communication message in the ethernet format, realizes the conversion from the communication message in the E1 format to the communication message in the ethernet format, verifies the communication message in the ethernet format, then ensures that the length of the communication message passing the verification is equal to or greater than 44 bytes in a byte filling manner to meet the receiving and sending regulation, and sends the communication message in the ethernet format through the RJ45 electrical port 20. The invention realizes the conversion and the receiving of the communication message between the Ethernet format and the E1 format, so that the virtual simulation equipment and the stability control equipment can mutually convert and receive the communication message, further data interaction can be carried out, and effective technical support is provided for realizing the virtual simulation test aiming at the safety and stability control system.
As shown in fig. 3, the protocol conversion apparatus 2 in this embodiment includes an RJ45 electrical port 20, a PHY (physical layer) 21, a control module 22, an E1 conversion module 23, and an E1 interface 24, which are connected in sequence, the control module 22 is further connected with a FIFO memory 25, a RAM memory 26, a dial switch 27, and a power module 28, the RAM memory 26 includes a first RAM memory 261 and a second RAM memory 262, where: the RJ45 electric port 20 is used for receiving and sending Ethernet type communication messages; the E1 interface 24 is used for receiving and sending communication messages in E1 format; the control module 22 is configured to receive a communication packet sent by the E1 conversion module 23 or the PHY (physical layer) 21, and execute a corresponding operation according to a transmission mode set by the dial switch 27; the PHY (physical layer) 21 is configured to convert the communication packet received through the RJ45 electrical port 20 and send the converted communication packet to the control module 22, or receive and convert the communication packet sent by the control module 22 and send the converted communication packet through the RJ45 electrical port 20; the E1 conversion module 23 is configured to decode the communication packet received through the E1 interface 24 and send the decoded communication packet to the control module 22, or receive the communication packet sent by the control module 22 and send the encoded communication packet through the E1 interface 24; the FIFO memory 25 is used for generating corresponding events according to the storage sequence of the first storage module and adding the events into the queue to be sent for the control module 22 to call; the first RAM memory 261 is configured to store a communication packet received by the control module 22 and sent by the PHY (physical layer) 21; the second RAM memory 262 is used for storing the communication message received by the control module 22 and sent by the E1 conversion module 23; the dial switch 27 is used for setting dial information, and the dial information comprises a transmission mode and a dial address; the power module 28 is used for supplying power to the protocol conversion device 2.
The operation mechanism of the protocol conversion apparatus 2 is explained as follows:
when the control module 22 receives a communication packet sent from the PHY (physical layer) 21, it determines whether the transmission mode of the communication packet is the same as the transmission mode set by the dial switch 27 and whether the destination address of the communication packet is the same as the dial address in the dial information of the dial switch 27, and when both are the same, stores the communication packet in the first RAM memory 261, and sequentially reads the events in the transmission queue according to the events in the queue to be sent in the FIFO memory 25 and according to the frequency of 0.6K, and then sequentially extracts the corresponding communication packet from the first RAM memory 261 and sends the communication packet to the E1 conversion module 23, and after encoding the communication packet, sends the communication packet through the E1 interface 24, in which the process is that the communication packet is converted from the ethernet format to the E1 format.
The control module 22 checks the communication message sent from the PHY (physical layer) 21 after determining the transmission mode and the destination address, and stores the communication message that passes the check into the first RAM memory 261; when the verification fails, abandoning the communication message; the E1 conversion module 23 sends the communication message to the control module 22 or encodes the communication message after the communication message passes the check; and when the verification fails, discarding the communication message.
When the control module 22 receives the communication message sent from the E1 conversion module 23, the control module adds corresponding information to the communication message according to the transmission mode set by the dial switch 27, checks the communication message, temporarily stores the communication message in the second RAM memory 262, and generates three types of information, i.e., a sending enable signal, an initial address of the communication message in the second RAM memory 262, and a byte length of the communication message, at intervals of time t (t ═ 10 ms). And extracts the corresponding communication message from the second RAM memory 262 according to the three information, adds the destination address, the source address, the message type and the communication message length, and sends the message to the PHY (physical layer) 21 for transcoding and then sends the message through the RJ45 electrical port 20, wherein the process is that the communication message is converted from the E1 format to the ethernet format. The steps of adding the corresponding information to the communication packet, checking the communication packet, and temporarily storing the communication packet in the second RAM memory 262 are specifically as follows: the control module 22 adds a frame head identifier and a frame tail identifier (0x7e) to the communication message, then accumulates and verifies the communication message, temporarily stores the communication message into the second RAM memory 262 after the verification is passed, and simultaneously updates the total frame number, the frame length and the cycle number in the second RAM memory 262; and when the verification is not passed, the communication message is discarded.
The control module 22 extracts the corresponding communication message from the second RAM memory 262 according to the transmission enable signal, the initial address of the communication message in the second RAM memory 262, and the byte length information of the communication message, adds the destination address, the source address, the message type, and the length of the communication message, and simultaneously determines whether the length of the communication message is greater than or equal to 44 bytes, performs CRC32 check when the length of the communication message is greater than or equal to 44 bytes, and transmits the communication message through the PHY (physical layer) 21 and the RJ45 electrical port 20 after the check is passed; when the check is not passed, the communication message is discarded; when the length of the data is less than 44 bytes, filling the tail of the communication message to 44 bytes, then performing CRC32 verification, and when the verification is passed, transmitting the data through a PHY (physical layer) 21 and an RJ45 electric port 20; and when the verification is not passed, the communication message is discarded. The added source address and destination address are determined by the dial address in the dial information of the protocol conversion device 2.
Referring to fig. 4, the process of implementing the communication message conversion and transmission between two stable control stations by applying the present invention is described as follows:
the virtual simulation test equipment 1 is connected with a stable control station A host 30 through a protocol conversion device 2 installed on the stable control station A3, the virtual simulation test equipment 1 is connected with a temperature control station B host through another protocol conversion device 2 installed on the stable control station A3 and a power dispatching data network 6, the two protocol conversion devices 2 in the stable control station A3 all adopt the same transmission mode, and dial addresses in dial information of each protocol conversion device 2 are different, so that communication messages are ensured to be correctly received by the corresponding protocol conversion devices 2. The virtual simulation test equipment 1 sends command type communication messages with different destination addresses, and the two protocol conversion devices 2 receive the communication messages through the switch 5; the two protocol conversion devices 2 respectively detect whether the transmission mode of the communication message is the same as the transmission mode of the communication message and judge whether the destination address in the communication message is the same as the dialing address in the dialing information of the communication message, if at least one of the destination address in the communication message is different from the dialing address in the dialing information, the communication message is abandoned, and if both the destination address and the dialing information are the same, the communication message is verified; carrying out conversion coding on the communication message passing the verification; discarding the communication message which is not checked; sending out the encoded message through an E1 interface 24; the a-stability control station host 30 and the B-stability control station host 40 receive respective command type communication messages through respective photoelectric conversion devices 7, and after a test command is executed, the operation data of the a-stability control station host 30 and the B-stability control station host 40 are returned to the virtual simulation test device 1 through the same path, so that the test is completed. The principle of the A stable control station submachine 31 is the same as that of the B stable control station submachine 41, and only one data interaction with the corresponding host machine is needed.
The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto, and any changes or modifications within the scope of the present invention by those skilled in the art are covered by the present invention.

Claims (10)

1.A method for converting and transmitting a communication message between an Ethernet format and an E1 format is characterized by comprising a method for receiving the communication message in the Ethernet format and converting and transmitting the communication message in the E1 format and a method for receiving the communication message in the E1 format and converting and transmitting the communication message in the Ethernet format;
the method for receiving the communication message in the Ethernet format and converting and sending the communication message in the E1 format comprises the following steps:
s100: using a protocol conversion device to obtain and receive the Ethernet type communication message through an RJ45 electrical port;
s200: the protocol conversion device judges whether the transmission mode of the communication message is the same as the transmission mode set by the protocol conversion device, and the protocol conversion device judges whether the destination address in the communication message is the same as the dial address in the dial information of the protocol conversion device;
s300: when the transmission mode of the communication message is the same as the transmission mode set by the protocol conversion device, and the destination address in the communication message is also the same as the dial address in the dial information of the protocol conversion device, executing the step S400, otherwise, abandoning the communication message;
s400: the protocol conversion device accumulates the communication messages, performs CRC16 verification and CRC32 verification, extracts communication data from the communication messages passing the verification, stores the communication data into an RAM memory of the protocol conversion device, generates new events, adds the new events into a queue to be sent of an FIFO memory of the protocol conversion device, queues the new events in the queue to be sent, and discards the communication messages not passing the verification;
s500: the protocol conversion device reads a queue to be sent in the FIFO memory according to the sequence according to the frequency of 0.6k (1.667 ms/frame), extracts corresponding communication messages in the RAM memory in sequence according to the initial address of the communication message in an event in the RAM memory, codes the extracted communication messages to obtain the communication message in the E1 format, and then sends the communication message in the E1 format through an E1 interface;
the method for receiving the communication message in the E1 format and converting and sending the communication message in the Ethernet format comprises the following steps:
s600: the protocol conversion device decodes the communication message in the E1 format received by the E1 interface to obtain the communication message in the Ethernet format;
s700: the protocol conversion device adds a frame head identifier and a frame tail identifier (0x7e) to the communication message according to a transmission mode set by the protocol conversion device, then the protocol conversion device accumulates, checks CRC16 and checks CRC32 the communication message, the communication message passing the check is temporarily stored in the RAM memory, meanwhile, the total frame number, the frame length and the cycle number in the RAM memory are updated, and the communication message not passing the check is discarded;
s800: the protocol conversion device generates three kinds of information at intervals of t, the three kinds of information comprise enabling signals, the initial address of a communication message in an RAM memory and the byte length of the communication message, and the protocol conversion device extracts the corresponding communication message from the RAM memory according to the three kinds of information;
s900: the protocol conversion device adds a destination address, a source address, a message type and a communication message length to the extracted communication message, judges whether the communication message length is greater than or equal to 44 bytes, performs CRC32 verification on the communication message when the communication message length is greater than or equal to 44 bytes, sends the Ethernet-type communication message through the RJ45 electric port after the verification is passed, and discards the communication message which cannot be verified; and when the length of the communication message is less than 44 bytes, filling the communication message at the frame tail of the communication message until the length is 44 bytes, then carrying out CRC32 verification on the filled communication message, sending the Ethernet-type communication message through the RJ45 electric port after the verification is passed, and discarding the communication message which cannot be verified.
2. The method for converting the transceiving of the communication message between the ethernet format and the E1 format according to claim 1, wherein the step S500 of encoding the extracted communication message by the protocol conversion device to obtain the communication message in the E1 format comprises the steps of:
s510: the protocol conversion device performs CRC16 verification on the communication message to be sent, executes the step S520 on the communication message passing the verification, and discards the communication message failing the verification at the same time;
s520: the protocol conversion device converts the byte state of the communication message into the bit state, and sequentially performs HDLC coding, 1B4B coding and HDB3 coding on the communication message in the bit state to obtain the communication message in the E1 format.
3. The method according to claim 1, wherein the step S600 of decoding the communication packet in E1 format received via E1 interface by the protocol conversion device comprises the following steps:
s610: the protocol conversion device sequentially performs HDB3 decoding, 4B1B decoding and HDLC decoding on the communication message in the E1 format;
s620: the protocol conversion device converts the decoded communication message from a bit state to a byte state to obtain an ethernet-type communication message, and then performs CRC16 verification on the ethernet-type communication message, and executes step S700 on the communication message passing the verification, and discards the communication message failing the verification.
4. The method of claim 1, wherein the dialing information includes a transmission mode and a dialing address, the dialing information is a binary code, the binary code has eight bits, the first bit and the second bit of the binary code are used for setting the transmission mode, and the third bit to the eighth bit of the binary code are used for setting the dialing address in step S200.
5. The method for converting the transmission and reception of the communication message between the ethernet format and the E1 format according to claim 1, wherein in step S400, the queue to be transmitted includes at least one queued event, and the event includes a start address of the communication message in the RAM memory.
6. The method of claim 1, wherein in step S500, when there is no queued event in the queue to be sent, the communication packet corresponding to the last event is repeatedly sent.
7. The method of claim 1, wherein the time t is 10ms in step S800.
8. The method for converting the transmission and reception of the communication message between the ethernet format and the E1 format according to claim 1, wherein in step S900, the destination address and the source address are determined by a dial address in dial information of the protocol conversion device.
9. The method for converting the transceiving of the communication message between the ethernet format and the E1 format according to claim 1, wherein the padding at the end of the frame of the communication message in step S900 comprises the following specific steps: and adding 0 at the tail of the communication message until the filled communication message reaches 44 bytes.
10. The method according to any one of claims 1 to 9, wherein the protocol conversion device comprises an RJ45 electrical port, a PHY (physical layer), a control module, an E1 conversion module, and an E1 interface, which are connected in sequence, the control module is further connected with a FIFO memory, a RAM memory, a dial switch, and a power module, the RAM memory comprises a first RAM memory and a second RAM memory, and wherein:
the RJ45 electric port is used for receiving and sending Ethernet type communication messages;
the E1 interface is used for receiving and sending communication messages in an E1 format;
the control module is used for receiving a communication message sent by an E1 conversion module or a PHY (physical layer), and executing corresponding operation according to a transmission mode set by the dial switch;
the PHY (physical layer) is used for converting the communication message received by the RJ45 electric port and sending the converted message to the control module, or receiving and converting the communication message sent by the control module and then sending the converted message through the RJ45 electric port;
the E1 conversion module is used for decoding the communication message received through the E1 interface and sending the communication message to the control module, or receiving the communication message sent by the control module, coding the communication message and sending the coded communication message through the E1 interface; the FIFO memory is used for generating corresponding events according to the storage sequence of the first storage module and adding the events into a queue to be sent for the control module to call;
the first RAM memory is used for storing communication messages received by the control module and sent by a PHY (physical layer);
the second RAM memory is used for storing the communication message received by the control module and sent by the E1 conversion module;
the dial switch is used for setting dial information, and the dial information comprises a transmission mode and a dial address;
the power module is used for supplying power to the protocol conversion device.
CN202110493650.4A 2021-05-07 2021-05-07 Method for converting and transmitting communication message between Ethernet format and E1 format Pending CN113347152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110493650.4A CN113347152A (en) 2021-05-07 2021-05-07 Method for converting and transmitting communication message between Ethernet format and E1 format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110493650.4A CN113347152A (en) 2021-05-07 2021-05-07 Method for converting and transmitting communication message between Ethernet format and E1 format

Publications (1)

Publication Number Publication Date
CN113347152A true CN113347152A (en) 2021-09-03

Family

ID=77469800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110493650.4A Pending CN113347152A (en) 2021-05-07 2021-05-07 Method for converting and transmitting communication message between Ethernet format and E1 format

Country Status (1)

Country Link
CN (1) CN113347152A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532618A (en) * 2020-11-26 2021-03-19 国网山西省电力公司电力科学研究院 Non-transparent protocol conversion method and device for joint debugging test of stability control test system
CN112532484A (en) * 2020-11-26 2021-03-19 国网山西省电力公司电力科学研究院 Transparent protocol conversion method and device for joint debugging test of stability control test system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532618A (en) * 2020-11-26 2021-03-19 国网山西省电力公司电力科学研究院 Non-transparent protocol conversion method and device for joint debugging test of stability control test system
CN112532484A (en) * 2020-11-26 2021-03-19 国网山西省电力公司电力科学研究院 Transparent protocol conversion method and device for joint debugging test of stability control test system

Similar Documents

Publication Publication Date Title
CN112532484B (en) Transparent protocol conversion method and device for joint debugging test of stability control test system
CN107528667B (en) Method and device for transmitting frame data between near-end equipment and far-end equipment
EP0976224A1 (en) Cebus data link layer proxy
CN104618019A (en) WiFi (wireless fidelity) access system based on visible light transmission and data frame transformation method
CN108512785A (en) A kind of Data Transport Protocol method
CN106094800A (en) A kind of management system of novel CAN FD controller
CN101958577B (en) Method for overhauling GOOSE in digital substation
CN112532618B (en) Non-transparent protocol conversion method and device for joint debugging test of stability control test system
CN102611592A (en) Ethernet RMII (reduced medium independent interface) based on FPGA (field programmable gate array) and realization method
CN101345612A (en) Data transmission method and device based on time division multiplexing link
CN113347152A (en) Method for converting and transmitting communication message between Ethernet format and E1 format
CN109428676B (en) Method and device for synchronizing forward error correction coding and decoding modes
CN1953416A (en) A method, system and device to transport the IPv6 message of Ethernet
CN113676386A (en) FC-AE-1553 bus protocol message communication system
CN1917519B (en) Method and system for parallel transmitting serial data according to high level data link control
CN113867234B (en) Redundant communication system and method based on communication port of field bus PA coupler
CN102081383B (en) Device and method for secure network protocol for field control
CN101500253A (en) Test system, apparatus and method for base station uplink transmission channel performance
CN214751515U (en) Test system of stability control system
Cisco Network Interface (Trunk) Cards
CN102412932B (en) Method for transmitting data among power distribution equipment modules and power distribution equipment
Cisco Network Interface (Trunk) Cards
Cisco Network Interface (Trunk) Cards
CN100584058C (en) Information interactive system and implementing method
CN111314242A (en) Multi-channel supported packet cache scheduling simulation verification method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination