CN115208713A - Communication method, system, device, nonvolatile storage medium and electronic equipment - Google Patents

Communication method, system, device, nonvolatile storage medium and electronic equipment Download PDF

Info

Publication number
CN115208713A
CN115208713A CN202210843365.5A CN202210843365A CN115208713A CN 115208713 A CN115208713 A CN 115208713A CN 202210843365 A CN202210843365 A CN 202210843365A CN 115208713 A CN115208713 A CN 115208713A
Authority
CN
China
Prior art keywords
target
communication
data
loop
target device
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
CN202210843365.5A
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.)
Xian Novastar Electronic Technology Co Ltd
Original Assignee
Xian Novastar Electronic 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 Xian Novastar Electronic Technology Co Ltd filed Critical Xian Novastar Electronic Technology Co Ltd
Priority to CN202210843365.5A priority Critical patent/CN115208713A/en
Publication of CN115208713A publication Critical patent/CN115208713A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/168Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP] specially adapted for link layer protocols, e.g. asynchronous transfer mode [ATM], synchronous optical network [SONET] or point-to-point protocol [PPP]

Landscapes

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

Abstract

The invention discloses a communication method, a communication system, a communication device, a nonvolatile storage medium and electronic equipment. Wherein, the method comprises the following steps: a first target device receives target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; in the case where the first target device is a destination device, the target data is processed. The invention solves the technical problem of low stability of the communication network caused by adopting the communication network with the star topology structure in the related technology.

Description

Communication method, system, device, nonvolatile storage medium and electronic equipment
Technical Field
The present invention relates to the field of video processing, and in particular, to a communication method, system, apparatus, non-volatile storage medium, and electronic device.
Background
In the conventional image processing system, when a plurality of devices or modules in the system need to communicate with each other, a method is generally adopted in which each device in the system is connected through a switch to form a star-shaped communication network as shown in fig. 1. The problem with this approach is that when the network switch fails, the entire communication network is unavailable and the devices can no longer communicate with each other.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
Embodiments of the present invention provide a communication method, system, apparatus, non-volatile storage medium, and electronic device, so as to at least solve the technical problem of low stability of a communication network due to a star-topology communication network in the related art.
According to an aspect of an embodiment of the present invention, there is provided a communication method including: a first target device receives target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; processing the target data in case that the first target device is the destination device; and in the event that the first target device is not the destination device, communicating the target data to a third target device, wherein the third target device is a device in the target communication loop other than the second target device and adjacent to the first target device.
According to another aspect of the embodiments of the present invention, there is also provided a communication system, including a plurality of communication devices and a switch, wherein each of the plurality of communication devices is configured to execute the communication method according to any one of claims 1 to 10, and each of the plurality of communication devices forms a first communication loop and a second communication loop with a communication device adjacent to the each communication device through a communication link, and data transmission directions in the first communication loop and the second communication loop are different; the switch is connected with each of the plurality of communication devices.
According to another aspect of the embodiments of the present invention, there is also provided a communication apparatus, adapted to a first target device, including: the first communication module is used for receiving target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; the first processing module is used for determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; the second processing module is used for processing the target data under the condition that the first target equipment is the target equipment; and the second communication module is used for transmitting the target data to a third target device under the condition that the first target device is not the target device, wherein the third target device is a device except the second target device and adjacent to the first target device in the target communication loop.
According to another aspect of the embodiments of the present invention, there is also provided a nonvolatile storage medium including a stored program, wherein the apparatus in which the nonvolatile storage medium is controlled to execute the communication method when the program is executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, which includes a processor for executing a program, wherein the program executes to perform the communication method.
In the embodiment of the present invention, a first target device is adopted to receive target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are located in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; under the condition that the first target device is the target device, the target data is processed in a mode that a communication loop comprising a plurality of target devices is established and adjacent devices in the communication loop are directly connected through a communication link, so that the aim of avoiding the devices from communicating only through a switch is fulfilled, the technical effect of avoiding the breakdown of the whole communication network under the condition that the switch breaks down is achieved, and the technical problem of low stability of the communication network caused by the communication network adopting a star-type topological structure in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a connection diagram of a communication network according to the related art;
fig. 2 is a flow chart of a communication method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a communication system provided in accordance with an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another communication system provided in accordance with an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another communication system provided in accordance with an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided a method embodiment of a communication method, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 2 is a communication method according to an embodiment of the present invention, which is applied to any one of the communication devices in the communication system as shown in fig. 3, 4 or 5. As shown in fig. 2, the method comprises the steps of:
step S202, a first target device receives target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link;
it should be noted that the first target device may be any communication device in the target communication loop, and the second target device is a target device adjacent to the first target device in the target communication loop, where the adjacent to the first target device in this application means that the second target device and the third target device are directly connected through a communication line.
In some embodiments of the present application, three or more communication devices may be included in the target communication loop. Taking the number of communication devices included in the target communication loop as three as an example, it is assumed that the devices in the target communication loop are communication device a, communication device B, and communication device C, respectively, and that communication device a is directly connected to communication device B and communication device C through a communication line, and communication device B is also directly connected to communication device C through a communication line. At this time, any communication apparatus may be used as the first target communication apparatus in step S202 described above for the communication apparatus a, the communication apparatus B, and the communication apparatus C. For example, in the case where the communication device a is a first target communication device, the communication device B or the communication device C may be a second target communication device. The same applies to the communication device B or the communication device C as the first target communication device.
It should be noted that in the communication scheme provided in the present application, the second target communication device may also receive the target data transferred by the first target communication device, that is, in the communication scheme provided in the present application, the adjacent communication devices may transfer data to each other.
As an alternative implementation, the target communication loop may include a first target communication loop and a second target communication loop, and the first target communication loop and the second target communication loop include the same devices, except that the data transmission direction is opposite. For example, when the data transmission direction in the first destination communication loop is clockwise, the data transmission direction in the second destination communication loop is counterclockwise.
In some embodiments of the present application, for a communication system including a first target communication loop and a second target communication loop, when receiving target data transmitted by a second communication device, a first communication device in the communication system may determine a loop state of the first target communication loop, where the first target communication loop is a communication loop passing through the first target device, the second target device, and a third target device, a data transmission direction in the first target communication loop is a first transmission direction, and the first transmission direction is a transmission direction from the second target device to the first target device, and then from the first target device to the third target device; then when the loop state of the first target communication loop is determined to be a fault-free state, the first target device receives target data transmitted by the second target device through the first target communication loop; and when the loop state is determined to be the fault state, the first target communication device receives target data transmitted by a second target device through a second target communication loop, wherein the second target communication loop is a communication loop passing through the first target device, the second target device and a third target device, the data transmission direction in the second target communication loop is a second transmission direction, and the second transmission direction is transmitted to the first target device from the third target device and then transmitted to the second target device from the first target device.
As an alternative embodiment, the loop status of the first target communication loop may be determined by the following method; determining that a loop state of the first target communication loop is a non-fault state under the condition that the first communication device receives the target data within a preset time period; and determining that the loop state of the first target communication loop is a fault state under the condition that the first communication device does not receive the target data within the preset time period.
Specifically, after the first target device successfully receives the target data transmitted by the second target device, the first target device feeds back to the second target device an indication message for indicating successful reception of the target data. When the indication information fed back by the first target device is not received within the preset time period, it can be determined that the first target communication loop has a fault, and at this time, the second target device transmits target data to the first target device through the second target communication loop.
It should be noted that, at this time, the second target device does not directly transfer the target data to the first target device, but first transfers the target data to a device adjacent to the second target device except the first target device, and then the device transfers the target data to a next target device according to the data transfer direction in the second target communication loop until the target data is transferred to a third target device, and then the third target device transfers the target data to the first target device, wherein the third target device is another device adjacent to the first target device.
In some embodiments of the present application, in addition to the first target communication loop and the second target communication loop, a switch may be further provided in the communication network, wherein the switch is connected to each communication device, and the switch is in a dormant state when the first target communication loop or the second target communication loop can normally operate, and the switch can normally operate only when both the first target communication loop and the second target communication loop fail. Specifically, when the link states of a first target communication loop and a second target communication loop are both fault states, a first target communication device receives the target data transmitted by a second target device through a target switch, where the target switch is a switch connected to the first target communication device and the second target communication device.
Step S204, determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data;
in some embodiments of the present application, the target data includes first device identification information and second device identification information, where the first device identification information is device identification information of a device that generates the target data, and the second device identification information is device identification information of the destination device, and determining the destination device corresponding to the target data includes: determining the second device identification information in the target data; and determining the target equipment corresponding to the target data according to the second equipment identification information.
Specifically, the target data may be transmitted in the form of a data packet in the target communication loop, wherein the first device identification information and the second device identification information may be carried by a packet header of the data packet.
As an alternative implementation, a corresponding data area may be set in a data packet in a customized manner for each device in the target communication loop, and each data area includes a source end identifier, a destination end identifier and valid data to be transmitted. For example, as shown in the following table, assuming that four devices are included in the target communication loop, corresponding labels 0x00, 0x01, 0x02, and 0x03 may be set in the data packet for each device, and the data in the data packet may be divided into 4 regions, each region being 1024 bytes, where the first byte represents the source end label, that is, the device label of the data transmitting end of the region; the second byte is the destination label, i.e. the device label at the receiving end of the region data, and the last 1022 bytes are the valid data of the region, i.e. the valid data to be transmitted by the device to the destination device.
Address Source end label Destination end number Valid data
0-1023 0x00 0x02
1024-2047 0x01 0x03
2048-3071 0x02 0x00
3072-4095 0x03 0x01
In some embodiments of the present application, when determining a destination device corresponding to the target data, in order to improve communication efficiency, the target data may be copied to obtain mirror image data of the target data, and the target data is sent to the third target communication device; and determining the target equipment corresponding to the target data according to the mirror image data.
In addition, in some embodiments of the present application, the target communication loop may also be constructed between different processors in the same device, in which case, each processor may be regarded as an independent device, thereby implementing the communication method provided in the present application in a device including multiple processors. For example, if a video processing device internally includes a first processor responsible for acquiring images, a second processor responsible for optimizing the images, and a third processor responsible for editing the images, the target communication loop can be established among the three processors, so as to realize mutual communication among different processors.
Step S206, under the condition that the first target device is the target device, processing the target data; and in the event that the target data is not the destination device, communicating the target data to a third target device, wherein the third target device is a device in the target communication loop other than the second target device and adjacent to the first target device.
In some embodiments of the present application, in the case where the first target device is the destination device, processing the target data comprises: determining and recording the first device identification information in the target data; and determining first valid data carried in the target data, wherein the first valid data comprises at least one of the following data: device control instructions, multimedia data.
In some embodiments of the present application, after determining valid data carried in the target data, the first target device may further write second valid data in the target data, and update the first device identification information and the second device identification information in the target data; and sending the target data to the third target equipment.
Optionally, in a case that the destination device of the target data is not a third target device, the target data is transferred by the third target device to a fourth target device, and the fourth target device is a device in the target communication loop, except for the first target device, and adjacent to the third target device.
Specifically, the target data is transmitted in the form of data packets in the communication loop. The packet may divide a plurality of data storage areas within the packet according to the number of devices in the communication loop. For example, if the total number of bytes of data that can be accommodated by the data packet is 4096 bytes and the number of devices in the communication circuit is four, the 0 th to 1023 th bytes in the data packet may correspond to the data generated by the first device, the 1024 th to 2047 th bytes may correspond to the data generated by the second device, the 2048 th to 3071 th bytes may correspond to the data generated by the third device, and the 3072 th to 4095 th bytes may correspond to the data generated by the fourth device. After each device in the communication loop receives a data packet corresponding to target data, when it is determined that new data needs to be written in the data packet, the newly generated data is written in a storage area corresponding to each device in the data packet, and the newly generated data is written to cover original old data in the storage area. In this way, the time consumed by the device in generating the data packet can be reduced, thereby improving the overall communication efficiency.
In some embodiments of the present application, updating the first device identification information and the second device identification information in the target data comprises: determining third device identification information corresponding to the first target device and fourth device identification information of the target device corresponding to the second valid data; determining that the third device identification information is the first device identification information, and determining that the fourth device identification information is the second device identification information.
Receiving target data transmitted by a second target device through a target communication loop by using a first target device, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; under the condition that the first target device is the target device, the target data is processed in a mode that a communication loop comprising a plurality of target devices is established and adjacent devices in the communication loop are directly connected through a communication link, so that the aim of avoiding the devices from communicating only through a switch is fulfilled, the technical effect of avoiding the breakdown of the whole communication network under the condition that the switch breaks down is achieved, and the technical problem of low stability of the communication network caused by the communication network adopting a star-type topological structure in the related technology is solved.
Example 2
According to an embodiment of the present invention, an embodiment of a communication system is provided. Fig. 3 is a schematic structural diagram of a communication system provided according to an embodiment of the present invention. As shown in fig. 3, the communication system is composed of a plurality of communication devices 30, each communication device 30 of the plurality of communication devices 30 is operable to execute the communication method described in embodiment 1, and each communication device 30 constitutes a first communication loop and a second communication loop with the communication device 30 adjacent to each communication device 30 through a communication link, wherein the data transmission directions in the first communication loop and the second communication loop are different
According to an embodiment of the present invention, another embodiment of a communication system is provided. Fig. 4 is a schematic structural diagram of a communication system provided according to an embodiment of the present invention. As shown in fig. 4, the communication system includes: a plurality of communication devices 30, a switch 32, wherein, like the communication system shown in fig. 3, each communication device 30 of the plurality of communication devices 30 within the communication system shown in fig. 4 is operable to execute the communication method described in embodiment 1, and each communication device 30 constitutes a first communication loop and a second communication loop with the communication device 30 adjacent to each communication device 30 through a communication link, wherein the data transmission directions in the first communication loop and the second communication loop are different; a switch connected to each of the plurality of communication devices 30.
In some embodiments of the present application, the communication link may further include a converter corresponding to a data interface of the communication device, and the connection and data interaction between the communication link of the first interface type and the data interface of the communication device of the second interface type may be implemented.
As can be seen from fig. 4, since the embodiment of the present application includes two ring communication loops and one switch, the communication system provided by the embodiment of the present application has higher stability compared to the related art. Specifically, when a first communication loop fails, the communication system can continue communication through a second communication loop. When the first communication loop and the second communication loop both fail, communication between different devices can be realized through the switch.
When the communication devices 30 in the communication system communicate through the switch, each communication device 30 is connected to the network switch by taking the network switch as a center, the MAC address and the IP address of each communication device 30 are determined, and each communication device 30 sends and receives a corresponding data packet through a network communication protocol. For example, when the first communication device needs to send command data to the second communication device, the first communication device may package, according to the UDP protocol, the source MAC address and the IP address of the first communication device, and the destination MAC address and the IP address of the second communication device, fill the command data to be sent in valid data bits of the UDP protocol, and send the command data to the network switch after the network packet is formed. When the second communication device detects that the destination MAC and IP of the UDP packet received by the RX end are the MAC and IP of the second communication device, the second communication device receives the packet data and analyzes the source MAC and IP at the same time, thereby judging which communication device the data packet comes from. And the effective data bit of the UDP packet is analyzed to be command data sent to the second communication equipment by the first communication equipment, and the packet data transmission is finished.
Specifically, taking the communication system shown in fig. 5 as an example, the FPGA and the MCU are bridged by the network transceiver and the converter, so that the ARM and the MCU can receive and transmit network signals, and the FPGA and the ARM are directly connected by the RGMII bus. Therefore, annular communication links in the clockwise direction and the anticlockwise direction are formed among the three devices, one communication link is a main communication link, the other communication link is a backup link, when the main communication link fails, the backup link can be started, and the stability of the system is high.
Taking a clockwise communication loop as an example, the TX end of the FPGA sends a data packet to the ARM, and the RX end receives the data packet sent by the MCU; the TX end of the ARM sends the data packet to the MCU, and the RX end receives the data packet sent by the FPGA; and the TX end of the MCU sends the data packet to the FPGA, and the RX end receives the data packet sent by the ARM. Each device analyzes the data information sent to itself from the received data packet, and fills the data information to be sent into the data packet and sends the data information to the next level. Therefore, the three devices can realize arbitrary communication in pairs without participation of a network switch. And when a clockwise communication link fails, the same functionality can be achieved using a counterclockwise communication loop.
And when the two communication loops are in failure, the FPGA, the ARM and the MCU can use the network switching chip as the center of the communication structure. Specifically, the three devices are connected to the switch after being bridged by the network transceiver chip. The three devices respectively send the data packets to the network switching chip and receive the data packets from the network switching chip, so that the three devices can communicate with each other arbitrarily.
It should be noted that the communication system shown in fig. 5 may also be a communication system formed by connecting different processing modules in the same device, in this case, the communication device in the communication method described in embodiment 1 is identical to the processing module in fig. 5, that is, any processing module in fig. 5 may execute the communication method in embodiment 1.
It should be noted that, since the communication system provided in this embodiment can be used to execute the communication method in embodiment 1, the explanation about the communication method in embodiment 1 is also applicable to this embodiment, and is not described herein again.
Example 3
According to an embodiment of the present invention, an embodiment of a communication apparatus is provided. Fig. 6 is a schematic structural diagram of a communication device according to an embodiment of the present invention. As shown in fig. 6, the communication apparatus is applied to a first target device, and includes: a communication module 60, configured to receive target data transferred by a second target device through a target communication loop, where the first target device and the second target device are located in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; the first processing module 62 determines a destination device corresponding to the target data, where the destination device is a device that receives and processes the target data; and a second processing module 64, configured to process the target data if the first target device is the destination device.
In some embodiments of the present application, in case that the first target device is not the destination device, the communication module 60 is further configured to transmit the target data to a third target device through the target communication loop, wherein the third target device is located in the target communication loop and the third target device is adjacent to the first target device.
In some embodiments of the present application, the target communication loop includes a first target communication loop and a second target communication loop, wherein the specific process of the communication module 60 receiving the target data transferred by the second target device through the target communication loop includes: determining a loop state of a first target communication loop, wherein the first target communication loop is a communication loop passing through the first target device, the second target device and the third target device, a data transmission direction in the first target communication loop is a first transmission direction, and the first transmission direction is a transmission direction from the second target device to the first target device and then from the first target device to the third target device; when the loop state is a fault-free state, the first target device receives the target data transmitted by the second target device through the first target communication loop; when the loop status is a failure status, the first target communication device receives the target data transmitted by the second target device through a second target communication loop, where the second target communication loop is a communication loop passing through the first target device, the second target device, and the third target device, a data transmission direction in the second target communication loop is a second transmission direction, and the second transmission direction is transmitted from the third target device to the first target device, and then from the first target device to the second target device.
In some embodiments of the present application, the specific flow of the communication module 60 determining the loop status of the first target communication loop is as follows: determining that the loop state of the first target communication loop is a fault-free state under the condition that the first communication device receives the target data within a preset time period; and determining that the loop state of the first target communication loop is a fault state under the condition that the first communication device does not receive the target data within the preset time period.
In some embodiments of the present application, when both the first target communication loop and the second target communication loop fail, the communication module 60 may further receive target data sent by the second target device through a target switch, where the target switch is a switch connected to the first target device and the second target device.
In some embodiments of the present application, the determining, by the first processing module 62, a destination device corresponding to the target data includes: copying the target data to obtain mirror image data of the target data, and sending the target data to the third target communication device; and determining the target equipment corresponding to the target data according to the mirror image data. In some embodiments of the present application, the target data includes first device identification information and second device identification information, where the first device identification information is device identification information of a device that generates the target data, and the second device identification information is device identification information of the destination device, where determining, by the first processing module 62, the destination device corresponding to the target data includes: determining the second device identification information in the target data; and determining the target equipment corresponding to the target data according to the second equipment identification information.
In some embodiments of the present application, in a case that the first target device is the destination device, a specific method for the second processing module 64 to process the target data includes: determining and recording the first device identification information in the target data; and determining first valid data carried in the target data, wherein the first valid data comprises at least one of the following data: device control instructions, multimedia data.
In some embodiments of the present application, after determining valid data carried in the target data, the second processing module 64 is further configured to write second valid data in the target data, and update the first device identification information and the second device identification information in the target data; and sending the target data to the third target equipment.
In some embodiments of the present application, the method for the second processing module 64 to update the first device identification information and the second device identification information in the target data includes: determining third device identification information corresponding to the first target device and fourth device identification information of the target device corresponding to the second valid data; determining that the third device identification information is the first device identification information, and determining that the fourth device identification information is the second device identification information.
It should be noted that the communication apparatus provided in this embodiment can be used to execute the communication method in embodiment 1, and therefore, the explanation about the communication method in embodiment 1 is also applicable to the embodiment of the present application.
Example 4
According to an embodiment of the present invention, an embodiment of a non-volatile storage medium is provided. The nonvolatile storage medium includes a stored program, wherein the apparatus in which the nonvolatile storage medium is controlled to execute the following communication method when the program is executed: a first target device receives target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; in the case where the first target device is a destination device, the target data is processed.
According to an embodiment of the present invention, an embodiment of an electronic device is provided. The electronic equipment comprises a processor, wherein the processor is used for running the program, and the program executes the following communication method when running: a first target device receives target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are positioned in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link; determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data; in the case where the first target device is a destination device, the target data is processed.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A method of communication, comprising:
a first target device receives target data transmitted by a second target device through a target communication loop, wherein the first target device and the second target device are located in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link;
determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data;
processing the target data in case the first target device is the destination device; and the number of the first and second groups,
and in the case that the first target device is not the destination device, transferring the target data to a third target device, wherein the third target device is a device in the target communication loop except the second target device and adjacent to the first target device.
2. The communication method according to claim 1, wherein the target data includes first device identification information and second device identification information, the first device identification information is device identification information of a device that generates the target data, and the second device identification information is device identification information of the destination device, wherein determining the destination device corresponding to the target data includes:
determining the second device identification information in the target data;
and determining the target equipment corresponding to the target data according to the second equipment identification information.
3. The communication method according to claim 2, wherein, in the case where the first target device is the destination device, processing the target data comprises:
determining and recording the first device identification information in the target data; and the number of the first and second groups,
determining first valid data carried in the target data, wherein the first valid data comprises at least one of the following data: device control instructions, multimedia data.
4. The communication method according to claim 3, wherein after determining the valid data carried in the target data, the communication method further comprises:
writing second valid data in the target data, and updating the first device identification information and the second device identification information in the target data;
and sending the target data to the third target device, wherein in the case that the target device of the target data is not the third target device, the target data is transferred to a fourth target device by the third target device, and the fourth target device is a device in the target communication loop, except for the first target device, and adjacent to the third target device.
5. The communication method according to claim 4, wherein updating the first device identification information and the second device identification information in the target data comprises:
determining third device identification information corresponding to the first target device and fourth device identification information of the target device corresponding to the second valid data;
determining that the third device identification information is the first device identification information, and determining that the fourth device identification information is the second device identification information.
6. The communication method of claim 1, wherein the target communication loop comprises a first target communication loop and a second target communication loop, and wherein the first target device receiving target data communicated by the second target device over the target communication loop comprises:
determining a loop state of a first target communication loop, where the first target communication loop is a communication loop that passes through the first target device, the second target device, and the third target device, a data transmission direction in the first target communication loop is a first transmission direction, and the first transmission direction is a direction that is transmitted from the second target device to the first target device and then transmitted from the first target device to the third target device;
when the loop state is a fault-free state, the first target device receives the target data transmitted by the second target device through the first target communication loop;
when the loop status is a failure status, the first target communication device receives the target data transmitted by the second target device through a second target communication loop, where the second target communication loop is a communication loop passing through the first target device, the second target device, and the third target device, a data transmission direction in the second target communication loop is a second transmission direction, and the second transmission direction is transmitted from the third target device to the first target device, and then from the first target device to the second target device.
7. The communication method of claim 6, wherein determining the loop state of the first target communication loop comprises:
determining that a loop state of the first target communication loop is a no-fault state under the condition that the first target communication device receives the target data within a preset time period;
and determining that the loop state of the first target communication loop is a fault state under the condition that the first target communication device does not receive the target data within the preset time period.
8. The communication method of claim 6, wherein the first target device receiving the target data communicated by the second target device comprises:
when the link states of the first target communication loop and the second target communication loop are both fault states, the first target communication device receives the target data transmitted by the second target device through a target switch, wherein the target switch is a switch connected with the first target communication device and the second target communication device.
9. The communication method according to claim 1, wherein determining the destination device corresponding to the target data comprises:
copying the target data to obtain mirror image data of the target data, and sending the target data to the third target communication device;
and determining the target equipment corresponding to the target data according to the mirror image data.
10. The communication method according to claim 1, wherein after determining the destination device corresponding to the target data, the communication method further comprises:
in the event that the first target device is not the destination device, communicating the target data over the target communication loop to a third target device, wherein the third target device is located in the target communication loop and the third target device is adjacent to the first target device.
11. A communication system comprising a plurality of communication devices, a switch, wherein,
each of the plurality of communication apparatuses for performing the communication method according to any one of claims 1 to 10, and each constituting a first communication loop and a second communication loop with a communication apparatus adjacent to the each communication apparatus through a communication link, wherein data transmission directions in the first communication loop and the second communication loop are different;
the switch is connected with each of the plurality of communication devices.
12. A communication apparatus adapted to be used in a first target device, comprising:
a first communication module, configured to receive target data transferred by a second target device through a target communication loop, where the first target device and the second target device are located in the target communication loop, the second target device is a device adjacent to the first target device, and any two adjacent devices in the target communication loop are directly connected through a communication link;
the first processing module is used for determining target equipment corresponding to the target data, wherein the target equipment is equipment for receiving and processing the target data;
the second processing module is used for processing the target data under the condition that the first target device is the target device;
a second communication module, configured to, if the first target device is not the destination device, transfer the target data to a third target device, where the third target device is a device in the target communication loop, other than the second target device, and adjacent to the first target device.
13. A non-volatile storage medium, comprising a stored program, wherein the non-volatile storage medium is controlled by a device to perform the communication method according to any one of claims 1 to 10 when the program is executed.
14. An electronic device comprising a processor, wherein the processor is configured to execute a program, wherein the program is configured to perform the communication method according to any one of claims 1 to 10 when the program is executed.
CN202210843365.5A 2022-07-18 2022-07-18 Communication method, system, device, nonvolatile storage medium and electronic equipment Pending CN115208713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210843365.5A CN115208713A (en) 2022-07-18 2022-07-18 Communication method, system, device, nonvolatile storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210843365.5A CN115208713A (en) 2022-07-18 2022-07-18 Communication method, system, device, nonvolatile storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115208713A true CN115208713A (en) 2022-10-18

Family

ID=83582568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210843365.5A Pending CN115208713A (en) 2022-07-18 2022-07-18 Communication method, system, device, nonvolatile storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115208713A (en)

Similar Documents

Publication Publication Date Title
CN109688016B (en) Method for switching time slot configuration in flexible Ethernet protocol and related equipment
US9742663B2 (en) System and method for reducing information loss in an aggregated information handling system
US7639605B2 (en) System and method for detecting and recovering from virtual switch link failures
CN101189837B (en) Packet ring network system, packet transfer method, and node
JP6105155B2 (en) Method and system for exchanging information between same end-to-end systems in DRNI
CN101729426B (en) Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)
CN101110776B (en) Backup method, backup device and backup system for data business
US20070217438A1 (en) Ring node device and method of connecting terminal to ring node device
CN110677282A (en) Hot backup method of distributed system and distributed system
KR101075462B1 (en) Method to elect master nodes from nodes of a subnet
JP5029612B2 (en) Packet ring network system, packet transfer method and interlink node
CN102255741B (en) User service information backup method and device
CN115208713A (en) Communication method, system, device, nonvolatile storage medium and electronic equipment
JP6134720B2 (en) Connection method
CN115152192B (en) PCE controlled network reliability
CN110838994B (en) Link state monitoring method of redundant Ethernet based on broadcast protocol
CN101146037A (en) Multi-cascading system and service processing method
JP2012054861A (en) Communication system, and communication control method
CN101720134A (en) Wireless virtual device protocol-based industrial wireless data transmission method
CN110716827A (en) Hot backup method suitable for distributed system and distributed system
WO2024139743A1 (en) Network interface card, single board, electronic device, and service switchover method
CN101645840A (en) Method, system and routing equipment for retransmitting message
CN104219126A (en) Automatic learning method and equipment for subring protocol VLAN (virtual local area network) in virtual channel mode
JP4377033B2 (en) Data transfer control method and apparatus
WO2021223646A1 (en) Protection switching method and apparatus

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