CN108628603A - A kind of method, apparatus, equipment and storage medium that time setting value is provided - Google Patents

A kind of method, apparatus, equipment and storage medium that time setting value is provided Download PDF

Info

Publication number
CN108628603A
CN108628603A CN201710157313.1A CN201710157313A CN108628603A CN 108628603 A CN108628603 A CN 108628603A CN 201710157313 A CN201710157313 A CN 201710157313A CN 108628603 A CN108628603 A CN 108628603A
Authority
CN
China
Prior art keywords
time
dimension
setting value
time setting
month
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710157313.1A
Other languages
Chinese (zh)
Inventor
赵月明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710157313.1A priority Critical patent/CN108628603A/en
Publication of CN108628603A publication Critical patent/CN108628603A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of method, apparatus, equipment and storage medium providing time setting value, when coping with different business scenarios, avoid this mode of hard coded, the response speed of demand can be promoted, the working efficiency that programmer is not only referred to while avoiding the coding work of repeatability, also improves the scalability of program.The method of the offer time setting value of the present invention, including:Preserve the time template of business scenario;The time template for parsing the business scenario, to obtain time-triggered protocol function name and time parameter;Determine the time-triggered protocol function corresponding to the time-triggered protocol function name;The time setting value of the business scenario is calculated according to the time-triggered protocol function, the time parameter and current time in system.

Description

A kind of method, apparatus, equipment and storage medium that time setting value is provided
Technical field
The present invention relates to computer and its software technology field, more particularly to a kind of method that time setting value is provided, dress It sets, equipment and storage medium.
Background technology
Under certain business scenarios, need to give a time setting value to certain time-domains of list in webpage, such as The date of one yesterday of acquiescence is needed in one inquiry form.
In the prior art, it is typically realized by program hard coded, i.e., it will in computer program or text editing Variant variables are replaced with a fixed value, so that the value in the domain is set as yesterday to realize that dynamic changes the work(of default value Energy.
The shortcomings that prior art, when coping with different business scenarios, programmer needs to design different programmed logics Meet scene demand;But when demand changes, it is necessary to change programmed logic to realize, this mode of hard coded is not only led Caused demand response speed not in time the problem of, and the coding work of repeatability reduces the working efficiency of programmer again, Reduce the scalability of program.
Invention content
In view of this, the present invention provides a kind of method, apparatus, equipment and storage medium providing time setting value, When coping with different business scenarios, this mode of hard coded is avoided, the response speed of demand can be promoted, is avoiding repetition The working efficiency that programmer is not only referred to while the coding work of property, also improves the scalability of program.
To achieve the above object, according to the first aspect of the invention, a kind of method that time setting value is provided is provided.
The method of the offer time setting value of the present invention, including:Preserve the time template of business scenario;Parse the business The time template of scene, to obtain time-triggered protocol function name and time parameter;It determines corresponding to the time-triggered protocol function name Time-triggered protocol function;The industry is calculated according to the time-triggered protocol function, the time parameter and current time in system The time setting value for scene of being engaged in.
Optionally, before the step of time template of the parsing business scenario, further include:Use regular expression Determine that the time template of the scene is the template style of setting;Wherein, regular expression is:
(/ ^ $ ((DAY=(- |+)D+) | ((WEEK | MONTH)=(- |+)\d+,\d{1,2}))(,\d{2}:\d {2}:\d{2})$/);
Wherein, ^ indicates the starting position of matching input character string;DAY, WEEK and MONTH were indicated at the matched time Manage function name;WEEK | MONTH's | it indicates two matching conditions carrying out logic or operation;(-|\+)D+ indicate matching dimensionality Offset;, d { 1,2 } indicate matching dimensionality in number of days;,\d{2}:\d{2}:D { 2 } indicate match time;$ indicates that matching is defeated Enter the end position of character string.
Optionally, the time template of the parsing business scenario, to obtain time-triggered protocol function name and time parameter The step of include:The time template of the business scenario is split using string segmentation method;From the time mould after segmentation Time-triggered protocol function name and time parameter are determined in plate.
Optionally, the time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension packet Include a day dimension, day dimension=(dimension offset, Hour Minute Second) and according to the time-triggered protocol function, the time parameter, with And the current time in system is calculated the step of time setting value of the business scenario and includes:Determine the day of time setting value Phase, wherein the date of the date of time setting value=present system time+dimension offset;Determine that the time sets according to Hour Minute Second The specific time of definite value.
Optionally, the time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension packet Include Zhou Weidu, Zhou Weidu=(dimension offset, number of days in dimension, Hour Minute Second);And according to the time-triggered protocol function, described Time parameter and current time in system are calculated the step of time setting value of the business scenario and include:It determines current All numbers residing for system time;Determine all numbers residing for time setting value, wherein all numbers=current system residing for time setting value All numbers+dimension the offset united residing for the time);The month and date of time setting value are determined according to number of days in dimension;According to when Every minute and second determines the specific time of time setting value.
Optionally, the time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension packet Include a moon dimension;Month dimension=(dimension offset, number of days in dimension, Hour Minute Second);And according to the time-triggered protocol function, described Time parameter and current time in system are calculated the step of time setting value of the business scenario and include:Determine the time The month of setting value, wherein the month of the month of time setting value=present system time+dimension offset;According in dimension Number of days determines the date of time setting value;The specific time of time setting value is determined according to Hour Minute Second.
According to the second aspect of the invention, a kind of device that time setting value is provided is provided.
The device of the offer time setting value of the present invention, including:Preserving module, the time mould for preserving business scenario Plate;Parsing module, the time template for parsing the business scenario, to obtain time-triggered protocol function name and time parameter;Really Cover half block, for determining the time-triggered protocol function corresponding to the time-triggered protocol function name;Computing module, for according to it is described when Between processing function, the time parameter and current time in system the time setting value of the business scenario is calculated.
Optionally, further include detection module, be used for:Determine that the time template of the scene is setting using regular expression Template style;Wherein, regular expression is:
(/ ^ $ ((DAY=(- |+)D+) | ((WEEK | MONTH)=(- |+)\d+,\d{1,2}))(,\d{2}:\d {2}:\d{2})$/);
Wherein, ^ indicates the starting position of matching input character string;DAY, WEEK and MONTH were indicated at the matched time Manage function name;WEEK | MONTH's | it indicates two matching conditions carrying out logic or operation;(-|\+)D+ indicate matching dimensionality Offset;, d { 1,2 } indicate matching dimensionality in number of days;,\d{2}:\d{2}:D { 2 } indicate match time;$ indicates that matching is defeated Enter the end position of character string.
Optionally, the parsing module is additionally operable to:Using string segmentation method to the time template of the business scenario into Row segmentation;Then time-triggered protocol function name and time parameter are determined from the time template after segmentation.
Optionally, the time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension packet Include a day dimension, day dimension=(dimension offset, Hour Minute Second);Also, the computing module is additionally operable to:Determine time setting value Date, wherein the date of the date of time setting value=present system time+dimension offset;The time is determined according to Hour Minute Second The specific time of setting value.
Optionally, the time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension packet Include Zhou Weidu, Zhou Weidu=(dimension offset, number of days in dimension, Hour Minute Second);Also, the computing module is additionally operable to:It determines All numbers residing for present system time;Determine all numbers residing for time setting value, wherein all numbers residing for time setting value=when All numbers+dimension offset residing for preceding system time);The month and date of time setting value are determined according to number of days in dimension;Root The specific time of time setting value is determined according to Hour Minute Second.
Optionally, the time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension packet Include a moon dimension, the moon dimension=(dimension offset, number of days in dimension, Hour Minute Second);Also, the computing module is additionally operable to:It determines The month of time setting value, wherein the month of the month of time setting value=present system time+dimension offset;According to dimension Number of days determines the date of time setting value in degree;The specific time of time setting value is determined according to Hour Minute Second.
According to the third aspect of the present invention, a kind of equipment that time setting value is provided is provided.
The equipment of the offer time setting value of the present invention, including at least one processor;And at least one place Manage the memory of device communication connection;Wherein, the memory is stored with the instruction that can be executed by one processor, the finger It enables and being executed by least one processor, set so that at least one processor executes the offer time provided by the present invention The method of definite value.
According to the fourth aspect of the present invention, a kind of storage medium that non-transient computer is readable is provided.
The readable storage medium of non-transient computer of the invention, the non-transient computer readable storage medium storage meter Calculation machine instructs, and the computer instruction is used to make the computer to execute the side provided by the present invention for providing time setting value Method.
According to the technique and scheme of the present invention, it when coping with different business scenarios, can be set according to different scene demands Different time templates is set, this mode of hard coded is avoided, the response speed of demand can be promoted, is avoiding repeatability The working efficiency that programmer is not only referred to while coding work, also improves the scalability of program.
Description of the drawings
Attached drawing does not constitute inappropriate limitation of the present invention for more fully understanding the present invention.Wherein:
Fig. 1 is a kind of schematic diagram of method providing time setting value according to the ... of the embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of device providing time setting value according to the ... of the embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of equipment providing time setting value according to the ... of the embodiment of the present invention.
Specific implementation mode
It explains to the exemplary embodiment of the present invention below in conjunction with attached drawing, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.Together The description to known function and structure is omitted for clarity and conciseness in sample in following description.
Fig. 1 is a kind of schematic diagram of method providing time setting value according to the ... of the embodiment of the present invention.As shown in Figure 1, this The method of the offer time setting value of inventive embodiments includes mainly following step S10 to S13.
Step S10:Preserve the time template of business scenario.In different scenes, certain day time before needing to fill in, For example, the date of one yesterday of acquiescence is needed in inquiry form, thus need that the different time is arranged for different scenes Template.
Time template example in the embodiment of the present invention is as follows:
Format:
Several days before and after $ DAY=, time (optional, acquiescence 00:00:00);
Several weeks before and after $ WEEK=, what day (1~7), time (optional, acquiescence 00:00:00);
Several months before and after $ MONTH=, the date (more than being then this month last day), time (optional, acquiescence 00:00:00).
Above-mentioned is respectively the function of time name and time parameter corresponding to day dimension, Zhou Weidu and moon dimension;Wherein, The entitled $ DAY of the function of time corresponding to its dimension, time parameter are front and back several days (i.e. dimension offset), and the time is (that is, the time-division Second, default value 00:00:00);The entitled WEEK of the function of time corresponding to Zhou Weidu, time parameter are (to tie up in front and back several weeks Spend offset), what day (i.e. number of days in dimension, value range are the arbitrary integer between 1~7, what day is indicated), the time (that is, Hour Minute Second, default value 00:00:00);The entitled $ MONTH of the function of time corresponding to month dimension, time parameter is front and back Several months (i.e. dimension offset), the date, (i.e. number of days in dimension, value range were the arbitrary integer between 1~31, indicate specific The date of some month, more than being then this month last day);Time is (that is, Hour Minute Second, default value 00:00:00).
Example:
$ DAY=-1,00:00:00 indicates zero yesterday;
$ WEEK=-1,1 indicate zero last Monday;
$ MONTH=-1,1 indicate zero on last month 1.
Step S11:The time template for parsing the business scenario, to obtain time-triggered protocol function name and time parameter. In the step, the time template of business scenario is split using string segmentation method, then again from the template after segmentation Determine time-triggered protocol function name and time parameter.By "=" number segmentation function name and parameter in the embodiment of the present invention, "=" is left Side is time-triggered protocol function name, and the right is parameter;Parameters ", " number segmentation.
Before step S11, regular expression can also be used to judge the time template of the business scenario for setting Template style;If so, continuing to parse template;Otherwise, null value is returned;It in this way can be by examining in advance template Core improves the calculating speed of time setting value to a certain extent to wherein avoid the waste of program resource.Regular expressions Formula is a kind of logical formula to string operation, exactly with some specific characters and these specific characters defined in advance Combination, form one " regular character string ", this " regular character string " is used for expressing a kind of filter logic to character string.This Regular expression in inventive embodiments is:
(/ ^ $ ((DAY=(- |+)D+) | ((WEEK | MONTH)=(- |+)\d+,\d{1,2}))(,\d{2}:\d {2}:\d{2})$/);
Wherein, ^ indicates the starting position of matching input character string;DAY, WEEK and MONTH were indicated at the matched time Manage function name;WEEK | MONTH's | it indicates two matching conditions carrying out logic or operation;(-|\+)D+ indicate matching dimensionality Offset;, d { 1,2 } indicate matching dimensionality in number of days;,\d{2}:\d{2}:D { 2 } indicate match time;$ indicates that matching is defeated Enter the end position of character string.
Step S12:The time-triggered protocol letter corresponding to the time-triggered protocol function name is determined according to the time-triggered protocol function name Number.In this step, the time-triggered protocol function in the time-triggered protocol function name adaptation function library parsed according to step S11, So that it is determined that the time-triggered protocol function corresponding to each time-triggered protocol function name parsed in step S11.In function library Including function name and the specific computational methods of function, the format of the function in function library of the embodiment of the present invention is JSON formats, Key is function name, and value is the specific computational methods of function.
Step S13:Institute is calculated according to the time-triggered protocol function, the time parameter and current time in system State the time setting value of business scenario.After time-triggered protocol function is determined in step s 12, pass through time parameter in step S11 And the current time of system, further according to the specific computational methods of the time-triggered protocol function determined in step S12, to obtain The time setting value needed in the scene.Specific example is as follows, it is assumed that present system time is on 2 15th, 2017:
When calculating the time setting value of the business scenario with day dimension, it is assumed that the time-triggered protocol function of the business scenario It is respectively with time parameter:$ DAY and (- 1,00:00:00):
Determine the date of time setting value, wherein the date of the date of time setting value=present system time+dimension is inclined Shifting amount;That is the date of time setting value=15+ (- 1)=14;
The specific time of time setting value is determined according to Hour Minute Second;I.e. the specific time of time setting value is 00:00:00;
Therefore, the time setting value of the scene is:On 2 14th, 2017 zeros.
When calculating the time setting value of the business scenario with Zhou Weidu:Assuming that the time-triggered protocol function of the business scenario It is respectively with time parameter:$ WEEK and -1,1,12:00:00;
Determine all numbers residing for present system time;All numbers residing for present system time are 7;
Determine all numbers residing for time setting value, wherein residing for all number=present system times residing for time setting value All numbers+dimension offset);All numbers=7+ (- 1)=6 residing for time setting value;
The month and date of time setting value are determined according to number of days in dimension;The value of number of days is 1 in dimension, and expression is the Monday in six weeks, then it is 6 days 2 months that month and date, which can be obtained,;
The specific time of time setting value is determined according to Hour Minute Second;I.e. the specific time of time setting value is 12:00:00;
Therefore, the time setting value of the business scenario is on 2 6th, 2,017 12:00:00.
When calculating the time setting value of the business scenario with moon dimension, it is assumed that the time-triggered protocol function of the business scenario It is respectively with time parameter:$ MONTH and -1,20,2:00:00:
Determine the month of time setting value, wherein the month of the month of time setting value=present system time+dimension is inclined Shifting amount;That is the month of time setting value=2+ (- 1)=1;
The date of time setting value is determined according to number of days in dimension;Day numerical value is 20 in dimension, then, time setting value Date is 20;
The specific time of time setting value is determined according to Hour Minute Second, i.e. the specific time of time setting value is 2:00:00;
Therefore the time setting value of the business scenario is:20 days 2 January in 2017:00:00.
Fig. 2 is a kind of schematic diagram of device providing time setting value according to the ... of the embodiment of the present invention.As shown in Fig. 2, this The device 20 of the offer time setting value of inventive embodiments includes mainly:Preserving module 21, parsing module 22, determining module 23, And computing module 24;Preserving module 21 is used to preserve the time template of business scenario;Parsing module 22 is for parsing the industry The time template for scene of being engaged in, to obtain time-triggered protocol function name and time parameter;Determining module 23 is for determining at the time Manage the time-triggered protocol function corresponding to function name;Computing module 24 be used for according to the time-triggered protocol function, the time parameter, And the time setting value of the business scenario is calculated in the current time in system.
The time parameter includes:Number of days and Hour Minute Second in dimension offset, dimension;Wherein, dimension includes but not only It is limited to a day dimension, Zhou Weidu and moon dimension;Its dimension=(dimension offset, Hour Minute Second);Zhou Weidu=(dimension offset, Number of days in dimension, Hour Minute Second);Month dimension=(dimension offset, number of days in dimension, Hour Minute Second);
The device 20 for providing time setting value may also include detection module (not shown), for using regular expression Determine that the time template of the scene is the template style of setting, wherein regular expression is:
(/ ^ $ ((DAY=(- |+)D+) | ((WEEK | MONTH)=(- |+)\d+,\d{1,2}))(,\d{2}:\d {2}:\d{2})$/);
Wherein, ^ indicates the starting position of matching input character string;DAY, WEEK and MONTH were indicated at the matched time Manage function name;WEEK | MONTH's | it indicates two matching conditions carrying out logic or operation;(-|\+)D+ indicate matching dimensionality Offset;, d { 1,2 } indicate matching dimensionality in number of days;,\d{2}:\d{2}:D { 2 } indicate match time;$ indicates that matching is defeated Enter the end position of character string.
The parsing module 22 for providing the device 20 of time setting value can be additionally used in using string segmentation method to the business The time template of scene is split;Time-triggered protocol function name and time parameter are determined from the time template after segmentation.
The computing module 24 for providing the device 20 of time setting value can be additionally used in:Determine the date of time setting value, wherein The date of the date of time setting value=present system time+dimension offset;The tool of time setting value is determined according to Hour Minute Second The body time.
The computing module 24 for providing the device 20 of time setting value can be additionally used in:Determine the week residing for present system time Number;Determine all numbers residing for time setting value, wherein all numbers residing for all number=present system times residing for time setting value + dimension offset);The month and date of time setting value are determined according to number of days in dimension;Determine that the time sets according to Hour Minute Second The specific time of value.
The computing module 24 for providing the device 20 of time setting value can be additionally used in:Determine the month of time setting value, wherein The month of the month of time setting value=present system time+dimension offset;Time setting value is determined according to number of days in dimension Date;The specific time of time setting value is determined according to Hour Minute Second.
According to an embodiment of the invention, the present invention also provides a kind of electronic equipment and a kind of readable storage medium storing program for executing.
The present invention electronic equipment include:At least one processor;And it is connect at least one processor communication Memory;Wherein, the memory is stored with the instruction that can be executed by one processor, described instruction by it is described at least One processor executes, so that at least one processor executes the method provided by the present invention for providing setting value.
The non-transient computer readable storage medium of the present invention, the non-transient computer readable storage medium storage calculate Machine instructs, and the computer instruction is for making the computer execute application testing method provided by the present invention.
As shown in figure 3, being the hardware knot of the electronic equipment of the method according to the ... of the embodiment of the present invention for providing time setting value Structure schematic diagram.Such as Fig. 3, which includes:One or more processors 31 and memory 32, at one in Fig. 3 For reason device 31.Wherein, memory 32 is non-transient computer readable storage medium provided by the present invention.
There is provided the electronic equipment of the method for time setting value can also include:Input unit 33 and output device 34.
Processor 31, memory 32, input unit 33 can be connected with output device 34 by bus or other modes, In Fig. 3 for being connected by bus.
Memory 32 is used as a kind of non-transient computer readable storage medium, can be used for storing non-transient software program, non- Transient computer executable program and module, such as the corresponding program of method of the offer time setting value in the embodiment of the present invention Instruction/module (for example, attached preserving module shown in Fig. 2 21, parsing module 22, determining module 23 and computing module 24).Place Device 31 is managed by running non-transient software program, instruction and the module of storage in memory 32, to execute server Various function application and data processing, that is, the method that the offer time setting value in above method embodiment is provided.
Memory 32 may include storing program area and storage data field, wherein storing program area can storage program area, At least one required application program of function;Storage data field can be stored uses institute according to the device for providing time setting value The data etc. of establishment.In addition, memory 32 may include high-speed random access memory, can also include non-transient memory, A for example, at least disk memory, flush memory device or other non-transient solid-state memories.In some embodiments, it deposits It includes the memory remotely located relative to processor 31 that reservoir 32 is optional, these remote memories can be by network connection extremely The device of time setting value is provided.The example of above-mentioned network includes but not limited to internet, intranet, LAN, movement Communication network and combinations thereof.
Input unit 33 can receive the time template of the business scenario of input, and generates and be with provide time setting value The related key signals input of user setting and function control of system.Output device 34 may include that display screen etc. shows equipment.
One or more of modules are stored in the memory 32, when by one or more of processors 31 When execution, method that the offer setting value in above-mentioned any means embodiment is provided.
Technical solution according to the ... of the embodiment of the present invention can be according to different scenes when coping with different business scenarios Different time templates is arranged in demand, avoids this mode of hard coded, can promote the response speed of demand, is avoiding weight The working efficiency that programmer is not only referred to while the coding work of renaturation, also improves the scalability of program.
Above-mentioned specific implementation mode, does not constitute limiting the scope of the invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and replacement can occur.It is any Modifications, equivalent substitutions and improvements made by within the spirit and principles in the present invention etc., should be included in the scope of the present invention Within.

Claims (14)

1. a kind of method providing time setting value, which is characterized in that including:
Preserve the time template of business scenario;
The time template for parsing the business scenario, to obtain time-triggered protocol function name and time parameter;
Determine the time-triggered protocol function corresponding to the time-triggered protocol function name;
The business scenario is calculated according to the time-triggered protocol function, the time parameter and current time in system Time setting value.
2. according to the method described in claim 1, it is characterized in that, the time parameter includes:Day in dimension offset, dimension Number and Hour Minute Second;
Before the step of time template of the parsing business scenario, further include:
Determine that the time template of the scene is the template style of setting using regular expression;Wherein, regular expression is:
(/ ^ $ ((DAY=(- |+)D+) | ((WEEK | MONTH)=(- |+)\d+,\d{1,2}))(,\d{2}:\d {2}:\d{2})$/)
Wherein, ^ indicates the starting position of matching input character string;DAY, WEEK and MONTH indicate matched time-triggered protocol letter It is several;WEEK | MONTH's | it indicates two matching conditions carrying out logic or operation;(-|\+)D+ indicate matching dimensionality offset Amount;, d { 1,2 } indicate matching dimensionality in number of days;,\d{2}:\d{2}:D { 2 } indicate match time;$ indicates matching input word Accord with the end position of string.
3. according to the method described in claim 1, it is characterized in that, the time template of the parsing business scenario, with Include to the step of time-triggered protocol function name and time parameter:
The time template of the business scenario is split using string segmentation method;
Time-triggered protocol function name and time parameter are determined from the time template after segmentation.
4. according to the method described in claim 1, it is characterized in that, the time parameter includes:Day in dimension offset, dimension Number and Hour Minute Second;Wherein, dimension includes day dimension, day dimension=(dimension offset, Hour Minute Second);
And the business field is calculated according to the time-triggered protocol function, the time parameter and current time in system The step of time setting value of scape includes:
Determine the date of time setting value, wherein the date of the date of time setting value=present system time+dimension offset Amount;
The specific time of time setting value is determined according to Hour Minute Second.
5. according to the method described in claim 1, it is characterized in that, the time parameter includes:Day in dimension offset, dimension Number and Hour Minute Second;Wherein, dimension includes Zhou Weidu, Zhou Weidu=(dimension offset, number of days in dimension, Hour Minute Second);
And the business field is calculated according to the time-triggered protocol function, the time parameter and current time in system The step of time setting value of scape includes:
Determine all numbers residing for present system time;
Determine all numbers residing for time setting value, wherein the week residing for all number=present system times residing for time setting value Number+dimension offset);
The month and date of time setting value are determined according to number of days in dimension;
The specific time of time setting value is determined according to Hour Minute Second.
6. according to the method described in claim 1, it is characterized in that, the time parameter includes:Day in dimension offset, dimension Number and Hour Minute Second;Wherein, dimension includes moon dimension;Month dimension=(dimension offset, number of days in dimension, Hour Minute Second);
And the business field is calculated according to the time-triggered protocol function, the time parameter and current time in system The step of time setting value of scape includes:
Determine the month of time setting value, wherein the month of the month of time setting value=present system time+dimension offset Amount;
The date of time setting value is determined according to number of days in dimension;
The specific time of time setting value is determined according to Hour Minute Second.
7. a kind of device providing time setting value, which is characterized in that including:
Preserving module, the time template for preserving business scenario;
Parsing module, the time template for parsing the business scenario, to obtain time-triggered protocol function name and time parameter;
Determining module, for determining the time-triggered protocol function corresponding to the time-triggered protocol function name;
Computing module, for institute to be calculated according to the time-triggered protocol function, the time parameter and current time in system State the time setting value of business scenario.
8. device according to claim 7, which is characterized in that further include detection module, be used for:
Determine that the time template of the scene is the template style of setting using regular expression;Wherein, regular expression is:
(/ ^ $ ((DAY=(- |+)D+) | ((WEEK | MONTH)=(- |+)\d+,\d{1,2}))(,\d{2}:\d {2}:\d{2})$/)
Wherein, ^ indicates the starting position of matching input character string;DAY, WEEK and MONTH indicate matched time-triggered protocol letter It is several;WEEK | MONTH's | it indicates two matching conditions carrying out logic or operation;(-|\+)D+ indicate matching dimensionality offset Amount;, d { 1,2 } indicate matching dimensionality in number of days;,\d{2}:\d{2}:D { 2 } indicate match time;$ indicates matching input word Accord with the end position of string.
9. device according to claim 7, which is characterized in that the parsing module is additionally operable to:
The time template of the business scenario is split using string segmentation method;Then from the time template after segmentation Determine time-triggered protocol function name and time parameter.
10. device according to claim 7, which is characterized in that the time parameter includes:In dimension offset, dimension Number of days and Hour Minute Second;Wherein, dimension includes day dimension, day dimension=(dimension offset, Hour Minute Second);
Also, the computing module is additionally operable to:
Determine the date of time setting value, wherein the date of the date of time setting value=present system time+dimension offset Amount;
The specific time of time setting value is determined according to Hour Minute Second.
11. device according to claim 7, which is characterized in that the time parameter includes:In dimension offset, dimension Number of days and Hour Minute Second;Wherein, dimension includes Zhou Weidu, Zhou Weidu=(dimension offset, number of days in dimension, Hour Minute Second);
Also, the computing module is additionally operable to:
When calculating the time setting value of the business scenario with Zhou Weidu:
Determine all numbers residing for present system time;
Determine all numbers residing for time setting value, wherein the week residing for all number=present system times residing for time setting value Number+dimension offset);
The month and date of time setting value are determined according to number of days in dimension;
The specific time of time setting value is determined according to Hour Minute Second.
12. device according to claim 7, which is characterized in that the time parameter includes:In dimension offset, dimension Number of days and Hour Minute Second;Wherein, dimension includes moon dimension, the moon dimension=(dimension offset, number of days in dimension, Hour Minute Second);
Also, the computing module is additionally operable to:
When calculating the time setting value of the business scenario with moon dimension:
Determine the month of time setting value, wherein the month of the month of time setting value=present system time+dimension offset Amount;
The date of time setting value is determined according to number of days in dimension;
The specific time of time setting value is determined according to Hour Minute Second.
13. a kind of equipment providing time setting value, which is characterized in that at least one processor;And with it is described at least one The memory of processor communication connection;Wherein, the memory is stored with the instruction that can be executed by one processor, described Instruction is executed by least one processor, so that at least one processor perform claim requires any one of 1 to 6 institute The method stated.
14. a kind of storage medium that non-transient computer is readable, which is characterized in that the non-transient computer readable storage medium Store computer instruction, the side that the computer instruction is used to that the computer perform claim to be made to require described in any one of 1 to 6 Method.
CN201710157313.1A 2017-03-16 2017-03-16 A kind of method, apparatus, equipment and storage medium that time setting value is provided Pending CN108628603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710157313.1A CN108628603A (en) 2017-03-16 2017-03-16 A kind of method, apparatus, equipment and storage medium that time setting value is provided

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710157313.1A CN108628603A (en) 2017-03-16 2017-03-16 A kind of method, apparatus, equipment and storage medium that time setting value is provided

Publications (1)

Publication Number Publication Date
CN108628603A true CN108628603A (en) 2018-10-09

Family

ID=63686210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710157313.1A Pending CN108628603A (en) 2017-03-16 2017-03-16 A kind of method, apparatus, equipment and storage medium that time setting value is provided

Country Status (1)

Country Link
CN (1) CN108628603A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113947297A (en) * 2021-09-30 2022-01-18 广州市玄武无线科技股份有限公司 Formula conversion method and system based on template variables

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235277A1 (en) * 2002-04-18 2005-10-20 Wind River Systems, Inc. Automatic gopher program generator
CN101706716A (en) * 2009-09-08 2010-05-12 南京师范大学 VO-based form customization, configuration and parsing operation method
CN104424327A (en) * 2013-09-10 2015-03-18 重庆新媒农信科技有限公司 Method and device for confirming search time scope in search engine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235277A1 (en) * 2002-04-18 2005-10-20 Wind River Systems, Inc. Automatic gopher program generator
CN101706716A (en) * 2009-09-08 2010-05-12 南京师范大学 VO-based form customization, configuration and parsing operation method
CN104424327A (en) * 2013-09-10 2015-03-18 重庆新媒农信科技有限公司 Method and device for confirming search time scope in search engine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
廖世恩 等: "《PHP 4程序设计》", 30 April 2001, 机械工业出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113947297A (en) * 2021-09-30 2022-01-18 广州市玄武无线科技股份有限公司 Formula conversion method and system based on template variables

Similar Documents

Publication Publication Date Title
JP6922538B2 (en) API learning
US11487521B2 (en) System and method for source code translation using stream expressions
US10581791B2 (en) Communication message consolidation with content difference formatting
WO2018210096A1 (en) Rule engine-based rule configuration method, terminal and device, and storage medium
TWI661349B (en) Method and system for generating conversational user interface
CN111124379B (en) Page generation method and device, electronic equipment and storage medium
US20190050376A1 (en) Automatic value formatting based on intrinsic structural semantics
KR20220039576A (en) Abstraction generation method and device, electronic equipment and storage medium
US20170315982A1 (en) Method, device and mobile terminal for webpage text parsing
US20150067013A1 (en) Methods for servicing web service requests using parallel agile web services and devices thereof
CN102023869A (en) Control input value checking method and system
CN110633959A (en) Method, device, equipment and medium for creating approval task based on graph structure
US11366704B2 (en) Configurable analytics for microservices performance analysis
CN112270413B (en) Operator merging method, device, electronic equipment and storage medium
CN110489622A (en) Sharing method, device, computer equipment and the storage medium of object information
CN115599359A (en) Code generation method, device, equipment and medium
CN108628603A (en) A kind of method, apparatus, equipment and storage medium that time setting value is provided
US10891426B2 (en) Editing program, editing device, and editing method for editing text and displaying the edited text
CN109741432B (en) Rendering estimation time calculation method, electronic equipment and storage medium
CN115757639A (en) Data source synchronization method and device, electronic equipment and storage medium
CN103488477A (en) Visual editing system and visual editing method of JAVA interface
CN114168119A (en) Code file editing method and device, electronic equipment and storage medium
CN109783134B (en) Front-end page configuration method and device and electronic equipment
CN106776035B (en) Method and system for realizing cross-system multi-document algorithm docking and request heterogeneous system
US20140164904A1 (en) Content management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181009

RJ01 Rejection of invention patent application after publication