Ethernet communication method, device, equipment and storage medium

By designing redundant master stations in Ethernet communication systems and automatically transferring tasks, the communication interruption problem caused by master station failure in traditional systems is solved, and the reliability and stability of the system are improved.

CN118337607BActive Publication Date: 2024-11-05ZKHM CNC SOFTWARE (SHENZHEN) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410773370.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-11-05
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

The traditional Ethernet communication master station system only has one master station. If the main station network port is damaged or the MCU crashes, it will not be able to communicate with the slave station, resulting in the entire system being unavailable and lacking reliability.

Method used

A redundant master station is designed in the Ethernet communication system, and different data transmission tasks are configured between different master stations. If an abnormality occurs on one master station, the data transmission task will be automatically transferred to other master stations to ensure that the communication continues.

Benefits of technology

Through redundant design and task transfer, communication interruptions caused by master station failure are avoided, and the reliability and stability of the Ethernet communication system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118337607B_ABST
    Figure CN118337607B_ABST
Patent Text Reader

Abstract

The present application discloses an Ethernet communication method, apparatus, device and storage medium, and relates to the technical field of Ethernet communication. The method is applied to a communication master station, and the Ethernet communication system where the communication master station is located also includes a slave station that communicates with the communication master station. The communication master station is configured with a data transmission task for transmitting data to the slave station, and the data transmission task is executed by the data transmission function of the communication master station. The method includes: monitoring the data transmission function; when an abnormality occurs in the data transmission function, transferring the data transmission task to other communication master stations in the Ethernet communication system, thereby achieving the effect of enhancing the reliability of the Ethernet communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Ethernet communication, and in particular to an Ethernet communication method, apparatus, device and storage medium. Background Art

[0002] Ethernet communication technology enables fast data transmission. In this technology, the master station communicates with the slave station through the network port and is responsible for controlling the data flow of the entire network. As a high-speed communication LAN technology, Ethernet communication technology relies on the normal operation of the master station to ensure fast data transmission and real-time performance. Therefore, the normal operation of the master station directly affects the stability, reliability and performance of the communication network. Traditional Ethernet communication master station systems are generally configured with only one master station. When the Ethernet network port configured by the running master station is damaged or the MCU (Microcontroller Unit) crashes, it is impossible to communicate with the slave station, resulting in the entire Ethernet communication system being unusable.

[0003] Therefore, how to enhance the reliability of Ethernet communication systems is a problem that needs to be solved urgently. Summary of the invention

[0004] The main purpose of the present application is to provide an Ethernet communication method, apparatus, device and storage medium, aiming to solve the technical problem of how to enhance the reliability of the Ethernet communication system.

[0005] To achieve the above object, the present application proposes an Ethernet communication method, which is applied to a communication master station, wherein the Ethernet communication system in which the communication master station is located also includes a slave station communicating with the communication master station, and the communication master station is configured with a data transmission task for transmitting data with the slave station, and the data transmission task is executed by the data transmission function of the communication master station;

[0006] The method includes:

[0007] monitoring the data transmission function;

[0008] In the event that an abnormality occurs in the data transmission function, the data transmission task is transferred to other communication master stations in the Ethernet communication system.

[0009] In one embodiment, the type of the communication master station includes a sending master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the sending master station is on, and the initial state of the data receiving sub-function of the sending master station is off;

[0010] The step of transferring the data transmission task to other communication master stations in the Ethernet communication system comprises:

[0011] When the type of the communication master station is a sending master station, closing the data sending subfunction;

[0012] The unsuccessfully sent data to be sent and the first interrupt request signal are transmitted to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task.

[0013] In one embodiment, the type of the communication master station includes a receiving master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the receiving master station is closed, and the initial state of the data receiving sub-function of the receiving master station is opened;

[0014] The step of transferring the data transmission task to other communication master stations in the Ethernet communication system comprises:

[0015] When the type of the communication master station is a receiving master station, closing the data receiving subfunction;

[0016] The first interrupt request signal is transmitted to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task.

[0017] In one embodiment, after the step of monitoring the data transmission function, the method comprises:

[0018] When no abnormality occurs in the data transmission function and after receiving a second interrupt request signal transmitted by other communication master stations in the Ethernet communication system, the data transmission function is updated to take over the data transmission task requested by the second interrupt request signal.

[0019] In one embodiment, the type of the communication master station includes a sending master station, the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the sending master station is on, and the initial state of the data receiving sub-function of the sending master station is off, and the type of the data transmission task includes a data receiving task;

[0020] The step of updating the data transmission function to undertake the data transmission task requested by the second interrupt request signal comprises:

[0021] When the type of the communication master station is a sending master station, the data receiving sub-function is enabled to undertake the data receiving task requested to be transferred out by the second interrupt request.

[0022] In one embodiment, the type of the communication master station includes a receiving master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the receiving master station is closed, and the initial state of the data receiving sub-function of the receiving master station is closed;

[0023] The step of updating the data transmission function to undertake the data transmission task requested by the second interrupt request signal comprises:

[0024] When the type of the communication master station is a receiving master station, the data sending sub-function is turned on, and the to-be-sent data transmitted by other communication master stations is sent to the slave station to undertake the data sending task requested to be transferred out by the second interrupt request.

[0025] In one embodiment, the method further comprises:

[0026] In the case where the type of the communication master station is a sending master station, sending data to be sent to the slave station, and receiving data to be processed transmitted by other communication masters which are receiving masters;

[0027] In the case where the type of the communication master station is a receiving master station, the to-be-processed data sent by the slave station is received, and the to-be-processed data is transmitted to other communication masters which are sending masters.

[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes an Ethernet communication device, which is applied to a communication master station, wherein the Ethernet communication system in which the communication master station is located also includes a slave station communicating with the communication master station, and the communication master station is configured with a data transmission task for transmitting data with the slave station, and the data transmission task is executed by the data transmission function of the communication master station;

[0029] The Ethernet communication device comprises:

[0030] A monitoring module, used for monitoring the data transmission function;

[0031] The transfer module is used to transfer the data transmission task to other communication master stations in the Ethernet communication system when an abnormality occurs in the data transmission function.

[0032] In addition, to achieve the above objectives, the present application also proposes an Ethernet communication device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the Ethernet communication method described above.

[0033] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the Ethernet communication method described above are implemented.

[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the Ethernet communication method described above are implemented.

[0035] The present application provides an Ethernet redundant communication method, which first monitors the data transmission function to promptly discover a master station with an abnormal data transmission function; when the data transmission function is abnormal, the data transmission task is transferred to other communication master stations in the Ethernet communication system, and the data transmission task is continued by transferring the data transmission task of the abnormal master station, so that the master station can continue to communicate with the slave station when the abnormality occurs.

[0036] In summary, the present application redundantly designs additional master stations in the Ethernet communication system and configures different data transmission tasks in different master stations. When any master station encounters an abnormality during operation, the data transmission task of the abnormal master station is transferred out. This avoids the problem of the entire Ethernet communication system becoming unfeasible due to the cessation of communication with the slave station when the Ethernet port of the master station is damaged or the MCU crashes, thereby achieving the effect of enhancing the reliability of the Ethernet communication system. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 A flowchart of the first embodiment of the Ethernet communication method of the present application is provided;

[0040] Figure 2 A schematic diagram of a flow chart provided for the second embodiment of the Ethernet communication method of the present application;

[0041] Figure 3 A flowchart of the third embodiment of the Ethernet communication method of the present application is provided;

[0042] Figure 4 A schematic diagram of a scenario of an Ethernet communication method provided in Embodiment 3 of the present application;

[0043] Figure 5 A brief flowchart of the Ethernet communication method provided in Example 3 of the present application;

[0044] Figure 6 This is a schematic diagram of the module structure of the Ethernet communication device according to an embodiment of the present application;

[0045] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the Ethernet communication method in the embodiment of the present application. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0048] The main solution of the embodiment of the present application is: monitoring the data transmission function; when the data transmission function is abnormal, transferring the data transmission task to other communication master stations in the Ethernet communication system.

[0049] Since the conventional Ethernet communication master station system in the prior art is generally configured with only one master station, when the Ethernet port configured in the running master station is damaged or the MCU crashes, it is impossible to communicate with the slave station, resulting in the entire Ethernet communication system being unusable. Therefore, how to enhance the reliability of the Ethernet communication system is a problem that needs to be solved urgently.

[0050] The present application provides a solution by redundantly designing additional master stations in the Ethernet communication system, so that when any master station has an abnormality during operation, the data transmission task of the abnormal master station is transferred out, thereby avoiding the problem that when the Ethernet port of the master station is damaged or the MCU crashes, it is impossible to communicate with the slave station, thereby causing the entire Ethernet communication system to become unfeasible, thereby achieving the effect of enhancing the reliability of the Ethernet communication system.

[0051] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an Ethernet communication device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the Ethernet communication device as an example to illustrate this embodiment and the following embodiments.

[0052] Based on this, the embodiment of the present application provides an Ethernet communication method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the Ethernet communication method of the present application.

[0053] In this embodiment, the Ethernet communication method is applied to a communication master station, and the Ethernet communication system where the communication master station is located also includes a slave station that communicates with the communication master station, and the communication master station is configured with a data transmission task for transmitting data with the slave station, and the data transmission task is executed by a data transmission function of the communication master station;

[0054] It should be noted that the communication master station is a control node in the Ethernet communication system, which is usually responsible for managing the communication in the network, sending commands and monitoring the network status; the slave station is a controlled node in the Ethernet communication system, which is usually responsible for responding to the request of the communication master station, executing commands and sending data;

[0055] The data transmission task is to send data to the slave station and receive data sent by the slave station; the data transmission function is the function required to realize the data transmission task.

[0056] The Ethernet communication method comprises steps S10 to S20:

[0057] Step S10, monitoring the data transmission function;

[0058] It is understandable that, since the communication master station in the Ethernet communication system may have abnormal data transmission function during operation, performing step S10 enables the user to promptly discover the communication master station with abnormal data transmission function.

[0059] Step S20, when the data transmission function is abnormal, the data transmission task is transferred to other communication master stations in the Ethernet communication system.

[0060] It should be noted that the abnormality of the data transmission function may be caused by damage to the Ethernet port configured in the communication master station or by a crash of the MCU. This embodiment does not specifically limit the abnormality of the data transmission function.

[0061] It can be understood that since the data transmission function of the communication master station has an abnormality, it is unable to perform data transmission tasks with the slave station normally, so performing step S20 can enable the data transmission task to continue normally, thereby achieving the effect that the communication master station continues to communicate with the slave station when an abnormality occurs.

[0062] In a feasible implementation manner, the type of the communication master station includes a sending master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the sending master station is turned on, and the initial state of the data receiving sub-function of the sending master station is turned off; the step of transferring the data transmission task to other communication master stations in the Ethernet communication system in the step S20 may include steps A10~A20:

[0063] Step A10, when the type of the communication master station is a sending master station, closing the data sending sub-function;

[0064] It should be noted that the sending master station is a communication master station that only sends data to the slave station but does not receive data sent by the slave station; the data sending sub-function is a function used by the communication master station to send data to the slave station.

[0065] It is understandable that since the data sending sub-function of the sending master station cannot perform the data sending task normally after an abnormality occurs, step A10 can be performed to promptly terminate the sending master station from continuing to perform the data sending task, thereby avoiding data loss caused by unsuccessful data sending.

[0066] Step A20, transmitting the unsuccessfully transmitted data and the first interrupt request signal to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task.

[0067] It should be noted that the data to be sent refers to data that already exists in the communication master station but cannot be successfully sent out due to an abnormality in the data transmission function of the communication master station.

[0068] It is understandable that, since the sending master station will lose the communication data in the master station when an abnormality occurs in operation, and cannot continue to perform the data sending task, performing step A20 can solve the problem of communication data loss when an abnormality occurs in the sending master station.

[0069] Exemplarily, the Ethernet communication system includes two communication master stations, wherein the data transmission function of any one of the communication master stations only turns on the data sending subfunction, while the other communication master station only turns on the data receiving subfunction. After an abnormality occurs in the data sending subfunction of the sending master station, when the abnormal data sending subfunction has been turned off, the data that already exists in the sending master station but has not been successfully sent to the slave station, that is, the data to be sent, and the signal for requesting that only the data receiving subfunction be turned on for the other master station to undertake the data sending task transferred from the sending master station, that is, the first interrupt request signal, are all transmitted to the other master station that only has the data receiving subfunction turned on through inter-core communication.

[0070] In this embodiment, by terminating its own data sending task and transmitting the data to be sent to other master stations and transferring the data sending task, the loss of the data to be sent in the communication master station when an abnormality occurs in data sending is avoided, thereby solving the problem of not being able to normally execute the task of sending data to the slave station.

[0071] In another feasible implementation manner, the type of the communication master station includes a receiving master station, and the data transmission function includes a data sending subfunction and a data receiving subfunction, wherein the initial state of the data sending subfunction of the receiving master station is closed, and the initial state of the data receiving subfunction of the receiving master station is opened; the step of transferring the data transmission task to other communication master stations in the Ethernet communication system in step S20 may also include steps B10 to B20:

[0072] Step B10, when the type of the communication master station is a receiving master station, closing the data receiving subfunction;

[0073] The receiving master station is a communication master station that only receives data sent by the slave station but does not send data to the slave station; the data receiving subfunction is a function used by the communication master station to receive data sent by the slave station.

[0074] It is understandable that since the data receiving sub-function of the receiving slave station cannot perform the data receiving task normally after an abnormality occurs, step B10 can be performed to promptly terminate the receiving master station from continuing to perform the data receiving task, thereby avoiding data loss caused by failure to receive data.

[0075] Step B20, transmitting the first interrupt request signal to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task.

[0076] Exemplarily, the Ethernet communication system includes two communication master stations, wherein the data transmission function of any one of the communication master stations only turns on the data receiving subfunction, while the other communication master station only turns on the data sending subfunction. After an abnormality occurs in the data receiving subfunction of the receiving master station, if the abnormal data receiving subfunction has been turned off, the signal for requesting the other master station to only turn on the data sending subfunction to undertake the data receiving task transferred from the receiving master station, i.e., the first interrupt request signal, is transmitted to the other master station that only turns on the data sending subfunction through inter-core communication.

[0077] In this implementation, by terminating its own data receiving task and transferring the data receiving task to other master stations, the problem that the communication master station cannot normally perform the task of receiving data sent by the slave station when data reception is abnormal is solved.

[0078] In this embodiment, additional master stations are redundantly designed in the Ethernet communication system so that when any master station encounters an abnormality during operation, the data transmission task of the abnormal master station is transferred out. This avoids the problem of being unable to communicate with the slave station when the Ethernet port of the master station is damaged or the MCU crashes, thereby causing the entire Ethernet communication system to become unfeasible, thereby achieving the effect of enhancing the reliability of the Ethernet communication system.

[0079] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2 This is a flow chart of the second embodiment of the Ethernet communication method of the present application. After step S10, the Ethernet communication method further includes step S30:

[0080] Step S30, when there is no abnormality in the data transmission function and after receiving the second interrupt request signal transmitted by other communication master stations in the Ethernet communication system, update the data transmission function to undertake the data transmission task requested by the second interrupt request signal.

[0081] It should be noted that the second interrupt request signal is a signal received by the communication master station through inter-core communication, and is used by other communication master stations to request the communication master station to take over the transferred data transmission task.

[0082] It can be understood that since the communication master station with functional abnormality transfers the data transmission task, the communication master station with normal function needs to take over the task, so step S30 can keep the data transmission task further normal, so that the communication master station can continue to communicate with the slave station when an abnormality occurs.

[0083] In a feasible implementation manner, the type of the communication master station includes a sending master station, the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the sending master station is turned on, and the initial state of the data receiving sub-function of the sending master station is turned off, and the type of the data transmission task includes a data receiving task; the step of updating the data transmission function in the step S30 to undertake the data transmission task requested to be transferred out by the second interrupt request signal may include step A30:

[0084] Step A30, when the type of the communication master station is a sending master station, start the data receiving sub-function to undertake the data receiving task requested to be transferred out by the second interrupt request.

[0085] Exemplarily, the Ethernet communication system includes two communication master stations, wherein the data transmission function of any one of the communication master stations only turns on the data sending subfunction, while the other communication master station only turns on the data receiving subfunction. When the communication master station that only turns on the data sending subfunction receives a second interrupt request signal transmitted by the communication master station that only turns on the data receiving subfunction, the communication master station that only turns on the data sending subfunction also turns on the data receiving subfunction to undertake the data receiving task requested to be transferred out by the second interrupt request transmitted by the other communication master station that only turns on the data receiving subfunction through inter-core communication.

[0086] In this embodiment, the communication master station that has only the data sending sub-function enabled takes over the transferred data receiving task by enabling the data receiving sub-function, thereby solving the problem of being unable to take over the transferred data receiving task.

[0087] In another feasible implementation manner, the type of the communication master station includes a receiving master station, and the data transmission function includes a data sending subfunction and a data receiving subfunction, wherein the initial state of the data sending subfunction of the receiving master station is closed, and the initial state of the data receiving subfunction of the receiving master station is closed; the step of updating the data transmission function in the step S30 to undertake the data transmission task requested by the second interrupt request signal may also include step B30:

[0088] Step B30, when the type of the communication master station is a receiving master station, start the data sending sub-function, and send the to-be-sent data transmitted by other communication master stations to the slave station to undertake the data sending task requested to be transferred out by the second interrupt request.

[0089] Exemplarily, the Ethernet communication system includes two communication master stations, wherein the data transmission function of any one of the communication master stations only turns on the data sending subfunction, while the other communication master station only turns on the data receiving subfunction. When the communication master station that only turns on the data receiving subfunction receives the second interrupt request signal transmitted by the communication master station that only turns on the data sending subfunction, the communication master station that only turns on the data receiving subfunction also turns on the data sending subfunction, and through the turned-on data sending subfunction, sends the data to be sent transmitted by the communication master station that only turns on the data sending subfunction to the slave station, so as to undertake the data sending task requested to be transferred out by the other communication master station that only turns on the data sending subfunction through the second interrupt request transmitted through the inter-core communication.

[0090] In this embodiment, the communication master station that has only the data receiving sub-function enabled accepts the transferred data sending task by enabling the data sending sub-function, thereby solving the problem of being unable to accept the transferred data sending task.

[0091] In this embodiment, after receiving the interrupt request signal, the communication master station with normal functions updates the data transmission function, thereby ensuring that the data transmission task is further carried out normally, thereby further improving the reliability of the Ethernet communication system.

[0092] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , Figure 3 This is a flow chart of the third embodiment of the Ethernet communication method of the present application. The Ethernet communication method further includes steps S01-S02:

[0093] Step S01, when the type of the communication master station is a sending master station, sending data to be sent to the slave station, and receiving data to be processed transmitted by other communication masters that are receiving masters;

[0094] It should be noted that the data to be processed is the data sent by the slave station and received by the communication master station, and the data needs to be further processed by the master station.

[0095] It is understandable that, since the sending main station cannot manage data uniformly when the data transmission task configured by the sending main station is single, step S01 is performed to enable the sending main station to uniformly manage communication data by processing the received data to be processed.

[0096] Exemplarily, the Ethernet communication system includes two communication master stations, wherein the data transmission function of any communication master station only turns on the data sending subfunction, that is, the sending master station only turns on the data sending subfunction, and the other communication master station only turns on the data receiving subfunction, that is, the receiving master station only turns on the data receiving subfunction. The sending master station sends the data to be sent to the slave station through the data sending subfunction, and receives the data to be processed transmitted by the receiving master station through inter-core communication.

[0097] Step S02, when the type of the communication master station is a receiving master station, receiving the data to be processed sent by the slave station, and transmitting the data to be processed to other communication masters that are sending masters.

[0098] Exemplarily, the Ethernet communication system includes two communication master stations, wherein the data transmission function of any communication master station only turns on the data sending subfunction, that is, the sending master station only turns on the data sending subfunction, and the other communication master station only turns on the data receiving subfunction, that is, the receiving master station only turns on the data receiving subfunction. The receiving master station receives the to-be-processed data sent by the slave station through the data receiving subfunction, and transmits the to-be-processed data to the sending master station through inter-core communication.

[0099] It is understandable that since the receiving main station is unable to perform unified management of data due to the single data transmission task configured by the receiving main station, step S01 is performed to enable the sending main station to uniformly manage communication data by transmitting the unprocessed data received by the receiving main station to the sending main station for processing.

[0100] For example, please refer to Figure 4 , Figure 4 A schematic diagram of a scenario of an Ethernet communication method provided in Example 3 of the present application. The figure provides two Ethernet communication master stations, namely Ethernet communication master station 1 and Ethernet communication master station 2, and multiple slave stations communicating with the communication master stations, namely SLAVE 1, SLAVE 2, SLAVE n, i.e., slave station 1, slave station 2, slave station n, wherein the letter n represents any number of slave stations. When the communication master station 1 sends data to the slave station, the communication master station 2 receives data from the slave station, and data can be transmitted between the communication master station 1 and the communication master station 2 by means of inter-core communication. When an abnormal condition occurs in any communication master station, the abnormal master station will transmit an INTR signal, i.e., an interrupt request signal, to the other master station, which is used to request another normally operating master station to undertake the data transmission task that it cannot continue.

[0101] In this embodiment, communication data is collected at the sending main station for unified processing, so that the communication data is uniformly managed at the sending main station, thereby avoiding problems such as data status asynchrony caused by inconsistency between the sending and receiving main stations, thereby further enhancing the reliability of the Ethernet communication system.

[0102] For example, to help understand the implementation process of the Ethernet communication method obtained by combining the above-mentioned embodiment 1 and embodiment 2, please refer to Figure 5 , Figure 5 A brief flow chart of an Ethernet communication method is provided, specifically:

[0103] First, start the Ethernet communication master station 1 and the Ethernet communication master station 2. When the communication master station 1 meets the working conditions, the communication master station sends a communication command Ethernet frame to the slave station so that the slave station can receive the Ethernet frame, wherein the Ethernet frame is the basic unit of the Ethernet communication command and is a data packet on the Ethernet link. When the communication master station 2 does not receive an interrupt request, the Ethernet frame sent by the slave station is received by the communication master station 2, and the received Ethernet frame is transmitted to the communication master station 1, and the normal sending and receiving process of the Ethernet frame is maintained, that is, the communication master station 1 sends and the communication master station 2 receives. When the communication master station 1 has an abnormal condition and does not meet the working conditions, the communication master station 1 sends an interrupt request to the communication master station 2. After the communication master station 2 receives the interrupt request, the communication master station 2 will undertake the Ethernet frame sending task of the communication master station 1, that is, the communication master station 2 sends a communication command Ethernet frame so that the slave station can receive the Ethernet frame, and then the communication master station 2 receives the Ethernet frame sent by the slave station, and the communication master station 2 keeps the sending and receiving of the Ethernet frame, so that the Ethernet communication system can run stably and reliably.

[0104] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the Ethernet communication method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0105] This application also provides an Ethernet communication device, please refer to Figure 6 , the Ethernet communication device is applied to a communication master station, the Ethernet communication system where the communication master station is located also includes a slave station communicating with the communication master station, the communication master station is configured with a data transmission task for transmitting data with the slave station, and the data transmission task is executed by a data transmission function of the communication master station;

[0106] The Ethernet communication device comprises:

[0107] A monitoring module 10, used to monitor the data transmission function;

[0108] The transfer module 20 is used to transfer the data transmission task to other communication master stations in the Ethernet communication system when an abnormality occurs in the data transmission function.

[0109] Optionally, the type of the communication master station includes a sending master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the sending master station is on, and the initial state of the data receiving sub-function of the sending master station is off;

[0110] The transfer module 20 is also used for:

[0111] When the type of the communication master station is a sending master station, closing the data sending subfunction;

[0112] The unsuccessfully sent data to be sent and the first interrupt request signal are transmitted to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task.

[0113] Optionally, the type of the communication master station includes a receiving master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the receiving master station is closed, and the initial state of the data receiving sub-function of the receiving master station is opened;

[0114] The transfer module 20 is also used for:

[0115] When the type of the communication master station is a receiving master station, closing the data receiving subfunction;

[0116] The first interrupt request signal is transmitted to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task.

[0117] Optionally, the Ethernet communication device further includes:

[0118] When no abnormality occurs in the data transmission function and after receiving a second interrupt request signal transmitted by other communication master stations in the Ethernet communication system, the data transmission function is updated to take over the data transmission task requested by the second interrupt request signal.

[0119] Optionally, the type of the communication master station includes a sending master station, the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the sending master station is on, and the initial state of the data receiving sub-function of the sending master station is off, and the type of the data transmission task includes a data receiving task;

[0120] The Ethernet communication device is also used for:

[0121] When the type of the communication master station is a sending master station, the data receiving sub-function is enabled to undertake the data receiving task requested to be transferred out by the second interrupt request.

[0122] Optionally, the type of the communication master station includes a receiving master station, and the data transmission function includes a data sending sub-function and a data receiving sub-function, wherein the initial state of the data sending sub-function of the receiving master station is closed, and the initial state of the data receiving sub-function of the receiving master station is closed;

[0123] The Ethernet communication device is also used for:

[0124] When the type of the communication master station is a receiving master station, the data sending sub-function is turned on, and the to-be-sent data transmitted by other communication master stations is sent to the slave station to undertake the data sending task requested to be transferred out by the second interrupt request.

[0125] Optionally, the Ethernet communication device is further used for:

[0126] In the case where the type of the communication master station is a sending master station, sending data to be sent to the slave station, and receiving data to be processed transmitted by other communication masters which are receiving masters;

[0127] In the case where the type of the communication master station is a receiving master station, the to-be-processed data sent by the slave station is received, and the to-be-processed data is transmitted to other communication masters which are sending masters.

[0128] The Ethernet communication device provided by the present application adopts the Ethernet communication method in the above embodiment, which can solve the technical problem of how to enhance the reliability of the Ethernet communication system. Compared with the prior art, the beneficial effects of the Ethernet communication device provided by the present application are the same as the beneficial effects of the Ethernet communication method provided by the above embodiment, and other technical features in the Ethernet communication device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0129] The present application provides an Ethernet communication device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the Ethernet communication method in the above-mentioned embodiment 1.

[0130] Reference below Figure 7 , which shows a schematic diagram of the structure of an Ethernet communication device suitable for implementing an embodiment of the present application. The Ethernet communication device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The Ethernet communication device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0131] like Figure 7As shown, the Ethernet communication device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the xxx device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the Ethernet communication device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows an Ethernet communication device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided alternatively.

[0132] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0133] The Ethernet communication device provided by the present application adopts the Ethernet communication method in the above embodiment, which can solve the technical problem of how to enhance the reliability of the Ethernet communication system. Compared with the prior art, the beneficial effects of the Ethernet communication device provided by the present application are the same as the beneficial effects of the Ethernet communication method provided by the above embodiment, and the other technical features in the Ethernet communication device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0134] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0135] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0136] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the Ethernet communication method in the above-mentioned embodiment.

[0137] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0138] The computer-readable storage medium may be included in the Ethernet communication device; or may exist independently without being assembled into the Ethernet communication device.

[0139] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the Ethernet communication device, the Ethernet communication device: monitors the data transmission function; and when an abnormality occurs in the data transmission function, transfers the data transmission task to other communication master stations in the Ethernet communication system.

[0140] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0142] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0143] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned Ethernet communication method, and can solve the technical problem of how to enhance the reliability of the Ethernet communication system. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the Ethernet communication method provided in the above-mentioned embodiment, and will not be repeated here.

[0144] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the Ethernet communication method as described above are implemented.

[0145] The computer program product provided by the present application can solve the technical problem of how to enhance the reliability of the Ethernet communication system. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the Ethernet communication method provided by the above embodiment, which will not be repeated here.

[0146] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An Ethernet communication method, characterized in that: Applied to a communication master station, the Ethernet communication system where the communication master station is located also includes a slave station communicating with the communication master station, the communication master station is configured with a data transmission task for transmitting data with the slave station, the data transmission task is executed by a data transmission function of the communication master station, the types of the communication master station include a sending master station and a receiving master station, the data transmission function includes a data sending subfunction and a data receiving subfunction, wherein the initial state of the data sending subfunction of the sending master station is on, and the initial state of the data receiving subfunction of the sending master station is off, the initial state of the data sending subfunction of the receiving master station is off, and the initial state of the data receiving subfunction of the receiving master station is on; The method includes: monitoring the data transmission function; When an abnormality occurs in the data transmission function and the type of the communication master station is a sending master station, the data transmission sub-function is turned off; the unsuccessfully sent data to be sent and the first interrupt request signal are transmitted to other communication master stations in the Ethernet communication system through inter-core communication, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task; When an abnormality occurs in the data transmission function and the type of the communication master station is a receiving master station, the data receiving sub-function is turned off; a first interrupt request signal is transmitted to other communication master stations in the Ethernet communication system through inter-core communication, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task; The method further comprises: In the case where the type of the communication master station is a sending master station, sending data to be sent to the slave station, and receiving data to be processed transmitted by other communication masters which are receiving masters; In the case where the type of the communication master station is a receiving master station, receiving the data to be processed sent by the slave station, and transmitting the data to be processed to other communication master stations which are sending master stations; After the step of monitoring the data transmission function, the method further comprises: When no abnormality occurs in the data transmission function and after receiving a second interrupt request signal transmitted by other communication master stations in the Ethernet communication system, updating the data transmission function to undertake the data transmission task requested to be transferred out by the second interrupt request signal; The step of updating the data transmission function to undertake the data transmission task requested by the second interrupt request signal comprises: In the case where the type of the communication master station is a sending master station, starting a data receiving sub-function to undertake the data receiving task requested to be transferred out by the second interrupt request; When the type of the communication master station is a receiving master station, the data sending sub-function is turned on, and the to-be-sent data transmitted by other communication master stations is sent to the slave station to undertake the data sending task requested to be transferred out by the second interrupt request.

2. An Ethernet communication device, characterized in that: Applied to a communication master station, the Ethernet communication system where the communication master station is located also includes a slave station communicating with the communication master station, the communication master station is configured with a data transmission task for transmitting data with the slave station, the data transmission task is executed by a data transmission function of the communication master station, the types of the communication master station include a sending master station and a receiving master station, the data transmission function includes a data sending subfunction and a data receiving subfunction, wherein the initial state of the data sending subfunction of the sending master station is on, and the initial state of the data receiving subfunction of the sending master station is off, the initial state of the data sending subfunction of the receiving master station is off, and the initial state of the data receiving subfunction of the receiving master station is on; The device comprises: A monitoring module, used for monitoring the data transmission function; The transfer module is used to close the data sending sub-function when an abnormality occurs in the data transmission function and the type of the communication master station is a sending master station; transmit the unsuccessfully sent data to be sent and the first interrupt request signal to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task; When the data transmission function is abnormal and the type of the communication master station is a receiving master station, the data receiving sub-function is turned off; a first interrupt request signal is transmitted to other communication master stations in the Ethernet communication system, wherein the first interrupt request signal is used to request other communication master stations to undertake the transferred data transmission task; The device also includes: In the case where the type of the communication master station is a sending master station, sending data to be sent to the slave station, and receiving data to be processed transmitted by other communication masters which are receiving masters; In the case where the type of the communication master station is a receiving master station, receiving the data to be processed sent by the slave station, and transmitting the data to be processed to other communication master stations which are sending master stations; After the step of monitoring the data transmission function, the device further comprises: When no abnormality occurs in the data transmission function and after receiving a second interrupt request signal transmitted by other communication master stations in the Ethernet communication system, updating the data transmission function to undertake the data transmission task requested to be transferred out by the second interrupt request signal; The step of updating the data transmission function to undertake the data transmission task requested by the second interrupt request signal comprises: In the case where the type of the communication master station is a sending master station, starting a data receiving sub-function to undertake the data receiving task requested to be transferred out by the second interrupt request; When the type of the communication master station is a receiving master station, the data sending sub-function is turned on, and the to-be-sent data transmitted by other communication master stations is sent to the slave station to undertake the data sending task requested to be transferred out by the second interrupt request.

3. An Ethernet communication device, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the Ethernet communication method as claimed in claim 1.

4. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the Ethernet communication method as claimed in claim 1 are implemented.

Citation Information

Patent Citations

  • Method and system for improving reliability of redundancy main station

    CN101296065A

  • Industrial control system based on field bus and control network

    CN101976074A

  • Data transmission system and method used between energy storage power station site equipment

    CN104767598A

  • Communication method and device and readable storage medium

    CN113938387A

  • Clock synchronization method, communication network system, gateway device and communication system

    CN116545569A