CN118118323A - Device networking method, system, device, storage medium and computer program product - Google Patents

Device networking method, system, device, storage medium and computer program product Download PDF

Info

Publication number
CN118118323A
CN118118323A CN202410243020.5A CN202410243020A CN118118323A CN 118118323 A CN118118323 A CN 118118323A CN 202410243020 A CN202410243020 A CN 202410243020A CN 118118323 A CN118118323 A CN 118118323A
Authority
CN
China
Prior art keywords
equipment
terminal
cluster
routing
election
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
CN202410243020.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.)
Shenzhen Smartmore Technology Co Ltd
Original Assignee
Shenzhen Smartmore 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 Shenzhen Smartmore Technology Co Ltd filed Critical Shenzhen Smartmore Technology Co Ltd
Priority to CN202410243020.5A priority Critical patent/CN118118323A/en
Publication of CN118118323A publication Critical patent/CN118118323A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a device networking method, a system, a device, a storage medium and a computer program product. The method is applied to a sequence chained cluster, and the sequence chained cluster comprises at least two terminal devices chained in a single direction through a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding the data of the local equipment to equipment directly connected with the local equipment; the method comprises the following steps: under the condition that the sequence chain type cluster is connected with the routing equipment in a wired way, main equipment election is carried out according to the data uplink path of each terminal equipment, and an election result is obtained; the election result is used for representing a main device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment; and controlling the data exchange of the serial chain cluster and the routing device through the master device. By adopting the application, the equipment networking efficiency can be improved.

Description

Device networking method, system, device, storage medium and computer program product
Technical Field
The present application relates to the field of communications technologies, and in particular, to a device networking method, a system, a device, a storage medium, and a computer program product.
Background
With the development of communication technology, an equipment networking technology appears, and a plurality of devices can be connected through the equipment networking technology to form a network, so that the interconnection and intercommunication among the devices are realized, and the data transmission efficiency of the devices is improved.
In the conventional technology, each device needs to be connected with a switch, and then the switch is connected with a switch or upper-layer device, so that networking of the devices can be completed. This approach cannot avoid the problem of complicated wiring, resulting in inefficient networking.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an apparatus networking method, system, apparatus, storage medium, and computer program product, which can improve the apparatus networking efficiency.
In a first aspect, the present application provides a device networking method, applied to a serial chain cluster, where the serial chain cluster includes at least two terminal devices that are chained in a single direction by a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding data of the local equipment to equipment directly connected with the local equipment;
the method comprises the following steps:
Under the condition that the sequence chain type cluster is connected with the routing equipment in a wired way, main equipment election is carried out according to the data uplink path of each terminal equipment, and an election result is obtained; the election result is used for representing a master device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment;
and controlling the data exchange between the sequence chained cluster and the routing equipment through the master equipment.
In a second aspect, the present application provides a device networking system, the system comprising a sequence chained cluster and a routing device; the sequence chained cluster comprises at least two terminal devices which are chained and connected along a single direction through a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding data of the local equipment to equipment directly connected with the local equipment;
The sequence chained cluster is used for carrying out main equipment election according to the data uplink path of each terminal equipment under the condition that the sequence chained cluster is connected with the routing equipment in a wired mode, so as to obtain an election result; the election result is used for representing a master device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment; controlling data exchange between the sequence chained cluster and the routing equipment through the master equipment;
The routing equipment is used for uplink transmission of the data of the sequence chained cluster.
In a third aspect, the application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method described above.
In a fifth aspect, the application provides a computer program product comprising a computer program which, when executed by a processor, carries out the steps of the method described above.
The device networking method, the system, the computer device, the computer readable storage medium and the computer program product are applied to a sequence chained cluster, and the sequence chained cluster comprises at least two terminal devices which are chained and connected along a single direction through a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding the data of the local equipment to equipment directly connected with the local equipment; the terminal equipment is provided with the exchange chip, can be used as an exchanger in a network, does not need to be additionally provided with the exchanger, and can be connected with the router after being connected with each terminal equipment in a chained mode along a single direction through a physical cable to obtain a serial chained cluster, so that the complexity of wiring is reduced, and the equipment networking efficiency can be improved. Under the condition that the sequence chain type cluster is connected with the routing equipment in a wired way, main equipment election is carried out according to the data uplink path of each terminal equipment, and an election result is obtained; the election result is used for representing a main device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment; the master device controls the data exchange between the sequence chain type cluster and the routing device, and can be used as a switch directly connected with the routing device, so that the communication effect of the sequence chain type cluster and the routing device is ensured, the networking effect of the device is further ensured, and the networking efficiency of the device is improved.
Drawings
Fig. 1 is an application environment diagram of a device networking method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a device networking method according to an embodiment of the present application.
Fig. 3 is a schematic flow chart of a master election step according to an embodiment of the present application.
Fig. 4 is a block diagram of a device networking system according to an embodiment of the present application.
Fig. 5 is an internal structure diagram of a cloud device according to an embodiment of the present application.
Fig. 6 is an internal structure diagram of a terminal device according to an embodiment of the present application.
Fig. 7 is an internal structural diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The device networking method provided by the embodiment of the application can be applied to an application environment shown in figure 1. The sequence chained cluster 102 comprises at least two terminal devices chained in a single direction by a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding the data of the local equipment to equipment directly connected with the local equipment; in the case that the sequence chained cluster 102 is connected with the routing device 104 in a wired manner, the sequence chained cluster 102 can perform master device election according to the data uplink path of each terminal device to obtain an election result; the election result is used for representing a main device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment; and controlling the data exchange of the serial chain cluster and the routing device through the master device. In the case where the sequence chained cluster 102 is connected to the routing device 104, the routing device 104 may upload the data of the sequence chained cluster 102 to the network.
The terminal device can be, but not limited to, an intelligent industrial code reader, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices can be intelligent sound boxes, intelligent televisions, intelligent air conditioners, intelligent vehicle-mounted devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The cloud device may be implemented by a stand-alone server or a server cluster formed by a plurality of servers.
As shown in fig. 2, an embodiment of the present application provides a device networking method, and the method is applied to the serial chain cluster 102 in fig. 1 for illustration. The method includes steps 202 through 204.
Step 202, under the condition that the sequence chain type cluster is connected with the routing equipment in a wired way, main equipment election is carried out according to the data uplink path of each terminal equipment, and an election result is obtained.
The sequence chain type cluster comprises at least two terminal devices which are connected in a chain manner along a single direction through a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding the data of the local equipment to equipment directly connected with the local equipment; the election result is used for representing a main device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal device is used to characterize the path of the data transmission of the terminal device to the routing device. The routing device may be a hardware device that connects two or more networks, acting as a gateway between the networks.
Illustratively, each terminal device is connected to the next terminal device through a single direction to form a sequence chain structure, so as to obtain a sequence chain cluster. The sequential chain structure may be a continuous chain circuit structure. Because the terminal equipment is provided with the exchange chip, the terminal equipment can be used as a switch, any terminal equipment in the sequence chain type cluster can be directly connected with the routing equipment through a physical cable, and the switch is not required to be additionally arranged between the sequence chain type cluster and the routing equipment. And under the condition that at least one terminal device in the sequence chained cluster is connected with the routing device in a wired way, the connection between the sequence chained cluster and the routing device can be realized. Under the condition that the sequence chain type cluster is connected with the routing equipment in a wired mode, main equipment election is carried out according to the data uplink paths of all the terminal equipment, the terminal equipment closest to the routing equipment can be identified, and an election result is obtained. It can be understood that the wired transmission path from the terminal device to the routing device, which is directly connected to the routing device through the physical cable, is the shortest, and the terminal device directly connected to the routing device through the physical cable can be selected as the master device.
In some embodiments, the data uplink path of the terminal device refers to a path from the terminal device through which data is transmitted to the routing device via the physical cable. It can be understood that each terminal device in the sequence chained cluster is connected through a physical cable, the sequence chained cluster is connected with the routing device through a physical cable, and data exchange between the sequence chained cluster and the routing device belongs to a wired data transmission.
In some embodiments, the terminal devices in the serial chain type cluster are connected by physical cables to form a continuous chain type circuit. The connection of each terminal device in the serial chain cluster is linear, and not circular.
In some embodiments, the sequence chain cluster may be used for real-time data acquired by the uplink terminal device.
In some embodiments, in the case of a wired connection of the serial chain cluster with the routing device, the priority of each terminal device is determined according to the data uplink path of the terminal device. It will be appreciated that the shorter the data uplink path of the terminal device, the higher the priority of the terminal device. And carrying out main equipment election according to the priority of each terminal equipment to obtain an election result.
In some embodiments, the data uplink path of the terminal device includes a number of forwarding times corresponding to the terminal device. The number of times of forwarding corresponding to the terminal device refers to the number of times that data sent by the terminal device is forwarded in the process of transmitting the data to the routing device. It will be appreciated that in a sequence chained cluster, the data may be forwarded once per pass through one terminal device, and the number of times of forwarding may be counted. If the sequence chain cluster has m terminal devices in total, the sequence chain structure is as follows: terminal device 1+terminal device 2+ … … +terminal device n+ … … +terminal device m, and terminal device m is directly connected with the routing device, then the number of forwarding times corresponding to terminal device n may be m-n. And under the condition that the sequence chained cluster is connected with the routing equipment in a wired way, determining the priority of the terminal equipment based on the corresponding forwarding times of the terminal equipment. It can be understood that the more the number of forwarding times the terminal device corresponds to, the lower the priority of the terminal device.
In some embodiments, the sequence chaining cluster may forward the network data packet of each terminal device to the routing device. The network data packet of the terminal device refers to a data packet generated by the terminal device. The network data packet includes a first forwarding parameter. In the sequence chained cluster, after a network data packet of a terminal device is forwarded to another terminal device directly connected to the terminal device, the other terminal device modifies a first forwarding parameter in the network data packet. The sequence chained cluster may receive response data corresponding to each terminal device. The response data corresponding to the terminal equipment is response data sent by the routing equipment aiming at the network data packet of the terminal equipment after the network data packet of the terminal equipment is received. The response data corresponding to the terminal equipment comprises a second forwarding parameter, and the second forwarding parameter is used for indicating the forwarding times corresponding to the terminal equipment.
It can be understood that each terminal device in the sequence chained cluster is connected in a unidirectional chained manner, that is, the time required for transmitting the data sent by each terminal device to the routing device along one direction is shortest, so when the sequence chained cluster receives the response data corresponding to the terminal device for the first time, the forwarding times represented by the second forwarding parameter in the response data are matched with the number of terminal devices spaced from the terminal device to the routing device.
In some embodiments, the first forwarding parameter may be, but is not limited To, a Time To Live (TTL). When the terminal equipment receives the network data packet of the non-home terminal equipment, the survival time value is reduced by 1, and then the received network data packet of the non-home terminal equipment is forwarded.
In some embodiments, the terminal device with the highest priority is determined to be the master device by performing master election by comparing the priority of each terminal device.
In some embodiments, the terminal device may be, but is not limited to being, a code scanner.
In some embodiments, a terminal device at any end point in a sequence chained cluster may be connected with a routing device by a physical cable. It will be appreciated that the serial chain cluster, when connected to the routing device, may form a continuous chain line, presenting a line shape.
Step 204, controlling data exchange between the serial chain cluster and the routing device through the master device.
It can be understood that the master device is provided with a switching chip, and can be used as a switch directly connected with the routing device to control the data exchange between the serial chain cluster and the routing device.
In some embodiments, the host device receives downlink data forwarded by the routing device, where the downlink data may be downlink data of a cloud device, a local area network, or a wide area network. The address information in the downstream data is checked by the host device to determine the destination of the downstream data. And if the address information of the downlink data is related to the terminal equipment of the sequence chain type cluster, the downlink data is sent to the terminal equipment corresponding to the destination through the main equipment. And if the address information of the downlink data is irrelevant to the terminal equipment of the sequence chain type cluster, filtering the downlink data by the main equipment. And after receiving the downlink data, the terminal equipment in the sequence chained cluster can perform corresponding processing or response.
In some embodiments, the master device may issue control commands to the terminal devices in the serial chain cluster to control data exchange between the terminal devices.
In some embodiments, the serial chain cluster may transmit the image data identified by each terminal device to the routing device to instruct the routing device to upload the image data to the cloud device.
In some embodiments, after the master election is completed, it may be determined that device networking is complete, and access to the sequential chain cluster may be achieved by accessing the internet protocol address of the master. The internet protocol address of the host device may be assigned by the routing device or may be user-specified.
It can be seen that, in the embodiment of the present application, the device networking method is applied to a sequence chained cluster, where the sequence chained cluster includes at least two terminal devices chained along a single direction by a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding the data of the local equipment to equipment directly connected with the local equipment; the terminal equipment is provided with the exchange chip, can be used as an exchanger in a network, does not need to be additionally provided with the exchanger, and can be connected with the router after being connected with each terminal equipment in a chained mode along a single direction through a physical cable to obtain a serial chained cluster, so that the complexity of wiring is reduced, and the equipment networking efficiency can be improved. Under the condition that the sequence chain type cluster is connected with the routing equipment in a wired way, main equipment election is carried out according to the data uplink path of each terminal equipment, and an election result is obtained; the election result is used for representing a main device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment; the master equipment can be used as a switch directly connected with the routing equipment to ensure the communication effect of the sequence chain type cluster and the routing equipment, further ensure the equipment networking effect and improve the equipment networking efficiency.
In some embodiments, performing master election according to a data uplink path of each terminal device to obtain an election result, including: broadcasting the announcement message of each terminal device; the announcement message of the terminal device is used for representing that the terminal device is a candidate master device in the sequence chained cluster; broadcasting the election message of each candidate master device; the election information of the candidate master device carries the priority of the candidate master device; the priority of the candidate master device is related to the data uplink path of the candidate master device; the master device is determined according to the priority of each candidate master device.
In some embodiments, before the master election is completed, the terminal device may periodically send an announcement message in the sequence chained cluster announcing that the home terminal device is a candidate master device to the remaining terminal devices except the home terminal device. The terminal device may receive the announcement message of the remaining terminal devices except the home terminal device in the sequence chained cluster, and update the candidate master device list in the home terminal device according to the received announcement message. The candidate master list of the terminal device is used to characterize candidate masters in the sequence chained cluster.
In some embodiments, the terminal device may store the received announcement message in a candidate master list of the home device. The announcement message for a terminal device may be used to characterize the terminal device as a candidate master device.
In some embodiments, the candidate master device may determine the priority of the home device according to the forwarding times corresponding to the home device, generate an election message carrying the priority of the home device, and broadcast the election message of the home device in the sequence chained cluster.
In some embodiments, the election message of the candidate master may include the priority of the candidate master and information about the candidate master.
In some embodiments, the sequence chain cluster may determine a master from among the candidate masters according to the priority of each candidate master.
In some embodiments, the terminal device may generate the election-related message based on a preset private protocol. The election related messages may include an announcement message, an election message, and an election success message.
In some embodiments, the preset private protocol may be, but is not limited to, adding a user-defined type to the ethernet protocol.
It can be seen that, in this embodiment, the announcement message of each terminal device is broadcast; the announcement message of the terminal device is used for representing that the terminal device is a candidate master device in the sequence chained cluster; broadcasting the election message of each candidate master device; the election information of the candidate master device carries the priority of the candidate master device; the priority of the candidate master device is related to the data uplink path of the candidate master device; and determining the master device according to the priority of each candidate master device, so that the automatic election of the master device in the sequence chain type cluster is realized, the master device is not required to be set manually, and the equipment networking efficiency is improved.
In some embodiments, determining the master device based on the priority of each candidate master device includes: broadcasting an election success message sent by the target equipment under the condition that the target equipment determines that the local equipment is the main equipment according to the priority of the non-target equipment aiming at the target equipment in each candidate main equipment; non-target devices refer to devices other than the target device in each candidate master device.
It will be appreciated that each candidate master device in the sequence chained cluster will broadcast the priority of the home device during the master election process. The candidate masters may obtain a priority for each candidate master in the sequence chained cluster. It will be appreciated that the candidate master device may determine the home device as the target device and the remaining candidate masters other than the home device as non-target devices. And the candidate master device can broadcast the election success message of the local device under the condition that the priority of the local device is highest, and notify the rest candidate master devices except the local device in the sequence chained cluster, so that each candidate master device in the sequence chained cluster can determine the local device as the master device.
In some embodiments, the non-target device may determine that the target device is a master device and determine that the local device is a slave device according to the election success message of the target device.
In some embodiments, as shown in FIG. 3, a flow diagram of a master election step is provided.
In step 302, each terminal device broadcasts an announcement message to discover candidate masters.
Specifically, each terminal device in the sequence chained cluster sends an announcement message at fixed time to announce itself as a candidate master device. The terminal device may receive the announcement message of the other terminal devices and discover each candidate master device in the sequence chained cluster.
Step 304, each terminal device updates the candidate master device list according to the received announcement message.
Specifically, after receiving the announcement message, the terminal device stores the announcement message locally and updates the candidate master device list.
Step 306, a priority of each candidate master device is determined.
Specifically, each candidate master calculates its own priority according to the calculation rule. It will be appreciated that the calculation rules need to satisfy that the number of forwarding times corresponding to the candidate master is inversely related to the priority of the candidate master.
Each candidate master broadcasts an election message, step 308.
Specifically, the election message of the candidate master device includes the priority of the candidate master device and related information. Each candidate master device broadcasts the priority and related information of the home terminal device to other candidate master devices.
In step 310, each candidate master device updates the candidate master device list according to the received election message.
Specifically, after receiving the election message, the candidate master device stores the election message locally and updates the candidate master device list.
Step 312, electing the master device.
Specifically, the candidate master device calculates the priorities of all candidate master devices according to the received election message, and elects the master device with the highest priority.
In step 314, the master broadcasts an election success message.
Specifically, the master device broadcasts a message that the local device election is successful to other devices.
Step 316, determining the master device and the slave device according to the election success message.
Specifically, the candidate master device determines whether the candidate master device is a master device or a slave device according to the election success message of the master device. It will be appreciated that the end devices in the sequence chain cluster, except the master device, are all slaves.
It can be seen that, in this embodiment, for the target device in each candidate master device, when the target device determines that the home terminal device is the master device according to the priority of the non-target device, the election success message sent by the target device is broadcasted; the non-target device refers to a device except the target device in each candidate master device, and when the target device determines that the target device selects the master device, the target device broadcasts a message of successful self-election, so that each terminal device in the sequence chained cluster can be notified in time, and the election efficiency is improved.
In some embodiments, a method comprises: for each terminal device in the sequence chained cluster, updating an access control list rule in the terminal device under the condition that the terminal device receives an election success message; the updated access control list rule is used for indicating the terminal equipment to allow the heartbeat message of the main equipment to pass; and under the condition that the heartbeat message of the main equipment is abnormal, sending an alarm through the terminal equipment.
It will be appreciated that the access control list (Access Control List, ACL) rules are provided in the terminal device. The access control list rules are used to indicate which messages are allowed to pass through the terminal device, i.e. the terminal device can only receive messages complying with the access control list rules. When the main equipment election is not completed, the heartbeat message of the terminal equipment does not accord with the access control list rule before updating, so that a large number of redundant messages are prevented from being existed in the sequence chain type cluster. After the master device election is completed, that is, under the condition that the terminal device receives the election success message, the terminal device can update the local access control list rule by itself so as to receive the heartbeat message of the master device.
In some embodiments, the terminal device may issue an alarm if the heartbeat message of the master device is not received within a preset time of the terminal device. It can be understood that a timeout mechanism is set in the sequence chained cluster, and the timeout mechanism is a mechanism that triggers an alarm if no heartbeat message of the main device is received beyond a preset time.
In some embodiments, in the event of an abnormality in the heartbeat message of the master device, a new master device is reelected from the non-master devices according to the priorities of the remaining terminal devices other than the master device.
It can be understood that if the master device is abnormal, the terminal device directly connected to the master device has the highest priority and is reselected as the master device. Because the wiring complexity of the sequence chain type cluster is low, after the abnormal main equipment is removed, wiring change can be completed only by connecting terminal equipment directly connected with the main equipment to the routing equipment, meanwhile, the communication effect of the sequence chain type cluster and the routing equipment cannot be influenced, and the equipment networking efficiency is improved.
In some embodiments, after the master election is completed, the election related messages, such as the announcement message, the election message, and the election success message, are no longer necessary, so the election related messages may not conform to the updated access control list rules. Under the condition that the heartbeat message of the main equipment is abnormal, the terminal equipment can update the access control list rule again, and the access control list rule after updating again allows the announcement message, the election message and the election success message to pass through the terminal equipment.
It can be seen that, in this embodiment, for each terminal device in the sequence chained cluster, when the terminal device receives the election success message, the access control list rule in the terminal device is updated; the updated access control list rule is used for indicating the terminal equipment to allow the heartbeat message of the main equipment to pass through, a large number of redundant messages can be prevented from rushing into the terminal equipment to cause resource waste through the access control list rule, and the terminal equipment can timely receive the heartbeat message of the main equipment through updating the access control list rule. Under the condition that the heartbeat message of the main equipment is abnormal, an alarm is sent out through the terminal equipment, so that the problem of poor communication effect between the sequence chain type cluster and the routing equipment is avoided in time.
In some embodiments, the updated access control list rule is further used to instruct the terminal device to allow the routing device to pass through the downlink control message.
It can be understood that after the master device is elected, the sequence chained cluster can exchange data through an upper network of the routing device, and respond to a control message that the upper network descends through the routing device. The control message is used for controlling the terminal equipment in the sequence chained cluster. For example, the control message may control at least one of an operation mode of the terminal device, configure a performance parameter of the terminal device, or update a program in the terminal device.
In some embodiments, the cloud device is in an upper network, and the control message of the cloud device downlink is transmitted to the serial chain cluster through forwarding of the routing device. The terminal equipment in the sequence chain type cluster can respond to the control message to generate a response message, and the response message is uploaded to the cloud equipment through the routing equipment.
In some embodiments, the sequence chained cluster may receive a downlink control message through the master device, determine a destination of the control message through the master device, and forward the control message to a terminal device corresponding to the destination. The terminal equipment corresponding to the destination can respond to the control message to generate a response message, and the response message is uploaded to the cloud equipment through the routing equipment by the main equipment.
It can be seen that, in this embodiment, the updated access control list rule is further used to instruct the terminal device to allow the downlink control message of the routing device to pass through, so as to ensure the control effect of the upper network on the sequence chained network while avoiding the data redundancy in the sequence chained cluster.
In some embodiments, the terminal device is used to identify a graphic code of a product on the production line; the method further comprises the steps of: and transmitting the graphic code information identified by each terminal device to the routing device through the sequence chain cluster so as to instruct the routing device to uplink the graphic code information to the cloud device.
In some embodiments, the sequence chain cluster may transmit the graphic code information identified by each terminal device to the routing device in real time.
In some embodiments, the terminal device incorporates a high speed switching chip. The terminal equipment comprises at least two network ports. The serial chain type cluster is obtained by connecting at least two terminal devices along a single direction through an Ethernet cable and a network port. Each terminal device in the sequence chained cluster communicates based on an Ethernet protocol.
It will be appreciated that by incorporating a high speed switching chip in the terminal device, data CAN be transferred more efficiently than a conventional controller area network (Controller Area Network, CAN) bus. The standard transmission rate of CAN buses is typically limited to 1 Mbps and as the length of the network increases, its maximum communication rate decreases further, for example, at distances above 40 meters, the rate decreases to 250 kbps. Such a bandwidth is sufficient for transmission of low-speed data or control commands, but far from for real-time image data transmission. In contrast, the high-speed Ethernet protocol is used in the sequence chained cluster, so that the transmission rate of up to 100 Mbps CAN be kept even under the transmission distance of 100 meters, which is more than hundred times of the theoretical maximum rate of the CAN bus, so that the transmission efficiency and the data throughput CAN be effectively improved.
In addition, in order to adapt to the process sequence in the industrial production process, the industrial production line often presents a long and narrow form, and the single-direction chain connection of each terminal device in the sequence chain type cluster is simple in wiring and can adapt to the long and narrow form of the industrial production line.
In some embodiments, the terminal device may be a code scanner with a high speed switching chip.
In some embodiments, the exchange of data within the sequence chained cluster may be implemented based on a pre-set proprietary protocol. Whereas the sequence chained clusters can be based on ethernet protocols for data exchange with the outside.
In some embodiments, the data exchange within the sequence chained cluster may be based on an ethernet protocol in addition to the data generated in the master election being based on a pre-set proprietary protocol.
It can be seen that, in this embodiment, the terminal device is used to identify the graphic code of the product on the production line; the method has higher adaptability, and can realize the transmission of image data generated in real time on a production line of the graphic code information.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a device networking system. The implementation of the solution provided by the system is similar to the implementation described in the above method, so the specific limitation in the embodiment of one or more device networking systems provided below may be referred to the limitation of the device networking method hereinabove, and will not be repeated herein.
As shown in fig. 4, an embodiment of the present application provides a device networking system 400, including a sequence chained cluster 402 and a routing device 404; the sequence chained cluster 402 includes at least two terminal devices chained in a single direction by a physical cable; the terminal device is provided with a switching chip, and the switching chip is used for forwarding the data of the local terminal device to the device directly connected with the local terminal device.
The sequence chained cluster 402 is configured to perform master device election according to a data uplink path of each terminal device when the sequence chained cluster 402 is connected with the routing device 404, so as to obtain an election result; the election results are used to characterize the master device in the sequential chained cluster 402 that is directly connected to the routing device 404; the data uplink path of the terminal device is used to characterize the path of the data transmission of the terminal device to the routing device 404; wherein the master device is used to control the exchange of data between the sequential chained cluster 402 and the routing device 404.
A routing device 404 for upstream transmission of data of the sequence chained cluster 402.
In some embodiments, in performing master election according to the data uplink path of each terminal device, the sequence chain cluster 402 is specifically configured to: broadcasting the announcement message of each terminal device; the announcement message of the terminal device is used to characterize that the terminal device is a candidate master device in the sequence chained cluster 402; broadcasting the election message of each candidate master device; the election information of the candidate master device carries the priority of the candidate master device; the priority of the candidate master device is related to the data uplink path of the candidate master device; the master device is determined according to the priority of each candidate master device.
In some embodiments, in determining a master device based on the priority of each candidate master device, the sequence chain cluster 402 is specifically configured to: broadcasting an election success message sent by the target equipment under the condition that the target equipment determines that the local equipment is the main equipment according to the priority of the non-target equipment aiming at the target equipment in each candidate main equipment; non-target devices refer to devices other than the target device in each candidate master device.
In some embodiments, the sequence chain cluster 402 is also used to: for each terminal device in the sequence chain cluster 402, updating the access control list rule in the terminal device under the condition that the terminal device receives the election success message; the updated access control list rule is used for indicating the terminal equipment to allow the heartbeat message of the main equipment to pass; and under the condition that the heartbeat message of the main equipment is abnormal, sending an alarm through the terminal equipment.
In some embodiments, the updated access control list rule is further used to instruct the terminal device to allow the passage of control messages downstream of the routing device 404.
In some embodiments, the terminal device is used to identify a graphic code of a product on the production line; the sequence chaining cluster 402 is also used to: the graphic code information identified by each terminal device is transmitted to the routing device 404, so as to instruct the routing device 404 to uplink the graphic code information to the cloud device.
The above-described modules in the device networking system may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In some embodiments, a cloud device is provided, which may be a server, and an internal structure diagram thereof may be as shown in fig. 5. The cloud device comprises a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. The processor of the cloud device is used for providing computing and control capabilities. The memory of the cloud device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the cloud device is used for storing graphic code information. The input/output interface of the cloud device is used for exchanging information between the processor and the external device. The communication interface of the cloud device is used for communicating with an external terminal through network connection. The computer program, when executed by the processor, receives data of the sequential chain cluster upstream through the routing device and downstream through the routing device to the sequential chain cluster.
In some embodiments, a terminal device is provided, the internal structure of which may be as shown in fig. 6. The terminal device comprises a processor, a memory, an input/output interface, a communication interface, a display unit and an input device. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the terminal device is adapted to provide computing and control capabilities. The memory of the terminal device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the terminal device is used for exchanging information between the processor and the external device. The communication interface of the terminal device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement the steps in the device networking method described above. The display unit of the terminal device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen; the input device of the terminal equipment can be a touch layer covered on a display screen, can be keys, a track ball or a touch pad arranged on a shell of the terminal equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 5 or 6 are merely block diagrams of portions of structures associated with aspects of the application and are not intended to limit the computer device to which aspects of the application may be applied, and that a particular computer device may include more or fewer components than those shown, or may combine certain components, or may have a different arrangement of components.
In some embodiments, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method embodiments described above when the computer program is executed.
In some embodiments, an internal structural diagram of a computer-readable storage medium is provided as shown in fig. 7, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method embodiments described above.
In some embodiments, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
The user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described embodiment methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A device networking method, characterized by being applied to a sequence chained cluster, wherein the sequence chained cluster comprises at least two terminal devices chained along a single direction through a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding data of the local equipment to equipment directly connected with the local equipment;
the method comprises the following steps:
Under the condition that the sequence chain type cluster is connected with the routing equipment in a wired way, main equipment election is carried out according to the data uplink path of each terminal equipment, and an election result is obtained; the election result is used for representing a master device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment;
and controlling the data exchange between the sequence chained cluster and the routing equipment through the master equipment.
2. The method of claim 1, wherein the performing master election according to the data uplink path of each terminal device to obtain an election result includes:
Broadcasting the announcement message of each terminal device; the announcement message of the terminal device is used for representing that the terminal device is a candidate master device in the sequence chained cluster;
Broadcasting the election message of each candidate master device; the election information of the candidate master device carries the priority of the candidate master device; the priority of the candidate master device is related to the data uplink path of the candidate master device;
The master device is determined according to the priority of each candidate master device.
3. The method of claim 2, wherein said determining the master device based on the priority of each candidate master device comprises:
Broadcasting an election success message sent by target equipment under the condition that the target equipment determines that the local equipment is the main equipment according to the priority of non-target equipment aiming at the target equipment in each candidate main equipment; the non-target device refers to a device other than the target device in each candidate master device.
4. The method according to claim 2, characterized in that the method comprises:
updating access control list rules in the terminal equipment under the condition that the terminal equipment receives the election success message aiming at each terminal equipment in the sequence chained cluster; the updated access control list rule is used for indicating the terminal equipment to allow the heartbeat message of the main equipment to pass;
and under the condition that the heartbeat message of the main equipment is abnormal, sending an alarm through the terminal equipment.
5. The method of claim 4, wherein the updated access control list rule is further used to instruct the terminal device to allow the routing device to pass through a control message downstream.
6. The method according to claim 1, wherein the terminal device is used for identifying a graphic code of a product on a production line; the method further comprises the steps of:
And transmitting the graphic code information identified by each terminal device to the routing device through the sequence chain cluster so as to instruct the routing device to uplink the graphic code information to the cloud device.
7. A device networking system, wherein the system comprises a sequence chained cluster and a routing device; the sequence chained cluster comprises at least two terminal devices which are chained and connected along a single direction through a physical cable; the terminal equipment is provided with an exchange chip, and the exchange chip is used for forwarding data of the local equipment to equipment directly connected with the local equipment;
The sequence chained cluster is used for carrying out main equipment election according to the data uplink path of each terminal equipment under the condition that the sequence chained cluster is connected with the routing equipment in a wired mode, so as to obtain an election result; the election result is used for representing a master device which is directly connected with the routing device in the sequence chained cluster; the data uplink path of the terminal equipment is used for representing the path of data transmission of the terminal equipment to the routing equipment; controlling data exchange between the sequence chained cluster and the routing equipment through the master equipment;
The routing equipment is used for uplink transmission of the data of the sequence chained cluster.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202410243020.5A 2024-03-04 2024-03-04 Device networking method, system, device, storage medium and computer program product Pending CN118118323A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410243020.5A CN118118323A (en) 2024-03-04 2024-03-04 Device networking method, system, device, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410243020.5A CN118118323A (en) 2024-03-04 2024-03-04 Device networking method, system, device, storage medium and computer program product

Publications (1)

Publication Number Publication Date
CN118118323A true CN118118323A (en) 2024-05-31

Family

ID=91213770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410243020.5A Pending CN118118323A (en) 2024-03-04 2024-03-04 Device networking method, system, device, storage medium and computer program product

Country Status (1)

Country Link
CN (1) CN118118323A (en)

Similar Documents

Publication Publication Date Title
US11240159B2 (en) Service link selection control method and device
US11469949B2 (en) Hierarchical configuration of networked communication devices
JP5625998B2 (en) Information processing system
EP2934036B1 (en) System and method for managing cwsn communication data based on gui interaction
US10581697B2 (en) SDN controlled PoE management system
CN107104824A (en) A kind of network topology determines method and apparatus
CN110012534A (en) Equipment state synchronous method, device, equipment and computer readable storage medium
CN115643210A (en) Control data packet sending method and system
CN104396209A (en) Multiple abstraction layers within a communication device
CN113328953B (en) Method, device and storage medium for network congestion adjustment
CN109412828B (en) Method, apparatus and system for network topology discovery in software defined networks
US20230394000A1 (en) Interconnection system, data transmission method, and chip
CN118118323A (en) Device networking method, system, device, storage medium and computer program product
CN116192892A (en) Charging station communication method, charging station communication device, computer equipment and storage medium
CN114268940A (en) Mesh network topological graph display method, system, equipment and storage medium
CN113316212A (en) Transmission method and device for base station forward data stream
CN116132299A (en) Processing method and device
CN114356830B (en) Bus terminal control method, device, computer equipment and storage medium
CN116708532B (en) Local area network connection method, device, computer equipment and readable storage medium
Tekouabou et al. Efficient forwarding strategy in HDRP protocol based Internet of Things
CN116684939B (en) Message processing method, device, computer equipment and computer readable storage medium
CN116016338A (en) Data accurate transmission method and device based on multi-network port equipment and computer equipment
CN111970331A (en) Expressway monitoring data link optimization method and device based on SDN
CN116847228A (en) Data transmission method, device, network system, computer equipment and storage medium
CN116489022A (en) Time sensitive network in-band management method and system based on network dynamic perception

Legal Events

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