Periodic schedule management method, device and terminal equipment
By storing cycle rules and identifications of cycle schedules in the database and dynamically generating sub-schedule lists during query, the problem of database pressure under large-scale use is solved and system performance is improved.
Patent Information
- Application Number
- CN202111400804.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-11-24
AI Technical Summary
When the prior art is used on a large scale, the amount of sub-schedule data for the calculation and storage cycle schedule is huge, resulting in increased database pressure and affecting system performance.
By directly storing the cycle schedule loop rules and cycle schedule identification set by the association in the database, and when querying is required, the pre-associated stored loop rules are queried according to the cycle schedule identification, all sub-schedules of the current cycle schedule are generated, and the serial number pair is used. Each sub-schedule identification obtains the schedule list information with the serial number identification of the current cycle schedule.
It effectively reduces the amount of data that needs to be stored in the database during the cycle schedule, reduces the pressure on the database, and improves system performance.
Smart Images

Figure CN114078000B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus and terminal device for managing a periodic schedule. Background Art
[0002] When storing periodic schedule data, the existing solution is: first, all sub-schedules are automatically generated according to the periodic schedule recurrence rules set by the user, and then these sub-schedules are stored in the database. For example, if a daily recurring periodic schedule is created starting from the 1st and ending on the 3rd, three sub-schedules for the 1st, 2nd and 3rd will be generated, and then the three schedule data will be stored in the database. When the details of the sub-schedule need to be queried, the data in the database is directly read, and when the sub-schedule in a periodic schedule needs to be modified or deleted, the sub-schedule records in the database are directly processed.
[0003] However, if the above-mentioned solution of calculating and storing sub-schedules is used on a large scale, a large amount of data will be generated, which will increase the pressure on the database and affect the system performance. For example, to create a daily schedule for a year, 365 sub-schedules need to be generated. Based on 100,000 enterprises, each enterprise creates 100 periodic schedules, which will generate 100,000*100*365=3.65 billion sub-schedule data. The amount of data is very large. With the continuous use of the system, the number of enterprises and the number of periodic schedules created will continue to increase. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method, apparatus and terminal device for managing a periodic schedule, which can effectively reduce the amount of data stored in a database and reduce the pressure on the database.
[0005] An embodiment of the present application provides a method for managing a periodic schedule, including:
[0006] Get the periodic schedule identifier;
[0007] Querying the pre-associated stored periodic schedule recurrence rule according to the periodic schedule identifier;
[0008] Generate all sub-schedules of the current periodic schedule according to the periodic schedule recurrence rule;
[0009] All sub-schedules are sorted according to the order of schedule time, and each sub-schedule is identified with a serial number to obtain schedule list information containing serial number identifications of the current periodic schedule.
[0010] In some embodiments, the periodic schedule management method further includes:
[0011] According to the sequence number and periodic schedule identifier of the target sub-schedule to be managed, the information of the target sub-schedule is changed;
[0012] The changed sub-schedule information is stored in the form of a schedule exception, and the serial number and periodic schedule identifier of the target sub-schedule are used as the unique identifier of the schedule exception.
[0013] In some embodiments, the change includes modifying or deleting the sub-schedule information.
[0014] In some embodiments, the periodic schedule management method further includes:
[0015] According to the target sequence number to be queried, query whether there is a schedule exception for the target sequence number;
[0016] If there is a special schedule, the latest sub-schedule information recorded in the special schedule is returned; otherwise, the atomic schedule information identified by the target sequence number in the schedule list information is returned.
[0017] In some embodiments, the periodic schedule management method further includes:
[0018] According to the target time period to be queried, the periodic schedule identifiers of all candidate periodic schedules within the target time period are obtained;
[0019] Obtaining schedule list information of each candidate periodic schedule according to the corresponding periodic schedule identifier;
[0020] Eliminate the sub-schedules that do not contain the target time period in each schedule list information;
[0021] Check whether there is a special schedule with a corresponding serial number in the retained sub-schedule information, and if so, replace the atomic schedule information recorded in the schedule list information with the sub-schedule information recorded in the special schedule to obtain the final schedule list information of the target time period.
[0022] In some embodiments, the periodic schedule identifier and the periodic schedule recurrence rule are stored in a pre-associated manner, including:
[0023] Acquire the cycle schedule recurrence rules input by the user in the cycle schedule setting interface, wherein the recurrence rules include the set schedule basic information, recurrence type, and recurrence start and end rules;
[0024] A unique periodic schedule identifier is allocated for each setting, and the periodic schedule recurrence rule is associated with the unique periodic schedule identifier and stored to generate a periodic schedule with the unique periodic schedule identifier.
[0025] In some embodiments, the cycle type includes at least one of a daily cycle, a weekly cycle, a monthly cycle, and a yearly cycle, and each cycle type supports setting of a cycle interval.
[0026] In some embodiments, the cycle start and end rules include a cycle start time and a cycle end type, wherein the cycle end type includes at least one of a cycle deadline based on end by time and a cycle specified number of times based on end by number.
[0027] The embodiment of the present application also provides a periodic schedule management device, including:
[0028] An identification acquisition module, used to acquire a periodic schedule identification;
[0029] A rule query module, used for querying the pre-associated and stored periodic schedule recurrence rule according to the periodic schedule identifier;
[0030] A sub-schedule generation module, used to generate all sub-schedules of the current periodic schedule according to the periodic schedule cycle rule;
[0031] The list generation module is used to sort all sub-schedules according to the order of schedule time, and use the serial number to identify each sub-schedule to obtain the schedule list information containing the serial number identification of the current periodic schedule.
[0032] An embodiment of the present application further provides a terminal device, the terminal device comprising a processor and a memory, the memory storing a computer program, and the processor being configured to execute the computer program to implement the above-mentioned periodic schedule management method.
[0033] An embodiment of the present application further provides a readable storage medium storing a computer program, wherein when the computer program is executed on a processor, the above-mentioned periodic schedule management method is implemented.
[0034] The embodiments of the present application have the following beneficial effects:
[0035] The management method of the periodic schedule of the embodiment of the present application directly stores the periodic schedule recurrence rules and periodic schedule identifiers set in association in the database, and when a query is needed, obtains the periodic schedule identifier to be queried; queries the periodic schedule recurrence rules stored in association in advance according to the periodic schedule identifier; generates all sub-schedules of the current periodic schedule according to the periodic schedule recurrence rules; sorts all sub-schedules according to the order of the schedule time, and uses a serial number to identify each sub-schedule, and obtains the schedule list information of the current periodic schedule containing the serial number identifier. This method can effectively reduce the amount of data that needs to be stored in the database for periodic schedules, reduce database pressure, and improve system performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A first flow chart showing a method for managing a periodic schedule according to an embodiment of the present application is shown;
[0038] Figure 2 A schematic diagram showing a periodic schedule setting interface of an embodiment of the present application is shown;
[0039] Figure 3 A second flow chart showing the method for managing a periodic schedule according to an embodiment of the present application is shown;
[0040] Figure 4 A third flow chart showing the method for managing a periodic schedule according to an embodiment of the present application is shown;
[0041] Figure 5 A fourth flow chart showing a method for managing a periodic schedule according to an embodiment of the present application;
[0042] Figure 6 A schematic diagram showing an application of the periodic schedule management method of an embodiment of the present application;
[0043] Figure 7 A schematic diagram of the structure of a periodic schedule management device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0044] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0045] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0046] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0047] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0048] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0049] Some terms that appear in the embodiments of the present application are explained below.
[0050] Periodic schedule: A schedule that is generated repeatedly according to certain rules. A periodic schedule contains one or more schedules. Except for the time (start / end time of the schedule), all other attributes of each schedule in the periodic schedule are the same.
[0051] Sub-schedule: represents a separate schedule in a periodic schedule.
[0052] Schedule list: A collection of all sub-schedules calculated based on the recurrence rule of a periodic schedule, and sorted in ascending order according to the schedule start time.
[0053] Schedule exceptions: For the editing or deletion operations of sub-schedules in a periodic schedule, the results of the operation are recorded in the database. This part of data is called schedule exceptions. The maximum number of schedule exceptions in a periodic schedule does not exceed the total number of sub-schedules.
[0054] Since the management of periodic schedules may include multiple operations such as adding, storing, querying, modifying and deleting periodic schedules, in order to reduce the data storage volume and processing pressure of the database, etc., the embodiments of the present application will mainly be described from the aspects of storage, access and update.
[0055] Example 1
[0056] Please refer to Figure 1This embodiment proposes a periodic schedule management method, which can be used in situations where a large number of periodic schedules need to be managed.
[0057] Exemplarily, the periodic schedule management method includes steps S110 to S140:
[0058] Step S110, obtaining a periodic schedule identifier.
[0059] Step S120: query the pre-associated and stored periodic schedule recurrence rule according to the periodic schedule identifier.
[0060] Among them, the above-mentioned periodic schedule identification is also a periodic schedule ID, which is used to uniquely identify different periodic schedules set by the user. In this embodiment, before creating a periodic schedule, the specific cycle rules of the periodic schedule can be determined according to the actual situation of the current periodic schedule, and then the corresponding settings are made in the setting interface of the periodic schedule application. Furthermore, the terminal device installed with the periodic schedule application, such as a computer, a client mobile terminal, etc., obtains the periodic schedule cycle rules input by the user in the periodic schedule setting interface, and assigns a unique periodic schedule ID to this setting, and associates the periodic schedule cycle rules with the periodic schedule ID for storage. Among them, the associated stored periodic schedule ID and cycle rules will be used for the subsequent generation of the required periodic schedule.
[0061] In one embodiment, the recurrence rules of the periodic schedule may include, but are not limited to, the settings of the schedule basic information, recurrence type, and recurrence start and end rules. The schedule basic information mainly refers to the specific execution information of the sub-schedule, which may include the start time, duration, and / or end time of the sub-schedule on the day. The recurrence type refers to the type of recurrence of the schedule basic information. For example, the recurrence type may include at least one of daily recurrence, weekly recurrence, monthly recurrence, and annual recurrence. In addition, for each of the above recurrence types, the recurrence interval setting may also be supported. Figure 2 As shown, if you choose to cycle weekly, you can further select which day or days of the week to execute. And the cycle start and end rules mainly include the cycle start time and the cycle end type. For example, the cycle end type may include but is not limited to at least one of the cycle deadline based on time end, the number of times based on the specified number of times end, etc.
[0062] It is worth noting that when storing the created periodic schedule, the present embodiment does not store the specific periodic schedule information after generation in the database, but stores the cycle rules of the above-mentioned periodic schedule. When the user needs to query, the corresponding schedule list information can be generated in real time according to the cycle rules stored in the database. It can be understood that compared with storing all the sub-schedule information of a periodic schedule, since only one creation-related record needs to be stored at this time, the storage method of the present embodiment will greatly reduce the storage pressure on the database.
[0063] Since each periodic schedule is assigned a unique periodic schedule ID when it is created, and the periodic schedule ID and the cycle rule of the periodic schedule are pre-associated and stored, exemplary, when a certain periodic schedule information needs to be queried, the periodic schedule ID can be obtained from the corresponding query request. Then, according to the periodic schedule ID, a query is performed in the database to obtain the cycle rule data with the same ID in the database, so as to be used for generating the corresponding periodic schedule on site.
[0064] Step S130: Generate all sub-schedules of the current periodic schedule according to the periodic schedule recurrence rule.
[0065] Exemplarily, all sub-schedules of the current periodic schedule can be determined based on the acquired cycle start time, cycle type, and cycle end time. For example, if a periodic schedule with a cycle start time of November 1 and a cycle end time of November 5 is a daily cycle with a 2-day interval, all sub-schedules include the 3 sub-schedules of November 1, 3, and 5. Alternatively, if a periodic schedule with a monthly cycle and a cycle number of 4 times starting on March 20 is a monthly cycle, all sub-schedules include the 4 sub-schedules of March 20, April 20, May 20, and June 20, etc.
[0066] It can be understood that the schedule time calculation here corresponds to the date rules at that time. For example, if the 31st of each month is cycled, if there is no 31st, it will be processed as the last day of the month.
[0067] Step S140, sort all sub-schedules according to the order of schedule time, and use a serial number to identify each sub-schedule, so as to obtain schedule list information containing serial number identification of the current periodic schedule.
[0068] Exemplarily, after all the sub-schedules are obtained, all the sub-schedules are sorted according to the time sequence, that is, the start time is from small to large, to obtain the corresponding schedule list. In addition, each sub-schedule is also identified with a sequence number (seq) during sorting, so that it is convenient to query a certain sub-schedule and speed up the query efficiency. For example, taking the above-mentioned all sub-schedules, that is, including the four sub-schedules of March 20, April 20, May 20 and June 20, as an example, the corresponding sequence numbers seq are 1, 2, 3 and 4 respectively. When the seq of the query request is 3, the sub-schedule information of May 20 will be returned.
[0069] Furthermore, in actual use, the user may also need to edit or delete sub-schedules in a periodic schedule. If the existing solution is used, the specified sub-schedule can be easily changed. Since the database in this embodiment stores a cyclic rule, in order to ensure the validity of the user's change operation on the sub-schedule, that is, the updated schedule information is presented in subsequent queries, this embodiment will use schedule exceptions to implement the change operation on the sub-schedule.
[0070] For example, Figure 3 As shown, the periodic schedule management method also includes:
[0071] Step S210: modify the information of the target sub-schedule according to the sequence number and periodic schedule identifier of the target sub-schedule to be managed.
[0072] Step S220: Store the changed sub-schedule information in the form of a schedule exception, and use the serial number and periodic schedule identifier of the target sub-schedule as the unique identifier of the schedule exception.
[0073] For example, when a user edits or modifies a sub-schedule information, the information of the sub-schedule in the schedule list can be queried based on the sequence number seq of the sub-schedule and the periodic schedule ID of the periodic schedule to which it belongs. Furthermore, after the user edits, for example, for the sub-schedule with seq=2, the title is edited from "XXX" to "YYY" and saved, a new record will be added to the schedule exception table of the database, which uses the periodic schedule ID and sequence number seq=2 as the primary key, and stores all the schedule information after the change, including the title "YYY" and the original unchanged basic information, but excluding the recurring rules. Further optionally, when the user edits the same sub-schedule multiple times, there will be only one schedule exception to ensure that the data of the schedule exception is the result saved at the last operation.
[0074] Furthermore, when it is necessary to query the data of seq=2, first, according to the periodic schedule ID, the schedule list information is obtained according to the above steps S110 to S140. Figure 4As shown, after the above step S140, the periodic schedule management method further includes:
[0075] Step S310, according to the target sequence number to be queried, whether there is a schedule exception for the target sequence number. If there is a schedule exception, step S320 is executed, otherwise step S330 is executed.
[0076] Step S320: If there is a special schedule, the atomic schedule information is replaced with the latest sub-schedule information recorded in the special schedule and returned, that is, the latest sub-schedule information recorded in the special schedule is returned.
[0077] Step S330: If there is no special schedule, the atomic schedule information identified by the target sequence number in the schedule list information is returned.
[0078] In addition, if the user deletes a sub-schedule during the change operation, the deleted schedule exception will also be saved in the database, and other operations are the same as the above-mentioned editing of sub-schedules. For example, for a daily cyclic schedule from 1 to 3, if the user deletes the sub-schedule with seq=2, a new record will be added to the schedule exception table of the database, with the cyclic schedule ID and the sequence number seq=2 as the primary key, to store the deleted sub-schedule information. When querying, the date corresponding to the sub-schedule will not display the originally set sub-schedule information.
[0079] As an optional solution, for a user, there may be multiple schedules in one day, and there may be multiple sub-schedules of periodic schedules. Considering that the user may need to query all the user's schedule information within a certain time period, the method of this embodiment also includes querying the schedule information of a time period.
[0080] For example, Figure 5 As shown, the periodic schedule management method further includes steps S410 to S450:
[0081] Step S410: acquiring the periodic schedule identifiers of all candidate periodic schedules within the target periodic schedule according to the target periodic schedule to be queried.
[0082] Specifically, when the user enters the time period information to be queried in the query interface, including the start time and the end time, after clicking the OK button, all periodic schedule identifiers that intersect with the time period are obtained from the database. For example, if the start time is June 6, 2021 and the end time is September 6, 2021, the periodic schedule identifier for June 6, 2021, the periodic schedule identifier for September 6, 2021, and all periodic schedule identifiers between June 6, 2021 and September 6, 2021 will be displayed.
[0083] Step S420: Obtain schedule list information of each candidate periodic schedule according to the corresponding periodic schedule identifier.
[0084] The candidate periodic schedules are periodic schedules that may be within the target time period. When a user searches for a schedule, the embodiment first searches for the periodic schedule IDs of the periodic schedules that may be within the specified range, and then obtains complete schedule information through the above steps S120 to S140.
[0085] Step S430: remove the sub-schedules that do not include the target time period in each schedule list information.
[0086] Considering that all the obtained schedule information may include a periodic schedule whose start time occurs before the target time period, in this embodiment, the sub-schedule information that is not in the query range is deleted, and only all the schedule information in the query range is retained.
[0087] Step S440: Check whether there is a special schedule with a corresponding sequence number in the retained sub-schedule information.
[0088] Step S450: When a schedule exception exists, the sub-schedule information recorded in the corresponding schedule exception replaces the atomic schedule information recorded in the schedule list information to obtain the final schedule list information of the target time period.
[0089] Since all retained schedule information is directly generated by the periodic schedule recurrence rules, it records the atomic schedule information. Considering that some sub-schedules may have schedule exceptions, in order to ensure that users obtain the latest change information of the corresponding sub-schedules, it will be queried here whether there are schedule exceptions to complete the replacement of the atomic schedule information, and finally obtain the latest schedule list information for the target time period.
[0090] As a preferred implementation, when an individual user queries all schedule information for a period of time through a client, in order to reduce the computing pressure on the server, the corresponding client can generate and remove schedule lists, such as Figure 6 As shown, a query request for the schedule exception is then sent to the server, so that the server returns the corresponding data. Finally, the client replaces the information of the corresponding sub-schedule according to the returned schedule exception data to obtain the latest schedule list information.
[0091] In addition, users can also edit some created periodic schedules, which can be achieved by using a replacement method, that is, deleting the original periodic schedule and all associated schedule exceptions, and then creating a new periodic schedule to achieve the effect of editing the periodic schedule.
[0092] The management method of the periodic schedule of this embodiment directly stores the periodic schedule recurrence rules and periodic schedule identifiers set in association in the database, and when a query is needed, the periodic schedule recurrence rules and periodic schedule identifiers are used to instantly generate the schedule list information to be queried. In addition, the schedule special case based on the serial number and the periodic schedule identifier as a unique identifier is used to replace the sub-schedule information to ensure that the latest information of the corresponding sub-schedule is obtained. The above method can effectively reduce the amount of data that needs to be stored in the database for periodic schedules, reduce database pressure, and improve system performance.
[0093] Example 2
[0094] Please refer to Figure 7 Based on the method of the above embodiment 1, this embodiment proposes a periodic schedule management device 100. Exemplarily, the periodic schedule management device 100 includes:
[0095] The identifier acquisition module 110 is used to acquire the periodic schedule identifier.
[0096] The rule query module 120 is used to query the pre-associated and stored periodic schedule recurrence rule according to the periodic schedule identifier.
[0097] The sub-schedule generating module 130 is used to generate all sub-schedules of the current periodic schedule according to the periodic schedule recurrence rule.
[0098] The list generation module 140 is used to sort all sub-schedules according to the order of schedule time, and use a serial number to identify each sub-schedule to obtain schedule list information containing serial number identifications for the current periodic schedule.
[0099] Furthermore, when the sub-schedule is modified, the periodic schedule management device further includes:
[0100] The change module is used to change the information of the target sub-schedule according to the serial number and periodic schedule identifier of the target sub-schedule that needs to be managed. The special case storage module is used to store the changed sub-schedule information in the form of a special schedule, and use the serial number and periodic schedule identifier of the target sub-schedule as the unique identifier of the special schedule.
[0101] Furthermore, when performing a query operation on a sub-schedule, the periodic schedule management device further includes:
[0102] The schedule query module is used to query whether there is a schedule exception of the target sequence number according to the target sequence number to be queried; and if there is a schedule exception, return the latest sub-schedule information recorded in the schedule exception, otherwise return the atomic schedule information identified by the target sequence number in the schedule list information.
[0103] Furthermore, when querying a schedule within a period of time, the periodic schedule management device further includes:
[0104] The candidate acquisition module is used to obtain the periodic schedule identifiers of all candidate periodic schedules that may be within the target time period to be queried; and, according to the corresponding periodic schedule identifiers, obtain the schedule list information of each candidate periodic schedule. The elimination module is used to eliminate the sub-schedules that do not contain the target time period in the schedule list information. The schedule query module is also used to query whether there is a schedule exception with a corresponding serial number in the retained sub-schedule information, and if so, replace the atomic schedule information recorded in the schedule list information with the sub-schedule information recorded in the schedule exception to obtain the final schedule list information for the target time period.
[0105] It can be understood that the device of this embodiment corresponds to the method of the above-mentioned embodiment 1, and the options in the above-mentioned embodiment 1 are also applicable to this embodiment, so they are not described repeatedly here.
[0106] The present application also provides a terminal device, which may be, for example, a computer, a user mobile terminal, etc. Exemplarily, the terminal device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program, thereby enabling the terminal device to execute the functions of each module in the above-mentioned periodic schedule management method or the above-mentioned periodic schedule management device.
[0107] The present application also provides a readable storage medium for storing the computer program used in the above-mentioned terminal device.
[0108] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0109] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0110] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0111] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for managing a periodic schedule, characterized in that: include: Acquire a periodic schedule identifier; wherein the periodic schedule identifier is pre-associated with the created periodic schedule recurrence rule and stored in a database; According to the periodic schedule identifier, query the database for the periodic schedule recurrence rule that is pre-associated and stored; Generate all sub-schedules of the current periodic schedule according to the periodic schedule recurrence rule; Sort all sub-schedules in order of schedule time, and use a serial number to identify each sub-schedule, to obtain schedule list information containing serial number identifications for the current period schedule; According to the sequence number and periodic schedule identifier of the target sub-schedule to be managed, the information of the target sub-schedule is changed; The changed sub-schedule information is stored in the form of a schedule exception, and the serial number and periodic schedule identifier of the target sub-schedule are used as the unique identifier of the schedule exception.
2. The method for managing a periodic schedule according to claim 1, characterized in that: The change includes modification or deletion of sub-schedule information.
3. The method for managing a periodic schedule according to claim 1 or 2, characterized in that: Also includes: According to the target sequence number to be queried, query whether there is a schedule exception for the target sequence number; If there is a special schedule, the latest sub-schedule information recorded in the special schedule is returned; otherwise, the atomic schedule information identified by the target sequence number in the schedule list information is returned.
4. The method for managing a periodic schedule according to claim 1 or 2, characterized in that: Also includes: According to the target time period to be queried, the periodic schedule identifiers of all candidate periodic schedules within the target time period are obtained; Obtaining schedule list information of each candidate periodic schedule according to the corresponding periodic schedule identifier; Eliminate the sub-schedules that do not contain the target time period in each schedule list information; Check whether there is a special schedule with a corresponding serial number in the retained sub-schedule information, and if so, replace the atomic schedule information recorded in the schedule list information with the sub-schedule information recorded in the special schedule to obtain the final schedule list information of the target time period.
5. The method for managing a periodic schedule according to claim 1, characterized in that: The periodic schedule identifier and the periodic schedule recurrence rule are stored in association with each other in advance, including: Acquire the cycle schedule recurrence rules input by the user in the cycle schedule setting interface, wherein the recurrence rules include the set schedule basic information, recurrence type, and recurrence start and end rules; A unique periodic schedule identifier is allocated for each setting, and the periodic schedule recurrence rule is associated with the unique periodic schedule identifier and stored to generate a periodic schedule with the unique periodic schedule identifier.
6. The method for managing a periodic schedule according to claim 5, characterized in that: The cycle type includes at least one of daily cycle, weekly cycle, monthly cycle and annual cycle, and each cycle type supports cycle interval time setting; The cycle start and end rules include a cycle start time and a cycle end type, wherein the cycle end type includes at least one of a cycle deadline based on a time end and a cycle specified number of times based on a number of ends.
7. A periodic schedule management device, characterized in that: include: An identification acquisition module, used for acquiring a periodic schedule identification; wherein the periodic schedule identification is pre-associated with the created periodic schedule recurrence rule and stored in a database; A rule query module, used for querying the periodic schedule recurrence rule pre-associated and stored from the database according to the periodic schedule identifier; A sub-schedule generation module, used to generate all sub-schedules of the current periodic schedule according to the periodic schedule cycle rule; The list generation module is used to sort all sub-schedules according to the order of schedule time, and use the serial number to identify each sub-schedule, so as to obtain the schedule list information containing the serial number identification of the current period schedule; A change module, used to change the information of the target sub-schedule according to the serial number and periodic schedule identifier of the target sub-schedule to be managed; The special case storage module is used to store the changed sub-schedule information in the form of a schedule special case, and use the serial number and periodic schedule identifier of the target sub-schedule as the unique identifier of the schedule special case.
8. A terminal device, characterized in that: The terminal device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the periodic schedule management method according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that: The device stores a computer program, which, when executed on a processor, implements the periodic schedule management method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Alarm clock setting method and terminal equipment
CN110581922A