CN113176935A - Intelligent updating method and device for timed task, electronic equipment and storage medium - Google Patents

Intelligent updating method and device for timed task, electronic equipment and storage medium Download PDF

Info

Publication number
CN113176935A
CN113176935A CN202110496896.7A CN202110496896A CN113176935A CN 113176935 A CN113176935 A CN 113176935A CN 202110496896 A CN202110496896 A CN 202110496896A CN 113176935 A CN113176935 A CN 113176935A
Authority
CN
China
Prior art keywords
task
execution
execution period
period
execution time
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.)
Pending
Application number
CN202110496896.7A
Other languages
Chinese (zh)
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.)
Shenzhen Oribo Technology Co Ltd
Original Assignee
Shenzhen Oribo 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 Shenzhen Oribo Technology Co Ltd filed Critical Shenzhen Oribo Technology Co Ltd
Priority to CN202110496896.7A priority Critical patent/CN113176935A/en
Publication of CN113176935A publication Critical patent/CN113176935A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The application provides a method and a device for intelligently updating a timed task, electronic equipment and a storage medium, which relate to the technical field of intelligent home furnishing, and the method comprises the following steps: acquiring timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period; determining whether the task execution period meets a preset condition according to the item execution time; if the task execution period does not meet the preset condition according to the item execution time, converting the task starting execution period according to a preset rule to generate a task ending execution period; and updating the timing task information based on the task starting execution period and the task ending execution period, so that the task ending execution period is obtained according to the item execution time and the task execution period to update the timing task, and the timing task can be completely supplemented, so that the controlled equipment can completely execute the timing task.

Description

Intelligent updating method and device for timed task, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of intelligent home furnishing, in particular to an intelligent updating method for a timed task.
Background
With the development of smart home technology, more and more functions can be executed by the controlled device, and the controlled device can execute various contextual models and various tasks. For example, the user may set a timing task for the controlled device so that the controlled device can perform the specified task at a specified time (or time period), thereby enabling the function of the controlled device to better conform to the user's preference.
In practical applications, when the timing task information input by the user is incomplete, the controlled device cannot normally perform the timing task, thereby resulting in poor user experience.
Disclosure of Invention
The embodiment of the application provides a method and a device for intelligently updating a timed task, electronic equipment and a storage medium, so as to solve the problems.
In a first aspect, an embodiment of the present application provides an intelligent updating method for a timed task. The method comprises the following steps: acquiring timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period; determining whether a task execution period meets a preset condition according to the item execution time; if the task execution period does not meet the preset condition according to the item execution time, converting the task starting execution period according to a preset rule to generate a task ending execution period; and updating the timing task information based on the task starting execution period and the task ending execution period.
In a second aspect, an embodiment of the present application provides an intelligent updating apparatus for a timed task. The device includes: the information acquisition module is used for acquiring timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period; the judging module is used for determining whether the task execution period meets the preset condition according to the item execution time; the period generation module is used for converting the task starting execution period according to a preset rule and generating a task ending execution period if the task execution period is determined to not meet the preset condition according to the item execution time; and the information updating module is used for updating the timing task information based on the task starting execution period and the task ending execution period.
In a third aspect, an embodiment of the present application provides an electronic device. The electronic equipment comprises one or more processing terminals; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processing terminals, and the one or more application programs are configured for the intelligent updating method for the timed task provided by the embodiment of the application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer readable storage medium stores program codes, and the program codes can be called by the processing terminal to execute the intelligent updating method for the timed task provided by the embodiment of the application.
The embodiment of the application provides a method and a device for intelligently updating a timed task, electronic equipment and a storage medium. The method comprises the steps of obtaining timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period; determining whether a task execution period meets a preset condition according to the item execution time; if the task execution period does not meet the preset condition according to the item execution time, converting the task starting execution period according to a preset rule to generate a task ending execution period; and updating the timing task information based on the task starting execution period and the task ending execution period. Therefore, the task ending execution period can be determined according to the task execution time and the task execution period so as to determine the specific execution date and execution time of the timing task, so that the timing task can be completely supplemented, and the controlled equipment can completely execute the timing task.
Drawings
In order to more clearly describe the embodiments of the present disclosure or the related art, drawings described in the embodiments will be briefly described below. It is apparent that these drawings are merely some embodiments of the present disclosure, and those skilled in the art can derive other drawings from these drawings without inventive effort.
FIG. 1 is a schematic diagram illustrating an application environment of an intelligent updating method for a timed task according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an intelligent updating method for a timed task according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an intelligent updating method for a timed task according to another embodiment of the present application;
fig. 4 is a schematic flowchart illustrating S220 in the intelligent updating method for timed tasks according to an embodiment of the present application;
FIG. 5 is a diagram illustrating an implementation of a timed task intelligent update method according to an exemplary embodiment of the present application;
FIG. 6 is a block diagram illustrating a timing task intelligent updating apparatus according to an embodiment of the present disclosure;
fig. 7 shows a block diagram of an electronic device according to an embodiment of the present application;
fig. 8 shows a block diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings, in conjunction with the technical content, structural features, objects, and effects. In particular, the technical terms in the embodiments of the present application are used only for describing specific embodiments, and do not constitute limitations on the embodiments of the present application.
With current controlled devices, a user can generally set timed tasks for the controlled device, such as what time to start working, what time to end working, and how often to cycle, so that the controlled device can perform the specified tasks at the specified time (or time period), thereby enabling the functions of the controlled device to better conform to the user's preferences.
In practical applications, when the timing task information input by the user is incomplete, the controlled device cannot normally perform the timing task, thereby resulting in poor user experience. For example, the timing task set by the user is "turn off the light 10 pm to 6 am every monday, tuesday, wednesday, friday, sunday". And the following contents can be obtained by decomposing the task information into specific task information. The execution date of the timing task is Monday, Tuesday, Wednesday, Friday and Sunday, the time for starting turning off the lamp every day is 10, and the time span from 10 pm to 6 am is not explicitly set by the user, namely the time span can be one day, two days, three days and the like, namely the time for starting turning on the lamp every day can be 6 o 'clock of the first day after turning off the lamp and can also be 6 o' clock of the second day after turning off the lamp. At this time, the specific time for ending the light-off, that is, the light-on time, cannot be determined. That is, only the start execution date and the start execution time of the timed task are known at this time, and the end execution date of the timed task is not known, so that the timed task information is incomplete, and further the controlled device cannot completely execute the timed task.
The embodiment of the application provides an intelligent updating method for a timing task to solve the problems, and the intelligent updating method for the timing task can automatically complete timing task information when the timing task information input by a user is incomplete so as to ensure that the timing task is normally executed.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment of an intelligent updating method for a timed task according to an embodiment of the present application. The communication system 10 includes a control panel 11, a terminal 12, and a controlled device 13. The control panel 11 may be a common control panel (such as a switch capable of being remotely controlled), or may be an intelligent control panel (such as a gateway, an intelligent switch, an intelligent central control panel), and the like. The terminal 12 may include, but is not limited to, a personal computer, a smart phone, a tablet computer, a wearable electronic device, and the like. The controlled device 13 is at least one, which may include, but is not limited to, an alarm clock, a smart switch, a light, an air conditioner, a curtain, a television, a refrigerator, a fan, and the like. In the communication system 10, the control panel 11, the terminal 12, and the controlled device 13 can communicate with each other in a wireless or wired manner.
The user can set a task through the terminal 12 and then send the task to the control panel 11. The control panel 11 may send the task to the controlled device 13. The controlled device 13 may update the task and then store the updated task therein, and execute the task when the task execution condition is satisfied. Alternatively, the control panel 11 may also directly update the task and store the updated task therein, and when the task execution time is satisfied, the control panel 11 controls the controlled device 13 to execute the task.
The user may also enter tasks on the control panel 11. The control panel 11 may update the task and store the updated task therein, and control the controlled device 13 to execute the task when the task execution time is satisfied. Alternatively, the control panel 11 may also send the task to the corresponding controlled device 13. The controlled device 13 may update the task and then store the updated task therein, and execute the task when the task execution condition is satisfied.
The user can also set a task directly on the controlled device 13, and then the controlled device 13 can update the task and store the updated task therein, and when the task execution condition is satisfied, execute the task.
The tasks described above may include a normal task and a timed task, and may also include a timed-start contextual model, and the like. Wherein a generic task may be a single executed task, such as turning off a light. The timed task may be to perform a specified task at a specified time (or time period), such as playing music 13:00: 00. The contextual model may be a set of tasks in a specific context that are executed in association with a plurality of controlled devices, and taking the home mode as an example, when the user returns home, the control panel 11 detects that the user has arrived home, may control the hall light to turn on, control the air conditioner to adjust to 26 degrees, control the vent to turn on, and the like. The embodiments of the present application do not limit the specific types and specific contents of the tasks.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating an intelligent updating method for a timed task according to an embodiment of the present application. The method is applied to the control panel 11, the terminal 12, or the controlled device 13 shown in fig. 1. The method may specifically comprise the following steps.
S110, timing task information is obtained, wherein the timing task information comprises transaction execution time and a task execution period, and the task execution period comprises a task starting execution period.
The timing task information may be input by the user through the terminal 12, may be input by the user on the control panel 11, or may be input by the user on the controlled device 13. The timed task information may also include event information, which may include a first event and a second event, such as the first event may be turning on a designated device and the second event may be turning off the designated device, e.g., for a light fixture, the first event may be turning off the light and the second event may be turning on the light.
The event execution time may refer to the execution time of the event information, that is, the execution time of the first event and the execution time of the second event, for example, the light-off time is 22:00:00, and the light-on time is 06:00: 00. The transaction execution time may include a start execution time and an end execution time, and no more than twenty-four hours between the start execution time and the end execution time.
The start execution time is the start execution time of the timer task, and is the execution time of the first event (for example, the light-off). The end execution time is the end execution time of the timer task, and is the execution time of the second event (for example, the above-mentioned lighting).
The task execution period may include a task execution date and loop instruction information. Where the task execution date may include a specific number of days in the week the task was executed, e.g., monday, week, etc. The loop instruction information is used to indicate whether the timed task is to be executed in a loop, which may be one of a loop execution or a no loop execution. The task execution period further includes a task start execution period. The task start execution period includes the start execution date of the timed task and the aforementioned loop instruction information. The start execution date may also include a specific number of days in the week on which the timed task was executed, e.g., monday, tuesday, sunday, etc.
As an embodiment, the execution subject is taken as the controlled device 13. The controlled device 13 may receive the timed task information input by the user, and may determine the matter information, the matter execution time, and the task execution period from the timed task information.
As an example, the timing task information may be, for example, as follows: turning off the lamp every Monday, Tuesday, Wednesday, Friday and Sunday at 22:00:00 and turning on the lamp at 06:00: 00. The controlled device 13 may determine that the first event is turning off the light and the second event is turning on the light based on the timed task information. The execution time of the first transaction, i.e., the start execution time, is 22:00: 00. The execution time of the second transaction, i.e., the end execution time, is 06:00: 00. In addition, it can be determined from "per" that the timed task needs to be executed cyclically, and therefore, the controlled device 13 can determine that the task execution period is monday, tuesday, wednesday, friday, sunday, cyclic execution.
And S120, determining whether the task execution period meets a preset condition according to the item execution time.
The preset condition may be that the task execution period includes a task start execution period and a task end execution period. And when the task execution period comprises a task starting execution period and a task ending execution period, the task execution period meets a preset condition. When the task execution cycle only includes the task start execution cycle and does not include the task end execution cycle, the task execution cycle does not satisfy the preset condition.
As an embodiment, the controlled device 13 may determine whether the task execution period satisfies the preset condition according to the execution time of the first event and the execution time of the second event. If the execution time of the first item and the execution time of the second item are within the same day, which indicates that the task ending execution date is the same as the task starting execution date, the task ending execution period is the same as the task starting execution period, and both the task ending execution period and the task starting execution period are the task execution period. If the execution time of the first item is not within the same day as the execution time of the second item, which indicates that the task ending execution date is different from the task starting execution date, the task ending execution period is different from the task starting execution period, the task starting execution period is the task execution period at this time, the task ending execution period is unknown, the task execution period only includes the task starting execution period at this time, but does not include the task ending execution period at this time, and it can be determined that the task execution period does not satisfy the preset condition.
And S130, if the task execution period is determined to not meet the preset condition according to the item execution time, converting the task starting execution period according to the preset rule, and generating a task ending execution period.
The preset rule may be a rule preset in the controlled device 13, and is used to instruct the controlled device 13 to convert the task execution cycle to generate a task end execution cycle.
The task ending execution period comprises the ending execution date of the timing task and the circulation instruction information. The end execution date may also include a specific date during the week on which the execution of the timed task ended, e.g., monday, tuesday, friday, etc.
As an embodiment, when the task execution period does not satisfy the preset condition, the controlled device 13 may regard the task execution period as a task start execution period. As described above, the task start execution period may be monday, tuesday, wednesday, friday, sunday, and cycle execution. Wherein, the starting execution date is Monday, Tuesday, Wednesday, Friday and Sunday, and the loop instruction information is loop execution. And when the task execution period does not meet the preset condition, that is, the execution time of the first transaction and the execution time of the second transaction are not within the same day. In addition, the above defines that the time between the execution time of the first transaction and the execution time of the second transaction is not less than twenty-four hours. Therefore, the controlled device 13 may take the date of the day after the start execution date as the end execution date, that is, the end execution date is monday, tuesday, wednesday, thursday, saturday. The controlled device 13 may generate an ending execution period in conjunction with the ending execution date and the loop execution instruction, i.e., the generated ending execution period is monday, tuesday, wednesday, thursday, saturday, loop execution.
And S140, if the task execution period is determined to meet the preset condition according to the item execution time, determining the task starting execution period as a task ending execution period.
When the task execution period meets the preset condition, it is described that the ending execution time and the starting execution time are within the same day, that is, the ending execution date and the starting execution date are the same, and it can be determined that the task starting execution period and the task ending execution period are the same, and at this time, the task starting execution period and the task ending execution period are both the task execution period.
As an embodiment, when the task execution period satisfies the preset condition, the controlled device 13 may directly take the task start execution period as the task end execution period. For example, the start execution cycle is Monday, Wednesday, Friday, and loop execution. The ending execution period is Monday, Wednesday, Friday, and loop execution.
And S150, updating the timing task information based on the task starting execution period and the task ending execution period.
As an embodiment, as described above, the first event is turning off the light, and the execution time of the first event is 22:00: 00. The second event is turning on the light, and the execution time of the second event is 06:00: 00. The task starting execution period is Monday, Tuesday, Wednesday, Friday, Sunday, and cycle execution. The task ending execution period is Monday, Tuesday, Wednesday, Thursday, Saturday, and cycle execution. Then, after the task start execution period and the task end execution period are determined, the controlled device 13 may update the timing task information as follows: turning on the lamps and performing in a cycle of 22:00:00 on weekdays, including Monday, Tuesday, Wednesday, Friday and Friday; turning off the lamp on Monday, Tuesday, Wednesday, Thursday and Saturday 06:00:00, and performing in a circulating way.
The intelligent updating method for the timed task, provided by the embodiment of the application, comprises the steps of obtaining timed task information, wherein the timed task information comprises item execution time and task execution time, and a task execution cycle comprises a task starting execution cycle; determining whether a task execution period meets a preset condition according to the item execution time; if the task execution period does not meet the preset condition according to the item execution time, converting the task starting execution period according to a preset rule to generate a task ending execution period; and updating the timed task information based on the task start execution period and the task end execution period. Therefore, the task ending execution period can be determined according to the item execution time and the task execution period, and the timing task is updated according to the task ending execution period so as to complement the timing task completely, so that the controlled equipment can completely execute the timing task, and the timing task executed by the controlled equipment can better meet the personalized requirements of users, thereby improving the user experience.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating an intelligent updating method for a timed task according to another embodiment of the present application. The method is applied to a control panel 11 or a controlled device 12 as shown in fig. 1. The method may specifically comprise the following steps.
S210, timing task information is obtained, wherein the timing task information comprises transaction execution time and a task execution period, and the task execution period comprises a task starting execution period.
For details of S210, please refer to S110, which is not described herein.
And S220, determining whether the task execution period meets a preset condition according to the item execution time.
Referring to fig. 4 as an implementation manner, fig. 4 illustrates a schematic flowchart of S220 in the intelligent updating method for timed tasks according to an embodiment of the present application. The implementation step of S220 may include the following.
S221, judging whether the ending execution time is less than the starting execution time.
The start execution time and the end execution time are times expressed in a twenty-four-hour system.
As an embodiment, the controlled device 13 may determine whether the end execution time is smaller than the start execution time. As an example, the end execution time may be 06:00:00 and the start execution time may be 22:00:00, the controlled device 13 may determine whether 06:00:00 is less than 22:00: 00.
S222, if the ending execution time is less than the starting execution time, determining that the task execution period does not meet the preset condition.
When the ending execution time is less than the starting execution time, it means that the ending execution time and the starting execution time are not in the same day, that is, the ending execution date is different from the starting execution date, and the ending execution date is uncertain, for example: as described above, if the ending execution time is 06:00:00, the starting execution time is 22:00:00, and the ending execution time is less than the starting execution time, it indicates that the ending execution time and the starting execution time are not in the same day, that is, the ending execution date is different from the starting execution date, that is, the task ending execution period is different from the task starting execution period, and the task starting execution period is the task execution period, but the task ending execution period is unknown. The task execution cycle at this time includes only the start execution cycle. Accordingly, it can be determined that the task execution period does not satisfy the preset condition.
As an embodiment, when the end execution time is less than the start execution time, the controlled device 13 may determine that the task execution cycle does not satisfy the preset condition.
And S223, if the ending execution time is not less than the starting execution time, determining that the task execution period meets the preset condition.
When the ending execution time is not less than the starting execution time, it is described that the starting execution time is before the ending execution time, the ending execution time and the starting execution time can be normally executed in time sequence on the same day, at this time, the ending execution date is the same as the starting execution date, the task ending execution period is the same as the task starting execution period, and both are task execution periods, that is, the task execution period includes a task starting execution period and a task ending execution period. Therefore, it can be determined that the task execution period satisfies the preset condition.
As an embodiment, when the end execution time is not less than the start execution time, the controlled device 13 may determine that the task execution cycle satisfies a preset condition.
It should be noted that, please refer to the detailed description of S120 for the part not described in detail in S220, which is not described herein again.
And S230, if the task execution period is determined not to meet the preset condition according to the item execution time, determining the ending execution date of the timed task according to the starting execution date.
As an embodiment, the controlled device 13 may set the date of the day after each of the start execution dates as the end execution date of the timed task. For example, the start execution date is monday, wednesday, friday, the controlled device 13 may determine the end execution date to be tuesday, thursday, saturday.
S240, a task completion execution cycle is generated based on the completion execution date and the loop instruction information.
In one embodiment, if the completion execution date is tuesday, thursday, and saturday, and the loop instruction information is loop execution, the controlled device 13 may generate a task completion execution period, which is tuesday, thursday, saturday, and loop execution.
And S250, if the task execution period is determined to meet the preset conditions according to the item execution time, determining the task starting execution period as a task ending execution period.
And S260, updating the timing task based on the task starting execution period and the task ending execution period.
For details of S250-S260, please refer to S140-S150, which is not described herein.
In the intelligent updating method for the timed task, when the start execution time and the end execution time are determined to be in the same day, the task execution period is used as the task end execution period. When it is determined that the start execution time and the end execution time are not within the same day, a date of the following day in the start execution date is taken as a task end execution date, and a task end execution period is determined based on the task end execution date and the loop instruction information. That is, the intelligent updating method for the timed task provided by the embodiment of the application can determine the task ending execution period based on the task starting execution period to supplement the complete timed task, so that the controlled device can completely execute the timed task.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an implementation process of the intelligent updating method for a timed task according to an exemplary embodiment of the present application. In the present exemplary embodiment, the controlled device 13 may acquire a timing task, for example, the timing task may be: playing music every Monday, Tuesday, Thursday, Friday and Sunday at 18:00:00, and stopping playing music at 15:00: 00.
The controlled device 13 may determine that the first event is playing music and the execution time of the first event is 18:00:00 according to the timed task. The second event is to stop playing music, and the execution time of the second event is 15:00: 00. The task execution period is Monday, Tuesday, Thursday, Friday, Sunday and cycle execution.
The controlled device 13 may determine that the task execution period does not satisfy the preset condition by judging that 15:00:00 is less than 18:00:00, determine the task execution period as a task start execution period, and further determine a task end execution period according to the task start execution period.
As an example, the controlled device 13 may represent the execution period by one byte, where one byte includes 8 bits (bits), and each bit represents, from low to high, monday to sunday, and loop execution/no loop execution, respectively, that is, bit1 to bit8 represent monday to sunday, and loop execution/no loop execution, respectively. And bit (x) ═ 0 indicates that no task needs to be executed or no timing task needs to be executed circularly in the current day, and bit (x) ═ 1 indicates that the task needs to be executed or the timing task needs to be executed circularly in the current day, wherein x represents any number from 1 to 8. The controlled device 13 may determine a byte representation X0, i.e., 11011011, corresponding to the task start execution period according to the task start execution period described above. The byte representation may then be bit operated to obtain a byte representation X7 corresponding to the task end execution period (10110111), which may specifically include the following steps.
In a first step, the controlled device 13 may sequentially move bits 1 to bit8 of the byte representation X0 corresponding to the task start execution cycle to the right by 6 bits to obtain X1(00000011), and perform a sum (&) "operation on X1 and 1(10000000), so as to obtain an intermediate value X2(00000001) of the bit1 of the corresponding byte representation X7 including the task end execution cycle.
In the second step, the controlled device 13 may sequentially shift bits 1 to bits 8 of the byte representation X0 corresponding to the task start execution period to the left by 1 bit to obtain X3(10110110), where X3 includes bits 2 to bits 7 of the byte representation X7 corresponding to the task end execution period.
And thirdly, carrying out OR (I) operation on the X3 and the X2 to obtain X4(10110111), wherein the X4 comprises bits 1 to bit7 of which the bytes corresponding to the task ending execution period represent X7.
In the fourth step, X4 and 127(01111111) are subjected to the operation of "&", so as to obtain X5(00110111), where X5 still includes bits 1 to bit7 of X7 corresponding to the byte representation corresponding to the task end execution period, and bit8 is equal to 0.
Fifthly, performing the "&" operation on the byte representation X0 corresponding to the task start execution cycle and 128(10000000) to obtain X6(10000000), wherein the X6 comprises bit8 of the byte representation X7 corresponding to the task start execution cycle, and the bits 1 to 7 are all 0.
And sixthly, performing "|" operation on X5 and X6 to obtain byte representation X7 corresponding to the task ending execution period, namely 10110111.
The controlled device 13 may then determine the task end execution period to be monday, tuesday, wednesday, friday, saturday, loop execution based on the byte representation (10110111) corresponding to the task end execution period. Further, the controlled device 13 may update the timing task based on the task ending execution cycle, where the updated timing task is: playing music on Monday, Tuesday, Thursday, Friday and Sunday at 18:00:00, and executing in a circulating way; the music playing and the circular execution are stopped on Monday, Tuesday, Wednesday, Friday and Saturday at 15:00: 00.
It should be noted that, in all the above method embodiments, details of the parts not described in detail may refer to the details of S110 to S150. Further, the execution main body may be the control panel 11 in addition to the controlled device 13. When the control panel 11 is an execution body, please refer to the above method embodiments for the details of the method embodiments, which are not described herein again.
Referring to fig. 6, fig. 6 is a block diagram illustrating a timing task intelligent updating apparatus 300 according to an embodiment of the present disclosure. The intelligent updating device 300 for timed tasks is applied to the control panel 11 or the controlled equipment 13 shown in fig. 1. The intelligent updating apparatus 300 for timed task comprises an information obtaining module 310, a judging module 320, a period generating module 330 and an information updating module 340.
The information obtaining module 310 is configured to obtain timing task information, where the timing task information includes an item execution time and a task execution period, and the task execution period includes a task start execution period. The transaction execution time may include a start execution time and an end execution time, and the time between the start execution time and the end execution time is not more than twenty-four hours. The timed task information may further include event information, and the event information may include starting the designated device and closing the designated device.
The determining module 320 is configured to determine whether the task execution period meets a preset condition according to the event execution time.
And the period generating module 330 is configured to, if it is determined that the task execution period does not meet the preset condition according to the event execution time, convert the task start execution period according to a preset rule, and generate a task end execution period.
And an information updating module 340, configured to update the timing task information based on the task start execution period and the task end execution period.
In particular, the period generation module 330 may include a date determination sub-module and a period generation sub-module.
And the date determining submodule is used for determining the ending execution date of the timing task according to the starting execution date.
And the cycle generation submodule is used for generating a task ending execution cycle based on the ending execution date and the cycle instruction information.
In particular, the date determination submodule may comprise a date determination unit.
A date determination unit configured to take a day after each of the start execution dates as an end execution date of the timed task.
In particular, the determination module 320 may include a first determination submodule and a second determination submodule.
And the first determining submodule is used for determining that the task execution period does not meet the preset condition if the ending execution time is less than the starting execution time.
And the second determining submodule is used for determining that the task execution period meets the preset condition if the ending execution time is not less than the starting execution time.
The start execution time and the end execution time in the first determination submodule and the second determination submodule are times expressed in the twenty-four-hour system.
In particular, the intelligent updating device for the timed task further comprises a period determining module.
And the period determining module is used for determining the task starting execution period as the task ending execution period if the task execution period is determined to meet the preset condition according to the item execution time.
It can be clearly understood by those skilled in the art that the above apparatus provided in the embodiment of the present application can implement the intelligent updating method for timed tasks provided in the embodiment of the present application. The specific working processes of the devices and modules described above may refer to the corresponding processes of the method in the embodiments of the present application, and are not described herein again.
In the embodiments provided in this application, the coupling, direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication coupling through some interfaces, devices or modules, and may be in an electrical, mechanical or other form, and the embodiments of this application are not limited to this specifically.
In addition, each functional module in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated module can be realized in a form of hardware, and can also be realized in a form of a functional module of software.
Referring to fig. 7, fig. 7 is a block diagram illustrating an electronic device 400 according to an embodiment of the present disclosure. The electronic device 400 includes one or more processing terminals 410, a memory 420, and one or more application programs. One or more applications may be stored in the memory 420 and configured to be executed by the one or more processors 410, the one or more programs configured to perform the timed task intelligent update method as described in embodiments of the present application.
Processor 410 may include one or more processing cores. The processor 410 interfaces with various components throughout the electronic device 400 using various interfaces and circuitry for executing or executing instructions, programs, code sets, or instruction sets stored in the memory 420, as well as invoking execution or execution of data stored in the memory 420, performing various functions of the electronic device 400 and processing the data. Alternatively, the processor 410 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 410 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 410, but may be implemented by a communication chip.
The Memory 420 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). The memory 420 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 420 may include a program storage area and a data storage area. Wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, and the like. The storage data area may store data or the like created by the electronic device 400 in use.
Referring to fig. 8, fig. 8 is a block diagram illustrating a computer-readable storage medium 500 according to an embodiment of the present disclosure. The computer readable storage medium 500 has stored therein a program code 510, and the program code 510 can be called by a processor to execute the intelligent updating method for timed task described in the above method embodiments.
The computer-readable storage medium 500 may be an electronic Memory such as a flash Memory, an Electrically-Erasable Programmable Read-Only-Memory (EEPROM), an Erasable Programmable Read-Only-Memory (EPROM), a hard disk, or a ROM. Alternatively, the Computer-Readable Storage Medium 500 includes a Non-volatile Computer-Readable Medium (Non-TCRSM). The computer readable storage medium 500 has storage space for program code 510 for performing any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 510 may be compressed in a suitable form.
In summary, the embodiments of the present application provide an intelligent updating method and apparatus for a timed task, an electronic device, and a storage medium. The method comprises the steps of obtaining timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period; determining whether a task execution period meets a preset condition according to the item execution time; if the task execution period does not meet the preset condition according to the item execution time, converting the task starting execution period according to a preset rule to generate a task ending execution period; and updating the timing task information based on the task starting execution period and the task ending execution period. Therefore, the task ending execution period can be determined according to the task execution time and the task execution period so as to determine the specific execution date and execution time of the timing task, so that the timing task can be completely supplemented, and the controlled equipment can completely execute the timing task. For example, the timed tasks are to turn on every monday, wednesday 08:00:00 and turn off at 04:00: 00. At this time, the start execution time is 08:00:00, the end execution time is 04:00:00, and at this time, since the time span between the start execution time and the end execution time is unknown, the controlled device cannot accurately determine the end execution date, that is, the controlled device may turn off the light at 04:00:00 on tuesday and thursday, or may turn off the light at 04:00:00 on tuesday and saturday, so that the timing task cannot be completely executed. At this time, the controlled device can adopt the intelligent updating method for the timed task, and obtain the ending execution period of the timed task according to the execution time and the execution period of the timed task, so that the timed task is completely supplemented, the controlled device can completely execute the timed task, and the user experience is further improved.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. An intelligent updating method for a timed task is characterized by comprising the following steps:
acquiring timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period;
determining whether the task execution period meets a preset condition according to the item execution time;
if the task execution period does not meet the preset condition according to the item execution time, converting the task starting execution period according to a preset rule to generate a task ending execution period;
and updating the timing task information based on the task starting execution period and the task ending execution period.
2. The method of claim 1, wherein the transaction execution time comprises a start execution time and an end execution time, wherein the start execution time and the end execution time are no more than twenty-four hours apart;
the task starting execution period comprises a starting execution date of the timing task and loop instruction information used for indicating whether the timing task is executed in a loop mode.
3. The method according to claim 2, wherein the converting the task start execution cycle according to a preset rule to generate a task end execution cycle comprises:
determining the ending execution date of the timing task according to the starting execution date;
and generating a task ending execution period based on the ending execution date and the circulation instruction information.
4. The method of claim 3, wherein determining an ending execution date for the timed task based on the starting execution date comprises:
and taking the date one day after each of the start execution dates as the end execution date of the timed task.
5. The method of claim 2, wherein the start execution time and the end execution time are times expressed in a twenty-four time system, and the determining whether the task execution period satisfies a preset condition according to the event execution time comprises:
if the ending execution time is less than the starting execution time, determining that the task execution period does not meet a preset condition;
and if the ending execution time is not less than the starting execution time, determining that the task execution period meets a preset condition.
6. The method according to any one of claims 1 to 5, further comprising:
and if the task execution period meets the preset condition according to the item execution time, determining the task starting execution period as a task ending execution period.
7. The method of any of claims 1 to 5, wherein the timed task information further comprises transaction information, the transaction information comprising: turning on the specified device and turning off the specified device.
8. An intelligent updating device for timed tasks, comprising:
the information acquisition module is used for acquiring timing task information, wherein the timing task information comprises item execution time and a task execution period, and the task execution period comprises a task starting execution period;
the judging module is used for determining whether the task execution period meets a preset condition according to the item execution time;
the period generation module is used for converting the task starting execution period according to a preset rule and generating a task ending execution period if the task execution period is determined to not meet a preset condition according to the item execution time;
and the information updating module is used for updating the timing task information based on the task starting execution period and the task ending execution period.
9. An electronic device, comprising:
one or more processing terminals;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processing terminals, the one or more applications being configured to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, wherein a program code is stored in the computer-readable storage medium, and the program code can be called by a processing terminal to execute the method according to any one of claims 1 to 7.
CN202110496896.7A 2021-05-07 2021-05-07 Intelligent updating method and device for timed task, electronic equipment and storage medium Pending CN113176935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110496896.7A CN113176935A (en) 2021-05-07 2021-05-07 Intelligent updating method and device for timed task, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110496896.7A CN113176935A (en) 2021-05-07 2021-05-07 Intelligent updating method and device for timed task, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113176935A true CN113176935A (en) 2021-07-27

Family

ID=76928463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110496896.7A Pending CN113176935A (en) 2021-05-07 2021-05-07 Intelligent updating method and device for timed task, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113176935A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114120616A (en) * 2021-11-24 2022-03-01 深圳市欧瑞博科技股份有限公司 Infrared signal transmitting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775965A (en) * 2016-11-17 2017-05-31 腾讯科技(深圳)有限公司 A kind of processing method and processing device of timed task
CN109302633A (en) * 2018-10-16 2019-02-01 深圳Tcl数字技术有限公司 TV program order method for recording, device, smart television and readable storage medium storing program for executing
CN109559083A (en) * 2017-09-26 2019-04-02 北京国双科技有限公司 Date determines method and device
CN110764894A (en) * 2019-10-24 2020-02-07 北京锐安科技有限公司 Timed task management method, device, equipment and storage medium
CN111552545A (en) * 2020-04-15 2020-08-18 北京宝兰德软件股份有限公司 Task execution processing method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775965A (en) * 2016-11-17 2017-05-31 腾讯科技(深圳)有限公司 A kind of processing method and processing device of timed task
CN109559083A (en) * 2017-09-26 2019-04-02 北京国双科技有限公司 Date determines method and device
CN109302633A (en) * 2018-10-16 2019-02-01 深圳Tcl数字技术有限公司 TV program order method for recording, device, smart television and readable storage medium storing program for executing
CN110764894A (en) * 2019-10-24 2020-02-07 北京锐安科技有限公司 Timed task management method, device, equipment and storage medium
CN111552545A (en) * 2020-04-15 2020-08-18 北京宝兰德软件股份有限公司 Task execution processing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
左忠凯 等: "《FreeRTOS源码详解与应用开发-基于STM32》", vol. 2017, 北京航空航天大学出版社, pages: 270 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114120616A (en) * 2021-11-24 2022-03-01 深圳市欧瑞博科技股份有限公司 Infrared signal transmitting method and device, electronic equipment and storage medium
CN114120616B (en) * 2021-11-24 2023-03-28 深圳市欧瑞博科技股份有限公司 Infrared signal transmitting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108419453B (en) Lighting lamp control method and device and lighting lamp
CN104423970B (en) The dynamic programming and control of networked sensor and microcontroller
CN106791215B (en) Alarm clock setting method and mobile terminal with alarm clock function
CN109324902B (en) Method for adjusting working frequency of mobile terminal, mobile terminal and storage medium
WO2009038682A1 (en) Systems, devices, and/or methods for managing programmable logic controller processing
CN110515871B (en) Interrupt method, interrupt device, FPGA (field programmable Gate array) and storage medium
CN107870571B (en) Method and device for controlling intelligent equipment and intelligent equipment
CN111965989B (en) System updating method and device, intelligent home control panel and storage medium
WO2015129372A1 (en) Audio system
CN110110306B (en) Data display method and device, terminal and computer readable storage medium
EP3391211A1 (en) Controlling scheduling of a gpu
CN107332879B (en) Information pushing method, mobile terminal and storage medium
CN113176935A (en) Intelligent updating method and device for timed task, electronic equipment and storage medium
CN104346563A (en) Information processing method and electronic equipment
CN104898840A (en) Information processing method and apparatus, and electronic device
CN110794773A (en) Click-type scene creating method and device
CN112328289B (en) Firmware upgrading method, device, equipment and storage medium
CN113065113A (en) Device control method, mobile terminal, and computer-readable storage medium
US20210064275A1 (en) Control System, Development Assistance Device, and Development Assistance Program
US20130218302A1 (en) Distributed control system operation and configuation
CN109656577A (en) A kind of method and device of the customized ROM of industrial personal computer
CN111209613B (en) Rapid design method and system for intelligent product
CN112015450B (en) Method, device and storage medium for loading intelligent device control page
CN110262874B (en) Novel internet of things multitasking operating system and method based on java virtual machine
CN112559158A (en) Micro-service timing task scheduling method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210727