The content of the invention
The embodiments of the invention provide a kind of program interface time input method and device, at least to solve because user needs
Will input time causes after unit conversion ineffective technical problem.
One side according to embodiments of the present invention there is provided a kind of program interface time input method, including:Obtain and use
The temporal information of family input, wherein, temporal information includes time numerical digit and time numerical value corresponding with time numerical digit;The judgement time
Whether numerical digit is highest order, wherein, highest order is the numerical digit of the highest unit of correspondence current system timing;It is not in time numerical digit
In the case of highest order, pair time numerical value corresponding with time numerical digit carries out remainder operation to generate the time number of time numerical digit
According to.
Further, judge that the step of whether time numerical digit is highest order includes:Whether the time numerical value of judgement is natural number;
In the case where time numerical value is not natural number, time numerical value is set to default value, and return perform obtain user's input when
Between information the step of;In the case where time numerical value is natural number, judge whether the interface of user's input time information is closed;
In the case that interface is closed, terminate the flow in interface input time;In the case of being not turned off at interface, time numerical digit is judged
Whether it is highest order.
Further, pair time numerical value corresponding with time numerical digit carries out remainder operation to generate the time number of time numerical digit
According to the step of include:Whether the time numerical digit of judgement needs carry;In the case that in the time, numerical digit needs carry, in time numerical digit
Time numerical value carry out remainder operation generation time data;In the case where time numerical digit does not need carry, by time numerical digit
Unit and time numerical value are used as time data.
Further, judge that the step of whether time numerical digit needs carry includes:Compare time numerical value and time numerical digit
The size of system;In the case where time numerical value is more than the system of time numerical digit, the time numerical digit of determination needs carry;In time number
In the case of system of the value less than time numerical digit, the time numerical digit of determination does not need carry.
Further, pair time numerical value corresponding with time numerical digit carries out remainder operation to generate the time number of time numerical digit
According to the step of include:Use time numerical value divided by the system of time numerical digit obtain the first remainder and the first business;First remainder is made
For the value of time numerical digit, the first business is added in a high position;It regard the value of the digit of time numerical digit and time numerical digit as the time
The time data of numerical digit, wherein, a high position is the digit of one higher than time numerical value.
Further, after the first business is added in a high position, method also includes:Remainder operation is carried out to a high position to obtain
High-order time data.
Another aspect according to embodiments of the present invention, additionally provides a kind of program interface time entry station, including:Time
Data obtaining module, for obtain user input temporal information, wherein, temporal information include time numerical digit and with time numerical digit
Corresponding time numerical value;Time numerical digit judge module, for judging whether time numerical digit is highest order, wherein, highest order for pair
Should before system timing highest unit numerical digit;Time data acquisition module, the feelings in time numerical digit not being highest order
Under condition, pair time numerical value corresponding with time numerical digit carries out remainder operation to generate the time data of time numerical digit.
Further, time numerical digit judge module includes:Time numerical value judge module, for judge time numerical value whether be
Natural number;First returns to module, and in the case of being not natural number in time numerical value, time numerical value is set into default value, and
Return to the step of performing the temporal information for obtaining user's input;Interface judge module, in the feelings that time numerical value is natural number
Under condition, judge whether the interface of user's input time information is closed;First terminate module, in the case of being closed at interface,
Terminate the flow in interface input time;Time numerical digit judging submodule, in the case of being not turned off at interface, during judgement
Between numerical digit whether be highest order.
Further, time data acquisition module includes:Judge carry module, for judge time numerical digit whether need into
Position;First remainder operates submodule, and in the case that in the time, numerical digit needs carry, the time numerical value in time numerical digit is entered
Row remainder operation generation time data;Second remainder operates submodule, in the case of not needing carry in time numerical digit, will
The unit and time numerical value of time numerical digit are used as time data.
Further, judge carry module includes:Comparison module, for comparing time numerical value and the system of time numerical digit
Size;First determining module, for time numerical value be more than time numerical digit system in the case of, the time numerical digit of determination need into
Position;In the case of second determining module, the system for being less than time numerical digit in time numerical value, the time numerical digit of determination need not be entered
Position.
Further, time data acquisition module includes:First computing module, for use time numerical value divided by time number
The system of position obtains the first remainder and the first business;Processing module, for using the first remainder as time numerical digit value, by the first business
It is added in a high position;Time data acquisition submodule, for regarding the value of the digit of time numerical digit and time numerical digit as the time
The time data of numerical digit, wherein, a high position is the digit of one higher than time numerical value.
Further, program interface time entry station also includes:Second computing module, for carrying out remainder behaviour to a high position
Make to obtain the time data of a high position.
In embodiments of the present invention, after the temporal information of passage time data obtaining module acquisition user's initial input,
The time numerical digit for the time numerical value that time numerical digit judge module is inputted to user carries out highest order judgement, time data acquisition module
Remainder operation is carried out to time data in the case where time numerical digit is not highest order and obtains time data, so that user is in input
The time need not be converted during temporal information, it is only necessary to the input time numerical value in a time numerical digit, the time of input
Numerical value is that can be changed into the good time data of unit conversion, so as to solve in the prior art because user is needed after unit conversion
The ineffective technical problem that input time causes, realizes automatic carry conversion, it is achieved thereby that alloing user
Any numeral is inputted in the time numerical digit of correspondence any time unit, and the technology effect of correct result may finally be obtained
Really.
Embodiment
First, the part noun or term occurred during the embodiment of the present invention is described is applied to following solution
Release:
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, should all belong to the model that the present invention is protected
Enclose.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, "
Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so using
Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except illustrating herein or
Order beyond those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover
Lid is non-exclusive to be included, for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to
Those steps or unit clearly listed, but may include not list clearly or for these processes, method, product
Or the intrinsic other steps of equipment or unit.
According to embodiments of the present invention there is provided a kind of program interface time entry station, as shown in figure 1, the device includes:
Temporal information acquisition module 10, for obtain user input temporal information, wherein, temporal information include time numerical digit and and when
Between the corresponding time numerical value of numerical digit;Time numerical digit judge module 30, for judging whether time numerical digit is highest order, wherein, most
A high position is the numerical digit of the highest unit of correspondence current system timing;Time data acquisition module 50, for not being in time numerical digit
In the case of highest order, pair time numerical value corresponding with time numerical digit carries out remainder operation to generate the time number of time numerical digit
According to.
Highest order in the above-described embodiments can specifically refer to the highest order that program front-end interface is specified, and can be hour,
It can also be year, day etc., total time input Board Lot is not also limited, and user can be to time numerical digit in the present apparatus
Species, quantity and system carry out arbitrary disposition.
Using the present invention, passage time data obtaining module is obtained after the temporal information of user's initial input, time number
The time numerical digit for the time numerical value that position judge module is inputted to user carries out highest order judgement, and time data acquisition module is in the time
Numerical digit is not to carry out remainder operation in the case of highest order to time data to obtain time data, so that user believes in input time
The time need not be converted during breath, it is only necessary to the input time numerical value in a time numerical digit, the time numerical value of input is
Can be changed into the good time data of unit conversion, thus solve in the prior art due to user need inputted after unit conversion when
Between the ineffective technical problem that causes, automatic carry conversion is realized, it is achieved thereby that alloing user in correspondence
Any numeral is inputted in the time numerical digit of any time unit, and the technique effect of correct result may finally be obtained.
Wherein, the input of the temporal information in above-described embodiment is preferred to use the mode of key entry.
In the above embodiment of the present invention, user can pass through inputting interface time, information input time shown in Fig. 2.
The temporal information referred in above-described embodiment can include the time numerical digit that user inputs(When can be, divide or the second)And the time
Numerical value(The character inputted in time numerical digit).
In the above embodiment of the present invention, time numerical digit judge module can include:Time numerical value judge module, is used for
Whether the time numerical value of judgement is natural number;First returns to module, in the case of being not natural number in time numerical value, by the time
Numerical value is set to default value, and returns to the step of performing the temporal information for obtaining user's input;Interface judge module, in the time
In the case that numerical value is natural number, judge whether the interface of user's input time information is closed;First terminate module, on boundary
In the case that face is closed, terminate the flow in interface input time;Time numerical digit judging submodule, for being not turned off at interface
In the case of, whether the time numerical digit of judgement is highest order.
Specifically, time numerical value judge module judges whether the time numerical value for input is natural number, and first returns to mould
Block returns to the temporal information for reacquiring user's input in the case where the time numerical value that user inputs not is natural number, and
Value in the time numerical digit of user's input time information is used as default(The default value can be 0 or be empty), interface
Judge module is in the case where the time numerical value that user inputs is natural number, and judging the program interface of user's input time information is
Flow that is no to close, being converted in the case where the program interface is closed by the first terminate module end time, in program interface
In the case of being not turned off, ability passage time numerical digit judging submodule judges whether time numerical digit is highest order.
By above-described embodiment, the form for the temporal information that can be inputted to user and the interface of input time are entered automatically
Row false judgment, improves the accuracy rate of time input.
In the above embodiment of the present invention, time data acquisition module can include:Judge carry module, for judging
Whether time numerical digit needs carry;First remainder operates submodule, in the case that in the time, numerical digit needs carry, to the time
Time numerical value in numerical digit carries out remainder operation generation time data;Second remainder operate submodule, in time numerical digit not
In the case of needing carry, the unit of time numerical digit and time numerical value are regard as time data.
According to the abovementioned embodiments of the present invention, judge carry module can include:Comparison module, for comparing time numerical value
With the size of the system of time numerical digit;In the case of first determining module, the system for being more than time numerical digit in time numerical value,
The time numerical digit of determination needs carry;In the case of second determining module, the system for being less than time numerical digit in time numerical value, really
Numerical digit of fixing time does not need carry.
Before time numerical value progress remainder operation of the above embodiment of the present invention on to time numerical digit, enter first
Whether the row position needs the judgement of carry, so as to improve computational efficiency.
In the above embodiment of the present invention, when pair time numerical value corresponding with time numerical digit carries out remainder operation to generate
Between numerical digit time data the step of can include:First computing module, for entering for use time numerical value divided by time numerical digit
It is made to the first remainder and the first business;Processing module, for as the value of time numerical digit, the first remainder to be added into height by the first business
On position;Time data acquisition submodule, for regarding the value of the digit of time numerical digit and time numerical digit as time numerical digit
Time data, wherein, a high position is the digit of one higher than time numerical value.
More specifically, program interface time entry station can also include:Second computing module, for being taken to a high position
It is remaining to operate to obtain the time data of a high position.
In the above-described embodiments, to the time numerical digit of user's input time information carry out remainder calculating after, also to
Time value on the high order digit of family input time numerical digit carries out remainder and calculates the time data for obtaining a high position, completes to the event
The remainder of the time value of each time numerical digit in pattern of the input obtains the time data in each numerical digit after calculating, by each
Time data combination obtains the complete period, inputs a time data to realize user in single time numerical digit to complete pair
The input of whole period, input mode is key entry formula, and input method is simple, quick, and need not convert, it is only necessary at one
Numerical digit, which inputs a numeral, can complete the input to the whole period, save the time and accurate convenient and swift.
Remainder in above-described embodiment calculates the method that can use carry computation.
In the above embodiment of the present invention, program interface time entry station can also include:Second returns to module, uses
In the case that numerical digit is not highest order in the time, returns and perform the temporal information that step obtains user's input.
According to embodiments of the present invention, additionally provide a kind of for implementing said procedure interface time input method), such as Fig. 3
Shown, this method may include steps of:
Step S102:Obtain user input temporal information, wherein, temporal information include time numerical digit and with time numerical digit
Corresponding time numerical value.
Step S104:Whether the time numerical digit of judgement is highest order, wherein, highest order is the highest of correspondence current system timing
The numerical digit of unit.
Step S106:In the case where time numerical digit is not highest order, pair time numerical value corresponding with time numerical digit is carried out
Remainder operates to generate the time data of time numerical digit.
Using the present invention, passage time data obtaining module is obtained after the temporal information of user's initial input, time number
The time numerical digit for the time numerical value that position judge module is inputted to user carries out highest order judgement, and time data acquisition module is in the time
Numerical digit is not to carry out remainder operation in the case of highest order to time data to obtain time data, so that user believes in input time
The time need not be converted during breath, it is only necessary to the input time numerical value in a time numerical digit, the time numerical value of input is
Can be changed into the good time data of unit conversion, thus solve in the prior art due to user need inputted after unit conversion when
Between the ineffective technical problem that causes, automatic carry conversion is realized, it is achieved thereby that alloing user in correspondence
Any numeral is inputted in the time numerical digit of any time unit, and the technique effect of correct result may finally be obtained.
Highest order in the above-described embodiments can specifically refer to the highest order that program front-end interface is specified, and can be hour,
It can also be year, day etc., total time input Board Lot is not also limited, and user can be to time numerical digit in the present apparatus
Species, quantity and system carry out arbitrary disposition.
In the above embodiment of the present invention, the step of whether the time numerical digit of judgement is highest order can include following step
Suddenly:Whether the time numerical value of judgement is natural number;In the case where time numerical value is not natural number, time numerical value is set to acquiescence
Value, and return to the step of performing the temporal information for obtaining user's input;In the case where time numerical value is natural number, user is judged
Whether the interface of input time information is closed;In the case of being closed at interface, terminate the flow in interface input time;At interface
In the case of being not turned off, whether the time numerical digit of judgement is highest order.
Specifically, time numerical value judge module judges whether the time numerical value for input is natural number, and first returns to mould
Block returns to the temporal information for reacquiring user's input in the case where the time numerical value that user inputs not is natural number, and
Value in the time numerical digit of user's input time information is used as default(The default value can be 0 or be empty), interface
Judge module is in the case where the time numerical value that user inputs is natural number, and judging the program interface of user's input time information is
Flow that is no to close, being converted in the case where the program interface is closed by the first terminate module end time, in program interface
In the case of being not turned off, ability passage time numerical digit judging submodule judges whether time numerical digit is highest order.
By above-described embodiment, the form for the temporal information that can be inputted to user and the interface of input time are entered automatically
Row false judgment, improves the accuracy rate of time input.
In the above embodiment of the present invention, when pair time numerical value corresponding with time numerical digit carries out remainder operation to generate
Between numerical digit time data the step of can include:Whether the time numerical digit of judgement needs carry;Carry is needed in time numerical digit
In the case of, remainder operation generation time data is carried out to the time numerical value in time numerical digit;Carry is not needed in time numerical digit
In the case of, it regard the unit of time numerical digit and time numerical value as time data.
Specifically, judge that the step of whether time numerical digit needs carry can include:Compare time numerical value and time numerical digit
System size;In the case where time numerical value is more than the system of time numerical digit, the time numerical digit of determination needs carry;In the time
In the case that numerical value is less than the system of time numerical digit, the time numerical digit of determination does not need carry.
Before time numerical value progress remainder operation of the above embodiment of the present invention on to time numerical digit, enter first
Whether the row position needs the judgement of carry, so as to improve computational efficiency.
According to the abovementioned embodiments of the present invention, when pair time numerical value corresponding with time numerical digit carries out remainder operation to generate
Between numerical digit time data the step of can include:Use time numerical value divided by the system of time numerical digit obtain the first remainder and
One business;Using the first remainder as the value of time numerical digit, the first business is added in a high position;By the digit of time numerical digit and time
The value of numerical digit as time numerical digit time data, wherein, a high position is the digit of one higher than time numerical value.
Specifically, after the first business is added in a high position, method can also include:Remainder operation is carried out to a high position to obtain
Take the time data of a high position.
In the above embodiment of the present invention, after whether the time numerical digit of judgement is highest order, method can also include:
In the case that numerical digit is not highest order in the time, returns and perform the temporal information that step obtains user's input.
The present invention is discussed in detail in 4 preferred embodiments provided below in conjunction with the accompanying drawings:
Step S202:Obtain the time of user's input.Specifically, it can be detected from the front-end interface of program and read user
The temporal information of input, the temporal information can include time numerical digit and time numerical value.
Step S204:Judge whether the time interface of input is closed.Wherein, then flow knot in the case of being closed at interface
Beam, performs step S206 in the case of being not turned off at interface.
Step S206:Whether the character for judging user's input is natural number.Believe in the time of the above embodiment of the present invention
Breath can include the time numerical digit and time numerical value of user's input time information, and the character of the input at this is above-described embodiment
In time numerical value.Specifically, the legitimacy of the temporal information inputted in this step to user is judged, that is, judges that it is
No is natural number.If the character of input is illegal, that is, the character inputted is not natural number, then performs step S210;If defeated
The character entered is legal, that is, the character inputted is natural number, then performs step S208.
Step S210:The value inputted in the corresponding time numerical digit of character is set to default value.After the step has been performed
Return and perform step S202.
Step S208:Whether the present bit for judging to input character is highest order.Wherein, it is in the present bit of the character of input
In the case of highest order, step S214 is performed;In the case where the present bit of the character of input is not highest order, step is performed
S212.Wherein, above-mentioned present bit is the time numerical digit of user's input time data.
Step S214:Direct lock in time data.Namely the character of directly synchronous user's input.
Step S212:Judge whether present bit needs carry.Wherein specifically, in the case where present bit needs carry,
Perform step S216;In the case where present bit does not need carry, step S214 is performed.
Specifically, judge whether present bit needs carry can be by comparing the numerical value in present bit and present bit system
The size of value is realized, in present bit(That is time numerical digit)On numerical value(That is time numerical value)The feelings bigger than the value of present bit system
Under condition, confirm that present bit needs carry, the numerical value in present bit(That is time numerical value)The situation bigger than the value of present bit system
Under, confirm that current is not need carry.
For example:User is in the position of second(That is time numerical digit, namely the present bit in the present embodiment)Upper input 120(Immediately
Between character in numerical value, namely above-described embodiment), detecting that must to arrive the character that interface is not turned off and inputs legal(Clearly
120 be natural number)Afterwards, when judging whether the position needs carry, the size of 120 and the value of present bit system is compared, the second
Position enters to be made as 60, namely compares 120 and 60 size, 120>60, then present bit need carry.And in the application Fig. 2
What is shown inputs 30,30 on the second<60, then present bit do not need carry, direct lock in time data(30 seconds).
Step S216:With the system of the value of present bit divided by present bit, remainder is as the value of present bit, and business is added to a high position
On.
Step S218:It is present bit to set high-order.Specifically, after setting a high position to be present bit, methods described is also wrapped
Include:Return and perform step S208, to the equal remainder meter of numerical value in all numerical digits in addition to highest order of the time pattern of the input
After calculation, the acquisition to the time data of whole period is completed.
Using the above embodiment of the present invention, the pattern of the input of traditional strong depend-ence user is changed, and need many
The drawbacks of time of individual position input inputs, present invention employs the input of carry formula, user only needs to be inputted in a certain position,
It can input the deadline, while it is flexible to key in the input of formula time.When user only wants to one chronomere of input
Between when, the above embodiment of the present invention can meet its demand and convert thereof into reference format automatically.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because
According to the present invention, some steps can be carried out sequentially or simultaneously using other.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, involved action and module is not necessarily of the invention
It is necessary.
The numerical digit referred in the above embodiment of the present invention is preserves the position of numerical value, and in time field, numerical digit can have:
Second, minute, hour and day etc..The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in some embodiment
The part of detailed description, may refer to the associated description of other embodiment.
As can be seen from the above description, the present invention realizes following technique effect:Passage time data obtaining module
After the temporal information for obtaining user's initial input, the time numerical digit for the time numerical value that time numerical digit judge module is inputted to user
Highest order judgement is carried out, time data acquisition module carries out remainder in the case where time numerical digit is not highest order to time data
Operation obtains time data, so that user need not convert in input time information to the time, it is only necessary at one
Between input time numerical value in numerical digit, the time numerical value of input is that can be changed into the good time data of unit conversion, so as to solve existing
Have in technology because user needs the ineffective technical problem that input time causes after unit conversion, realize automatic
Carry conversion, it is achieved thereby that allow user correspondence any time unit time numerical digit on input any numeral, and
And the technique effect of correct result may finally be obtained.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and constituted
Network on, alternatively, the program code that they can be can perform with computing device be realized, it is thus possible to they are stored
Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they
In multiple modules or step single integrated circuit module is fabricated to realize.So, the present invention is not restricted to any specific
Hardware and software is combined.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.