Device chain establishment method, device, and storage medium

Through automatic grouping and comprehensive scoring processing, the terminal device sends test data after receiving the grouping start command, determines the transmission parameters and forms a grouping list, which solves the problem of low efficiency in device grouping and achieves more efficient data transmission.

WO2026097222A1PCT designated stage Publication Date: 2026-05-15GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
Filing Date
2024-11-05
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, the efficiency of device chaining is low, resulting in low data transmission speed between terminal devices, especially when crossing multiple network devices.

Method used

Upon receiving the chain initiation command, the terminal device sends test data to determine transmission parameters, automatically groups data according to transmission speed, forms a group list, confirms the target group list through comprehensive scoring, and creates a device chain to avoid multiple transmissions across network devices.

Benefits of technology

It improves the efficiency of device chaining and data transmission speed, reduces multiple transmissions across network devices, and enhances overall work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024129997_15052026_PF_FP_ABST
    Figure CN2024129997_15052026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application discloses a device chain establishment method, a device, and a storage medium. The method is applied to a first terminal device, and comprises: receiving a chain establishment start instruction sent by a second terminal device, wherein the chain establishment start instruction carries network information of terminal devices participating in chain establishment; in response to the chain establishment start instruction, sending test data to other terminal devices respectively on the basis of the network information, and determining a transmission parameter for each piece of test data, wherein the transmission parameter comprises a transmission speed; determining a grouping list on the basis of the transmission speed, wherein the grouping list comprises a first grouping comprising terminal devices belonging to a same network device as the first terminal device, and a second grouping comprising terminal devices not belonging to a same network device as the first terminal device; and sending the grouping list to the second terminal device, for the second terminal device to perform comprehensive scoring processing on the basis of grouping records in the received grouping list, determine a target grouping list, and establish a device chain on the basis of the target grouping list, thereby solving the problem of low efficiency in device chain establishment and improving the efficiency of device chain establishment.
Need to check novelty before this filing date? Find Prior Art

Description

A method, device, and storage medium for assembling a device chain. Technical Field

[0001] This application relates to the field of information transmission technology, and in particular to a device chaining method, device, and storage medium. Background Technology

[0002] A device chain in network equipment (such as switches) refers to connecting multiple terminal devices within a network through specific connection methods to form a logical network topology. Device chains are widely used in enterprise networks, data centers, industrial parks (for connecting various industrial equipment), smart cities (transportation, security, and energy, etc.), finance, and healthcare.

[0003] In related technologies, the physical topology is not considered when forming a device chain, and random chaining is performed. This may result in the terminal devices receiving and sending data multiple times across network devices (such as switches), which leads to low transmission speed when transmitting files based on the device chain.

[0004] To address the issue of multiple cross-network device transmissions caused by random device chain formation, related technologies typically involve manually setting the chain formation order. However, manually setting the chain formation order is labor-intensive, especially when there are many participating terminal and network devices. The manual setting of the chain formation order is time-consuming, resulting in relatively low chain formation efficiency. Therefore, among related technologies, the method of manually setting the chain formation order has low chain formation efficiency.

[0005] Summary of the Invention

[0006] This application provides a device chaining method, device, and storage medium, which can solve the technical problem of low device chaining efficiency in related technologies and improve device chaining efficiency.

[0007] In a first aspect, embodiments of this application provide a device chaining method for a first terminal device connected to a network device; the device chaining method includes:

[0008] Receive the chain start command sent by the second terminal device. The chain start command carries the network information of the terminal devices participating in the chain.

[0009] In response to the chain start command, test data is sent to other terminal devices according to network information, and the transmission parameters of each test data are determined, including the transmission speed.

[0010] The packet list is determined based on the transmission speed. The packet list includes a first packet and a second packet. The first packet is a packet that belongs to the same network device as the first terminal device, and the second packet is a packet that does not belong to the same network device as the first terminal device.

[0011] The packet list is sent to the second terminal device, which performs comprehensive scoring based on the packet records in the received packet list, confirms the target packet list, and creates a device chain based on the target packet list. The target packet list will identify the terminal devices connected to the same network device for packet recording.

[0012] As described above, the first terminal device determines a group list based on test data, and the second terminal device aggregates all group lists returned by the first terminal devices. A comprehensive scoring process is then performed on all group lists to determine the target group list. This achieves automatic grouping of terminal devices within the same network device, resulting in the final target group list. Compared to manual grouping methods in related technologies, this significantly improves grouping efficiency, thereby enhancing the overall efficiency of device chain formation. Furthermore, the second terminal device creates a device chain based on the target group list. Compared to random chain formation in related technologies, this embodiment creates a device chain based on a target group list that clearly distinguishes each network device group. This effectively avoids multiple data transmissions across network devices, thereby improving the overall speed of data transmission based on the device chain and ultimately enhancing the overall efficiency of data transmission based on the device chain.

[0013] In one embodiment, determining the packet list based on the transmission speed includes:

[0014] Based on the transmission speed of each test data, determine that the terminal devices with a transmission speed greater than the first threshold belong to the first group, and record the information of the first group;

[0015] Based on the transmission speed of each test data, determine which terminal devices with transmission speeds within a first threshold belong to the second group, and record the information of the second group;

[0016] Combining the information from the first group and the second group, we obtain the group list.

[0017] As described above, the first terminal device determines a group list based on the transmission speed. The group list includes a first group belonging to the same network device as the first terminal device and a second group not belonging to the same network device as the first terminal device, forming a first group record and a second group record. Automatic group testing is performed on all terminal devices participating in the group chain. Compared with the manual grouping method in related technologies, this greatly improves the automation and intelligence of grouping, thereby improving the efficiency of grouping terminal devices based on network devices, and thus improving the overall efficiency of creating a device chain.

[0018] In one embodiment, test data is sent to other terminal devices based on network information, and the transmission parameters for each test data are determined, including:

[0019] Based on network information, multiple sets of test data are sent to other terminal devices to determine multiple sets of transmission parameters for each terminal device. These multiple sets of transmission parameters include multiple transmission speeds.

[0020] The packet list is determined based on the transmission speed, including:

[0021] Variance calculation is performed on multiple transmission speeds of each terminal device to obtain the speed variance value corresponding to each terminal device.

[0022] Sort the velocity variance values ​​from smallest to largest and determine the step value between adjacent velocity variance values;

[0023] The first step value exceeding the second threshold is determined as the target step value. The terminal devices corresponding to the smaller velocity variance value of the target step value and the previously sorted velocity variance values ​​are identified as belonging to the first group, and the information of the first group is recorded.

[0024] The terminal devices corresponding to the larger velocity variance value of the target step value and the subsequent velocity variance values ​​are identified as belonging to the second group, and the information of the second group is recorded.

[0025] Combining the information from the first group and the second group, we obtain the group list.

[0026] As described above, the first terminal device determines a group list based on the transmission speed. The group list includes a first group belonging to the same network device as the first terminal device and a second group not belonging to the same network device as the first terminal device, forming a first group record and a second group record. Automatic group testing is performed on all terminal devices participating in the group chain. Compared with the manual grouping method in related technologies, this greatly improves the automation and intelligence of grouping, thereby improving the efficiency of grouping terminal devices based on network devices, and thus improving the overall efficiency of creating a device chain.

[0027] In a second aspect, embodiments of this application provide a device chaining method for a second terminal device connected to a network device. The device chaining method includes:

[0028] A chain start command is sent to the first terminal device, so that the first terminal device sends test data to the terminal devices participating in the chain respectively, and confirms and returns the group list based on the test data. The chain start command carries the network information of the terminal devices participating in the chain. The terminal devices participating in the chain include the first terminal device and the second terminal device. The group list includes the first group and the second group. The first group is the group that belongs to the same network device as the first terminal device, and the second group is the group that does not belong to the same network device as the first terminal device.

[0029] The target group list is determined by a comprehensive scoring process based on the received group list and the group records in the self-generated group list. The target group list will then identify the terminal devices connected to the same network device and record them in the group list.

[0030] Create a device chain based on the grouping records in the target grouping list.

[0031] As described above, by aggregating the group lists returned by all first terminal devices through the second terminal device, and determining the target group list through comprehensive scoring, the final target group list is obtained by automatically grouping terminal devices within the same network device. Compared with the manual grouping method in related technologies, this greatly improves the efficiency of grouping, thereby enhancing the overall efficiency of device chain formation. Furthermore, the second terminal device creates device chains based on the target group list. Compared with the random chain formation method in related technologies, this embodiment creates device chains based on the target group list that clearly distinguishes each network device group. This can effectively avoid multiple data transmissions across network devices, thereby improving the overall speed of data transmission based on device chains, and thus enhancing the overall efficiency of data transmission based on device chains.

[0032] In one embodiment, a comprehensive scoring process is performed based on the received group list and the group records in the self-generated group list to confirm the target group list, including:

[0033] Select a reference node from the terminal devices participating in the chain. Based on the reference node, score other first terminal devices by traversing all group lists to determine the terminal devices in the same group that belong to the same network device as the reference node. Add the terminal devices in the same group to the network device group of the reference node to obtain the group record.

[0034] By integrating the packet records of network devices corresponding to each reference node, a target packet list is obtained.

[0035] The above-mentioned comprehensive scoring process is used to finally confirm which terminal devices belong to the same network device group, thereby obtaining a target group list. This improves the accuracy of the network device groups recorded in the target group list. Subsequently, when a device chain is obtained based on the target group list, multiple cross-network device operations can be avoided, thereby improving the transmission speed and efficiency of data transmission based on the device chain.

[0036] In one embodiment, a reference node is selected from the participating terminal devices in the group chain. Based on the reference node's score across all group lists, other first terminal devices are traversed and scored to determine the terminal devices belonging to the same network device as the reference node. These terminal devices are then added to the reference node's network device group, resulting in a group record, including:

[0037] Select the second terminal device as the reference node and create a network device group for the reference node;

[0038] The reference node iterates through all group lists and scores other first terminal devices to obtain the comprehensive score of the target terminal device and the reference node.

[0039] Based on the comprehensive score, the terminal devices belonging to the same network device as the reference node are identified, and these terminal devices are added to the network device group of the reference node to obtain the group record.

[0040] Select one of the remaining ungrouped first terminal devices as a new reference node, and create a new network device packet corresponding to the new reference node;

[0041] Based on the new reference node, the remaining ungrouped first terminal devices are traversed and scored according to all group lists, so as to add the terminal devices in the same group that belong to the same network device as the new reference node to the network device group corresponding to the reference node, and obtain new group records.

[0042] Continue to identify new reference nodes from the remaining ungrouped first terminal devices until there are no more ungrouped first terminal devices, and obtain the packet records of the network device packets corresponding to each reference node.

[0043] The above-mentioned comprehensive scoring process is used to finally confirm which terminal devices belong to the same network device group, thereby obtaining a target group list. This improves the accuracy of the network device groups recorded in the target group list. Subsequently, when a device chain is obtained based on the target group list, multiple cross-network device operations can be avoided, thereby improving the transmission speed and efficiency of data transmission based on the device chain.

[0044] In one embodiment, the reference node iterates through and scores other first terminal devices based on all group lists to obtain the comprehensive score of the target terminal device and the reference node, including:

[0045] Based on the reference node, the preset scoring rules, and each group list, other first terminal devices are scored respectively to obtain the sub-score of the target terminal device for each group list. The scoring rules are as follows: in the group list, if both the target terminal device to be scored and the reference node are in the first group, one point is added; if only one of the target terminal device to be scored and the reference node is in the first group, one point is subtracted; if both the target terminal device to be scored and the reference node are in the second group, no score is given.

[0046] The sub-scores corresponding to the target terminal device are added together to obtain the comprehensive score of whether the target terminal device and the reference node belong to the same network device group.

[0047] The above-mentioned comprehensive scoring process is used to finally confirm which terminal devices belong to the same network device group, thereby obtaining a target group list. This improves the accuracy of the network device groups recorded in the target group list. Subsequently, when a device chain is obtained based on the target group list, multiple cross-network device operations can be avoided, thereby improving the transmission speed and efficiency of data transmission based on the device chain.

[0048] In one embodiment, terminal devices belonging to the same network device group as the reference node are determined based on the comprehensive score, and these terminal devices are added to the network device group of the reference node to obtain a group record, including:

[0049] When the overall score is greater than zero, the target terminal device is identified as a terminal device belonging to the same network device group as the reference node, and the target terminal device is added to the network device group corresponding to the reference node, and the group information is updated.

[0050] The above-mentioned comprehensive scoring process is used to finally confirm which terminal devices belong to the same network device group, thereby obtaining a target group list. This improves the accuracy of the network device groups recorded in the target group list. Subsequently, when a device chain is obtained based on the target group list, multiple cross-network device operations can be avoided, thereby improving the transmission speed and efficiency of data transmission based on the device chain.

[0051] In one embodiment, creating a device chain based on group records in a target group list includes:

[0052] The second terminal device is used as a reference node, and the reference node is placed at the end of the chain;

[0053] Based on the target group list, add the terminal devices in the same group as the reference node to the end of the chain in sequence;

[0054] Based on the target group list, select a first terminal device from the remaining network device groups as a new reference node, and add the first terminal device to the tail of the chain;

[0055] Based on the target group list, add the terminal devices in the same group of the new reference node to the end of the chain in sequence until the first terminal device in all network device groups has been added.

[0056] As described above, in this way, the terminal devices in each network device form a short device chain. The beginning and end of the short device chain are connected across network devices only once, thereby avoiding the transmission slowdown caused by multiple cross-network device connections, and thus improving the transmission speed and efficiency of data transmission based on this device chain.

[0057] In one embodiment, after sending the chain start command to the first terminal device, the method further includes:

[0058] The system receives transmission parameters returned by the first terminal device. The transmission parameters include latency information, which is the latency information determined by the first terminal device based on the test data.

[0059] Based on the target group list, select a first terminal device from the remaining network device groups as the new reference node, and add the first terminal device to the tail of the chain, including:

[0060] Based on the latency information returned by the current reference node and the target packet list, calculate the average latency value between each remaining network device packet and the reference node. The average latency value is the average of the latency information of all first terminal devices in the corresponding network device packet between the reference node and the reference node.

[0061] From the remaining network device packets, determine the network device packet with the smallest average latency value, and select a first terminal device from the network device packet with the smallest average latency value as the new reference node.

[0062] As described above, in this way, the terminal devices in each network device form a short device chain. The beginning and end of the short device chain are connected across network devices only once, thereby avoiding the transmission slowdown caused by multiple cross-network device connections, and thus improving the transmission speed and efficiency of data transmission based on this device chain.

[0063] In one embodiment, determining the network device group with the smallest average latency value from the remaining network device groups, and selecting a first terminal device as a new reference node from the network device group with the smallest average latency value, includes:

[0064] Based on the target group list, determine the network interface card bandwidth corresponding to each of the remaining network device groups;

[0065] When the network interface card bandwidth corresponding to the remaining network device groups is less than the network interface card bandwidth of the current reference node, the network device group with the smallest average latency value is determined from the remaining network device groups, and a first terminal device is selected from the network device group with the smallest average latency value as the new reference node.

[0066] If there are network device groups in the remaining network device groups whose network interface card (NIC) bandwidth is greater than or equal to that of the reference node, then determine the network device group with the smallest average latency value from the network device groups whose NIC bandwidth is greater than or equal to that of the reference node, and select a first terminal device from the network device group with the smallest average latency value as the new reference node.

[0067] As described above, in this way, the terminal devices in each network device form a short device chain. The beginning and end of the short device chain are connected across network devices only once, thereby avoiding the transmission slowdown caused by multiple cross-network device connections, and thus improving the transmission speed and efficiency of data transmission based on this device chain.

[0068] In one embodiment, before sending the chain start command to the first terminal device, the following steps are included:

[0069] Obtain network information of all terminal devices participating in the blockchain based on the transmission control protocol;

[0070] Add the first terminal device to the tail of the chain, including:

[0071] The network information of the first terminal device to be added to the tail of the chain is sent to the first terminal device currently at the tail of the chain, so that the first terminal device currently at the tail of the chain can establish a communication connection with the corresponding first terminal device based on the network information, so that the first terminal device to be added to the tail of the chain can be successfully added to the tail of the chain.

[0072] As described above, in this way, the terminal devices in each network device form a short device chain. The beginning and end of the short device chain are connected across network devices only once, thereby avoiding the transmission slowdown caused by multiple cross-network device connections, and thus improving the transmission speed and efficiency of data transmission based on this device chain.

[0073] In a third aspect, embodiments of this application provide a device chain assembly device, comprising:

[0074] Memory and one or more processors;

[0075] Memory, used to store one or more programs;

[0076] When one or more programs are executed by one or more processors, the one or more processors implement the device chaining method as described in the first or second aspect.

[0077] In a fourth aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform device chaining methods as described in the first or second aspect.

[0078] The beneficial effects of the equipment chain assembly devices and storage media provided above can be referenced in relation to the beneficial effects of the equipment chain assembly method. Attached Figure Description

[0079] Figure 1 is a schematic diagram of a device chain in a related art provided in an embodiment of this application;

[0080] Figure 2 is a flowchart of a device chain assembly method provided in an embodiment of this application;

[0081] Figure 3 is a schematic diagram of the speed variance value of data transmission provided in an embodiment of this application;

[0082] Figure 4 is a flowchart of another device chaining method provided in an embodiment of this application;

[0083] Figure 5 is a flowchart illustrating another device chain assembly method provided in an embodiment of this application;

[0084] Figure 6 is a schematic diagram of a device chain provided in an embodiment of this application;

[0085] Figure 7 is a schematic diagram of the structure of a device chain assembly device provided in an embodiment of this application. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0087] In related technologies, the physical topology is not considered when forming a device chain, and random chaining is performed. This may result in multiple cross-network device (e.g., switch) operations for receiving and sending between terminal devices, leading to low transmission speed when performing file transfer based on the device chain. Figure 1 is a schematic diagram of a device chain in a related technology provided by an embodiment of this application. Referring to Figure 1, assuming that the device chain is formed under two switches (i.e., network devices), if the physical topology is not considered and random chaining is performed, for example, as shown by the dotted line in the figure, terminal device 1 in switch 1 is connected to terminal device 2 in switch 2, terminal device 2 is connected to terminal device 3 in switch 1, and terminal device 3 is connected to terminal device 4 in switch 2, forming a device chain. When data transmission (e.g., file transfer) is performed based on this device chain, the data traffic from terminal device 1 to terminal device 2, and from terminal device 3 to terminal device 4, belongs to the gigabit switch (i.e., switch 1) to gigabit switch (i.e., switch 2). Due to the physical bandwidth limitations between switches, the bandwidth between terminal device 1 and terminal device 2, and between terminal device 3 and terminal device 4, cannot exceed the physical bandwidth between switches. This leads to a reduction in transmission speed between terminal device 1 and terminal device 2, and between terminal device 3 and terminal device 4, for example, to 500Mbps. As the receiving bandwidth of terminal device 2 decreases, the transmission bandwidth between terminal device 2 and terminal device 3 also decreases, ultimately causing a sharp drop in the utilization rate of the physical bandwidth of the entire device chain. When there are multiple switches and multiple terminal devices under multiple switches, if random chaining leads to multiple data transmissions across switches, the transmission speed of the entire device chain is low, resulting in low overall efficiency for data transmission (e.g., file transfer).

[0088] To address the issue of multiple cross-network device transmissions caused by random device chain formation, related technologies propose manually setting the chain formation order. This avoids such instances. However, manually setting the chain formation order is labor-intensive, especially when there are many participating terminal and network devices (such as switches or routers). The manual setting of the chain formation order is time-consuming, resulting in relatively low chain formation efficiency. Therefore, the method of manually setting the chain formation order in related technologies has low chain formation efficiency.

[0089] Based on this, the present application provides a device chaining method, device, and storage medium to solve the technical problem of low device chaining efficiency in related technologies. The device chaining method, device, and storage medium provided in this application aim to, when building a device chain, allow a first terminal device to determine terminal devices belonging to the same network device as itself based on test data, forming a first group and recording the first group information; the first terminal device can also determine terminal devices not belonging to the same network device based on test data, forming a second group and recording the second group information; by integrating the first group information and the second group information, a group list confirmed by each terminal device is obtained, and the second terminal device aggregates all the group lists returned by the first terminal devices, and determines the target group list by comprehensively scoring all the group lists, thus achieving automatic grouping of terminal devices within the same network device to obtain the final target group list. Compared with the manual grouping method in related technologies, this greatly improves the grouping efficiency, thereby improving the overall work efficiency of device chain building; in addition, the second terminal device creates the device chain based on the target group list, which, compared with the random grouping method in related technologies, effectively avoids multiple data transmissions across network devices by creating the device chain based on the target group list that clearly distinguishes each network device group, thereby improving the overall speed of data transmission based on the device chain and thus improving the overall work efficiency of data transmission based on the device chain.

[0090] The device chaining method provided in this embodiment can be executed by a device chaining device, which can be implemented by software and / or hardware. The device chaining device can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the device chaining device can be an electronic device, such as a personal computer (PC), interactive whiteboard, tablet computer, smart TV, learning machine, or mobile phone.

[0091] The following description uses an interactive flat panel as the main example of the device chaining method.

[0092] This device chaining method is used for a first terminal device and / or a second terminal device. Both the first and second terminal devices are connected to network devices (which may be the same network device or different network devices). The second terminal device is manually selected. The user can check their own network interface card (NIC) bandwidth information and choose a terminal device with the highest NIC bandwidth (e.g., gigabit) among the network devices. For example, any terminal device connected to any gigabit switch can be selected as the second terminal device. The second terminal device will be the head terminal device when the device chain is subsequently created. All terminal devices participating in the chain, except for the second terminal device, are referred to as first terminal devices. For example, in a data center, files received by the first terminal device are simultaneously transmitted via the second terminal device.

[0093] Figure 2 is a flowchart of a device chaining method provided in an embodiment of this application. Referring to Figure 2, the device chaining method is used for a first terminal device connected to a network device. The device chaining method specifically includes:

[0094] S101. Receive the chain start command sent by the second terminal device. The chain start command carries the network information of the terminal devices participating in the chain.

[0095] A device chain can be understood as a communication chain formed by the linear communication connection of terminal devices. In a device chain, except for the terminal devices at the head and tail of the chain, other terminal devices can only receive data sent by their upstream devices and can only send data to their downstream devices. Therefore, in order to implement the transmission mechanism of a device chain, it is necessary to first form a device chain so that the terminal devices participating in the chain can be linearly connected, providing the physical topology foundation for subsequent data transmission based on the device chain (such as file simultaneous transfer).

[0096] When triggering the device chain formation, the second terminal device sends a chain formation start command to the first terminal device (of all participating devices) to initiate the device chain formation process. The first terminal device refers to all participating terminal devices other than the second terminal device. In other words, all participating terminal devices other than the second terminal device are referred to as the first terminal device.

[0097] Before the blockchain is formed, the second terminal device obtains network information of all participating first terminal devices based on the Transmission Control Protocol (TCP). This network information includes network address information, such as IP addresses. For example, the second terminal device obtains this network information using TCP calls. After receiving the blockchain trigger command, the second terminal device generates a blockchain startup command based on the network information of all terminal devices (including itself) and sends this command to all participating first terminal devices.

[0098] The first terminal device receives a chain-building start command sent by the second terminal device. This chain-building start command carries network information of all terminal devices participating in the chain. The first terminal device can then begin executing the relevant steps for device chain formation based on the response to the chain-building start command.

[0099] As described above, based on the network information of all participating terminal devices obtained by the second terminal device, and generating a corresponding chain-building start command based on the network information of all participating terminal devices, when the chain-building begins, the second terminal device sends the chain-building start command to the other participating terminal devices (i.e., the first terminal device). The corresponding first terminal device starts to execute relevant steps based on the received chain-building start command to automatically group the network devices. Compared with the manual grouping method in related technologies, the first terminal device in this embodiment can automatically group the network devices based on the received chain-building start command, thereby improving the automation and intelligence of network device grouping, and further improving the automation and intelligence of subsequent chain-building.

[0100] S102. In response to the chain start command, test data is sent to other terminal devices according to network information, and the transmission parameters of each test data are determined, including the transmission speed.

[0101] After receiving the chain initiation command, the first terminal device responds by sending test data (also called test traffic) to other terminal devices (including the second terminal device and other first terminal devices) according to the network information in the command. Each test data corresponds to one terminal device. The first terminal device determines the transmission parameters for each test data based on its own transmission data, including transmission speed and latency information. In essence, each transmission parameter corresponds to one terminal device. When terminal devices on different network devices transmit test data, the transmission speed is reduced due to network card limitations on different network devices. However, data transmission between terminal devices within the same network device does not experience speed reduction. Therefore, by sending test data to other terminal devices and determining the transmission parameters for each test data, the transmission speed in the transmission parameters can be used to determine whether the corresponding terminal device belongs to the same network device as the first device. This achieves automatic grouping of network devices, significantly improving grouping speed compared to manual grouping in related technologies, thereby increasing the speed of device chain formation.

[0102] S103. Determine the packet list based on the transmission speed. The packet list includes a first packet and a second packet. The first packet is a packet belonging to the same network device as the first terminal device, and the second packet is a packet that does not belong to the same network device as the first terminal device.

[0103] Since terminal devices within the same network do not experience speed reduction when sending test data to each other, but experience speed reduction when sending test data to terminal devices in different network devices, a terminal device can determine which terminal devices belong to the same network device based on the transmission speed corresponding to the test data. For example, let's assume the second terminal device is terminal device A, and the first terminal devices are terminal devices B, C, and D. Terminal devices A and B are in the same network device, while terminal devices C and D are in another network device. When terminal device A sends test data to other terminal devices (i.e., terminal devices B, C, and D), the transmission speed will be reduced when terminal device A sends test data to any terminal device in any of the other network devices; that is, the transmission speed will be reduced when terminal device A sends test data to terminal device C or terminal device D. However, the transmission speed will not be reduced when terminal device A sends test data to terminal device B, which is also in the same network device. Assuming terminal device A transmits test data at a speed of speedA, and both the network device and the terminal device have a physical bandwidth of 1000Mbps, then speedA = 90% of terminal device A's maximum network card bandwidth / the number of other terminal devices (here, 3), i.e., speedA = (1000Mbps * 90%) / 3 = 300Mbps. Therefore, speedA is calculated to be 300Mbps. At this point, the test data (i.e., test traffic) between terminal device A and terminal device C, terminal device A and terminal device D, terminal device B and terminal device C, and terminal device B and terminal device D will all cross network devices. Therefore, the combined transmission bandwidth between terminal device A and terminal device C will not exceed 250Mbps (due to the limitation of the network device's physical bandwidth), i.e., it will not exceed 83.3% of speedA. However, the test data (i.e., test traffic) between terminal device A and terminal device B will not cross network devices, therefore the transmission bandwidth between terminal device A and terminal device B can reach the speedA value without any speed reduction. Therefore, 88% of speedA can be taken as the first threshold (the first threshold is theoretically only between 83.3% and 100% of speedA, but for higher differentiation, the first threshold is generally above 88% of speedA). Terminal device A can determine whether it belongs to a cross-network device with other terminal devices based on whether the transmission speed is lower than the first threshold when sending test data to other terminal devices.

[0104] Therefore, after determining the transmission parameters corresponding to each piece of test data it sends, the first terminal device can determine its own perceived group list based on the transmission speed in the transmission parameters. This group list includes a first group and a second group. The first group consists of groups belonging to the same network device as the first terminal device. This can be understood as the first terminal device determining, based on the transmission speed of the test data, to group terminal devices belonging to the same network device as itself; this group includes the first terminal device itself. The second group consists of groups not belonging to the same network device as the first terminal device. This can be understood as the first terminal device determining, based on the transmission speed of the test data, to group terminal devices not belonging to the same network device as itself. It should be noted that the terminal devices in the second group only indicate that they do not belong to the same network device as the current first terminal device. The first terminal device cannot confirm whether there are other terminal devices in the second group belonging to the same network device. It should be noted that each first terminal device corresponds to a defined group list. The group list records the first and second group information that the first terminal device itself considers to be in control when sending test data. In other words, each first terminal device determines its own perceived group list based on the test data it sends. Therefore, the resulting group list includes a first group and a second group. The first group consists of groups that the first terminal device considers to belong to the same network device as itself, while the second group consists of groups that the first terminal device considers to belong to different network devices. As described above, each first terminal device determines its group list based on the transmission speed corresponding to its own transmitted test data. This achieves automatic grouping of terminal devices participating in the network chain, significantly improving the grouping speed compared to the manual grouping method in related technologies, thereby increasing the speed of device chain formation.

[0105] This embodiment provides a specific implementation for determining a group list. Since terminal devices within the same network device do not experience speed reduction when sending test data to each other, but do experience speed reduction when sending test data to terminal devices in different network devices, the first terminal device determines whether it belongs to the same network device by comparing the transmission speed of each test data it sends with a first threshold. Based on the transmission speed of each test data, terminal devices with transmission speeds greater than the first threshold (e.g., speedA*88%) are determined to belong to the same network device group as the first terminal device sending the test data; this is the first group, and the first group information is recorded. Based on the transmission speed of each test data, terminal devices with transmission speeds within the first threshold are determined not to belong to the same network device as the first terminal device sending the test data; this is the second group, and the second group information is recorded. The first terminal device combines the first and second group information it recorded to obtain the corresponding group list. For example, terminal device A is used as the execution subject for illustration. Assume the number of other terminal devices is 10. Terminal device A, in response to the chain start command, sends test data to the other 10 terminal devices according to the network information and determines the transmission speed of each test data. Based on the fact that each test data corresponds to a terminal device, the relationship between the transmission speed of the test data and the corresponding terminal device is shown in Table 1 below.

[0106] Table 1

[0107] Assuming the physical bandwidth of the network device and all terminal devices is 1000Mbps, according to the formula speedA = 90% of the maximum network card bandwidth of terminal device A / number of other terminal devices (here, 10), speedA can be calculated to be 90Mbps (i.e., 11.25MB / s). Therefore, the first threshold can be set to 11.25 * 0.88 = 9.9MB / s. Thus, it can be determined that the transmission bandwidth (i.e., transmission speed) between terminal device A and terminal devices 1-6 is greater than the first threshold, meaning they belong to the same network device group. Terminal device A and terminal devices 1-6 are identified as belonging to the first group, and this first group information is recorded. The transmission bandwidth (i.e., transmission speed) between terminal device A and terminal devices 7-10 is within the first threshold, meaning they belong to the same network device group as terminal device A. Terminal devices 7-10 are identified as belonging to the second group, and this second group information is recorded. Therefore, the list of groups identified by terminal device A is shown in Table 2 below.

[0108] Table 2

[0109] Therefore, the packet list obtained by terminal device A includes a first packet and a second packet. The first packet (as perceived by terminal device A) consists of packets belonging to the same network device as terminal device A, and includes terminal device A and terminals 1-6. The second packet (as perceived by terminal device A) consists of packets not belonging to the same network device as terminal device A, and includes terminals 7-10.

[0110] It should be noted that, to improve accuracy, the transmission speed can be the median value of multiple sets of data. For example, the first terminal device can send test data to other terminal devices multiple times. For the same terminal device, the median value of the transmission speed of the multiple test data transmissions can be used as the data for subsequent network device packet analysis (i.e., transmission speed). For example, terminal device A collects the transmission speed corresponding to five sets of test data for any other terminal device, removes the highest and lowest values ​​from the five sets of transmission speeds, and calculates the variance and median value of the remaining three values ​​(i.e., the final determined transmission speed).

[0111] This embodiment provides another specific implementation for determining the group list. Since terminal devices within the same network device do not experience speed reduction when sending test data to each other, but do experience speed reduction when sending test data to terminal devices in different network devices, the transmission speed of test data for terminal devices within the same network device does not vary significantly. Therefore, the speed variance of the transmission speed can be used to determine the speed variation, and the step value of the speed variance (speed variation) can be used to determine the network device grouping. The first terminal device sends multiple sets of test data to other terminal devices based on network information, determining multiple sets of transmission parameters for each terminal device, thus determining multiple transmission speeds for each terminal device. Variance calculation is performed based on the multiple transmission speeds of each terminal device to obtain the speed variance value corresponding to each terminal device. For example, if the first terminal device sends test data to other terminal devices multiple times, variance calculation is performed on the transmission speeds of the multiple test data for the same (other) terminal device to obtain the speed variance value corresponding to that terminal device. The speed variance values ​​corresponding to all other terminal devices are sorted from smallest to largest, and the step value of adjacent speed variance values ​​is determined. This step value can be understood as the difference between two adjacent speed variance values. The step values ​​of adjacent speed variance values ​​are compared with a preset second threshold, and the first step value exceeding the second threshold is determined as the target step value. Since terminal devices under the same network device do not experience speed reduction when sending test data, their corresponding transmission speeds are relatively similar. When a significant change in transmission speed occurs, i.e., the first step value exceeds the second threshold, it indicates that the preceding terminal devices have smaller speed variances and belong to the same network device. Subsequent terminal devices with step values ​​exceeding the second threshold have significantly different speed variances, indicating they do not belong to the same network device. Therefore, the terminal devices corresponding to the smaller speed variance values ​​of the target step value and the previously ranked speed variance values ​​are identified as belonging to the first group, i.e., these terminal devices belong to the same network device group as the first terminal device (sending test data), and the first group information is recorded. The terminal devices corresponding to the larger speed variance values ​​of the target step value and the subsequently ranked speed variance values ​​are identified as belonging to the second group, i.e., these terminal devices do not belong to the same network device group as the first terminal device (sending test data), and the second group information is recorded. By integrating the information from the first group and the second group, a group list is obtained.

[0112] For example, taking terminal device A as the current execution entity, there are 10 other terminal devices, referred to as terminal devices 1-10. Terminal device A collects multiple sets of transmission speeds from terminal devices 1-10 and calculates the variance value based on these multiple sets of transmission speeds to obtain the speed variance value corresponding to each terminal device (among terminal devices 1-10). The speed variance values ​​of terminal devices 1-10 are arranged in ascending order, resulting in the curve shown in Figure 3. As shown in Figure 3, the first step position (the first step value exceeding the second threshold) appears between terminal devices 6 and 7, meaning the difference between these two speed variance values ​​(i.e., the step value) exceeds the second threshold (e.g., the second threshold is 3). At this point, terminal devices 1-6 are determined to belong to the same network device group as terminal device A; that is, terminal device A and terminal devices 1-6 belong to the first group, and the information of the first group is recorded. In this embodiment, the determination of the step position can be based on the difference (i.e., the variance interval) and the growth rate of the sequence, for example, the difference (i.e., the step value) is greater than 0.15, and the growth rate is greater than 300%. The specific differences (i.e., variance intervals) and growth rates of the sequences can be set according to the actual network environment. Therefore, through this embodiment, the first group includes terminal devices 1-6 and terminal device A, the second group includes terminal devices 7-10, and the final group list determined by terminal device A is shown in Table 3 below.

[0113] Table 3

[0114] Therefore, the packet list obtained by terminal device A includes a first packet and a second packet. The first packet (as perceived by terminal device A) consists of packets belonging to the same network device as terminal device A, and includes terminal device A and terminals 1-6. The second packet (as perceived by terminal device A) consists of packets not belonging to the same network device as terminal device A, and includes terminals 7-10.

[0115] It should be noted that, as can be seen from the foregoing embodiments, different first terminal devices may obtain different group lists. Therefore, it is necessary to perform summary analysis to determine the final target group list, i.e., to execute S104.

[0116] As described above, the first terminal device determines a group list based on the transmission speed. The group list includes a first group belonging to the same network device as the first terminal device and a second group not belonging to the same network device as the first terminal device, forming a first group record and a second group record. Automatic group testing is performed on all terminal devices participating in the group chain. Compared with the manual grouping method in related technologies, this greatly improves the automation and intelligence of grouping, thereby improving the efficiency of grouping terminal devices based on network devices, and thus improving the overall efficiency of creating a device chain.

[0117] S104. Send the packet list to the second terminal device so that the second terminal device can perform comprehensive scoring processing based on the packet records in the received packet list, confirm the target packet list, and create a device chain based on the target packet list. The target packet list will determine the terminal devices connected to the same network device for packet recording.

[0118] The first terminal device sends its own determined group list to the second terminal device, which then performs a comprehensive scoring process based on the group records in the received (all) group lists. The second terminal device determines a target group list based on the comprehensive score obtained from this comprehensive scoring process and creates a device chain based on the target group list. The second terminal device also determines a group list based on the implementation method provided in this embodiment. During the comprehensive scoring process, the second terminal device performs a comprehensive scoring process on both the received group list and its own determined group list to ultimately determine which terminal devices belong to the same network device group, thus obtaining the final target group list. By aggregating the group lists to the second terminal device, the second terminal device can perform a comprehensive scoring process based on the group lists determined by all the first terminal devices and its own determined group list to obtain the final target group list. It then creates a device chain based on the target group list, achieving automatic grouping of terminal devices and automatic creation of device chains, thereby improving the automation and intelligence of the grouping process and ultimately increasing the efficiency of the grouping process.

[0119] As described above, the first terminal device identifies terminal devices belonging to the same network device as itself based on test data, forming a first group and recording the first group information. The first terminal device can also identify terminal devices not belonging to the same network device based on the test data, forming a second group and recording the second group information. Integrating the first and second group information yields a group list confirmed by each terminal device. The second terminal device then aggregates all group lists returned by the first terminal devices, performing a comprehensive scoring process on all group lists to determine the target group list. This achieves automatic grouping of terminal devices within the same network device, resulting in the final target group list. Compared to the manual grouping method in related technologies, this significantly improves grouping efficiency, thereby enhancing the overall efficiency of device chain formation. Furthermore, the second terminal device creates device chains based on the target group list. Compared to the random chaining method in related technologies, this embodiment creates device chains based on a target group list that clearly distinguishes each network device group, effectively avoiding multiple data transmissions across network devices, thus improving the overall speed of data transmission based on device chains and ultimately enhancing the overall efficiency of data transmission based on device chains.

[0120] Based on the foregoing implementation, Figure 4 is a flowchart of another device chaining method provided in an embodiment of this application. Referring to Figure 4, another device chaining method according to an embodiment of this application is provided. This device chaining method is used for a second terminal device, which is connected to a network device. The device chaining method specifically includes:

[0121] S201. Send a chain start command to the first terminal device, so that the first terminal device sends test data to the terminal devices participating in the chain respectively, and confirms and returns the group list according to the test data. The chain start command carries the network information of the terminal devices participating in the chain. The terminal devices participating in the chain include the first terminal device and the second terminal device. The group list includes the first group and the second group. The first group is the group that belongs to the same network device as the first terminal device, and the second group is the group that does not belong to the same network device as the first terminal device.

[0122] The second terminal device can be understood as the initiator of the device chain. The user can trigger the chain by interacting with the second terminal device. For example, the user can directly input a file distribution command (equivalent to a chain trigger command). The second terminal device creates the device chain based on the received file distribution command and distributes the corresponding files based on the created device chain.

[0123] After receiving a chain-building trigger command (e.g., a file distribution command), the second terminal device first waits for a ready command transmitted by the receiving end. It then establishes communication with all participating first terminal devices using a TCP (Transmission Control Protocol) call method. First terminal devices can report ready commands via TCP calls, which include their network information, such as network address information (e.g., IP address). Based on user interaction, the second terminal device can learn the number and device identifiers of the participating first terminal devices. Therefore, after receiving the ready commands reported by the first terminal devices via TCP calls, and confirming receipt of all ready commands from the first terminal devices, the second terminal device sends a chain-building start command to each of them. This can be done via TCP calls or based on the network information in the ready commands. Each first terminal device, upon receiving the chain-building start command, executes steps S101-S104 to obtain a corresponding packet list and returns it to the second terminal device. In other words, when the second terminal device sends the chain-building start command, it receives packet lists returned by each of the first terminal devices. The group list includes a first group and a second group. The first group consists of groups belonging to the same network device as the first terminal device that generated the group list, while the second group consists of groups that do not belong to the same network device as the first terminal device that generated the group list. Furthermore, the second terminal device also determines a group list based on the aforementioned implementation steps S101-S104. Subsequently, the second terminal device performs a comprehensive scoring process based on its own determined group list and the group list returned by the first terminal device.

[0124] It should be noted that, in addition to returning the group list, the first terminal device also returns the transmission parameters of the probing process. These parameters include transmission speed and latency information. The transmission parameters are the transmission parameters corresponding to the test data, and can be the average of multiple test data points as the final reported test parameters. For example, terminal device A collects five sets of test data corresponding to any other terminal device, namely five sets of latency information and five sets of transmission speed. The highest and lowest values ​​from the five sets of latency information are removed, and the median of the remaining three values ​​is calculated to obtain the final reported latency information. Similarly, the highest and lowest values ​​from the five sets of transmission speed are removed, and the variance and median of the remaining three values ​​are calculated (i.e., the final reported transmission speed is determined).

[0125] S202. Perform comprehensive scoring processing based on the received packet list and the packet records in the self-generated packet list to confirm the target packet list. The target packet list will identify the terminal devices connected to the same network device and record their packets.

[0126] The second terminal device receives the packet lists reported by all the first terminal devices and performs a comprehensive scoring process based on the packet records in the received packet list and its own generated packet list. The comprehensive score obtained from the comprehensive scoring process determines which terminal devices belong to the same network device group, thus obtaining the final target packet list. This improves the accuracy of the network device groups recorded in the target packet list. The device chain obtained by subsequent linking based on the target packet list can avoid multiple cross-network device operations, thereby improving the transmission efficiency of data transmission based on the created device chain.

[0127] In one embodiment, an embodiment for determining a target group list is provided. During the comprehensive scoring process based on all group lists (including the group lists returned by the first terminal device and those generated by the second terminal device), a reference node is selected from the participating terminal devices in the group chain. The reference node then iterates through and scores other first terminal devices based on all group lists to determine the terminal devices belonging to the same network device as the reference node. These terminal devices are then added to the reference node's network device group to obtain a group record. For example, the second terminal device can be selected as the (first) reference node, and a network device group for the reference node can be created, such as network device group 1. The reference node then iterates through and scores other first terminal devices based on all group lists (including the group lists returned by the first terminal device and those generated by the second terminal device) to obtain the comprehensive score between the corresponding first terminal device and the reference node. For example, the first terminal device to be scored is defined as the current target terminal device. The preset scoring rule is as follows: in the group list, if both the target terminal device and the reference node are in the first group, add one point; if only one of the target terminal device and the reference node is in the first group, subtract one point; if both the target terminal device and the reference node are in the second group, no score is given. Based on the reference node and the preset scoring rule, each group list (including the group lists returned by the first terminal device and generated by the second terminal device) is traversed, and each terminal device is scored (or rated), obtaining the corresponding sub-score for each group list for the target terminal device. The sub-scores corresponding to all group lists are added together to obtain the comprehensive score indicating whether the target terminal device and the reference node belong to the same network device group. Based on the comprehensive score, the terminal devices belonging to the same network device as the reference node are determined, and these terminal devices are added to the network device group of the reference node, resulting in a group record. For example, if the overall score of the corresponding target terminal device is greater than zero, then the target terminal device is determined to be a terminal device belonging to the same network device group as the current reference node. The target terminal device is then added to the network device group corresponding to the current reference node, for example, network device group 1, and the group information is updated. The remaining target terminal devices with overall scores less than or equal to zero are then designated as the remaining ungrouped first terminal devices. Through the aforementioned implementation method, all first terminal devices belonging to the same network device group as the second terminal device can be found and added to their corresponding network device groups, such as network device group 1.

[0128] For example, referring to Table 2 above, assuming that when traversing the group list, with terminal device A as the current reference node, and assuming that the target terminal device to be scored is terminal device 1, then according to the group list and the preset scoring rules, it can be determined that both terminal device 1 and the reference node (terminal device A) are in the first group, so one point is added. That is, when terminal device A is the reference node, the sub-score of terminal device 1 corresponding to this group list is 1 point. Assuming that when traversing to the group list generated by terminal device 1, it is also determined that both terminal device 1 and the reference node (terminal device A) are in the first group, then one point is added. That is, when terminal device A is the reference node, the sub-score of terminal device 1 corresponding to this group list is 1 point. Following this logic, assuming that after traversing the group list corresponding to terminal device 10, terminal device 1 receives a score of 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 for each group list, then with terminal device A as the reference node, terminal device 1's overall score is 7. Since the overall score is greater than zero, terminal device 1 and the current reference node (i.e., terminal device A) are determined to belong to the same group of terminal devices within the same network device. Terminal device 1 is then added to the network device group corresponding to the current reference node (i.e., terminal device A), for example, network device group 1. Therefore, through this implementation, terminal devices 1-6 are ultimately added to network device group 1, meaning network device group 1 includes terminal device A and terminal devices 1-6. Therefore, the remaining ungrouped first terminal devices include terminal devices 7-10.

[0129] In one embodiment, assuming terminal device A is the reference node and the target terminal device to be scored is terminal device 7, according to the group list in Table 2 (generated by terminal device A) and the preset scoring rules, it can be determined that terminal device 7 and the reference node (i.e., terminal device A) have exactly one terminal device in the first group. Therefore, one point is deducted, resulting in a sub-score of -1 for terminal device 7 in this group list when terminal device A is the reference node. Assuming that, based on the group list corresponding to terminal device A-10, the sub-scores for terminal device 7 are -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, it can be determined that, with terminal device A as the reference node, the overall score for terminal device 7 is -9. Since the overall score is less than zero, it is determined that terminal device 7 and the current reference node (terminal device A) do not belong to the same group of terminal devices in the same network device, and thus it is considered the remaining ungrouped first terminal device.

[0130] Through the aforementioned traversal, the scoring of other first terminal devices is completed for the (first) reference node (i.e., the second terminal device). All first terminal devices belonging to the same network device group as the second terminal device are added to their corresponding network device groups. From the remaining ungrouped first terminal devices (e.g., terminal devices 7-10), a terminal device (e.g., terminal device 7) is selected as the new reference node, and a new network device group corresponding to the new reference node (e.g., terminal device 7) is created, for example, network device group 2. Based on the new reference node (e.g., terminal device 7), the remaining ungrouped first terminal devices (e.g., terminal devices 7-10) are traversed and scored according to the entire group list to obtain the combined score of the target terminal device and the current reference node (e.g., terminal device 7). For example, the preset scoring rule is: in the group list, if both the target terminal device and the reference node are in the first group, one point is added; if only one of the target terminal device and the reference node is in the first group, one point is subtracted; if both the target terminal device and the reference node are in the second group, no score is awarded. Based on the current reference node (e.g., terminal device 7) and preset scoring rules, each group list is traversed, and each terminal device is scored (or rated). The sub-score for each group list corresponding to the target terminal device is obtained. The sub-scores for all group lists are summed to obtain a comprehensive score indicating whether the target terminal device and the reference node (e.g., terminal device 7) belong to the same network device group. Based on the comprehensive score, terminal devices belonging to the same network device group as the current reference node (e.g., terminal device 7) are identified and added to the network device group of the current reference node (e.g., terminal device 7), such as network device group 2, resulting in a new group record. For example, based on the current reference node (e.g., terminal device 7), if the comprehensive score of the corresponding target terminal device is greater than zero, then the target terminal device is determined to be a terminal device belonging to the same network device group as the current reference node, and is added to the network device group corresponding to the current reference node (e.g., terminal device 7), such as network device group 2, and the group information is updated. The remaining terminal devices with a comprehensive score less than or equal to zero are considered as the remaining ungrouped terminal devices. Through the aforementioned implementation method, all first terminal devices belonging to the same network device group as the current reference node (e.g., terminal device 7) can be found and added to the corresponding network device group, such as network device group 2, to obtain a new group record.

[0131] For example, referring to Table 2 above, assuming terminal device 7 is the current reference node and the target terminal device to be scored is terminal device 8, when traversing to the group list determined by terminal device A, according to the group list and the preset scoring rules, it can be determined that terminal device 8 and the reference node (terminal device 7) are both in the second group. Based on this group list, it can only be determined that terminal device 7 and terminal device 8 are not under the same network device as terminal device A, but it cannot be determined whether terminal device 7 and terminal device 8 belong to the same network device. Therefore, no score is given, that is, no points are added or subtracted. That is, when terminal device 7 is the reference node, the sub-score of terminal device 8 corresponding to the group list confirmed by terminal device A is 0 points. It should be noted that although the group list in Table 2 (i.e., generated by terminal device A) cannot determine which terminal devices belong to the same network device as terminal device 7, the group list generated by terminal device 7 itself can determine which terminal devices belong to the same network device. Therefore, when traversing to the group list generated by terminal device 7, it is possible to obtain the target terminal device with a sub-score of 1 for the corresponding group list. Assuming terminal devices 7 and 8 belong to the same network device, then according to the group list generated by terminal device 7, the sub-score corresponding to terminal device 8 (the current target terminal device) is 1 point; and according to the group list generated by terminal device 8, the sub-score corresponding to terminal device 8 (the current target terminal device) is also 1 point. Assuming that the sub-score corresponding to terminal device 8 (the current target terminal device) determined by the group lists corresponding to other terminal devices is 0 points (i.e., no score), then with terminal device 7 as the reference node, the comprehensive score of terminal device 8 is 2 points. Since the comprehensive score is greater than zero, it is determined that terminal device 8 and the current reference node (i.e., terminal device 7) belong to the same group of terminal devices in the same network device. Terminal device 8 is added to the network device group corresponding to the current reference node (i.e., terminal device 7), for example, network device group 2. That is, terminal devices 7-8 are added to network device group 2, meaning network device group 2 includes terminal devices 7-8. Therefore, the remaining ungrouped first terminal devices include terminal devices 9-10.

[0132] By continuously identifying new reference nodes from the remaining ungrouped first terminal devices until no ungrouped first terminal devices remain, the packet records of the network device packets corresponding to each reference node can be obtained. The packet records of the network device packets corresponding to each reference node are then integrated to obtain the target packet list. For example, the target packet list is shown in Table 4 below.

[0133] Table 4

[0134] The above-mentioned comprehensive scoring process is used to finally confirm which terminal devices belong to the same network device group, thereby obtaining a target group list. This improves the accuracy of the network device groups recorded in the target group list. Subsequently, when a device chain is obtained based on the target group list, multiple cross-network device operations can be avoided, thereby improving the transmission speed and efficiency of data transmission based on the device chain.

[0135] S203. Create a device chain based on the group records in the target group list.

[0136] Device chains are created based on the group records in the target group list, so that terminal devices in the same network device group are connected into short device chains, and short device chains corresponding to different network device groups are concatenated into long device chains. This allows multiple cross-network device steps to be avoided in the long device chain, thereby improving the transmission speed and efficiency when data is transmitted based on device chains.

[0137] Figure 5 is a flowchart illustrating another device chain assembly method provided in an embodiment of this application. Referring to Figure 5, the device chain assembly method specifically includes:

[0138] S301, Use the second terminal device as a reference node.

[0139] For example, let's take terminal device A as the second terminal device and Table 4 as the target group list as an example for illustration.

[0140] S302, Place the reference node at the end of the chain.

[0141] For example, terminal device A is placed at the end of the chain.

[0142] S303. Select the terminal devices in the same group as the reference node and add them to the tail of the chain.

[0143] Based on the aforementioned target group list, the terminal devices in the same group as the current reference node are sequentially added to the tail of the chain. For example, the network information of the first terminal device to be added to the tail of the chain is sent to the first terminal device currently at the tail of the chain, so that the first terminal device currently at the tail of the chain establishes a communication connection with the corresponding (to be added to the tail of the chain) first terminal device based on this network information, thus successfully adding the (to be added to the tail of the chain) first terminal device to the tail of the chain. For example, terminal devices 1-6, which belong to the same network device group as terminal device A, are sequentially added to the tail of the chain. Terminal device A establishes a communication connection with terminal device 1 based on the network information of terminal device 1, thus adding terminal device 1 to the tail of the chain. Terminal device A transmits the network information of terminal device 2 to terminal device 1, so that terminal device 1 establishes a communication connection with terminal device 2 based on this network information, thus adding terminal device 2 to the tail of the chain, and so on, until terminal device 6 is added to the tail of the chain.

[0144] S304. Are there any remaining network device packets?

[0145] After selecting the terminal devices in the same group as the reference node and adding them to the tail of the chain, determine whether there are any remaining network device groups. If there are, execute S305; otherwise, execute S309.

[0146] S305. Are there any network device groups among the remaining network device groups whose network interface card bandwidth is greater than or equal to that of the reference node?

[0147] The network interface card (NIC) bandwidth of each terminal device can be obtained based on the aforementioned TCP call method. Terminal devices within the same network device group have the same NIC bandwidth. After adding the reference node and its group of terminal devices to the end of the chain, it is confirmed whether any of the remaining network device groups have a NIC bandwidth greater than or equal to that of the current reference node. If so, proceed to step S306; otherwise, if not, meaning the NIC bandwidth of the remaining network device groups is less than that of the current reference node, proceed to step S307.

[0148] It should be noted that since the second terminal device is any terminal device under the network device with the largest network card bandwidth selected by the user, the network card bandwidth corresponding to the remaining network device groups is usually equal to or less than the network card bandwidth of the current reference node.

[0149] S306. Filter out network device packets whose network card bandwidth is less than that of the reference node.

[0150] When a network device packet exists with a network interface card (NIC) bandwidth greater than or equal to that of the current reference node, network device packets with NIC bandwidth less than that of the current reference node are filtered out. That is, the next reference node is selected from these network device packets. After filtering out the network device packets with NIC bandwidth less than that of the reference node, step S307 is executed. For example, if the current reference node is terminal device A, among the remaining network device packets 2-4, network device packets 2 and 3 have the same NIC bandwidth as terminal device A (i.e., the reference node), while network device packet 4 has a lower NIC bandwidth than terminal device A. Therefore, network device packet 4 is filtered out.

[0151] S307. Determine the network device group with the minimum average latency relative to the reference node.

[0152] As mentioned above, when returning the packet list, the first terminal device also returns transmission parameters, including latency information. The latency information is determined by the corresponding first terminal device based on testing. Therefore, each first terminal device returns its latency information relative to each other terminal device. The latency information previously returned by the current reference node (the corresponding first terminal device) is determined. Based on this latency information and the target packet list, the average latency value of the reference node in each remaining network device packet can be calculated. This average latency value can be understood as the average of the latency information of all first terminal devices in the corresponding network device packet of the current reference node in the target packet list. The network device packet with the minimum average latency to the reference node is determined. For example, if the current reference node is terminal device A, among the remaining network device packets 2-4, network device packets 2 and 3 have the same network card bandwidth as terminal device A (i.e., the reference node), while network device 4 has a lower network card bandwidth than terminal device A. Therefore, after filtering out network device group 4, the average latency information of terminal device A and terminal devices 7 and 8 in network device group 2 is calculated to obtain the average latency value 1 between network device group 2 and terminal device A (i.e., the current reference node). Furthermore, the average latency information of terminal device A and terminal device 9 in network device group 3 is calculated (this is the latency value of terminal device 9), resulting in the average latency value 2 between network device group 3 and terminal device A (i.e., the current reference node). Comparing average latency value 1 and average latency value 2, the network device group with the smallest average latency to the reference node is determined. Assuming that average latency value 1 is less than average latency value 2, network device group 2 is determined to be the network device group with the smallest average latency to the reference node.

[0153] S308. Select any first terminal device as a reference node in this network device group.

[0154] From the remaining network device packets, determine the network device packet with the smallest average latency value, and select a first terminal device from the network device packet with the smallest average latency value as the new reference node, then re-execute S302. For example, assume that the network device packet with the smallest average latency with the reference node is determined to be network device packet 2, select terminal device 7 from network device packet 2 as the new reference node, and then re-execute S302.

[0155] For example, with terminal device 7 as the new reference node, terminal device 7 is added to the tail of the chain. That is, terminal device A sends the network information of terminal device 7 to terminal device 6 so that terminal device 6 can establish a communication connection with terminal device 7 based on the network information, thus successfully adding terminal device 7 to the tail of the chain. At this time, with terminal device 7 as the reference node, the terminal device in the same group as terminal device 7, namely terminal device 8, is added to the tail of the chain. It is determined that the remaining network device groups are still network device groups 3-4. Therefore, it is determined whether there are any network device groups in the remaining network device groups whose network card bandwidth is greater than or equal to that of the reference node. Among the remaining network device groups 3-4, based on the network card bandwidth of network device groups 2 and 3, the network card bandwidth of network device 4 is less than that of terminal device A. Therefore, after filtering out network device group 4, only network device group 3 remains. Therefore, it must be the group with the minimum average latency with the reference node (terminal device 7). Then, any first terminal device is determined from network device group 3 as the new reference node, such as terminal device 9, and terminal device 9 is added to the tail of the chain. Repeat the aforementioned implementation method. After adding terminal device 10 to the end of the chain, if it is determined that there are no remaining network device packets, then execute S309.

[0156] S309, Chain formation ends.

[0157] According to the target group list, the terminal devices in the same group of the new reference node are added to the end of the chain in sequence until the first terminal device in all network device groups has been added. That is, through the implementation of S301-S308 mentioned above, if it is determined in S304 that there are no remaining network device groups, it means that the group chain ends, that is, the first terminal device in all network device groups has been added.

[0158] Therefore, based on the target group list provided in Table 4 and the aforementioned device chaining method, the final device chain is shown in Figure 6. Figure 6 is a schematic diagram of a device chain provided in an embodiment of this application. Referring to Figure 6, solid lines represent physical connection lines between network devices, and dashed lines represent logical connection lines between upstream and downstream terminal devices. According to the aforementioned device chaining method, in the created device chain, terminal device A serves as the chain head, and the terminal devices connected sequentially are terminal devices 1-10, with terminal device 10 serving as the chain tail. In this way, the terminal devices in each network device form a short device chain. The beginning and end of the short device chain only make one connection across network devices, thereby avoiding the transmission slowdown caused by multiple connections across network devices, and thus improving the transmission speed and efficiency of data transmission based on this device chain.

[0159] As described above, by aggregating the group lists returned by all first terminal devices through the second terminal device, and determining the target group list through comprehensive scoring, the final target group list is obtained by automatically grouping terminal devices within the same network device. Compared with the manual grouping method in related technologies, this greatly improves the efficiency of grouping, thereby enhancing the overall efficiency of device chain formation. Furthermore, the second terminal device creates device chains based on the target group list. Compared with the random chain formation method in related technologies, this embodiment creates device chains based on the target group list that clearly distinguishes each network device group. This can effectively avoid multiple data transmissions across network devices, thereby improving the overall speed of data transmission based on device chains, and thus enhancing the overall efficiency of data transmission based on device chains.

[0160] Compared to the chaining methods in related technologies that support multiple cross-network devices, in this embodiment, the short chain of each network device only crosses the network device once at the beginning and end. Therefore, when performing file simultaneous transmission based on the device chain provided in this embodiment, the receiving and forwarding bandwidth of all terminal devices can be infinitely close to the maximum value of the physical network card of the terminal device. There will be no slowdown caused by the transmission traffic between terminal devices crossing the terminal device multiple times, thereby improving the overall efficiency of file simultaneous transmission.

[0161] As described above, this embodiment uses the first terminal device to automatically detect and determine network device groups, thereby achieving automatic grouping and automatic chain formation, which improves the flexibility and intelligence of device chain formation.

[0162] This application provides a device chaining device. Referring to FIG7, the device chaining device includes a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The device chaining device can have one or more processors, and the device chaining device can have one or more memories. The processor, memory, communication module, input device, and output device of the device chaining device can be connected via a bus or other means. The device chaining device provided in this application can be used to execute the device chaining method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0163] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the device chaining method in any embodiment of this application. The memory may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0164] The communication module 33 is used for data transmission.

[0165] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory, thereby realizing the device chaining method described above.

[0166] Input device 34 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 35 may include display devices such as a display screen.

[0167] The device chain assembly equipment provided above can be used to execute the device chain assembly method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0168] This application also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute a device chaining method. The device chaining method includes: receiving a chaining start command sent by a second terminal device, the chaining start command carrying network information of the terminal devices participating in the chaining; responding to the chaining start command, sending test data to other terminal devices according to the network information, determining transmission parameters for each test data, the transmission parameters including transmission speed; determining a group list according to the transmission speed, the group list including terminal devices connected to the same network device; sending the group list to the second terminal device, so that the second terminal device can perform comprehensive scoring processing based on the group records in the received group list, confirm the target group list, and create a device chain based on the target group list.

[0169] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0170] Of course, the storage medium for storing computer-executable instructions provided in the embodiments of this application is not limited to the device chaining method described above, but can also perform related operations in the device chaining method provided in any embodiment of this application.

[0171] The device chaining device, storage medium, and device chaining equipment provided in the above embodiments can execute the device chaining method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the device chaining method provided in any embodiment of this application.

[0172] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.

Claims

1. A device chain assembly method for a first terminal device, characterized in that, The first terminal device is connected to the network device; the method includes: Receive a chain start command sent by a second terminal device, the chain start command carrying network information of the terminal devices participating in the chain; In response to the chain start command, test data is sent to other terminal devices according to the network information, and the transmission parameters of each test data are determined, including the transmission speed. A group list is determined based on the transmission speed. The group list includes a first group and a second group. The first group is a group that belongs to the same network device as the first terminal device, and the second group is a group that does not belong to the same network device as the first terminal device. The group list is sent to the second terminal device, which performs comprehensive scoring based on the group records in the received group list, confirms the target group list, and creates a device chain based on the target group list. The target group list will identify terminal devices connected to the same network device for group recording.

2. The method according to claim 1, characterized in that, The step of determining the packet list based on the transmission speed includes: Based on the transmission speed of each test data, determine that the terminal devices with a transmission speed greater than a first threshold belong to the first group, and record the information of the first group; Based on the transmission speed of each test data, determine whether the terminal device whose transmission speed is within a first threshold belongs to the second group, and record the second group information; The group list is obtained by combining the first group information and the second group information.

3. The method according to claim 1, characterized in that, The step of sending test data to other terminal devices based on the network information and determining the transmission parameters of each test data includes: Based on the network information, multiple sets of test data are sent to other terminal devices respectively to determine multiple sets of transmission parameters corresponding to each terminal device. The multiple sets of transmission parameters include multiple transmission speeds. The step of determining the packet list based on the transmission speed includes: Variance calculation is performed on multiple transmission speeds of each terminal device to obtain the speed variance value corresponding to each terminal device. Sort the velocity variance values ​​from smallest to largest, and determine the step value between adjacent velocity variance values; The first step value exceeding the second threshold is determined as the target step value. The terminal devices corresponding to the smaller velocity variance value of the target step value and the previously sorted velocity variance values ​​are identified as belonging to the first group, and the information of the first group is recorded. The terminal devices corresponding to the larger velocity variance value corresponding to the target step value and the subsequent sorted velocity variance values ​​are identified as belonging to the second group, and the information of the second group is recorded. The group list is obtained by combining the first group information and the second group information.

4. A method for assembling a device chain, used for a second terminal device, characterized in that, The second terminal device is connected to a network device, and the method includes: A chain initiation command is sent to the first terminal device, so that the first terminal device sends test data to the terminal devices participating in the chain respectively, and confirms and returns a group list based on the test data. The chain initiation command carries the network information of the terminal devices participating in the chain. The terminal devices participating in the chain include the first terminal device and the second terminal device. The group list includes a first group and a second group. The first group is a group that belongs to the same network device as the first terminal device, and the second group is a group that does not belong to the same network device as the first terminal device. A comprehensive scoring process is performed based on the received group list and the group records in the self-generated group list to confirm the target group list. The target group list will identify terminal devices connected to the same network device and record them in the group list. Create a device chain based on the group records in the target group list.

5. The method according to claim 4, characterized in that, The step of performing a comprehensive scoring process based on the received group list and the group records in the self-generated group list to confirm the target group list includes: Select a reference node from the participating terminal devices in the chain, score other first terminal devices based on the reference node's list of all groups, determine the terminal devices in the same group that belong to the same network device as the reference node, and add the terminal devices in the same group to the network device group of the reference node to obtain the group record; The target packet list is obtained by integrating the packet records of network device packets corresponding to each reference node.

6. The method according to claim 5, characterized in that, The step involves selecting a reference node from the participating terminal devices, scoring other first terminal devices based on the reference node's list of all groups, determining the terminal devices belonging to the same network device as the reference node, and adding these terminal devices to the reference node's network device group to obtain a group record, including: Select a second terminal device as a reference node, and create a network device group for the reference node; The reference node iterates through and scores other first terminal devices based on all group lists to obtain the comprehensive score of the target terminal device and the reference node. Based on the comprehensive score, determine the terminal devices in the same group that belong to the same network device as the reference node, and add the terminal devices in the same group to the network device group of the reference node to obtain the group record; Select one of the remaining ungrouped first terminal devices as a new reference node, and create a network device group corresponding to the new reference node; Based on the new reference node, the remaining ungrouped first terminal devices are traversed and scored according to all group lists, so as to add the terminal devices in the same group that belong to the same network device as the new reference node to the network device group corresponding to the reference node, and obtain new group records. Continue to identify new reference nodes from the remaining ungrouped first terminal devices until there are no more ungrouped first terminal devices, and obtain the packet records of the network device packets corresponding to each reference node.

7. The method according to claim 6, characterized in that, The step of traversing and scoring other first terminal devices based on all group lists according to the reference node to obtain the comprehensive score of the corresponding target terminal device and the reference node includes: Based on the reference node, the preset scoring rules, and each group list, other first terminal devices are scored respectively to obtain the sub-score of the corresponding target terminal device for each group list. The scoring rules are as follows: in the group list, if both the target terminal device to be scored and the reference node are in the first group, one point is added; if only one of the target terminal device to be scored and the reference node is in the first group, one point is subtracted; if both the target terminal device to be scored and the reference node are in the second group, no score is given. The sub-scores corresponding to the target terminal device are added together to obtain a comprehensive score indicating whether the target terminal device and the reference node belong to the same network device group.

8. The method according to claim 7, characterized in that, The step of determining the terminal devices belonging to the same network device group as the reference node based on the comprehensive score, and adding the terminal devices in the same group to the network device group of the reference node to obtain a group record includes: When the overall score is greater than zero, the corresponding target terminal device is determined to be a terminal device belonging to the same network device group as the reference node, and the target terminal device is added to the network device group corresponding to the reference node, and the group information is updated.

9. The method according to claim 4, characterized in that, The step of creating a device chain based on the group records in the target group list includes: The second terminal device is used as a reference node, and the reference node is placed at the tail of the chain; According to the target group list, add the terminal devices in the same group as the reference node to the tail of the chain in sequence; According to the target group list, select a first terminal device from the remaining network device groups as a new reference node, and add the first terminal device to the tail of the chain; According to the target group list, add the terminal devices in the same group as the new reference node to the end of the chain in sequence, until the first terminal device in all network device groups is added. Finish.

10. The method according to claim 9, characterized in that, After sending the chain start command to the first terminal device, the process also includes: The system receives transmission parameters returned by the first terminal device, the transmission parameters including latency information, the latency information being the latency information determined by the corresponding first terminal device based on the test data; The step of selecting a first terminal device from the remaining network device groups as a new reference node according to the target group list and adding the first terminal device to the tail of the chain includes: Based on the latency information returned by the current reference node and the target packet list, calculate the average latency value between each remaining network device packet and the reference node. The average latency value is the average of the latency information of all first terminal devices in the corresponding network device packet between the reference node and the reference node. The network device group with the smallest average latency value is determined from the remaining network device groups, and a first terminal device is selected from the network device group with the smallest average latency value as a new reference node.

11. The method according to claim 10, characterized in that, The step of determining the network device group with the smallest average latency value from the remaining network device groups, and selecting a first terminal device as a new reference node from the network device group with the smallest average latency value, includes: Based on the target group list, determine the network interface card bandwidth corresponding to each of the remaining network device groups; When the network interface card bandwidth corresponding to the remaining network device groups is less than the network interface card bandwidth of the current reference node, the network device group with the smallest average latency value is determined from the remaining network device groups, and a first terminal device is selected from the network device group with the smallest average latency value as the new reference node. When there are network device groups in the remaining network device groups whose network interface card (NIC) bandwidth is greater than or equal to that of the reference node, the network device group with the smallest average latency value is determined from the network device groups whose NIC bandwidth is greater than or equal to that of the reference node, and a first terminal device is selected from the network device group with the smallest average latency value as the new reference node.

12. The method according to any one of claims 9-11, characterized in that, Before sending the chain start command to the first terminal device, the following steps are included: Obtain network information of all terminal devices participating in the blockchain based on the transmission control protocol; Adding the first terminal device to the tail of the chain includes: The network information of the first terminal device to be added to the tail of the chain is sent to the first terminal device currently at the tail of the chain, so that the first terminal device currently at the tail of the chain can establish a communication connection with the corresponding first terminal device based on the network information, so as to successfully add the first terminal device to the tail of the chain.

13. A chain assembly device, characterized in that, include: Memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-12.

14. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a processor, are used to perform the method as described in any one of claims 1-12.