CN113852568A - Data transmission method and safety instrument system - Google Patents

Data transmission method and safety instrument system Download PDF

Info

Publication number
CN113852568A
CN113852568A CN202111121400.4A CN202111121400A CN113852568A CN 113852568 A CN113852568 A CN 113852568A CN 202111121400 A CN202111121400 A CN 202111121400A CN 113852568 A CN113852568 A CN 113852568A
Authority
CN
China
Prior art keywords
control station
sent
data frame
sending
station
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
CN202111121400.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.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology Co Ltd
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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202111121400.4A priority Critical patent/CN113852568A/en
Publication of CN113852568A publication Critical patent/CN113852568A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a data transmission method and a safety instrument system.A sending control station writes a data frame to be sent into a sending queue corresponding to a receiving control station for receiving the data frame to be sent, polls each sending queue in sequence, stores the data frame to be sent in the target sending queue polled each time into a corresponding buffer memory, and sends the data frame to be sent to a target receiving control station through a safety inter-station communication network port A of a corresponding communication module so that the target receiving control station receives the corresponding data frame to be sent through the safety inter-station communication network port A of the corresponding communication module; and the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the inter-safety communication network ports B of the corresponding communication modules, so that the receiving control station receives the corresponding data frames to be sent through the inter-safety communication network ports B of the corresponding communication modules. The invention can solve the problem that the receiving control station can not process a large amount of instantaneous concurrent data to cause the loss of the received data.

Description

Data transmission method and safety instrument system
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data transmission method and a safety instrument system.
Background
The TCS-900 system is a safety instrument system which is independently researched and developed in the field of central control and process industry.
The TCS-900 system includes a plurality of security control stations, referred to as control stations for short. Data transmission is frequently required between control stations, and in consideration of the possible loss problem in the data transmission process, a communication module in a sending control station is provided with an inter-safety station communication network port A and an inter-safety station communication network port B, and the same data frame is transmitted to a receiving control station through the inter-safety station communication network port A and the inter-safety station communication network port B.
However, when a plurality of transmitting control stations simultaneously transmit data to one receiving control station, the receiving control station cannot process a large amount of instantaneous concurrent data, so that the received data is lost, and thus the data transmission mode among the existing control stations cannot effectively ensure that the control stations receive the data.
Disclosure of Invention
Based on the defects of the prior art, the invention provides a data transmission method and a safety instrument system, so as to solve the problem that in the prior art, when a plurality of sending control stations send data to one receiving control station at the same time, the receiving control station cannot process a large amount of instantaneous concurrent data, so that the received data is lost.
In order to achieve the above object, the present application provides the following technical solutions:
the invention discloses a data transmission method applied to a safety instrument system, wherein the safety instrument system comprises a plurality of control stations, each control station comprises a communication module, the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B, and the method comprises the following steps:
the sending control station writes the data frame to be sent into a sending queue corresponding to a receiving control station receiving the data frame to be sent; the sending control station is the control station sending data frames, and the receiving control station is the control station receiving data frames;
the sending control station polls each sending queue in sequence, stores the data frame to be sent in the target sending queue polled each time into a corresponding buffer, and sends the data frame to be sent to a target receiving control station through the communication network port A between the safety stations of the corresponding communication module; the target receiving control station is the receiving control station corresponding to the target sending queue;
the target receiving control station receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network port A of the corresponding communication module;
the sending control station sequentially sends the data frames to be sent in each cache to the corresponding receiving control station through the inter-safety station communication network port B of the corresponding communication module;
and the receiving control station receives the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network port B of the corresponding communication module, through the inter-safety station communication network port B of the corresponding communication module.
Optionally, the sending control station polls each sending queue in sequence, stores the data frame to be sent in the target sending queue polled each time into a corresponding buffer, and sends the data frame to be sent to the target receiving control station through the inter-security-station communication network port a of the corresponding communication module, including:
the sending control station polls each sending queue in sequence and reads the data frames to be sent in the target sending queue polled each time;
the sending control station packages the read data frame to be sent into an Ethernet data format from an application layer data format and stores the data frame to be sent into a cache corresponding to the target sending queue;
and the sending control station sends the data frames to be sent in the cache corresponding to the target sending queue to the target receiving control station through the inter-safety station communication network port A of the corresponding communication module at preset time intervals.
Optionally, the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the inter-safety station communication network interface B of the corresponding communication module, including:
and the sending control station sends the data frames to be sent in each cache to the corresponding receiving control station in sequence at intervals of the preset time through the inter-safety station communication network ports B of the corresponding communication modules.
Optionally, the data frame to be sent carries a sequence number, and the target receiving control station receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network interface a of the corresponding communication module, including:
the target receiving control station receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network A of the corresponding communication module;
the target receiving control station extracts the serial number in the data frame to be sent;
the target receiving control station judges whether a sequence number which is the same as the sequence number in the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if not, the target receiving control station stores the data frame to be sent and stores the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station;
and if so, the target receiving control station discards the data frame to be sent.
Optionally, the receiving control station receives, through the inter-safety station communication network interface B of the corresponding communication module, the to-be-transmitted data frame sent by the sending control station through the inter-safety station communication network interface B of the corresponding communication module, and the receiving control station includes:
the receiving control station receives the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network B of the corresponding communication module through the inter-safety station communication network port B of the corresponding communication module;
the receiving control station extracts the sequence number in the data frame to be sent;
the receiving control station judges whether a sequence number which is the same as the sequence number of the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if the data frame does not exist, the receiving control station stores the data frame to be sent and stores the sequence number of the data frame to be sent into a receiving sequence number queue corresponding to the sending control station;
and if so, the receiving control station discards the data frame to be sent.
A second aspect of the present invention discloses a safety instrumented system, the safety instrumented system comprising: a plurality of control stations; each control station comprises a communication module, and the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B;
when the control station is used as a sending control station, the control station is used for writing a data frame to be sent into a sending queue corresponding to a receiving control station for receiving the data frame to be sent, sequentially polling each sending queue, storing the data frame to be sent in a target sending queue polled each time into a corresponding buffer, sending the data frame to be sent to the receiving control station corresponding to the target sending queue through the inter-safety station communication network port A of the corresponding communication module, and sequentially sending the data frame to be sent in each buffer to the corresponding receiving control station through the inter-safety station communication network port B of the corresponding communication module; wherein the transmission control station refers to the control station transmitting a data frame; the receiving control station refers to the control station receiving a data frame;
when the control station is used as the receiving control station, the control station is configured to receive, through the inter-safety station communication port a of the corresponding communication module, the to-be-transmitted data frame transmitted by the sending control station through the inter-safety station communication port a of the corresponding communication module, and is configured to receive, through the inter-safety station communication port B of the corresponding communication module, the to-be-transmitted data frame transmitted by the sending control station through the inter-safety station communication port B of the corresponding communication module.
Optionally, the control station executes the sequential polling of each transmission queue, stores the data frame to be transmitted in the target transmission queue polled each time into a corresponding buffer, and when sending the data frame to be transmitted to the receiving control station corresponding to the target transmission queue through the inter-security station communication network port a of the corresponding communication module, the control station is configured to:
polling each sending queue in sequence, and reading the data frame to be sent in the target sending queue polled each time;
packaging the read data frame to be sent into an Ethernet data format from an application layer data format, and storing the data frame to be sent into a cache corresponding to the target sending queue;
and sending the data frame to be sent in the buffer corresponding to the target sending queue to the target receiving control station through the inter-safety station communication network port A of the corresponding communication module at each interval preset time.
Optionally, when the control station executes that the inter-safety-station communication network port B of the corresponding communication module sequentially sends the data frame to be sent in each buffer to the corresponding receiving control station, the control station is configured to:
and sequentially sending the data frames to be sent in each buffer to the corresponding receiving control station through the inter-safety station communication network port B of the corresponding communication module at each interval of the preset time.
Optionally, the data frame to be sent carries a sequence number, and when the control station executes that the data frame to be sent, which is sent by the control station through the inter-safety station communication port a of the corresponding communication module and is received by the inter-safety station communication port a of the corresponding communication module, is sent, the control station is configured to:
the data frame to be sent in the target sending queue sent by the sending control station is received through the inter-safety station communication network A of the corresponding communication module;
extracting a sequence number in the data frame to be sent;
judging whether a sequence number which is the same as the sequence number in the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if the data frame does not exist, storing the data frame to be sent, and storing the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station;
and if so, discarding the data frame to be sent.
Optionally, when the control station executes the receiving, by the inter-safety station communication network port B of the corresponding communication module, of the data frame to be transmitted, which is sent by the sending control station through the inter-safety station communication network port B of the corresponding communication module, the control station is configured to:
the data frame to be sent, which is received by the sending control station through the inter-safety station communication network B of the corresponding communication module and is sent by the inter-safety station communication port B of the corresponding communication module, is sent;
extracting a sequence number in the data frame to be sent;
judging whether a sequence number which is the same as the sequence number of the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if the data frame does not exist, storing the data frame to be sent, and storing the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station;
and if so, discarding the data frame to be sent.
The invention provides a data transmission method and a safety instrument system, which are applied to the safety instrument system, wherein the safety instrument system comprises a plurality of control stations, each control station comprises a communication module, and the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B; after writing the data frame to be sent into a sending queue corresponding to a receiving control station for receiving the data frame to be sent by a sending control station, sequentially polling each sending queue so as to store the data frame to be sent in the target sending queue polled each time into a corresponding buffer, sending the data frame to be sent to a target receiving control station corresponding to the target sending queue through a communication network port A between safety stations of a corresponding communication module, and enabling the target receiving control station to receive the data frame to be sent in the target sending queue sent by the sending control station through the communication network port A between safety stations of the corresponding communication module; and the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the corresponding inter-safety communication network ports B of the communication modules, so that the receiving control station receives the data frames to be sent by the sending control station through the corresponding inter-safety communication network ports B of the communication modules. The technical method provided by the invention is characterized in that when a sending control station transmits a data frame to a receiving control station, the data frame to be sent is firstly stored in a corresponding buffer memory, the data frame is sent out through a communication network port A between safety stations of corresponding communication modules, and then the data frame is sent out through a communication network port B between safety stations of corresponding communication modules, so that when a plurality of sending control stations send the data frame to one receiving control station at the same time, the receiving control station only simultaneously receives the data frame sent by the communication network ports A between safety stations of the corresponding communication modules under the sending control or simultaneously receives the data frame sent by the communication network ports B between safety stations of the corresponding communication modules under the sending control, namely, the time between the communication network ports A between safety stations and the communication network ports B between safety stations which send the same frame data is staggered, and the data volume of concurrent data received by the receiving control station is greatly reduced, the problem that in the prior art, when a plurality of sending control stations send data to one receiving control station at the same time, the receiving control station cannot process a large amount of instantaneous concurrent data, and therefore received data are lost is solved, the communication load of the sending control stations can be reduced, and the purpose of load balancing is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of a safety instrumented system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for a sending control station to send a data frame to be sent to a target receiving control station through an inter-safety station communication port a of a corresponding communication module according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for a target receiving control station to receive a data frame to be sent in a target sending queue sent by a sending control station through a corresponding inter-safety station communication port a of a communication module according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a task sending method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a method for a receiving control station to receive, through an inter-safety station communication port B of a corresponding communication module, a data frame to be sent, which is sent by the sending control station through the inter-safety station communication port B of the corresponding communication module according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a scenario of an optimal equalization state of a data transmission method according to an embodiment of the present application;
fig. 8 is a schematic diagram of a scenario of a worst equalization state of a data transmission method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules, or units, and are not used for limiting the order or interdependence of the functions performed by the devices, modules, or units.
It is noted that references to "a", "an", and "the" modifications in the disclosure are exemplary rather than limiting, and that those skilled in the art will understand that "one or more" unless the context clearly dictates otherwise.
The embodiment of the application provides a safety instrument system, and the safety instrument system can be specifically a TCS-900 system. As shown in fig. 1, a safety instrumentation system provided in an embodiment of the present application includes: a plurality of control stations.
Each control station comprises a communication module, and the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B. And data transmission is carried out between the control stations through the communication network interface A between the safety stations and the communication network interface B between the safety stations.
It should be noted that, in the data transmission process, any one control station may be used as a transmission control station, and may also be used as a reception control station. The sending control station is a control station for sending data frames. The receiving control station is a control station that receives a data frame.
When the control station is used as a sending control station, the control station is used for writing a data frame to be sent into a sending queue corresponding to a receiving control station for receiving the data frame to be sent, sequentially polling each sending queue, storing the data frame to be sent in the target sending queue polled each time into a corresponding buffer, sending the data frame to be sent to the receiving control station corresponding to the target sending queue through a communication network port A between safety stations of a corresponding communication module, and sequentially sending the data frame to be sent in each buffer to the corresponding receiving control station through a communication network port B between safety stations of a corresponding communication module.
When the control station is used as a receiving control station, the control station is used for receiving the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network port A of the corresponding sending communication module, through the inter-safety station communication network port A of the corresponding communication module, and is used for receiving the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network port B of the corresponding sending communication module, through the inter-safety station communication network port B of the corresponding communication module.
Optionally, in the safety instrument system provided in another embodiment of the present application, the sending control station performs polling on each sending queue in sequence, stores the data frame to be sent in the target sending queue polled each time into the corresponding buffer, and when sending the data frame to be sent to the receiving control station corresponding to the target sending queue through the inter-safety station communication network port a of the corresponding communication module, the sending control station is configured to:
and sequentially polling each transmission queue, and reading the data frames to be transmitted in the target transmission queue polled each time.
And packaging the read data frame to be transmitted into an Ethernet data format from the data format of the application layer, and storing the data frame to be transmitted into a cache corresponding to the target transmission queue.
And sending the data frame to be sent in the buffer corresponding to the target sending queue to the target receiving control station through the communication network interface A between the safety stations of the corresponding communication modules.
Optionally, in the safety instrument system provided in another embodiment of the present application, when the control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the inter-safety-station communication network port B of the corresponding communication module, the control station is configured to:
and sequentially sending the data frames to be sent in each buffer to the corresponding receiving control station through the communication network ports B between the safety stations of the corresponding communication modules at each interval preset time.
Optionally, in the safety instrument system provided in another embodiment of the present application, when the data frame to be sent carries a serial number, and the receiving control station receives, through the inter-safety station communication network port a of the corresponding communication module, the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network port a of the corresponding sending communication module, the receiving control station is configured to:
and receiving the data frame to be transmitted in the target transmission queue transmitted by the transmission control station through the inter-safety station communication network A of the corresponding communication module.
And extracting the sequence number in the data frame to be sent.
And judging whether a sequence number which is the same as the sequence number in the data frame to be transmitted exists in a receiving sequence number queue corresponding to the transmitting control station.
If not, storing the data frame to be sent, and storing the sequence number of the data frame to be sent into a receiving sequence number queue corresponding to the sending control station.
If so, discarding the data frame to be transmitted.
Optionally, in the safety instrument system provided in another embodiment of the present application, when the receiving control station performs receiving, through the inter-safety station communication port B of the corresponding communication module, the data frame to be transmitted, which is transmitted by the sending control station through the inter-safety station communication port B of the corresponding sending communication module, the receiving control station is configured to:
and the sending control station received through the inter-safety station communication network B of the corresponding communication module sends the data frame to be sent through the inter-safety station communication network port B of the corresponding communication module.
And extracting the sequence number in the data frame to be sent.
And judging whether a sequence number which is the same as the sequence number of the data frame to be transmitted exists in a receiving sequence number queue corresponding to the transmitting control station.
If not, storing the data frame to be sent, and storing the sequence number of the data frame to be sent into a receiving sequence number queue corresponding to the sending control station.
If so, discarding the data frame to be transmitted.
It should be noted that, for a specific working process of the control station in the safety instrument system in the data transmission process provided in the foregoing embodiment of the present application, reference may be made to the implementation of corresponding steps in the following method embodiment, and details are not described here again.
Another embodiment of the present application provides a data transmission method, which is applied to a safety instrument system. The safety instrument system comprises a plurality of control stations, each control station comprises a communication module, and each communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B. As shown in fig. 2, the data transmission method provided in the embodiment of the present application includes the following steps:
s201, the sending control station writes the data frame to be sent into a sending queue corresponding to the receiving control station receiving the data frame to be sent.
The sending control station is a control station that sends data frames, and the receiving control station is a control station that receives data frames, that is, for any control station, it can be used as both the sending control station and the receiving control station. When a control station transmits a data frame, it is a transmitting control station, and when the control station receives the data frame, it is a receiving control station.
It should be noted that, in the embodiment of the present application, a plurality of transmission queues are provided in each control station. The number of the transmission queues is equal to the number of control stations capable of receiving the data frame for controlling transmission, namely equal to the number of the receiving control stations, and each transmission queue corresponds to one control station capable of receiving the data frame for controlling transmission. Therefore, each time a data frame to be transmitted needs to be transmitted, the transmitting control station writes the data frame to be transmitted into a transmitting queue corresponding to a receiving control station receiving the data frame to be transmitted, and then performs polling transmission according to time slices through a transmitting task, that is, one control station writes the data frame transmitted to other control stations into the corresponding transmitting queue first, and then performs transmission when the data frame is polled to the transmitting queue.
S202, the sending control station polls each sending queue in sequence, stores the data frame to be sent in the target sending queue polled each time into a corresponding buffer, and sends the data frame to be sent to the target receiving control station through a communication network interface A between safety stations of corresponding communication modules.
And the target receiving control station is a receiving control station corresponding to the target sending queue. The target transmit queue refers to the transmit queue to which it is currently polled. The communication module corresponding to the control station refers to a communication module provided in the control station.
It should be noted that, in the sending control station of the present application, a buffer corresponding to each sending queue is further provided, and is used for buffering the to-be-sent data frame that needs to be sent in the corresponding sending queue.
Alternatively, the transmission control station may be constantly polled, i.e., continuously performing transmission tasks. Of course, the transmission task may be executed once every certain time period, that is, one round of polling is performed on all the transmission queues every certain time period.
Specifically, in the polling process, each time one transmission queue is polled, the transmission queue is used as a target transmission queue. If the polled target sending queue has no data frame to be sent, skipping the target sending queue and polling the next sending queue. And if the data frame to be sent exists in the target sending queue, sending the data frame to be sent to a target receiving control station through a safety inter-station communication network port A of a target data frame to be sent communication module.
Optionally, if the target transmission queue of the polling includes multiple stored data frames to be transmitted, only one of the stored data frames to be transmitted may be transmitted. Specifically, the data frame to be transmitted with the earliest storage time may be transmitted. Of course, this is only one alternative and is not limited to transmitting the stored data frame to be transmitted only once.
It should be further noted that, in the embodiment of the present application, for the same data frame to be sent, the data frame to be sent is sent to the receiving control station through the inter-safety-station communication network port a first, and then the data frame to be sent is sent through the inter-safety-station communication network port B, so that when the data frame to be sent is sent through the inter-safety-station communication network port a, the data frame to be sent needs to be stored in the buffer first, so that the data frame to be sent in the buffer can be sent through the inter-safety-station communication network port B subsequently.
Optionally, in another embodiment of the present application, an implementation manner of step S202, as shown in fig. 3, includes:
s301, the sending control station polls each sending queue in sequence and reads the data frame to be sent in the target sending queue polled each time.
S302, the sending control station packages the read data frames to be sent into an Ethernet data format from an application layer data format and stores the data frames into a cache corresponding to the target sending queue.
It should be noted that the data frame to be sent in the sending queue is in an application layer data format, and the data frame to be sent needs to be converted into an ethernet data format and stored in the corresponding buffer to send the data frame to be sent to the receiving control station.
And S303, the sending control station sends the data frame to be sent in the buffer corresponding to the target sending queue to the target receiving control station through the communication network interface A between the safety stations of the corresponding communication modules.
Alternatively, after each time a data frame to be transmitted is transmitted, the transmission control station may poll the next transmission queue after a preset time interval, for example, 2ms, that is, the transmission task is suspended for 2 ms.
S203, the target receiving control station receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network port A of the corresponding communication module.
When the sending control station sends the data frame to be sent to the target receiving control station through the communication network interface A between the safety stations, the corresponding target receiving control station receives the data frame to be sent through the communication network interface A between the safety stations.
Optionally, in another embodiment of the present application, the data frame to be sent carries a sequence number, and a specific implementation method of step S203 is shown in fig. 4, and includes:
s401, the target receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network A of the corresponding communication module.
S402, the target receiving control station extracts the sequence number in the data frame to be sent.
It should be noted that, in the embodiment of the present application, each to-be-transmitted data frame carries a corresponding serial number, and the serial numbers in different to-be-transmitted data frames are different, so as to be able to distinguish different to-be-transmitted data frames. And the serial numbers of the data to be sent in the same frame sent by the two network ports of the same control station are the same.
S403, the target receiving control station judges whether a sequence number which is the same as the sequence number in the data frame to be sent exists in the receiving sequence number queue corresponding to the sending control station.
It should be noted that, in the embodiment of the present application, a corresponding receive sequence number queue is set in the receive control station for each transmit control station.
Optionally, the corresponding receiving sequence number queue may be set according to an IP address of the sending control station, so that the receiving sequence number queue corresponding to the current sending control station may be determined according to the IP address of the data frame to be sent.
Since, in consideration of the data loss, the receiving control station can receive the data frame to be transmitted sent by the sending control station, the same data to be transmitted is sent through the inter-safety station communication network a and the inter-safety station communication network a. The receiving control station may receive the same data to be transmitted without losing the data. However, in order to avoid data redundancy, it is necessary to easily remove data, so that if it is determined that there is no data, it indicates that the receiving control station has not received the data frame to be transmitted, and therefore step S404 is executed. If it is determined to exist, step S405 is executed to avoid data redundancy.
S404, the target receiving control station stores the data frame to be sent, and stores the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station.
Optionally, since the interval time of the same frame of data to be transmitted sent by two network ports is not too long, and in order to avoid occupying too much storage control, each received sequence number queue may be set to a fixed depth, and when the received sequence number queue is full and a new sequence number needs to be stored, the oldest stored training may be removed, and the latest sequence number is stored. The serial numbers of the data to be sent in the same frame sent by two network ports of the same control station are the same.
S405, the target receiving control station discards the data frame to be sent.
Alternatively, in order to avoid unnecessary work, in the embodiment of the present application, a currently received data frame to be transmitted is discarded instead of an already stored data frame to be transmitted. Of course, it is also possible to store the current data frame to be transmitted and discard the previously stored data frame to be transmitted corresponding to the sequence number, which is only too cumbersome.
And S204, the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the communication network ports B between the safety stations of the corresponding communication modules.
It should be noted that, in order to avoid a situation that a data frame to be transmitted sent by the inter-safety station communication network port a and the inter-safety station communication network port B of the sending control station is received by one receiving control station at the same time point or within a short time, so as to cause data loss, step S204 may be performed after performing one round of polling on all sending queues.
Since, in the step S202, the data frames to be transmitted in each transmission queue are already buffered in the corresponding buffer, and each transmission queue corresponds to one receiving control station, so that one buffer also corresponds to one receiving control station, the data frames to be transmitted in each buffer can be sequentially transmitted to the receiving control station corresponding to each buffer, that is, each buffer is also polled, and the polled data frames to be transmitted in the buffer are transmitted to the corresponding receiving control station until each buffer is polled.
Optionally, in an embodiment of the present application, an implementation manner of step S204 includes:
and the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station at preset time intervals through the communication network ports B between the safety stations of the corresponding communication modules.
That is to say, in the embodiment of the present application, a data frame to be sent in one buffer is sent at preset time intervals until each buffer is polled.
Therefore, assuming that there are 4 receiving control stations corresponding to one transmitting control station, the transmitting control station provided in the present application performs logic for performing one transmission task, that is, performing one round of transmission task, through the inter-safety station communication network port a and the inter-safety station communication network port B, as shown in fig. 5. When i is 0, the i network refers to a communication network port A between safety stations; when i is 1, the i network refers to an inter-safety station communication network port B, and j is used for indicating a receiving control station.
S205, the receiving control station receives the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network port B of the corresponding communication module, through the inter-safety station communication network port B of the corresponding communication module.
It should be noted that, each time the sending control station sends a data frame to be sent to one receiving control station through the inter-safety station communication network port B of the corresponding communication module, the receiving control station correspondingly receives the data frame to be sent through the inter-safety station communication network port B of the corresponding communication module.
Optionally, in another embodiment of the present application, the data frame to be sent carries a sequence number, so that, in a manner similar to that shown in fig. 4, an implementation manner of step S205 disclosed in the embodiment of the present application, as shown in fig. 6, includes the following steps:
s601, receiving a data frame to be sent, which is received by the control station through the inter-safety station communication network B of the corresponding communication module and sent by the sending control station through the inter-safety station communication network port B of the corresponding communication module.
S602, the receiving control station extracts the sequence number in the data frame to be sent.
S603, the receiving control station judges whether a sequence number which is the same as the sequence number of the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station.
If it is determined that the reference signal is not present, step S604 is executed. If yes, go to step S605.
S604, the receiving control station stores the data frame to be sent, and stores the sequence number of the data frame to be sent into a receiving sequence number queue corresponding to the sending control station.
S605, the receiving control station discards the data frame to be transmitted.
It should be noted that steps S601 to S605 are identical to steps S401 to S405 shown in fig. 4, and only the received network ports are different, that is, the receiving control station receives through the inter-safety station communication network port a and the inter-safety station communication network port B in an identical manner, so that the specific implementation of steps S601 to S605 may refer to the implementation of steps S401 to S405 accordingly, and will not be described again here.
Finally, it should be noted that, the communication load balancing implemented by the method provided in the embodiment of the present application can effectively ensure normal reception of the receiving station in both the scenario of the best balance state shown in fig. 7 and the scenario of the worst balance state shown in fig. 8, and the problem of loss of received data does not occur.
In the scenarios shown in fig. 7 and 8, 4 sending stations and 4 receiving stations are included, and each sending station sends a signal to one receiving station every 2 ms. In fig. 7 and 8, "1A" indicates that the transmitting station transmits data to the port a of the receiving station 1, and "2A", "3A", and "4A" indicate that data is transmitted to the port a of the receiving station corresponding to the number. Similarly, "1B" indicates that the transmitting station transmits data to port B of the receiving station 1. Accordingly, "2B", "3B", and "4B" indicate transmission of data to the portal B of the receiving station corresponding to the number. The "black filled rectangle" indicates the transmission data processing time.
Therefore, as can be seen from fig. 7, at the same time point, 4 sending stations respectively send data to the ports of different receiving stations, that is, only one port of one receiving station receives the data sent by one sending station at each time point, so that the data is in the optimal equilibrium state at this time, and the receiving station can be effectively guaranteed to receive the data.
For the scenario shown in fig. 8, at the same time point, 4 sending stations simultaneously send data to the same port of one receiving station, that is, at each time point, one port simultaneously receives data sent by 4 sending stations, which is the worst equalization state scenario. However, through the polling transmission mechanism of the A/B network port, the receiving station can be effectively guaranteed to receive data even under the scene. Moreover, the worst scene has a relatively low probability, so that the communication load balance realized by the method provided by the embodiment of the application can effectively ensure that the receiving station receives data and avoid the condition of data loss.
The invention provides a data transmission method, which is applied to a safety instrument system, wherein the safety instrument system comprises a plurality of control stations, each control station comprises a communication module, and the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B; after writing the data frame to be sent into a sending queue corresponding to a receiving control station for receiving the data frame to be sent by a sending control station, sequentially polling each sending queue so as to store the data frame to be sent in the target sending queue polled each time into a corresponding buffer, sending the data frame to be sent to a target receiving control corresponding to the target sending queue through a communication network port A between safety stations of a corresponding communication module, and enabling the target receiving control station to receive the data frame to be sent in the target sending queue sent by the sending control station through the communication network port A between safety stations of the corresponding communication module; and the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the corresponding inter-safety communication network ports B of the communication modules, so that the receiving control station receives the data frames to be sent by the sending control station through the corresponding inter-safety communication network ports B of the communication modules. The technical method provided by the invention is characterized in that when a sending control station transmits a data frame to a receiving control station, the data frame to be sent is firstly stored in a corresponding buffer memory, the data frame is sent out through a communication network port A between safety stations of corresponding communication modules, and then the data frame is sent out through a communication network port B between safety stations of corresponding communication modules, so that when a plurality of sending control stations send the data frame to one receiving control station at the same time, the receiving control station only simultaneously receives the data frame sent by the communication network ports A between safety stations of the corresponding communication modules under the sending control or simultaneously receives the data frame sent by the communication network ports B between safety stations of the corresponding communication modules under the sending control, namely, the time between the communication network ports A between safety stations and the communication network ports B between safety stations which send the same frame data is staggered, and the data volume of concurrent data received by the receiving control station is greatly reduced, the problem that in the prior art, when a plurality of sending control stations send data to one receiving control station at the same time, the receiving control station cannot process a large amount of instantaneous concurrent data, and therefore received data are lost is solved, the communication load of the sending control stations can be reduced, and the purpose of load balancing is achieved.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are merely illustrative, wherein units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (10)

1. A data transmission method is applied to a safety instrument system, the safety instrument system comprises a plurality of control stations, each control station comprises a communication module, the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B, and the method comprises the following steps:
the sending control station writes the data frame to be sent into a sending queue corresponding to a receiving control station receiving the data frame to be sent; the sending control station is the control station sending data frames, and the receiving control station is the control station receiving data frames;
the sending control station polls each sending queue in sequence, stores the data frame to be sent in the target sending queue polled each time into a corresponding buffer, and sends the data frame to be sent to a target receiving control station through the communication network port A between the safety stations of the corresponding communication module; the target receiving control station is the receiving control station corresponding to the target sending queue;
the target receiving control station receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network port A of the corresponding communication module;
the sending control station sequentially sends the data frames to be sent in each cache to the corresponding receiving control station through the inter-safety station communication network port B of the corresponding communication module;
and the receiving control station receives the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network port B of the corresponding communication module, through the inter-safety station communication network port B of the corresponding communication module.
2. The method according to claim 1, wherein the sending control station sequentially polls each sending queue, stores the data frame to be sent in the target sending queue polled each time into a corresponding buffer, and sends the data frame to be sent to a target receiving control station through the inter-security station communication network port a of the corresponding communication module, comprising:
the sending control station polls each sending queue in sequence and reads the data frames to be sent in the target sending queue polled each time;
the sending control station packages the read data frame to be sent into an Ethernet data format from an application layer data format and stores the data frame to be sent into a cache corresponding to the target sending queue;
and the sending control station sends the data frame to be sent in the buffer corresponding to the target sending queue to the target receiving control station at preset time intervals through the inter-safety station communication network port A of the corresponding communication module.
3. The method according to claim 2, wherein the sending control station sequentially sends the data frames to be sent in each buffer to the corresponding receiving control station through the inter-safety station communication port B of the corresponding communication module, and includes:
and the sending control station sends the data frames to be sent in each cache to the corresponding receiving control station in sequence at intervals of the preset time through the inter-safety station communication network ports B of the corresponding communication modules.
4. The method according to claim 1, wherein the data frame to be transmitted carries a sequence number, and the receiving control station of the target receives the data frame to be transmitted in the target transmission queue sent by the sending control station through the inter-safety station communication port a of the corresponding communication module, including:
the target receiving control station receives the data frame to be sent in the target sending queue sent by the sending control station through the inter-safety station communication network A of the corresponding communication module;
the target receiving control station extracts the serial number in the data frame to be sent;
the target receiving control station judges whether a sequence number which is the same as the sequence number in the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if not, the target receiving control station stores the data frame to be sent and stores the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station;
and if so, the target receiving control station discards the data frame to be sent.
5. The method according to claim 4, wherein the receiving control station receives the data frame to be transmitted, which is transmitted by the sending control station through the inter-safety station communication port B of the corresponding communication module, and comprises:
the receiving control station receives the data frame to be sent, which is sent by the sending control station through the inter-safety station communication network B of the corresponding communication module through the inter-safety station communication network port B of the corresponding communication module;
the receiving control station extracts the sequence number in the data frame to be sent;
the receiving control station judges whether a sequence number which is the same as the sequence number of the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if the data frame does not exist, the receiving control station stores the data frame to be sent and stores the sequence number of the data frame to be sent into a receiving sequence number queue corresponding to the sending control station;
and if so, the receiving control station discards the data frame to be sent.
6. A safety instrumented system, the safety instrumented system comprising: a plurality of control stations; each control station comprises a communication module, and the communication module comprises an inter-safety station communication network port A and an inter-safety station communication network port B;
when the control station is used as a sending control station, the control station is used for writing a data frame to be sent into a sending queue corresponding to a receiving control station for receiving the data frame to be sent, sequentially polling each sending queue, storing the data frame to be sent in a target sending queue polled each time into a corresponding buffer, sending the data frame to be sent to the receiving control station corresponding to the target sending queue through the inter-safety station communication network port A of the corresponding communication module, and sequentially sending the data frame to be sent in each buffer to the corresponding receiving control station through the inter-safety station communication network port B of the corresponding communication module; wherein, the sending control station is the control station sending data frames; the receiving control station is the control station receiving the data frame;
when the control station is used as the receiving control station, the control station is configured to receive, through the inter-safety station communication port a of the corresponding communication module, the to-be-transmitted data frame transmitted by the sending control station through the inter-safety station communication port a of the corresponding communication module, and is configured to receive, through the inter-safety station communication port B of the corresponding communication module, the to-be-transmitted data frame transmitted by the sending control station through the inter-safety station communication port B of the corresponding communication module.
7. The system according to claim 6, wherein the control station executes the sequential polling of each of the transmission queues, stores the data frame to be transmitted in the target transmission queue polled each time into the corresponding buffer, and when transmitting the data frame to be transmitted to the receiving control station corresponding to the target transmission queue through the inter-security station communication network port a of the corresponding communication module, the control station is configured to:
polling each sending queue in sequence, and reading the data frame to be sent in the target sending queue polled each time;
packaging the read data frame to be sent into an Ethernet data format from an application layer data format, and storing the data frame to be sent into a cache corresponding to the target sending queue;
and sending the data frame to be sent in the buffer corresponding to the target sending queue to the target receiving control station through the inter-safety station communication network port A of the corresponding communication module at each interval preset time.
8. The system according to claim 7, wherein the control station, when executing the sending of the data frame to be sent in each buffer to the corresponding receiving control station sequentially through the inter-safety-station communication network port B of the corresponding communication module, is configured to:
and sequentially sending the data frames to be sent in each buffer to the corresponding receiving control station through the inter-safety station communication network port B of the corresponding communication module at each interval of the preset time.
9. The system according to claim 6, wherein a sequence number is carried in the data frame to be transmitted, and when the control station performs the receiving, through the inter-safety station communication port a of the corresponding communication module, of the data frame to be transmitted, which is sent by a sending control station through the inter-safety station communication port a of the corresponding sent communication module, the control station is configured to:
the data frame to be sent in the target sending queue sent by the sending control station is received through the inter-safety station communication network A of the corresponding communication module;
extracting a sequence number in the data frame to be sent;
judging whether a sequence number which is the same as the sequence number in the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if the data frame does not exist, storing the data frame to be sent, and storing the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station;
and if so, discarding the data frame to be sent.
10. The system according to claim 9, wherein the control station, when performing the receiving of the data frame to be transmitted, which is transmitted by the transmission control station through the inter-safety-station communication port B of the corresponding transmission communication module, through the inter-safety-station communication port B of the corresponding communication module, is configured to:
the data frame to be sent, which is received by the sending control station through the inter-safety station communication network B of the corresponding communication module and is sent by the inter-safety station communication port B of the corresponding communication module, is sent;
extracting a sequence number in the data frame to be sent;
judging whether a sequence number which is the same as the sequence number of the data frame to be sent exists in a receiving sequence number queue corresponding to the sending control station;
if the data frame does not exist, storing the data frame to be sent, and storing the serial number of the data frame to be sent into a receiving serial number queue corresponding to the sending control station;
and if so, discarding the data frame to be sent.
CN202111121400.4A 2021-09-24 2021-09-24 Data transmission method and safety instrument system Pending CN113852568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111121400.4A CN113852568A (en) 2021-09-24 2021-09-24 Data transmission method and safety instrument system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111121400.4A CN113852568A (en) 2021-09-24 2021-09-24 Data transmission method and safety instrument system

Publications (1)

Publication Number Publication Date
CN113852568A true CN113852568A (en) 2021-12-28

Family

ID=78979154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111121400.4A Pending CN113852568A (en) 2021-09-24 2021-09-24 Data transmission method and safety instrument system

Country Status (1)

Country Link
CN (1) CN113852568A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101346680A (en) * 2005-12-21 2009-01-14 伊斯曼柯达公司 Receiving station for mobile host equipment, and method of sharing resources using the station
CN101425977A (en) * 2008-11-25 2009-05-06 北京航空航天大学 Air-ground data communication control system
US20090118020A1 (en) * 2005-08-25 2009-05-07 Koivisto Ari M Method and device for sending and receiving game content including download thereof
JP2011239208A (en) * 2010-05-11 2011-11-24 Nippon Telegr & Teleph Corp <Ntt> Communication system, relay station apparatus, reception station apparatus and communication method for the same, program
CN110474894A (en) * 2019-07-31 2019-11-19 北京和利时系统工程有限公司 Data sending and receiving method, system, storage medium and terminal
CN110798480A (en) * 2019-11-07 2020-02-14 杭州和利时自动化有限公司 Data communication method and system between safety instrument systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090118020A1 (en) * 2005-08-25 2009-05-07 Koivisto Ari M Method and device for sending and receiving game content including download thereof
CN101346680A (en) * 2005-12-21 2009-01-14 伊斯曼柯达公司 Receiving station for mobile host equipment, and method of sharing resources using the station
CN101425977A (en) * 2008-11-25 2009-05-06 北京航空航天大学 Air-ground data communication control system
JP2011239208A (en) * 2010-05-11 2011-11-24 Nippon Telegr & Teleph Corp <Ntt> Communication system, relay station apparatus, reception station apparatus and communication method for the same, program
CN110474894A (en) * 2019-07-31 2019-11-19 北京和利时系统工程有限公司 Data sending and receiving method, system, storage medium and terminal
CN110798480A (en) * 2019-11-07 2020-02-14 杭州和利时自动化有限公司 Data communication method and system between safety instrument systems

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘阳: ""安全仪表系统通讯单元模块的设计与实现"", 《中国优秀硕士学位论文全文数据库(信息科技I辑)》, 15 December 2013 (2013-12-15) *

Similar Documents

Publication Publication Date Title
JP4746331B2 (en) Method, apparatus, and system for synchronized combination of packet data
JP2004530343A5 (en)
RU2011101943A (en) METHOD AND DEVICE FOR PRIORIZING STATUS MESSAGES (EG, RECEIPTS) IN A WIRELESS COMMUNICATION SYSTEM
CN110312283B (en) Information processing method and device
EP2490400A1 (en) Transmission control method for packet communication and packet communication system
CN109587732B (en) Transmission method and device for service quality flow
JP2017212728A5 (en)
CN107104902B (en) RDMA data transmission method, related device and system
US20120106567A1 (en) Mlppp occupancy based round robin
US8838782B2 (en) Network protocol processing system and network protocol processing method
CN110661840A (en) Management delegation of transmission and acknowledgement of frames
KR100987258B1 (en) Apparatus and method for controling data flow in a communication system
US6680910B1 (en) Network interface unit
CN103685061A (en) Cache data control method and device
CN111209240B (en) Data transmission method, electronic equipment and storage medium
EP2679047B1 (en) Method and device for congestion situations
CN115174490A (en) Data transmission method and network application terminal
CN112995809B (en) Control method and device of FC switch, FC switch and storage medium
US9544401B2 (en) Device and method for data communication using a transmission ring buffer
CN113852568A (en) Data transmission method and safety instrument system
CN105871747B (en) Communication system downlink data transmission method and system
JP4478180B2 (en) Wireless communication system
CN111586730B (en) Wireless communication method and system applied to rail transit
CN103179087A (en) Asynchronous Socket data transmission method and system from application layer to transmission control protocol (TCP) layer
CN109495162B (en) Protection switching method, receiving end and storage medium

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