Instruction scheduling method of Internet of Things terminal and related equipment
By combining a prediction model with a long short-term memory network and an attention mechanism layer, the communication congestion problem caused by command floods in IoT systems is solved, achieving efficient scheduling of command issuance, reducing energy waste and improving the success rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- E SURFING IOT CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-15
AI Technical Summary
In high-density scenarios, the surge of commands in IoT systems can cause communication channel congestion, leading to command failures and energy waste. Existing systems are unable to effectively predict and mitigate network risks.
A predictive model combining a long short-term memory network and an attention mechanism layer is used to predict the probability of command surges by training the terminal's command time series, and the command issuance strategy is adjusted according to the probability to reduce command congestion and energy waste.
It enables accurate prediction of command surges, reduces congestion and energy waste during command issuance, and improves the success rate of command issuance.
Smart Images

Figure CN122053630A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to an instruction scheduling method and related equipment for an IoT terminal. Background Technology
[0002] In response to the call for energy conservation, IoT-based energy-saving systems have been widely deployed as a key energy-saving technology. However, in high-density scenarios such as high-density office areas and parking lots, the massive number of sensor events triggered during peak hours can instantly create a "command flood." The large volume of reporting and sending data leads to severe congestion on the limited MESH network communication channels, resulting in command failures and uncontrolled lighting status. This causes the energy-saving system to waste energy and exposes the fundamental flaws of existing control systems in being passive and lagging under high-concurrency environments. Current systems generally use a simple "timeout retry" mechanism, which cannot predict and mitigate network risks in advance, and may even exacerbate congestion due to indiscriminate retries. Summary of the Invention
[0003] The main objective of this application is to propose a method and related equipment for scheduling instructions for IoT terminals, aiming to reduce congestion and energy waste in issuing instructions and improve the success rate of instruction issuance.
[0004] To achieve the above objectives, one aspect of this application proposes an instruction scheduling method for an Internet of Things (IoT) terminal, the method comprising the following steps: Acquire the instruction time sequence of the terminal within a preset time period, the instruction time sequence including terminal-reported data, instruction-issued data and time information; The preset model is trained according to the instruction time series to obtain the flood peak prediction model; the preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer; The probability of an instruction flood occurring at the target time is predicted based on the flood peak prediction model, and the instruction issuance strategy is adjusted based on the probability of the instruction flood occurring.
[0005] In some embodiments, training a preset model based on the instruction time series to obtain a flood peak prediction model includes: The flood peak label is determined based on the magnitude of the instruction issuance success rate in the instruction time series and the preset issuance success rate threshold. The instruction time series is used as the input to the preset model. The parameters of the preset model are adjusted according to the output of the preset model and the flood peak label until the preset requirements are met, thus obtaining the flood peak prediction model.
[0006] In some embodiments, determining whether to adjust the instruction issuance strategy based on the probability of instruction flooding includes: If the probability of an instruction surge is greater than or equal to a preset probability, the corresponding instruction will be issued in advance or with priority.
[0007] In some embodiments, the method further includes: The time influence and event influence are determined based on the distribution pattern of the attention weights output by the attention mechanism layer. The scheduling scenario mode is determined based on the time impact and the event impact.
[0008] In some embodiments, the method further includes: Based on the attention weights between different time steps in the instruction time series and the key time point identification algorithm, the most influential time step is located; The date of a specific event is determined based on the most influential time step and the actual occurrence of the command surge.
[0009] In some embodiments, the method further includes: The confidence level is determined based on the distribution pattern of the attention weights output by the attention mechanism layer. If the confidence level is less than the preset confidence level, there is no need to adjust the instruction issuance strategy.
[0010] To achieve the above objectives, another aspect of this application provides an instruction scheduling device for an Internet of Things (IoT) terminal, the device comprising: The data acquisition module is used to acquire the instruction time sequence of the terminal within a preset time period. The instruction time sequence includes terminal-reported data, instruction-issued data, and time information. The training module is used to train a preset model according to the instruction time series to obtain a flood peak prediction model; the preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer; The prediction module is used to predict the probability of an instruction flood peak occurring at a target time based on the flood peak prediction model, and to determine whether to adjust the instruction issuance strategy based on the probability of the instruction flood peak occurring.
[0011] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the methods described above.
[0012] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0013] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the methods described above.
[0014] The embodiments of this application include at least the following beneficial effects: This application provides a method, apparatus, electronic device, storage medium, and program product for command scheduling of IoT terminals. This solution obtains the command time sequence of the terminal within a preset time period. The command time sequence includes terminal-reported data, command-issued data, and time information. A preset model is trained based on the command time sequence to obtain a peak prediction model. The preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer. The probability of command peaks occurring at a target time is predicted based on the peak prediction model. Whether to adjust the command issuance strategy is determined based on the probability of command peaks occurring. Based on the command time sequence within the preset time period, and by combining the long short-term memory network layer and the attention mechanism layer to focus on salient features, the command peaks are accurately predicted. The command issuance strategy is adjusted based on the prediction results, thereby reducing congestion and energy waste in command issuance and improving the command issuance success rate. Attached Figure Description
[0015] Figure 1 This is a flowchart of the instruction scheduling method for an IoT terminal provided in the embodiments of this application; Figure 2 This is a schematic diagram of the flood peak prediction model provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the Long Short-Term Memory network layer provided in the embodiments of this application; Figure 4 This is a distribution diagram of parking lot lighting provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of the instruction scheduling device for the Internet of Things terminal provided in the embodiments of this application; Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0017] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0018] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0020] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0021] Command surge: refers to a congestion state in which, within a specific time window, the number of commands to be reported and issued in an IoT system suddenly far exceeds the normal processing capacity of the communication channel due to external events (such as rush hour), resulting in command queuing, delays, and even a large number of lost commands. In this embodiment of the invention, it specifically refers to the phenomenon of a surge in concurrent command data caused by personnel activities, system events, etc., in a smart energy-saving scenario.
[0022] Long Short-Term Memory (LSTM) is a type of recurrent neural network designed to address the long-term dependency problem encountered by recurrent neural networks when processing long sequences of data. By introducing cleverly designed "gate" structures and "cell states," LSTM can selectively remember or forget information, allowing information to flow stably in long sequences, thereby effectively capturing long-term dependencies.
[0023] The instruction scheduling method for IoT terminals provided in this application relates to the field of information technology. This instruction scheduling method for IoT terminals can be applied to terminals, servers, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the instruction scheduling method for IoT terminals, but is not limited to the above forms.
[0024] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0025] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0026] Figure 1This is an optional flowchart of an instruction scheduling method for an IoT terminal provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S103.
[0027] Step S101: Obtain the instruction time sequence of the terminal within a preset time period. The instruction time sequence includes terminal reported data, instruction issued data, and time information. Step S102: Train the preset model according to the instruction time series to obtain the flood peak prediction model; the preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer; Step S103: Predict the probability of the command flood at the target time based on the flood peak prediction model, and determine whether to adjust the command issuance strategy based on the probability of the command flood.
[0028] Command time series are obtained from historical communication data of network device clusters. These time series are then preprocessed or standardized to generate a dataset, ensuring data consistency. Historical command data includes command reporting data from multiple time points, command issuance data (such as the number of commands issued), and time information (such as specific dates and days of the week). It should be noted that when using historical command data as a training set, it should ideally include command information from a certain number of time points, such as weekdays, holidays, and days with severe weather, to ensure predictive accuracy.
[0029] Based on historical data, a command surge prediction method is trained using historical IoT command data. This method combines a long short-term memory neural network with an attention mechanism to create a joint model based on historical database data and current command data, which predicts command surges. The command issuance strategy is adjusted based on the model's prediction results to determine whether commands need to be issued earlier or later.
[0030] The input data is updated on a rolling basis according to the set expected cycle, and the time window is... Beginning, until Historical data is used. As time t changes, predicted data is replaced by experimental data, the time window slides forward, and it is updated with actual command data for the time period. Based on this, training and prediction are performed using new historical and actual data. Based on changes in results and the environment, the system is continuously optimized by continuously collecting new command scheduling data and periodically updating model parameters.
[0031] See Figure 2The pre-defined model consists of an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer connected in sequence. The instruction time series serves as the input to the input layer. The sequence input layer includes batch size, feature dimension, and time step. The feature dimension includes reported data features, distributed data features, and event features. The time step defines the model window length.
[0032] In each forecast time window The input sequence of the model is .in, arrive It is historical data, used to allow preset models to capture background patterns and trends; This is the latest reported real-time data, representing the current state of the system. In this way, the model achieves forward-looking predictions based on historical patterns and combined with real-time status.
[0033] The LSTM layer is used to learn the long-term correlation between time steps of time series data. The LSTM layer contains multiple LSTM units, which are constructed for time features, instruction features and event features respectively. An LSTM unit consists of multiple storage units, and each storage unit contains three gating mechanisms: forget gate, input gate and output gate.
[0034] See Figure 3 The learnable weights of an LSTM layer include the input weights W, the recurrent weights R, and the bias b; the LSTM layer constructs a concatenation matrix according to the following equation:
[0035] in, These represent the input gate, forget gate, candidate memory unit, and output gate, respectively; the memory unit state c and the hidden unit state h at time t are given by the following equations:
[0036] in, Represents the product of matrices. This represents the hyperbolic tangent activation function; the hidden unit state h contains the output of the LSTM layer at that time step; and the corresponding input gate... Forgotten Gate Candidate memory units and output gate The calculation is given by the following formula:
[0037] This represents the GELU activation function, which is used to enhance the expressive power of the gating mechanism, solve the gradient vanishing problem that occurs with the traditional Sigmoid function, and is used to extract long-term dependencies in instruction time series. This indicates that the state from the previous moment is concatenated with the current input. Wherein, The input at time t, i.e., the instruction data occurring at time t; through time The corresponding memory cell state and hidden cell state correspond to the historical input data. The operation yields the corresponding output. Input data for the prediction of the next time step.
[0038] Multi-dimensional feature extraction is performed on existing historical datasets to obtain time-series feature matrices and contextual feature matrices. This includes: extracting computing device activity features within a time period from standardized datasets, such as the number of command reports and command issuance success rate within a time window; and identifying system event features, such as the day of the week. Command reporting and issuance time series are often correlated with discrete categorical features such as event features. To better capture local and global correlation features, an embedding layer is used for categorical feature data. This is mapped to a dense vector representation to better capture the relationships between features. Specifically, for discrete features mined from data mining, such as the day of the week, this is done by... The layers are then transformed into continuous vectors of fixed dimensions using matrices:
[0039]
[0040] in, For discrete events, This corresponds to a vector. Through linear projection, the embedding layer, and LSTM network training, the model can automatically learn distributed representations of features from different categories, enhancing its understanding of complex feature interactions. This output tensor serves as the input to the LSTM for further processing.
[0041] Building upon LSTM temporal modeling, a multi-head dot product attention mechanism is introduced at the attention layer to model the importance relationships between features. This mechanism dynamically identifies key factors affecting instruction scheduling by calculating attention weights across different time steps and feature dimensions.
[0042] The attention mechanism layer first performs a linear projection on the feature matrix output by the LSTM to generate the query matrix Q, the key matrix K, and the value matrix V:
[0043]
[0044]
[0045] This multi-head attention mechanism design enables the model to simultaneously focus on different types of feature interaction patterns, identify the cause when instructions are issued intensively, and significantly improve the effect of feature fusion.
[0046]
[0047] The transpose of the key matrix. express and Similarity matrix of matrices Using the scaling factor, the energy fraction can be obtained through calculation. .
[0048] The energy score is input into the softmax function to normalize it, which is then converted into an attention weight distribution. A weighted sum of the value vectors based on these attention weights generates a contextual attention model that incorporates global information.
[0049] To enhance the model's expressive power, the obtained Attention model will undergo feature concatenation, enabling instruction issuance decisions to have feature relationships captured from different subspaces. This allows instruction peak decisions to be based on interaction patterns of different feature types, improving the degree of feature fusion.
[0050] in, This indicates the output of the attention head. This indicates the output linear transformation matrix.
[0051] Combining the LSTM-attention model, a fully connected layer is used to perform a nonlinear transformation on the high-dimensional feature representation output by the multi-head attention module. Finally, the representation is mapped to a single feature representation through an output layer with a sigmoid activation function. The probability value is used to generate a prediction of the next instruction peak in the next time period.
[0052]
[0053] in, This indicates the peak prediction result of the instruction order. This indicates the output linear transformation matrix. To produce a high-dimensional feature matrix output that integrates historical and current uplink and downlink communication modes, This indicates the bias term.
[0054] according to The result involves selecting the command issuance mode, choosing the corresponding command issuance mode under different probabilities. The higher the value, the greater the likelihood of a surge in commands. In such cases, commands can be issued in advance or prioritized for issuance, depending on the situation.
[0055] In some embodiments, a preset model is trained based on the instruction time series to obtain a flood peak prediction model, including: Step S201: Determine the flood peak label based on the magnitude of the instruction issuance success rate in the instruction time series and the preset issuance success rate threshold; Step S202: Use the instruction time series as input to the preset model, adjust the parameters of the preset model according to the output of the preset model and the flood peak label until the preset requirements are met, and obtain the flood peak prediction model.
[0056] Depending on the scenario, the criteria for judging command peaks vary. This embodiment uses the command issuance success rate within a specific time window as the core indicator. When this success rate is lower than a dynamically preset success rate threshold determined based on historical data (e.g., a certain percentage of historical quantiles), the time period is labeled as a "peak" and used as the target for model training. The command time series is used as the input to the preset model. The parameters of the preset model are adjusted based on the difference between the output of the preset model and the peak label until the preset requirements are met. If the predicted output reaches the preset accuracy, training stops, and the peak prediction model is obtained.
[0057] In some embodiments, determining whether to adjust the instruction issuance strategy based on the probability of instruction flooding includes: Step S301: If the probability of an instruction surge is greater than or equal to the preset probability, issue the corresponding instruction in advance or with priority.
[0058] If the probability of an instruction surge is greater than or equal to a preset probability, it indicates a high likelihood of an instruction surge. In this case, the corresponding instructions should be issued earlier or prioritized to reduce instruction congestion. Alternatively, instruction issuance can be delayed to reduce congestion.
[0059] In some embodiments, the instruction scheduling method for the IoT terminal further includes: Step S401: Determine the time influence and event influence based on the distribution pattern of the attention weights output by the attention mechanism layer; Step S402: Determine the scheduling scenario mode based on the time impact and event impact.
[0060] Based on the attention weights obtained, a feature impact analysis module is used to identify key scheduling factors. This module quantifies the influence of different features on instruction scheduling by statistically analyzing the distribution patterns of attention weights, specifically calculating the impact of the following two features: temporal impact. Impact of the event: .
[0061] Based on these impact indicators, the system identifies typical scheduling scenario patterns. For example, when the time impact is high, it is identified as the commuting peak mode; when the event impact is significant, it is identified as the holiday peak mode.
[0062] In some embodiments, the instruction scheduling method for the IoT terminal further includes: Step S501: Locate the most influential time step based on the attention weights between different time steps in the instruction time series and the key time point identification algorithm; Step S502: Determine the date of a specific event based on the most influential time step and the actual occurrence of the command surge.
[0063] After obtaining data over a certain time span, the most influential time step is located using a key time point identification algorithm. :
[0064] in, Indicates at time step Time step Attention weights argmax This represents the time step with the highest sum of attention weights. Combining the results, we can identify events that cause peak instruction volumes, such as holidays, company events, and release dates. This fine-grained attention analysis can provide deep contextual understanding support for subsequent scheduling decisions.
[0065] In some embodiments, the instruction scheduling method for the IoT terminal further includes: Step S601: Determine the confidence level based on the distribution pattern of the attention weights output by the attention mechanism layer; In step S602, if the confidence level is less than the preset confidence level, there is no need to adjust the instruction issuance strategy.
[0066] Because the actual issuance of commands is affected by nonlinear factors, command surges that the LSTM model may not be able to fit may still occur in the prediction, such as sudden meetings or peak periods delayed due to extreme weather. To improve the reliability of scheduling decisions and avoid erroneous judgments in the event of unforeseen circumstances, a confidence assessment module is introduced. This module calculates the prediction confidence based on the distribution characteristics of attention weights and the stability of the model output, quantifying the uncertainty level of the scheduling decision. Confidence Score Confidence Calculated using the following formula:
[0067] in, The information entropy of attention weights, For adjustment coefficients, logN This represents the maximum possible entropy.
[0068] The decision-making mechanism is dynamically adjusted based on the confidence level: for example, when the confidence level is ≥0.3, full feature prediction based on LSTM and multi-head attention is adopted; when the confidence level is <0.3, the early or delayed instruction issuance plan in the subsequent time window is canceled and normal issuance is changed, and manual review is reminded. This hierarchical decision-making mechanism significantly improves the robustness of the system while ensuring the scheduling effect.
[0069] The following section uses a parking lot lighting system as an example to provide a detailed description and explanation of the solution in this embodiment of the invention. The parking lot's lighting fixtures have been modified and connected to a smart lighting system platform.
[0070] See Figure 4 The parking lot has multiple light fixtures, and the lights in the same fixture all turn on and off simultaneously, which can be considered as one light fixture. After a period of trial operation, the lighting system used the algorithm of this embodiment of the invention to mine the historical data of the induction triggers and found that the trigger frequency of some light fixtures was much higher than that of other light fixtures. During the commuting peak hours, there was a surge in commands, and command loss was common.
[0071] Using the method in this embodiment, it was found that high-frequency triggering lights are lights located near the upper and lower floors of the garage, such as groups of 3 or n. Combining this with data such as the success rate of data reporting and sending from the parking lot terminal over a period of time, a command flood standard was defined.
[0072] The system trains a pre-defined model based on historical data to generate a garage command peak prediction model. Peak labels and confidence thresholds are set according to garage conditions, and testing is prepared. During the testing phase, garage light trigger data is preprocessed according to the aforementioned process, and rolling input data is initiated to obtain the peak probability prediction result and confidence level for the next time period. Based on the model prediction results, the system issues commands to some lights earlier or later, effectively reducing channel congestion and avoiding command peaks.
[0073] Please see Figure 5 This application also provides an instruction scheduling device for an Internet of Things (IoT) terminal, which can implement the above-described method. The device includes: The data acquisition module is used to acquire the instruction time sequence of the terminal within a preset time period. The instruction time sequence includes terminal-reported data, instruction-issued data, and time information. The training module is used to train the preset model according to the instruction time series to obtain the flood peak prediction model; the preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer; The prediction module is used to predict the probability of a command flood peak occurring at the target time based on the flood peak prediction model, and to determine whether to adjust the command issuance strategy based on the probability of the command flood peak occurring.
[0074] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0075] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0076] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0077] Please see Figure 6 , Figure 6 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 602 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called and executed by the processor 601 using the methods described in the embodiments of this application. The input / output interface 603 is used to implement information input and output; The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601, memory 602, input / output interface 603, and communication interface 604 are connected to each other within the device via bus 605.
[0078] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0079] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0080] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0081] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0082] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0083] The embodiments of this application include at least the following beneficial effects: This application provides a method, apparatus, electronic device, storage medium, and program product for command scheduling of IoT terminals. This solution obtains the command time sequence of the terminal within a preset time period. The command time sequence includes terminal-reported data, command-issued data, and time information. A preset model is trained based on the command time sequence to obtain a peak prediction model. The preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer. The probability of command peaks occurring at a target time is predicted based on the peak prediction model. Whether to adjust the command issuance strategy is determined based on the probability of command peaks occurring. Based on the command time sequence within the preset time period, and by combining the long short-term memory network layer and the attention mechanism layer to focus on salient features, the command peaks are accurately predicted. The command issuance strategy is adjusted based on the prediction results, thereby reducing congestion and energy waste in command issuance and improving the command issuance success rate.
[0084] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0085] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0086] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0088] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0089] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0090] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0091] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0092] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0093] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0094] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for scheduling instructions for an Internet of Things (IoT) terminal, characterized in that, The method includes the following steps: Acquire the instruction time sequence of the terminal within a preset time period, wherein the instruction time sequence includes terminal-reported data, instruction-issued data, and time information; The preset model is trained according to the instruction time series to obtain the flood peak prediction model; the preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer; The probability of an instruction flood occurring at the target time is predicted based on the flood peak prediction model, and the instruction issuance strategy is adjusted based on the probability of the instruction flood occurring.
2. The method according to claim 1, characterized in that, The step of training a preset model based on the instruction time series to obtain a flood peak prediction model includes: The flood peak label is determined based on the magnitude of the instruction issuance success rate in the instruction time series and the preset issuance success rate threshold. The instruction time series is used as the input to the preset model. The parameters of the preset model are adjusted according to the output of the preset model and the flood peak label until the preset requirements are met, thus obtaining the flood peak prediction model.
3. The method according to claim 1, characterized in that, The step of determining whether to adjust the instruction issuance strategy based on the probability of instruction flooding includes: If the probability of an instruction surge is greater than or equal to a preset probability, the corresponding instruction will be issued in advance or with priority.
4. The method according to claim 1, characterized in that, The method further includes: The time influence and event influence are determined based on the distribution pattern of the attention weights output by the attention mechanism layer. The scheduling scenario mode is determined based on the time impact and the event impact.
5. The method according to claim 1, characterized in that, The method further includes: Based on the attention weights between different time steps in the instruction time series and the key time point identification algorithm, the most influential time step is located; The date of a specific event is determined based on the most influential time step and the actual occurrence of the command surge.
6. The method according to claim 1, characterized in that, The method further includes: The confidence level is determined based on the distribution pattern of the attention weights output by the attention mechanism layer. If the confidence level is less than the preset confidence level, there is no need to adjust the instruction issuance strategy.
7. A command scheduling device for an Internet of Things (IoT) terminal, characterized in that, The device includes: The data acquisition module is used to acquire the instruction time sequence of the terminal within a preset time period. The instruction time sequence includes terminal-reported data, instruction-issued data, and time information. The training module is used to train a preset model according to the instruction time series to obtain a flood peak prediction model; the preset model includes an input layer, a long short-term memory network layer, an attention mechanism layer, and a fully connected layer; The prediction module is used to predict the probability of an instruction flood peak occurring at a target time based on the flood peak prediction model, and to determine whether to adjust the instruction issuance strategy based on the probability of the instruction flood peak occurring.
8. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of claims 1-6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.