Data processing method and device applied to embedded equipment

By analyzing the user operation data and device operation data of the embedded device, predicting its sleep or wake-up probability and determining the target execution time, intelligent control of the embedded device is achieved, and the energy consumption loss and user experience problems in the prior art are solved.

CN119829149APending Publication Date: 2025-04-15GUANGZHOU KETENG INFORMATION TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411905814.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, the sleep and wake-up operations of embedded devices mainly rely on the user's manual operation or timer settings, resulting in unnecessary energy consumption loss and affecting the user's operating experience.

Method used

By detecting the user operation data of the embedded device and the device operation data, the load coefficient is determined, and based on the pre-trained parameter prediction model, the device's sleep or wake-up probability within the prediction time is predicted, and the target execution time is determined, so as to realize intelligent sleep or wake-up control of the embedded device.

Benefits of technology

It reduces the energy consumption of embedded devices, improves user experience, and solves the problems of unnecessary energy consumption loss and operating experience impact caused by manual or timer control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829149A_ABST
    Figure CN119829149A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device applied to embedded equipment. According to the specific scheme, when it is detected that an equipment processing condition is met, user operation data and equipment operation data of the embedded equipment within a first preset duration are obtained; analyzing and processing the equipment operation data, and determining a load coefficient of the embedded equipment; when the load coefficient is within a first coefficient range, determining a sleep evaluation attribute and a wake-up evaluation attribute of the embedded device within a prediction duration based on the user operation data, the device operation data and a first parameter prediction model; and when the sleep evaluation attribute or the wake-up evaluation attribute meets a first preset attribute, determining a target execution moment based on the user operation data, the equipment operation data and a second parameter prediction model, so as to process the embedded equipment based on the target execution moment. According to the method and the device, automatic wakeup or dormancy processing of the embedded equipment is realized, the energy consumption of the embedded equipment is reduced, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data processing method and device applied to embedded devices. Background Art

[0002] Embedded device wakeup refers to the process in which an embedded device in energy-saving sleep mode can be quickly restored to normal operation by a specific event. Embedded device hibernation refers to the process in which an embedded device in normal operation enters a low-power sleep mode by triggering a specific event.

[0003] At present, the sleep and wake-up operations of embedded devices mainly rely on the user's manual operation or timer setting. For example, the timer setting can be to set a preset time period. If the device does not receive any user operation within the preset time period, it will automatically enter the sleep state. However, if the user's operation behavior is irregular, the embedded device will frequently enter the sleep or wake-up state, causing unnecessary energy loss. In addition, when the preset time period set by the timer is long, it will also cause unnecessary energy consumption and affect the user's operation experience. Summary of the invention

[0004] The present invention provides a data processing method and device applied to an embedded device, which realizes automatic awakening or sleep processing of the embedded device, reduces the energy consumption of the embedded device, and improves the user experience.

[0005] According to one aspect of the present invention, a data processing method for an embedded device is provided, which is applied to multiple embedded devices. The method comprises:

[0006] For an embedded device, when it is detected that a device processing condition is met, user operation data and device operation data of the embedded device within a first preset time period are obtained;

[0007] Determine the load factor of embedded equipment by analyzing and processing equipment operation data;

[0008] When the load coefficient is within the first coefficient range, based on the user operation data, the device operation data and the pre-trained first parameter prediction model, determine the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted duration;

[0009] When the sleep evaluation attribute or the wake evaluation attribute meets the first preset attribute, the target execution time corresponding to the sleep evaluation attribute or the wake evaluation attribute is determined based on the user operation data, the device operation data and the second parameter prediction model, so as to process the embedded device based on the target execution time.

[0010] According to another aspect of the present invention, there is provided a data processing device for an embedded device, which is applied to a plurality of embedded devices, and the device comprises:

[0011] A data acquisition module, for an embedded device, when it is detected that a device processing condition is met, to acquire user operation data and device operation data of the embedded device within a first preset time period;

[0012] A load factor determination module is used to determine the load factor of the embedded device by analyzing and processing the device operation data;

[0013] An evaluation attribute determination module, for determining, when the load coefficient is within a first coefficient range, a sleep evaluation attribute and a wake-up evaluation attribute corresponding to the embedded device within a predicted duration based on user operation data, device operation data, and a pre-trained first parameter prediction model;

[0014] The execution time determination module is used to determine the target execution time corresponding to the sleep evaluation attribute or the wake evaluation attribute based on user operation data, device operation data and a second parameter prediction model when the sleep evaluation attribute or the wake evaluation attribute meets the first preset attribute, so as to process the embedded device based on the target execution time.

[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the data processing method applied to an embedded device according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for enabling a processor to implement the data processing method for an embedded device according to any embodiment of the present invention when the computer instructions are executed.

[0020] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements a data processing method applied to an embedded device as described in any embodiment of the present invention.

[0021] The technical solution of the embodiment of the present invention provides data support for the subsequent awakening or sleep processing of the embedded device by acquiring the user operation data and device operation data of the embedded device within the first preset time when detecting that the embedded device meets the device processing condition. The load coefficient of the embedded device is determined by analyzing and processing the device operation data. The load condition of the current embedded device is determined by the load coefficient, so as to adjust the process of acquiring data according to the load condition to ensure the normal operation of the embedded device. When the load coefficient is within the range of the first coefficient, the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted time are determined according to the user operation data, the device operation data and the first parameter prediction model obtained by pre-training, so as to determine the probability of performing sleep or wake-up processing on the embedded device within the predicted time. When the sleep evaluation attribute or the wake-up evaluation attribute meets the first preset attribute, the target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute is determined according to the user operation data, the device operation data and the second parameter prediction model, so as to perform sleep or wake-up processing on the embedded device according to the target execution time. The present invention solves the problem of unnecessary energy loss and user operation experience affected by manual or timer control of the sleep or wake-up of embedded devices in the prior art. By predicting the time to wake up the embedded device or the time to put the embedded device to sleep through user operation data and device operation data, intelligent control of the sleep or wake-up of the embedded device is achieved, which reduces the energy consumption of the embedded device and improves the user experience.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 is a flow chart of a data processing method applied to an embedded device provided by an embodiment of the present invention;

[0025] Figure 2 is a flow chart of a data processing method applied to an embedded device provided by an embodiment of the present invention;

[0026] Figure 3 It is a structural schematic diagram of a data processing device applied to an embedded device provided by an embodiment of the present invention;

[0027] Figure 4 It is a structural schematic diagram of an electronic device for implementing the data processing method applied to an embedded device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 This is a flowchart of a data processing method applied to an embedded device provided by the first embodiment of the present invention. This embodiment can be used to predict the time to wake up the embedded device or the time to sleep the embedded device through user operation data and device operation data, so as to realize intelligent control of the sleep or wake-up of the embedded device. The method can be executed by a data processing device applied to the embedded device. The data processing device applied to the embedded device can be implemented in the form of hardware and / or software. The data processing device applied to the embedded device can be configured in electronic devices such as mobile phones, computers or servers. Figure 1 As shown, the method includes:

[0032] S110: For an embedded device, when it is detected that a device processing condition is met, user operation data and device operation data of the embedded device within a first preset time period are obtained.

[0033] Among them, embedded devices are composed of hardware and software and are devices that can operate independently. For example, common embedded devices can be smart home devices, smart meters, and embedded computers in power grid monitoring systems. In actual applications, while ensuring the efficient operation of embedded devices, energy consumption can be saved to the maximum extent, and embedded devices are usually put into sleep or wake-up mode. For example, for embedded computers in power grid monitoring systems, when the power grid is in a stable state and there is no abnormal data to be processed, they can enter sleep mode to reduce power consumption.

[0034] When the current embedded device is a device that can be dormant or awakened, it can be considered that the current embedded device meets the device processing conditions. It should be noted that in the power system, in order to ensure the stability of power transmission, there are usually some embedded devices that cannot be dormant or awakened. The first preset duration can be a pre-set time length for obtaining user operation data and device operation data. User operation data can be understood as data corresponding to the operation performed on the embedded device. For example, the user operation data may include the duration of the embedded device being operated by the user, the number of times the embedded device is manually awakened by the user, the number of times the embedded device is manually dormant by the user, etc. The device operation data can be understood as the corresponding operation data of the embedded device when processing the business. For example, the device operation data may include the maximum utilization rate of the central processing unit (CPU) of the embedded device, the average CPU utilization rate, the maximum memory occupancy rate, the remaining power, the device temperature data when the embedded device processes the business, etc. The user operation data and the device operation data can determine the subsequent dormancy or awakening time of the embedded device, so that the awakening or dormancy of the embedded device can be intelligently controlled according to the user's operating habits and operating conditions.

[0035] Specifically, for an embedded device, when it is detected that the current embedded device is a device that can be put to sleep or awakened, it is determined that the current embedded device meets the device processing conditions, and the user operation data and device operation data of the embedded device within a first preset time period are obtained to predict the time to wake up or put the embedded device to sleep based on the user operation data and device operation data of the embedded device.

[0036] In an embodiment of the present invention, a method for determining user operation data and device operation data may be: based on a preset collection cycle duration, data generated by an embedded device within a first preset duration is collected to obtain original data corresponding to each collection cycle; based on a collection order, the original data within each collection cycle is spliced ​​and processed in turn to obtain the data to be processed corresponding to the first preset duration; based on the data type, the data to be processed is classified and processed to obtain user operation data and device operation data; wherein, the user operation data includes at least one of operation duration, no operation duration, manual wake-up times, manual sleep times, scheduled wake-up times and scheduled sleep times, and the device operation data includes at least one of the maximum CPU usage rate, average CPU usage rate, maximum memory occupancy rate, average memory usage rate, remaining power and average temperature within the collection cycle.

[0037] Among them, the preset collection cycle duration can be understood as the collection cycle for collecting embedded device data. In order to ensure the accuracy of the subsequent prediction of the wake-up time or the sleep time, the first preset duration may include multiple preset collection cycle durations. For example, the first preset duration may be 10 minutes, and the preset collection cycle duration may be 1 minute, then the data corresponding to the embedded device may be collected 10 times within the first preset duration. The original data may be understood as the device operation data and user operation data of the embedded device collected within each preset collection cycle duration. The collection order may be understood as the collection sequence. The data sequence obtained by splicing the original data within multiple preset collection cycle durations in sequence according to the collection order may be used as the data to be processed. The data to be processed may be divided into device operation data and user operation data according to the data type. The data type is the type corresponding to the data to be processed.

[0038] The operation duration can be understood as the duration of time that the embedded device is operated by the user within the preset acquisition cycle duration. For example, the preset acquisition cycle duration is 1 minute, and the operation duration can be the duration of time that the embedded device is operated by the user within this minute. Correspondingly, the non-operation duration is the duration that the embedded device is not operated by the user within the preset acquisition cycle duration. That is, the sum of the operation duration and the non-operation duration is equal to the preset acquisition cycle duration. The number of manual wake-up times can be understood as the number of times the embedded device is manually adjusted from the sleep state to the normal operation state by the user. The number of manual sleep times can be understood as the number of times the embedded device is manually adjusted from the formal operation state to the sleep state by the user. The number of scheduled wake-up times can be understood as the number of times the embedded device is adjusted from the sleep state to the normal operation state by the preset timer. Correspondingly, the number of scheduled sleep times can be understood as the number of times the embedded device is adjusted from the formal operation state to the sleep state by the preset timer.

[0039] The maximum CPU usage can be understood as the maximum value reached by the CPU usage of the embedded device within the preset collection cycle. The maximum CPU usage reflects the maximum workload borne by the CPU within the preset collection cycle. The average CPU usage can be understood as the ratio between the actual CPU processing time and the preset collection cycle. The maximum memory occupancy can be understood as the ratio of the maximum memory occupied by a process to the total available memory within the preset collection cycle. The average memory usage can be understood as the average value of the ratio of the physical memory currently being used to the total available memory. The remaining power is the ratio of the available power of the embedded device to the total power within the current preset collection cycle. The average temperature can be understood as the average device temperature of the embedded device within the preset collection cycle.

[0040] Specifically, within the first preset duration, data generated by the embedded device within the first preset duration is collected according to the preset collection cycle duration to obtain the original data corresponding to each collection cycle. The original data of each collection cycle is spliced ​​and processed in sequence according to the collection order of the original data to obtain the data to be processed corresponding to the first preset duration. The data to be processed is classified and processed according to the data type to obtain the user operation data and device operation data corresponding to the embedded device, so as to predict the time when the embedded device is dormant or awakened according to the user operation data and the device operation data.

[0041] For example, the first preset duration is T1, and the preset collection cycle duration is t. If T1 is set to 10 minutes and t is 1 minute, then the raw data of the embedded device is collected once a minute within 10 minutes. The raw data corresponding to the 10 collection times are spliced ​​into the data to be processed according to the collection order. The data to be processed is divided into user operation data and device operation data according to the data type.

[0042] S120: Determine the load factor of the embedded device by analyzing and processing the device operation data.

[0043] The load factor can be used to characterize the current load condition of the embedded device. For example, when the embedded device is under high load, the load factor is relatively large. When the embedded device is under low load, the load factor is relatively small.

[0044] Specifically, each time the device operation data corresponding to the embedded device is collected based on the preset collection cycle duration, the device operation data can be analyzed and processed to determine the load coefficient corresponding to the current embedded device, so as to determine the subsequent processing method according to the load coefficient. For example, if the load coefficient is too large, it means that the current embedded device is under high load, and it is not suitable for collecting data again and predicting the subsequent wake-up or sleep time. If the load coefficient is moderate, the collection cycle duration of the collected data can be extended to reduce the frequency of data collection and reduce the load on the embedded device. If the load coefficient is small, the data of the embedded device can continue to be collected according to the normal preset collection cycle duration. It should be noted that the evaluation results of whether the load coefficient is too large, moderate or small can be determined according to the coefficient range corresponding to the preset load coefficient.

[0045] In an embodiment of the present invention, the load coefficient may be determined by: for each collection cycle, determining at least one coefficient to be adjusted corresponding to the collection cycle based on each data value in the device operation data within the collection cycle and the corresponding weight value; and obtaining the load coefficient of the embedded device by processing at least one coefficient to be adjusted within the collection cycle.

[0046] The weight value may be a weight coefficient value assigned to each device operation data according to actual needs. The weight values ​​corresponding to different types of device operation data may be the same or different. The coefficient to be adjusted may be a result obtained by multiplying the data value of the current device operation data and the weight value corresponding to the data value. The load factor may be a result obtained after processing the coefficients to be adjusted of multiple device operation data.

[0047] Specifically, when the device operation data includes at least one of the maximum CPU usage, average CPU usage, maximum memory occupancy, average memory usage, remaining power, and average temperature within the collection period, the coefficient to be adjusted corresponding to each device operation data is calculated according to the data value of each device operation data and the corresponding weight value. According to at least one coefficient to be adjusted corresponding to the current collection period, the load coefficient corresponding to the embedded device is determined to determine the load condition of the embedded device according to the load coefficient.

[0048] Optionally, when the device operation data includes the maximum CPU usage, the average CPU usage, the maximum memory usage, the average memory usage, the remaining power, and the average temperature, the load factor can be calculated by referring to the following formula:

[0049]

[0050] Among them, A max Indicates the maximum CPU usage, A avg Indicates the average CPU usage, Bmax Indicates the maximum memory usage, B avg represents the average memory usage, C represents the remaining power, and D represents the average temperature. w1 represents the weight value corresponding to the maximum CPU usage, w2 represents the weight value corresponding to the average CPU usage, w3 represents the weight value corresponding to the maximum memory usage, w4 represents the weight value corresponding to the average memory usage, w5 represents the weight value corresponding to the remaining power, and w6 represents the weight value corresponding to the device temperature, and w1+w2+w3+w4+w5+w6=1.

[0051] S130. When the load coefficient is within the first coefficient range, based on the user operation data, the device operation data and the pre-trained first parameter prediction model, determine the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted duration.

[0052] Among them, the first coefficient range can be a pre-set coefficient range for characterizing the load condition of the embedded device. When the load coefficient is within the first coefficient range, it means that the embedded device is under low load, and the original data can continue to be collected according to the preset collection cycle duration to obtain user operation data and device operation data. The first parameter prediction model can be a model for determining the sleep evaluation attributes and wake-up evaluation attributes of the embedded device within the predicted duration. The predicted duration can be a pre-set duration. For example, the predicted duration can be 5 minutes. The sleep evaluation attribute can be used to characterize the probability of the embedded device being awakened within the predicted duration. The wake-up evaluation attribute can be used to characterize the probability of the embedded device being dormant within the predicted duration.

[0053] Specifically, the load coefficient corresponding to the current collection cycle is determined according to the device operation data corresponding to the current collection cycle. When the load coefficient of the current collection cycle is within the first coefficient range, the data collection process of the next collection cycle is continued, and the load coefficient corresponding to the next collection cycle is calculated according to the device operation data corresponding to the next collection cycle, and the above process is repeated until the data within the first preset time length is collected. When the load coefficients corresponding to all collection cycles are within the first coefficient range, the user operation data and device operation data corresponding to all collection cycles are input into the pre-trained first parameter prediction model to obtain the sleep evaluation attributes and wake-up evaluation attributes corresponding to the embedded device within the predicted time length.

[0054] Optionally, before processing the user operation data and the device operation data based on the first parameter prediction model, the first parameter prediction model may be trained first. The specific method may be: obtaining multiple training samples, wherein the training samples include sample user operation data, sample device operation data, and theoretical wake-up evaluation attributes and theoretical sleep evaluation attributes corresponding to the sample user operation data and the sample device operation data. The training samples are input into the first parameter prediction model to be trained to obtain the actual sleep evaluation attributes and the actual wake-up evaluation attributes. The loss value is determined based on the first mean square error value between the theoretical wake-up evaluation attributes and the actual wake-up evaluation attributes, and the second mean square error value between the theoretical sleep evaluation attributes and the actual sleep evaluation attributes. The model parameters of the first parameter prediction model to be trained are corrected based on the loss value to obtain a trained first parameter prediction model.

[0055] Among them, the sample user operation data can be understood as the historical user operation data corresponding to the first preset time length in history. The sample device operation data can be the historical device operation data corresponding to the first preset time length in history. The theoretical wake-up evaluation attribute can be set according to the sample user operation data and the sample device operation data, and the probability of the embedded device being awakened within the predicted time length. The theoretical sleep evaluation attribute can be set according to the sample user operation data and the sample device operation data, and the probability of the embedded device being dormant within the predicted time length. The actual sleep evaluation attribute can be the sleep evaluation attribute actually output by the first parameter prediction model to be trained. The actual wake-up evaluation attribute can be the wake-up evaluation attribute actually output by the first parameter prediction model to be trained. The first mean square error value and the second mean square error value can be the error values ​​corresponding to the determination when the loss function is the mean square error function. The loss value can be understood as the sum of the first mean square error value and the second mean square error value.

[0056] Specifically, multiple training samples are obtained. Each training sample is input into the first parameter prediction model to be trained to obtain the corresponding actual sleep evaluation attribute and actual wake-up evaluation attribute. The loss function is used as the mean square error function, and the theoretical wake-up evaluation attribute and the actual wake-up evaluation attribute are subjected to loss processing to obtain a first mean square error value. And, the theoretical sleep evaluation attribute and the actual sleep evaluation attribute are subjected to loss processing to obtain a second mean square error value. The first mean square error value and the second mean square error value are summed to obtain a loss value. When the model parameters of the first parameter prediction model to be trained are corrected according to the loss value, the convergence of the loss function can be used as a training target, such as whether the training error is less than the preset error, or whether the error change tends to be stable, or whether the current number of iterations is equal to the preset number of iterations. If the convergence condition is detected to be reached, such as the training error of the loss function is less than the preset error, or the error change trend tends to be stable, it indicates that the training of the first parameter prediction model to be trained is completed, and the iterative training can be stopped at this time. If it is detected that the convergence condition is not reached at present, other training samples can be further obtained to continue training the first parameter prediction model to be trained until the training error of the loss function is within the preset range. When the training error of the loss function reaches convergence, the trained first parameter prediction model can be obtained. It should be noted that in the above training process, the weight parameters and bias parameters of the first parameter prediction model can also be reversely updated using the gradient descent algorithm and the chain rule.

[0057] Optionally, when the load coefficient is within the second coefficient range, the preset collection cycle duration within the first preset duration is increased to continue collecting user operation data and device operation data based on the updated preset collection cycle duration; when the load coefficient is within the third coefficient range, the step of processing the embedded device is stopped.

[0058] Among them, the second coefficient range can be a coefficient range corresponding to the load coefficient that is pre-set according to actual needs. When the load coefficient is in the second coefficient range, it means that the embedded device is under a medium load, and the preset collection cycle length can be increased. The updated preset collection cycle length can be the collection cycle length after the preset collection cycle length is increased. For example, the preset collection cycle length is 1 minute, and when the load coefficient is in the second coefficient range, the preset collection cycle length can be extended to 2 minutes. The third coefficient range can be a coefficient range corresponding to the load coefficient that is pre-set according to actual needs. When the load coefficient is in the third coefficient range, it means that the embedded device is under a high load. In order to ensure the normal operation of the embedded device, the collection of user operation data and device operation data for the next collection cycle can be stopped.

[0059] Specifically, when it is detected that the load coefficient corresponding to the device operation data of the current collection cycle is within the second coefficient range, the preset collection cycle duration within the first preset duration can be delayed to reduce the data collection frequency and obtain an updated preset collection cycle duration. The user operation data and device operation data continue to be collected according to the updated preset collection cycle duration. When it is detected that the load coefficient corresponding to the device operation data of the current collection cycle is within the third coefficient range, it means that the current embedded device is under high load, and the data collection of the embedded device and the subsequent prediction processing can be stopped.

[0060] Exemplarily, in combination with the above example, the first coefficient range is 0 to 0.50, the second coefficient range is 0.50 to 0.85, and the third coefficient range is 0.85 to 1.00 as an example for explanation. When the load coefficient is in the first coefficient range of 0 to 0.50, it means that the embedded device is in a low load situation, and the embedded device can continue to collect user operation data and device operation data of the next collection cycle according to the preset collection cycle duration t. When the load coefficient is in the second coefficient range of 0.50 to 0.85, it means that the embedded device is in a medium load situation, and the preset collection cycle duration t can be increased by 20%, and 1.2t is used as the updated preset collection cycle duration to continue to obtain user operation data and device operation data of the next collection cycle. When the load coefficient is in the third coefficient range of 0.85 to 1.00, it means that the embedded device is in a high load situation, and the data collection of the embedded device and the subsequent wake-up or sleep prediction processing are stopped to reduce the load of the embedded device.

[0061] Optionally, after increasing the preset collection cycle duration within the first preset time duration, the method also includes: determining the data mean under each indicator based on the user operation data and device operation data within the first preset time duration; for each updated preset collection cycle duration, dividing the updated preset collection cycle duration according to the preset collection cycle duration before the update, and obtaining at least two time slices corresponding to the preset collection cycle duration before the update; retaining the user operation data and device operation data of the first time slice in the updated preset collection cycle duration, and filling other time slices within the updated preset collection cycle duration with the data mean, so as to obtain the user operation data and device operation data corresponding to each time slice.

[0062] The data mean may be the data mean under each indicator calculated from the user operation data and device operation data corresponding to all collection cycles. For example, after extending the preset collection cycle, the average of the maximum CPU usage of all collection cycles may be processed to determine the data mean of the indicator of maximum CPU usage. The time slices corresponding to at least two preset collection cycle durations before the update may be understood as the time slices corresponding to the number of collections missing from the preset collection cycle duration after the update compared to the preset collection cycle duration before the update.

[0063] Specifically, when the load coefficient is within the range of the second coefficient, the preset collection cycle duration within the first preset duration is increased to obtain an updated preset collection cycle duration. After the preset collection cycle duration is updated, within the first preset duration, the number of times user operation data and device operation data are collected based on the updated preset collection cycle duration is lower than the number of times the preset collection cycle duration was collected before the update. The time slice corresponding to the number of collections that is missing from the updated preset collection cycle duration compared to the preset collection cycle duration before the update can be determined, that is, the time slices corresponding to at least two preset collection cycle durations before the update. In order to ensure the consistency of data input into the first parameter prediction model under different circumstances, the data collected by the updated preset collection cycle duration can be subjected to data mean filling processing.

[0064] According to the user operation data and device operation data within the first preset duration, the data mean corresponding to each indicator is determined. The user operation data and device operation data under the first time slice in the updated preset collection cycle duration are retained, and the time slices corresponding to at least two preset collection cycle durations before the update are filled with the data mean to obtain the user operation data and device operation data corresponding to each time slice.

[0065] Exemplarily, in combination with the above example, the preset acquisition cycle duration before the update is 1 minute, and the preset acquisition cycle duration after the update is 2 minutes as an example for explanation. If, according to the device operation data corresponding to the first acquisition cycle, it is determined that the load coefficient corresponding to the embedded device in the first acquisition cycle is within the second coefficient range of 0.50 to 0.85. Then the preset acquisition cycle duration can be extended to 2 minutes. If after the extension to 2 minutes, the load coefficient of the embedded device in the first preset duration in the subsequent acquisition cycle is within the first coefficient range of 0 to 0.50, then the number of collections of user operation data and device operation data collected according to the preset acquisition cycle duration extended to 2 minutes is 4 times, and the total number of collections is 5 times. However, for the preset acquisition cycle duration before the update, the number of collections of user operation data and device operation data can be collected is 10 times. It can be determined that the time slice corresponding to the missing number of collections of the preset acquisition cycle duration after the update is compared with the preset acquisition cycle duration before the update. For example, when the data collection of the third collection cycle is performed according to the preset collection cycle duration before the update. The updated preset collection cycle duration is collecting data for the second collection cycle. That is, the updated preset collection cycle duration lacks one data collection process. Then, for the updated preset collection cycle, one way may be: determine the data mean under each indicator according to the user operation data and device operation data corresponding to the first collection cycle and the user operation data and device operation data corresponding to the second collection cycle. Fill in the user operation data and device operation data corresponding to the missing collection times between the first collection cycle and the second collection cycle according to the data mean of each indicator by interpolation. Another way may be: determine the data mean under each indicator according to the user operation data and device operation data of all collection cycles, and fill in the data mean with all missing times corresponding to the updated preset collection cycle duration. It can be understood that the interpolation filling process can be performed according to the data mean of adjacent collection cycles, or the data filling process can be performed according to the data mean of all collection cycles, so as to obtain the user operation data and device operation data corresponding to 10 collections.

[0066] S140. When the sleep evaluation attribute or the wake evaluation attribute satisfies the first preset attribute, determine the target execution time corresponding to the sleep evaluation attribute or the wake evaluation attribute based on the user operation data, the device operation data and the second parameter prediction model, so as to process the embedded device based on the target execution time.

[0067] Among them, the first preset attribute can be a pre-set standard probability range corresponding to the sleep evaluation attribute or the wake-up evaluation attribute. For example, the first preset attribute can be 60% to 100%. When the sleep evaluation attribute is between 60% and 100%, it is considered that the embedded device will be asleep within the predicted duration. When the wake-up evaluation attribute is between 60% and 100%, it is considered that the embedded device will be awakened within the predicted duration. It should be noted that the embedded device may be both awakened and asleep within the predicted duration, and there is a situation where the sleep evaluation attribute and the wake-up evaluation attribute simultaneously meet the first preset attribute.

[0068] The second parameter prediction model may be a pre-trained model for determining the specific time when the embedded device is awakened or put to sleep. The target execution time may be the time when the embedded device is awakened or put to sleep within the predicted duration. It should be noted that when the embedded device is awakened or put to sleep based on the target execution time, it may be represented by the duration from the current time, so as to save storage space while avoiding complex time format conversion.

[0069] Specifically, when the sleep evaluation attribute is within the value range corresponding to the first preset attribute, or when the wake-up evaluation attribute is within the value range corresponding to the first preset attribute, or when both the sleep evaluation attribute and the wake-up evaluation attribute are within the value range corresponding to the first preset attribute, the user operation data and the device operation data are input into a pre-trained second parameter prediction model to determine the target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute, so as to process the embedded device based on the target execution time.

[0070] Optionally, when the sleep evaluation attribute is within the value range corresponding to the first preset attribute, or when the wake-up evaluation attribute is within the value range corresponding to the first preset attribute, or when both the sleep evaluation attribute and the wake-up evaluation attribute are within the value range corresponding to the first preset attribute, the user operation data and the device operation data are input into the pre-trained second parameter prediction model to obtain the target sleep evaluation attribute or target wake-up evaluation attribute corresponding to the embedded device at at least one moment within the prediction duration. When the target sleep evaluation attribute is within the value range corresponding to the second preset attribute, the moment corresponding to the target sleep evaluation attribute is used as the target execution moment when the embedded device is dormant, so as to perform sleep processing on the embedded device according to the target execution moment. Correspondingly, when the target wake-up evaluation attribute is within the value range corresponding to the second preset attribute, the moment corresponding to the target wake-up evaluation attribute is used as the target execution moment when the embedded device is awakened, so as to perform wake-up processing on the embedded device according to the target execution moment. Wherein, the second preset attribute can be a pre-set standard probability range corresponding to the target sleep evaluation attribute or the target wake-up evaluation attribute.

[0071] Optionally, before processing the user operation data and the device operation data based on the second parameter prediction model, the second parameter prediction model can also be trained first. The specific method can be: obtain multiple training samples, wherein the training samples include sample user operation data, sample device operation data, and theoretical target wake-up evaluation attributes and theoretical target sleep evaluation attributes at at least one sample moment within the sample prediction time. Input the training samples into the second parameter prediction model to be trained to obtain the actual target sleep evaluation attributes and the actual target wake-up evaluation attributes. According to the third mean square error value between the theoretical target wake-up evaluation attributes and the actual target wake-up evaluation attributes, and the fourth mean square error value between the theoretical target sleep evaluation attributes and the actual target sleep evaluation attributes, determine the loss value. According to the loss value, the model parameters of the second parameter prediction model to be trained are corrected to obtain a trained second parameter prediction model.

[0072] Among them, the sample user operation data can be understood as the historical user operation data corresponding to the first preset time period in history. The sample device operation data can be the historical device operation data corresponding to the first preset time period in history. The theoretical target wake-up evaluation attribute can be the probability of the embedded device being awakened at at least one sample moment set according to the sample user operation data and the sample device operation data. The theoretical target sleep evaluation attribute can be the probability of the embedded device being dormant at at least one sample moment set according to the sample user operation data and the sample device operation data. The actual target sleep evaluation attribute can be the sleep evaluation attribute actually output by the second parameter prediction model to be trained. The actual target wake-up evaluation attribute can be the wake-up evaluation attribute actually output by the second parameter prediction model to be trained. The third mean square error value and the fourth mean square error value can be the error values ​​correspondingly determined when the loss function is the mean square error function. The loss value can be understood as the sum of the third mean square error value and the fourth mean square error value.

[0073] Specifically, multiple training samples are obtained. Each training sample is input into the second parameter prediction model to be trained to obtain the corresponding actual target sleep evaluation attribute and the actual target wake-up evaluation attribute. Taking the loss function as the mean square error function, the theoretical target wake-up evaluation attribute and the actual target wake-up evaluation attribute are subjected to loss processing to obtain a third mean square error value. And, the theoretical target sleep evaluation attribute and the actual target sleep evaluation attribute are subjected to loss processing to obtain a fourth mean square error value. The third mean square error value and the fourth mean square error value are summed to obtain a loss value. When the model parameters of the second parameter prediction model to be trained are corrected according to the loss value, the convergence of the loss function can be used as a training target, such as whether the training error is less than the preset error, or whether the error change tends to be stable, or whether the current number of iterations is equal to the preset number of iterations. If the detection reaches the convergence condition, such as the training error of the loss function is less than the preset error, or the error change trend tends to be stable, it indicates that the training of the second parameter prediction model to be trained is completed, and the iterative training can be stopped at this time. If it is detected that the convergence condition is not reached at present, other training samples can be further obtained to continue training the second parameter prediction model to be trained until the training error of the loss function is within a preset range. When the training error of the loss function reaches convergence, the trained second parameter prediction model can be obtained. It should be noted that in the above training process, the weight parameters and bias parameters of the second parameter prediction model can also be reversely updated using the gradient descent algorithm and the chain rule.

[0074] Optionally, if an event corresponding to a sleep event or a wake-up event is detected between the current time and the target execution time, the embedded device is no longer processed at the target execution time.

[0075] The event that triggers the sleep event or the wake-up event may be an event in which a user manually controls the embedded device to wake up or sleep, or an event in which a timer is used to control the embedded device to wake up or sleep.

[0076] Specifically, if an event corresponding to a sleep event or a wake-up event is detected between the current time and the target execution time, the target execution time will no longer wake up or sleep the embedded device. It should be noted that when an event corresponding to a sleep event or a wake-up event is detected, the device operation data and user operation data of the embedded device can be recollected to re-determine the next target execution time, so as to wake up or sleep the embedded device based on the next target execution time.

[0077] For example, the target execution time may be 5 minutes from the current time, that is, the embedded device is awakened or put to sleep after 5 minutes. If it is detected that the user or the timer has awakened or put the embedded device to sleep within these 5 minutes, the embedded device is not awakened or put to sleep at the 5th minute from the current time.

[0078] The technical solution of this embodiment, by acquiring the user operation data and device operation data of the embedded device within the first preset duration when detecting that the embedded device meets the device processing condition, provides data support for the subsequent awakening or sleep processing of the embedded device. The load coefficient of the embedded device is determined by analyzing and processing the device operation data. The load condition of the current embedded device is determined by the load coefficient, so as to adjust the process of acquiring data according to the load condition to ensure the normal operation of the embedded device. When the load coefficient is within the range of the first coefficient, the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted duration are determined according to the user operation data, the device operation data and the first parameter prediction model obtained by pre-training, so as to determine the probability of performing sleep or wake-up processing on the embedded device within the predicted duration. When the sleep evaluation attribute or the wake-up evaluation attribute meets the first preset attribute, the target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute is determined according to the user operation data, the device operation data and the second parameter prediction model, so as to perform sleep or wake-up processing on the embedded device according to the target execution time. The present invention solves the problem of unnecessary energy loss and affecting the user operation experience caused by manual or timer control of the sleep or wake-up of embedded devices in the prior art. By predicting the time to wake up the embedded device or the time to put the embedded device to sleep through user operation data and device operation data, intelligent control of the sleep or wake-up of the embedded device is achieved, which reduces the energy consumption of the embedded device and improves the user experience.

[0079] Embodiment 2

[0080] Figure 2 1 is a flowchart of a data processing method applied to an embedded device provided by Embodiment 2 of the present invention. This embodiment is a preferred embodiment of the above embodiment. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 2 As shown, the method includes:

[0081] S210: For an embedded device, when it is detected that a device processing condition is met, user operation data and device operation data of the embedded device within a first preset time period are obtained.

[0082] S220: Determine the load factor of the embedded device by analyzing and processing the device operation data.

[0083] S230. When the load coefficient is within the first coefficient range, the user operation data and the device operation data are input into the first parameter prediction model, so as to extract a first feature sequence corresponding to the user operation data and the device operation data based on a first feature extraction model of the first parameter prediction model.

[0084] Among them, the first parameter prediction model includes a first feature extraction model, and a sleep evaluation classification model and a wake-up evaluation classification model respectively connected to the first feature extraction model. The first feature extraction model includes multiple hidden layers, and the number of the multiple hidden layers is consistent with the number of time slices obtained after the preset acquisition cycle duration is divided by the first preset duration. The time slice obtained after the first preset duration is divided can be a time slice obtained after the first preset duration is divided according to the preset acquisition cycle duration. For example, if the preset acquisition cycle duration is 1 minute and the first preset duration is 10 minutes, the number of time slices can be 10. The first feature extraction model is used to extract features from user operation data and device operation data. The first feature sequence can be understood as the output feature of the last hidden layer output of the first feature extraction model. The hidden layer is used to process the user operation data, device operation data and the output features of the previous hidden layer in the current acquisition cycle. Optionally, the hidden layer can be constructed based on a gated recurrent unit (GRU) or a long short-term memory recurrent neural network (LSTM).

[0085] Specifically, before inputting the user operation data and the device operation data into the first parameter prediction model, the user operation data and the device operation data may be preprocessed to obtain preprocessed data. The preprocessed data is input into the first feature extraction model of the first parameter prediction model, and the preprocessed data corresponding to each acquisition cycle is processed accordingly according to the multiple hidden layers of the first feature extraction model to obtain a first feature sequence. It should be noted that the first feature sequence is the output feature sequence determined by the last hidden layer of the first feature extraction model based on the user operation data, the device operation data in the current acquisition cycle and the output features of the previous hidden layer.

[0086] Exemplarily, in combination with the above example, the user operation data of each collection cycle includes six types: operation time, no operation time, manual wake-up times, manual sleep times, scheduled wake-up times and scheduled sleep times; the device operation data includes six types: maximum CPU usage, average CPU usage, maximum memory occupancy, average memory usage, remaining power and average temperature. The preset collection cycle duration is 1 minute, the first preset duration is 10 minutes, and the number of time slices obtained after dividing the preset collection cycle duration by the first preset duration is 10. This is explained as an example.

[0087] The device operation data and user operation data corresponding to each acquisition cycle are normalized by minimum-maximum normalization to obtain the sequence unit corresponding to the current acquisition cycle, that is, the preprocessed data. Each sequence unit can be represented by a vector with a dimension of 12. The sequence unit includes the normalized operation time, no operation time, manual wake-up times, manual sleep times, scheduled wake-up times, scheduled sleep times, CPU maximum usage, CPU average usage, memory maximum occupancy, memory average usage, remaining power and average temperature. The 10 sequence units corresponding to the 10 acquisition cycles are input into the corresponding hidden layer to obtain the features corresponding to each sequence unit. And the features of the current sequence unit are updated according to the output features corresponding to the previous sequence unit output by the previous hidden layer to obtain the output features corresponding to the current sequence unit. Based on the above process, the output features of the last hidden layer are used as the first feature sequence.

[0088] S240, input the first feature sequence into the sleep evaluation classification model of the first parameter prediction model to obtain the sleep evaluation attribute of the embedded device within the predicted duration, and input the first feature sequence into the wake-up evaluation classification model of the first parameter prediction model to obtain the wake-up evaluation attribute of the embedded device within the predicted duration.

[0089] The sleep evaluation classification model can be used to predict the probability of the embedded device being put into sleep mode within the predicted duration based on the first feature sequence. The wake-up evaluation classification model can be used to predict the probability of the embedded device being woken up within the predicted duration based on the first feature sequence. Optionally, the sleep evaluation classification model and the wake-up evaluation classification model can be classifiers based on a softmax activation function.

[0090] Specifically, the first feature sequence is input into the sleep evaluation classification model of the first parameter prediction model to obtain the sleep evaluation attribute of the embedded device within the prediction duration. Also, the first feature sequence is input into the wake-up evaluation classification model of the first parameter prediction model to obtain the wake-up evaluation attribute of the embedded device within the prediction duration, so as to determine whether it needs to be input into the second parameter prediction model in the future according to the sleep evaluation attribute and the wake-up evaluation attribute, so as to not perform the processing of the second parameter prediction model when the sleep evaluation attribute and the wake-up evaluation attribute do not meet the first preset attribute, thereby reducing unnecessary calculations and improving the response speed of the prediction processing.

[0091] It should be noted that if the activation functions of the sleep evaluation classification model and the wake-up evaluation classification model are modified to the sigmoid activation function, the sleep evaluation classification model can be used to determine whether the embedded device is in sleep within the predicted duration, and the wake-up evaluation classification model can be used to determine whether the embedded device is awake within the predicted duration.

[0092] S250: When the sleep evaluation attribute or the wake-up evaluation attribute is within the value range corresponding to the first preset attribute, the user operation data and the device operation data are input into a second feature extraction model in the second parameter prediction model to obtain a second feature sequence.

[0093] Among them, the second parameter prediction model includes a second feature extraction model and a moment prediction classification model. The second feature extraction model is used to extract a second feature sequence corresponding to the user operation data and the device operation data. The second feature extraction model includes multiple hidden layers, and the number of the multiple hidden layers is consistent with the number of time slices obtained after the preset acquisition cycle duration is divided by the first preset duration. The hidden layer is used to process the user operation data, the device operation data in the current acquisition cycle, and the output features of the previous hidden layer.

[0094] Specifically, when the sleep evaluation attribute is within the value range corresponding to the first preset attribute, or when the wake-up evaluation attribute is within the value range corresponding to the first preset attribute, or when both the sleep evaluation attribute and the wake-up evaluation attribute are within the value range corresponding to the first preset attribute, the user operation data and the device operation data are input into the second feature extraction model in the second parameter prediction model, and feature extraction processing is performed on the user operation data and the device operation data based on multiple hidden layers of the second feature extraction model to obtain a second feature sequence.

[0095] Exemplarily, in combination with the above example, 10 sequence units corresponding to 10 acquisition cycles are respectively input into the hidden layer corresponding to the second feature extraction model to obtain the features corresponding to each sequence unit. The features of the current sequence unit are updated according to the output features corresponding to the previous sequence unit output by the previous hidden layer to obtain the output features corresponding to the current sequence unit. Based on the above process, the output features of the last hidden layer are used as the second feature sequence.

[0096] Optionally, each hidden layer of the second feature extraction model may include at least one convolution module, at least one pooling module, and at least one feature concatenation module. When the hidden layer processes the sequence unit corresponding to each acquisition cycle, it can be expressed by the following formula:

[0097]

[0098] Among them, sigmoid represents the sigmoid activation function, cov 3×3 represents a convolution operation with a kernel size of 3×3 and a stride of 1. u represents the sequence unit of the u-th hidden layer input. represents the first weight parameter corresponding to the u-th hidden layer, represents the first bias parameter corresponding to the u-th hidden layer, represents the first intermediate feature of the u-th hidden layer.

[0099]

[0100] Among them, sigmoid represents the sigmoid activation function, Represents the second weight parameter corresponding to the u-th hidden layer, max_pool 3×3 Indicates a maximum pooling operation with a pooling window size of 3×3 and a stride of 1. represents the first intermediate feature of the u-th hidden layer, represents the third weight parameter corresponding to the u-th hidden layer, represents the second bias parameter corresponding to the u-th hidden layer, Represents the second intermediate feature of the u-th hidden layer.

[0101]

[0102] Among them, Swish represents the Swish activation function, represents the fourth weight parameter corresponding to the u-th hidden layer, represents the first intermediate feature of the u-th hidden layer, represents the second intermediate feature of the u-th hidden layer, Represents the third bias parameter corresponding to the u-th hidden layer, Vector u Represents the output features of the u-th hidden layer.

[0103] It should be noted that the weight parameters and bias parameters in the above second feature extraction model are all learnable hyperparameters. u is a 1×12 vector, It can be set to a vector of size 12×1, and the multiplication of the two can obtain a matrix of size 12×12. The first intermediate feature obtained after the 3×3 convolution operation is is a 10×10 matrix, where 10=(12-3) / 1+1. The second intermediate feature It can also be a 10×10 matrix, then the second intermediate feature After max_pool 3×3 After the operation, we get a matrix of size 8×8. It can be set to a 10×8 size matrix. Set to a matrix of size 8×10, It can be set to a vector of size 1×10, and the output feature Vector is calculated u A 1×10 vector.

[0104] S260. Input the second feature sequence into the moment prediction classification model of the second parameter prediction model to obtain a predicted value, wherein the predicted value is used to determine the target execution time.

[0105] The time prediction classification model can be used to determine the prediction value corresponding to waking up or sleeping the embedded device. The preset value can be used to determine the target execution time for waking up or sleeping the embedded device within the prediction duration.

[0106] Specifically, the second feature sequence is input into the moment prediction classification model of the second parameter prediction model to obtain a predicted value for waking up or sleeping the embedded device, so as to determine the target execution time for waking up or sleeping the embedded device according to the predicted value.

[0107] Exemplarily, the moment prediction classification model includes a moment wake-up classifier and a moment sleep classifier as an example for explanation. When the sleep evaluation attribute of the embedded device is within the value range corresponding to the first preset attribute, the second feature sequence is input into the moment sleep classifier of the moment prediction classification model to determine the predicted value corresponding to each moment in the predicted duration according to the moment sleep classifier, so as to determine the target execution time for performing sleep processing on the embedded device through the predicted value. When the wake-up evaluation attribute of the embedded device is within the value range corresponding to the first preset attribute, the second feature sequence is input into the moment wake-up classifier of the moment prediction classification model to determine the predicted value corresponding to each moment in the predicted duration according to the moment wake-up classifier, so as to determine the target execution time for performing wake-up processing on the embedded device through the predicted value.

[0108] When the wake-up evaluation attribute and the sleep evaluation attribute of the embedded device are both within the value range corresponding to the first preset attribute, the second feature sequence is input into the moment wake-up classifier of the moment prediction classification model to obtain the predicted value of the wake-up processing of the embedded device at each moment within the prediction duration, and the second feature sequence is input into the moment sleep classifier of the moment prediction classification model to obtain the predicted value of the sleep processing of the embedded device at each moment within the prediction duration, so as to determine the target execution time of waking up the embedded device through the predicted value corresponding to the wake-up processing, and determine the target execution time of the sleeping embedded device through the predicted value corresponding to the sleep processing.

[0109] S270: Determine a target execution time within the predicted duration according to the predicted value, so as to process the embedded device based on the target execution time.

[0110] Specifically, according to the predicted values ​​of the wake-up process for the embedded device at each moment within the predicted duration, the moment corresponding to the maximum predicted value is used as the target execution time, so that the embedded device is woken up at the target execution time. According to the predicted values ​​of the sleep process for the embedded device at each moment within the predicted duration, the moment corresponding to the maximum predicted value is used as the target execution time, so that the embedded device is sleep processed at the target execution time.

[0111] Optionally, after obtaining the target execution time, the method also includes: if the target execution time is determined when the sleep evaluation attribute satisfies a first preset attribute, then when it is detected that the current time is consistent with the target execution time, a sleep operation is performed on the embedded device; if the target execution time is determined when the wake-up evaluation attribute satisfies the first preset attribute, then when it is detected that the current time is consistent with the target execution time, a wake-up operation is performed on the embedded device.

[0112] Specifically, if the target execution time is determined when the sleep evaluation attribute satisfies the first preset attribute, then when it is detected that the current time is consistent with the target execution time, the sleep process is performed on the embedded device. Correspondingly, if the target execution time is determined when the wake-up evaluation attribute satisfies the first preset attribute, then when it is detected that the current time is consistent with the target execution time, the wake-up process is performed on the embedded device.

[0113] Optionally, if the target execution time is determined when both the wake-up evaluation attribute and the sleep evaluation attribute satisfy the first preset attribute, then when it is detected that the current time is consistent with the target execution time corresponding to the wake-up processing, a wake-up operation is performed on the embedded device; when it is detected that the current time is consistent with the target execution time corresponding to the sleep processing, a sleep operation is performed on the embedded device.

[0114] The technical solution of this embodiment, when it is detected that the embedded device meets the device processing condition, obtains the user operation data and device operation data of the embedded device within the first preset time length, so as to provide data support for the subsequent awakening or sleep processing of the embedded device. The load coefficient of the embedded device is determined by analyzing and processing the device operation data. The load condition of the current embedded device is determined by the load coefficient, so as to adjust the process of acquiring data according to the load condition to ensure the normal operation of the embedded device. When the load coefficient is within the first coefficient range, the user operation data and the device operation data are input into the first parameter prediction model, and the first feature sequence corresponding to the user operation data and the device operation data is extracted based on the first feature extraction model of the first parameter prediction model. The first feature sequence is input into the sleep evaluation classification model of the first parameter prediction model to obtain the sleep evaluation attribute of the embedded device within the predicted time length, and the first feature sequence is input into the wake-up evaluation classification model of the first parameter prediction model to obtain the wake-up evaluation attribute of the embedded device within the predicted time length, so as to determine the probability of performing sleep or wake-up processing on the embedded device within the predicted time length. When the sleep evaluation attribute or the wake-up evaluation attribute is within the value range corresponding to the first preset attribute, the user operation data and the device operation data are input into the second feature extraction model in the second parameter prediction model to obtain a second feature sequence. The second feature sequence is input into the moment prediction classification model of the second parameter prediction model to obtain a predicted value, wherein the predicted value is used to determine the target execution time. According to the predicted value, the target execution time within the predicted duration is determined to perform sleep or wake-up processing on the embedded device according to the target execution time. The present invention solves the problem of unnecessary energy loss and user operation experience affected by manual or timer control of the sleep or wake-up of embedded devices in the prior art. By predicting the time to wake up the embedded device or the time to sleep the embedded device through user operation data and device operation data, intelligent control of the sleep or wake-up of the embedded device is realized, the energy consumption of the embedded device is reduced, and the user experience is improved.

[0115] Embodiment 3

[0116] Figure 3 Schematic diagram of a data processing device for embedded devices provided by Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a data acquisition module 310, a load coefficient determination module 320, an evaluation attribute determination module 330 and an execution time determination module 340.

[0117] The data acquisition module 310 is used to acquire the user operation data and device operation data of the embedded device within a first preset time period when it is detected that the device processing conditions are met; the load coefficient determination module 320 is used to determine the load coefficient of the embedded device by analyzing and processing the device operation data; the evaluation attribute determination module 330 is used to determine the sleep evaluation attribute and wake-up evaluation attribute corresponding to the embedded device within the predicted time period based on the user operation data, the device operation data and the first parameter prediction model obtained by pre-training when the load coefficient is within the first coefficient range; the execution time determination module 340 is used to determine the target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute based on the user operation data, the device operation data and the second parameter prediction model when the sleep evaluation attribute or the wake-up evaluation attribute meets the first preset attribute, so as to process the embedded device based on the target execution time.

[0118] The technical solution of this embodiment, by acquiring the user operation data and device operation data of the embedded device within the first preset duration when detecting that the embedded device meets the device processing condition, provides data support for the subsequent awakening or sleep processing of the embedded device. The load coefficient of the embedded device is determined by analyzing and processing the device operation data. The load condition of the current embedded device is determined by the load coefficient, so as to adjust the process of acquiring data according to the load condition to ensure the normal operation of the embedded device. When the load coefficient is within the range of the first coefficient, the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted duration are determined according to the user operation data, the device operation data and the first parameter prediction model obtained by pre-training, so as to determine the probability of performing sleep or wake-up processing on the embedded device within the predicted duration. When the sleep evaluation attribute or the wake-up evaluation attribute meets the first preset attribute, the target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute is determined according to the user operation data, the device operation data and the second parameter prediction model, so as to perform sleep or wake-up processing on the embedded device according to the target execution time. The present invention solves the problem of unnecessary energy loss and affecting the user operation experience caused by manual or timer control of the sleep or wake-up of embedded devices in the prior art. By predicting the time to wake up the embedded device or the time to put the embedded device to sleep through user operation data and device operation data, intelligent control of the sleep or wake-up of the embedded device is achieved, which reduces the energy consumption of the embedded device and improves the user experience.

[0119] On the basis of the above embodiment, optionally, a data acquisition module is used to collect data generated by the embedded device within a first preset time period according to a preset collection cycle duration to obtain original data corresponding to each collection cycle; splicing and processing the original data in each collection cycle in turn according to the collection order to obtain the to-be-processed data corresponding to the first preset time period; classifying and processing the to-be-processed data according to the data type to obtain user operation data and device operation data; wherein the user operation data includes at least one of the operation time, the no-operation time, the number of manual wake-up times, the number of manual sleep times, the number of scheduled wake-up times and the number of scheduled sleep times, and the device operation data includes at least one of the maximum CPU usage rate, the average CPU usage rate, the maximum memory occupancy rate, the average memory usage rate, the remaining power and the average temperature within the collection cycle.

[0120] Optionally, a load coefficient determination module is used to determine, for each collection cycle, at least one coefficient to be adjusted corresponding to the collection cycle based on each data value and the corresponding weight value in the device operation data within the collection cycle; and obtain the load coefficient of the embedded device by processing at least one coefficient to be adjusted within the collection cycle.

[0121] Optionally, the device also includes: a data collection adjustment module, used to increase the preset collection cycle duration within the first preset duration when the load coefficient is within the second coefficient range, so as to continue to collect user operation data and equipment operation data based on the updated preset collection cycle duration; when the load coefficient is within the third coefficient range, stop executing the step of processing the embedded device.

[0122] Optionally, the device also includes: a data filling module, used to determine the data mean under each indicator based on the user operation data and device operation data within the first preset time period; for each updated preset collection cycle time, dividing the updated preset collection cycle time according to the preset collection cycle time before the update, and obtaining at least two time slices corresponding to the preset collection cycle time before the update; retaining the user operation data and device operation data of the first time slice in the updated preset collection cycle time, and filling other time slices within the updated preset collection cycle time with the data mean to obtain the user operation data and device operation data corresponding to each time slice.

[0123] Optionally, the first parameter prediction model includes a first feature extraction model, and a sleep evaluation classification model and a wake-up evaluation classification model respectively connected to the first feature extraction model, and an evaluation attribute determination module, which is used to input user operation data and device operation data into the first parameter prediction model to extract a first feature sequence corresponding to the user operation data and the device operation data based on the first feature extraction model; input the first feature sequence into the sleep evaluation classification model to obtain the sleep evaluation attributes of the embedded device within the predicted duration, and input the first feature sequence into the wake-up evaluation classification model to obtain the wake-up evaluation attributes of the embedded device within the predicted duration; wherein the first feature extraction model includes multiple hidden layers, the number of the multiple hidden layers is consistent with the number of time slices obtained after dividing the first preset duration by the preset acquisition cycle duration, and the hidden layer is used to process the user operation data, device operation data in the current acquisition cycle and the output features of the previous hidden layer.

[0124] Optionally, the second parameter prediction model includes a second feature extraction model and a moment prediction classification model, and an execution time determination module is used to input user operation data and device operation data into the second feature extraction model in the second parameter prediction model when the sleep evaluation attribute or the wake-up evaluation attribute is within the value range corresponding to the first preset attribute to obtain a second feature sequence; input the second feature sequence into the moment prediction classification model to obtain a predicted value; wherein the predicted value is used to determine the target execution time; and determine the target execution time within the predicted duration based on the predicted value.

[0125] Optionally, after obtaining the target execution time, the device also includes: a device processing module, which is used to perform a sleep operation on the embedded device when it is detected that the current time is consistent with the target execution time if the target execution time is determined when the sleep evaluation attribute satisfies the first preset attribute; if the target execution time is determined when the wake-up evaluation attribute satisfies the first preset attribute, then when it is detected that the current time is consistent with the target execution time, perform a wake-up operation on the embedded device.

[0126] Optionally, the apparatus further comprises: a stop processing module, configured to stop processing the embedded device at the target execution time if an event corresponding to a sleep event or a wake-up event is detected between the current time and the target execution time.

[0127] The data processing device applied to an embedded device provided in an embodiment of the present invention can execute the data processing method applied to an embedded device provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0128] Embodiment 4

[0129] Figure 4 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0130] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0131] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0132] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data processing method applied to an embedded device.

[0133] In some embodiments, the data processing method applied to the embedded device may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data processing method applied to the embedded device described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the data processing method applied to the embedded device in any other appropriate manner (e.g., by means of firmware).

[0134] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0135] The computer program for implementing the data processing method for embedded devices of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0136] Embodiment 5

[0137] Embodiment 5 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a data processing method applied to an embedded device, the method comprising:

[0138] For an embedded device, when it is detected that a device processing condition is met, user operation data and device operation data of the embedded device within a first preset time period are obtained; the load coefficient of the embedded device is determined by analyzing and processing the device operation data; when the load coefficient is within the first coefficient range, the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted time period are determined based on the user operation data, the device operation data and a first parameter prediction model obtained in advance by training; when the sleep evaluation attribute or the wake-up evaluation attribute meets the first preset attribute, the target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute is determined based on the user operation data, the device operation data and the second parameter prediction model, so as to process the embedded device based on the target execution time.

[0139] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0141] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0142] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0143] 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 the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0144] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data processing method applied to an embedded device, characterized in that: Applied to multiple embedded devices, the method includes: For the embedded device, when it is detected that the device processing condition is met, obtaining user operation data and device operation data of the embedded device within a first preset time period; Determining the load factor of the embedded device by analyzing and processing the running data of the device; When the load coefficient is within the first coefficient range, based on the user operation data, the device operation data and the pre-trained first parameter prediction model, determine the sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted duration; When the sleep evaluation attribute or the wake-up evaluation attribute satisfies a first preset attribute, a target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute is determined based on the user operation data, the device operation data and a second parameter prediction model, so as to process the embedded device based on the target execution time.

2. The method according to claim 1, characterized in that The obtaining of user operation data and device operation data of the embedded device within a first preset time period includes: Collecting data generated by the embedded device within a first preset time period according to a preset collection cycle time to obtain original data corresponding to each collection cycle; The raw data in each acquisition cycle are spliced ​​and processed in sequence according to the acquisition order to obtain the to-be-processed data corresponding to the first preset time length; Classify and process the data to be processed according to data types to obtain the user operation data and the device operation data; Among them, the user operation data includes at least one of the operation time, no operation time, manual wake-up times, manual sleep times, scheduled wake-up times and scheduled sleep times, and the device operation data includes at least one of the maximum CPU usage, average CPU usage, maximum memory occupancy, average memory usage, remaining power and average temperature during the collection period.

3. The method according to claim 2, characterized in that The step of determining the load factor of the embedded device by analyzing and processing the running data of the device includes: For each collection period, determining at least one coefficient to be adjusted corresponding to the collection period according to each data value in the device operation data in the collection period and a corresponding weight value; The load coefficient of the embedded device is obtained by processing at least one coefficient to be adjusted within the acquisition period.

4. The method according to claim 1, characterized in that: The method further comprises: When the load coefficient is within the second coefficient range, increasing the preset collection cycle duration within the first preset duration, so as to continue collecting the user operation data and the device operation data based on the updated preset collection cycle duration; When the load coefficient is within a third coefficient range, the step of processing the embedded device is stopped.

5. The method according to claim 4, characterized in that The user operation data and the device operation data are determined based on the updated preset collection cycle duration, and the method further includes: Determine a data mean value for each indicator based on the user operation data and the device operation data within the first preset time period; For each updated preset collection cycle duration, dividing the updated preset collection cycle duration according to the preset collection cycle duration before the update to obtain at least two time slices corresponding to the preset collection cycle duration before the update; The user operation data and device operation data of the first time slice in the updated preset collection cycle duration are retained, and the other time slices in the updated preset collection cycle duration are filled with the data mean to obtain the user operation data and device operation data corresponding to each time slice.

6. The method according to claim 1, characterized in that The first parameter prediction model includes a first feature extraction model, and a sleep evaluation classification model and a wake-up evaluation classification model respectively connected to the first feature extraction model. The sleep evaluation attribute and the wake-up evaluation attribute corresponding to the embedded device within the predicted duration are determined based on the user operation data, the device operation data and the pre-trained first parameter prediction model, including: Inputting the user operation data and the device operation data into the first parameter prediction model to extract a first feature sequence corresponding to the user operation data and the device operation data based on the first feature extraction model; Inputting the first feature sequence into the sleep assessment classification model to obtain the sleep assessment attribute of the embedded device within the predicted duration, and inputting the first feature sequence into the wakeup assessment classification model to obtain the wakeup assessment attribute of the embedded device within the predicted duration; Among them, the first feature extraction model includes multiple hidden layers, the number of the multiple hidden layers is consistent with the number of time slices obtained after dividing the first preset time length by the preset acquisition cycle length, and the hidden layer is used to process user operation data, device operation data in the current acquisition cycle and the output features of the previous hidden layer.

7. The method according to claim 1, characterized in that The second parameter prediction model includes a second feature extraction model and a moment prediction classification model, and when the sleep evaluation attribute or the wake-up evaluation attribute meets the first preset attribute, based on the user operation data, the device operation data and the second parameter prediction model, determining to execute a target execution time corresponding to the sleep evaluation attribute or the wake-up evaluation attribute, including: When the sleep evaluation attribute or the wake-up evaluation attribute is within the value range corresponding to the first preset attribute, inputting the user operation data and the device operation data into a second feature extraction model in the second parameter prediction model to obtain a second feature sequence; Inputting the second feature sequence into the time prediction classification model to obtain a predicted value; wherein the predicted value is used to determine the target execution time; According to the predicted value, a target execution time within the predicted duration is determined.

8. The method according to claim 1 or 7, characterized in that: After obtaining the target execution time, the method further includes: If the target execution time is determined when the sleep evaluation attribute satisfies the first preset attribute, then when it is detected that the current time is consistent with the target execution time, a sleep operation is performed on the embedded device; If the target execution time is determined when the wake-up evaluation attribute satisfies the first preset attribute, then when it is detected that the current time is consistent with the target execution time, a wake-up operation is performed on the embedded device.

9. The method according to claim 1, characterized in that: The method further comprises: If an event corresponding to a sleep event or a wake-up event is detected between the current time and the target execution time, the embedded device is no longer processed at the target execution time.

10. A data processing device applied to an embedded device, characterized in that: Used in multiple embedded devices, including: A data acquisition module, for acquiring user operation data and device operation data of the embedded device within a first preset time period when it is detected that a device processing condition is met; A load coefficient determination module, used to determine the load coefficient of the embedded device by analyzing and processing the device operation data; An evaluation attribute determination module, configured to determine, when the load coefficient is within a first coefficient range, a sleep evaluation attribute and a wake-up evaluation attribute corresponding to the embedded device within a predicted duration based on the user operation data, the device operation data, and a pre-trained first parameter prediction model; An execution time determination module is used to determine a target execution time corresponding to the sleep evaluation attribute or the wake evaluation attribute based on the user operation data, the device operation data and the second parameter prediction model when the sleep evaluation attribute or the wake evaluation attribute meets the first preset attribute, so as to process the embedded device based on the target execution time.

Citation Information

Cited By

  • Intelligent terminal power consumption optimization method based on active and passive identification

    CN121486943A