CN104580409B - service request processing method, server and terminal - Google Patents

service request processing method, server and terminal Download PDF

Info

Publication number
CN104580409B
CN104580409B CN201410818398.XA CN201410818398A CN104580409B CN 104580409 B CN104580409 B CN 104580409B CN 201410818398 A CN201410818398 A CN 201410818398A CN 104580409 B CN104580409 B CN 104580409B
Authority
CN
China
Prior art keywords
service request
time
request
server
terminal
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
CN201410818398.XA
Other languages
Chinese (zh)
Other versions
CN104580409A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201410818398.XA priority Critical patent/CN104580409B/en
Publication of CN104580409A publication Critical patent/CN104580409A/en
Application granted granted Critical
Publication of CN104580409B publication Critical patent/CN104580409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Abstract

The invention discloses a kind of service request processing method, server and terminal, belong to Internet technical field.Methods described includes:The service request that receiving terminal is sent;According at least to sending request time, receiving request time and journey time, judge whether service request is invalid service request;If service request is not invalid service request, service request is handled.The present invention judges whether service request is invalid service request, if service request is not invalid service request, service request is handled according at least to sending request time, receiving request time and journey time.Due to can judge according to sending request time, receiving request time and journey time service request, so as to be screened to the service request repeated, avoid because repeat service request and caused by server congestion and result error.Therefore, lighter to the burden of server, the effect of business processing is preferable.

Description

Service request processing method, server and terminal
Technical field
The present invention relates to Internet technical field, more particularly to a kind of service request processing method, server and terminal.
Background technology
With the fast development of development of Mobile Internet technology, the user of using terminal is more and more.Server usually requires to connect The service request that terminal is sent is received, service request is handled, to complete corresponding business.Wherein, terminal is in the business of transmission During request, it may cause to repeat to send service request to server because of reasons such as network failures.Now, server may The service request largely repeated can be received.In addition, when server receives repetition service request, may be to same business Repeat to handle so that service logic mistake, cause the result error of correlation.
During the present invention is realized, inventor has found that the above method at least has problems with:
Due in processing business, it is possible that same service request is transmitted several times in finite time to server Situation, now, server can receive the service request of repetition, cause to cause server congestion.In addition, it can also cause server Because handling the service request repeated, result mistake is caused.Therefore, it is larger to the burden of server, business processing It is ineffective.
The content of the invention
In order to solve problem of the prior art, the embodiments of the invention provide a kind of service request processing method, server And terminal.The technical scheme is as follows:
First aspect according to embodiments of the present invention, there is provided a kind of service request processing method, this method include:
The service request that receiving terminal is sent, business datum, the business datum are comprised at least in the service request Verification data, request time, journey time and terminal applies mark are sent, the journey time is that the terminal is sent for the first time Service request receives the time difference of service request with server for the first time;
According at least to the transmission request time, request time and the journey time are received, judges the service request Whether it is invalid service request;
If the service request is not invalid service request, the service request is handled.
It is described according at least to the transmission with reference in a first aspect, in the first possible implementation of first aspect Request time, request time and the journey time are received, judge whether the service request is invalid service request, including:
The transmission request time and the journey time are added, obtains and is worth;
The reception request time is subtracted each other with described and value, obtains the first difference;
Judge whether first difference is more than predetermined threshold value;
If first difference is more than predetermined threshold value, it is determined that the service request is invalid service request.
With reference to the first possible implementation of first aspect, in second of possible implementation of first aspect In, it is described to judge whether first difference is more than after predetermined threshold value, in addition to:
If first difference is not more than predetermined threshold value, judge whether be stored with the verification data in caching;
If the verification data is stored with the caching, it is determined that the service request is invalid service request.
It is described according at least to the transmission with reference in a first aspect, in the third possible implementation of first aspect Request time, request time and the journey time are received, judge whether the service request is invalid service request, including:
According to the business datum and the verification data, judge whether the service request is invalid service request.
With reference to the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect In, it is described according to the business datum and the verification data, judge whether the service request is invalid service request, wrap Include:
The business datum is calculated according to preset algorithm, obtains result of calculation;
The data of presetting digit capacity in the result of calculation are chosen, as data to be verified;
The data to be verified are compared with the verification data;
If the data to be verified and the verification data are inconsistent, it is determined that the service request please for invalid business Ask.
With reference to the industry that in a first aspect, in the 5th kind of possible implementation of first aspect, the receiving terminal is sent After business request, in addition to:
Calculate the transmission request time and receive the second difference between request time;
If the difference between second difference and the journey time is not within the scope of default value, to the end Tranmitting data register change mark is held, is identified by the terminal according to the clock change, redefines local zone time.
With reference in a first aspect, in the 6th kind of possible implementation of first aspect, methods described also includes:
When the terminal is sends service request for the first time, obtain the first time service request of the terminal transmission and connect The time of the first time service request is received, is comprised at least in the first time service request and sends request time;
The difference between the transmission request time and the time for receiving the first time service request is calculated, by described in Difference is as journey time;
The journey time is returned to the terminal.
Second aspect according to embodiments of the present invention, there is provided a kind of service request processing method, this method include:
When detect trigger new business when, obtain business datum;
According to the business datum, the verification data of the business datum is generated;
According to the business datum and the verification data of the business datum, service request is generated, in the service request Including at least business datum, the verification data of the business datum, request time, journey time and terminal applies mark are sent, The journey time is that the terminal sends the time difference that service request receives service request with server for the first time for the first time;
The service request is sent to server, the service request is received by the server, to the service request Handled.
It is described to described in server transmission in the first possible implementation of first aspect with reference to second aspect Before service request, in addition to:
If current to send service request for the first time, first time service request, the first time are sent to the server Comprised at least in service request and send request time, by the server according to the first time service request, when calculating stroke Between, the journey time is returned;
Receive the journey time that the server returns.
The third aspect according to embodiments of the present invention, there is provided a kind of server, the server include:
Receiving module, for the service request of receiving terminal transmission, business datum, institute are comprised at least in the service request State the verification data of business datum, send request time, journey time and terminal applies mark, the journey time is the end End sends the time difference that service request receives service request with server for the first time for the first time;
Judge module, for according at least to transmission request time, reception request time and the journey time, judging Whether the service request is invalid service request;
Processing module, for when the service request is not invalid service request, then to the service request at Reason.
With reference to the third aspect, in the first possible implementation of the third aspect, the judge module, including:
First computing unit, for the transmission request time and the journey time to be added, obtain and be worth;
Second computing unit, for the reception request time to be subtracted each other with described and value, obtain the first difference;
First judging unit, for judging whether first difference is more than predetermined threshold value;
First determining unit, for when first difference is more than predetermined threshold value, determining that the service request is invalid Service request.
With reference to the first possible implementation of the third aspect, in second of possible implementation of the third aspect In, the judge module also includes:
Second judging unit, for when first difference is not more than predetermined threshold value, judging whether be stored with caching The verification data;
Second determining unit, for when being stored with the verification data in the caching, determining that the service request is Invalid service request.
With reference to the third aspect, in the third possible implementation of the third aspect, the judge module, including:
3rd judging unit, for according to the business datum and the verification data, whether judging the service request For invalid service request.
With reference to the third possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect In, the 3rd judging unit, for being calculated according to preset algorithm the business datum, obtain result of calculation;Choose The data of presetting digit capacity in the result of calculation, as data to be verified;The data to be verified are entered with the verification data Row compares;If the data to be verified and the verification data are inconsistent, it is determined that the service request is invalid service request.
With reference to the third aspect, in the 5th kind of possible implementation of the third aspect, it is characterised in that the server Also include:
First computing module, for calculating the transmission request time and receiving the second difference between request time;
Sending module, for when the difference between second difference and the journey time not default value scope it When interior, then change and identify to the terminal tranmitting data register, identified by the terminal according to the clock change, redefine local Time.
With reference to the third aspect, in the 6th kind of possible implementation of the third aspect, the server also includes:
Acquisition module, for when the terminal is sends service request for the first time, obtaining the terminal is sent first Secondary service request and the time for receiving the first time service request, comprise at least that send please in the first time service request Seeking time;
Second computing module, for calculating the transmission request time and receiving the time of the first time service request Between difference, using the difference as journey time;
Module is returned to, for returning to the journey time to the terminal.
Fourth aspect according to embodiments of the present invention, there is provided a kind of terminal, the terminal include:
Acquisition module, for when detect trigger new business when, obtain business datum;
First generation module, for according to the business datum, generating the verification data of the business datum;
Second generation module, for the verification data according to the business datum and the business datum, generation business please Ask, when business datum, the verification data of the business datum are comprised at least in the service request, sending request time, stroke Between and terminal applies mark, the journey time be that the terminal sends service request and server first time and received for the first time The time difference of service request;
First sending module, for sending the service request to server, receiving the business by the server please Ask, the service request is handled.
With reference to fourth aspect, in the first possible implementation of fourth aspect, the terminal also includes:
Second sending module, in the current transmission service request for first time, being sent for the first time to the server Service request, comprise at least in the first time service request and send request time, by the server according to the first time Service request, journey time is calculated, the journey time is returned;
Receiving module, the journey time returned for receiving the server.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
The service request sent by receiving terminal, according at least to sending request time, receive request time and during stroke Between, judge whether service request is invalid service request, if service request is not invalid service request, service request is carried out Processing.Due to can judge according to sending request time, receiving request time and journey time service request, so as to Can to repeat service request screen, avoid because repeat service request and caused by server congestion and result Error.Therefore, lighter to the burden of server, the effect of business processing is preferable.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is a kind of flow chart of service request processing method according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of service request processing method according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of service request processing method according to an exemplary embodiment.
Fig. 4 is a kind of structural representation of server according to an exemplary embodiment.
Fig. 5 is a kind of structural representation of judge module according to an exemplary embodiment.
Fig. 6 is a kind of structural representation of judge module according to an exemplary embodiment.
Fig. 7 is a kind of structural representation of judge module according to an exemplary embodiment.
Fig. 8 is a kind of structural representation of server according to an exemplary embodiment.
Fig. 9 is a kind of structural representation of server according to an exemplary embodiment.
Figure 10 is a kind of structural representation of terminal according to an exemplary embodiment.
Figure 11 is a kind of structural representation of terminal according to an exemplary embodiment.
Figure 12 is a kind of block diagram of server according to an exemplary embodiment.
Figure 13 is a kind of block diagram of terminal according to an exemplary embodiment.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Fig. 1 is a kind of flow chart of service request processing method according to an exemplary embodiment, the service request Processing method is applied to server.As shown in figure 1, the service request processing method comprises the following steps.
101st, the service request that receiving terminal is sent, the verification of business datum, business datum is comprised at least in service request Data, request time, journey time and terminal applies mark are sent, journey time is that terminal sends service request and clothes for the first time Business device receives the time difference of service request for the first time.
102nd, according at least to sending request time, receiving request time and journey time, judge whether service request is nothing Imitate service request.
If the 103, service request is not invalid service request, service request is handled.
Method provided in an embodiment of the present invention, the service request sent by receiving terminal, when being asked according at least to transmission Between, receive request time and journey time, judge whether service request is invalid service request, if service request is not invalid industry Business request, then handled service request.Due to can according to sending request time, receive request time and journey time, Service request is judged, so as to repeat service request screen, avoid because repeat service request and caused by Server congestion and result error.Therefore, lighter to the burden of server, the effect of business processing is preferable.
As a kind of alternative embodiment, according at least to sending request time, receiving request time and journey time, industry is judged Whether business request is invalid service request, including:
Request time will be sent and journey time is added, obtain and be worth;
Will receive request time with and value subtract each other, obtain the first difference;
Judge whether the first difference is more than predetermined threshold value;
If the first difference is more than predetermined threshold value, it is determined that service request is invalid service request.
As a kind of alternative embodiment, judge whether the first difference is more than after predetermined threshold value, in addition to:
If the first difference is not more than predetermined threshold value, judge whether be stored with verification data in caching;
If it is stored with verification data in caching, it is determined that service request is invalid service request.
As a kind of alternative embodiment, according at least to sending request time, receiving request time and journey time, industry is judged Whether business request is invalid service request, including:
According to business datum and verification data, judge whether service request is invalid service request.
As a kind of alternative embodiment, according to business datum and verification data, judge whether service request is invalid business Request, including:
Business datum is calculated according to preset algorithm, obtains result of calculation;
The data of presetting digit capacity in result of calculation are chosen, as data to be verified;
Data to be verified are compared with verification data;
If data to be verified and verification data are inconsistent, it is determined that service request is invalid service request.
After the service request sent as a kind of alternative embodiment, receiving terminal, in addition to:
Calculate transmission request time and receive the second difference between request time;
If the difference between the second difference and journey time is not within the scope of default value, to terminal tranmitting data register more Change mark, identified by terminal according to clock change, redefine local zone time.
As a kind of alternative embodiment, method also includes:
When terminal is sends service request for the first time, first time service request and receive first that terminal sends are obtained The time of secondary service request, comprise at least in first time service request and send request time;
The difference between the time for sending request time and receiving first time service request is calculated, using difference as stroke Time;
To terminal return-stroke time.
Above-mentioned all optional technical schemes, any combination can be used to form the alternative embodiment of the present invention, herein no longer Repeat one by one.
Fig. 2 is a kind of flow chart of service request processing method according to an exemplary embodiment, the service request Processing method is applied to terminal.As shown in Fig. 2 the service request processing method comprises the following steps.
201st, when detect trigger new business when, obtain business datum.
202nd, according to business datum, the verification data of business datum is generated.
203rd, according to business datum and the verification data of business datum, service request is generated, is comprised at least in service request Business datum, the verification data of business datum, request time, journey time and terminal applies mark are sent, journey time is eventually End sends the time difference that service request receives service request with server for the first time for the first time.
204th, service request is sent to server, service request is received by server, service request is handled.
Method provided in an embodiment of the present invention, by when detect trigger new business when, business datum is obtained, according to industry Business data, the verification data of business datum is generated, according to business datum and the verification data of business datum, generates service request, Service request is sent to server, service request is received by server, service request is handled.Because server being capable of root According to sending request time, receiving request time and journey time, service request is judged, so as to the business repeated Request screened, avoid because repeat service request and caused by server congestion and result error.Therefore, to service The burden of device is lighter, and the effect of business processing is preferable.
As a kind of alternative embodiment, before sending service request to server, in addition to:
If current to send service request for the first time, first time service request, first time service request are sent to server In comprise at least and send request time, by server according to first time service request, calculate journey time, journey time returned Return;
The journey time that the reception server returns.
Above-mentioned all optional technical schemes, any combination can be used to form the alternative embodiment of the present invention, herein no longer Repeat one by one.
Fig. 3 is a kind of flow chart of service request processing method according to an exemplary embodiment, the service request Processing method is related to terminal and server.As shown in figure 3, the service request processing method comprises the following steps.
301st, when terminal, which detects, triggers new business, terminal obtains business datum.
The present embodiment does not make specific restriction, including but not limited to game service, financial transaction industry to the form of terminal traffic Business or business of networking etc..Correspondingly, the business datum that terminal is got can be the game resource request comprising game identifier Data, the value data of financial transaction or network address to be visited etc., the present embodiment do not make specific limit to the content of business datum. In addition, corresponding service customer end can be installed in terminal in advance, detected with triggering business to user, the present embodiment to this not Make specific limit.
For example, so that business is business of networking as an example.When user asks to access a certain network address, the browser installed in terminal It can detect that user accesses the access request of the network address, i.e. terminal can detect user and trigger new business.Wherein, accessing please Network address to be visited can be included in asking.Now, terminal can obtain network address to be visited in access request, as business datum.
302nd, terminal generates the verification data of business datum according to business datum.
Not to terminal according to business datum, the mode for generating the verification data of business datum specifically limits the present embodiment, Including but not limited to:According to preset algorithm, business datum is calculated;Check number using result of calculation as business datum According to.Wherein, preset algorithm can be MD5 (Message Digest AlgorithmMD5, Message Digest Algorithm 5), this Embodiment does not make specific limit to the type of preset algorithm.
In addition, when business datum is calculated according to preset algorithm, can the reception server is sent in advance key, this Embodiment is not especially limited to this.Correspondingly,, can be by key when calculating business datum according to preset algorithm Added to business datum, according to preset algorithm, the business datum after addition key is calculated, using result of calculation as business The verification data of data.Wherein, the service customer end that server can be installed in each terminal in advance distributes corresponding key, This is not especially limited so as to which the key of distribution is sent to terminal, the present embodiment.
In addition, when adding key in business datum, it can add at the end of business datum, can also add in industry At the beginning for data of being engaged in, the present embodiment does not make specific limit to the position that key is added in business datum.
It should be noted that because the usual digit of verification data that the preset algorithms such as MD5 algorithms are calculated is relatively more fixed, So that verification data, which is easily resolved out, to be got by which kind of algorithm, business datum is caused to be cracked.Therefore, According to preset algorithm, business datum is calculated, after obtaining result of calculation, presetting digit capacity can be chosen in result of calculation Data, will select verification data of the next data as business datum, and the present embodiment is not especially limited to this.Wherein, in advance If digit can be first 7 of result of calculation, or latter 7 of result of calculation, the present embodiment is not to the institute of presetting digit capacity Make specific limit in the value of position and digit.
For example, so that preset algorithm is MD5 as an example.By MD5 algorithms, the verification data calculated is usually business datum The data of 32, such as " 7815696ECBF1C96E6894B779456D330E ".Now, can be by before in above-mentioned 32 data 7 Position " 7815696 " is used as verification data.
By after business datum is added into key carrying out that verification data is calculated, or, result of calculation is selected to come Verification data of the data as business datum, it is possible to increase the disguise of data so that business datum is not easy to be stolen Take and be tampered, so as to improve security of the business datum in transmission.Certainly, according to business datum, business number is generated According to verification data when, above two mode can be used simultaneously, so that verification data and business datum can be more It is hidden close.Further, since choosing the data of presetting digit capacity in result of calculation, the digit of verification data can be shortened, so as to Data volume during transmission data is reduced, and then the flow of terminal can be saved.
303rd, terminal is according to business datum and the verification data of business datum, generates service request, in service request at least Including business datum, the verification data of business datum, send request time, journey time and terminal applies mark, journey time Send the time difference that service request receives service request with server for the first time for the first time for terminal.
Wherein, it is terminal local time when terminal sends service request to send request time.Terminal applies mark Know for carrying out unique mark to terminal, terminal applies mark can be UUID (Universally Unique Identifier, general unique identifier), the present embodiment does not make specific limit to the form of terminal applies mark.Due to each User correspond to only one terminal applies mark when using every kind of application.Therefore, by being carried eventually in service request Application identities are held, the identity of user in the case of non-login, can be differentiated, so as to pointedly defend disabled user to grasp Security when making, avoid disabled user from emitting and recognize identity, and then improving processing business.
If it should be noted that in this step 303, terminal is not for the first time to service request is sent, then in generation industry During business request, service request can carry journey time, in order to which subsequent server is according to journey time, whether judge service request For invalid service request.The mode that the present embodiment does not obtain journey time to terminal specifically limits, and includes but is not limited to:Work as clothes When business device receives the service request of terminal transmission, determine whether to receive service request for the first time;If receive for the first time Service request, the first time service request that receiving terminal is sent;Obtain the reception request time for receiving the service request;Service Device calculates the difference received between request time for sending request time and receiving the service request, using difference as during stroke Between;Server is to terminal return-stroke time;The journey time that terminal the reception server returns.Wherein, first time service request In comprise at least terminal send first time service request when transmission request time, the present embodiment is not in first time service request Including content make specific limit.
For example, using the transmission request time that first time service request includes as 14 on December 16,19:Exemplified by 02.If clothes The time that business device receives the first time service request of terminal transmission is 14 on December 16,19:03, then it can determine that two times Between difference be 1 minute, i.e., journey time is 1 minute, so as to which journey time is back into terminal.
It should be noted that the above-mentioned process to terminal return-stroke time, equivalent to pair between terminal and server When operate, can judge whether terminal have changed local zone time by journey time in subsequent step, so as to according to judged result, then Once set time operation.Because operation is carried out pair in a manner of sending heartbeat packet at regular intervals at conventional pair When, send heartbeat bag data frequency it is higher, the total amount of data of transmission is more so that pair when cost it is higher.Therefore, pass through The present embodiment provide pair when operate, cost when can effectively reduce pair.
It should be noted that above-mentioned transmission request time and the form for receiving request time can be timestamp form, this Embodiment does not make specific limit to the form of above-mentioned time.
304th, terminal to server sends service request.
The mode that the present embodiment does not send service request to terminal to server specifically limits, and includes but is not limited to:It is logical Cross network and send service request to server in a manner of packet.
305th, when server receive terminal transmission service request when, server according at least to send request time, connect Request time and journey time are received, judges whether service request is invalid service request, if service request is not invalid business Request, then step 306 is performed, if service request is invalid service request, deletes the service request.
Because end side may change local zone time, therefore, server is judging whether service request is invalid business Before request, the second difference sent between request time and reception request time can be calculated.If the second difference and journey time Between difference not within the scope of default value, can change and identify to terminal tranmitting data register, terminal receive clock change After mark, it can be identified according to clock change, redefine local zone time.
In the case of local zone time not being changed in end side, it is contemplated that the factor such as network delay, terminal send a request to clothes The time that business device is spent should be roughly the same with journey time, that is, send request time and receive between request time the Two differences and journey time should be roughly the same.Therefore, the difference between the second difference and journey time should be default Within number range.When the difference between the second difference and journey time is not within the scope of default value, then illustrate end side It is likely to have changed local zone time.
For example, to send request time as 14 on December 16,19:03:00, reception request time is on December 16th, 14 19:03:40, journey time is 1 minute, exemplified by default value is 30S.Now, send request time with receive request time it Between the second difference be 40 seconds, less than journey time 1 minute.Wherein, default value scope is (- 30,30), the second difference and row Difference between the journey time is -30S, in default value scope -30S between 30S.Accordingly, it can be determined that terminal does not change local Time.It is 14 on December 16,19 between when a request is received:04:When 40, send between request time and reception request time Second difference was 100 seconds, more than journey time 1 minute.Wherein, the difference between the second difference and journey time is 40S, is not existed Default value scope -30S is between 30S.Accordingly, it can be determined that terminal have changed local zone time.Now, server can be sent out to terminal Clock change is sent to identify, terminal can identify, when redefining local after clock change mark is received according to clock change Between.
Terminal is redefining local zone time, can redefine journey time, i.e., according to the content in above-mentioned steps 303 In above-mentioned steps 303 again pair when operate, the present embodiment is not especially limited to this.It should be noted that due to terminal it Before have changed local zone time, the transmission request time in the service request of transmission can make a mistake, and journey time is to be newest Journey time, consequently, it is possible to influence the server subsequently processing to service request.Therefore, can be true according to actual conditions terminal Fixed whether to send the service request to server again, the present embodiment is not especially limited to this.
Operated during by above-mentioned pair, the local zone time that can ensure terminal is the correct time, so as to avoid because of terminal Local zone time is malfunctioned so that request time error is sent in the service request of transmission, and then causes subsequently to judge that service request is No erroneous judgement when being invalid service request, improve the accuracy rate of service request processing.
The present embodiment, according at least to sending request time, receiving request time and journey time, judges industry not to server Whether business request is that the mode of invalid service request specifically limits, and is included but is not limited to:When will send request time and stroke Between be added, obtain and be worth;Will receive request time with and value subtract each other, obtain the first difference;It is pre- to judge whether the first difference is more than If threshold value;If the first difference is more than predetermined threshold value, it is determined that service request is invalid service request.
For example, using predetermined threshold value as 40 seconds, transmission request time is 14 on December 16,19:03:00, receive request time For 14 on December 16,19:04:50, journey time is exemplified by 1 minute.Request time will be sent and journey time is added, obtained It it is 14 on December 16,19 with value:04:00.Will receive request time with and value subtract each other, obtain the first difference be 50 seconds.Due to One difference 50 seconds is more than predetermined threshold value 40 seconds, accordingly, it can be determined that service request is invalid service request.
It should be noted that because terminal to server when sending service request, it is possible that the situation of time-out, i.e., The service request that terminal is sent has exceeded the server default time to the time of server.Now, illustrate that transmission network may Problem be present, the service request that terminal is sent may have potential safety hazard.In view of above-mentioned principle, can pass through above-mentioned judgement first Whether difference is more than the process of predetermined threshold value, judges whether service request is invalid service request, so as to ensure business processing Security.
Further, since terminal may cause to send weight to server within a period of time due to reasons such as network refreshings Multiple service request so that server congestion, and then cause server to cause resource because handling substantial amounts of repetition service request Waste.In order to avoid said process, judge whether the first difference is more than after predetermined threshold value in above process, if the first difference No more than predetermined threshold value, then judge whether be stored with verification data in caching, if being stored with verification data in caching, it is determined that industry Business request is invalid service request.
For example, exemplified by verification data CD_1, CD_2 and CD_3 are stored with caching, if the verification data in service request For CD_1, then it can determine that in caching and be stored with verification data CD_1, so as to can determine that the service request is invalid service request, And then the service request can be deleted, any processing is not done to the service request.If the verification data in service request is CD_4, It then can determine that in caching and be not stored with verification data CD_4, so as to can determine that the service request is not invalid service request, and The service request is done and further handled.
It should be noted that when storing verification data in the buffer, the terminal applies of the acceptable request of storage service simultaneously Mark, the present embodiment are not especially limited to this.By the process, can be distinguished exactly each in the case of non-login The service request amount of individual terminal, so as to which when the common data to not differentiating between user is handled, the work of anti-refreshing can be played With.
After service request being received due to server, it will usually which the verification data of each service request is stored into one in the buffer The section time, if within this period of the buffer memory verification data, there is the service request comprising same verification data to arrive again. Now, it may be determined that terminal have sent the service request of repetition within a period of time.Therefore, can be by above-mentioned deterministic process, by weight Multiple service request is defined as invalid service request, enters without making any processing to the service request.Can by said process Avoid the interface of server process service request from repeatedly being called because repeating service request, prevent disabled user's brush visit capacity, Most invalid access request is shielded, so as to avoid server congestion and resource caused by the service request repeated Waste, ensure that server interface is not called repeatedly by interface and influenceed so that the interface pair of outside repeatedly invoking server The influence of server system is consistent, that is, ensure that the idempotence of server.Furthermore it is also possible to avoid same service request Because repeatedly being asked in finite time, and the inconsistency and destructiveness of data are caused, so as to can guarantee that the uniformity of data, and Ensure the security of data.
In addition, judge that business please according at least to sending request time, receiving request time and journey time on server The no mode for invalid service request of Seeking Truth, the present embodiment are not especially limited to this, are included but is not limited to:According to business datum And verification data, judge whether service request is invalid service request.
Because verification data is end side according to business datum, calculate what is got according to preset algorithm, in order to judge business Whether data are tampered in transmitting procedure, and server side can be calculated business datum again according to preset algorithm, will be counted Result is calculated compared with verification data.According to comparative result, judge whether business datum is tampered in transmitting procedure.Its In, if business datum is tampered in transmitting procedure, it is determined that service request is invalid service request.
In conjunction with above-mentioned steps 302, end side generates the process of verification data, to according to business datum and check number According to judging whether service request is that the process of invalid service request is explained.The present embodiment is not to according to business datum And verification data, judge whether service request is that the mode of invalid service request specifically limits, and is included but is not limited to:According to pre- Imputation method is calculated business datum, obtains result of calculation;The data of presetting digit capacity in result of calculation are chosen, as to be verified Data;Data to be verified are compared with verification data;If data to be verified and verification data are inconsistent, it is determined that business please Ask as invalid service request.During generating verification data in above-mentioned steps 302, key first can be added to business Data, then the business datum to adding key calculate.Therefore, in this step 305, equally key first can be added to industry Business data, then the business datum to adding key calculate, to ensure that end side is consistent with the calculating process of server side, this Embodiment is not especially limited to this.
It should be noted that the preset algorithm used when server is calculated business datum with end side, it is necessary to give birth to The preset algorithm used during into verification data is consistent, can such as use MD5, and the present embodiment is not made to have to the type of preset algorithm Body limits.Server side is in the data of presetting digit capacity in choosing result of calculation, the position of presetting digit capacity and the value of digit Need presetting digit capacity corresponding with end side consistent.
For example, using preset algorithm as MD5, presetting digit capacity is first 7 of result of calculation, and verification data is that " 7815696 " are Example.If after being calculated according to preset algorithm business datum, obtained result of calculation is “7825696ECBF1C96E6894B779456D330E”.Now, the data of 7 before being chosen from result of calculation, what is obtained treats Verification data is " 7825696 ".Because data to be verified and verification data are inconsistent, then can determine that service request is invalid business Request.
The process compared by above-mentioned verification, data can be prevented to be tampered in transmitting procedure, so as to ensure that processing The security of data source during business.
It should be noted that in this step 305, server when whether judge service request is invalid service request, Include at least two deterministic processes.First is according to transmission request time and journey time, judges whether service request is nothing Imitate the process of service request.Second is according to business datum and verification data, judges whether service request is that invalid business please The process asked.Above-mentioned two process can successively perform according to certain sequential, can such as first carry out first process, or also may be used To first carry out second process, the present embodiment is not especially limited to this.After via two deterministic processes, if service request is all It is not invalid service request, then can determine that the service request is not invalid service request, and continue executing with follow-up step.
If the 306, service request is not invalid service request, server is handled service request.
The mode that the present embodiment is not handled service request server specifically limits, including is not only limited to:Root According to the business datum in service request, corresponding business is handled.For example, using business as business of networking, business datum is Exemplified by network address to be visited.Server can return and get according to network address to be visited, web page resources corresponding to acquisition to terminal Web page resources.
Method provided in an embodiment of the present invention, the service request sent by server receiving terminal, according at least to transmission Request time, request time and journey time are received, judge whether service request is invalid service request, if service request is not Invalid service request, then handled service request.Due to can be according to sending request time, receive request time and stroke Time, service request is judged, so as to repeat service request screen, avoid because repeat service request and Caused by server congestion and result error.Therefore, lighter to the burden of server, the effect of business processing is preferable. In addition, in the verification data in calculating service request, by way of adding key and choosing presetting digit capacity data, so that Business datum it is more hidden close, security is higher.Pair when operate when, by simply by journey time and receive request time Compared with the difference between sending request time, when being decided whether again pair according to comparative result, so as to when saving pair Cost.By being screened to service request, while server idempotence and data consistency is ensured, can prevent illegal User's brush visit capacity, so as to ensure that security during server process business.
The embodiments of the invention provide a kind of server, the server is used to perform embodiment corresponding to above-mentioned Fig. 1 or Fig. 3 Function in the service request processing method of offer performed by server.Referring to Fig. 4, the server includes:
Receiving module 401, for the service request of receiving terminal transmission, business datum, industry are comprised at least in service request The verification data for data of being engaged in, request time, journey time and terminal applies mark are sent, journey time is that terminal is sent for the first time Service request receives the time difference of service request with server for the first time;
Judge module 402, for according at least to sending request time, receiving request time and journey time, judging business Whether request is invalid service request;
Processing module 403, for when service request is not invalid service request, then handling service request.
As a kind of alternative embodiment, referring to Fig. 5, judge module 402, including:
First computing unit 4021, it is added for request time and journey time will to be sent, obtains and be worth;
Second computing unit 4022, for will receive request time with and value subtract each other, obtain the first difference;
First judging unit 4023, for judging whether the first difference is more than predetermined threshold value;
First determining unit 4024, for when the first difference is more than predetermined threshold value, it to be invalid business to determine service request Request.
As a kind of alternative embodiment, referring to Fig. 6, judge module 402, in addition to:
Second judging unit 4025, for when the first difference is not more than predetermined threshold value, judging whether be stored with caching Verification data;
Second determining unit 4026, for when being stored with verification data in caching, determining that service request is invalid business Request.
As a kind of alternative embodiment, referring to Fig. 7, judge module 402, including:
3rd judging unit 4027, for according to business datum and verification data, judging whether service request is invalid industry Business request.
As a kind of alternative embodiment, the 3rd judging unit 4027, based on being carried out according to preset algorithm to business datum Calculate, obtain result of calculation;The data of presetting digit capacity in result of calculation are chosen, as data to be verified;By data to be verified and school Data are tested to be compared;If data to be verified and verification data are inconsistent, it is determined that service request is invalid service request.
As a kind of alternative embodiment, referring to Fig. 8, the server also includes:
First computing module 404, for calculating transmission request time and receiving the second difference between request time;
Sending module 405, for when the difference between the second difference and journey time is not when within the scope of default value, Then change and identify to terminal tranmitting data register, identified by terminal according to clock change, redefine local zone time.
As a kind of alternative embodiment, referring to Fig. 9, the server also includes:
Acquisition module 406, for when terminal is sends service request for the first time, obtaining the first time business that terminal is sent The time of first time service request is asked and received, is comprised at least in first time service request and sends request time;
Second computing module 407, for calculating between transmission request time and the time for receiving first time service request Difference, using difference as journey time;
Module 408 is returned to, for terminal return-stroke time.
Method provided in an embodiment of the present invention, the service request sent by receiving terminal, when being asked according at least to transmission Between, receive request time and journey time, judge whether service request is invalid service request, if service request is not invalid industry Business request, then handled service request.Due to can according to sending request time, receive request time and journey time, Service request is judged, so as to repeat service request screen, avoid because repeat service request and caused by Server congestion and result error.Therefore, lighter to the burden of server, the effect of business processing is preferable.
The embodiments of the invention provide a kind of terminal, the terminal is used to perform embodiment offer corresponding to above-mentioned Fig. 2 or Fig. 3 Service request processing method in function performed by terminal.Referring to Figure 10, the terminal includes:
Acquisition module 1001, for when detect trigger new business when, obtain business datum;
First generation module 1002, for according to business datum, generating the verification data of business datum;
Second generation module 1003, for the verification data according to business datum and business datum, generate service request, industry Business datum, the verification data of business datum are comprised at least in business request, sends request time, journey time and terminal applies mark Know, journey time is that terminal sends the time difference that service request receives service request with server for the first time for the first time;
First sending module 1004, for sending service request to server, service request is received by server, to business Request is handled.
As a kind of alternative embodiment, referring to Figure 11, the terminal also includes:
Second sending module 1005, in the current transmission service request for first time, being sent for the first time to server Service request, comprise at least in first time service request and send request time, by server according to first time service request, calculate Journey time, journey time is returned;
Receiving module 1006, the journey time returned for the reception server.
Method provided in an embodiment of the present invention, by when detect trigger new business when, business datum is obtained, according to industry Business data, the verification data of business datum is generated, according to business datum and the verification data of business datum, generates service request, Service request is sent to server, service request is received by server, service request is handled.Because server being capable of root According to sending request time, receiving request time and journey time, service request is judged, so as to the business repeated Request screened, avoid because repeat service request and caused by server congestion and result error.Therefore, to service The burden of device is lighter, and the effect of business processing is preferable.
Figure 12 is a kind of block diagram of server 1200 according to an exemplary embodiment.For example, server 1200 can To be provided as a server.Reference picture 12, server 1200 include processing component 1222, and it further comprises one or more Processor, and as the memory resource representated by memory 1232, can be by the finger of the execution of processing component 1222 for storing Order, such as application program.The application program stored in memory 1232 can include each one or more correspondence In the module of one group of instruction.In addition, processing component 1222 is configured as execute instruction, to perform corresponding to above-mentioned Fig. 1 or Fig. 3 Function in the application program installation data statistical method that embodiment is provided performed by server.
Server 1200 can also include the power management that a power supply module 1226 is configured as execute server 1200, One wired or wireless network interface 1250 is configured as server 1200 being connected to network, and an input and output (I/O) Interface 1258.Server 1200 can be operated based on the operating system for being stored in memory 1232, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Figure 13 is a kind of block diagram of terminal 1300 according to an exemplary embodiment.For example, terminal 1300 can be Mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building are set It is standby, personal digital assistant etc..
Reference picture 13, terminal 1300 can include following one or more assemblies:Processing component 1302, memory 1304, Power supply module 1306, multimedia groupware 1308, audio-frequency assembly 1310, I/O (Input/Output, input/output) interface 1312, Sensor cluster 1314, and communication component 1316.
Processing component 1302 generally controls the integrated operation of terminal 1300, is such as communicated with display, call, data, The operation that camera operation and record operation are associated.Processing component 1302 can include one or more processors 1320 to perform Instruction, to complete all or part of step of above-mentioned method.In addition, processing component 1302 can include one or more moulds Block, the interaction being easy between processing component 1302 and other assemblies.For example, processing component 1302 can include multi-media module, To facilitate the interaction between multimedia groupware 1308 and processing component 1302.
Memory 1304 is configured as storing various types of data to support the operation in terminal 1300.These data Example includes being used for the instruction of any application program or method operated in terminal 1300, contact data, telephone book data, Message, picture, video etc..Memory 1304 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as SRAM (Static Random Access Memory, static RAM), EEPROM (Electrically-Erasable Programmable Read-Only Memory, the read-only storage of electrically erasable Device), EPROM (Erasable Programmable Read Only Memory, Erasable Programmable Read Only Memory EPROM), PROM (Programmable Read-Only Memory, programmable read only memory), and ROM (Read-Only Memory, it is read-only to deposit Reservoir), magnetic memory, flash memory, disk or CD.
Power supply module 1306 provides electric power for the various assemblies of terminal 1300.Power supply module 1306 can include power management System, one or more power supplys, and other components associated with generating, managing and distributing electric power for terminal 1300.
Multimedia groupware 1308 is included in the screen of one output interface of offer between terminal 1300 and user.At some In embodiment, screen can include LCD (Liquid Crystal Display, liquid crystal display) and TP (Touch Panel, Touch panel).If screen includes touch panel, screen may be implemented as touch-screen, be believed with receiving the input from user Number.Touch panel includes one or more touch sensors with the gesture on sensing touch, slip and touch panel.Touch sensing Device can the not only border of sensing touch or sliding action, but also detect the duration related with touch or slide and Pressure.In certain embodiments, multimedia groupware 1308 includes a front camera and/or rear camera.Work as terminal 1300 are in operator scheme, and during such as screening-mode or video mode, front camera and/or rear camera can receive outside Multi-medium data.Each front camera and rear camera can be a fixed optical lens system or have focal length And optical zoom ability.
Audio-frequency assembly 1310 is configured as output and/or input audio signal.For example, audio-frequency assembly 1310 includes one MIC (Microphone, microphone), when terminal 1300 is in operator scheme, such as call model, logging mode and speech recognition mould During formula, microphone is configured as receiving external audio signal.The audio signal received can be further stored in memory 1304 or sent via communication component 1316.In certain embodiments, audio-frequency assembly 1310 also includes a loudspeaker, for defeated Go out audio signal.
I/O interfaces 1312 provide interface, above-mentioned peripheral interface module between processing component 1302 and peripheral interface module Can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and Locking press button.
Sensor cluster 1314 includes one or more sensors, and the state for providing various aspects for terminal 1300 is commented Estimate.For example, sensor cluster 1314 can detect opening/closed mode of terminal 1300, the relative positioning of component, such as group Part is the display and keypad of terminal 1300, and sensor cluster 1314 can be with 1,300 1 groups of detection terminal 1300 or terminal The position of part changes, the existence or non-existence that user contacts with terminal 1300, the orientation of terminal 1300 or acceleration/deceleration and terminal 1300 temperature change.Sensor cluster 1314 can include proximity transducer, be configured to connect in no any physics The presence of object nearby is detected when touching.Sensor cluster 1314 can also include optical sensor, such as CMOS (Complementary Metal Oxide Semiconductor, CMOS) or CCD (Charge-coupled Device, Charged Couple Element) imaging sensor, for being used in imaging applications.In certain embodiments, the sensor cluster 1314 can also wrap Include acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1316 is configured to facilitate the communication of wired or wireless way between terminal 1300 and other equipment.Eventually End 1300 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.It is exemplary at one In embodiment, communication component 1316 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, communication component 1316 also includes NFC (Near Field Communication, near field Communication) module, to promote junction service.For example, RFID (Radio Frequency can be based in NFC module Identification, radio frequency identification) technology, IrDA (Infra-red Data Association, Infrared Data Association) skill Art, UWB (Ultra Wideband, ultra wide band) technology, BT (Bluetooth, bluetooth) technologies and other technologies are realized.
In the exemplary embodiment, terminal 1300 can be by one or more ASIC (Application Specific Integrated Circuit, application specific integrated circuit), DSP (Digital signal Processor, at data signal Manage device), DSPD (Digital signal Processor Device, digital signal processing appts), PLD (Programmable Logic Device, PLD), FPGA) (Field Programmable Gate Array, field programmable gate Array), controller, microcontroller, microprocessor or other electronic components realize, it is real corresponding to above-mentioned Fig. 2 or Fig. 3 for performing Function performed by terminal in the service request processing method of example offer is provided.
Terminal provided in an embodiment of the present invention, by when detect trigger new business when, business datum is obtained, according to industry Business data, the verification data of business datum is generated, according to business datum and the verification data of business datum, generates service request, Service request is sent to server, service request is received by server, service request is handled.Because server being capable of root According to sending request time, receiving request time and journey time, service request is judged, so as to the business repeated Request screened, avoid because repeat service request and caused by server congestion and result error.Therefore, to service The burden of device is lighter, and the effect of business processing is preferable.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 1304 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 1320 of terminal 1300.Example Such as, non-transitorycomputer readable storage medium can be ROM, RAM (Random Access Memory, random access memory Device), CD-ROM (Compact Disc Read-Only Memory, compact disc read-only memory), tape, floppy disk and light data deposit Store up equipment etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is by the computing device of terminal When so that terminal is able to carry out a kind of service request processing method, and this method includes:
When detect trigger new business when, obtain business datum;
According to the business datum, the verification data of the business datum is generated;
According to the business datum and the verification data of the business datum, service request is generated, in the service request Including at least business datum, the verification data of the business datum, request time, journey time and terminal applies mark are sent, The journey time is that the terminal sends the time difference that service request receives service request with server for the first time for the first time;
The service request is sent to server, the service request is received by the server, to the service request Handled.
Computer-readable recording medium provided in an embodiment of the present invention, by when detect trigger new business when, obtain Business datum, according to business datum, the verification data of business datum is generated, according to the check number of business datum and business datum According to, generate service request, to server send service request, service request is received by server, service request is handled. Because server can be judged service request according to sending request time, receiving request time and journey time, so as to Can to repeat service request screen, avoid because repeat service request and caused by server congestion and result Error.Therefore, lighter to the burden of server, the effect of business processing is preferable.
It should be noted that:The server that above-described embodiment provides is when handling service request, only with above-mentioned each The division progress of functional module, can be as needed and by above-mentioned function distribution by different work(for example, in practical application Can module complete, i.e., the internal structure of server is divided into different functional modules, with complete it is described above whole or Partial function.In addition, server, terminal and service request processing method embodiment that above-described embodiment provides belong to same structure Think, its specific implementation process refers to embodiment of the method, repeated no more here.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment To complete, by program the hardware of correlation can also be instructed to complete, described program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.

Claims (16)

1. a kind of service request processing method, it is characterised in that methods described includes:
The service request that receiving terminal is sent, the verification of business datum, the business datum is comprised at least in the service request Data, request time, journey time and terminal applies mark are sent, the journey time is that the terminal sends business for the first time Request receives the time difference of service request with server for the first time;
According at least to the transmission request time, request time and the journey time are received, whether judges the service request For invalid service request, including:
The transmission request time and the journey time are added, obtains and is worth;By it is described reception request time with it is described and Value is subtracted each other, and obtains the first difference;Judge whether first difference is more than predetermined threshold value;If first difference is more than default threshold Value, it is determined that the service request is invalid service request;
If the service request is not invalid service request, the service request is handled.
2. according to the method for claim 1, it is characterised in that described to judge whether first difference is more than predetermined threshold value Afterwards, in addition to:
If first difference is not more than predetermined threshold value, judge whether be stored with the verification data in caching;
If the verification data is stored with the caching, it is determined that the service request is invalid service request.
3. according to the method for claim 1, it is characterised in that described to be asked according at least to the transmission request time, reception Seeking time and the journey time, judge whether the service request is invalid service request, including:
According to the business datum and the verification data, judge whether the service request is invalid service request.
4. according to the method for claim 3, it is characterised in that it is described according to the business datum and the verification data, Judge whether the service request is invalid service request, including:
The business datum is calculated according to preset algorithm, obtains result of calculation;
The data of presetting digit capacity in the result of calculation are chosen, as data to be verified;
The data to be verified are compared with the verification data;
If the data to be verified and the verification data are inconsistent, it is determined that the service request is invalid service request.
5. according to the method for claim 1, it is characterised in that after the service request that the receiving terminal is sent, also wrap Include:
Calculate the transmission request time and receive the second difference between request time;
If the difference between second difference and the journey time not within the scope of default value, is sent out to the terminal Send clock change to identify, identified by the terminal according to the clock change, redefine local zone time.
6. according to the method for claim 1, it is characterised in that methods described also includes:
When the terminal is sends service request for the first time, obtain the first time service request of the terminal transmission and receive The time of the first time service request, comprise at least in the first time service request and send request time;
The difference between the transmission request time and the time for receiving the first time service request is calculated, by the difference As journey time;
The journey time is returned to the terminal.
7. a kind of service request processing method, it is characterised in that methods described includes:
When detect trigger new business when, obtain business datum;
According to the business datum, the verification data of the business datum is generated;
According to the business datum and the verification data of the business datum, service request is generated, in the service request at least Including business datum, the verification data of the business datum, request time, journey time and terminal applies mark are sent, it is described Journey time is that the terminal sends the time difference that service request receives service request with server for the first time for the first time;
The service request is sent to server, when receiving the service request by the server, and the transmission being asked Between and the journey time be added, obtain and be worth;The reception request time is subtracted each other with described and value, obtains the first difference; Judge whether first difference is more than predetermined threshold value;If first difference is more than predetermined threshold value, it is determined that the business please Ask as invalid service request;If the service request is not invalid service request, the service request is handled.
8. according to the method for claim 7, it is characterised in that before the service request to server transmission, also Including:
If current to send service request for the first time, first time service request, the first time business are sent to the server Comprised at least in request and send request time, by the server according to the first time service request, calculating journey time will The journey time returns;
Receive the journey time that the server returns.
9. a kind of server, it is characterised in that the server includes:
Receiving module, for the service request of receiving terminal transmission, business datum, the industry are comprised at least in the service request The verification data for data of being engaged in, request time, journey time and terminal applies mark are sent, the journey time is the terminal the Once send the time difference that service request receives service request with server for the first time;
Judge module, for according at least to the transmission request time, receive request time and the journey time, described in judgement Whether service request is invalid service request, including:
First computing unit, for the transmission request time and the journey time to be added, obtain and be worth;Second calculates list Member, for the reception request time to be subtracted each other with described and value, obtain the first difference;First judging unit, for judging State whether the first difference is more than predetermined threshold value;First determining unit, for when first difference is more than predetermined threshold value, it is determined that The service request is invalid service request;
Processing module, for when the service request is not invalid service request, then handling the service request.
10. server according to claim 9, it is characterised in that the judge module also includes:
Second judging unit, it is described for when first difference is not more than predetermined threshold value, judging whether to be stored with caching Verification data;
Second determining unit, for when being stored with the verification data in the caching, determining that the service request is invalid Service request.
11. server according to claim 9, it is characterised in that the judge module, including:
3rd judging unit, for according to the business datum and the verification data, judging whether the service request is nothing Imitate service request.
12. server according to claim 11, it is characterised in that the 3rd judging unit, for according to pre- imputation Method is calculated the business datum, obtains result of calculation;The data of presetting digit capacity in the result of calculation are chosen, as treating Verification data;The data to be verified are compared with the verification data;If the data to be verified and the check number According to inconsistent, it is determined that the service request is invalid service request.
13. server according to claim 9, it is characterised in that the server also includes:
First computing module, for calculating the transmission request time and receiving the second difference between request time;
Sending module, for when the difference between second difference and the journey time is not within the scope of default value When, then change and identify to the terminal tranmitting data register, identified by the terminal according to the clock change, when redefining local Between.
14. server according to claim 9, it is characterised in that the server also includes:
Acquisition module, for when the terminal is sends service request for the first time, obtaining the first time industry that the terminal is sent The time of the first time service request is asked and received in business, when transmission request is comprised at least in the first time service request Between;
Second computing module, for calculating between the transmission request time and the time for receiving the first time service request Difference, using the difference as journey time;
Module is returned to, for returning to the journey time to the terminal.
15. a kind of terminal, it is characterised in that the terminal includes:
Acquisition module, for when detect trigger new business when, obtain business datum;
First generation module, for according to the business datum, generating the verification data of the business datum;
Second generation module, for the verification data according to the business datum and the business datum, generate service request, institute State and business datum, the verification data of the business datum are comprised at least in service request, sends request time, journey time and end Application identities are held, the journey time receives business with server for terminal first time transmission service request and asked for the first time The time difference asked;
First sending module, for sending the service request to server, and request time and the stroke are sent by described Time is added, and obtains and is worth;The reception request time is subtracted each other with described and value, obtains the first difference;Judge described first Whether difference is more than predetermined threshold value;If first difference is more than predetermined threshold value, it is determined that the service request is invalid business Request;If the service request is not invalid service request, the service request is handled.
16. terminal according to claim 15, it is characterised in that the terminal also includes:
Second sending module, in the current transmission service request for first time, first time business to be sent to the server Ask, comprised at least in the first time service request and send request time, by the server according to the first time business Request, journey time is calculated, the journey time is returned;
Receiving module, the journey time returned for receiving the server.
CN201410818398.XA 2014-12-24 2014-12-24 service request processing method, server and terminal Active CN104580409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410818398.XA CN104580409B (en) 2014-12-24 2014-12-24 service request processing method, server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410818398.XA CN104580409B (en) 2014-12-24 2014-12-24 service request processing method, server and terminal

Publications (2)

Publication Number Publication Date
CN104580409A CN104580409A (en) 2015-04-29
CN104580409B true CN104580409B (en) 2017-12-22

Family

ID=53095567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410818398.XA Active CN104580409B (en) 2014-12-24 2014-12-24 service request processing method, server and terminal

Country Status (1)

Country Link
CN (1) CN104580409B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100103B (en) * 2015-08-03 2019-07-23 小米科技有限责任公司 Information filtering method, device, server and terminal
CN107544819B (en) * 2016-06-29 2022-04-19 中兴通讯股份有限公司 Service implementation method and device for programmable device and communication terminal
CN106230658B (en) * 2016-07-25 2019-05-07 杭州迪普科技股份有限公司 A kind of method and apparatus monitoring the network equipment
CN108512820B (en) * 2017-02-28 2020-07-24 华为技术有限公司 Method and equipment for server to respond to request message in communication system
CN108874654B (en) * 2017-05-15 2022-08-16 创新先进技术有限公司 Idempotent validity test method, device and equipment and readable medium
CN107566516B (en) * 2017-09-25 2019-12-03 平安科技(深圳)有限公司 Concurrent amount control method, application server and system
CN108737442B (en) * 2018-06-12 2019-05-10 北京多采多宜网络科技有限公司 A kind of cryptographic check processing method
CN109347821A (en) * 2018-10-16 2019-02-15 翟红鹰 Method, terminal and the computer readable storage medium of client access server
CN112118352B (en) * 2020-08-31 2021-05-25 京东数字科技控股股份有限公司 Method and device for processing notification trigger message, electronic equipment and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1822532A (en) * 2005-02-16 2006-08-23 三星电子株式会社 Method for preventing retransmissions due to delay in a wireless network and communication devices using the method
CN101222347A (en) * 2008-01-22 2008-07-16 华为技术有限公司 Method and equipment for user acquiring network data
CN101394405A (en) * 2008-10-22 2009-03-25 金蝶软件(中国)有限公司 Method and apparatus for data request processing
CN103269260A (en) * 2013-06-03 2013-08-28 腾讯科技(深圳)有限公司 Data transmission method, data receiving terminal, data sending terminal and data transmission system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7720954B2 (en) * 2006-08-03 2010-05-18 Citrix Systems, Inc. Method and appliance for using a dynamic response time to determine responsiveness of network services

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1822532A (en) * 2005-02-16 2006-08-23 三星电子株式会社 Method for preventing retransmissions due to delay in a wireless network and communication devices using the method
CN101222347A (en) * 2008-01-22 2008-07-16 华为技术有限公司 Method and equipment for user acquiring network data
CN101394405A (en) * 2008-10-22 2009-03-25 金蝶软件(中国)有限公司 Method and apparatus for data request processing
CN103269260A (en) * 2013-06-03 2013-08-28 腾讯科技(深圳)有限公司 Data transmission method, data receiving terminal, data sending terminal and data transmission system

Also Published As

Publication number Publication date
CN104580409A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104580409B (en) service request processing method, server and terminal
KR102327574B1 (en) Blockchain-based transaction processing method and device
TWI635412B (en) Method, device and system for verifying user identity by using social relationship data
CN106789089B (en) The method, apparatus and system and server of management certificate
CN104462277B (en) Application program installation data statistical method, server and terminal
WO2021147442A1 (en) Access control method and apparatus, terminal device, and storage medium
CN109039990B (en) Behavior verification method and device based on verification code
RU2674311C1 (en) Method and device for access to smart camera
KR20160141738A (en) Method and apparatus that facilitates a wearable identity manager
CN105681032B (en) Method for storing cipher key, key management method and device
CN106454392A (en) Live broadcast processing method, device and terminal
CN103914520B (en) Data query method, terminal device and server
WO2016093945A1 (en) Method, device, terminal, and server for verifying security of service operation
CN104901805B (en) A kind of identification authentication methods, devices and systems
CN108521405B (en) Risk control method and device and storage medium
CN105678553A (en) Method, device and system for processing order information
CN106228054A (en) Auth method and device
RU2603549C2 (en) Verification method, device and system for protection against counterfeit
JP6450765B2 (en) Method and apparatus for backing up data and electronic apparatus
CN104967593A (en) Identity verification method, apparatus and system
WO2021017141A1 (en) Access control method and apparatus, and medium
CN107609407A (en) The guard method of information security and device in a kind of user terminal
CN106302528B (en) Short message processing method and device
US20220255929A1 (en) Systems and methods for preventing unauthorized network access
CN104125267A (en) Account protection method, device and terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17

Patentee after: Guangzhou KuGou Networks Co., Ltd.

Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Patentee before: Guangzhou KuGou Networks Co., Ltd.

CP02 Change in the address of a patent holder