CN106708540B - Universal time selection method - Google Patents

Universal time selection method Download PDF

Info

Publication number
CN106708540B
CN106708540B CN201710071680.XA CN201710071680A CN106708540B CN 106708540 B CN106708540 B CN 106708540B CN 201710071680 A CN201710071680 A CN 201710071680A CN 106708540 B CN106708540 B CN 106708540B
Authority
CN
China
Prior art keywords
time
time selection
selection interface
universal
granularities
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.)
Active
Application number
CN201710071680.XA
Other languages
Chinese (zh)
Other versions
CN106708540A (en
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 Tianyuan Creative Technology Ltd
Original Assignee
Beijing Tianyuan Creative Technology 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 Tianyuan Creative Technology Ltd filed Critical Beijing Tianyuan Creative Technology Ltd
Priority to CN201710071680.XA priority Critical patent/CN106708540B/en
Publication of CN106708540A publication Critical patent/CN106708540A/en
Application granted granted Critical
Publication of CN106708540B publication Critical patent/CN106708540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a universal time selection method, which comprises the following steps: setting a plurality of selectable time granularities; and if the fact that the user triggers and confirms the completion of the action of the time granularity selection is detected, returning a time selection result to the third-party component for calling the universal time. The universal time selection method provided by the embodiment of the invention can improve the flexibility and the expandability of the universal time component selection time.

Description

Universal time selection method
Technical Field
The embodiment of the invention relates to the technical field of general software, in particular to a general time selection method.
Background
With the rapid development of software development technology, massive data is generated, people are more sensitive to the data and pay more attention to the data, and in order to more accurately screen and present the data concerned by people, system software has higher requirements on time selection and does not meet the traditional time component day and hour granularity selection any more.
However, because the time selection requirements required by different functions in the system are different, the traditional development mode is used, each function needs to be repeatedly developed in each mode, and the problems of system code redundancy, difficult reconstruction, low practicability and the like are caused.
Therefore, how to improve the flexibility and scalability of universal time selection becomes an urgent problem to be solved.
Disclosure of Invention
To solve the problems in the prior art, an embodiment of the present invention provides a universal time selection method, where the method includes:
setting a plurality of selectable time granularities;
and if the fact that the user triggers and confirms the completion of the action of the time granularity selection is detected, returning a time selection result to the third-party component for calling the universal time.
The universal time selection method provided by the embodiment of the invention can improve the flexibility and the expandability of the universal time component selection time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a universal time selection method according to an embodiment of the present invention;
FIG. 2 is a screenshot of a continuous time selection interface according to an embodiment of the present invention;
FIG. 3 is a screenshot of a discrete time selection interface according to an embodiment of the present invention;
FIG. 4 is a screenshot of a cycle time selection interface according to an embodiment of the present invention;
fig. 5 is a schematic physical structure diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a universal time selection method according to an embodiment of the present invention, and as shown in fig. 1, the universal time selection method according to the embodiment of the present invention includes the following steps:
s1: a plurality of selectable time granularities are set.
In particular, the device sets a plurality of selectable time granularities. It should be noted that: the temporal granularity may include: hour, date, week, month, year, busy hour. But is not particularly limited.
S2: and if the fact that the user triggers and confirms the completion of the action of the time granularity selection is detected, returning a time selection result to the third-party component for calling the universal time.
Specifically, if the device detects that the user triggers and confirms that the time granularity selection is completed, the device returns a time selection result to the third-party component for calling the universal time. It should be noted that: the act of confirming completion of the time-granular selection may be accomplished by clicking a "confirm" button. After clicking the "confirm" button, the time selection result is returned to the third-party component calling the universal time, and the time selection result can be understood as: the results after objectification are as follows:
{
period:string,
timeType:string,
timeList:[Array],
isBusyTime:boolean,
text:string
}
wherein period is time granularity, enumeration value: [3: hr/busy, 8: day, 9: week, a: month ].
When isBusyTime is true, busy is indicated.
the timeType is time type, the enumerated value [ 'COND': continuous time, 'DSET': discrete time ], COND is selected from the time selector 'continuous' tag page, DSET is selected from the time selector 'period/discrete' tag page, and DSET is fixed during busy time.
timeList-list of points in time. Is an array, the COND time stores the start time point and the end time point, and the DSET time stores the time point. Hours are accurate to minutes, busy hour dates and busy hour types are divided by #, multiple busy hours by "," division ". For example, 2016-03-03#1,3 indicates a 3-month 3-day busy hour and an early busy hour in 2016.
isBusyTime whether busy or not. Enumerate [ true, false ], the enumeration at timeList during Busy is [1: busy day, 3: early busy hour, 4: late busy hour ].
text-the text of the time selector.
Specifically, table 1 is an initialization parameter definition table,
TABLE 1
Figure BDA0001222975700000031
Figure BDA0001222975700000041
Table 2 is a return result parameter definition table,
TABLE 2
Figure BDA0001222975700000042
The flexible configuration of the method presentation mode is realized through an initialized object mode, and whether the time granularity needs to be presented, the time granularity option needing to be presented, the time selection type needing to be presented, the initialization value of each time type and the like can be freely configured through the defined initialization parameters.
The universal time selection method provided by the embodiment of the invention can improve the flexibility and expandability of universal time selection.
On the basis of the above embodiment, a plurality of selectable time granularities are set on a time selection interface, and the time selection interface includes: a continuous time selection interface, a discrete time selection interface, and a cycle time selection interface. Specifically, the time selection interface includes: a continuous time selection interface, a discrete time selection interface, and a cycle time selection interface. Each time selection interface is provided with a plurality of selectable time granularities; the temporal granularity may include: hour, date, week, month, year, busy hour.
The time granularity selection is "hours" and the time selection interface is "continuous time selection interface" for illustration: FIG. 2 is a screenshot of a continuous time selection interface according to an embodiment of the present invention, as shown in FIG. 2, the user can switch to the continuous time selection interface by clicking on the "continuous" tab, where the granularity of the time selected in the interface is date and hour, the continuous time selection interface is configured to include a start value (corresponding to the text "to" the front 2016-12-26 and 9 in FIG. 2) and an end value (corresponding to the text "to" the rear 2016-12-26 and 9 in FIG. 2), and the start value can include a start time (corresponding to the text "to" the front 2016-12-26 in FIG. 2) and a start time point (corresponding to the text "to" the front 9 in FIG. 2); the end values may include an end time (corresponding to 2016-12-26 after the word "to" in fig. 2), an end time point (corresponding to 9 after the word "to" in fig. 2), a start time and an end time default to the current date, a start time default to the current time point pushed forward by one hour, and an end time default to the current time point, which may be adjusted as needed. The cancel button is specifically configured to cancel an operation of time selection, the reset button is specifically configured to reset the time selection to the default value, the time granularity is "date" and can be set by adding a panel through the extended drop-down box, and the time granularity is "time of day", "week", "month", and "year" and can be set by the drop-down box.
The time granularity is selected as hours, and the time selection interface is a discrete time selection interface: fig. 3 is a screenshot of a discrete time selection interface according to an embodiment of the present invention, as shown in fig. 3, in the discrete time selection interface, a default date is the current day, and the shortcut keys "previous day" (in this example, the time granularity is "date") and "next day" (in this example, the time granularity is "date") corresponding to the current time granularity are added to select time granularities of date and hour. And operations such as full selection, reverse selection, clearing and the like are also arranged, so that discrete time points can be conveniently and quickly selected.
The time granularity is selected to be hours, and the time selection interface is a cycle time selection interface as an example for explanation: fig. 4 is a screenshot of a cycle time selection interface according to an embodiment of the present invention, and as shown in fig. 4, a week selection mode is further added to the cycle time selection interface on the basis of the continuous time selection interface and the discrete time selection interface, so that corresponding time points can be flexibly selected according to weeks, and the cycle time points can be presented in a list form to support multiple selections. The above is a detailed description of the case where the time granularity is "hour", and the case where the time granularity is "date", "week", "month", and "year" refers to the case where the time granularity is "hour", and is not described again.
The universal time selection method provided by the embodiment of the invention can improve the flexibility and expandability of time selection by setting the time granularity on different time selection interfaces.
On the basis of the above embodiment, the continuous time selection interface, the discrete time selection interface, and the cycle time selection interface are respectively provided with tags with corresponding names, and if an action that a user triggers the tag with the corresponding name is detected, the continuous time selection interface, the discrete time selection interface, and the cycle time selection interface are switched. It should be noted that: the device comprises a continuous time selection interface, a discrete time selection interface and a cycle time selection interface, wherein the continuous time selection interface is provided with a continuous label, the discrete time selection interface is provided with a discrete label, the cycle time selection interface is provided with a cycle label, and if the device detects that a user triggers the action of the label with the corresponding name, the continuous time selection interface, the discrete time selection interface and the cycle time selection interface are switched.
The universal time selection method provided by the embodiment of the invention further and quickly realizes universal time selection for switching different time selection interface sides.
On the basis of the above embodiment, the time granularity includes hours, dates, weeks, months, years and busy hours, wherein the busy hours include daily busy hours, early busy hours and late busy hours. Specifically, different busy periods can be set independently according to actual conditions in busy days, busy hours in early days and busy hours in late days, and different busy periods can correspond to different hour time periods independently. Busy hour option boxes corresponding to the busy hour of day, the busy hour of early and the busy hour of late can be presented in a list form to support multiple options.
The universal time selection method provided by the embodiment of the invention further improves the flexibility and expandability of universal time selection by defining the time granularity in a multi-dimension way.
On the basis of the above embodiment, the time selection interface is further provided with: a cancel button for canceling the operation of time selection; and the reset key is used for resetting the time selection to a default value again. For detailed description, please refer to the above embodiments, which are not repeated.
The universal time selection method provided by the embodiment of the invention further improves the flexibility and expandability of universal time selection by setting the cancel key and the reset key.
On the basis of the above embodiment, the continuous time selection interface is provided with a start value and an end value for different time granularities, and the dates corresponding to the start value or the end value are set by an extended drop-down box adding panel, and the times, weeks, months and years corresponding to the start value or the end value are set by a drop-down box. Please refer to the above embodiments, which are not described again.
According to the universal time selection method provided by the embodiment of the invention, the flexibility and the expandability of universal time selection are further improved by setting the options in the continuous time selection interface.
On the basis of the above embodiment, the discrete time selection interface is further provided with corresponding operation shortcut keys for different time granularities. Specifically, taking time granularity as a date as an example: the default date is the current day, and shortcut keys "previous day" (in this example, the time granularity is "date") and "next day" (in this example, the time granularity is "date") corresponding to the current time granularity are added.
According to the universal time selection method provided by the embodiment of the invention, the flexibility and the expandability of universal time selection are further improved by further adding the operation shortcut key option of the discrete selection interface.
On the basis of the above embodiment, the option boxes with corresponding discrete selectable times are set for different time granularities, and the blank area is used for presenting the content of the selected option boxes in real time. Please refer to the above embodiments, which are not described again.
According to the universal time selection method provided by the embodiment of the invention, the flexibility and the expandability of universal time selection are further improved by further additionally arranging the option box for discretely selecting time.
On the basis of the above embodiment, the cycle time selection interface is provided with corresponding option boxes capable of selecting the time periodically for different time granularities. Please refer to the above embodiments, which are not described again.
According to the universal time selection method provided by the embodiment of the invention, the option frame of the period selection time is further added, so that the flexibility and the expandability of the universal time selection are further improved.
On the basis of the above embodiment, option boxes for week selection are provided for different time granularities. Please refer to the above embodiments, which are not described again.
According to the universal time selection method provided by the embodiment of the invention, the flexibility and the expandability of universal time selection are further improved by further adding the option box capable of selecting the week.
Fig. 5 is a schematic physical structure diagram of an apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: a processor (processor)501, a memory (memory)502, and a bus 503;
the processor 501 and the memory 502 complete communication with each other through a bus 503;
the processor 501 is configured to call program instructions in the memory 502 to perform the methods provided by the above-mentioned method embodiments, for example, including: setting a plurality of selectable time granularities; and if the fact that the user triggers and confirms the completion of the action of the time granularity selection is detected, returning a time selection result to the third-party component for calling the universal time.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: setting a plurality of selectable time granularities; and if the fact that the user triggers and confirms the completion of the action of the time granularity selection is detected, returning a time selection result to the third-party component for calling the universal time.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: setting a plurality of selectable time granularities; and if the fact that the user triggers and confirms the completion of the action of the time granularity selection is detected, returning a time selection result to the third-party component for calling the universal time.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatuses and the like are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for universal time selection, comprising:
setting a plurality of selectable time granularities;
if the action that the user triggers and confirms that the time granularity selection is completed is detected, returning a time selection result to a third-party component for calling the universal time;
setting a plurality of selectable time granularities on a time selection interface, the time selection interface comprising: a continuous time selection interface, a discrete time selection interface and a cycle time selection interface;
the time granularity comprises hours, dates, weeks, months, years and busy hours, wherein the busy hours comprise busy days, busy hours in the morning and busy hours in the evening; whether busy is determined by an enable bit.
2. The universal time selection method according to claim 1, wherein the continuous time selection interface, the discrete time selection interface and the cycle time selection interface are respectively provided with labels with corresponding names, and if an action that a user triggers the label with the corresponding name is detected, the continuous time selection interface, the discrete time selection interface and the cycle time selection interface are switched.
3. The universal time selection method according to claim 1 or 2, wherein the time selection interface is further provided with:
a cancel button for canceling the operation of time selection;
and the reset key is used for resetting the time selection to a default value again.
4. The universal time selection method according to claim 3,
the continuous time selection interface is provided with a start value and an end value aiming at different time granularities, the date corresponding to the start value or the end value is set through an extension drop-down box adding panel, and the time, the week, the month and the year corresponding to the start value or the end value are set through a drop-down box.
5. The universal time selection method according to claim 3, wherein the discrete time selection interface is further provided with corresponding operation shortcut keys for different time granularities.
6. The universal time selection method according to claim 5, wherein option boxes with corresponding discretely selectable times are provided for different time granularities, and blank areas for presenting the contents of the selected option boxes in real time.
7. The universal time selection method according to any one of claims 4 to 6, wherein the cycle time selection interface is provided with option boxes for corresponding cycle selectable times for different time granularities.
8. The universal time selection method according to claim 7, wherein a week-selectable option box is provided for different time granularities.
CN201710071680.XA 2017-02-09 2017-02-09 Universal time selection method Active CN106708540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710071680.XA CN106708540B (en) 2017-02-09 2017-02-09 Universal time selection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710071680.XA CN106708540B (en) 2017-02-09 2017-02-09 Universal time selection method

Publications (2)

Publication Number Publication Date
CN106708540A CN106708540A (en) 2017-05-24
CN106708540B true CN106708540B (en) 2020-01-07

Family

ID=58910404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710071680.XA Active CN106708540B (en) 2017-02-09 2017-02-09 Universal time selection method

Country Status (1)

Country Link
CN (1) CN106708540B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111177305B (en) * 2019-12-30 2021-01-05 广州骏伯网络科技有限公司 Method, system, device and storage medium for time segment selection

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929511A (en) * 2011-09-22 2013-02-13 微软公司 User interface for editing a value in place
CN104123633A (en) * 2014-07-24 2014-10-29 北京嘉和美康信息技术有限公司 Calendar control
CN104598252A (en) * 2015-02-15 2015-05-06 北京恒华伟业科技股份有限公司 Time control as well as method for determining time based on time control
CN105138238A (en) * 2015-08-12 2015-12-09 北京博锐尚格节能技术股份有限公司 Time display method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929511A (en) * 2011-09-22 2013-02-13 微软公司 User interface for editing a value in place
CN104123633A (en) * 2014-07-24 2014-10-29 北京嘉和美康信息技术有限公司 Calendar control
CN104598252A (en) * 2015-02-15 2015-05-06 北京恒华伟业科技股份有限公司 Time control as well as method for determining time based on time control
CN105138238A (en) * 2015-08-12 2015-12-09 北京博锐尚格节能技术股份有限公司 Time display method and apparatus

Also Published As

Publication number Publication date
CN106708540A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US20200167359A1 (en) Query task processing based on memory allocation and performance criteria
CN105512867B (en) Method and device for setting course alarm clock
CN109802881A (en) A kind of orientation prompting processing method and processing device of group chat message
CN109325024A (en) Label display method, apparatus, terminal device and the storage medium of project
CN112035235A (en) Task scheduling method, system, device and storage medium
CN108491122A (en) A kind of click event response method, computer readable storage medium and terminal device
CN108573348B (en) Financial index distributed computing method and system
CN106708540B (en) Universal time selection method
CN114444478A (en) Voucher visualization method and device, electronic equipment and storage medium
CN112597123B (en) Data multi-version dynamic switching method and device
CN111414371A (en) Data information processing method and device, storage medium and processor
CN108959229A (en) Planning report generation method, terminal and storage medium based on customer information
CN111459987A (en) Cache updating method and device
US20230132158A1 (en) Process flow managment method and device
CN106293959A (en) The creation method of a kind of Pending tasks and device
CN108021624A (en) The method and device that a kind of timeliness dynamic collection of illustrative plates shows
CN113835929A (en) Data acquisition method and device, electronic equipment and storage medium
CN109857501B (en) APP page display method and device, storage medium and server
CN112926904A (en) Client sharing management method, system, terminal equipment and storage medium
CN107169845B (en) Merchant attribute query method and device and server
CN104793979A (en) Method and device for starting application program and mobile terminal
CN112578956A (en) Date and time range processing method, storage medium and electronic device
US11438426B1 (en) Systems and methods for intelligent session recording
CN114741571A (en) Method for storing dynamic content, server, electronic device, storage medium
CN116302440A (en) Task management method and device based on free scaling time scale

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant