Periodic strategy component generation method and device, medium and equipment

Through the periodic policy component generation method, the problem of complex scheduled task configuration in cloud computing is solved, cross-time zone scheduled task management and effective time control are realized, and task configuration efficiency and flexibility are improved.

CN118607964APending Publication Date: 2024-09-06SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410789875.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In a cloud computing environment, existing technologies are difficult to effectively trigger and manage scheduled tasks, especially in application scenarios in different time zones, resulting in complex and inefficient configuration of scheduled tasks.

Method used

Provide a method to generate periodic strategy components. Select the periodic strategy type (by day, week, month) through the configuration page, convert the trigger node set by the user into a standard node, and generate a cron expression to construct a periodic strategy component that supports different Time zone usage and effective time range configuration.

Benefits of technology

It simplifies the configuration process of scheduled tasks, reduces repeated code development, improves the generation efficiency of periodic policy components, supports the use of different time zones, and is widely used in cloud computing and other scheduled task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607964A
    Figure CN118607964A
Patent Text Reader

Abstract

The invention provides a period strategy component generation method and device, a medium and equipment. The method comprises the following steps: providing a periodic strategy type configuration page, so that a user selects a periodic strategy type on the periodic strategy type configuration page; taking the periodic strategy type selected by the user as a target periodic strategy type; a strategy attribute configuration page corresponding to the target period strategy type is provided, so that a user configures an operable attribute on the strategy attribute configuration page, and the operable attribute comprises a trigger node; determining the time zone of the user; according to the conversion relation between the time zone where the user is located and the world standard time, the trigger node set by the user is converted into a standard trigger node; generating a period strategy expression of a zero time zone according to the standard trigger node; and constructing a corresponding periodic strategy component according to the periodic strategy expression. A user can flexibly configure and operate simply, repeated code development is reduced, and the generation efficiency of the periodic strategy component is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of timed tasks, and in particular to a method, device, medium and equipment for generating a periodic strategy component. Background Art

[0002] At present, scheduled tasks are widely used in cloud computing, such as task scheduling, data processing, application updates, security monitoring, etc. The use of scheduled tasks in cloud computing can help enterprises and developers better manage and control the execution time and content of tasks, thereby improving work efficiency and reducing labor costs. The cloud computing environment can provide powerful computing power and storage space, making scheduled tasks more efficient and reliable. How to trigger scheduled tasks is very critical, so it is necessary to provide a periodic policy component for triggering scheduled tasks. Summary of the invention

[0003] In view of at least one of the above technical problems, an embodiment of the present invention provides a method, device, medium, and equipment for generating a periodic policy component.

[0004] According to a first aspect, a method for generating a periodic policy component provided by an embodiment of the present invention includes:

[0005] Providing a periodic policy type configuration page, so that the user can select a periodic policy type on the periodic policy type configuration page; wherein the periodic policy types available for the user to select include a daily repetition policy, a weekly repetition policy, and a monthly repetition policy;

[0006] The periodic policy type selected by the user is used as the target periodic policy type;

[0007] Providing a policy attribute configuration page corresponding to the target periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page, the operational attributes including trigger nodes;

[0008] Determine the user's time zone;

[0009] According to the conversion relationship between the time zone where the user is located and the world standard time, converting the trigger node set by the user into a standard trigger node;

[0010] According to the standard trigger node, a periodic policy expression of the zero time zone is generated;

[0011] According to the periodic policy expression, a corresponding periodic policy component is constructed.

[0012] In one embodiment, the method provided by the embodiment of the present invention further includes:

[0013] Provide a periodic policy effective time range configuration page, so that the user can configure the periodic policy effective time range on the periodic policy effective time range configuration page;

[0014] Correspondingly, constructing a corresponding periodic policy component according to the periodic policy expression includes: constructing a corresponding periodic policy component according to the periodic policy expression and the periodic policy effective time range.

[0015] In one embodiment, the trigger node set by the user for the daily repetition policy is a trigger time point in a day, and the corresponding standard trigger node includes a standard hour and a standard minute;

[0016] Correspondingly, the trigger node set by the user is converted into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time, including: converting the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; converting the minute in the trigger time point set by the user into the standard minute corresponding to the world standard time.

[0017] In one embodiment, generating a periodic policy expression for the zero time zone according to the standard trigger node includes: generating a corresponding cron expression according to the standard hour and the standard minute in the standard trigger node.

[0018] In one embodiment, the trigger node set by the user for the weekly repetition strategy is the week number in a week and the trigger time point in the week number; the corresponding standard trigger node includes the standard week number and the standard hour and standard minute in the standard week number;

[0019] Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time includes:

[0020] Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time;

[0021] Convert the minutes of the trigger time point set by the user into standard minutes corresponding to the world standard time;

[0022] If the user's time zone is East 8, determine whether the standard hour is greater than or equal to 16;

[0023] If the standard hour is greater than or equal to 16, the standard week number is set to the week number before the week number set by the user; wherein, if the week number set by the user is 1, the corresponding previous week number is 7;

[0024] If the standard hour is less than 16, the standard week number is set to the week number set by the user.

[0025] In one embodiment, generating a periodic policy expression for the zero time zone according to the standard trigger node includes: generating a corresponding cron expression according to the standard week number, the standard hour and the standard minute.

[0026] In one embodiment, the trigger node set by the user for the monthly repetition strategy is a date in a month and a trigger time point in the date; the corresponding standard trigger node includes a standard date and a standard hour and a standard minute in the standard date;

[0027] Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time includes:

[0028] Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time;

[0029] Convert the minutes of the trigger time point set by the user into standard minutes corresponding to the world standard time;

[0030] If the user's time zone is East 8, determine whether the standard hour is greater than or equal to 16;

[0031] If the standard hour is greater than or equal to 16, the standard date is set to the day before the date set by the user; if the date set by the user is 1, the corresponding day before is the last day of the previous month;

[0032] If the standard hour is less than 16, the standard date is set to the date set by the user;

[0033] Correspondingly, generating a periodic policy expression for the zero time zone according to the standard trigger node includes: generating a corresponding cron expression according to the standard date, the standard hour and the standard minute.

[0034] According to a second aspect, an embodiment of the present invention provides a periodic policy component generating device including:

[0035] A first providing module is used to provide a periodic policy type configuration page, so that the user can select a periodic policy type on the periodic policy type configuration page; wherein the periodic policy types available for the user to select include a daily repetition policy, a weekly repetition policy, and a monthly repetition policy;

[0036] A first determination module, configured to use the periodic policy type selected by the user as the target periodic policy type;

[0037] A second providing module is used to provide a policy attribute configuration page corresponding to the target periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page, and the operational attributes include trigger nodes;

[0038] A second determination module is used to determine the time zone where the user is located;

[0039] A first conversion module, configured to convert the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time;

[0040] An expression generation module, used to trigger the node according to the standard and generate a periodic policy expression for the zero time zone;

[0041] The component construction module is used to construct a corresponding periodic policy component according to the periodic policy expression.

[0042] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.

[0043] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.

[0044] The cycle policy component generation method and device, medium, and device provided by the embodiment of the present invention, the user can select the cycle policy type on the cycle policy type configuration page, and then the cycle policy type selected by the user is used as the target cycle policy type, and then the policy attribute configuration page corresponding to the target cycle policy type is provided, so that the user configures the trigger node on the policy attribute configuration page, converts the trigger node set by the user to the standard trigger node of the zero time zone, and then generates the cycle policy expression of the zero time zone according to the standard trigger node, and then obtains the cycle policy component. That is to say, in the embodiment of the present invention, the user can select the cycle policy type, and then configure the trigger node on the policy attribute configuration page corresponding to the cycle policy type selected by the user, and then convert the trigger node configured by the user to the standard trigger node of the zero time zone, and then form the cycle policy expression according to the standard trigger node, so as to construct the cycle policy component. It can be seen that the user can flexibly configure in various application scenarios and then obtain the required cycle policy component, and the user operation is also very simple, so that the developer does not need to develop a cycle policy component for the timed tasks in each application scenario, which reduces the repeated code development and improves the generation efficiency of the cycle policy component. Moreover, the embodiment of the present invention supports users in different time zones. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a process flow of a method for generating a periodic strategy component in one embodiment of the present invention;

[0046] Figure 2 It is a structural block diagram of a periodic strategy component generating device in one embodiment of the present invention. DETAILED DESCRIPTION

[0047] In a first aspect, an embodiment of the present invention provides a method for generating a periodic strategy component. Figure 1 The method comprises the following steps S110 to S170:

[0048] S110, providing a periodic policy type configuration page, so that the user can select a periodic policy type on the periodic policy type configuration page; wherein the periodic policy types selectable by the user include a daily repetition policy, a weekly repetition policy, and a monthly repetition policy;

[0049] That is, the computing device provides a periodic policy type configuration page at the front end, so that the user can select the periodic policy type to be configured on the periodic policy type configuration page. The periodic policy types available for the user to select on the periodic policy type configuration page include daily repetition policy, weekly repetition policy and monthly repetition policy, and the user can select one of them.

[0050] S120, using the periodic policy type selected by the user as the target periodic policy type;

[0051] S130, providing a policy attribute configuration page corresponding to the target periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page, the operational attributes including trigger nodes;

[0052] That is to say, after the user selects a periodic policy type, the periodic policy type selected by the user is used as the target periodic policy type, and then the front end of the computing device provides a policy attribute configuration page corresponding to the periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page. The operational attributes include trigger nodes, which are necessary elements for generating periodic policy components.

[0053] S140, determining the time zone where the user is located;

[0054] S150, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time;

[0055] For example, the user's time zone is East 8, and the various data configured by the user on the above configuration page are data corresponding to East 8. The data of East 8 needs to be converted to data of zero time zone, that is, the trigger node set by the user is converted to the standard trigger node corresponding to the world standard time.

[0056] S160, generating a periodic policy expression for the zero time zone according to the standard trigger node;

[0057] S170. Construct a corresponding periodic policy component according to the periodic policy expression.

[0058] That is to say, after the standard trigger node is converted, a periodic policy expression of the zero time zone can be generated, and then the periodic policy expression of the zero time zone can be used to construct a periodic policy component, thereby generating a periodic policy component, and then applying the periodic policy component to scheduled tasks in various application scenarios.

[0059] In one embodiment, the method provided by the embodiment of the present invention may further include:

[0060] Provide a periodic policy effective time range configuration page, so that the user can configure the periodic policy effective time range on the periodic policy effective time range configuration page;

[0061] Correspondingly, constructing a corresponding periodic policy component according to the periodic policy expression includes: constructing a corresponding periodic policy component according to the periodic policy expression and the periodic policy effective time range.

[0062] That is to say, users can configure the periodic policy effective time range on the periodic policy effective time range configuration page. The periodic policy effective time range refers to the effective time of the periodic policy component. The periodic policy component will only take effect within this effective time range. If it exceeds this effective time range, the periodic policy component will become invalid.

[0063] In one embodiment, the trigger node set by the user for the daily repetition policy is a trigger time point in a day, and the corresponding standard trigger node includes a standard hour and a standard minute;

[0064] Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time includes:

[0065] Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time;

[0066] The minutes in the trigger time point set by the user are converted into standard minutes corresponding to the world standard time.

[0067] That is to say, if the user selects a daily repetition strategy, that is, the scheduled task needs to be triggered once a day, then the trigger time point of each day needs to be determined, that is, the trigger node set by the user includes hours and minutes. After conversion to a standard trigger node, the standard trigger node includes standard hours and standard minutes. The specific conversion process is: convert the hours in the trigger node set by the user into the standard hours corresponding to the world standard time, and convert the minutes in the trigger node set by the user into the standard minutes corresponding to the world standard time.

[0068] Further, generating a periodic policy expression for the zero time zone according to the standard trigger node includes: generating a corresponding cron expression according to the standard hour and the standard minute in the standard trigger node. For example, the cron expression is cron = "0" + mnutes() + "" + hours + "? **".

[0069] In one embodiment, the trigger node set by the user for the weekly repetition strategy is the week number in a week and the trigger time point in the week number; the corresponding standard trigger node includes the standard week number and the standard hour and standard minute in the standard week number.

[0070] It can be seen that if the user selects a weekly repeat strategy, then when setting a trigger node, the week numbers that can be selected are 1, 2, 3, 4, 5, 6, and 7. The user selects a week number from these week numbers, for example, selecting 3 means selecting Wednesday. Then select the hour and minute on Wednesday. After the user selects the week number and the hour and minute in the week number, the trigger node set by the user is converted to a standard trigger node.

[0071] Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time may include:

[0072] Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time;

[0073] Convert the minutes of the trigger time point set by the user into standard minutes corresponding to the world standard time;

[0074] If the user's time zone is East 8, determine whether the standard hour is greater than or equal to 16;

[0075] If the standard hour is greater than or equal to 16, the standard week number is set to the week number before the week number set by the user; wherein, if the week number set by the user is 1, the corresponding previous week number is 7;

[0076] If the standard hour is less than 16, the standard week number is set to the week number set by the user.

[0077] That is, the hour set by the user is converted to the standard hour corresponding to the zero time zone, and the minute set by the user is converted to the standard minute corresponding to the zero time zone. If the user's time zone is East 8, then determine whether the standard hour is greater than or equal to 16. If it is greater than or equal to 16, the standard week number needs to be set to the day before the week number set by the user, and if the week number set by the user is 1, then the corresponding standard week number is 7. Of course, if the standard hour is less than 16, the standard week number is directly set to the week number set by the user, without moving forward one day.

[0078] Based on the above steps, the standard week number, standard hour and standard minute can be obtained.

[0079] In one embodiment, generating a periodic policy expression for the zero time zone according to the standard trigger node includes: generating a corresponding cron expression according to the standard week number, the standard hour and the standard minute.

[0080] For example, the cron expression is: cron = "0" + mnutes() + "" + hours + "? *" + weeksString.

[0081] In one embodiment, the trigger node set by the user for the monthly repetition policy is a date in a month and a trigger time point in the date; the corresponding standard trigger node includes a standard date and a standard hour and a standard minute in the standard date.

[0082] That is, if the user selects a monthly recurrence strategy, the user can select a date range of 1, 2, 3, 4, 5, 6, 7 ... 29, 30, 31. After the user selects a date, he or she selects the hour and minute under the date. Then the date, hour, and minute are converted to their corresponding standard date, standard hour, and standard minute.

[0083] Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time may include:

[0084] Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time;

[0085] Convert the minutes of the trigger time point set by the user into standard minutes corresponding to the world standard time;

[0086] If the user's time zone is East 8, determine whether the standard hour is greater than or equal to 16;

[0087] If the standard hour is greater than or equal to 16, the standard date is set to the day before the date set by the user; if the date set by the user is 1, the corresponding day before is the last day of the previous month;

[0088] If the standard hour is less than 16, the standard date is set to the date set by the user.

[0089] That is, the hour set by the user is converted to the standard hour, and the minute set by the user is converted to the standard minute. If the user's time zone is East 8, it is determined whether the standard hour is greater than or equal to 16. If it is greater than or equal to 16, the standard date is set to the day before the date set by the user. Of course, if the date set by the user is 1, the standard date is set to the last day of the previous month, so that the standard date, standard hour and standard minute are obtained. If the standard hour is less than 16, the standard date is set to the date set by the user, without having to move forward one day.

[0090] Furthermore, generating a periodic policy expression for the zero time zone according to the standard trigger node may include: generating a corresponding cron expression according to the standard date, the standard hour and the standard minute.

[0091] For example, the cron expression is cron = "0" + mnutes() + "" + hours + "" + daysString + "*?".

[0092] Among them, cron expression is a string expression used to specify a task to be executed at a certain time point or periodically. The configuration of cron expression is simple and convenient, so it is widely used in scheduled scheduling tasks. Cron expression contains multiple parameters, each parameter represents a different time unit. The format of cron expression is as follows: second minute hour month week year.

[0093] It is understandable that, based on the widespread application of scheduled tasks, an embodiment of the present invention provides a generation scheme for a periodic policy component, which supports the generation of cron expressions for triggering the execution of scheduled tasks, thereby reducing duplicate code development, facilitating portability and effectively improving the efficiency of application development.

[0094] It can be seen that in the embodiment of the present invention, the types of periodic policies available for users to choose include daily repeating periodic policies, weekly repeating periodic policies, and monthly repeating periodic policies. In the daily repeating periodic policy, the user can set the trigger time point in a day to generate the corresponding cron expression. In the weekly repeating periodic policy, the user can select a fixed week number and trigger time point within a week to generate the corresponding cron expression. In the monthly repeating periodic policy, the user can select a fixed date and trigger time point within a month to generate the corresponding cron expression.

[0095] Moreover, the embodiment of the present invention can also set the effective time range of the periodic policy, so as to limit the effective time range of the periodic policy component. For example, for the weekly repeating periodic policy, the effective time range of the periodic policy component is set to March, that is, the effective time range of the periodic policy component is March.

[0096] Among them, the periodic policy component is a front-end component. The embodiment of the present invention can construct a periodic policy component based on the user's operation on the front-end interface. The periodic policy component is used in a timed task system and can be applied to application scenarios such as elastic scaling of resources, scheduled periodic backup of data, and scheduled synchronization of files.

[0097] It can be seen that the method provided by the embodiment of the present invention can reduce duplicate code development, effectively improve the efficiency of application development, and the periodic policy component constructed by the embodiment of the present invention can be widely used in the field of cloud computing and other scenarios involving scheduled tasks, which has great implementation significance. In addition, the embodiment of the present invention is very flexible and supports user operations in different time zones. It also supports setting the effective time.

[0098] In a second aspect, an embodiment of the present invention provides a periodic strategy component generation device, see Figure 2 , the device 100 comprises:

[0099] The first providing module 110 is used to provide a periodic policy type configuration page, so that the user can select a periodic policy type on the periodic policy type configuration page; wherein the periodic policy types selectable by the user include a daily repetition policy, a weekly repetition policy, and a monthly repetition policy;

[0100] A first determination module 120, configured to use the periodic policy type selected by the user as a target periodic policy type;

[0101] A second providing module 130 is used to provide a policy attribute configuration page corresponding to the target periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page, and the operational attributes include trigger nodes;

[0102] A second determination module 140 is used to determine the time zone where the user is located;

[0103] A first conversion module 150, configured to convert the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time;

[0104] An expression generation module 160, for generating a periodic policy expression for the zero time zone according to the standard trigger node;

[0105] The component construction module 170 is used to construct a corresponding periodic policy component according to the periodic policy expression.

[0106] In one embodiment, the apparatus provided by the embodiment of the present invention may further include:

[0107] A third providing module is used to provide a periodic policy effective time range configuration page, so that the user can configure the periodic policy effective time range on the periodic policy effective time range configuration page;

[0108] Correspondingly, the component construction module is specifically used to construct a corresponding periodic policy component according to the periodic policy expression and the periodic policy effective time range.

[0109] In one embodiment, the trigger node set by the user for the daily repetition policy is a trigger time point in a day, and the corresponding standard trigger node includes a standard hour and a standard minute;

[0110] Correspondingly, the first conversion module is specifically used to: convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; convert the minute in the trigger time point set by the user into the standard minute corresponding to the world standard time.

[0111] In one embodiment, the expression generation module is specifically used to generate a corresponding cron expression according to the standard hour and the standard minute in the standard trigger node.

[0112] In one embodiment, the trigger node set by the user for the weekly repetition strategy is the week number in a week and the trigger time point in the week number; the corresponding standard trigger node includes the standard week number and the standard hour and standard minute in the standard week number;

[0113] Correspondingly, the first conversion module is specifically used to: convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; convert the minute in the trigger time point set by the user into the standard minute corresponding to the world standard time; if the time zone where the user is located is East 8, determine whether the standard hour is greater than or equal to 16; if the standard hour is greater than or equal to 16, set the standard week number to the week number before the week number set by the user; wherein, if the week number set by the user is 1, the corresponding previous week number is 7; if the standard hour is less than 16, set the standard week number to the week number set by the user.

[0114] In one embodiment, the expression generation module is used to generate a corresponding cron expression according to the standard week number, the standard hour and the standard minute.

[0115] In one embodiment, the trigger node set by the user for the monthly repetition strategy is a date in a month and a trigger time point in the date; the corresponding standard trigger node includes a standard date and a standard hour and a standard minute in the standard date;

[0116] Correspondingly, the first conversion module is specifically used to: convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; convert the minute in the trigger time point set by the user into the standard minute corresponding to the world standard time; if the time zone where the user is located is East 8, determine whether the standard hour is greater than or equal to 16; if the standard hour is greater than or equal to 16, set the standard date to the day before the date set by the user; wherein, if the date set by the user is 1, the corresponding previous day is the last day of the previous month; if the standard hour is less than 16, set the standard date to the date set by the user;

[0117] Correspondingly, the expression generation module is used to generate a corresponding cron expression according to the standard date, the standard hour and the standard minute.

[0118] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0119] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0120] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

[0121] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0122] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0123] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0124] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0125] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0126] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.

[0127] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0128] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0129] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0130] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating a periodic strategy component, characterized in that: include: Providing a periodic policy type configuration page, so that the user can select a periodic policy type on the periodic policy type configuration page; wherein the periodic policy types available for the user to select include a daily repetition policy, a weekly repetition policy, and a monthly repetition policy; The periodic policy type selected by the user is used as the target periodic policy type; Providing a policy attribute configuration page corresponding to the target periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page, the operational attributes including trigger nodes; Determine the user's time zone; According to the conversion relationship between the time zone where the user is located and the world standard time, converting the trigger node set by the user into a standard trigger node; According to the standard trigger node, a periodic policy expression of the zero time zone is generated; According to the periodic policy expression, a corresponding periodic policy component is constructed.

2. The method according to claim 1, characterized in that Also includes: Provide a periodic policy effective time range configuration page, so that the user can configure the periodic policy effective time range on the periodic policy effective time range configuration page; Correspondingly, constructing a corresponding periodic policy component according to the periodic policy expression includes: constructing a corresponding periodic policy component according to the periodic policy expression and the periodic policy effective time range.

3. The method according to claim 1, characterized in that The trigger node set by the user for the daily repetition strategy is a trigger time point in a day, and the corresponding standard trigger node includes a standard hour and a standard minute; Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time includes: Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; The minutes in the trigger time point set by the user are converted into standard minutes corresponding to the world standard time.

4. The method according to claim 3, characterized in that The triggering node according to the standard to generate a periodic policy expression for the zero time zone includes: A corresponding cron expression is generated according to the standard hour and the standard minute in the standard trigger node.

5. The method according to claim 1, characterized in that The trigger node set by the user for the weekly repetition strategy is the week number in a week and the trigger time point in the week number; the corresponding standard trigger node includes the standard week number and the standard hour and standard minute in the standard week number; Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time includes: Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; Convert the minutes of the trigger time point set by the user into standard minutes corresponding to the world standard time; If the user's time zone is East 8, determine whether the standard hour is greater than or equal to 16; If the standard hour is greater than or equal to 16, the standard week number is set to the week number before the week number set by the user; wherein, if the week number set by the user is 1, the corresponding previous week number is 7; If the standard hour is less than 16, the standard week number is set to the week number set by the user.

6. The method according to claim 5, characterized in that The triggering node according to the standard to generate a periodic policy expression for the zero time zone includes: A corresponding cron expression is generated according to the standard week number, the standard hour, and the standard minute.

7. The method according to claim 1, characterized in that The trigger node set by the user for the monthly repetition strategy is a date in a month and a trigger time point in the date; the corresponding standard trigger node includes a standard date and a standard hour and standard minute in the standard date; Correspondingly, converting the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time includes: Convert the hour in the trigger time point set by the user into the standard hour corresponding to the world standard time; Convert the minutes of the trigger time point set by the user into standard minutes corresponding to the world standard time; If the user's time zone is East 8, determine whether the standard hour is greater than or equal to 16; If the standard hour is greater than or equal to 16, the standard date is set to the day before the date set by the user; if the date set by the user is 1, the corresponding day before is the last day of the previous month; If the standard hour is less than 16, the standard date is set to the date set by the user; Correspondingly, generating a periodic policy expression for the zero time zone according to the standard trigger node includes: generating a corresponding cron expression according to the standard date, the standard hour and the standard minute.

8. A periodic strategy component generation device, characterized in that: include: A first providing module is used to provide a periodic policy type configuration page, so that the user can select a periodic policy type on the periodic policy type configuration page; wherein the periodic policy types available for the user to select include a daily repetition policy, a weekly repetition policy, and a monthly repetition policy; A first determination module, configured to use the periodic policy type selected by the user as the target periodic policy type; A second providing module is used to provide a policy attribute configuration page corresponding to the target periodic policy type, so that the user can configure operational attributes on the policy attribute configuration page, and the operational attributes include trigger nodes; A second determination module is used to determine the time zone where the user is located; A first conversion module, configured to convert the trigger node set by the user into a standard trigger node according to the conversion relationship between the time zone where the user is located and the world standard time; An expression generation module, used to trigger the node according to the standard and generate a periodic policy expression for the zero time zone; The component construction module is used to construct a corresponding periodic policy component according to the periodic policy expression.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.