Networking system data transmission method, networking system and electronic device
By aggregating and responding to data packets from multiple slave devices and dynamically allocating time fragments, the throughput limitations and data packet collisions in half-duplex wireless communication are resolved, thereby improving the transmission efficiency of the network system.
Patent Information
- Application Number
- CN202511324369.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Half-duplex wireless communication suffers from throughput limitations and packet collisions in network systems, leading to low communication efficiency, especially when there are many nodes or large amounts of data.
By aggregating data packets from multiple slave devices through the host, obtaining attribute information and quantity, and dynamically allocating time fragments, data packet collisions can be avoided, thereby improving the system's uplink throughput.
It improves the uplink throughput of the network system, reduces data packet collisions, and improves transmission efficiency.
Smart Images

Figure CN120856489B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data transmission technology, specifically relating to a data transmission method, a networking system, and electronic equipment for a networking system. Background Technology
[0002] Half-duplex wireless communication, with its master-slave data transmission mode, is best suited for cost-sensitive, power-sensitive, node-limited, and non-continuous traffic burst scenarios, such as wireless sensor networks, remote meter reading, and long-range radio (LoRa) networking, due to its characteristic that it can only transmit in one direction at a time but can alternate between two directions.
[0003] This mode has several technical drawbacks: First, half-duplex communication can only transmit in one direction, which limits the throughput of the network system; second, since all slave devices share the same channel to send data, it is easy to cause data packet collisions, resulting in data loss or retransmission and reducing communication efficiency. Summary of the Invention
[0004] This application proposes a data transmission method, a networking system, and an electronic device for a networking system. The system can aggregate and respond to multiple data packets from multiple slave devices through the host, thereby improving the uplink throughput of the system. Furthermore, it can dynamically allocate corresponding time slices based on the attribute information of the received data packets to avoid data packet collisions and improve transmission efficiency.
[0005] The first aspect of this application proposes a data transmission method for a network system, applied to a host in the network system, wherein the communication mode of the network system is half-duplex, the network system includes a host and multiple slave devices, and the method includes:
[0006] Receive the first data packet sent by multiple slave devices;
[0007] If the received first data packet satisfies the preset data window condition, the attribute information corresponding to each of the multiple first data packets and the number of target slaves are obtained. The attribute information includes: sequence number information and the single message time slot of the corresponding slave.
[0008] Based on the attribute information in multiple first data packets and the number of target slaves, the time slice corresponding to each target slave is determined;
[0009] According to the target sequence number information corresponding to the target slave device, multiple time segments are broadcast so that the target slave device can send the second data packet according to the corresponding time segment.
[0010] An embodiment of the second aspect of this application provides a data transmission method for a network system, applied to any slave device in the network system, wherein the communication mode of the network system is half-duplex, the network system includes a master device and multiple slave devices, and the method includes:
[0011] The latest sequence number of the most recently received first data packet is determined based on the sequence number information of multiple first data packets;
[0012] The target slave devices are reordered, and the target slave device target update sequence number information is obtained;
[0013] Based on the update sequence number information corresponding to each of the target slave devices, the target update sequence number information of the target slave device corresponding to the latest sequence number information is determined;
[0014] Based on the target update sequence number information, the single message slot of the corresponding slave, the number of target slaves, and the target update sequence number information of the target slaves, the time slice corresponding to each target slave is determined.
[0015] An embodiment of the third aspect of this application provides a networking system. The communication mode of the networking system is half-duplex. The networking system includes: a host and multiple slave devices. The host is used to receive first data packets sent by the multiple slave devices. When it is determined that the received first data packets meet the preset data window conditions, the host obtains the attribute information corresponding to each of the multiple first data packets and the number of target slave devices. The attribute information includes: sequence number information and the single message time slot of the corresponding slave device. Based on the attribute information in the multiple first data packets and the number of target slave devices, the host determines the time slice corresponding to each target slave device. The host broadcasts the multiple time slices according to the target sequence number information corresponding to the target slave device, so that the target slave device sends second data packets according to the corresponding time slice.
[0016] Any one of the plurality of slave devices is used to send the first data packet to the host; receive time slices sent by the host; and send a second data packet to the host according to the time slices.
[0017] An embodiment of the fourth aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first or second aspect above.
[0018] The technical solutions provided in this application embodiment have at least the following technical effects or advantages:
[0019] This application proposes a data transmission method, a network system, and an electronic device for a network system. The system is applied to a host within the network system, which operates in half-duplex communication. The network system includes a host and multiple slave devices. The method includes: receiving first data packets sent by multiple slave devices; if the received first data packets meet a preset data window condition, acquiring attribute information corresponding to each of the first data packets and the number of target slave devices. The attribute information includes sequence number information and the single message time slot of the corresponding slave device; determining the time slice corresponding to each target slave device based on the attribute information in the multiple first data packets and the number of target slave devices; and broadcasting multiple time slices according to the target sequence number information corresponding to the target slave devices, so that the target slave devices send second data packets according to the corresponding time slices. This application embodiment improves the uplink throughput of the system by aggregating and responding to multiple data packets from multiple slave devices through the host. Furthermore, it dynamically allocates corresponding time slices based on the attribute information of the received slave data packets to avoid data packet collisions and improve transmission efficiency.
[0020] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0022] Figure 1 A flowchart of a data transmission method for a networking system provided in an embodiment of this application is shown;
[0023] Figure 2 A flowchart of a data transmission method for a networking system provided in an embodiment of this application is shown;
[0024] Figure 3 This application shows a schematic diagram of the structure of a networking system provided in one embodiment;
[0025] Figure 4 This illustration shows a schematic diagram of the structure of a data transmission apparatus according to an embodiment of this application;
[0026] Figure 5 This illustration shows a schematic diagram of the structure of a data transmission apparatus according to an embodiment of this application;
[0027] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of this application is shown. Detailed Implementation
[0028] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0029] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0030] The data transmission method of the networking system in this application can be executed by a computing device. The computing device can be a server, such as a single server, multiple servers, a server cluster, a cloud computing platform, etc. Optionally, the computing device can also be a terminal device, such as a mobile phone, tablet computer, game console, portable computer, desktop computer, advertising machine, all-in-one machine, etc. This application does not limit the type or number of computing devices.
[0031] Building upon the aforementioned background technology, in half-duplex wireless communication, the master-slave data transmission mode is applied to scenarios such as wireless sensor networks, remote meter reading, and LoRa networking. Because only one-way transmission is possible at a time, but bidirectional alternation is also possible, only one slave can send a data packet to the master or the master can send a response message to the slave at any given time. In other words, under normal circumstances, the interaction process between the master and slave is as follows: one slave sends a data packet to the master, the master replies with a response message to the slave, the next slave sends a data packet to the master, and the master replies with a response message to the next slave, and so on. This transmission method limits the throughput of the networking system.
[0032] Furthermore, since all slave devices share the same channel for data transmission, packet collisions are prone to occur, leading to data loss or retransmission. To address this issue, related technologies employ a fixed-time fragmentation scheduling strategy, which fixes the start time and duration of each slave device's data packet transmission. While this avoids packet collisions, some slave devices may suddenly go offline, still occupying their corresponding time fragments, introducing additional latency, especially noticeable in large networks or with high data volumes.
[0033] To address the aforementioned technical problems, this application proposes a data transmission method, a networking system, and an electronic device for a network system. Applied to a host in the networking system, the system operates in half-duplex communication and includes a host and multiple slave devices. The method includes: receiving first data packets sent by multiple slave devices; if the received first data packets meet preset data window conditions, acquiring attribute information corresponding to each of the multiple first data packets and the number of target slave devices, the attribute information including sequence number information and the single message time slot of the corresponding slave device; determining the time slice corresponding to each target slave device based on the attribute information in the multiple first data packets and the number of target slave devices; and broadcasting multiple time slices according to the target sequence number information corresponding to the target slave devices, so that the target slave devices send second data packets according to the corresponding time slices. This application embodiment improves the uplink throughput of the system by aggregating and responding to multiple data packets from multiple slave devices through the host, and can dynamically allocate corresponding time slices according to the attribute information of the received slave data packets to avoid data packet collisions and improve transmission efficiency.
[0034] The following describes a data transmission method for a network system according to an embodiment of this application, with reference to the accompanying drawings. The method is applied to a host in the network system, the communication mode of the network system is half-duplex, and the network system includes a host and multiple slave devices.
[0035] See Figure 1 The method specifically includes the following steps:
[0036] S101, Receive the first data packet sent by multiple slave devices.
[0037] In a master-slave network system, the slave devices can be terminal sensors or actuators, typically used to collect environmental data (temperature, humidity, power, etc.) or to perform actions such as switching, motoring, and valve operation.
[0038] Normally, after a slave device comes online, it will not send data to the master device automatically. It will only send data packets to the master device according to the corresponding time slice when the master device allocates the corresponding time slice.
[0039] After the host allocates the corresponding time slice, the corresponding slave will send the first data packet to the host according to the time slice.
[0040] The first data may include collected environmental data.
[0041] In some embodiments, when the host device is used, the LoRa wireless module is initially initialized, and the LoRa address is set to 0xFFFF as the broadcast and listening address. Separate LoRaMaster data receiving threads and LoRaMaster ACK sending threads are created, and mutex locks are used to ensure that receiving and sending do not occur simultaneously, thereby achieving half-duplex communication in the network system.
[0042] S102. If it is determined that the received first data packet meets the preset data window conditions, obtain the attribute information corresponding to each of the multiple first data packets and the number of target slave devices.
[0043] The attribute information includes: sequence number information and the single message time slot for the corresponding slave device, where the single message time slot is the time interval between adjacent slave devices sending data packets. For example, if the preceding slave device sends a data packet at the 1st second and the following slave device sends a data packet at the 3rd second, then the single message time slot is 2 seconds.
[0044] The preset data window conditions can be that the number of received data packets meets the preset number of data packets or the reception duration meets the preset reception duration. The preset number of data packets or the preset reception duration can be flexibly set based on the actual situation. For example, the preset number of data packets can be 5, and the preset reception duration can be 10 seconds, etc.
[0045] A time slice is a pre-defined "time window" allocated by the scheduler, with a clear start and end time, and exclusively or shared by designated nodes. Its minimal characteristics can be described by a quadruple:
[0046] Start time, duration, period, and user ID / purpose
[0047] S103. Based on the attribute information in multiple first data packets and the number of target slaves, determine the time slice corresponding to each target slave.
[0048] The target slave device is a slave device that is in an online state, or all slave devices in the network system.
[0049] The serial number information can be the identification information corresponding to the slave device.
[0050] Understandably, in a network system with a large number of slave devices, a significant number of slave devices may be offline at any given time. Allocating time slices to offline slave devices in this situation would cause those time slots to idle for extended periods, reducing the overall efficiency of superframes. Therefore, before allocating time slices, the host identifies the online slave devices in the current network system, i.e., the target slave devices.
[0051] Generally, the process by which the host determines whether the slave device is online can be implemented as follows:
[0052] Create a record:
[0053] Maintain an "ID ↔ Status Table", with each row containing:
[0054] last_rx_time (Local timestamp of the last correctly received data packet corresponding to this ID)
[0055] miss_cnt (the number of consecutive times a data packet is not received in the corresponding time segment, initially set to 0)
[0056] timeout_th (threshold, e.g., 3 times)
[0057] Triggering update:
[0058] Upon receiving a data packet with a certain ID, immediately set the last_rx_time corresponding to that ID to the current time and clear miss_cnt to zero.
[0059] Therefore, after receiving multiple first data packets, the host can update the cached ID status table in the following way:
[0060] If the slave device status corresponding to the sequence number information of the first data packet is updated from offline to online, or if the data packet with the corresponding sequence number information should have been received under the preset data window conditions, but the data packet with the corresponding sequence number information was not received in multiple first data packets, the number of consecutive times that the sequence number information has not received data packets in the corresponding time segment is incremented by one, and if the number after incrementing by one just meets the number threshold, the slave device status corresponding to the sequence number information is updated to offline.
[0061] Furthermore, slave devices that are online can be identified as target slave devices, allowing the master device to determine the corresponding time slices for the target slave device.
[0062] When the number of slave devices in a network system is relatively small, only a few slave devices are typically offline at any given time. To reduce the complexity of the time slicing determination process, all slave devices in the network system can be identified as target slave devices, and the corresponding time slices for the target slave devices can be determined.
[0063] S104. Broadcast multiple time segments according to the target sequence number information corresponding to the target slave device, so that the target slave device can send the second data packet according to the corresponding time segment.
[0064] The second data packet may include environmental data collected when the corresponding slave device sends the data packet again.
[0065] After identifying the target slave device, the target sequence number information corresponding to each target slave device can be obtained, and the corresponding time slice can be sent through the target sequence number information.
[0066] Understandably, in order to improve the uplink throughput of the system, the host usually sends the corresponding time slice to the slave in a broadcast manner, and the broadcast content can include target sequence number information and the time slice corresponding to each target sequence number information, so that each target slave can obtain the time slice corresponding to the target sequence number information.
[0067] In addition to broadcasting time-sharing data, the host can also broadcast corresponding response information to the target slave devices. The response information can include whether the host has received the data packet and whether the slave device needs to retransmit the data packet.
[0068] In some embodiments, it is assumed that the network system has 1 host and 10 slaves, and that a single message slot is 2 seconds. Lora is half-duplex, meaning sending and receiving cannot occur simultaneously; each sending and receiving session takes 2 seconds. In this scheme, a single slave can send data once every 20 seconds (2 * 10 seconds); assuming the host sends an ACK response every 60 seconds, then the host can receive 30 (3 * 10) data messages in 62 seconds. Compared to the scenario where the host sends a response every time it receives data, the host can only receive 15.5 (62 / 4) data messages in 62 seconds.
[0069] This application proposes a data transmission method, a network system, and an electronic device for a network system. The system is applied to a host within the network system, which operates in half-duplex communication. The network system includes a host and multiple slave devices. The method includes: receiving first data packets sent by multiple slave devices; if the received first data packets meet a preset data window condition, acquiring attribute information corresponding to each of the first data packets and the number of target slave devices. The attribute information includes sequence number information and the single message time slot of the corresponding slave device; determining the time slice corresponding to each target slave device based on the attribute information in the multiple first data packets and the number of target slave devices; and broadcasting multiple time slices according to the target sequence number information corresponding to the target slave devices, so that the target slave devices send second data packets according to the corresponding time slices. This application embodiment improves the uplink throughput of the system by aggregating and responding to multiple data packets from multiple slave devices through the host. Furthermore, it dynamically allocates corresponding time slices based on the attribute information of the received slave data packets to avoid data packet collisions and improve transmission efficiency.
[0070] In some embodiments, when the target slave is all the slaves in the network system, the time slice corresponding to each target slave is determined based on the attribute information in multiple first data packets and the number of target slaves. This includes: determining the latest sequence number information of the most recently received first data packet based on the sequence number information of multiple first data packets; and determining the time slice corresponding to each target slave based on the latest sequence number information, the single message time slot of the corresponding slave, the number of target slaves, and the sequence number information corresponding to each target slave.
[0071] In some embodiments, the time slice corresponding to each target slave is determined based on the latest sequence number information, the single message slot of the corresponding slave, the number of target slaves, and the sequence number information corresponding to each target slave, as shown in equation (1):
[0072] Toffset=((N+mn)%N)*D
[0073] Where Toffset is the time slice of the target slave with sequence number m, N is the number of target slaves, D is the single message slot of the corresponding slave, n is the latest sequence number, and % is the remainder.
[0074] In some embodiments, when the number of slave devices in the network system is relatively small, the target slave device is all the slave devices in the network system. After receiving multiple first data packets, the most recently received first data packet is determined based on the arrival time of each of the multiple first data packets to the host, and the sequence number information of the first data packet is obtained. This sequence number information is the latest sequence number information. The number of all slave devices in the current network system is further obtained. Furthermore, based on the latest sequence number information, the single message time slot of the corresponding slave device, the number of target slave devices, and the sequence number information corresponding to the target slave devices, the time slice corresponding to each target slave device is determined.
[0075] Assuming a network system with 1 host and 10 slaves, and a single message time slot of 2 seconds, and the latest sequence number is 3, then the time slice of the target slave with sequence number 1 is (10+1-3)*2=16 seconds. That is, after 16 seconds, the target slave with sequence number 1 sends the data packet to the host.
[0076] The remainder is calculated as follows: when m is greater than n, the time is (mn)*D; when m is less than n, the time is (N+mn)*D.
[0077] In some embodiments, when the target slave is a slave in an online state, before obtaining the number of target slaves, the method further includes: updating the slave state corresponding to each sequence number in the cache queue based on the sequence number information in multiple first data packets; obtaining multiple target sequence number information corresponding to the slave in an online state; and determining the slave corresponding to the multiple target sequence number information as the target slave.
[0078] Understandably, when the target slave device is an online slave device, it is necessary to determine the target slave device in the network system.
[0079] The host typically has a buffer queue, which is used to sequentially store the slave sequence number information corresponding to the received data packets and the slave status corresponding to each sequence number.
[0080] In some embodiments, the slave status corresponding to each sequence number in the cache queue can be updated based on the above-described method of updating the cached ID status table, and multiple target sequence number information corresponding to the slave status being online can be obtained; the slaves corresponding to the multiple target sequence number information are determined as target slaves.
[0081] Specifically, the processing function of the LoRaMaster receiving data thread is implemented as follows: listen for received data, analyze the validity of the data, analyze the ID of the slave node from the data, and update the status of the corresponding ID in the cache queue.
[0082] In some embodiments, if a new slave comes online during the process of determining the time slicing corresponding to each target slave, the slave status of the new slave can be stored in the cache queue, and the slave status of the new slave can be set to online.
[0083] In some embodiments, if the slave device status corresponding to the sequence number information in multiple first data packets is offline, the corresponding slave device status will be updated to online.
[0084] It is understandable that if the slave device corresponding to a certain sequence number is in an offline state, and the master receives a data packet sent by the slave device corresponding to that sequence number, it means that the slave device is in an online state, and the master can update the slave device corresponding to that sequence number to an online state.
[0085] In some embodiments, when the target slave is a slave in an online state, based on the attribute information in multiple first data packets and the number of target slaves, the process includes: determining the latest sequence number information of the most recently received first data packet based on the sequence number information of multiple first data packets; reordering the target slaves to obtain the target update sequence number information of the target slaves; determining the target update sequence number information of the target slave corresponding to the latest sequence number information based on the update sequence number information of each target slave; and determining the time slice corresponding to each target slave based on the target update sequence number information, the single message slot of the corresponding slave, the number of target slaves, and the target update sequence number information of the target slaves.
[0086] In some embodiments, after identifying the slave devices that are online, the target slave devices are reordered, the target update sequence number information of the target slave devices is obtained, the latest sequence number information of the most recently received first data packet is determined based on the above method, and the target update sequence number information of the target slave device corresponding to the latest sequence number information is determined.
[0087] In some embodiments, the sequence information of each target slave device can be reordered. For example, in a network system with 1 host and 10 slave devices, the target slave devices are slave 1, slave 3, slave 6, slave 7, and slave 10. Then, the target update sequence information corresponding to slave 1 is slave 1, the target update sequence information corresponding to slave 3 is slave 2, and so on, to obtain the target update sequence information corresponding to each target slave device.
[0088] Furthermore, based on the update sequence number information corresponding to each target slave, the target update sequence number information of the target slave corresponding to the latest sequence number information is determined. For example, if the latest sequence number information is slave 3 as mentioned above, the corresponding target update sequence number information is slave 2.
[0089] Furthermore, the time slices corresponding to each target slave can be determined based on the above formula (1).
[0090] At this point, n is the target update sequence number information.
[0091] In some embodiments, the host can obtain the sequence number information corresponding to each online slave device as soon as it comes online. Based on the sequence number information, the host further allocates corresponding time slices to each online slave device, allowing the slave device to send data packets to the host according to the corresponding time slice. The host then allocates time slices to the target slave device based on the target sequence number information, allowing the target slave device to send data packets to the host according to the corresponding time slice, thus repeating this process.
[0092] The following describes a data transmission method for a network system according to an embodiment of this application, with reference to the accompanying drawings. The method is applied to any slave device in the network system, which uses half-duplex communication and includes a master device and multiple slave devices.
[0093] like Figure 2 As shown, the method mainly includes the following steps:
[0094] S201, Send the first data packet to the host.
[0095] Before each slave device sends a data packet to the master device, the master device allocates a time slice for sending the data packet to the corresponding slave device. Each slave device can send the first data packet to the master device according to the time slice allocated by the master device.
[0096] S202, Receive time fragments sent by the host.
[0097] Time slicing is determined and broadcast by the host based on the attribute information corresponding to each of the multiple first data packets and the number of target slaves, when the host determines that the received first data packet meets the preset data window conditions. The attribute information includes: sequence number information and the single message time slot of the corresponding slave.
[0098] S203. Send the second data packet to the host in time-fragmented order.
[0099] The implementation steps of the embodiments of this application and Figure 1 The implementation steps shown are the same, and will not be repeated here.
[0100] This application proposes a data transmission method for a network system, comprising: sending a first data packet to a host; receiving time slices sent by the host, wherein the time slices are determined and broadcast by the host based on sequence number information in multiple first data packets under the condition of satisfying a preset data window; and sending a second data packet to the host according to the time slices. This application embodiment improves the uplink throughput of the system by aggregating and responding to multiple data packets from multiple slave devices through the host, and can dynamically allocate corresponding time slices according to the sequence number information in the received slave data packets to avoid data packets and improve transmission efficiency.
[0101] In some embodiments, the method further includes: if no time slice is received within a first preset time period, then sending a third data packet to the host within a second preset time period of the original time slice.
[0102] In some embodiments, even if the host allocates time slices to the slave, the data generated by the slave may still experience packet collisions. If no time slice is received within a first preset time period, it indicates that the slave has collided with another slave. To avoid further packet collisions, a random waiting period can be established, i.e., a third data packet is sent to the host within a second preset time period of the original time slice.
[0103] The first and second preset time periods can be flexibly set based on actual conditions, and will not be elaborated here.
[0104] The third data packet may include the environmental data contained in the first and second data packets, or it may only include the environmental data contained in the second data packet.
[0105] It is understandable that when a data packet collision occurs and the host does not receive the data packet sent by the slave, in a measurement scenario, the host only needs to obtain the real-time data sent by the slave. In this case, the third data packet only needs to include the environmental data currently being collected. If the host needs to obtain data packets sent by the slave at all times, then the third data packet can include the environmental data corresponding to the time of the data packet collision, and also needs to include the environmental data to be sent after the collision.
[0106] In some embodiments, this application also provides a networking system applied to the rights Figure 1 Data transmission methods for networked systems
[0107] like Figure 3 As shown, the networking system includes a host and multiple slave devices, including slave 1 to slave n. The host and slave devices transmit data through half-duplex wireless communication.
[0108] The host receives first data packets sent by multiple slave devices. If the received first data packets meet a preset data window condition, the host obtains the attribute information corresponding to each of the first data packets and the number of target slave devices. The attribute information includes: sequence number information and the single message time slot of the corresponding slave device. Based on the attribute information in the multiple first data packets and the number of target slave devices, the host determines the time slice corresponding to each target slave device. The host broadcasts multiple time slices according to the target sequence number information corresponding to the target slave device, so that the target slave devices send second data packets according to the corresponding time slices.
[0109] Any one of the multiple slave devices is used to send a first data packet to the master; receive time slices sent by the master; and send a second data packet to the master according to the time slices.
[0110] This application also provides a data transmission device for performing the above-described actions. Figure 1 The provided data transmission method for a network system is applied to a host in the network system, wherein the communication mode of the network system is half-duplex, and the network system includes a host and multiple slave devices. For example... Figure 4 As shown, the device includes a receiving module 401, an acquisition module 402, a determining module 403, and a broadcasting module 404.
[0111] Receiver module 401 is used to receive the first data packet sent by multiple slave devices;
[0112] The acquisition module 402 is used to acquire the attribute information corresponding to each of the multiple first data packets and the number of target slave devices when it is determined that the received first data packet meets the preset data window conditions. The attribute information includes: sequence number information and the single message time slot of the corresponding slave device.
[0113] The determining module 403 is used to determine the time slice corresponding to each of the target slaves based on the attribute information in the multiple first data packets and the number of the target slaves;
[0114] The broadcast module 404 is used to broadcast multiple time segments according to the target sequence number information corresponding to the target slave, so that the target slave can send the second data packet according to the corresponding time segment.
[0115] This application proposes a data transmission device applied to a host in a network system. The network system uses half-duplex communication and includes a host and multiple slave devices. The method includes: receiving first data packets sent by multiple slave devices; if the received first data packets meet a preset data window condition, acquiring attribute information corresponding to each of the multiple first data packets and the number of target slave devices, the attribute information including sequence number information and the single message time slot of the corresponding slave device; determining the time slice corresponding to each target slave device based on the attribute information in the multiple first data packets and the number of target slave devices; and broadcasting multiple time slices according to the target sequence number information corresponding to the target slave devices, so that the target slave devices send second data packets according to the corresponding time slices. This application embodiment improves the uplink throughput of the system by aggregating and responding to multiple data packets from multiple slave devices through the host, and can dynamically allocate corresponding time slices according to the attribute information of the received slave data packets to avoid data packet collisions and improve transmission efficiency.
[0116] In some embodiments, the target slave device is a slave device that is in an online state or all slave devices in the network system.
[0117] In some embodiments, when the target slave device is all slave devices in the network system, the determining module 403 is specifically used for:
[0118] The latest sequence number of the most recently received first data packet is determined based on the sequence number information of multiple first data packets;
[0119] Based on the latest sequence number information, the single message time slot of the corresponding slave, the number of target slaves, and the sequence number information corresponding to each target slave, the time slice corresponding to each target slave is determined.
[0120] In some embodiments, the determining module 403 is further specifically used for:
[0121] Toffset=((N+mn)%N)*D
[0122] Where Toffset is the time slice of the target slave with sequence number m, N is the number of the target slaves, D is the single message slot of the corresponding slave, n is the latest sequence number, and % is the remainder.
[0123] In some embodiments, when the target slave device is a slave device in an online state, the determining module 403 is further configured to:
[0124] Based on the sequence number information in multiple first data packets, update the slave state corresponding to each sequence number information in the cache queue;
[0125] Obtain the sequence number information of multiple targets corresponding to the slave device being in the online state;
[0126] The slave devices corresponding to the multiple target sequence number information are identified as target slave devices.
[0127] In some embodiments, when the target slave device is a slave device in an online state, determining module 403 is further specifically used for:
[0128] The latest sequence number of the most recently received first data packet is determined based on the sequence number information of multiple first data packets;
[0129] The target slave devices are reordered, and the target slave device target update sequence number information is obtained;
[0130] Based on the update sequence number information corresponding to each of the target slave devices, the target update sequence number information of the target slave device corresponding to the latest sequence number information is determined;
[0131] Based on the target update sequence number information, the single message slot of the corresponding slave, the number of target slaves, and the target update sequence number information of the target slaves, the time slice corresponding to each target slave is determined.
[0132] This application also provides a data transmission device for performing the above-described actions. Figure 2 The provided data transmission method for a network system is applied to slave devices in the network system, wherein the communication mode of the network system is half-duplex, and the network system includes a master device and multiple slave devices. For example... Figure 5 As shown, the device includes a transmitting module 501 and a receiving module 502.
[0133] Sending module 501 is used to send a first data packet to the host;
[0134] The receiving module 502 is used to receive time slices sent by the host. The time slices are determined and broadcast by the host based on the attribute information corresponding to each of the multiple first data packets and the number of target slaves, when the host determines that the received first data packet meets the preset data window conditions. The attribute information includes: sequence number information and the single message time slot of the corresponding slave.
[0135] The sending module 501 is also configured to send the second data packet to the host according to the time segmentation.
[0136] This application proposes a data transmission apparatus, comprising: sending a first data packet to a host; and receiving time slices sent by the host. The time slices are determined and broadcast by the host based on attribute information corresponding to each of the multiple first data packets and the number of target slave devices, provided that the received first data packet meets a preset data window condition. The attribute information includes sequence number information and a single message time slot corresponding to the slave device. This application embodiment improves the uplink throughput of the system by aggregating and responding to multiple data packets from multiple slave devices through the host. Furthermore, it dynamically allocates corresponding time slices based on the sequence number information in the received slave data packets to avoid data packet overflow and improve transmission efficiency.
[0137] In some embodiments, the sending module 501 is further configured to:
[0138] If no time slice is received within the first preset time period, a third data packet is sent to the host within the second preset time period of the original time slice.
[0139] This application also provides an electronic device for performing the above-described network system data transmission method. Please refer to... Figure 6 It illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 6 As shown, the electronic device 7 includes: a processor 700, a memory 701, a bus 702, and a communication interface 703. The processor 700, the communication interface 703, and the memory 701 are connected via the bus 702. The memory 701 stores a computer program that can run on the processor 700. When the processor 700 runs the computer program, it executes the network system data transmission method provided in any of the foregoing embodiments of this application.
[0140] The memory 701 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between the device network element and at least one other network element is achieved through at least one communication interface 703 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0141] Bus 702 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. The memory 701 is used to store programs. After receiving execution instructions, the processor 700 executes the program. The network system data transmission method disclosed in any of the aforementioned embodiments of this application can be applied to the processor 700, or implemented by the processor 700.
[0142] The processor 700 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 700 or by instructions in software form. The processor 700 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 701. Processor 700 reads the information in memory 701 and, in conjunction with its hardware, completes the steps of the above method.
[0143] The electronic devices provided in this application embodiment and the data transmission method of the networking system provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0144] It should be noted that:
[0145] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0146] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0147] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for data transmission in a networking system, characterized in that, The application discloses a host applied to a networking system, and a communication mode of the networking system is half duplex, the networking system comprises a host and a plurality of slaves, and the method comprises the following steps: receiving a plurality of first data packets sent by the slaves; in a case where it is determined that the received first data packets meet preset data window conditions, acquiring attribute information corresponding to each of the plurality of first data packets and the number of target slaves, the attribute information comprising serial number information and single message time slots of corresponding slaves; determining time slices corresponding to the target slaves based on the attribute information in the plurality of first data packets and the number of target slaves; correspondingly broadcasting the plurality of time slices according to target serial number information corresponding to the target slaves, so that the target slaves send second data packets according to the corresponding time slices; in a case where the target slaves are in an online state, before the number of target slaves is acquired, the method further comprises the following steps: updating slave states corresponding to each serial number information in a cache queue based on serial number information in the plurality of first data packets; acquiring a plurality of target serial number information corresponding to slave states in an online state; determining slaves corresponding to the plurality of target serial number information as target slaves; in a case where the target slaves are in the online state, the step of determining the time slices corresponding to the target slaves based on the attribute information in the plurality of first data packets and the number of target slaves comprises the following steps: determining latest serial number information of the most recently received first data packet based on serial number information of the plurality of first data packets; reordering the target slaves to acquire updated serial number information corresponding to the target slaves; determining target updated serial number information of the target slave corresponding to the latest serial number information based on the updated serial number information corresponding to the target slaves; determining the time slices corresponding to the target slaves based on the target updated serial number information of the target slave corresponding to the latest serial number information, single message time slots of the corresponding slaves, the number of target slaves and the updated serial number information corresponding to the target slaves.
2. The method of claim 1, wherein, in a case where the target slaves are all slaves in the networking system, the step of determining the time slices corresponding to the target slaves based on the attribute information in the plurality of first data packets and the number of target slaves comprises the following steps: determining latest serial number information of the most recently received first data packet based on serial number information of the plurality of first data packets; determining the time slices corresponding to the target slaves based on the latest serial number information, single message time slots of the corresponding slaves, the number of target slaves and serial number information corresponding to the target slaves.
3. The method of claim 2, wherein, the step of determining the time slices corresponding to the target slaves based on the latest serial number information, single message time slots of the corresponding slaves, the number of target slaves and serial number information corresponding to the target slaves comprises: Toffset = ((N + m - n) % N) * D Where Toffset is the start time of the time slice of the target slave with sequence number m, the time slice of the target slave with sequence number m is determined based on Toffset, N is the number of the target slaves, D is the single message slot of the corresponding slave, n is the latest sequence number, and % is the remainder.
4. A method for data transmission in a networking system, characterized by, The method is applied to any slave device in a network system, wherein the communication mode of the network system is half-duplex, the network system includes a master and multiple slave devices, and the method includes: Send the first data packet to the host; The host receives time slices sent by the host. The time slices are determined and broadcast by the host after it is determined that the received first data packets sent by multiple slaves meet the preset data window conditions, by obtaining the attribute information corresponding to each of the multiple first data packets and the number of target slaves, and based on the attribute information corresponding to each of the multiple first data packets and the number of target slaves. The attribute information includes: sequence number information and the single message time slot of the corresponding slave. The second data packet is sent to the host according to the time segmentation described above; Before obtaining the number of target slave devices when the target slave device is online, the method further includes: Based on the sequence number information in multiple first data packets, update the slave state corresponding to each sequence number information in the cache queue; Obtain the sequence number information of multiple targets corresponding to the slave device being in the online state; The slave devices corresponding to the plurality of target sequence number information are identified as target slave devices; When the target slave is online, determining the time slice corresponding to each target slave based on the attribute information in multiple first data packets and the number of target slaves includes: The latest sequence number of the most recently received first data packet is determined based on the sequence number information of multiple first data packets; The target slave devices are reordered, and the update sequence number information corresponding to each target slave device is obtained; Based on the update sequence number information corresponding to each of the target slave devices, the target update sequence number information of the target slave device corresponding to the latest sequence number information is determined; Based on the target update sequence number information corresponding to the latest sequence number information, the single message time slot of the corresponding slave, the number of target slaves, and the update sequence number information corresponding to each target slave, the time slice corresponding to each target slave is determined.
5. The method of claim 4, wherein, The method further includes: If no time slice is received within the first preset time period, a third data packet is sent to the host within the second preset time period of the original time slice.
6. A system for networking, characterized by The communication mode of the network system is half-duplex, and the network system includes: a host and multiple slave devices; The host is used to receive first data packets sent by multiple slave devices; when it is determined that the received first data packets meet the preset data window conditions, it obtains the attribute information corresponding to each of the multiple first data packets and the number of target slave devices, the attribute information including: sequence number information and the single message time slot of the corresponding slave device; based on the attribute information in the multiple first data packets and the number of target slave devices, it determines the time slice corresponding to each target slave device; and broadcasts multiple time slices according to the target sequence number information corresponding to the target slave device, so that the target slave device sends second data packets according to the corresponding time slice. Before obtaining the number of target slaves when the target slave is online, the method further includes: updating the slave status corresponding to each sequence number in the cache queue based on the sequence number information in the multiple first data packets; obtaining multiple target sequence number information corresponding to the slave status being online; and determining the slave corresponding to the multiple target sequence number information as the target slave. When the target slave is online, determining the time slice corresponding to each target slave based on the attribute information in the multiple first data packets and the number of target slaves includes: determining the latest sequence number information of the most recently received first data packet based on the sequence number information of the multiple first data packets; reordering the target slaves to obtain the update sequence number information corresponding to each target slave; determining the target update sequence number information of the target slave corresponding to the latest sequence number information based on the update sequence number information of each target slave; and determining the time slice corresponding to each target slave based on the target update sequence number information of the target slave corresponding to the latest sequence number information, the single message time slot of the corresponding slave, the number of target slaves, and the update sequence number information of each target slave. Any one of the plurality of slave devices is used to send the first data packet to the host; receive time slices sent by the host; and send a second data packet to the host according to the time slices.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-3 or 4-5.
Citation Information
Patent Citations
Communication method and device
CN114375052A
Time domain resource allocation method, equipment and medium
CN118413892A
Apparatus and method for managing variable-sized data slots within a time division multiple access frame
US6944148B1