Task creation method and electronic equipment
By converting the initial time data of smart device tasks into a unified format and comparing them with historical task data, the problem of repeated task creation is solved, reducing the processing volume of smart devices and improving the efficiency of task creation.
Patent Information
- Application Number
- CN202310653131.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-12-03
AI Technical Summary
During the application of smart devices, the repeated creation of tasks leads to an increase in the processing volume of smart devices. How to ensure that new tasks and established tasks are not duplicated is an important issue.
By obtaining the initial time data of the target task, converting it into the target reference time data in a unified format, and comparing it with the historical reference time data of the historical task. If there is no overlap, create the target task to avoid repeated task establishment.
It effectively avoids repeated creation of tasks, reduces the data processing volume of smart devices, and improves the efficiency of task creation.
Smart Images

Figure CN119065801A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task creation method and electronic device. Background Art
[0002] In the application process of some smart devices, it is necessary to regularly detect or control certain devices (hereinafter referred to as smart devices, such as smart water heaters) to make the devices run better. For example, a user can create a maintenance task through an electronic device and send the maintenance task to the smart device so that the smart device can run the maintenance task.
[0003] However, in actual applications, there are many different tasks, which may lead to repeated creation of tasks in many cases. Repeated creation of tasks may increase the processing capacity of smart devices.
[0004] Therefore, it is particularly important to ensure that new tasks do not duplicate existing tasks. Summary of the invention
[0005] In an exemplary embodiment of the present application, a task creation method and an electronic device are provided to ensure that a newly created task does not overlap with an established task, thereby reducing the amount of data processing of a smart device.
[0006] According to a first aspect of an exemplary implementation, a task creation method is provided, the method comprising at least the following steps:
[0007] Get the initial time data of the target task;
[0008] Converting the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task;
[0009] Compare the reference time data with the historical reference time data of the historical tasks to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical tasks;
[0010] If not, create the target task based on the initial time data.
[0011] According to a second aspect of the exemplary implementation, there is provided an electronic device, including a processor and a data transmission unit:
[0012] The data transmission unit is configured to perform: obtaining initial time data of a target task;
[0013] The processor is configured to execute: converting the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task;
[0014] Compare the reference time data with the historical reference time data of the historical tasks to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical tasks;
[0015] If not, create the target task based on the initial time data.
[0016] According to a third aspect of an exemplary embodiment, there is provided a task creation device, the device comprising:
[0017] A data acquisition unit, used to: acquire initial time data of a target task;
[0018] A data conversion unit, used to: convert the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task;
[0019] A data comparison unit, used to compare the reference time data with the historical reference time data of the historical task, and determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical task;
[0020] The task creation unit is used to create a target task according to the initial time data when a first time represented by the target reference time data and a second time represented by the historical reference time data do not overlap.
[0021] According to a fourth aspect of the exemplary implementation, a computer storage medium is provided, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the task creation method of the first aspect.
[0022] The application embodiment converts the initial time data of the target task into target reference time data with unified format and parameters, and compares it with the historical reference time data corresponding to the historical task. In this process, the data format and parameters are unified through data conversion. When the first time represented by the target reference time data and the second time represented by the historical reference time data do not overlap, the target task is created according to the initial time data of the target task. Such a design can avoid the repeated establishment of the target task and the historical task, and reduce the data processing amount of the smart device. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0024] Figure 1 An example of an application scenario diagram of a task creation method provided by an embodiment of the present application is shown;
[0025] Figure 2 A flowchart of a task creation method provided by an embodiment of the present application is exemplified;
[0026] Figure 3 A flowchart of converting target initial time data into target reference time data provided by an embodiment of the present application is exemplarily shown;
[0027] Figure 4 An exemplary flowchart of another method of converting target initial time data into target reference time data provided by an embodiment of the present application is shown;
[0028] Figure 5 An exemplary flowchart of another method of converting target initial time data into target reference time data provided by an embodiment of the present application is shown;
[0029] Figure 6 A flowchart of a comparison process of a first time of a target task and a second time of a historical task provided by an embodiment of the present application is exemplified;
[0030] Figure 7 A flowchart of another comparison process of a first time of a target task and a second time of a historical task provided by an embodiment of the present application is exemplified;
[0031] Figure 8 A schematic diagram showing a different target task provided by an embodiment of the present application is exemplified;
[0032] Fig. 9 The following is a schematic diagram showing the structure of a task creation device provided in an embodiment of the present application;
[0033] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is exemplarily shown. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiment of the present application clearer, the technical solution in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. First, the terms in the embodiment of the present application are explained:
[0035] (1) In the initial time data of the target task, if it is a periodic task, the parameter indicating the period is called the task period. In order to distinguish the difference before and after data conversion, the parameter indicating the period in the target parameter time data is called the execution period. The two are concepts of the same attribute, and both are used to indicate the execution frequency of a task.
[0036] (2) In the initial time data of the target task, if it is a single task, the parameter indicating the date is called the task date. In order to distinguish the difference before and after data conversion, the parameter indicating the date converted into the target parameter time data is called the execution date. The two are concepts of the same attribute, and both are used to indicate the date of execution of a task.
[0037] In the application process of some smart devices, it is necessary to regularly detect or control the devices so that the devices can run better. For example, a user can create a maintenance task through an electronic device and send the maintenance task to a smart device so that the smart device can run the maintenance task.
[0038] However, in actual applications, there are many different tasks, which may lead to repeated creation of tasks in many cases. Repeated creation of tasks increases the processing capacity of smart devices.
[0039] Therefore, it is particularly important to ensure that new tasks do not duplicate existing tasks.
[0040] For this reason, the embodiment of the present application provides a kind of task creation method, compares the time of each characterization of target task and historical task, and creates target task according to the initial time data of target task when the two do not overlap. In the process of comparison, for unification, the initial time data of target task and the historical time data of historical task are converted into reference time data of unified format, respectively corresponding. The reference time data here includes one or more of the start time, end time, execution cycle and execution date of the task. Such design ensures that the newly created task (target task) does not repeat with the established task (historical task), thereby reducing the data processing amount of intelligent device.
[0041] After introducing the design ideas of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0042] refer to Figure 1 , shows an application scenario diagram of a task creation method, wherein the electronic device 11 responds to the user's task creation request, and applies the method of the embodiment of the present application to process, creates a target task, and sends the target task to the smart device 12. The smart device 12 executes the target task.
[0043] In one implementation, during the execution of the embodiment of the present application, the initial time data and the historical reference time data of the historical task may be pre-stored in the electronic device 11. Alternatively, the electronic device 11 may request the smart device 12 to obtain the data when detecting a task creation request. This is just an example and does not constitute a specific limitation.
[0044] Figure 1 In the figure, the electronic device 11 is exemplified by a mobile phone, and the smart device 12 is exemplified by a smart water heater.
[0045] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiment of the present application.
[0046] Combine the following Figure 1 The application scenario shown is shown in Figure 2 A flowchart of a task creation method is shown to illustrate the technical solution provided by an embodiment of the present application.
[0047] S201: Obtaining initial time data of a target task.
[0048] S202: Convert the initial time data into target reference time data.
[0049] The target reference time data includes one or more of the start time, end time, execution period and execution date of the target task.
[0050] S203: Compare the reference time data with the historical reference time data of the historical tasks to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
[0051] The historical reference time data is determined based on the initial time data of the historical tasks.
[0052] S204: When the first time represented by the target reference time data and the second time represented by the historical reference time data do not overlap, create a target task according to the initial time data.
[0053] In the embodiment of the present application, the initial time data of the target task is converted into target reference time data in a unified format, and compared with the historical reference time data corresponding to the historical task. In this process, the data format and parameters are unified through data conversion. In the case where the first time represented by the target reference time data and the second time represented by the historical reference time data do not overlap, the target task is created according to the initial time data of the target task. Such a design can avoid the repeated establishment of the target task and the historical task, and reduce the amount of data processing obtained by the smart device.
[0054] This relates to S201, in which the target task can also be called a newly created task, indicating a task that has not yet been established. Optionally, the target task can be an interval task or a moment task, a periodic task or a single task. An interval task may be a task that is executed within a time interval, such as 8:00-10:00; a moment task may be a task that is executed at a time, such as 9:00. A periodic task may be executed once every Wednesday; a single task may be executed only once. In addition, the target task can be a cross-day task or a non-cross-day task. A cross-day task means that the start time and the end time belong to two days. The initial time data of the target task may be data used to describe the task type.
[0055] Regarding S202, due to different task types, the format and content of their initial time data may be different. Therefore, in order to improve the accuracy of the comparison, the initial time data of the target task is converted into target reference time data, which includes one or more of the start time, end time, execution cycle and execution date of the target task.
[0056] Next, the process of converting the initial time data into the target reference time data is explained from different dimensions and divided into the following different situations:
[0057] The process of converting the initial time data into the target reference time data is an assignment process. If the parameters in the initial time data and the parameters in the target reference time data are the same, the assignment can be performed directly; if they are different, the assignment is performed after conversion.
[0058] The first case Q1: periodic task or single task, refer to Figure 3 .
[0059] S300: Determine whether the target task is a periodic task or a one-time task.
[0060] S301: If the target task is a periodic task, determine that the execution period in the target reference time data is the cycle period in the initial time data.
[0061] Among them, if the target task is a periodic task, for example, the cycle is executed once every Wednesday, then for the cycle parameter, during the conversion process, it is determined that the execution cycle in the target reference time data is the same as the cycle cycle in the initial time data, that is, it is executed once every Wednesday.
[0062] S302: If the target task is a single task, determine the execution date in the target reference time data according to the task date in the initial time data, and determine the execution period in the target reference time data to be the cycle period converted from the task date in the initial time data.
[0063] If the target task is a single task, the execution date in the target reference data can be determined based on whether the single task is a time task. In addition, the execution period in the target reference time data is determined to be the cycle period obtained by converting the task date in the initial time data. For example, if the task date is May 26, 2023, it is converted to Wednesday.
[0064] The embodiment of the present application explains the process of determining the execution period and execution date in the target reference time data from the perspective of whether the target task is a periodic task or a one-time task, and unifies the execution period and execution date in the initial time data of the target task and the initial time data of the historical task.
[0065] The second case Q2: single task and moment task, refer to Figure 4 .
[0066] S400: When the target task is a single task, determine whether the target task is a moment task.
[0067] Among them, when the target task is a single task, it may be an interval task or a time interval task. If it is an interval task, it can be directly determined whether it is a cross-day task based on the start time and end time of the interval; if it is a time task, it can be processed in the following way.
[0068] S401: If the target task is a single task and a moment task, the task date in the initial time data is converted into an execution date in the zero time zone.
[0069] Due to the existence of time zones, for a single task and a moment task, the execution date may be the task date or the next day of the task date. Therefore, in order to distinguish, the concept of zero time zone is introduced. The task date in the initial time data is converted to the execution date of zero time zone.
[0070] S402: Determine whether the target task is a multi-day task based on the execution date of the zero time zone. If so, execute S403; otherwise, execute S404.
[0071] If the execution date of the zero time zone obtained is different from the task date, the target task is determined to be a cross-day task; if the execution date of the zero time zone obtained is the same as the task date, the target task is determined to be a non-cross-day task.
[0072] S403: Determine that the execution date in the target reference time data is the task date in the initial time data.
[0073] If the target task is a task that spans multiple days, the execution date in the target reference time data may be determined to be the task date in the initial time data.
[0074] S404: Determine that the execution date in the target reference time data is the day after the task date in the initial time data.
[0075] If the target task is a non-multi-day task, the execution date in the target reference time data may be determined to be the task date in the initial time data.
[0076] In the embodiment of the present application, the target task is explained to be a single task and a time task, and the cross-day situation of the target task and how to determine whether it is a cross-day are explained, thereby achieving more accurate time comparison.
[0077] The third case: cross-day interval tasks, non-cross-day interval tasks and time tasks, refer to Figure 5 .
[0078] S500: Determine whether the target task is an interval task or a moment task. If the target task is an interval task, execute S501; if the target task is a moment task, execute S504.
[0079] S501: Determine whether the target task is a multi-day task, if so, execute S502, otherwise execute S503.
[0080] Among them, whether the target task is a cross-day task can be directly judged according to the start time and end time of the interval task.
[0081] S502: Convert the initial time data into two target reference time data.
[0082] The start time in the first target reference time data is the start time in the initial time data, and the end time in the first target reference time data is 23:59:59. The start time in the second target reference time data is 00:00:00, and the end time in the second target reference time data is the start time in the initial time data.
[0083] S503: Determine that the start time in the target reference time data is the start time in the initial time data, and the end time in the target reference time data is the end time in the initial time data.
[0084] When the target task interval is an interval task and is not a multi-day task, the values of the start time and the end time in the target reference time data can be directly assigned to the start time and the end time in the target reference time data.
[0085] S504: Determine that the start time and the end time in the target reference time data are both the task time in the initial time data.
[0086] When the target task is a time task, the start time and the end time in the target reference time data are the same, which are both the task time in the initial time data.
[0087] The embodiment of the present application describes the process of determining the start time and end time in the target reference time data, depending on whether the target task is a cross-day task or a non-cross-day task.
[0088] It should be noted that the above process is a process for determining the target reference time data, and the process for determining the historical reference time data is the same and will not be repeated here.
[0089] After the initial time data is converted into the target reference time data, S203 is involved in comparing the reference time data with the historical reference time data of the historical tasks to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
[0090] The historical reference time data is determined based on the initial time data of the historical tasks.
[0091] In one embodiment, the comparison process can be achieved by referring to Figure 6 :
[0092] S600: If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, execute S601.
[0093] It may be determined first whether the time intervals overlap. For example, if the first time interval is 08:00:00-08:10:00 and the second time interval is 08:03:00-08:20:00, it is determined that the two time intervals overlap.
[0094] S601: Determine whether the first execution date in the target reference time data is the same as the second execution date in the historical reference time data. If so, execute S602.
[0095] In the case of overlapping time intervals, determine whether the execution dates are the same. For example, if the first execution date is 2023.5.28 and the second execution date is 2023.5.29, then the execution dates do not overlap.
[0096] S602: Determine whether the first execution cycle in the target reference time data is the same as the second execution cycle in the historical reference time data. If so, execute S603.
[0097] In the case of overlapping execution dates, it is determined whether the execution periods are the same. In the actual application process, if the periodic task has no execution date, the execution date value is empty. Empty is different from any execution date.
[0098] S603: Determine whether a first time represented by the target reference time data overlaps with a second time represented by the historical reference time data.
[0099] In the case of overlapping time intervals, overlapping execution dates and overlapping execution cycles, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference data.
[0100] The embodiment of the present application is a processing process when both the first time interval and the second time interval have execution dates, that is, when both the target task and the historical task are single tasks.
[0101] In another embodiment, the comparison process also has the following situation, see Figure 7 :
[0102] S700: If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, and one of the target reference time data and the historical reference time data does not have an execution date, then execute S701.
[0103] The absence of an execution date means that the execution date is empty. In other words, the task without an execution date is a periodic task. In this case, you can directly compare whether the execution periods of the two tasks are the same.
[0104] S701: Determine whether the first execution cycle in the target reference time data is the same as the second execution cycle in the historical reference time data. If so, execute S702.
[0105] For a single task, its execution cycle can be obtained by converting the execution date. For example, if the execution date is 2023.5.29, the first execution cycle converted is Wednesday. If the second execution cycle is executed every Wednesday, it can be determined that the two execution cycles are the same.
[0106] S702: Determine whether a first time represented by the target reference time data overlaps with a second time represented by the historical reference time data.
[0107] In this case, when the two execution cycles are the same, it can be determined that the first time and the second time overlap.
[0108] The embodiment of the present application is a processing process when at least one of the first time interval and the second time interval does not have an execution date, that is, when at least one of the target task and the historical task is a periodic task.
[0109] Determine whether the first time interval overlaps with the second time interval by:
[0110] If the start time or the end time of the first time interval is within the second time interval; or the start time or the end time of the second time interval is within the first time interval, it is determined that the first time interval overlaps with the second time interval.
[0111] For example, the start time of the first time interval is greater than or equal to the start time of the second time interval, and less than or equal to the end time of the second time interval; or, the end time of the first time interval is greater than the start time of the second time interval, and less than or equal to the end time of the second time interval; or, the start time of the second time interval is greater than or equal to the start time of the first time interval, and less than or equal to the end time of the first time interval; or, the end time of the second time interval is greater than the start time of the first time interval, and less than or equal to the end time of the first time interval.
[0112] In order to make the technical solution of this application more perfect, refer to Figure 8 , the embodiments of the present application are described in at least four different situations as follows:
[0113] Case A: The target task is an interval task and a periodic task.
[0114] In this case, the initial time data of the target task includes: start time, end time, cycle period and time zone. Among them, according to the start time and end time, it can be judged whether the target task is a cross-day task or a non-cross-day task. For example, if the start time is 23:00:00 and the end time is 07:00:00, the target task is a cross-day task. The cycle period is, for example, executed once every Wednesday.
[0115] Case B: The target task is an interval task and a single task.
[0116] In this case, the initial time data of the target task includes: start time, end time, task date and time zone. The task date is a specific day, such as 2023.5.31. According to the start time and end time, it can be determined whether the target task is a cross-day task or a non-cross-day task.
[0117] Case C: The target task is a moment task and a periodic task.
[0118] In this case, the initial time data of the target task includes: execution time, cycle period and time zone. Among them, the cycle period is, for example, once every Wednesday, and the execution time is, for example, 8:00:00. In this case, since it is a periodic task and a time task, it is usually a non-cross-day task.
[0119] Case D: The target task is a momentary task and a single task.
[0120] In this case, the initial time data of the target task includes: execution time, task date and time zone. Among them, the execution date can be determined to be the task date or the next day of the task date according to the relationship between the task date and the task date after the task date is converted into the zero time zone.
[0121] Optionally, the first time zone information carried in the target reference time data is the same as the second time zone information carried in the initial reference time data. If they are different, they can be converted to the same time zone information for comparison.
[0122] The embodiment of the present application can determine whether two times overlap by comparing the time of the system, thereby avoiding the duplication of tasks. The implementation is simple and the versatility is strong.
[0123] like Fig. 9 As shown, based on the same inventive concept, an embodiment of the present application provides a task creation device, including: a data acquisition unit 91, a data conversion unit 92, a data comparison unit 93 and a task creation unit 94.
[0124] The data acquisition unit 91 is used to: acquire the initial time data of the target task;
[0125] The data conversion unit 92 is used to convert the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task;
[0126] The data comparison unit 93 is used to compare the reference time data with the historical reference time data of the historical task to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical task;
[0127] The task creation unit 94 is used to create a target task according to the initial time data when the first time represented by the target reference time data and the second time represented by the historical reference time data do not overlap.
[0128] In an exemplary implementation, the data comparison unit 93 is specifically used for:
[0129] If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, determining whether the first execution date in the target reference time data is the same as the second execution date in the historical reference time data;
[0130] If so, determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data;
[0131] If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
[0132] In an exemplary embodiment, the data comparison unit 93 is further used for:
[0133] If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, and one of the target reference time data and the historical reference time data does not have an execution date, then determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data;
[0134] If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
[0135] In an exemplary embodiment, the data comparison unit 93 is further used for:
[0136] If the start time or the end time of the first time interval is within the second time interval; or the start time or the end time of the second time interval is within the first time interval, it is determined that the first time interval overlaps with the second time interval.
[0137] In an exemplary implementation, the data conversion unit 92 is specifically configured to:
[0138] If the target task is a periodic task, the execution period in the target reference time data is determined to be the cycle period in the initial time data;
[0139] If the target task is a single task, the execution date in the target reference time data is determined according to the task date in the initial time data, and the execution period in the target reference time data is determined to be the cycle period converted from the task date in the initial time data.
[0140] In an exemplary implementation, the data conversion unit 92 is specifically configured to:
[0141] If the target task is a single task and a moment task, the task date in the initial time data is converted to the execution date of the zero time zone, and whether the target task is a multi-day task is determined based on the execution date of the zero time zone;
[0142] If so, the execution date in the target reference time data is determined to be the task date in the initial time data; otherwise, the execution date in the target reference time data is determined to be the day after the task date in the initial time data.
[0143] In an exemplary implementation, the data conversion unit 92 is specifically configured to:
[0144] If the target task is an interval task and a task that spans days, the initial time data is converted into two target reference time data; wherein the start time in the first target reference time data is the start time in the initial time data; and the end time in the second target reference time data is the start time in the initial time data;
[0145] If the target task is an interval task and is not a multi-day task, the start time in the target reference time data is determined to be the start time in the initial time data, and the end time in the target reference time data is determined to be the end time in the initial time data;
[0146] If the target task is a time task, it is determined that the start time and the end time in the target reference time data are both the task time in the initial time data.
[0147] In an exemplary implementation, the first time zone information carried in the target reference time data is the same as the second time zone information carried in the initial reference time data.
[0148] Since the device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0149] like Fig.10 As shown, based on the same inventive concept, an electronic device provided in an embodiment of the present application includes a processor 1001 and a data transmission unit 1002:
[0150] The data transmission unit 1002 is configured to perform: obtaining initial time data of the target task;
[0151] Processor 1001 is configured to execute: converting the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task;
[0152] Compare the reference time data with the historical reference time data of the historical tasks to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical tasks;
[0153] If not, create the target task based on the initial time data.
[0154] In an exemplary implementation, the processor 1001 is specifically configured to execute:
[0155] If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, determining whether the first execution date in the target reference time data is the same as the second execution date in the historical reference time data;
[0156] If so, determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data;
[0157] If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
[0158] In an exemplary implementation, the processor 1001 is specifically configured to execute:
[0159] If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, and one of the target reference time data and the historical reference time data does not have an execution date, then determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data;
[0160] If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
[0161] In an exemplary implementation, the processor 1001 is specifically configured to execute:
[0162] If the start time or the end time of the first time interval is within the second time interval; or the start time or the end time of the second time interval is within the first time interval, it is determined that the first time interval overlaps with the second time interval.
[0163] In an exemplary implementation, the processor 1001 is specifically configured to execute:
[0164] If the target task is a periodic task, the execution period in the target reference time data is determined to be the cycle period in the initial time data;
[0165] If the target task is a single task, the execution date in the target reference time data is determined according to the task date in the initial time data, and the execution period in the target reference time data is determined to be the cycle period converted from the task date in the initial time data.
[0166] In an exemplary implementation, the processor 1001 is specifically configured to execute:
[0167] If the target task is a single task and a moment task, the task date in the initial time data is converted to the execution date of the zero time zone, and whether the target task is a multi-day task is determined based on the execution date of the zero time zone;
[0168] If so, the execution date in the target reference time data is determined to be the task date in the initial time data; otherwise, the execution date in the target reference time data is determined to be the day after the task date in the initial time data.
[0169] In an exemplary implementation, the processor 1001 is specifically configured to execute:
[0170] If the target task is an interval task and a task that spans days, the initial time data is converted into two target reference time data; wherein the start time in the first target reference time data is the start time in the initial time data; and the end time in the second target reference time data is the start time in the initial time data;
[0171] If the target task is an interval task and is not a multi-day task, the start time in the target reference time data is determined to be the start time in the initial time data, and the end time in the target reference time data is determined to be the end time in the initial time data;
[0172] If the target task is a time task, it is determined that the start time and the end time in the target reference time data are both the task time in the initial time data.
[0173] In an exemplary implementation, the first time zone information carried in the target reference time data is the same as the second time zone information carried in the initial reference time data.
[0174] The embodiment of the present application also provides a computer storage medium, in which computer program instructions are stored. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned task creation method.
[0175] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0176] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0179] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A task creation processing method, characterized in that: include: Get the initial time data of the target task; Converting the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task; Comparing the target reference time data with the historical reference time data of the historical task to determine whether a first time represented by the target reference time data overlaps with a second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical task; If not, the target task is created according to the initial time data.
2. The method according to claim 1, characterized in that The determining whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data includes: If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, determining whether the first execution date in the target reference time data is the same as the second execution date in the historical reference time data; If so, determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data; If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
3. The method according to claim 2, characterized in that The method further comprises: If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, and one of the target reference time data and the historical reference time data does not have an execution date, determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data; If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: If the start time or the end time of the first time interval is within the second time interval; or the start time or the end time of the second time interval is within the first time interval, it is determined that the first time interval overlaps with the second time interval.
5. The method according to claim 1, characterized in that The converting the initial time data into target reference time data comprises: If the target task is a periodic task, determining the execution period in the target reference time data to be the cycle period in the initial time data; If the target task is a single task, the execution date in the target reference time data is determined according to the task date in the initial time data, and the execution period in the target reference time data is determined to be the cycle period converted from the task date in the initial time data.
6. The method according to claim 5, characterized in that The step of determining the execution period in the target reference time data according to the cycle period in the initial time data comprises: If the target task is a single task and a time task, the task date in the initial time data is converted into an execution date of the zero time zone, and whether the target task is a multi-day task is determined according to the execution date of the zero time zone; If so, the execution date in the target reference time data is determined to be the task date in the initial time data; otherwise, the execution date in the target reference time data is determined to be the day after the task date in the initial time data.
7. The method according to claim 1, characterized in that The converting the initial time data into target reference time data comprises: If the target task is an interval task and a multi-day task, the initial time data is converted into two target reference time data; wherein the start time in the first target reference time data is the start time in the initial time data; and the end time in the second target reference time data is the start time in the initial time data; If the target task is an interval task and is not a multi-day task, then determine that the start time in the target reference time data is the start time in the initial time data, and the end time in the target reference time data is the end time in the initial time data; If the target task is a time task, it is determined that the start time and the end time in the target reference time data are both the task time in the initial time data.
8. The method according to any one of claims 1 to 3 and 5 to 7, characterized in that: The first time zone information carried in the target reference time data is the same as the second time zone information carried in the initial reference time data.
9. An electronic device, characterized in that: Including processor and data transmission unit: The data transmission unit is configured to execute: obtaining initial time data of a target task; The processor is configured to execute: converting the initial time data into target reference time data; wherein the target reference time data includes one or more of the start time, end time, execution period and execution date of the target task; Comparing the reference time data with the historical reference time data of the historical task to determine whether the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data; wherein the historical reference time data is determined based on the initial time data of the historical task; If not, the target task is created according to the initial time data.
10. The electronic device according to claim 9, characterized in that: The processor is specifically configured to execute: If the first time interval represented by the target reference time data overlaps with the second time interval represented by the historical reference time data, determining whether the first execution date in the target reference time data is the same as the second execution date in the historical reference time data; If so, determining whether the first execution period in the target reference time data is the same as the second execution period in the historical reference time data; If so, it is determined that the first time represented by the target reference time data overlaps with the second time represented by the historical reference time data.
