CN111465087B - Task scheduling processing method, device, storage medium, processor and system - Google Patents

Task scheduling processing method, device, storage medium, processor and system Download PDF

Info

Publication number
CN111465087B
CN111465087B CN202010247657.3A CN202010247657A CN111465087B CN 111465087 B CN111465087 B CN 111465087B CN 202010247657 A CN202010247657 A CN 202010247657A CN 111465087 B CN111465087 B CN 111465087B
Authority
CN
China
Prior art keywords
task
tasks
wake
time
partial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010247657.3A
Other languages
Chinese (zh)
Other versions
CN111465087A (en
Inventor
杨海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Mxchip Information Technology Co Ltd
Original Assignee
Shanghai Mxchip Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Mxchip Information Technology Co Ltd filed Critical Shanghai Mxchip Information Technology Co Ltd
Priority to CN202010247657.3A priority Critical patent/CN111465087B/en
Publication of CN111465087A publication Critical patent/CN111465087A/en
Application granted granted Critical
Publication of CN111465087B publication Critical patent/CN111465087B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave using a pre-established activity schedule, e.g. traffic indication frame
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a task scheduling processing method, a device, a storage medium, a processor and a system. The method comprises the following steps: monitoring a beacon frame sent by an access point according to a preset period, wherein the preset period is determined by initial wake-up time of a first part of tasks, and each task in the first part of tasks is a wake-up task capable of being delayed; under the triggering of a beacon frame, switching from a dormant state to an awake state; a first portion of the tasks are scheduled and executed in the awake state. The invention solves the technical problem that the scheduler provided in the related technology can not dynamically control the sleep time according to the system requirement, so that the resource waste can be generated in many cases.

Description

Task scheduling processing method, device, storage medium, processor and system
Technical Field
The present invention relates to the field of communications, and in particular, to a task scheduling processing method, device, storage medium, processor and system.
Background
The real-time operating system (RTOS) is an operating system which can receive and rapidly process external events or data, and the processing result can control the production process or rapidly respond to the processing system within a specified time, schedule all available resources to complete real-time tasks and control all real-time tasks to operate in a coordinated and consistent manner.
The scheduler of the RTOS is responsible for the scheduling of tasks. The most important scheduling objectives of RTOS are: the real-time requirement of the system is met. Currently, most RTOSs support two popular scheduling algorithms, namely priority-based preemption scheduling algorithms and time-rotation scheduling algorithms, with priority-based preemption scheduling algorithms being more common. The priorities can be further divided into static priorities and dynamic priorities. This type of scheduling runs at any time the task that is the highest priority task of the total ready tasks. Tasks are given priority at creation time.
However, the scheduler provided in the related art cannot dynamically control the sleep time according to the system requirements, and thus waste of resources is generated in many cases.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
At least some embodiments of the present invention provide a task scheduling processing method, apparatus, storage medium, processor and system, so as to at least solve the technical problem that a scheduler provided in the related art cannot dynamically control a sleep time according to a system requirement, so that resource waste may occur in many cases.
According to one embodiment of the present invention, there is provided a task scheduling processing method, including:
monitoring a beacon frame sent by an access point according to a preset period, wherein the preset period is determined by initial wake-up time of a first part of tasks, and each task in the first part of tasks is a wake-up task capable of being delayed; under the triggering of a beacon frame, switching from a dormant state to an awake state; a first portion of the tasks are scheduled and executed in the awake state.
Optionally, before listening for the beacon frame sent by the access point according to the preset period, the method further includes: dividing all tasks to be executed into a first part of tasks and a second part of tasks according to the dormancy type, wherein each task in the second part of tasks is a non-delayed awakening task.
Optionally, before listening for the beacon frame sent by the access point according to the preset period, the method further includes: acquiring initial wake-up time of each task in the first part of tasks; determining target wake-up opportunities of the first partial tasks based on the initial wake-up opportunities of each task in the first partial tasks, wherein the target wake-up opportunities are used for uniformly scheduling the first partial tasks; and determining a preset period by adopting the initial wake-up time and the target wake-up time of each task in the first part of tasks.
Optionally, scheduling and executing the first portion of the tasks in the awake state includes: detecting a first part of tasks at a target wake-up opportunity; uniformly scheduling and executing a first part of tasks according to preset rules, wherein the preset rules comprise one of the following: and sequentially executing the first partial tasks according to the task priority and sequentially executing the first partial tasks in turn.
Optionally, the method further comprises: acquiring initial wake-up time of each task in the second part of tasks; based on the initial wake-up time of each task in the second part of tasks, switching from the sleep state to the wake-up state at regular time; the second partial task is scheduled and executed in the awake state.
According to one embodiment of the present invention, there is also provided a task scheduling processing device, including:
the monitoring module is used for monitoring beacon frames sent by the access point according to a preset period, wherein the preset period is determined by initial wake-up time of a first part of tasks, and each task in the first part of tasks is a postponable wake-up task; the first switching module is used for switching from a dormant state to an awake state under the triggering of the beacon frame; and the first processing module is used for scheduling and executing the first part of tasks in the wake-up state.
Optionally, the apparatus further includes: the dividing module is used for dividing all tasks to be executed into a first part of tasks and a second part of tasks according to the dormancy type, wherein each task in the second part of tasks is a non-postponed awakening task.
Optionally, the apparatus further includes: the first acquisition module is used for acquiring the initial wake-up time of each task in the first part of tasks; a first determination module for determining a target wake up occasion for the first partial task based on the initial wake up occasion for each of the first partial task, the target wake-up time is used for uniformly scheduling the first part of tasks; and the second determining module is used for determining a preset period by adopting the initial wake-up time and the target wake-up time of each task in the first part of tasks.
Optionally, the first processing module includes: the detection unit is used for detecting a first part of tasks under the target wake-up time; the processing unit is used for uniformly scheduling and executing the first part of tasks according to preset rules, wherein the preset rules comprise one of the following: and sequentially executing the first partial tasks according to the task priority and sequentially executing the first partial tasks in turn.
Optionally, the apparatus further includes: the second acquisition module is used for acquiring the initial wake-up time of each task in the second part of tasks; the second switching module is used for switching from the dormant state to the awakening state at fixed time based on the initial awakening time of each task in the second partial task; and the second processing module is used for scheduling and executing a second part of tasks in the wake-up state.
According to one embodiment of the present invention, there is also provided a storage medium in which a computer program is stored, wherein the computer program is configured to execute the task scheduling processing method described above when running.
According to an embodiment of the present invention, there is further provided a processor for running a program, wherein the program is configured to execute the task scheduling processing method described above when running.
According to one embodiment of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to run the computer program to perform the task scheduling processing method described above.
According to one embodiment of the present invention, there is also provided a task scheduling processing system, including: the system comprises at least one workstation and at least one access point, wherein each workstation in the at least one workstation is a first intelligent device, part or all of the at least one access point is a second intelligent device, a home gateway module is configured in the second intelligent device and used for connecting the first intelligent device to a wide area network, the first intelligent device and the second intelligent device are used for providing different types of initial services, the initial services are independent of network connection services, and each workstation in the at least one workstation comprises the electronic device.
In at least some embodiments of the present invention, a beacon frame sent by an access point is intercepted according to a preset period, where the preset period is determined by an initial wake-up opportunity of a first part of tasks, and each task in the first part of tasks is a mode that can delay the wake-up task, by switching from a sleep state to a wake-up state under the triggering of the beacon frame, and scheduling and executing the first part of tasks in the wake-up state, the purpose that a processor can be in a sleep state as much as possible by modifying an RTOS system is achieved, so as to save more power consumption is achieved, thereby realizing the technical effects of maximally reducing the wake-up time of the processor and simultaneously reducing the task processing delay, and further solving the technical problem that a scheduler provided in the related art cannot dynamically control the sleep time according to the system requirement, so that resource waste can be generated in many cases.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of a task scheduling processing method according to one embodiment of the present invention;
FIG. 2 is a schematic diagram of a task scheduling process according to an alternative embodiment of the present invention;
FIG. 3 is a block diagram of a task scheduling processing device according to one embodiment of the present invention;
fig. 4 is a block diagram of a task scheduling processing device according to an alternative embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one embodiment of the present invention, there is provided an embodiment of a task scheduling processing method, it being noted that the steps shown in the flowcharts of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that herein.
The method embodiment may be performed in a task scheduling processing system. The task scheduling processing system includes: the system comprises at least one workstation and at least one access point, wherein each workstation in the at least one workstation is a first intelligent device, part or all of the at least one access point is a second intelligent device, a home gateway module is configured in the second intelligent device, the home gateway module is used for connecting the first intelligent device to a wide area network (such as the Internet), the first intelligent device and the second intelligent device are used for providing different types of initial services, and the initial services are independent of network connection services.
In an alternative embodiment, the first smart device is an ultra-low power wireless fidelity (WiFi) device, and the second smart devices are smart home devices (e.g., wiFi devices such as a smart air conditioner, a smart socket, and a smart light fixture). The generalization of the gateway refers to embedding a module with gateway functions into any intelligent device capable of supplying power normally, so that the intelligent device is newly added with gateway functions based on the original functions. For example: the initial service provided by the intelligent air conditioner is refrigerating or heating service, and the intelligent air conditioner is added with gateway functions based on original functions by embedding the home gateway module into the intelligent air conditioner. For another example: the initial service provided by the intelligent lamp is lighting service, and the intelligent lamp is added with gateway functions based on original functions by embedding the home gateway module into the intelligent lamp. Whereby the user does not need to purchase a gateway alone and the network signals of multiple gateways can provide greater coverage.
It should be noted that, the above-mentioned home gateway module can insert to the intelligent device through the peripheral interface of the intelligent device, also can embed the home gateway module in the intelligent device in advance in the production process of the intelligent device.
The smart devices (including: first smart device, second smart device) may include one or more processors (the processors may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processor (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.), and a memory for storing data. Optionally, the intelligent device may further include a transmission device, an input/output device, and a display device for a communication function. It will be appreciated by those of ordinary skill in the art that the foregoing structural descriptions are merely illustrative, and are not intended to limit the structure of the smart device. For example, the smart device may also include more or fewer components than the above-described structural descriptions, or have a different configuration than the above-described structural descriptions.
The memory may be used to store a computer program, for example, a software program of application software and a module, for example, a computer program corresponding to the task scheduling processing method in the embodiment of the present invention, and the processor executes the computer program stored in the memory, thereby performing various functional applications and data processing, that is, implementing the task scheduling processing method described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory may further include memory remotely located with respect to the processor, the remote memory being connectable to the smart device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the smart device. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Display devices may be, for example, touch screen type Liquid Crystal Displays (LCDs) and touch displays (also referred to as "touch screens" or "touch display screens"). The liquid crystal display may enable a user to interact with a user interface of the smart device. In some embodiments, the smart device has a Graphical User Interface (GUI) with which a user may interact with the GUI by touching finger contacts and/or gestures on the touch-sensitive surface, where the human-machine interaction functionality optionally includes the following interactions: executable instructions for performing the above-described human-machine interaction functions, such as creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving electronic mail, talking interfaces, playing digital video, playing digital music, and/or web browsing, are configured/stored in a computer program product or readable storage medium executable by one or more processors.
In this embodiment, a task scheduling processing method running on the first smart device (i.e. workstation) is provided, fig. 1 is a flowchart of a task scheduling processing method according to one embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
step S104, monitoring a beacon frame sent by an access point according to a preset period, wherein the preset period is determined by initial wake-up time of a first part of tasks, and each task in the first part of tasks is a postponable wake-up task;
step S105, under the triggering of the beacon frame, switching from a dormant state to an awake state;
step S106, scheduling and executing the first part of tasks in the wake-up state.
Through the steps, the beacon frame sent by the access point can be intercepted according to the preset period, the preset period is determined by the initial wake-up time of the first partial task, each task in the first partial task is a mode capable of delaying the wake-up task, through switching from the dormant state to the wake-up state under the triggering of the beacon frame and scheduling and executing the first partial task under the wake-up state, the purpose that the processor can be in the dormant state as much as possible through modifying the RTOS system is achieved, so that more power consumption is saved is achieved, the wake-up time of the processor is reduced to the maximum extent, meanwhile, the technical effect that the task processing delay can be reduced is achieved, and the technical problem that the scheduler provided in the related art cannot dynamically control the dormant time according to the system requirement is solved, so that resource waste can be generated in many cases.
In an RTOS system, there is one IDLE (IDLE) task that is responsible for entering and executing IDLE tasks by the scheduler without other tasks needing to be executed. In some systems with low power requirements, the maximum sleep time that can be accepted by all other tasks is calculated in the IDLE task so that the processor can enter the sleep state. The processor needs to be re-awakened and the scheduling system restarted only when the wake-up opportunity is met. However, since the execution process of each task is not synchronized, the sleep start time and the sleep time period for each task cannot be completely determined. For this reason, the processor cannot be in a sleep state for a long time, but is selectively awakened periodically to perform tasks.
Optionally, before listening for the beacon frame sent by the access point according to the preset period in step S104, the following steps may be performed:
and step S100, dividing all tasks to be executed into a first part of tasks and a second part of tasks according to the dormancy type, wherein each task in the second part of tasks is a non-delayed awakening task.
By modifying the RTOS, the sleep type of each task is distinguished, and the sleep type of each task is further divided into non-deferred wakeup (i.e., hard delay) and deferrable wakeup (i.e., soft delay). And then, summarizing all the tasks capable of being awakened after delay, and uniformly calculating to obtain a more reasonable sleep time length, so that the processor is awakened again when the sleep time length is finished, and all the tasks capable of being awakened after delay are completed once. Therefore, a plurality of sleep time fragments can be integrated together, and the processor is prevented from frequently switching between the wake-up state and the sleep state.
Optionally, before listening for the beacon frame sent by the access point according to the preset period in step S104, the following steps may be performed:
step S101, acquiring initial wake-up time of each task in a first part of tasks;
step S102, determining target wake-up time of the first part task based on the initial wake-up time of each task in the first part task, wherein the target wake-up time is used for uniformly scheduling the first part task;
step S103, determining a preset period by adopting the initial wake-up time and the target wake-up time of each task in the first part of tasks.
By acquiring the initial wake-up time of each task in all the deferrable wake-up tasks, a more reasonable target wake-up time for uniformly scheduling all the deferrable wake-up tasks can be uniformly calculated, and therefore the preset period can be determined. FIG. 2 is a schematic diagram of a task scheduling process according to an alternative embodiment of the present invention, as shown in FIG. 2, after the WiFi device turns on the WiFi low-power mode, all deferrable wakeup tasks may include, but are not limited to: task 1, task 2, task 3, task 4, and task 5. Further, task 1, task 2, task 3, task 4, and task 5 have different initial wake-up timings. For example: task 1 has an initial wake up occasion 1, task 2 has an initial wake up occasion 2, task 3 has an initial wake up occasion 3, task 4 has an initial wake up occasion 4, and task 5 has an initial wake up occasion 5. If the WiFi device schedules and executes task 1 at initial wake up occasion 1, schedules and executes task 2 at initial wake up occasion 2, schedules and executes task 3 at initial wake up occasion 3, schedules and executes task 4 at initial wake up occasion 4, and schedules and executes task 5 at initial wake up occasion 5, the WiFi device will frequently switch between the wake up and sleep states. Therefore, by adopting the technical scheme provided by the embodiment of the invention, the WiFi device determines the target wake-up time common to the task 1, the task 2, the task 3, the task 4 and the task 5 based on the initial wake-up time of each task to uniformly schedule and execute the tasks. For example: the WiFi device finds that the initial wake-up time of the task 1 is earliest through comparison, the initial wake-up time of the task 5 is latest, and the initial wake-up time of the other tasks is sequentially centered. To this end, the WiFi device may determine the initial wake-up occasion of task 5 as the target wake-up occasion, and then the WiFi device may maintain the sleep state between initial wake-up occasion 1 and initial wake-up occasion 5 (target wake-up occasion). Therefore, the sleep time between the initial wake-up time 1 and the initial wake-up time 5 is the preset period.
Optionally, in step S106, scheduling and executing the first partial task in the awake state may include the following execution steps:
step S1061, detecting a first part of tasks at a target wake-up opportunity;
step S1062, uniformly scheduling and executing the first part of tasks according to a preset rule, where the preset rule includes one of the following: and sequentially executing the first partial tasks according to the task priority and sequentially executing the first partial tasks in turn.
Since the WiFi device needs to be periodically awakened to receive a beacon frame (beacon) sent by the AP after the WiFi low power mode is turned on, and determine whether there is data to be processed, the awakening period can be adjusted to be the overall duration of all tasks capable of being awakened later. Whereby the RTOS will check synchronously whether there is a task to be performed each time the WiFi device receives a beacon from the AP.
As also shown in fig. 2, the WiFi device switches from the sleep state to the awake state at the target wake-up occasion, and determines that task 1, task 2, task 3, task 4, and task 5 need to be scheduled and executed at the target wake-up occasion. In the actual execution process, the WiFi device may sequentially execute task 1, task 2, task 3, task 4, and task 5 according to the task priority. For example: assuming that the priority of task 2 > the priority of task 1 > the priority of task 3 > the priority of task 5 > the priority of task 4 is determined in accordance with the task priority ranking, the WiFi device will execute task 2, task 1, task 3, task 5 and task 4 in that order. The WiFi device may also perform task 1, task 2, task 3, task 4, and task 5 in turn. For example: task 1, task 2, task 3, task 4 and task 5 are alternately executed in the order of the task numbers from small to large.
Optionally, the method may further include the following steps:
step S107, obtaining an initial wake-up time of each task in the second part of tasks;
step S108, switching from the dormant state to the awake state at regular time based on the initial wake-up time of each task in the second part of tasks;
step S109, scheduling and executing the second partial task in the awake state.
For non-delayed wakeup tasks with very sensitive execution time, because the processing mode of unified scheduling and execution of the deferrable wakeup tasks cannot be adopted, an accurate timing wakeup control mode can be adopted for the non-delayed wakeup tasks, and modification of application logic is avoided. In other words, the WiFi device is switched from the sleep state to the wake state at regular time by a regular wake control mode, and non-delayed wake tasks are scheduled and executed in time in the wake state.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The present embodiment also provides a task scheduling processing device, which is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 3 is a block diagram showing a task scheduling processing device according to an embodiment of the present invention, as shown in fig. 3, the device includes: the interception module 100 is configured to intercept beacon frames sent by the access point according to a preset period, where the preset period is determined by an initial wake-up opportunity of a first part of tasks, and each task in the first part of tasks is a deferrable wake-up task; a first switching module 102, configured to switch from a sleep state to an awake state under the triggering of a beacon frame; the first processing module 104 is configured to schedule and execute a first portion of tasks in an awake state.
Optionally, fig. 4 is a block diagram of a task scheduling processing device according to an alternative embodiment of the present invention, and as shown in fig. 4, the device further includes: the dividing module 106 is configured to divide all tasks to be executed into a first partial task and a second partial task according to the dormancy type, where each task in the second partial task is a non-deferred wakeup task.
Optionally, as shown in fig. 4, the apparatus further includes: a first obtaining module 108, configured to obtain an initial wake-up opportunity of each task in the first part of tasks; a first determining module 110, configured to determine a target wake-up opportunity of the first partial task based on an initial wake-up opportunity of each task in the first partial task, where the target wake-up opportunity is used to uniformly schedule the first partial task; the second determining module 112 is configured to determine a preset period by using the initial wake-up opportunity and the target wake-up opportunity of each task in the first part of the tasks.
Optionally, the first processing module 104 includes: a detection unit (not shown in the figure) for detecting a first part of the tasks at a target wake-up occasion; a processing unit (not shown in the figure) configured to uniformly schedule and execute the first part of tasks according to a preset rule, where the preset rule includes one of the following: and sequentially executing the first partial tasks according to the task priority and sequentially executing the first partial tasks in turn.
Optionally, as shown in fig. 4, the apparatus further includes: a second obtaining module 114, configured to obtain an initial wake-up opportunity of each task in the second partial task; a second switching module 116, configured to switch from the sleep state to the awake state periodically based on an initial wake-up opportunity of each task in the second partial task; a second processing module 118 for scheduling and executing a second portion of the tasks in the awake state.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, monitoring a beacon frame sent by an access point according to a preset period, wherein the preset period is determined by initial wake-up time of a first part of tasks, and each task in the first part of tasks is a postponable wake-up task;
s2, under the triggering of a beacon frame, switching from a dormant state to an awake state;
s3, scheduling and executing the first part of tasks in the wake-up state.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, monitoring a beacon frame sent by an access point according to a preset period, wherein the preset period is determined by initial wake-up time of a first part of tasks, and each task in the first part of tasks is a postponable wake-up task;
s2, under the triggering of a beacon frame, switching from a dormant state to an awake state;
s3, scheduling and executing the first part of tasks in the wake-up state.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (12)

1. A task scheduling processing method, characterized by comprising:
monitoring a beacon frame sent by an access point according to a preset period, wherein each task in the first part of tasks is a postponable wake-up task;
under the triggering of the beacon frame, switching from a dormant state to an awake state;
scheduling and executing the first partial task in the wake-up state;
before listening to the beacon frame sent by the access point according to the preset period, the method further comprises: acquiring initial wake-up time of each task in the first part of tasks; determining a target wake-up opportunity of the first partial task based on the initial wake-up opportunity of each task in the first partial task, wherein the target wake-up opportunity is used for uniformly scheduling the first partial task; determining the preset period by adopting the initial wake-up time and the target wake-up time of each task in the first part of tasks;
wherein determining the target wake-up occasion for the first partial task based on the initial wake-up occasion for each task in the first partial task comprises: determining the latest initial wake-up time corresponding to a plurality of tasks in the first part of tasks as the target wake-up time;
the preset period is used for representing sleep time between earliest initial wake-up time corresponding to a plurality of tasks in the first part of tasks and the target wake-up time.
2. The method of claim 1, further comprising, prior to listening for the beacon frames transmitted by the access point at the preset period:
dividing all tasks to be executed into the first part of tasks and the second part of tasks according to the dormancy type, wherein each task in the second part of tasks is a non-postponed wake-up task.
3. The method of claim 1, wherein scheduling and executing the first portion of tasks in the awake state comprises:
detecting the first part of tasks under the target wake-up opportunity;
uniformly scheduling and executing the first part of tasks according to preset rules, wherein the preset rules comprise one of the following: and sequentially executing the first partial tasks according to the task priorities, and sequentially executing the first partial tasks in turn.
4. The method according to claim 2, wherein the method further comprises:
acquiring initial wake-up time of each task in the second part of tasks;
based on the initial wake-up time of each task in the second part of tasks, switching from the sleep state to the wake-up state at regular time;
scheduling and executing the second part of tasks in the wake-up state.
5. A task scheduling processing device, comprising:
the monitoring module is used for monitoring beacon frames sent by the access point according to a preset period, wherein each task in the first part of tasks is a postponable wake-up task;
the first switching module is used for switching from a dormant state to an awake state under the triggering of the beacon frame;
a first processing module for scheduling and executing the first partial task in the awake state;
wherein the apparatus further comprises: the first acquisition module is used for acquiring the initial wake-up time of each task in the first part of tasks; the first determining module is used for determining target wake-up time of the first partial task based on the initial wake-up time of each task in the first partial task, wherein the target wake-up time is used for uniformly scheduling the first partial task; the second determining module is used for determining the preset period by adopting the initial wake-up time of each task in the first part of tasks and the target wake-up time;
wherein the first determining module is further configured to: determining the latest initial wake-up time corresponding to a plurality of tasks in the first part of tasks as the target wake-up time;
the preset period is used for representing sleep time between earliest initial wake-up time corresponding to a plurality of tasks in the first part of tasks and the target wake-up time.
6. The apparatus of claim 5, wherein the apparatus further comprises:
the dividing module is used for dividing all tasks to be executed into the first partial tasks and the second partial tasks according to the dormancy type, wherein each task in the second partial tasks is a non-delayed awakening task.
7. The apparatus of claim 6, wherein the first processing module comprises:
the detection unit is used for detecting the first part of tasks under the target wake-up time;
the processing unit is used for uniformly scheduling and executing the first part of tasks according to preset rules, wherein the preset rules comprise one of the following: and sequentially executing the first partial tasks according to the task priorities, and sequentially executing the first partial tasks in turn.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the second acquisition module is used for acquiring the initial wake-up time of each task in the second part of tasks;
the second switching module is used for switching from the dormant state to the awakening state at fixed time based on the initial awakening time of each task in the second partial task;
and the second processing module is used for scheduling and executing the second partial task in the wake-up state.
9. A storage medium having a computer program stored therein, wherein the computer program is configured to execute the task scheduling processing method according to any one of claims 1 to 4 at a time of execution.
10. A processor, characterized in that the processor is arranged to run a program, wherein the program is arranged to execute the task scheduling processing method as claimed in any one of the claims 1 to 4 at run time.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the task scheduling processing method of any one of the claims 1 to 4.
12. A task scheduling processing system, comprising: at least one workstation and at least one access point, wherein each of the at least one workstation is a first smart device and some or all of the at least one access point is a second smart device, wherein a home gateway module is configured in the second smart device, the home gateway module being configured to connect the first smart device to a wide area network, the first smart device and the second smart device being configured to provide different types of initial services independent of network connection services, each of the at least one workstation comprising the electronic apparatus of claim 11.
CN202010247657.3A 2020-03-31 2020-03-31 Task scheduling processing method, device, storage medium, processor and system Active CN111465087B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247657.3A CN111465087B (en) 2020-03-31 2020-03-31 Task scheduling processing method, device, storage medium, processor and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247657.3A CN111465087B (en) 2020-03-31 2020-03-31 Task scheduling processing method, device, storage medium, processor and system

Publications (2)

Publication Number Publication Date
CN111465087A CN111465087A (en) 2020-07-28
CN111465087B true CN111465087B (en) 2023-07-18

Family

ID=71682504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247657.3A Active CN111465087B (en) 2020-03-31 2020-03-31 Task scheduling processing method, device, storage medium, processor and system

Country Status (1)

Country Link
CN (1) CN111465087B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925626B (en) * 2021-03-22 2023-04-25 恒为科技(上海)股份有限公司 Timer task processing method and device and server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610566A (en) * 2008-06-19 2009-12-23 财团法人工业技术研究院 Dynamically adjust the system and the method thereof of the dormant/waking time course of radio network device
CN108322491A (en) * 2017-01-17 2018-07-24 研祥智能科技股份有限公司 Wake-up on LAN method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118188B (en) * 2013-01-25 2014-08-20 华为终端有限公司 Application heartbeat cycle adjusting method and device, and terminal
US9135062B2 (en) * 2013-04-09 2015-09-15 National Instruments Corporation Hardware assisted method and system for scheduling time critical tasks
CN110058889B (en) * 2014-08-21 2023-10-20 斑马智行网络(香港)有限公司 Application awakening method and device
CN104375620A (en) * 2014-11-25 2015-02-25 珠海全志科技股份有限公司 Method for reducing power dissipation of ucos-ii system
CN105807892A (en) * 2016-03-10 2016-07-27 浙江大学 Low power consumption mode switching method of embedded real time operating system
CN110582111B (en) * 2018-06-08 2022-06-14 华为技术有限公司 Awakening method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610566A (en) * 2008-06-19 2009-12-23 财团法人工业技术研究院 Dynamically adjust the system and the method thereof of the dormant/waking time course of radio network device
CN108322491A (en) * 2017-01-17 2018-07-24 研祥智能科技股份有限公司 Wake-up on LAN method and apparatus

Also Published As

Publication number Publication date
CN111465087A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN105354044B (en) A kind of application awakening method and device
CN107809793B (en) Awakening control method and device of intelligent terminal
US6965763B2 (en) Event coordination in an electronic device to reduce current drain
EP3268842B1 (en) Methods and systems for coordination of operating states amongst multiple socs within a computing device
EP3650983B1 (en) Method for managing trigger, and terminal device
US20150278890A1 (en) Electronic information label system with adjustable wake-up update period
US10564708B2 (en) Opportunistic waking of an application processor
CN107490155B (en) Air-conditioning method for controlling timed power on/off, device, remote control device and system
WO2020237703A1 (en) Communication mode switching method and device, storage medium, processor, and system
US11595889B2 (en) Determining a duty schedule for a group of lighting devices providing a similar lighting service
CN106802551A (en) Intelligent wearable device control method and intelligent wearable device
CN109710330B (en) Method and device for determining running parameters of application program, terminal and storage medium
CN104636169A (en) System awakening method and system awakening device
CN111465087B (en) Task scheduling processing method, device, storage medium, processor and system
US20030008690A1 (en) Synchronizing power conservation modes
CN106598193B (en) Power consumption control method and device
CN107969009B (en) Method and device for controlling terminal communication and terminal
CN114237896A (en) Distributed node resource dynamic scheduling method and device
CN112633031A (en) Electronic price tag awakening method, electronic price tag and computer readable storage medium
CN106912091B (en) Control method and device and electronic equipment
US20100113084A1 (en) Power saving in wireless networks
WO2018076698A1 (en) Terminal delay display method and apparatus, and terminal and computer storage medium
CN116132740A (en) Energy saving method and device for video watching equipment, video watching equipment and readable storage medium
CN112888050B (en) Equipment energy saving method and device and computer storage medium
WO2008146099A1 (en) Data processing system, method for processing data and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant