Time slot allocation method and apparatus, electronic device, medium, and program product
Patent Information
- Application Number
- CN202510436024.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2026-10-16
AI Technical Summary
[0052]获取多个扫描设备在至少一个第一广播周期的响应特征,以得到扫描设备在周期性通信过程中的响应情况。由于响应特征在一个或多个维度反映扫描设备对响应的需求程度,根据多个扫描设备的响应特征,确定多个扫描设备的时隙分配方式。以时隙分配方式,分配多个扫描设备在至少一个第二广播周期的时隙,以调整多个扫描设备的时隙来符合响应情况。在第二广播周期,发送广播信号,以使多个扫描设备在对应的时隙响应广播信号。通过响应特征来动态分配扫描设备的时隙,能够满足不同扫描设备的响应需求以避免扫描设备响应异常,从而提高了时隙分配的效果。
Smart Images

Figure CN122934472A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a time slot allocation method, apparatus, electronic device, medium, and program product. Background Technology
[0002] With the development of communication technology, multiple electronic devices can communicate periodically without establishing a connection, thereby reducing the power consumption of electronic devices. Electronic devices acting as broadcasting devices periodically send broadcast signals, while electronic devices acting as scanning devices receive broadcast signals in allocated time slots and respond to the broadcast signals to achieve two-way communication. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a time slot allocation method, apparatus, electronic device, medium, and program product.
[0004] According to a first aspect of the present disclosure, a time slot allocation method is provided, the time slot allocation method comprising:
[0005] Acquire response characteristics of multiple scanning devices during at least one first broadcast cycle;
[0006] The time slot allocation method of the multiple scanning devices is determined based on the response characteristics of the multiple scanning devices;
[0007] The time slot allocation method is used to allocate time slots for the plurality of scanning devices in at least one second broadcast cycle;
[0008] During the second broadcast period, a broadcast signal is transmitted so that the plurality of scanning devices respond to the broadcast signal in the corresponding time slot.
[0009] In some embodiments of this disclosure, determining the time slot allocation method of the plurality of scanning devices based on the response characteristics of the plurality of scanning devices includes:
[0010] Based on the response characteristics of the plurality of scanning devices, the response requirements of the plurality of scanning devices are determined;
[0011] Based on the response requirements of the plurality of scanning devices, the target time slot of the plurality of scanning devices in at least one second broadcast period is determined;
[0012] The allocation of time slots for the plurality of scanning devices in at least one second broadcast period using the time slot allocation method includes:
[0013] The multiple target time slots are allocated to the corresponding scanning devices.
[0014] In some embodiments of this disclosure, determining the target time slot of the plurality of scanning devices in at least one second broadcast period based on the response requirements of the plurality of scanning devices includes:
[0015] The target time slots of the multiple scanning devices are determined based on their response requirements and response characteristics.
[0016] In some embodiments of this disclosure, the response characteristics include load and priority; determining the target time slot of the plurality of scanning devices based on the response requirements and response characteristics of the plurality of scanning devices includes:
[0017] Based on a preset relationship, the response requirements, load, and priority of each scanning device are processed to obtain the target time slot for each scanning device.
[0018] In some embodiments of this disclosure, determining the target time slot of the plurality of scanning devices in at least one second broadcast period based on the response requirements of the plurality of scanning devices includes:
[0019] If the difference between the response requests of the first scanning device and the second scanning device among the plurality of scanning devices is less than a preset difference, the same time slots within two second broadcast cycles are respectively used as the target time slots of the first scanning device and the second scanning device, so as to share the same time slot in different second broadcast cycles.
[0020] In some embodiments of this disclosure, the response characteristics include load; the load of both the first scanning device and the second scanning device is less than a preset load.
[0021] In some embodiments of this disclosure, the response feature includes a priority; the priority of the first scanning device is higher than the priority of the second scanning device, and the second broadcast period in which the target time slot of the first scanning device is located is earlier than the second broadcast period in which the target time slot of the second scanning device is located.
[0022] In some embodiments of this disclosure, the response characteristics include response frequency, load, and priority; determining the response requirements of the plurality of scanning devices based on the response characteristics of the plurality of scanning devices includes:
[0023] The response requirements of the plurality of scanning devices are determined based on their response frequency, load, and priority.
[0024] In some embodiments of this disclosure, determining the response requirements of the plurality of scanning devices based on the response frequency, the load, and the priority of the plurality of scanning devices includes:
[0025] The response frequency, load, and priority of each scanning device are multiplied by their respective first coefficients to obtain multiple demand components for each scanning device;
[0026] The response requirement of each scanning device is obtained by summing the plurality of requirement components of each scanning device.
[0027] In some embodiments of this disclosure, determining the response requirements of the plurality of scanning devices based on the response frequency, the load, and the priority of the plurality of scanning devices includes:
[0028] The response frequency, load, and priority of each scanning device are input into a preset model to predict the response requirements of each scanning device. The preset model is used to perform time series analysis based on the response frequency, load, and priority to predict the response requirements.
[0029] In some embodiments of this disclosure, the preset model is one of a time series forecasting model, a decision tree model, and a random forest model.
[0030] In some embodiments of this disclosure, after allocating time slots for the plurality of scanning devices in at least one second broadcast period using the time slot allocation method, the time slot allocation method further includes:
[0031] In response to an abnormal response from the third scanning device among the plurality of scanning devices in its allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally.
[0032] In some embodiments of this disclosure, the more times the third scanning device responds to anomalies, the further the time slot of the rollback is from the start time slot of the second broadcast period.
[0033] According to a second aspect of the present disclosure, a time slot allocation device is provided, the time slot allocation device comprising:
[0034] An acquisition module is configured to acquire response features of a plurality of scanning devices in at least one first broadcast period;
[0035] A determining module is configured to determine the time slot allocation method of the plurality of scanning devices based on the response characteristics of the plurality of scanning devices;
[0036] An allocation module, configured to allocate time slots of the plurality of scanning devices in at least one second broadcast period in the time slot allocation method;
[0037] A transmitting module is configured to transmit a broadcast signal during the second broadcast period, so that the plurality of scanning devices respond to the broadcast signal in the corresponding time slot.
[0038] In some embodiments of this disclosure, the determining module is configured to:
[0039] Based on the response characteristics of the plurality of scanning devices, the response requirements of the plurality of scanning devices are determined;
[0040] Based on the response requirements of the plurality of scanning devices, the target time slot of the plurality of scanning devices in at least one second broadcast period is determined;
[0041] The allocation module is configured to:
[0042] The multiple target time slots are allocated to the corresponding scanning devices.
[0043] In some embodiments of this disclosure, the determining module is configured to:
[0044] If the difference between the response requests of the first scanning device and the second scanning device among the plurality of scanning devices is less than a preset difference, the same time slots within two second broadcast cycles are respectively used as the target time slots of the first scanning device and the second scanning device, so as to share the same time slot in different second broadcast cycles.
[0045] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0046] processor;
[0047] Memory used to store the processor's executable instructions;
[0048] The processor is configured to execute the time slot allocation method described above.
[0049] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to perform the time slot allocation method as described above.
[0050] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the time slot allocation method as described above.
[0051] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0052] Response characteristics of multiple scanning devices are acquired during at least one first broadcast cycle to determine their response status during periodic communication. Since the response characteristics reflect the degree of response demand from the scanning devices in one or more dimensions, a time slot allocation method for the multiple scanning devices is determined based on these characteristics. Time slots for the multiple scanning devices are then allocated during at least one second broadcast cycle according to this time slot allocation method, adjusting the time slots to conform to the response requirements. During the second broadcast cycle, a broadcast signal is transmitted to ensure that the multiple scanning devices respond to the broadcast signal in their corresponding time slots. Dynamically allocating time slots for scanning devices based on response characteristics satisfies the response needs of different scanning devices, avoids abnormal responses, and thus improves the effectiveness of time slot allocation.
[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0055] Figure 1 This is a flowchart illustrating a time slot allocation method according to an exemplary embodiment;
[0056] Figure 2 This is a flowchart illustrating a time slot allocation method according to another exemplary embodiment;
[0057] Figure 3 This is a flowchart illustrating a time slot allocation method according to another exemplary embodiment;
[0058] Figure 4 This is a flowchart illustrating a time slot allocation method according to another exemplary embodiment;
[0059] Figure 5 This is a block diagram illustrating a time slot allocation device according to an exemplary embodiment;
[0060] Figure 6 This is a block diagram of an electronic device according to an exemplary embodiment.
[0061] In the picture:
[0062] 100 - Acquisition module; 150 - Determination module; 200 - Allocation module; 250 - Transmission module; 400 - Electronic device; 402 - Processing component; 404 - Memory; 406 - Power supply component; 408 - Multimedia component; 410 - Audio component; 412 - Input / output interface; 414 - Sensor component; 416 - Communication component; 420 - Processor. Detailed Implementation
[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. It should also be understood that the term “and / or” as used in this disclosure refers to any or all possible combinations including one or more of the associated listed items.
[0064] With the development of communication technology and the increasing demand for low-power transmission, the Periodic Advertising with Responses (PAwR) protocol has emerged. Electronic devices acting as broadcasting devices periodically transmit broadcast signals, while electronic devices acting as scanning devices receive these signals in allocated time slots and respond to them to achieve bidirectional communication. Since the broadcasting and scanning devices do not establish a communication connection and only need to interact periodically, the power consumption of both devices is reduced. Simultaneously, because there is no need to maintain a connection state, the number of communicable scanning devices increases significantly. To avoid conflicts when multiple scanning devices respond, time slots for the scanning devices need to be allocated so that only one scanning device responds in each time slot.
[0065] This disclosure provides a time slot allocation method, the method comprising:
[0066] Each scanning device is assigned a fixed time slot according to a preset allocation method.
[0067] This method avoids response conflicts caused by time slot overlap between multiple scanning devices by allocating a fixed time slot to each scanning device, enabling normal communication between the scanning devices and the broadcasting devices. However, since each scanning device has different response requirements, time slots allocated according to a preset method may not meet the response needs of each scanning device, resulting in poor time slot allocation efficiency. For example, when the response frequency of the scanning devices is low and / or the load is small, there are idle time slots that cannot be fully utilized. When the number of scanning devices increases or decreases and / or the load fluctuates greatly, it is impossible to dynamically adjust the time slots according to the actual response needs of the scanning devices, resulting in low time slot allocation efficiency.
[0068] This disclosure also provides a time slot allocation method, such as... Figure 1 As shown, the method includes:
[0069] S100: Acquire the response characteristics of multiple scanning devices in at least one first broadcast cycle.
[0070] S200. Determine the time slot allocation method for multiple scanning devices based on their response characteristics.
[0071] S300: Allocate time slots for multiple scanning devices in at least one second broadcast cycle using a time slot allocation method.
[0072] S400, in the second broadcast cycle, a broadcast signal is sent so that multiple scanning devices respond to the broadcast signal in their corresponding time slots.
[0073] In this embodiment, the response characteristics of multiple scanning devices during at least one first broadcast cycle are obtained to determine the response status of the scanning devices during periodic communication. Since the response characteristics reflect the degree of response demand of the scanning devices in one or more dimensions, a time slot allocation method for the multiple scanning devices is determined based on their response characteristics. Time slots for the multiple scanning devices are allocated during at least one second broadcast cycle according to this time slot allocation method, adjusting the time slots of the multiple scanning devices to conform to the response conditions. During the second broadcast cycle, a broadcast signal is sent to enable the multiple scanning devices to respond to the broadcast signal in their corresponding time slots. Dynamically allocating the time slots of the scanning devices through response characteristics can meet the response needs of different scanning devices and avoid abnormal responses, thereby improving the effectiveness of time slot allocation.
[0074] For example, the broadcasting device and the scanning device can communicate periodically via a Periodic Advertising with Responses (PAwR) protocol. The broadcasting device can be, for example, a central device, and the scanning device can be, for example, a sensor, a monitoring device, etc. Before obtaining the response characteristics of multiple scanning devices in at least one first broadcast cycle in step S100, synchronization can be performed with multiple scanning devices to determine which scanning devices need to communicate periodically. Then, time slots for the multiple scanning devices in at least one first broadcast cycle are allocated according to a preset allocation method.
[0075] For example, the acquisition of response characteristics of multiple scanning devices in at least one first broadcast period in step S100 is determined in the following manner:
[0076] Obtain the total number of responses and total data volume from multiple scanning devices during at least one first broadcast cycle, as well as the priority of the multiple scanning devices.
[0077] The ratio of the total number of responses to the number of the first broadcast cycle is used as the response frequency.
[0078] The load is the ratio of the total data volume to the number of the first broadcast cycles.
[0079] For example, the ratio of the total number of responses to the number of the first broadcast cycle in the above steps can be expressed as the response frequency by the following formula:
[0080]
[0081] Among them, F resp,i N represents the response frequency of the i-th scanning device. i Let T represent the total number of responses from the i-th scanning device, and let T represent the number of the first broadcast cycles.
[0082] The ratio of the total data volume to the number of the first broadcast cycles in the above steps can be expressed as the load using the following formula:
[0083]
[0084] Among them, L load,i D represents the load of the i-th scanning device. i This represents the total amount of data processed by the i-th scanning device in the first broadcast cycle.
[0085] For example, the priority of scanning devices can be allocated based on the urgency of the tasks performed by the scanning devices, with higher-priority scanning devices being given priority in the time slot allocation process.
[0086] In one embodiment, such as Figure 2As shown, the time slot allocation method for multiple scanning devices in step S200, based on the response characteristics of multiple scanning devices, is determined in the following way:
[0087] S210. Determine the response requirements of multiple scanning devices based on their response characteristics.
[0088] S220. Based on the response requirements of multiple scanning devices, determine the target time slot of the multiple scanning devices in at least one second broadcast cycle.
[0089] In step S300, allocating time slots for multiple scanning devices in at least one second broadcast period using a time slot allocation method is determined as follows:
[0090] Multiple target time slots are assigned to the corresponding scanning devices.
[0091] In this embodiment, since the response characteristics reflect the degree of response demand of the scanning devices in one or more dimensions, the response demands of multiple scanning devices are determined based on their response characteristics. Because scanning devices with high response demands require earlier responses and occupy longer time slots, target time slots for multiple scanning devices in at least one second broadcast cycle are determined based on their response demands. These target time slots are then allocated to the corresponding scanning devices, ensuring that the time slots of the scanning devices correspond to their response demands and that the target time slots are utilized fully and promptly for response. By allocating target time slots determined by response demands to the scanning devices, the scanning devices can respond effectively within the target time slots, thereby improving the efficiency of time slot allocation.
[0092] In one embodiment, the response characteristics include response frequency, load, and priority. The step S210, determining the response requirements of multiple scanning devices based on their response characteristics, can be achieved as follows:
[0093] The response requirements of multiple scanning devices are determined based on their response frequency, load, and priority.
[0094] In this embodiment, response frequency, representing the number of effective responses from the scanning device, reflects the level of response demand in one dimension, and is used as a response characteristic. Load, representing the amount of data processed by the scanning device in each time slot, also reflects the level of response demand in one dimension, and is used as a response characteristic. Priority, representing the priority level of communication by the scanning device, reflects the level of response demand in one dimension, and is used as a response characteristic. Based on response frequency, load, and priority, the response demand of the scanning device in future time slots is determined, thus comprehensively determining the scanning device's response requirements from multiple dimensions. By comprehensively determining response demands through different characteristics across multiple dimensions, the system avoids ineffective reflection of response demands due to varying response biases of the scanning devices, thereby improving the reliability of time slot allocation.
[0095] For example, response frequency, load, and priority are all positively correlated with response demand. A higher response frequency means the scanning device responds to the broadcasting device more frequently, resulting in a higher response demand. A higher load means the scanning device transmits more data to the broadcasting device, resulting in a higher response demand. A higher priority means the scanning device responds more quickly, resulting in a higher response demand.
[0096] It is understandable that response characteristics can include not only response frequency, load, and priority, but also response latency, response distance, etc.
[0097] In one embodiment, such as Figure 3 As shown, the response requirements of multiple scanning devices, determined based on their response frequency, load, and priority, in the above steps can be determined as follows:
[0098] S211. Multiply the response frequency, load, and priority of each scanning device by the corresponding first coefficient to obtain multiple demand components for each scanning device.
[0099] S212. Sum the multiple demand components of each scanning device to obtain the response demand of each scanning device.
[0100] In this embodiment, since response frequency, load, and priority reflect response requirements from different dimensions and to varying degrees, multiple requirement components are obtained by adjusting the response frequency, load, and priority using corresponding first coefficients. The multiple requirement components for each scanning device are summed to synthesize the requirement components across multiple dimensions, thus obtaining the response requirement for each scanning device. Determining the response requirement by adjusting the requirement components using the first coefficient reflects the importance of different features in their respective dimensions and normalizes these features, thereby improving the reliability of time slot allocation.
[0101] For example, response frequency, load, and priority each correspond to three different first coefficients. The first coefficients are used to reflect the importance of different features in their respective dimensions, and also to normalize the different features (making the units of the different features consistent).
[0102] In one embodiment, the step S210 of determining the response requirements of multiple scanning devices based on their response characteristics can also be determined in the following way:
[0103] The response characteristics of each scanning device are input into a preset model to obtain the response requirements of each scanning device. The preset model is used to perform time series analysis based on the response characteristics to predict the response requirements.
[0104] In this embodiment, response requirements are predicted by inputting response features into a preset model using time series analysis. The response feature processing is fast and can accurately predict the response requirements of future time slots, thereby improving the effectiveness of time slot allocation.
[0105] In one embodiment, the preset model is a Long Short-Term Memory (LSTM) model.
[0106] In this embodiment, since the Long Short-Term Memory model can capture long-term dependencies and effectively predict time series data, it can accurately meet the response requirements of future time slots, thereby improving the effectiveness of time slot allocation.
[0107] In one embodiment, the preset model is a decision tree model.
[0108] In this embodiment, the decision tree model has an intuitive structure and high efficiency in processing response features, thereby improving the efficiency of time slot allocation.
[0109] In one embodiment, the preset model is a random forest model.
[0110] In this embodiment, the random forest model can handle high-dimensional response features and has good robustness, thereby improving the effect of time slot allocation.
[0111] In one embodiment, the step of determining the response requirement based on response frequency, load, and priority in the above steps can also be determined in the following way:
[0112] The response frequency, load, and priority of each scanning device are input into a preset model to obtain the response requirements of each scanning device. The preset model is used to perform time series analysis based on the response frequency, load, and priority to predict the response requirements.
[0113] In this embodiment, response demand is predicted by inputting response frequency, load and priority into a preset model using time series analysis. The response feature processing is fast and can accurately predict the response demand of future time slots, thereby improving the effectiveness of time slot allocation.
[0114] For example, when the response features include features in multiple dimensions, an input feature vector can be constructed using the features of each scanning device in multiple dimensions. The input feature vectors of multiple scanning devices are then input into a preset model to obtain the response requirements of each scanning device.
[0115] For example, in the above steps, the response frequency, load, and priority are input into a preset model, and the response requirements are determined in the following way:
[0116] The input feature vector is composed of response frequency, load, and priority. The input feature vector can be represented as:
[0117] X i =[F resp,i ,L load,i ,S priority,i ];
[0118] Among them, X i S represents the input feature vector of the i-th scanning device. priority,i This represents the priority of the i-th scanning device. The input feature vector is fed into the Long Short-Term Memory model to obtain the response requirement. The response requirement can be expressed as:
[0119] Y i =LSTM(X) i );
[0120] Among them, Y i This represents the response requirement of the i-th scanning device, and LSTM() represents the Long Short-Term Memory model.
[0121] In one embodiment, the step of determining the target time slot of multiple scanning devices in at least one second broadcast period based on multiple response requirements can be determined in the following manner:
[0122] Based on the response requirements and characteristics of multiple scanning devices, the target time slots of multiple scanning devices are determined.
[0123] In this embodiment, by combining response requirements and response characteristics, a suitable target time slot can be determined based on the response bias of the scanning device, thereby improving the effectiveness of time slot allocation.
[0124] In one embodiment, the response characteristics include load and priority. The determination of the target time slots for multiple scanning devices based on their response requirements and characteristics in the above steps is made as follows:
[0125] Based on the preset relationships, the response requirements, load, and priority of each scanning device are processed to obtain the target time slot for each scanning device.
[0126] In this embodiment, by combining response requirements and features of different dimensions, a suitable target time slot can be determined based on the response bias of the scanning device in terms of load and priority, thereby improving the effectiveness of time slot allocation.
[0127] For example, for a scanning device with a high response frequency, the target timeslot may exist in every broadcast cycle. For a scanning device with a high load, the target timeslot may consist of multiple consecutive timeslots. For a high-priority scanning device, the target timeslot may be an earlier timeslot in the broadcast cycle.
[0128] For example, the preset relationship can be represented in the form of a time slot allocation function. The step above, determining the target time slots for multiple scanning devices based on their response requirements and characteristics, can be achieved by substituting load, priority, and response requirements into the time slot allocation function to obtain the target time slots. The target time slots can be expressed as:
[0129] T slot,i =f(Y) i ,S priority,i ,L load,i );
[0130] Among them, T slot,i Let f() represent the target time slot for the i-th scanning device. The time slot allocation function can be obtained by summing the results after adjusting for different characteristics and response requirements using different second coefficients.
[0131] In one embodiment, the step of determining the target time slot of multiple scanning devices in at least one second broadcast period based on multiple response requirements can also be determined in the following way:
[0132] If the difference between the response requirements of the first scanning device and the second scanning device among multiple scanning devices is less than a preset difference, the same time slots in two second broadcast cycles are respectively used as the target time slots of the first scanning device and the second scanning device, so as to share the same time slot in different second broadcast cycles.
[0133] In this embodiment, since the difference in response demand between the first and second scanning devices is less than a preset difference, their response demands are similar, and their response time slots are similar, allowing them to be allocated to the same time slot in different broadcast periods. By enabling the first and second scanning devices to share time slots, the utilization rate of time slots is increased without response conflicts, thereby improving the effectiveness of time slot allocation.
[0134] For example, the scanning device includes device A, device B, device C, and device D. The difference in response requests between device A and device B is less than a preset difference; the differences in response requests between device A and device C, as well as device D, are all greater than the preset difference; and the difference in response requests between device C and device D is equal to the preset difference. The target timeslot for device A is the first timeslot of the first broadcast cycle. The target timeslot for device B is the first timeslot of the second broadcast cycle. The target timeslot for device C is the second timeslot of both the first and second broadcast cycles. The target timeslot for device D is the third timeslot of both the first and second broadcast cycles.
[0135] In one embodiment, the response requirements of both the first scanning device and the second scanning device are less than the preset requirements.
[0136] In this embodiment, by allocating the first and second scanning devices with low response requirements to the same time slot, the shared time slot can be fully utilized to avoid resource waste, thereby improving the efficiency of time slot allocation.
[0137] In one embodiment, the response characteristics include response frequency. The response frequencies of both the first scanning device and the second scanning device are less than a preset frequency.
[0138] In this embodiment, because a higher response frequency of the scanning device results in more time slots being occupied, and a response is required for each broadcast cycle, the response frequencies of both the first and second scanning devices are lower than a preset frequency, except for similar response requirements, to meet the requirement of the number of responses. By limiting the response frequencies of the first and second scanning devices, responses can be made in time slots where other scanning devices do not require responses, thus avoiding resource waste and improving the efficiency of time slot allocation.
[0139] For example, the scanning device includes device A, device B, device C, and device D. The difference in response requirements between device A and device B is less than a preset difference, the difference in response requirements between device B and device C is less than a preset difference, and the difference in response requirements between device A and device D is greater than a preset difference. The response frequency of device A is greater than a preset frequency, and the load of devices B, C, and D is less than a preset frequency. The target timeslot for device A is the second timeslot of the first broadcast cycle and the second timeslot of the second broadcast cycle. The target timeslot for device B is the first timeslot of the first broadcast cycle. The target timeslot for device C is the first timeslot of the second broadcast cycle. The target timeslot for device D is the third timeslot of the first broadcast cycle and the second timeslot of the second broadcast cycle.
[0140] In one embodiment, the response characteristics include load. The load of both the first scanning device and the second scanning device is less than a preset load.
[0141] In this embodiment, the higher the load of the scanning device, the longer the time slot it occupies, and a response is required for each broadcast cycle. Except for similar response requirements, the load of both the first and second scanning devices is less than a preset load to meet data processing needs. By limiting the load of the first and second scanning devices, response conflicts caused by high loads are avoided, thereby improving the effectiveness of time slot allocation.
[0142] For example, the scanning device includes device A, device B, device C, and device D. The difference in response requirements between device A and device B is less than a preset difference, the difference in response requirements between device B and device C is less than a preset difference, and the difference in response requirements between device A and device D is greater than a preset difference. The load of device A is greater than a preset data volume, while the loads of devices B, C, and D are all less than a preset data volume. The target timeslot for device A is the second timeslot of the first broadcast cycle and the second timeslot of the second broadcast cycle. The target timeslot for device B is the first timeslot of the first broadcast cycle. The target timeslot for device C is the first timeslot of the second broadcast cycle. The target timeslot for device D is the third timeslot of the first broadcast cycle and the second timeslot of the second broadcast cycle.
[0143] In one embodiment, the response features include priority. The priority of the first scanning device is higher than that of the second scanning device, and the second broadcast period in which the target time slot of the first scanning device is located is earlier than the second broadcast period in which the target time slot of the second scanning device is located.
[0144] In this embodiment, since the higher the priority of the scanning device, the more priority the scanning device needs to respond, and the earlier the broadcast period of the target time slot when sharing time slots. By allocating the order of the first and second scanning devices in the shared time slots according to their priorities, the scanning device with higher priority can respond as early as possible, thereby improving the reliability of time slot allocation.
[0145] For example, the scanning devices include device A and device B. The difference between the response requests of device A and device B is less than a preset difference. Device A has a higher priority than device B. The target timeslot for device A is the first timeslot of the first broadcast cycle. The target timeslot for device B is the first timeslot of the second broadcast cycle.
[0146] For example, when priorities are the same, for a first scanning device and a second scanning device sharing a time slot, the broadcast period of the target time slot can be determined by combining response demand, response frequency, and / or load. For instance, when priorities are the same, a higher response demand from the scanning device results in an earlier broadcast period for the target time slot. Alternatively, when priorities are the same, a higher response frequency from the scanning device results in an earlier broadcast period for the target time slot. Or, when priorities are the same, a higher load on the scanning device results in an earlier broadcast period for the target time slot.
[0147] In one embodiment, after allocating time slots for multiple scanning devices in at least one second broadcast period in step S300, the time slot allocation method further includes:
[0148] In response to an abnormal response from the third scanning device among multiple scanning devices in its allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally.
[0149] In this embodiment, after the time slots of the scanning devices are allocated, the scanning devices may respond abnormally due to time slot allocation errors, response conflicts, or other reasons, requiring time slot re-allocation. In response to a third scanning device among multiple scanning devices responding abnormally in its allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally. By re-allocating time slots to the third scanning device that has responded abnormally, the third scanning device can respond normally, thereby improving the reliability of time slot allocation.
[0150] For example, an abnormal response from the scanning device could be a delayed response or no response at all.
[0151] In one embodiment, the more times the third scanning device responds to anomalies, the further the time slot of the rollback is from the start time slot of the second broadcast cycle.
[0152] In this embodiment, by making the time slot of the third scanning device with a higher number of response anomalies farther away from the starting time slot of the second broadcast cycle, the possibility of response conflicts of the scanning devices can be reduced, thereby improving the reliability of time slot allocation.
[0153] For example, the step above, which involves reverting the time slot of the third scanning device based on the number of times the third scanning device responds to an anomaly, can be expressed by the following formula:
[0154] T retry,i =2 n *T slot ;
[0155] Among them, T retry,i T represents the time slot for the i-th scanning device to back off, n represents the number of response anomalies, and T slot Indicates the basic duration of a time slot.
[0156] For example, if a time slot of one scanning device is backed up and is the same as the time slot of another scanning device, the time slots of the two scanning devices can be allocated in a shared time slot manner.
[0157] This disclosure also provides a time slot allocation method, such as... Figure 4 As shown, the method includes:
[0158] S500: Allocate multiple scanning devices for periodic communication in a time slot of at least one first broadcast cycle using a preset allocation method.
[0159] S510, in the first broadcast cycle, a first broadcast signal is sent so that multiple scanning devices respond to the first broadcast signal in their corresponding time slots.
[0160] S520: Obtain the response frequency, load, and priority of multiple scanning devices in multiple first broadcast cycles.
[0161] S530: The response frequency, load, and priority of each scanning device are combined into an input feature vector.
[0162] S540. Input the input feature vector of each scanning device into the long short-term memory model to obtain the response requirements of each scanning device.
[0163] S550: Substitute the response requirements, load, and priority of each scanning device into the time slot allocation function to obtain the target time slot for each scanning device.
[0164] S560: Assign multiple target time slots to the corresponding scanning devices.
[0165] S570, during the second broadcast cycle, a second broadcast signal is sent so that multiple scanning devices respond to the second broadcast signal in their corresponding time slots.
[0166] S580. In response to an abnormal response from the third scanning device among multiple scanning devices in the allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally.
[0167] In this embodiment, multiple scanning devices communicating periodically are allocated time slots in at least one first broadcast period using a preset allocation method, so that each scanning device has a corresponding time slot. In the first broadcast period, a first broadcast signal is sent, causing the multiple scanning devices to respond to the first broadcast signal in their corresponding time slots. The response frequency, load, and priority of the multiple scanning devices in the multiple first broadcast periods are obtained to obtain the response characteristics of the multiple scanning devices. The response frequency, load, and priority of each scanning device are formed into an input feature vector to avoid assigning to the wrong scanning device. The input feature vector of each scanning device is input into a Long Short-Term Memory (LSTM) model, and time series prediction is performed using the LSM model to obtain the response requirements of each scanning device. The response requirements, load, and priority of each scanning device are substituted into a time slot allocation function, and the time slot allocation function is solved to obtain the target time slot for each scanning device. Multiple target time slots are allocated to the corresponding scanning devices, so that each scanning device has a corresponding time slot. In the second broadcast period, a second broadcast signal is sent, causing the multiple scanning devices to respond to the second broadcast signal in their corresponding time slots. In response to an abnormal response from a third scanning device among multiple scanning devices in its allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally. Dynamically allocating time slots for scanning devices by utilizing response characteristics can meet the response requirements of different scanning devices and avoid abnormal responses, thereby improving the effectiveness of time slot allocation.
[0168] In one exemplary embodiment, a time slot allocation apparatus is provided for implementing the method described above. (Reference) Figure 5 As shown, the time slot allocation device may include an acquisition module 100, a determination module 150, an allocation module 200, and a transmission module 250. During the implementation of the above method,
[0169] The acquisition module 100 is configured to acquire response characteristics of a plurality of scanning devices in at least one first broadcast period.
[0170] The determination module 150 is configured to determine the time slot allocation method of the scanning devices based on the response characteristics of multiple scanning devices.
[0171] The allocation module 200 is configured to allocate time slots of multiple scanning devices in at least one second broadcast cycle in a time slot allocation manner.
[0172] The transmitting module 250 is configured to transmit a broadcast signal during the second broadcast period so that multiple scanning devices respond to the broadcast signal in their corresponding time slots.
[0173] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0174] Based on the response characteristics of multiple scanning devices, determine the response requirements of multiple scanning devices.
[0175] Based on the response requirements of multiple scanning devices, the target time slots for multiple scanning devices in at least one second broadcast cycle are determined.
[0176] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein the allocation module 200 is configured to:
[0177] Multiple target time slots are assigned to the corresponding scanning devices.
[0178] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0179] The response requirements of multiple scanning devices are determined based on their response frequency, load, and priority.
[0180] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0181] The response frequency, load, and priority of each scanning device are multiplied by the corresponding first coefficient to obtain multiple demand components for each scanning device.
[0182] The response requirements of each scanning device are obtained by summing the multiple demand components of each scanning device.
[0183] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0184] The response frequency, load, and priority of each scanning device are input into a preset model to obtain the response requirements of each scanning device. The preset model is used to perform time series analysis based on the response frequency, load, and priority to predict the response requirements.
[0185] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0186] Based on the response requirements and characteristics of multiple scanning devices, the target time slots of multiple scanning devices are determined.
[0187] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0188] Based on the preset relationships, the response requirements, load, and priority of each scanning device are processed to obtain the target time slot for each scanning device.
[0189] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein a determining module 150 is configured to:
[0190] If the difference between the response requirements of the first scanning device and the second scanning device among multiple scanning devices is less than a preset difference, the same time slots in two second broadcast cycles are respectively used as the target time slots of the first scanning device and the second scanning device, so as to share the same time slot in different second broadcast cycles.
[0191] In one exemplary embodiment, a time slot allocation apparatus is provided, wherein the allocation module 200 is configured to:
[0192] In response to an abnormal response from the third scanning device among multiple scanning devices in its allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally.
[0193] In one exemplary embodiment, an electronic device is provided, such as a mobile phone, a laptop computer, a tablet computer, and a wearable device.
[0194] refer to Figure 6As shown, the electronic device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.
[0195] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
[0196] Memory 404 is configured to store various types of data to support the operation of electronic device 400. Examples of this data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0197] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.
[0198] Multimedia component 408 includes a screen that provides an output interface between electronic device 400 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera module and / or a rear-facing camera module. When electronic device 400 is in an operating mode, such as shooting mode or video mode, the front-facing camera module and / or rear-facing camera module may receive external multimedia data. Each front-facing camera module and rear-facing camera module may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0199] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
[0200] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0201] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or a component of electronic device 400, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0202] Communication component 416 is configured to facilitate wired or wireless communication between electronic device 400 and other terminals. Electronic device 400 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0203] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods shown in the above embodiments or combinations thereof.
[0204] In one exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of an electronic device 400 to perform the methods shown in the embodiments or combinations thereof. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage terminal, etc. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the methods shown in the embodiments or combinations thereof.
[0205] In one exemplary embodiment, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the time slot allocation method as described above.
[0206] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0207] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0208] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0209] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0210] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A time slot allocation method, characterized in that, The time slot allocation method includes: Acquire response characteristics of multiple scanning devices during at least one first broadcast cycle; The time slot allocation method of the multiple scanning devices is determined based on the response characteristics of the multiple scanning devices; The time slot allocation method is used to allocate time slots for the plurality of scanning devices in at least one second broadcast cycle; During the second broadcast period, a broadcast signal is transmitted so that the plurality of scanning devices respond to the broadcast signal in the corresponding time slot.
2. The time slot allocation method according to claim 1, characterized in that, The step of determining the time slot allocation method for the multiple scanning devices based on their response characteristics includes: Based on the response characteristics of the plurality of scanning devices, the response requirements of the plurality of scanning devices are determined; Based on the response requirements of the plurality of scanning devices, the target time slot of the plurality of scanning devices in at least one second broadcast period is determined; The allocation of time slots for the plurality of scanning devices in at least one second broadcast period using the time slot allocation method includes: The multiple target time slots are allocated to the corresponding scanning devices.
3. The time slot allocation method according to claim 2, characterized in that, The step of determining the target time slot of the plurality of scanning devices in at least one second broadcast period based on the response requirements of the plurality of scanning devices includes: The target time slots of the multiple scanning devices are determined based on their response requirements and response characteristics.
4. The time slot allocation method according to claim 3, characterized in that, The response characteristics include load and priority; determining the target time slot of the plurality of scanning devices based on the response requirements and response characteristics of the plurality of scanning devices includes: Based on a preset relationship, the response requirements, load, and priority of each scanning device are processed to obtain the target time slot for each scanning device.
5. The time slot allocation method according to claim 2, characterized in that, The step of determining the target time slot of the plurality of scanning devices in at least one second broadcast period based on the response requirements of the plurality of scanning devices includes: If the difference between the response requests of the first scanning device and the second scanning device among the plurality of scanning devices is less than a preset difference, the same time slots within two second broadcast cycles are respectively used as the target time slots of the first scanning device and the second scanning device, so as to share the same time slot in different second broadcast cycles.
6. The time slot allocation method according to claim 5, characterized in that, The response characteristics include load; the load of both the first scanning device and the second scanning device is less than a preset load.
7. The time slot allocation method according to claim 5, characterized in that, The response features include priority; the priority of the first scanning device is higher than the priority of the second scanning device, and the second broadcast period in which the target time slot of the first scanning device is located is earlier than the second broadcast period in which the target time slot of the second scanning device is located.
8. The time slot allocation method according to claim 2, characterized in that, The response characteristics include response frequency, load, and priority; determining the response requirements of the multiple scanning devices based on the response characteristics of the multiple scanning devices includes: The response requirements of the plurality of scanning devices are determined based on their response frequency, load, and priority.
9. The time slot allocation method according to claim 8, characterized in that, Determining the response requirements of the plurality of scanning devices based on their response frequency, load, and priority includes: The response frequency, load, and priority of each scanning device are multiplied by their respective first coefficients to obtain multiple demand components for each scanning device; The response requirement of each scanning device is obtained by summing the plurality of requirement components of each scanning device.
10. The time slot allocation method according to claim 8, characterized in that, Determining the response requirements of the plurality of scanning devices based on their response frequency, load, and priority includes: The response frequency, load, and priority of each scanning device are input into a preset model to obtain the response requirement of each scanning device. The preset model is used to perform time series analysis based on the response frequency, load, and priority to predict the response requirement.
11. The time slot allocation method according to claim 10, characterized in that, The preset model is one of the following: long short-term memory model, decision tree model, and random forest model.
12. The time slot allocation method according to any one of claims 1 to 11, characterized in that, After allocating time slots for the plurality of scanning devices in at least one second broadcast period using the time slot allocation method, the time slot allocation method further includes: In response to an abnormal response from the third scanning device among the plurality of scanning devices in its allocated time slot, the time slot of the third scanning device is rolled back based on the number of times the third scanning device has responded abnormally.
13. The time slot allocation method according to claim 12, characterized in that, The more times the third scanning device responds to anomalies, the further the time slot of the rollback is from the start time slot of the second broadcast period.
14. A time slot allocation device, characterized in that, The time slot allocation device includes: An acquisition module is configured to acquire response features of a plurality of scanning devices in at least one first broadcast period; A determining module is configured to determine the time slot allocation method of the plurality of scanning devices based on the response characteristics of the plurality of scanning devices; An allocation module, configured to allocate time slots of the plurality of scanning devices in at least one second broadcast period in the time slot allocation method; A transmitting module is configured to transmit a broadcast signal during the second broadcast period, so that the plurality of scanning devices respond to the broadcast signal in the corresponding time slot.
15. The time slot allocation device according to claim 14, characterized in that, The determining module is configured to: Based on the response characteristics of the plurality of scanning devices, the response requirements of the plurality of scanning devices are determined; Based on the response requirements of the plurality of scanning devices, the target time slot of the plurality of scanning devices in at least one second broadcast period is determined; The allocation module is configured to: The multiple target time slots are allocated to the corresponding scanning devices.
16. The time slot allocation device according to claim 15, characterized in that, The determining module is configured to: If the difference between the response requests of the first scanning device and the second scanning device among the plurality of scanning devices is less than a preset difference, the same time slots within two second broadcast cycles are respectively used as the target time slots of the first scanning device and the second scanning device, so as to share the same time slot in different second broadcast cycles.
17. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the time slot allocation method as described in any one of claims 1 to 13.
18. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the time slot allocation method as described in any one of claims 1 to 13.
19. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the time slot allocation method as described in any one of claims 1 to 13.