Communication system, communication method, communication device, chip and electronic equipment
By adopting a single-transmit, single-receive ring data path and a hop-by-hop accumulation mechanism in a multi-node system, the efficiency and scalability issues of existing communication protocols in multi-node scenarios are solved, achieving full-duplex communication and automatic synchronization, and simplifying node configuration and resource usage.
Patent Information
- Application Number
- CN202610049598.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2046-01-14
AI Technical Summary
Existing communication protocols cannot simultaneously achieve efficiency, convenience, and scalability in multi-node data interaction scenarios, resulting in problems such as complex network configuration, high transmission latency, high resource consumption, and limited node expansion.
Multiple nodes are connected end-to-end in a single-transmit, single-receive manner to form a unidirectional ring data path. Each node decides whether to forward the data by checking the hop count in the data frame. No address configuration is required for the nodes. Full-duplex communication and automatic synchronization are achieved by using the ring link and the hop count accumulation mechanism.
It simplifies node connection and configuration, reduces resource consumption, improves communication efficiency and stability, and supports flexible network expansion and automatic synchronization.
Smart Images

Figure CN121531053A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data communication, and more particularly to a communication system, a communication method, a communication device, a chip and an electronic device. BACKGROUND
[0002] In the multi-node data interaction scenarios of industrial control, intelligent sensing network, consumer electronics, etc., efficient communication and data synchronization between multiple devices are the core requirements to ensure stable operation of the system. To realize data transmission and instruction interaction of multiple nodes, various communication protocols such as universal asynchronous receiver-transmitter (UART), integrated circuit bus (I2C), serial peripheral interface (SPI), controller area network (CAN), 1-wire, local interconnect network (LIN) are usually used in the prior art. These communication protocols have been widely used in different application scenarios, but they all have corresponding technical defects, which require pre-address configuration and rely on master-slave design, and cannot meet the high requirements of communication efficiency, network configuration convenience and topology scalability of multi-node systems.
[0003] Taking the UART protocol as an example, although it can realize end-to-end bidirectional communication, in the multi-node data synchronization scenario, a node needs to be specified as a master node, and the data of the remaining slave nodes needs to be collected by the master node and then distributed. This architecture not only increases the complexity of network configuration, but also causes a large amount of transmission delay due to the centralized collection and secondary distribution of data, resulting in a significant reduction in communication efficiency. The I2C protocol supports a multi-master multi-slave communication architecture, but its communication link relies on a pull-up resistor to maintain signal stability, which directly limits the improvement of communication speed. At the same time, the arbitration process when multiple masters compete for the bus is complex in logic, and only half-duplex communication can be achieved, further reducing the data interaction efficiency. In addition, the I2C protocol needs to assign an independent address to each node, and the limited addressing space not only limits the number of node expansion, but also easily causes address configuration duplication, increasing the difficulty of network deployment and maintenance. The SPI protocol has a high communication rate, but it uses a single-master multi-slave master-slave architecture, which cannot support a flexible communication mode of multi-master multi-slave, and at least 4 signal lines are required for the communication link, occupying a lot of hardware resources, which is not conducive to the miniaturization and low-cost design of devices. CAN protocol is widely used in vehicle-mounted and industrial control fields, but it also has the limitation of half-duplex communication, and the node filtering, baud rate, etc. The parameter configuration is complicated, increasing the difficulty of system debugging. The defects of 1-wire protocol and LIN protocol are more prominent. Both of them only support half-duplex communication, and the communication rate is low. The 1-wire protocol can only realize simple end-to-end transmission, and the LIN protocol not only does not support multi-master architecture, but also has a theoretical limit on the number of slaves, which cannot meet the expansion requirements of large-scale multi-node networks.
[0004] In summary, the existing various communication protocols cannot take into account the efficiency, convenience and scalability in the multi-node communication scenario, and a new communication system and device are urgently needed to solve the above technical problems. SUMMARY
[0005] The purpose of the present application is to provide a communication system, a communication method, a communication device and a chip. According to an aspect of the present application, a communication system is provided, comprising: a plurality of nodes, each node having a sending port and a receiving port, the plurality of nodes being connected in sequence through the respective sending ports and the receiving ports of adjacent nodes to form a unidirectional ring-shaped data path; each node is configured to: in a self-generation mode, the node sends a data frame generated by itself to the next node, and the hop number in the data frame generated by itself is set to an initial value; in a relay mode, the node judges the hop number field in the received data frame, if the hop number does not reach a first threshold, the hop number of the data frame is incremented and then forwarded to the next node; if the hop number reaches the first threshold, the forwarding of the data frame is stopped; wherein the hop number in the data frame is used to record the forwarding times of the data frame.
[0006] Optionally, the node enters the self-generation mode when the data of the node is ready; the node enters the relay mode when receiving the data frame of the previous node, and the first threshold is the total number of nodes in the communication system minus two.
[0007] Optionally, the data frame includes at least a frame header and a plurality of payloads, the frame header includes a hop number for recording the forwarding times of the data frame, and each node uses the same serial encoding format for signal transmission without assigning an address to each node.
[0008] Optionally, the data frame further includes at least one of data frame description information, a check field and a frame tail, the data frame description information belongs to the frame header, the check field includes an error correction code or a parity check code, and the frame tail is located at the end of the data frame.
[0009] Optionally, each of the payloads includes a start bit, a data bit and an end bit, the data is original data including a plurality of bits; and all nodes in the communication system communicate at the same baud rate.
[0010] Optionally, each of the nodes is further provided with a counter for counting the number of received data frames within a preset period, when the count value reaches a second threshold, the node stops receiving data frames, and when the node sends the data frame generated by itself is completed, it is determined that the communication system is synchronized.
[0011] Optionally, the second threshold is the total number of nodes of the communication system minus one, and if the node does not complete synchronization within the preset period, the node is forced to enter standby mode and report a timeout error.
[0012] According to another aspect of the present application, a communication method is provided for a unidirectional ring channel formed by a plurality of nodes, the method comprising: connecting the plurality of nodes end to end to form a ring channel; powering on / resetting the nodes to enter a standby state; any node encapsulating its data into a data frame with an initialized hop count and sending the data frame to the next node when the data is ready; the node checking the hop count of the received data frame; if the hop count is less than a first threshold, incrementing the hop count of the data frame and forwarding the data frame to the next node, otherwise stopping forwarding.
[0013] Optionally, the node is in a standby state when the sending port is idle, and the node monitors the receiving port of the node in the standby state; if the node receives a data frame and the receiving is completed earlier than the node generates a data frame and the generation is completed, the node enters a relay mode preferentially, otherwise the node enters a self-generation mode preferentially; if both are completed at the same time, the node enters the self-generation mode first to send the generated data frame to the next node, and then enters the relay mode to forward the received data frame to the next node.
[0014] Optionally, each node further comprises a counter, and the communication method further comprises counting the number of received data frames by each node within a preset period, stopping receiving when the count reaches a second threshold, and determining that the whole network is synchronized after the sending of the generated data frame is completed; if synchronization is not completed within the preset period, the node is forced to enter standby mode and report a timeout error.
[0015] According to another aspect of the present application, a communication device is provided for use as a node in the communication system, the communication device comprising: a receiving module configured to obtain a data frame sent by a previous node through a receiving port; a sending module configured to send a data frame to a next node through a sending port; a buffer module configured to temporarily store data; and a control module connected to the receiving module, the sending module and the buffer module, the control module being configured to control the communication device to enter a self-generation mode when the data of the communication device is ready, and to control the sending module to send the data of the communication device as a data frame with an initial hop count; and the control module being configured to control the communication device to enter a relay mode when a data frame is received, and to control the sending module to send the received data frame after incrementing the hop count of the received data frame by one, and to stop forwarding when the hop count of the received data frame reaches a first threshold; wherein the communication device does not need to be configured with an address.
[0016] Optionally, the receiving module comprises: a filtering unit configured to remove glitches of the signal; a first converting unit configured to convert the filtered signal into a parallel signal; a parsing unit configured to identify a frame header, a payload, a check field and a frame trailer according to a frame format; and a first check unit configured to perform integrity check and / or error correction on the payload.
[0017] Optionally, the sending module comprises: a second check unit configured to calculate the check field according to the payload; a packaging unit configured to add the frame header, the check field and the frame trailer to form a complete data frame; and a second converting unit configured to convert the parallel data frame signal into a serial data frame signal and send the serial data frame signal through the sending port.
[0018] Optionally, the control module is configured to: when the sending port is idle, the communication device is in a standby mode and monitors the receiving port through the receiving module; if the received data frame is prepared before the self-generated data frame, the communication device enters the relay mode preferentially, otherwise, the communication device enters the self-generation mode preferentially, if both are prepared at the same time, the communication device enters the self-generation mode preferentially first, and then enters the relay mode to forward the received data frame after the self-generated data frame is sent.
[0019] Optionally, the control module comprises a counter configured to count the number of received data frames in a preset period, stop receiving when the count value reaches a second threshold, and determine that the whole network synchronization is completed after the self data frame is sent; if the synchronization is not completed in the preset period, the communication device is forced to return to the standby mode and report a timeout error.
[0020] According to another aspect of the present application, a chip is provided as a node in the communication system, the chip comprising: a receiving module configured to obtain a data frame sent by a previous node through a receiving port; a sending module configured to send a data frame to a next node through a sending port; a buffer module configured to temporarily store data; and a control module connected with the receiving module, the sending module and the buffer module respectively, the control module being configured to: when the data is prepared, control the chip to enter a self-generation mode, and send the data encapsulated as a data frame with an initial hop count by the sending module; and when a data frame is received, control the chip to enter a relay mode, and send the received data frame after the hop count of the received data frame is incremented by one by the sending module, and stop forwarding when the hop count of the received data frame reaches a first threshold; wherein the chip does not need to be configured with an address.
[0021] According to another aspect of the present application, an electronic device is provided, comprising a plurality of communication devices as described above, the plurality of communication devices being connected in sequence through respective sending ports and receiving ports of adjacent communication devices to form a unidirectional ring data path.
[0022] The communication system, the communication method, the communication device, the chip and the electronic equipment provided by the application form a unidirectional ring-shaped data path by connecting multiple nodes in a single-transmitting single-receiving head-to-tail mode, the communication system has an extremely simple physical topology, and complex mechanisms such as address allocation, master-slave arbitration and direction switching necessary for a traditional multi-node network are abandoned, each node can realize full-duplex, spontaneous start and end of the communication process and automatic synchronization in a communication system with any number of nodes by relying on only two ports, a receiving port and a transmitting port; each node decides whether to forward by checking whether the hop count in the data frame reaches a first threshold value, without the need for central scheduling; in principle, only the total number of nodes participating in communication in the communication system needs to be configured for each node, and the address allocation for each node not only eliminates address conflicts and master node settings that may exist in nodes, but also significantly saves port resources, reduces the workload of node configuration, and makes the configuration and expansion of the network more flexible. Further, the scheme of the application also allows the preparation completion time of the data frame of each node to be asynchronous.
[0023] Further, thanks to the ring link and the hop-by-hop cumulative hop count mechanism, by setting a counter, each data frame is automatically terminated after traversing a second threshold number of nodes, specifically, the second threshold is, for example, the total number of nodes minus 1, at this time, each data frame has traversed all nodes, which can effectively avoid invalid retransmission; in combination with relay mode forwarding and optional check fields, the stability and reliability can be significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] The above and other objects, features and advantages of the application will be more clearly understood from the following description of embodiments of the application with reference to the drawings.
[0025] Figure 1 A node connection schematic diagram of a communication system of an embodiment of the application is shown; Figure 2 A composition schematic diagram of a data frame of a communication system of an embodiment of the application is shown; Figure 3 A structure schematic diagram of a payload in a data frame of a communication system of an embodiment of the application is shown; Figure 4 A flowchart of a communication method of an embodiment of the application is shown; Figure 5 A schematic diagram of a communication device of an embodiment of the application is shown; Figure 6 A schematic diagram of a communication system of an embodiment of the application applied to an LED display screen is shown; Figure 7 A schematic diagram of a communication system of an embodiment of the application applied to a temperature sensor is shown. DETAILED DESCRIPTION
[0026] The application will be described in more detail with reference to the drawings, in which preferred embodiments of the application are shown. The application may, however, be carried out in different ways without departing from the essence of the application. For the purpose of clarity and a better understanding, the application will be described with reference to the attached drawings wherein:
[0027] In this description and in the claims, a reference to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. The terms "including", "comprising", "having" and the like are meant to be interpreted broadly. The terms "including" and "comprising" should be interpreted as "including but not limited to". The term "consisting of" should be interpreted as "consisting of the specified elements, but not excluding additional elements."
[0028] In the description of the application, the word "exemplary" or "for example" is used to mean "an example of" or "an example, only. Any implementation described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other implementations. The term "and / or" is used to associate one or more things, e.g., A and / or B, which means that the following three cases are possible: A alone, B alone, or A and B together. The term "connected" is used to associate two or more things, e.g., A is connected to B, which means that A and B are either directly connected or indirectly connected through one or more other things. The term "plurality" means two or more. In addition, the terms "first", "second", and so on are used to differentiate between similar items or items with similar functions and effects. A person skilled in the art can understand that the terms "first", "second", and so on do not limit the quantity and execution order, and the terms "first", "second", and so on do not necessarily mean different.
[0029] In addition, the same reference numbers in different drawings represent the same or similar elements, and thus repeated description thereof will be omitted from one part to another. In the present specification, each part is described in a combination of parallel and progressive manners, and each part focuses on the difference from other parts. The same or similar parts are referred to each other. The words expressing position and direction are described based on the drawings, but can be changed as needed, and the changes are included in the scope of the present application. The drawings of the present application are only used to show the relative position relationship and do not represent the real proportion.
[0030] In the present application, many specific details of the present application are described, such as the specific structure, size, connection relationship and technology of the module, so that the present application can be more clearly understood. However, as those skilled in the art can understand, the present application can be implemented without these specific details.
[0031] The present application can be presented in various forms, some examples of which will be described below.
[0032] Figure 1 A schematic diagram of node connection of a communication system according to an embodiment of the present application is shown, which includes a plurality of nodes, specifically, for example, node 1, node 2, node 3, node 4, …, node n, a total of n nodes, each node has a sending port tx and a receiving port rx, the sending port tx of node 1 is connected to the receiving port rx of node 2, the sending port tx of node 2 is connected to the receiving port rx of node 3, the sending port tx of node 3 is connected to the receiving port rx of node 4, …, the sending port tx of node n is connected to the receiving port rx of node 1, that is, a plurality of nodes form a unidirectional ring-shaped data path with a plurality of nodes in a single sending and single receiving manner.
[0033] Each node in the communication system has only two communication ports, one is a sending port tx and one is a receiving port rx, such as a chip for each node, which can significantly reduce the number of pins involved in communication in the chip; further, the nodes are connected end to end to form a ring structure, and the signals emitted by the nodes flow unidirectionally in the network of the ring structure, which not only simplifies the connection mode of the nodes and reduces the risk of connection errors, but also facilitates the maintenance and management of the communication network. Each node in the communication system has three functions of data production, data reception and data relay, and the data relay function can effectively improve the stability of the communication system and avoid the decrease of communication quality with the increase of the number of nodes.
[0034] Figure 2 A schematic diagram of the composition of a data frame of a communication system according to an embodiment of the present application is shown; the data is encapsulated into a data frame by each node in the communication system before transmission, such as Figure 2As shown, each data frame includes, for example, a frame header field, a payload, a checksum field, and a frame trailer field. The frame header field includes a hop count and a data frame description. The hop count describes the number of times the data frame has been forwarded by nodes in the communication system. The data frame description describes information such as the frame length. The payload carries valid data, including payload 1, payload 2, ..., payload m, totaling m bytes. Specifically, if each node is a chip used for display driving, its payload may be RGB data, brightness adjustment data, temperature data, etc. The checksum field is used for integrity verification, including, for example, a redundancy check code or error correction code. The frame trailer field indicates the end position of a complete data frame. The data frame description, checksum field, and frame trailer field in the frame header are optional fields; a data frame with only the hop count and payload in the header can also meet the requirements of the communication system of this invention. The check field of the data frame may include, for example, an error correction code or a parity check code. Specifically, the corresponding parity check code can be obtained by bitwise XORing of each payload and used as the check field of the data frame.
[0035] like Figure 3 As shown, Figure 2 The payload consists of m bytes. Encoding each byte encodes the entire payload field. Specifically, in this embodiment, each byte of the payload includes a 1-bit start bit, 8 bits of data bits, and a 1-bit stop bit, where the 8 bits of data bits carry the original data. This design allows all communication nodes in the communication system to communicate using the same baud rate.
[0036] Figure 4 The diagram illustrates a communication method according to an embodiment of the present invention, which includes the following steps: In step S10, multiple nodes are connected end-to-end to form a ring link; specifically, each node includes a receiving port rx and a transmitting port tx, and the nodes are connected end-to-end in a single-transmit, single-receive manner to form a ring link. Figure 1 The unidirectional ring link shown includes, for example, n nodes. Each node is connected and its parameters are configured. Specifically, for example, the total number of nodes n is pre-stored in each node.
[0037] In step S20, the node is powered on / reset and enters standby mode; specifically, after each node is powered on or reset, the node is initialized to enter standby mode.
[0038] In step S30, any node encapsulates its data as a data frame with hop number initialized and sends it to the next node when its data is ready; specifically, any node enters the spontaneous mode when its data is ready, encapsulates its ready data as a data frame with hop number initialized as 0, and sends the data frame to the receiving port rx of the next node through the sending port tx.
[0039] In step S40, the node checks the hop number of the received data frame; specifically, the node enters the relay mode, parses the data frame received by its receiving port rx, obtains the hop number in the frame header, and checks the hop number, for example, compares the hop number y with the first threshold value x stored locally by the node, which is related to the number n of nodes in the ring link, specifically, x = n - 2.
[0040] In step S41, the hop number of the data frame is incremented by 1 and forwarded to the next node; specifically, when the hop number y in the received data frame does not reach the first threshold value x, i.e., y < x = n - 2, the hop number y of the received data frame is incremented by 1 and transmitted to the receiving port of the next node.
[0041] In step S42, the data frame is synchronized throughout the network and is no longer forwarded; specifically, when the hop number y in the received data frame reaches the first threshold value x, i.e., y ≥ x = n - 2, it indicates that the data frame has been transmitted to all nodes in the ring link, i.e., the data frame has been synchronized throughout the network, and the current node no longer forwards the data frame, and the current node discards the data frame after synchronizing it.
[0042] The method does not necessarily follow the order of steps S10 to S40, and the order of some steps can be interchanged, for example, steps S30 and S40 are interchanged, which does not affect the implementation of the method.
[0043] Further, the nodes in the communication method also comply with the following constraints: When the sending port of the node is idle, the node is in standby mode and continuously monitors its receiving port; If the reception of a data frame is completed earlier than the preparation of the node's own data frame, the node enters the relay mode, checks the hop number of the received data frame, and decides whether to forward it to the receiving port of the next node according to the hop number; If the reception of a data frame is completed later than the preparation of the node's own data frame, the node enters the spontaneous mode and preferentially sends its own data frame to the receiving port of the next node.
[0044] If the reception of a data frame is completed at the same time as the preparation of the node's own data frame, the node first enters the spontaneous mode, and then enters the relay mode after the time period of the spontaneous mode ends.
[0045] Further, each node also comprises a counter, and each node counts the number of data frames received by itself in a preset period, and when the count of the counter is greater than or equal to a second threshold, the receiving port of the node stops receiving data frames, and specifically, the second threshold is, for example, the total number of nodes minus 1. If the data frames of the node itself have been sent, it means that the data of all nodes in the communication system have been synchronized. If the node has not synchronized the data in the preset period (including not completing the forwarding of the received data frames or not completing the sending of the data frames of itself), it means that there is a timeout problem in the communication system, the node is forced to enter the standby state, and the timeout error is reported, for example, an indicator light provided on the node can indicate that a timeout error has occurred. Of course, the first threshold x and the second threshold can also be adjusted according to requirements, and are not limited to the first threshold x being the total number of nodes minus 2 and the second threshold being the total number of nodes minus 1 in the above embodiment. They can also be other values.
[0046] Figure 5A schematic diagram of a communication device according to an embodiment of the present application is shown. The communication device is, for example, a node in the communication system described above, and specifically, the communication device is, for example, a chip. The communication device comprises a receiving module 110, a control module 120, a buffer module 130 and a sending module 140. A receiving port rx is connected to the receiving module 110, and a sending port tx is connected to the sending module 140. The receiving module 110 comprises a filtering unit 111, a first converting unit 112, a parsing unit 113 and a first checking unit 114. The receiving port rx is connected to the filtering unit 111. The filtering unit 111 performs filtering processing on a 1-bit serial signal received by the receiving port rx, to remove glitches of the signal. The first converting unit 112 is connected to the filtering unit 111. The first converting unit 112 converts the 1-bit serial signal after filtering into an 8-bit parallel signal according to a field coding rule. The parsing unit 113 is connected to the first converting unit 112. The parsing unit 113 identifies a frame header, a frame trailer and a payload according to a format of a data frame. The first checking unit 114 performs checking and error correction on the payload, for example, according to a check field. The first checking unit 114 transmits the checked signal to the control module 120. The control module 120 is used to control the receiving and sending of signals. The control module 120 is connected to the buffer module 130. The control module 120 can write data into the buffer module 130, and the control module 120 can also read data from the buffer module 130. The sending module 140 comprises a second checking unit 121, a packaging unit 122 and a second converting unit 123. The second checking unit 121 is connected to the control module 120. The second checking unit 121 calculates a redundancy field (check field) according to the payload and a check and error correction algorithm. The packaging unit 122 is connected to the second checking unit 121. The packaging unit 122 is used to add a frame header and a frame trailer, to pack the payload into a data frame. The second converting unit 123 is connected to the packaging unit 122. The second converting unit 123 is used to convert the 8-bit parallel data into 1-bit serial data, and to send the data frame to a receiving port rx of a next node through the sending port tx.
[0047] Figure 6 A schematic diagram of an application of a communication system according to an embodiment of the present application to an LED display screen is shown. The LED display screen comprises, for example, a control card, sending cards, receiving cards and display modules. The receiving cards and the display modules are not shown in the figure. The control card is used to receive a complete image transmitted by an upper computer, to transmit the image to corresponding sending cards after blocking the image, and to send corresponding display signals to the receiving cards of the display modules by the sending cards, so that the receiving cards drive the display modules to display. Connection lines are arranged between the sending cards in the embodiment, to form a unidirectional ring data path between the sending cards, thereby forming the communication system according to an embodiment of the present application. Figure 6
[0048] Specifically, the LED display screen of the embodiment includes, for example, four sending cards, i.e., sending card 1, sending card 2, sending card 3 and sending card 4, each of which includes an image processing unit, a communication chip and a post-processing unit, and the communication chip in the sending card is, for example, a communication device as shown in Figure 5
[0049] The host computer, for example, transmits a complete image of a frame of display picture to the control card, the control card divides the complete image into four image blocks, i.e., image block 1, image block 2, image block 3 and image block 4, and transmits them to the corresponding sending cards respectively, and the image processing unit in each sending card processes the corresponding image block into a corresponding local result.
[0050] Taking the sending card 1 as an example, the image processing unit in the sending card 1 receives the image block 1 and processes it to form a local result 1 which is transmitted to the communication chip, the communication chip receives other local results from the sending end tx4 of the sending card 4 through the receiving end rx1, and transmits the local result 1 in the sending card 1 and other local results whose hop counts do not reach the threshold to the communication chip in the sending card 2 through the sending end tx1.
[0051] By using the communication system provided by the present application, the complete image block and all the processed local results can be obtained in each sending card, so that the post-processing unit in the sending card can process based on all the local results.
[0052] Since the single sending card in the prior art can only obtain the data of the corresponding image block, there may be obvious boundary lines at the joint of adjacent image blocks. However, in the display screen using the present application, each sending card can obtain the local results of each image block of the complete image, thereby providing data support for improving the display effect at the joint of adjacent image blocks in the post-processing unit.
[0053] In the LED display screen provided in Figure 6 The communication chip in the sending card of the LED display screen can be used as a node in the communication system of the present application, and the working process of the sending card in the LED display screen is as follows: first, the image processing unit in each sending card processes the image block received by itself into a corresponding local result; then, each sending card transmits the local result to the communication chip in the sending card; finally, after a preset data synchronization time, the communication chip in each sending card obtains all the local results and transmits them to the post-processing unit in the sending card.
[0054] Figure 7 The schematic diagram of the communication system of the embodiment of the present application is shown in the figure. Since the space range that can be detected by a single temperature sensor is limited, if the average temperature in a larger space range needs to be detected, multiple temperature sensors need to be arranged at different positions in the space to obtain temperature data at different positions, and then the overall average temperature of the space is obtained by averaging algorithm. Taking a planar region as an example, the region is divided into 8 sub-regions, and a temperature sensor is arranged in each sub-region. The temperature sensors of the 8 sub-regions are connected in sequence to form a unidirectional ring-shaped data path. Each temperature sensor includes, for example, a temperature acquisition unit, a communication chip and a post-processing unit. The communication chip in the temperature sensor is similar to the communication chip in Figure 6 The temperature acquisition unit is used to collect temperature data of the sub-region and transmit the temperature data to the communication chip. The communication chip can obtain temperature data of all sub-regions through the ring-shaped data path, and the communication chip transmits the temperature data of all sub-regions to the post-processing module.
[0055] Specifically, the average temperature measurement steps of the planar region are as follows: first, connect the temperature sensors of all sub-regions to form a ring-shaped data path, so that the communication chips in the temperature sensors form the above-mentioned communication system; then, the temperature acquisition unit in each temperature sensor of the sub-region collects temperature data at regular intervals and provides the temperature data to the communication chip; after a preset synchronization time, the communication chip in each temperature sensor obtains temperature data of other sub-regions; finally, the temperature data of all sub-regions are provided to the post-processing unit, and after the algorithm of the post-processing unit is calculated, the average temperature of the planar region is obtained.
[0056] The communication system, the communication method, the communication device, the chip and the electronic equipment provided by the present application form a unidirectional ring-shaped data path by connecting multiple nodes in a single-transmit-single-receive manner. The communication system has a very simple physical topology, and the complex mechanisms such as address allocation, master-slave arbitration and direction switching required by traditional multi-node networks are abandoned. Each node only needs two ports, a receiving port and a transmitting port, to realize full-duplex, spontaneous start and end of the communication process, and automatic synchronization in a communication system with any number of nodes. Each node decides whether to forward by checking whether the hop count in the data frame reaches a first threshold value, without the need for central scheduling. In principle, only the total number of nodes participating in communication in the communication system needs to be configured for each node, without the need for assigning addresses to each node. This not only eliminates the address conflict and master node setting problems that may exist in nodes, but also significantly saves port resources, reduces the workload of node configuration, and makes the configuration and expansion of the network more flexible. Further, the preparation completion time of the data frame of each node in the present application is asynchronous.
[0057] Further, thanks to the ring link and the hop-by-hop accumulated hop number mechanism, by setting a counter, each data frame is automatically terminated after traversing a second threshold number of nodes, specifically, the second threshold is for example the total number of nodes minus 1, at this time, invalid retransmission can be effectively avoided; in combination with the relay mode forwarding, and the optional check field, the stability and reliability can be significantly improved.
[0058] In the light of the embodiments of the present application as described above, the embodiments do not describe all the details and are not limited to the specific embodiments. It is obvious that many modifications and changes can be made according to the above description. The description selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well utilize the present application and make modifications and uses on the basis of the present application. The scope of protection of the present application should be subject to the scope defined by the claims of the present application.
Claims
1. A communication system, characterized by Comprise: a plurality of nodes, each node having a sending port and a receiving port, the plurality of nodes being connected in sequence by the respective sending ports and the receiving ports of adjacent nodes to form a unidirectional ring data path; each node is configured to: in the spontaneous mode, the node sends a self-generated data frame to the next node, the hop count in the self-generated data frame being set to an initial value; in the relay mode, the node judges the hop count field in the received data frame, if the hop count does not reach a threshold, the hop count of the data frame is incremented and then forwarded to the next node; if the hop count reaches a first threshold, the forwarding of the data frame is stopped; wherein the hop count in the data frame is used to record the forwarding times of the data frame.
2. The communication system of claim 1, wherein, The node enters the spontaneous mode when the data preparation of the node is completed; the node enters the relay mode when the data frame of the previous node is received, and the first threshold is the total number of nodes in the communication system minus two.
3. The communication system of claim 1, wherein, The data frame at least includes a frame header and a plurality of payloads, the frame header includes a hop count for recording the forwarding times of the data frame, each node uses the same serial encoding format for signal transmission, and there is no need to assign an address to each node.
4. The communication system of claim 3, wherein, The data frame further includes at least one of data frame description information, a check field and a frame tail, the data frame description information belongs to the frame header, the check field includes an error correction code or a parity check code, and the frame tail is located at the end of the data frame.
5. The communication system of claim 4, wherein, Each of the payloads includes a start bit, a data bit and an end bit, the data is original data including a plurality of bits; all nodes in the communication system communicate at the same baud rate.
6. The communication system of claim 1, wherein, Each node is further provided with a counter for counting the number of received data frames within a preset period, when the count value reaches a second threshold, the node stops receiving data frames, and when the node sends the self-generated data frame, the node determines that the synchronization of the communication system is completed.
7. The communication system of claim 6, wherein, The second threshold is the total number of nodes in the communication system minus one, if the node does not complete synchronization within the preset period, the node is forced to enter standby mode and report a timeout error.
8. A communication method characterized by comprising: The communication method is applied to a unidirectional ring path formed by a plurality of nodes, and the method comprises: connecting the plurality of nodes in sequence to form a ring path; powering on / resetting the nodes to enter a standby state; when the data of any node is prepared, the node encapsulates the data into a data frame with an initialized hop count and sends the data frame to the next node; the node checks the hop count of the received data frame; if the hop count is less than a threshold, the hop count of the data frame is incremented and then forwarded to the next node, otherwise the forwarding of the data frame is stopped.
9. The communication method according to claim 8, wherein The node is in the standby state when the sending port is idle, and the node monitors the receiving port of the node in the standby state; if the node receives a data frame and the receiving of the data frame is completed earlier than the preparation of the self-generated data frame of the node, the node enters the relay mode preferentially, otherwise the node enters the spontaneous mode preferentially; if both are completed at the same time, the node enters the spontaneous mode first, sends the self-generated data frame to the next node, and then enters the relay mode to forward the received data frame to the next node.
10. The communication method according to claim 9, wherein, Each of the nodes further comprises a counter, and the communication method further comprises that each node counts the number of received data frames in a preset period, stops receiving when the count value reaches a second threshold, and determines that the network synchronization is completed after the sending of the self-generated data frame is completed; if the synchronization is not completed in the preset period, the node is forced to enter a standby mode and report a timeout error.
11. A communications device, characterized by The communication device is used as a node in the communication system of any one of claims 1-7, and the communication device comprises: a receiving module configured to obtain a data frame sent by a previous node through a receiving port; a sending module configured to send a data frame to a next node through a sending port; a buffer configured to temporarily store data; a control module connected with the receiving module, the sending module and the buffer respectively, and configured to: control the communication device to enter a self-generation mode when the data of the communication device is ready, and control the sending module to encapsulate the data of the communication device into a data frame with an initial hop count and send the data frame; control the communication device to enter a relay mode when a data frame is received, and control the sending module to send the received data frame after increasing the hop count of the received data frame by one, and stop forwarding the received data frame when the hop count of the received data frame reaches a first threshold. The communication device does not need to be configured with an address.
12. The communication apparatus according to claim 11, wherein The receiving module comprises: a filtering unit configured to remove glitches of a signal; a first conversion unit configured to convert the filtered signal into a parallel signal; a parsing unit configured to identify a frame header, a payload, a check field and a frame tail according to a frame format; a first check unit configured to perform integrity check and / or error correction on the payload.
13. The communication apparatus according to claim 12, wherein The sending module comprises: a second check unit configured to calculate the check field according to the payload; an encapsulation unit configured to add the frame header, the check field and the frame tail to form a complete data frame; a second conversion unit configured to convert the parallel data frame signal into a serial data frame signal and send the serial data frame signal through the sending port.
14. The communication apparatus according to claim 13, wherein The control module is configured to: when the sending port is idle, the communication device is in a standby mode and monitors the receiving port through the receiving module; if the received data frame is prepared before the self-generated data frame, the communication device enters the relay mode first, otherwise, the communication device enters the self-generation mode first, and if both the received data frame and the self-generated data frame are prepared at the same time, the communication device enters the self-generation mode first and then enters the relay mode to forward the received data frame after the sending of the self-generated data frame is completed.
15. The communication apparatus according to claim 14, wherein The control module comprises a counter configured to count the number of received data frames in a preset period, stop receiving when the count value reaches a total number of nodes minus one, and determine that the network synchronization is completed after the sending of the self-generated data frame is completed; if the synchronization is not completed in the preset period, the control module is forced to return to the standby mode and report a timeout error.
16. A chip, characterized by The chip is used as a node in the communication system of any one of claims 1-7, and the chip comprises: a receiving module configured to obtain a data frame sent by a previous node through a receiving port; a sending module configured to send a data frame to a next node through a sending port; a buffer configured to temporarily store data; a control module connected with the receiving module, the sending module and the buffer respectively, and configured to: control the communication device to enter a self-generation mode when the data of the communication device is ready, and control the sending module to encapsulate the data of the communication device into a data frame with an initial hop count and send the data frame; control the communication device to enter a relay mode when a data frame is received, and control the sending module to send the received data frame after increasing the hop count of the received data frame by one, and stop forwarding the received data frame when the hop count of the received data frame reaches a first threshold. controlling the chip to enter spontaneous mode when the self data is prepared, encapsulating the self data into a data frame with initial hop count by the sending module and sending out; controlling the chip to enter relay mode when a data frame is received, adding one to the hop count of the received data frame and sending out, and stopping forwarding when the hop count of the received data frame reaches a first threshold value; wherein the chip does not need to be configured with an address.
17. An electronic device, comprising: The communication system comprises a plurality of communication devices as claimed in claim 11, and the sending ports of the communication devices are connected to the receiving ports of adjacent communication devices in sequence to form a unidirectional ring data path.
Citation Information
Patent Citations
Large-scale network transmission optimization method and system
CN105681214A
Node synchronization method for wireless ad hoc network, master node and relay slave node
CN119277503A
Data packet transmission method and device
CN120710943A
Retransmission processing method and equipment
WO2018171711A1