Method, device, system and electronic equipment for allocating communication time slices, and computer readable storage medium
By dynamically adjusting the communication cycle of slave nodes, the problem of fixed communication cycles in existing technologies is solved, improving communication efficiency and system stability, and making reasonable use of time resources.
Patent Information
- Application Number
- CN202411305488.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-09-18
AI Technical Summary
In existing technologies, the fixed communication cycle of slave nodes results in low time utilization when communication quality is good and communication failure when communication quality is poor, which reduces detection efficiency and system stability.
The communication cycle of slave nodes is dynamically adjusted. By statistically analyzing the number of communication attempts and remaining time slices, time resources are utilized rationally to improve the communication success rate.
It improves communication efficiency and system stability, makes better use of time resources, and enhances resource utilization.
Smart Images

Figure CN119212092B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of battery time slices, and more particularly to a method, apparatus, electronic device, and computer-readable storage medium for allocating communication time slices. Background Technology
[0002] With the booming development of the new energy industry, the tiered application of battery packs is becoming increasingly important. It can improve the recycling efficiency of battery packs, optimize battery cost accounting, and reduce environmental pollution caused by battery pack dismantling. For example, the battery packs installed in new energy vehicles contain multiple battery packs connected in series and parallel to meet the voltage and power requirements of new energy vehicles.
[0003] To enable the reuse of battery packs, integrated battery pack designs using wireless communication are gradually becoming a technological trend in the industry. Currently, a common approach is to designate the detection device as the master node, and each battery in the pack as a slave node. Each slave node has a fixed communication cycle, during which it can communicate with the master node multiple times. The master node's detection device uses this communication information to determine the status of the battery pack at each slave node. After completing the detection of one slave node, the system checks the status of the next slave node in the next communication cycle.
[0004] However, the commonly used methods have the following technical problems: the communication cycle of the slave node is fixed. When the communication quality is good, the slave node only needs to complete the communication with the master node once. It needs to wait for the current fixed communication cycle to end before it can detect the next slave node. The time utilization is low and the detection time is long, which reduces the detection efficiency. When the communication quality is poor, the slave node may be unable to communicate with the master node throughout the entire communication cycle, resulting in the failure of the slave node's communication with the master node and reducing the stability of the entire communication system. Summary of the Invention
[0005] This invention proposes a method, apparatus, electronic device, and computer-readable storage medium for allocating communication time slices, which can solve one or more of the aforementioned technical problems.
[0006] A first aspect of this invention provides a method for allocating communication time slices in a multi-node wireless communication system. The method involves a master node and N slave nodes interconnected in the wireless communication system. The master node can wirelessly communicate with each of the N slave nodes. Within each communication time period, the master node completes one wireless communication session with each slave node. Each slave node has M communication time slices. The method includes:
[0007] Control the master node to establish wireless communication with any one of the slave nodes;
[0008] The number of communications between the slave node and the master node is counted. The counting stops when the slave node successfully communicates with the master node, or when the number of communications counted reaches M.
[0009] If the master node successfully communicates with the slave node that is establishing communication with the master node and the number of communication attempts is less than M, then the remaining communication time slice of the slave node is calculated based on the number of communication attempts, the remaining communication time slice is converted into a spare time slice, and the master node is triggered to conduct wireless communication with another slave node.
[0010] If the number of communications between the master node and the slave node that is establishing communication with the master node reaches M and the master node and the slave node still fails to establish communication, it is determined whether there is a spare time slice. If there is no spare time slice, the master node confirms that the communication with the slave node has failed. If there is a spare time slice, the spare time slice is allocated for the slave node to communicate with the master node until the master node and the slave node successfully communicate. Alternatively, if the number of communications for the master node to communicate with the slave node using the spare time slice is equal to the total number of spare time slices and the master node and the slave node still fail to establish communication, the master node confirms that the communication with the slave node has failed.
[0011] In one possible implementation of the first aspect, calculating the remaining communication time slice of the slave node based on the number of communications includes:
[0012] Calculate the difference between M and the number of communications;
[0013] The remaining communication time slices are obtained by calculating the current communication time slices of the slave node based on the difference.
[0014] In one possible implementation of the first aspect, controlling the master node to establish wireless communication with any one of the slave nodes includes:
[0015] The master node is controlled to send a communication heartbeat packet to any of the slave nodes according to the communication time slice allocation rules;
[0016] If the master node receives feedback information from the slave node within a preset time interval, then the master node and the slave node are confirmed to have successfully communicated.
[0017] If the master node does not receive feedback information from the slave node within a preset time interval, then the communication between the master node and the slave node is determined to have failed.
[0018] In one possible implementation of the first aspect, the method further includes K scheduling time slices;
[0019] After the master node confirms the communication failure of the slave node, the method further includes:
[0020] The K scheduling time slices are allocated for the slave node that is establishing communication to communicate with the master node, until the master node successfully establishes communication with the slave node.
[0021] A second aspect of this invention provides a communication time slice allocation device for time slice allocation in a multi-node wireless communication system. The device involves a master node and N slave nodes interconnected in the wireless communication system. Within each communication time period, the master node completes one wireless communication with each slave node. Each slave node has M communication time slices. The device includes:
[0022] A communication module is defined, used to control the master node to establish wireless communication with any one of the slave nodes;
[0023] The communication count module is used to count the number of communications between the slave node and the master node. The counting stops when the slave node successfully communicates with the master node, or when the counted number of communications reaches M.
[0024] The time slice accumulation module is used to calculate the remaining communication time slice of the slave node based on the number of communications if the master node successfully communicates with the slave node that is establishing communication with the master node and the number of communications is less than M, convert the remaining communication time slice into a spare time slice, and trigger the master node to conduct wireless communication with another slave node.
[0025] The time-slice allocation module is used to determine whether a spare time slice exists if the number of communications between the master node and the slave node that is currently establishing communication with the master node reaches M and the master node and the slave node still fails to establish communication successfully. If the spare time slice does not exist, the master node confirms that the communication with the slave node has failed. If the spare time slice exists, the master node allocates the spare time slice for the slave node to communicate with the master node until the master node and the slave node successfully communicate. Alternatively, if the number of communications for the master node and the slave node to communicate using the spare time slice is equal to the total number of spare time slices and the master node and the slave node still fail to establish communication successfully, the master node confirms that the communication with the slave node has failed.
[0026] In one possible implementation of the second aspect, calculating the remaining communication time slice of the slave node based on the number of communications includes:
[0027] Calculate the difference between M and the number of communications;
[0028] The remaining communication time slices are obtained by calculating the current communication time slices of the slave node based on the difference.
[0029] In one possible implementation of the second aspect, controlling the master node to establish wireless communication with any one of the slave nodes includes:
[0030] The master node is controlled to send a communication heartbeat packet to any of the slave nodes according to the communication time slice allocation rules;
[0031] If the master node receives feedback information from the slave node within a preset time interval, then the master node and the slave node are confirmed to have successfully communicated.
[0032] If the master node does not receive feedback information from the slave node within a preset time interval, then the communication between the master node and the slave node is determined to have failed.
[0033] In one possible implementation of the second aspect, the device further comprises K scheduling time slices;
[0034] The device further includes:
[0035] The time-slice allocation module is used to allocate the K scheduling time slices for the slave node that is establishing communication to communicate with the master node after the master node confirms that the slave node has failed to communicate, until the master node successfully communicates with the slave node that is establishing communication.
[0036] A third aspect of the present invention provides a communication time slice allocation system, the system being applied to the communication time slice allocation method described above, the system comprising: a master node and N slave nodes;
[0037] The master node communicates wirelessly with each of the N slave nodes. Each slave node has M communication time slots, and the time interval between two adjacent communication time slots is the same.
[0038] Compared to existing technologies, the communication time slice allocation method, apparatus, electronic device, and computer-readable storage medium provided in this invention offer the following advantages: This invention can dynamically adjust the duration of a communication cycle for a slave node. When a master node and a slave node establish wireless communication, it determines whether communication between them is successful. If communication is successful, the number of communication attempts by the slave node is counted. If the number of attempts is less than the number of communication time slices available for the slave node, the slave node's communication time slice can be allocated to the next slave node based on the number of attempts, triggering the master node to initiate wireless communication with the next slave node. Once communication is successful, communication between the master node and the next slave node can be triggered immediately without waiting for a complete communication cycle, thus shortening communication time and improving communication efficiency. Furthermore, after successful communication between the master and slave nodes, the remaining communication time slices of the current slave node can be allocated to the next slave node, allowing slave nodes with poor communication quality to have multiple communication time slices for wireless communication, increasing the probability of successful communication between the slave node with poor communication quality and the master node. This application enables more rational use of time resources and improves resource utilization. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating a communication time slice allocation method according to an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of a wireless communication network between a master node and multiple slave nodes provided in an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram of the communication time slice of each slave node in a wireless communication network provided in an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of communication time slice scheduling of a slave node in a wireless communication network according to an embodiment of the present invention;
[0043] Figure 5 This is an operation flowchart of a communication time slice allocation method provided in an embodiment of the present invention;
[0044] Figure 6 This is a schematic diagram of the structure of a communication time slice allocation device according to an embodiment of the present invention;
[0045] Figure 7 This is a schematic diagram of a communication time slice allocation system provided in an embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] To address the aforementioned issues, the following detailed description and explanation will be provided through specific embodiments of a communication time slice allocation method, apparatus, electronic device, and computer-readable storage medium provided in this application.
[0048] Reference Figure 1 The diagram shows a flowchart of a communication time slice allocation method according to an embodiment of the present invention.
[0049] In one embodiment, the method is used for time slice allocation in a multi-node wireless communication system. The method involves a master node and N slave nodes that are interconnected in the wireless communication system. The master node can wirelessly communicate with each of the N slave nodes. In each communication time period, the master node completes one wireless communication with each of the slave nodes. Each slave node has M communication time slices.
[0050] Reference Figure 2-3 The diagrams show a wireless communication network diagram of a master node and multiple slave nodes provided in an embodiment of the present invention, and a communication time slice diagram of each slave node in the wireless communication network provided in an embodiment of the present invention.
[0051] Figure 2 and Figure 3 The slave node is the slave node of each battery in the battery pack, also known as the slave node.
[0052] A wireless communication network can contain one master node and N slave nodes, where N is at least 2. The N slave nodes communicate wirelessly with the master node, periodically repeating the above communication process to complete the communication of the entire wireless communication network.
[0053] In one implementation, each slave node can communicate with the master node one by one in a pre-defined order, and each slave node has its own communication cycle.
[0054] like Figure 3 As shown, each slave node can be allocated 2, 3 or 10 communication time slices, which are configurable based on the maximum allocable resources of the system.
[0055] Assuming there are 3 slave nodes, and the communication time between the master node and the 3 slave nodes is 100ms, then the communication time for each slave node is approximately 33ms (100 / 3). Therefore, each slave node is allocated 33ms of communication time. Assuming the communication time slice between each slave node is 10ms, the number of communication time slices for each slave node is approximately 33ms / 10ms. For ease of description, this invention will use the assumption that each slave node is allocated 3 communication time slices.
[0056] As an example, the method for allocating communication time slices may include:
[0057] S11. Control the master node to establish wireless communication with any of the slave nodes.
[0058] In one embodiment, N slave nodes are arranged sequentially, and the master node can establish wireless communication with each slave node one by one according to the order of the N slave nodes. Specifically, the master node can first establish wireless communication with the first slave node. Since each slave node has 3 communication time slices, the master node can establish wireless communication with the first slave node three times, each communication lasting 10ms. If the first communication is successful, the master node will establish wireless communication with the second slave node. If the first communication fails, the master node will establish wireless communication with the first slave node a second time. Similarly, if the second wireless communication is successful, the master node will establish wireless communication with the second slave node; otherwise, if the second communication fails, the master node will establish wireless communication with the first slave node a third time. Similarly, if the third wireless communication is successful, the master node will establish wireless communication with the second slave node. If the third communication also fails, since the number of communication attempts has already equaled the number of communication time slices, no further wireless communication can be established, and the master node will directly establish wireless communication with the second slave node. The communication of the next slave node is carried out in the same way, until the master node has established wireless communication with all N slave nodes.
[0059] As an example, the step of controlling the master node to establish wireless communication with N slave nodes in sequence may include the following sub-steps:
[0060] S111. Control the master node to send a communication heartbeat packet to any of the slave nodes according to the communication time slice.
[0061] S112. If it is determined that the master node receives feedback information from the slave node within a preset time interval, then it is determined that the master node and the slave node have successfully communicated.
[0062] S113. If it is determined that the master node has not received feedback information from the slave node within a preset time interval, then it is determined that the communication between the master node and the slave node has failed.
[0063] In one embodiment, the success of communication between the master node and the slave node can be determined using conventional heartbeat detection methods.
[0064] Specifically, the master node can first send communication heartbeat packets to the slave node currently engaged in wireless communication according to the communication time slice. Each communication time slice can be used for wireless communication with the slave node. Then, it checks whether the master node receives feedback information from the current slave node within a preset time interval. If the master node receives feedback information from the current slave node within the preset time interval, it can be determined that the communication between the master node and the current slave node is successful. Conversely, if the master node does not receive feedback information from the current slave node within the preset time interval, it can be determined that the communication between the master node and the current slave node has failed.
[0065] S12. Count the number of communications between the slave node and the master node. Stop counting when the slave node successfully communicates with the master node, or stop counting when the number of communications counted reaches M.
[0066] As explained above, assuming there are three communication time slices, the master node can communicate with the slave node three times. If the communication quality is good, it may succeed using only one communication time slice; if the communication quality is poor, it may require two or three communication time slices to succeed.
[0067] It can count the number of times communication is performed using communication time slices. If the communication is successful, the counting stops; if the number of times communication is performed using time slices equals the number of communication time slices, the counting also stops.
[0068] Referring to the example above, assuming there are 3 communication time slices, if the master node and slave node succeed on their first communication, the communication count is 1, and counting stops. If the master node and slave node succeed on their second communication, the communication count is 2, and counting stops. If the master node and slave node communicate for the third time, regardless of success or failure, the communication count is 3, which equals the number of communication time slices (3), and counting also stops.
[0069] S13. If the master node successfully communicates with the slave node that is establishing communication with the master node and the number of communication attempts is less than M, then the remaining communication time slice of the slave node is calculated based on the number of communication attempts, the remaining communication time slice is converted into a spare time slice, and the master node is triggered to conduct wireless communication with another slave node.
[0070] In one embodiment, when it is determined that the master node has successfully communicated with a slave node that is currently establishing communication with the master node, the number of communication attempts between the master node and the current slave node can be counted. If the number of communication attempts is less than M, it indicates that the slave node has several communication time slices that have not been used. Assuming there are 3 communication time slices, it means that the master node can communicate with the slave node three times. If the communication quality is good, it may succeed in one communication attempt, and the number of communication attempts will be one, which is less than 3. The slave node has 2 communication time slices that have not been used. In order to reuse the unused communication time slices and improve resource utilization, the remaining communication time slices of the current slave node can be calculated based on the number of communication attempts, and then the remaining communication time slices of the current slave node can be converted into spare time slices.
[0071] The spare time slice can then be used to allow the next slave node with poor communication quality to conduct wireless communication.
[0072] Reference Figure 4 The diagram illustrates a communication time slice scheduling diagram of a slave node in a wireless communication network according to an embodiment of the present invention.
[0073] In one embodiment, calculating the remaining communication time slice of the slave node based on the number of communications may include the following sub-steps:
[0074] S131. Calculate the difference between M and the number of communications.
[0075] S132. Calculate the communication time slices of the slave node according to the difference to obtain the remaining communication time slices.
[0076] Specifically, the difference between M and the number of communications can be calculated first. Then, the remaining communication time slices of the current slave node can be allocated to the next slave node according to the amount corresponding to the calculated difference.
[0077] Reference Figure 4 Assuming there are 3 communication time slices, the master node can communicate with each slave node three times. If the master node successfully communicates with the second slave node on the second attempt, there is one remaining communication time slice. After calculating the difference between M and the number of communication attempts, a remaining communication time slice is obtained. This remaining communication time slice can be converted into a spare time slice and then frequency-modulated to the third slave node. At the same time, it can trigger wireless communication between the master node and the third slave node.
[0078] The third slave node can also communicate in the same way as described above. If there is a communication time slice remaining, it will be converted into a spare time slice and shifted to the next slave node for use by subsequent slave nodes.
[0079] S14. If the number of communications between the master node and the slave node that is establishing communication with the master node reaches M and the master node and the slave node still fails to establish communication, determine whether there is a spare time slice. If there is no spare time slice, the master node confirms that the communication with the slave node has failed. If there is a spare time slice, allocate the spare time slice for the slave node to communicate with the master node until the master node and the slave node successfully communicate. Alternatively, if the number of communications allocated for the master node and the slave node to communicate is equal to the total number of spare time slices and the master node and the slave node still fail to establish communication, the master node confirms that the communication with the slave node has failed.
[0080] If the number of communication attempts between the master node and the slave node reaches M and the master node and the slave node still fails to communicate successfully, it can be determined whether the slave node has any remaining communication time slices as backup time slices. If there are no backup time slices, the master node confirms that the communication with the slave node has failed.
[0081] Conversely, if it is determined that the preceding slave node has a remaining communication time slice as a spare time slice, the spare time slice can be allocated for the current slave node to communicate with the master node until the master node successfully communicates with the current slave node.
[0082] Using the above example as an illustration, refer to... Figure 4 Assuming there are 3 communication time slices, the master node can communicate with each slave node three times. If the master node successfully communicates with the second slave node on the second attempt, one communication time slice remains. Calculating the difference between M and the number of communication attempts yields a remaining time slice that can be set aside as a spare. At this point, the master node can initiate wireless communication with the third slave node. If the master node has attempted to communicate with the third slave node three times and still hasn't succeeded, the remaining spare time slice can be used to allow the master node to communicate with the third slave node one more time.
[0083] At this point, after allocating spare time slices for communication between the master node and the current slave node, the number of communication attempts is counted. If the number of communication attempts between the master node and the current slave node using spare time slices is equal to the total number of spare time slices, and the master node and the slave node still fail to establish communication, then the master node confirms that the communication with the slave node has failed.
[0084] Similarly, if the number of communication attempts equals the total number of spare time slices, and there are no spare communication time slices available for the slave node, then the master node will directly establish wireless communication with the next battery slave node.
[0085] In another alternative embodiment, communication between the master and slave nodes may be affected by various factors that could cause communication failures. This is to further provide opportunities for communication between the master and slave nodes.
[0086] In one embodiment, the method further includes K scheduling time slices. The number of K can be adjusted in advance according to actual needs.
[0087] As an example, after the master node confirms the communication failure of the slave node, the method further includes:
[0088] The K scheduling time slices are allocated for the slave node that is establishing communication to communicate with the master node, until the master node successfully establishes communication with the slave node.
[0089] Assuming there are three scheduling time slices, the master node can communicate with each slave node three times. Referring to the example above, if the master node fails to communicate with the third slave node after using two backup time slices, it can use all three scheduling time slices to allow the master node to communicate with the third slave node again, and so on, until the master node successfully communicates with the third slave node. If any subsequent communication fails, the master node can then communicate with the fourth slave node. If all three communication attempts fail, the master node can directly communicate with the fourth slave node.
[0090] Reference Figure 5 The diagram shows an operation flowchart of a communication time slice allocation method provided in an embodiment of the present invention.
[0091] Specifically, the operation of the communication time slice allocation method may include the following steps:
[0092] The first step is for the master node to communicate with the slave nodes. The wireless communication system contains one master node and n slave nodes (n≥2).
[0093] The second step is to allocate three time slices (depending on the system, the number of time slices is at least 2) to each slave node for communication with the master node within the period.
[0094] Third, when a slave node in a wireless communication system has poor communication quality, the master node can schedule time slices from other slave nodes with better communication quality to complete communication with the slave node with poor communication quality.
[0095] Fourth step: In the wireless communication system, there are n slave nodes, each allocated k time slices. However, some slave nodes have better communication quality and will not use all k time slices, while some slave nodes have poorer communication quality and k time slices may not be enough to support the completion of communication between master and slave nodes. Therefore, the master node can schedule the allocation of the time slices of a slave node with better communication quality to a slave node with poorer communication quality, thereby completing the wireless communication between the master and slave nodes.
[0096] In this embodiment, the present invention provides a method for allocating communication time slices, the advantages of which are as follows: the present invention can determine whether the communication between the master node and the battery slave node is successful when establishing wireless communication; if the communication between the master node and the battery slave node is successful, the number of communication times of the battery slave node is counted; if the number of communication times is less than the number of communication time slices of the battery slave node, the communication time slices of the battery slave node can be allocated to the next battery slave node according to the number of communication times, and the master node can be triggered to conduct wireless communication with the next battery slave node; once the communication is successful, the master node can be immediately triggered to communicate with the next battery slave node without waiting for a complete communication cycle, which can shorten the communication time and improve the communication efficiency; moreover, after the master and slave nodes communicate successfully, the remaining communication time slices of the current slave node can be allocated to the next slave node, so that the slave nodes with poor communication quality can have multiple communication time slices for wireless communication, improving the communication success rate of the slave nodes with poor communication quality, so as to make reasonable use of time resources and improve resource utilization.
[0097] This invention also provides a communication time slice allocation device, see [link to relevant documentation]. Figure 6 The diagram shows a schematic representation of a communication time slice allocation device according to an embodiment of the present invention.
[0098] The device is used for time slice allocation in a multi-node wireless communication system. The device involves a master node and N slave nodes that are interconnected in the wireless communication system. The master node can communicate wirelessly with each of the N slave nodes. In each communication time period, the master node completes one wireless communication with each of the slave nodes. Each slave node has M communication time slices.
[0099] As an example, the communication time slice allocation device may include:
[0100] The communication module 601 is configured to control the master node to establish wireless communication with any of the slave nodes.
[0101] The communication count module 602 is used to count the number of communications of the slave node that is establishing communication with the master node. The counting stops when the slave node successfully communicates with the master node, or when the counted number of communications reaches M.
[0102] The time slice accumulation module 603 is used to calculate the remaining communication time slice of the slave node that is establishing communication with the master node in one communication time period based on the number of communication if the master node successfully communicates with the slave node that is establishing communication with the master node and the number of communication is less than M, convert the remaining communication time slice into a spare time slice, and trigger the master node to conduct wireless communication with another slave node.
[0103] The time-slice allocation module 604 is used to determine whether there is a spare time slice if the number of communications between the master node and the slave node that is establishing communication with the master node reaches M and the master node and the slave node still fails to establish communication successfully. If there is no spare time slice, the master node confirms that the communication with the slave node has failed. If there is a spare time slice, the master node allocates the spare time slice for the slave node to communicate with the master node until the master node and the slave node successfully communicate. Alternatively, if the number of communications allocated for the master node and the slave node to communicate is equal to the total number of spare time slices and the master node and the slave node still fail to establish communication successfully, the master node confirms that the communication with the slave node has failed.
[0104] Optionally, calculating the remaining communication time slice of the slave node currently establishing communication with the master node within a communication time period based on the number of communication attempts includes:
[0105] Calculate the difference between M and the number of communications;
[0106] The remaining communication time slices are obtained by calculating the communication time slices of the slave node in one communication time period based on the difference.
[0107] Optionally, controlling the master node to establish wireless communication with any slave node includes:
[0108] The master node is controlled to send a communication heartbeat packet to any of the slave nodes according to the communication time slice allocation rules;
[0109] If the master node receives feedback information from the slave node within a preset time interval, then the master node and the slave node are confirmed to have successfully communicated.
[0110] If the master node does not receive feedback information from the slave node within a preset time interval, then the communication between the master node and the slave node is determined to have failed.
[0111] Optionally, the device further includes K scheduling time slices;
[0112] The device further includes:
[0113] The time-slice allocation module is used to allocate the K scheduling time slices for the slave node that is establishing communication to communicate with the master node after the master node confirms that the slave node has failed to communicate, until the master node successfully communicates with the slave node that is establishing communication.
[0114] This invention also provides a communication time slice allocation system, see [link to relevant documentation]. Figure 7 The diagram shows a schematic representation of a communication time slice allocation system according to an embodiment of the present invention.
[0115] The system is applied to the communication time slice allocation method described above. As an example, the communication time slice allocation system may include: a master node and N slave nodes.
[0116] The master node communicates wirelessly with each of the N slave nodes. In each communication time period, each slave node has M communication time slices, and the time interval between two adjacent communication time slices is the same.
[0117] Those skilled in the art will understand that, for ease of description and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0118] Furthermore, this application also 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 program to implement the communication time slice allocation method as described in the above embodiments.
[0119] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer-executable program for causing a computer to perform the communication time slice allocation method as described in the above embodiments.
[0120] In the description of the embodiments of the present invention, it should be noted that the terms "above," "below," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. When an element such as a layer, region, or substrate is referred to as being "above" or "on top of" another element, it may be directly on the other element, or there may be an intermediate element. Conversely, when an element is referred to as being "directly on" or "above" another element, there is no intermediate element. It should also be understood that when an element is referred to as being "below" or "under" another element, it may be directly below or under the other element, or there may be an intermediate element. Conversely, when an element is referred to as being "directly below" or "under" another element, there is no intermediate element. Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0121] Those skilled in the art will understand that embodiments of this application may also include computer program products. Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0122] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), devices, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0125] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for allocating communication time slices, used for time slice allocation in a multi-node wireless communication system, the method involving a master node and N slave nodes interconnected in the wireless communication system, characterized in that... Within each communication time period, the master node completes one wireless communication with each of the slave nodes, and each slave node is allocated M communication time slices. The method includes: Control the master node to establish wireless communication with any one of the slave nodes; The number of communications between the slave node and the master node is counted. The counting stops when the slave node successfully communicates with the master node, or when the number of communications counted reaches M. If the master node successfully communicates with the slave node that is establishing communication with the master node and the number of communication attempts is less than M, then the remaining communication time slice of the slave node is calculated based on the number of communication attempts, the remaining communication time slice is converted into a spare time slice, and the master node is triggered to conduct wireless communication with another slave node. If the number of communications between the master node and the slave node that is currently establishing communication with the master node reaches M and the master node and the slave node still fails to establish communication, it is determined whether there is a spare time slice. If there is no spare time slice, the master node confirms that the communication with the slave node has failed. If there is a spare time slice, the spare time slice is allocated for the slave node to communicate with the master node until the master node and the slave node successfully communicate. Alternatively, if the number of communications allocated for the master node to communicate with the slave node is equal to the total number of spare time slices and the master node and the slave node still fail to establish communication, the master node confirms that the communication with the slave node has failed.
2. The communication time slice allocation method according to claim 1, characterized in that, The step of calculating the remaining communication time slice of the slave node based on the number of communications includes: Calculate the difference between M and the number of communications; The remaining communication time slices are obtained by calculating the current communication time slices of the slave node based on the difference.
3. The communication time slice allocation method according to claim 1, characterized in that, The step of controlling the master node to establish wireless communication with any one of the slave nodes includes: The master node is controlled to send a communication heartbeat packet to any of the slave nodes according to the communication time slice allocation rules; If the master node receives feedback information from the slave node within a preset time interval, then the master node and the slave node are confirmed to have successfully communicated. If the master node does not receive feedback information from the slave node within a preset time interval, then the communication between the master node and the slave node is determined to have failed.
4. The method for allocating communication time slices according to any one of claims 1-3, characterized in that, The method also includes K scheduling time slices; After the master node confirms the communication failure of the slave node, the method further includes: The K scheduling time slices are allocated for communication between the slave node that is establishing communication and the master node, until the master node successfully communicates with the slave node that is establishing communication or the scheduling time slices are exhausted.
5. A communication time slice allocation device for time slice allocation in a multi-node wireless communication system, the device involving a master node and N slave nodes interconnected in the wireless communication system, characterized in that... Within each communication time period, the master node completes one wireless communication with each of the slave nodes, and each slave node has M communication time slices. The device includes: A communication module is defined, used to control the master node to establish wireless communication with any one of the slave nodes; The communication count module is used to count the number of communications between the slave node and the master node. The counting stops when the slave node successfully communicates with the master node, or when the counted number of communications reaches M. The time slice accumulation module is used to calculate the remaining communication time slice of the slave node based on the number of communications if the master node successfully communicates with the slave node that is establishing communication with the master node and the number of communications is less than M, convert the remaining communication time slice into a spare time slice, and trigger the master node to conduct wireless communication with another slave node. The time-slice allocation module is used to determine whether a spare time slice exists if the number of communications between the master node and the slave node that is currently establishing communication with the master node reaches M and the master node and the slave node still fails to establish communication successfully. If the spare time slice does not exist, the master node confirms that the communication with the slave node has failed. If the spare time slice exists, the master node allocates the spare time slice for the slave node to communicate with the master node until the master node and the slave node successfully communicate. Alternatively, if the number of communications for the master node and the slave node to communicate using the spare time slice is equal to the total number of spare time slices and the master node and the slave node still fail to establish communication successfully, the master node confirms that the communication with the slave node has failed.
6. The communication time slice allocation device according to claim 5, characterized in that, The step of controlling the master node to establish wireless communication with any one of the slave nodes includes: The master node is controlled to send a communication heartbeat packet to any of the slave nodes according to the communication time slice allocation rules; If the master node receives feedback information from the slave node within a preset time interval, then the master node and the slave node are confirmed to have successfully communicated. If the master node does not receive feedback information from the slave node within a preset time interval, then the communication between the master node and the slave node is determined to have failed.
7. The communication time slice allocation device according to any one of claims 5-6, characterized in that, The device also has K scheduling time slices; The device further includes: The time-slice allocation module is used to allocate the K scheduling time slices for the slave node that is establishing communication to communicate with the master node after the master node confirms that the slave node has failed to communicate, until the master node successfully communicates with the slave node that is establishing communication.
8. A communication time slice allocation system, characterized in that, The system is applied to the communication time slice allocation method as described in any one of claims 1-4, and the system includes: a master node and N slave nodes; The master node communicates wirelessly with each of the N slave nodes. In each communication time period, each slave node has M communication time slices, and the time interval between two adjacent communication time slices is the same.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the communication time slice allocation method as described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer-executable program for causing a computer to perform the communication time slice allocation method as described in any one of claims 1-4.
Citation Information
Patent Citations
Method for realizing dynamic time slot networking based on time division multiple access technology
CN112584442A
Internet of things ultra-low power consumption ad hoc network communication method
CN114585063A