CN107508650A - The processing method of time parameter, device and system in a kind of business datum - Google Patents
The processing method of time parameter, device and system in a kind of business datum Download PDFInfo
- Publication number
- CN107508650A CN107508650A CN201710721092.6A CN201710721092A CN107508650A CN 107508650 A CN107508650 A CN 107508650A CN 201710721092 A CN201710721092 A CN 201710721092A CN 107508650 A CN107508650 A CN 107508650A
- Authority
- CN
- China
- Prior art keywords
- time zone
- client
- server
- service data
- time
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 82
- 238000000034 method Methods 0.000 claims description 20
- 238000001514 detection method Methods 0.000 claims description 9
- 230000003993 interaction Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 241000208340 Araliaceae Species 0.000 description 4
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 4
- 235000003140 Panax quinquefolius Nutrition 0.000 description 4
- 235000008434 ginseng Nutrition 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000011835 investigation Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000011282 treatment Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides processing method, the device and system of time parameter in a kind of business datum, the processing method of time parameter includes in business datum:Obtain at least one business datum that server interacts with outside at least one client;For each current service data at least one business datum, detect in current service data whether carry processing label, wherein, processing label is different from the time zone that server uses for identifying client corresponding to current service data;When current service data carries processing label, time zone used in the client and server according to corresponding to current service data respectively, the time parameter that current service data includes is handled, so that time parameter is corresponding with time zone used in the receiving terminal of current service data.Technical scheme provided by the invention can make the time parameter of business datum correspond to time zone used in receiving terminal.
Description
Technical field
The present invention relates to field of computer technology, the processing method of time parameter, dress in more particularly to a kind of business datum
Put and system.
Background technology
Under the background of International Software, to adapt to internationalization business, enterprise is suitable for the ground to each area offer
The application program in area, it is easy to carry out service data interaction with each department.
During service data interaction, the business datum that each area is sent may include sending time, application
Time.Because the time zone where each area may be different, during service data interaction, for same business number
According to corresponding to the different time in client and server, for example, user submits business datum using client in Tokyo area,
Submission time is at 9 points in morning local time, and the time that the server of Beijing area receives the business datum is the local time
At 8 points in the morning, therefore the submission time of server record is at 8 points in the morning.
Same business datum corresponds to different time parameters in client and server, may result in user and service
Device is stored using the time parameter of mistake, calculated and other relevant treatments, and then brings loss to user and server.
The content of the invention
The embodiments of the invention provide processing method, the device and system of time parameter in a kind of business datum, can make
Time parameter in business datum is corresponding with the time zone of business datum receiving terminal.
In a first aspect, the invention provides a kind of processing method of time parameter in business datum, applied to server, bag
Include:
Obtain at least one business datum that the server interacts with outside at least one client;
For each current service data at least one business datum, detect in the current service data
Whether processing label is carried, wherein, the processing label is used to identify the client corresponding to the current service data
It is different from the time zone that the server uses;
When the current service data carries the processing label, respectively according to corresponding to the current service data
Time zone used in the client and the server, at the time parameter included to the current service data
Reason, so that the time parameter is corresponding with time zone used in the receiving terminal of the current service data.
It is preferably, described that the client and the server are used according to corresponding to the current service data respectively
Time zone, the time parameter included to the current service data handles, including:
When the receiving terminal of the current service data is the server, according to following first formula, by the time
Be converted to during area in parameter with the server used in the corresponding first object area in time zone when;
First formula includes:
a1=[t- (n1-n2)]+c
Wherein, a1When characterizing the first object area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n1-n2)]<When 0, c=24;As [t- (n1-n2)] >=24 when, c=-24;As 0≤[t- (n1-n2)]<When 24, c=0.
It is preferably, described that the client and the server are used according to corresponding to the current service data respectively
Time zone, the time parameter included to the current service data handles, including:
When the receiving terminal of the current service data is the client, according to following second formula, by the time
Be converted to during area in parameter with the client used in corresponding the second target area in time zone when;
Second formula includes:
a2=[t- (n2-n1)]+c
Wherein, a2When characterizing second target area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n2-n1)]<When 0, c=24;As [t- (n2-n1)] >=24 when, c=-24;As 0≤[t- (n2-n1)]<When 24, c=0.
Preferably, further comprise:
As the c=24, the date in the time parameter is reduced one day;
As the c=-24, the date in the time parameter is increased by one day.
Preferably, further comprise:
Obtain at least one time zone used at least one client;
Calculate the quantity of the client corresponding to each described time zone;
The maximum time zone of the quantity of the corresponding client is defined as time zone used in the server.
Second aspect, the present invention provide a kind of processing unit of time parameter in business datum, applied to server, bag
Include:First acquisition module, detection module and parameter processing module;
First acquisition module, interacted at least with outside at least one client for obtaining the server
One business datum;
The detection module, for every at least one business datum that is obtained for first acquisition module
One current service data, detects and processing label whether is carried in the current service data, wherein, the processing label is used
In identifying, the client corresponding to the current service data is different from the time zone that the server uses;
The parameter processing module, for detecting that the current service data carries the place when the detection module
When managing label, the time zone used in the client and the server according to corresponding to the current service data, right respectively
The time parameter that the current service data includes is handled, so that the time parameter and the current service data
Time zone is corresponding used in receiving terminal.
Preferably, the parameter processing module, for when the receiving terminal of the current service data is the server,
Be converted to according to following first formula, during by area in the time parameter with the server used in time zone it is corresponding
During first object area;
First formula includes:
a1=[t- (n1-n2)]+c
Wherein, a1When characterizing the first object area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n1-n2)]<When 0, c=24;As [t- (n1-n2)] >=24 when, c=-24;As 0≤[t- (n1-n2)]<When 24, c=0.
Preferably, the parameter processing module, for when the receiving terminal of the current service data is the client,
Be converted to according to following second formula, during by area in the time parameter with the client used in time zone it is corresponding
During the second target area;
Second formula includes:
a2=[t- (n2-n1)]+c
Wherein, a2When characterizing second target area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n2-n1)]<When 0, c=24;As [t- (n2-n1)] >=24 when, c=-24;As 0≤[t- (n2-n1)]<When 24, c=0.
Preferably, the parameter processing module, it is further used for as the c=24, by the day in the time parameter
Phase reduces one day;As the c=-24, the date in the time parameter is increased by one day.
Preferably, further comprise:Second acquisition module, computing module and selecting module;
Second acquisition module, for obtaining at least one time zone used at least one client;
The computing module, it is described corresponding to each the described time zone got for calculating second acquisition module
The quantity of client;
The selecting module, made for the maximum time zone of the quantity of the corresponding client to be defined as into the server
Time zone.
The third aspect, the invention provides a kind of processing system of time parameter in business datum, including:Server, extremely
Lack the processing unit of time parameter in any business datum in a client and second aspect;
The server, at least one business datum interacted with least one client to be sent to
The processing unit of time parameter in the business datum;
At least one client, for interacted with the server at least one business datum to be sent to
The processing unit of time parameter in the business datum.
The embodiments of the invention provide processing method, the device and system of time parameter in a kind of business datum, obtain clothes
At least one business datum that business device interacts with outside at least one client, the business datum interacted include service
Device is sent to the business datum of client and client is sent to the business datum of server, selects business datum now to carry out
Processing, ensure that processing procedure can be completed in server-side, without being handled respectively in each client;Obtaining
After getting business datum, it can detect and processing label whether is carried in current service data, be interacted in client and server
Before, some business datums configuration processing label can be given, to identify used in the client and server of these business datums
Time zone is different, so when client and server carries out data interaction, will only handle the business datum for carrying processing label;
The time zone used according to its corresponding client and server, carried to what is detected in the current service data for handling label
Time parameter is handled so that time zone used in the time parameter of current service data and the receiving terminal of current service data
It is corresponding.As can be seen here, when server interacts with client, the present invention passes through the processing mark to business datum configuration in advance
Label, the time zone according to used in client and server, the business datum for handling carrying label is handled, so that business
The time parameter of data corresponds to time zone used in receiving terminal.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
These accompanying drawings obtain other accompanying drawings.
Fig. 1 is the flow chart of the processing method of time parameter in a kind of business datum that one embodiment of the invention provides;
Fig. 2 is the flow of the processing method of time parameter in another business datum that one embodiment of the invention provides
Figure;
Fig. 3 is the structural representation of the processing unit of time parameter in a kind of business datum that one embodiment of the invention provides
Figure;
Fig. 4 is that the structure of the processing unit of time parameter in another business datum that one embodiment of the invention provides is shown
It is intended to;
Fig. 5 is the structural representation of the processing system of time parameter in a kind of business datum that one embodiment of the invention provides
Figure.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of processing method of time parameter in business datum, applied to clothes
Business device, comprises the following steps:
Step 101, at least one business datum that the server interacts with outside at least one client is obtained.
Step 102, for each current service data at least one business datum, the current industry is detected
Processing label whether is carried in business data, wherein, the processing label is used to identify institute corresponding to the current service data
It is different from the time zone that the server uses to state client.
Step 103, when the current service data carries the processing label, respectively according to the current business number
According to time zone, the time parameter included to the current service data used in the corresponding client and the server
Handled, so that the time parameter is corresponding with time zone used in the receiving terminal of the current service data.
The embodiments of the invention provide a kind of processing method of time parameter in business datum, obtains server and outside extremely
At least one business datum that a few client interacts, the business datum interacted are sent to client including server
The business datum and client at end are sent to the business datum of server, select business datum now to be handled, at guarantee
Reason process can be completed in server-side, without being handled respectively in each client;Getting business number
According to afterwards, it can detect and processing label whether is carried in current service data, before client and server interaction, one can be given
A little business datum configuration processing labels, it is different to identify time zone used in the client and server of these business datums, this
Sample only processing will carry the business datum for handling label when client and server carries out data interaction;It is corresponding according to it
The time zone that uses of client and server, time parameter in the current service data for carrying processing label that detects is entered
Row processing so that the time parameter of current service data is corresponding with time zone used in the receiving terminal of current service data.By
This is visible, and when server interacts with client, the present invention is by the processing label to business datum configuration in advance, according to client
Time zone used in end and server, the business datum for handling carrying label is handled, so that the time of business datum
Parameter corresponds to time zone used in receiving terminal.
Time parameter typically contains the specific moment such as 7 in business datum:15a.m., and such as January 1 in 2011 on date
Day, in processing time parameter, the specific moment is handled first.In one embodiment of the invention, described in the basis respectively
Time zone used in the client corresponding to current service data and the server, includes to the current service data
Time parameter handled, including:
When the receiving terminal of the current service data is the server, according to following first formula, by the time
Be converted to during area in parameter with the server used in the corresponding first object area in time zone when;
First formula includes:
a1=[t- (n1-n2)]+c
Wherein, a1When characterizing the first object area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n1-n2)]<When 0, c=24;As [t- (n1-n2)] >=24 when, c=-24;As 0≤[t- (n1-n2)]<When 24, c=0.
When the receiving terminal of current service data is server, during first object area during the area at corresponding with service end, time ginseng
When corresponding to area used in client during several area, now by client's petiolarea when when being converted into the area of service end, profit in formula
The numbering in time zone and server is used to use the numbering in time zone to determine the time difference in two time zones with client.Specifically, exist
In the embodiment of the present invention, numbering corresponding to an eastern area to eastern No.12 District is 1 to 12, is numbered corresponding to a western area to western No.12 District
For -1 to -12, middle time zone is 0.For example, the numbering in eastern 8th area is 8, the numbering in eastern 9th area is 9, then Dong Jiuqu and eastern 8th area
The time difference is 9-8=1 (hour).The time difference is subtracted during with the area in time parameter, when being exactly the area of corresponding server.It is special at some
In the case of different, the Qu Shihui that the above method obtains is less than 0 or not less than 24, at this moment needs to adjust by c, to obtain correctly
Qu Shi.For example, client uses Dong Jiuqu, server uses Xisi area, is 12 during the area of time parameter:00, according to
According to the first formula, a during first object area1=[12- (9- (- 4)]+24:00=-1:00+24:00=23:00;Client uses
Be Xisi area, server uses Dong Shiqu, is 12 during the area of time parameter:00, according to the first formula, now the first mesh
A when marking area1=[12- ((- 4) -10] -24:00=26:00-24:00=2:00.
Similarly, it is in one embodiment of the invention, described respectively according to the current industry when client is receiving terminal
Time zone used in the client corresponding to data of being engaged in and the server, the time included to the current service data
Parameter is handled, including:
When the receiving terminal of the current service data is the client, according to following second formula, by the time
Be converted to during area in parameter with the client used in corresponding the second target area in time zone when;
Second formula includes:
a2=[t- (n2-n1)]+c
Wherein, a2When characterizing second target area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n2-n1)]<When 0, c=24;As [t- (n2-n1)] >=24 when, c=-24;As 0≤[t- (n2-n1)]<When 24, c=0.
The span and calculation condition of each parameter of second formula are identical with the first formula, unlike, second is public
When being converted into the area of client when formula is by the area of server.Therefore, when calculating the time difference, the numbering in time zone is used with server
n2Subtract the numbering n that client uses time zone1, it is just opposite with the first formula.
Time parameter not only contains the specific moment in business datum, also contains the date.Generally, the place of time parameter
Reason result only changes the specific moment, does not change the date, but the time zone that client uses with server sometimes is on the same day, in order to
Solve the above situation, in one embodiment of the invention, further comprise:
As the c=24, the date in the time parameter is reduced one day;
As the c=-24, the date in the time parameter is increased by one day.
The excursion at moment is 0≤T among one day<24, if a certain moment is less than 0, illustrate the date pair at the moment
Should the day date the previous day;If a certain moment is not less than 24, illustrate the corresponding date on the same day on date at the moment one day after.
In embodiments of the present invention, as c=24, illustrate to be less than 0 during obtained area, so the date in time parameter is reduced into one
My god;As c=-24, illustrate to be not less than 24 during obtained area, so the date in time parameter is increased by one day.
In real life, client region be directly facing user, be applied in order to facilitate user, the time zone that client uses and visitor
The time zone that family uses is consistent., can be to service for convenience of working but server can receive the service request that all parts of the world is sent
Device formulates a time zone used, in one embodiment of the invention, further comprises:
Obtain at least one time zone used at least one client;
Calculate the quantity of the client corresponding to each described time zone;
The maximum time zone of the quantity of the corresponding client is defined as time zone used in the server.
By obtaining time zone used in client, the quantity of the client in each time zone is calculated, selects number clients
That maximum time zone is measured as time zone used in server, so can farthest reduce time ginseng in business datum
Several processing workloads.
For example, all clients only use three time zones, the client terminal quantity in A time zones is 30,000, the client in B time zones
It is 20,000 to hold quantity, and the client terminal quantity in C time zones is 10,000.Assuming that each client only sends a business number daily
According to if server uses A time zones, needing to handle 30,000 business datums daily;If server uses B time zones, need
40,000 business datums of processing daily;If server uses C time zones, need to handle 50,000 business datums daily.Therefore, select
The processing workload of time parameter in business datum can be reduced to greatest extent by selecting the most place of client terminal quantity.
In order to which above-described embodiment is better described, with domestic corporation go abroad on a tour of investigation the areas of personnel Xi five to domestic server send out
Exemplified by sending reimbursement document, the time parameter wherein in reimbursement document is consumption time, as shown in Fig. 2 the embodiment of the present invention provides
The processing method of time parameter, comprises the following steps in another business datum:
Step 201, at least one time zone used at least one client is obtained.
Step 202, the quantity of client corresponding to each time zone is calculated.
Step 203, the maximum time zone of the quantity of corresponding client is defined as time zone used in server.
In embodiments of the present invention, due to being domestic corporation, reimbursement document is in-company business again, therefore, reimbursement
Document is mostly domestic consumer record, and is sent by domestic correspondent end to server.The personnel amount that domestic corporation goes abroad on a tour of investigation,
And the number gone abroad on a tour of investigation all is limited.In summary, the quantity at domestic correspondent end is necessarily maximum, therefore server
Use the time zone of the country, the areas of Ji Dong eight.
Step 204, at least one reimbursement document that associate is sent by user end to server is obtained.
Step 205, detect whether each reimbursement document carries processing label, if it is, performing step 206;Otherwise, tie
Beam current process.
In embodiments of the present invention, after due to going abroad, external client uses Xi Wuqu, is used with server
Eastern 8th area are different, and therefore, only external reimbursement document can configure processing label, and domestic correspondent end all uses eastern 8th area, no
Occur same time parameter on the client with situation that different time is corresponded on server.
Step 206, be converted to according to the first formula, during by area in consumption time with server used in time zone it is relative
During the first object area answered.
In embodiments of the present invention, the consumption time in corresponding western 5th area is August in 2011 15 days 14:00, then according to
One formula, [14:00- ((- 5) -8)]=27:00>24, therefore c=-24, therefore a when east eight is trivial corresponding to consumption time1=
27:00-24:00=3:00.
Step 207, whether the value for judging c is 0, if it is, terminating current process;Otherwise, step 208 is performed.
In embodiments of the present invention, with, on the same day, being not required to during first object area when c=0 illustrates the area in consumption time
Date is modified.
Step 208, whether the value for judging c is 24, if performing step 209;Otherwise, step 210 is performed.
In embodiments of the present invention, c=-24, thus the date of consumption time to increase by one day, finally give corresponding east eight
The consumption time in area is August in 2011 16 days 3:00.
Step 209, the date in time parameter is reduced one day, and terminates current process.
Step 210, the date in time parameter is increased by one day.
, can be according to being actually needed by technical scheme provided by the invention, will be relative with western 5th area in reimbursement document
The consumption time answered is converted into the consumption time corresponding with the time zone in eastern 8th area.This can facilitate server to enter the reimbursement document
Row further processing, such as the consumption date of the corporate policy reimbursement document could submit an expense accounts on the 16th for August, if directly recorded western
The consumption time in 5th area, consumption date are exactly August 15, are unsatisfactory for reimbursement condition, cause the reimbursement document invalid, provide compatriots
Member makes troubles.
As shown in figure 3, the embodiments of the invention provide a kind of processing unit of time parameter in business datum, applied to clothes
Business device, including:First acquisition module 301, detection module 302 and parameter processing module 303;
First acquisition module 301, interacted at least with outside at least one client for obtaining the server
One business datum;
Detection module 302, for each at least one business datum that is obtained for the first acquisition module 301
Bar current service data, detect and processing label whether is carried in the current service data, wherein, the processing label is used for
It is different from the time zone that the server uses to identify the client corresponding to the current service data;
Parameter processing module 303, for detecting that the current service data carries the processing when detection module 302
During label, the time zone used in the client and the server according to corresponding to the current service data respectively, to institute
The time parameter that stating current service data includes is handled, so that the time parameter and the current service data connect
Time zone is corresponding used in receiving end.
In one embodiment of the invention, parameter processing module 303, for when the receiving terminal of the current service data
For the server when, be converted to according to following first formula, during by area in the time parameter is made with the server
During the corresponding first object area in time zone;
First formula includes:
a1=[t- (n1-n2)]+c
Wherein, a1When characterizing the first object area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n1-n2)]<When 0, c=24;As [t- (n1-n2)] >=24 when, c=-24;As 0≤[t- (n1-n2)]<When 24, c=0;
In one embodiment of the invention, parameter processing module 303, for when the receiving terminal of the current service data
For the client when, be converted to according to following second formula, during by area in the time parameter is made with the client
During corresponding the second target area in time zone;
Second formula includes:
a2=[t- (n2-n1)]+c
Wherein, a2When characterizing second target area, when t characterizes the area in the time parameter, n1Characterize the client
The numbering in used time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, eastern time zone
Numbering be integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, when
[t-(n2-n1)]<When 0, c=24;As [t- (n2-n1)] >=24 when, c=-24;As 0≤[t- (n2-n1)]<When 24, c=0.
In one embodiment of the invention, the parameter processing module, it is further used for as the c=24, by institute
The date stated in time parameter reduces one day;As the c=-24, the date in the time parameter is increased by one day.
As shown in figure 4, the embodiments of the invention provide a kind of processing unit of time parameter in business datum, further wrap
Include:Second acquisition module 401, computing module 401 and selecting module 402;
Second acquisition module 401, for obtaining at least one time zone used at least one client;
Computing module 402, the visitor corresponding to each the described time zone got for calculating the second acquisition module 401
The quantity at family end;
Selecting module 403, made for the maximum time zone of the quantity of the corresponding client to be defined as into the server
Time zone.
The contents such as the information exchange between each unit, implementation procedure in said apparatus, due to implementing with the inventive method
Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
As shown in figure 5, the embodiments of the invention provide a kind of processing system of time parameter in business datum, including:Clothes
It is engaged in device 501, at least one client 502 and above-described embodiment the processing unit of time parameter in any business datum
503;
Server 501, at least one business datum interacted with least one client to be sent to
The processing unit of time parameter in the business datum;
At least one client 502, for interacted with the server at least one business datum to be sent to
The processing unit of time parameter in the business datum.
In embodiments of the present invention, the processing unit of time parameter is set in the server in business datum.
The embodiments of the invention provide a kind of computer-readable recording medium, including execute instruction, when the computing device of storage control
During the execute instruction, the storage control performs time ginseng in the business datum provided in any one embodiment of the invention
Several processing methods.
The embodiments of the invention provide a kind of storage control, including:Processor, memory and bus;
The memory is used to store execute instruction, and the processor is connected with the memory by the bus, when
During the storage control operation, the execute instruction of memory storage described in the computing device, so that the storage
Controller performs the processing method of time parameter in the business datum provided in any one embodiment of the invention.
In summary, each embodiment of the present invention at least has the advantages that:
1st, in one embodiment of the invention, server interacts with outside at least one client at least one is obtained
Business datum, the business datum interacted is sent to the business datum of client including server and client is sent to service
The business datum of device, select business datum now to be handled, ensure that processing procedure can be completed in server-side, without
Need to be handled in each client respectively;After business datum is got, can detect in current service data whether
Processing label is carried, before client and server interaction, some business datums configuration processing label can be given, to identify this
Time zone used in the client and server of a little business datums is different, so carries out data interaction in client and server
When, only processing it will carry the business datum for handling label;The time zone used according to its corresponding client and server, to inspection
Time parameter is handled in the current service data for carrying processing label measured so that the time ginseng of current service data
Number is corresponding with time zone used in the receiving terminal of current service data.As can be seen here, when server interacts with client, this
Invention passes through the processing label configured in advance to business datum, the time zone according to used in client and server, at carrying
The business datum of reason label is handled, so that the time parameter of business datum corresponds to time zone used in receiving terminal.
2nd, in one embodiment of the invention, by by the maximum time zone of the quantity of client be defined as that server uses when
Area, the processing workload of time parameter in business datum can be reduced to greatest extent.
3rd, in one embodiment of the invention, the processing unit of time parameter in business datum is set in the server so that
Each functional unit of each client and server need not handle the time parameter in respective business datum respectively, from
And it ensure that the operating efficiency of server and client side.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity
Or operation makes a distinction with another entity or operation, and not necessarily require or imply and exist between these entities or operation
Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non-
It is exclusive to include, so that process, method, article or equipment including a series of elements not only include those key elements,
But also the other element including being not expressly set out, or also include solid by this process, method, article or equipment
Some key elements.In the absence of more restrictions, by sentence " including the key element that a 〃 〃 " is limited, it is not excluded that
Other identical factor in the process including the key element, method, article or equipment also be present.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, is merely to illustrate the skill of the present invention
Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention,
Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.
Claims (10)
- A kind of 1. processing method of time parameter in business datum, it is characterised in that applied to server, including:Obtain at least one business datum that the server interacts with outside at least one client;For each current service data at least one business datum, detect in the current service data whether Processing label is carried, wherein, the processing label is used to identify the client corresponding to the current service data and institute It is different to state the time zone that server uses;When the current service data carries the processing label, respectively according to corresponding to the current service data Time zone used in client and the server, the time parameter included to the current service data are handled, with Make the time parameter corresponding with time zone used in the receiving terminal of the current service data.
- 2. according to the method for claim 1, it is characterised in that the institute according to corresponding to the current service data respectively Time zone used in client and the server is stated, the time parameter included to the current service data is handled, Including:When the receiving terminal of the current service data is the server, according to following first formula, by the time parameter In area when be converted to the server used in the corresponding first object area in time zone when;First formula includes:a1=[t- (n1-n2)]+cWherein, a1When characterizing the first object area, when t characterizes the area in the time parameter, n1Characterizing the client is made With the numbering in time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, the volume in eastern time zone Number for the integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, as [t- (n1-n2)]<When 0, c=24;As [t- (n1-n2)] >=24 when, c=-24;As 0≤[t- (n1-n2)]<When 24, c=0.
- 3. according to the method for claim 1, it is characterised in that the institute according to corresponding to the current service data respectively Time zone used in client and the server is stated, the time parameter included to the current service data is handled, Including:When the receiving terminal of the current service data is the client, according to following second formula, by the time parameter In area when be converted to the client used in corresponding the second target area in time zone when;Second formula includes:a2=[t- (n2-n1)]+cWherein, a2When characterizing second target area, when t characterizes the area in the time parameter, n1Characterizing the client is made With the numbering in time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, the volume in eastern time zone Number for the integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, as [t- (n2-n1)]<When 0, c=24;As [t- (n2-n1)] >=24 when, c=-24;As 0≤[t- (n2-n1)]<When 24, c=0.
- 4. according to the method described in Claims 2 or 3, it is characterised in that further comprise:As the c=24, the date in the time parameter is reduced one day;As the c=-24, the date in the time parameter is increased by one day.
- 5. according to the method for claim 1, it is characterised in that further comprise:Obtain at least one time zone used at least one client;Calculate the quantity of the client corresponding to each described time zone;The maximum time zone of the quantity of the corresponding client is defined as time zone used in the server.
- A kind of 6. processing unit of time parameter in business datum, it is characterised in that applied to server, including:First obtains Module, detection module and parameter processing module;First acquisition module, at least one interacted for obtaining the server with outside at least one client Business datum;The detection module, for each at least one business datum that is obtained for first acquisition module Current service data, detect and processing label whether is carried in the current service data, wherein, the processing label is used to mark It is different from the time zone that the server uses to know the client corresponding to the current service data;The parameter processing module, for detecting that the current service data carries the processing mark when the detection module During label, the time zone used in the client and the server according to corresponding to the current service data respectively, to described The time parameter that current service data includes is handled, so that the reception of the time parameter and the current service data Time zone is corresponding used in end.
- 7. device according to claim 6, it is characterised in thatThe parameter processing module, for when the receiving terminal of the current service data is the server, according to following One formula, be converted to during by area in the time parameter with the server used in the corresponding first object area in time zone When;First formula includes:a1=[t- (n1-n2)]+cWherein, a1When characterizing the first object area, when t characterizes the area in the time parameter, n1Characterizing the client is made With the numbering in time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, the volume in eastern time zone Number for the integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, as [t- (n1-n2)]<When 0, c=24;As [t- (n1-n2)] >=24 when, c=-24;As 0≤[t- (n1-n2)]<When 24, c=0;And/orThe parameter processing module, for when the receiving terminal of the current service data is the client, according to following Two formula, be converted to during by area in the time parameter with the client used in corresponding the second target area in time zone When;Second formula includes:a2=[t- (n2-n1)]+cWherein, a2When characterizing second target area, when t characterizes the area in the time parameter, n1Characterizing the client is made With the numbering in time zone, n2The numbering that the server uses time zone is characterized, wherein, the numbering in middle time zone is 0, the volume in eastern time zone Number for the integer more than 0 and no more than 12, the numbering in western time zone is less than 0 and is not less than -12 integer;C is constant, as [t- (n2-n1)]<When 0, c=24;As [t- (n2-n1)] >=24 when, c=-24;As 0≤[t- (n2-n1)]<When 24, c=0.
- 8. according to the device described in claim 7, it is characterised in thatThe parameter processing module, it is further used for as the c=24, the date in the time parameter is reduced one day; As the c=-24, the date in the time parameter is increased by one day.
- 9. according to the device described in claim 6, it is characterised in thatFurther comprise:Second acquisition module, computing module and selecting module;Second acquisition module, for obtaining at least one time zone used at least one client;The computing module, the client corresponding to each the described time zone got for calculating second acquisition module The quantity at end;The selecting module, for the maximum time zone of the quantity of the corresponding client to be defined as used in the server Time zone.
- A kind of 10. processing system of time parameter in business datum, it is characterised in that including:Server, at least one client With the processing unit of time parameter in any business datum in claim 6 to 9;The server, it is described at least one business datum interacted with least one client to be sent to The processing unit of time parameter in business datum;At least one client, it is described for interacted with the server at least one business datum to be sent to The processing unit of time parameter in business datum.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710721092.6A CN107508650A (en) | 2017-08-18 | 2017-08-18 | The processing method of time parameter, device and system in a kind of business datum |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710721092.6A CN107508650A (en) | 2017-08-18 | 2017-08-18 | The processing method of time parameter, device and system in a kind of business datum |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107508650A true CN107508650A (en) | 2017-12-22 |
Family
ID=60692080
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710721092.6A Pending CN107508650A (en) | 2017-08-18 | 2017-08-18 | The processing method of time parameter, device and system in a kind of business datum |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107508650A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114666357A (en) * | 2020-12-08 | 2022-06-24 | 中国石油天然气股份有限公司 | System and method for exchanging oil and gas pipeline data |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101364892A (en) * | 2007-08-08 | 2009-02-11 | 中兴通讯股份有限公司 | Time conversion method based on network element of different time zones |
CN102368745A (en) * | 2011-09-06 | 2012-03-07 | 上海量明科技发展有限公司 | Method for providing time difference information in instant messaging and system thereof |
US20130007142A1 (en) * | 2011-06-30 | 2013-01-03 | Jonathan Rosenberg | Processing A Message |
-
2017
- 2017-08-18 CN CN201710721092.6A patent/CN107508650A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101364892A (en) * | 2007-08-08 | 2009-02-11 | 中兴通讯股份有限公司 | Time conversion method based on network element of different time zones |
US20130007142A1 (en) * | 2011-06-30 | 2013-01-03 | Jonathan Rosenberg | Processing A Message |
CN102368745A (en) * | 2011-09-06 | 2012-03-07 | 上海量明科技发展有限公司 | Method for providing time difference information in instant messaging and system thereof |
Non-Patent Citations (1)
Title |
---|
俞坤一: "世界时区的划分和时间的换算", 《国际经济贸易地理》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114666357A (en) * | 2020-12-08 | 2022-06-24 | 中国石油天然气股份有限公司 | System and method for exchanging oil and gas pipeline data |
CN114666357B (en) * | 2020-12-08 | 2023-11-28 | 中国石油天然气股份有限公司 | System and method for exchanging oil and gas pipeline data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408337B (en) | Interface operation and maintenance method and device | |
CN107193499A (en) | A kind of moving method and device of container data volume | |
US20100223446A1 (en) | Contextual tracing | |
CN112039701B (en) | Interface call monitoring method, device, equipment and storage medium | |
CN109785042A (en) | Abnormality eliminating method, server, storage medium and the device of distributed deployment | |
CN106443166B (en) | A kind of kilowatt meter reading-out system based on platform of internet of things | |
CN105468519A (en) | Performance-testing tool control method and device | |
CN107133323A (en) | Data model construction method, the implementation method of government affairs service business and device | |
CN104050548A (en) | System and method for work attendance management | |
CN107508650A (en) | The processing method of time parameter, device and system in a kind of business datum | |
CN103110229B (en) | Clothing processing efficiency monitoring system and method based on information of sewing equipment | |
CN103368970B (en) | A kind of automation safety detection method for network objectives | |
CN107528843A (en) | The processing method and processing unit of a kind of network request | |
CN110457553A (en) | Batch file processing method, device, equipment and storage medium | |
US11157690B2 (en) | Techniques for asynchronous execution of computationally expensive local spreadsheet tasks | |
CN107734080A (en) | Multi-user's domain name mapping and the method for name server migration | |
CN103970599B (en) | A kind of data processing method and device based on multi-course concurrency | |
CN107704362A (en) | A kind of method and device based on Ambari monitoring big data components | |
CN103593429A (en) | Commodity template failure detection method and device | |
CN107525955A (en) | Ammeter data processing method and device | |
CN107122408A (en) | Information association and its database audit method, auditing system | |
CN107147719A (en) | A kind of hardware update method, master node, slave node and server cluster | |
CN108647793B (en) | Intelligent management and control platform for installation and maintenance quality | |
CN101620567A (en) | Error locating auxiliary method and device | |
CN104899696A (en) | Transformer station material distribution control analysis application method |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20171222 |
|
WD01 | Invention patent application deemed withdrawn after publication |