CN104811394A - Method and system for saving traffic for accessing server - Google Patents

Method and system for saving traffic for accessing server Download PDF

Info

Publication number
CN104811394A
CN104811394A CN201510191693.1A CN201510191693A CN104811394A CN 104811394 A CN104811394 A CN 104811394A CN 201510191693 A CN201510191693 A CN 201510191693A CN 104811394 A CN104811394 A CN 104811394A
Authority
CN
China
Prior art keywords
target data
data
client
request
unique identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510191693.1A
Other languages
Chinese (zh)
Inventor
石云升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Outstanding Networks Co Ltd Of Shenzhen
Original Assignee
Outstanding Networks Co Ltd Of Shenzhen
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 Outstanding Networks Co Ltd Of Shenzhen filed Critical Outstanding Networks Co Ltd Of Shenzhen
Priority to CN201510191693.1A priority Critical patent/CN104811394A/en
Publication of CN104811394A publication Critical patent/CN104811394A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method and a system for saving the traffic for accessing a server. The method comprises the following steps: sending a data request to a server by a client, and adding a mark parameter in the data request; obtaining target data by the server according to the data request to generate a unique identifier corresponding to the target data and judging whether the unique identifier is same as the mark parameter or not; if so, not returning back to the target data; if not, assigning the unique identifier to the mark parameter; and returning the target data and the assigned mark parameter back to the client. The method and the system have the advantages that the client generates the unique identifier according to the obtained target data, and whether the unique identifier is the same as the unique identifier which is sent to the client at the last time or not is judged so that whether the target data needs to be sent to the client or not is determined; if so, the target data does not need to be sent; obviously, the unnecessary traffic is saved for a user, and the data received by the client is the newest.

Description

A kind of method and system saving access services device flow
Technical field
The present invention relates to field of data exchange, be specifically related to a kind of method and system saving access services device flow.
Background technology
In existing technology, when client is to service end request msg, service end can return different data contents according to the request type of client, or As time goes on, same request of data also may return the data content of renewal.But traditional processing method is, when client initiates request of data again, service end is regardless of the identical still not identical data content that all can return corresponding to this request of data of content.If content does not change, for user, needs expend more flow and go to receive data beyond doubt.
Summary of the invention
In order to overcome the deficiencies in the prior art, the object of the present invention is to provide a kind of method and system saving access services device flow, service end judges that whether the data of current acquisition are identical with the last data being sent to client, if the same need not again send, both can save flow, and also can ensure that the content that user obtains was up-to-date.
For solving the problem, the technical solution adopted in the present invention is as follows:
Scheme one:
Save a method for access services device flow, comprise the following steps:
Steps A: client initiates request of data to service end, subsidiary identification parameter in request of data;
Step B: service end obtains target data according to request of data, generates the unique identification that corresponds to target data, and judges that whether this unique identification is identical with identification parameter, if so, then without the need to returning target data, if not, then performs step C;
Step C: by unique identification assignment to identification parameter, and the identification parameter after target data and assignment is back to client.
Preferably, generating a uniquely identified method corresponding to current target data is: current target data is carried out md5 encryption, obtains a character string, then this character string is unique identification.
Preferably, in stepb, if the determination result is YES, then return an information to client, prompting does not have more fresh content.
Scheme two:
Save a system for access services device flow, comprise with lower module:
Data demand module, is located at client, for initiating request of data to service end, and subsidiary identification parameter in request of data;
Response judge module, is located at service end, for obtaining target data according to request of data, generate the unique identification that corresponds to target data, and judge that whether this unique identification is identical with identification parameter, if, then without the need to returning target data, if not, then response Executive Module is performed;
Response Executive Module, is located at service end, for by unique identification assignment to identification parameter, and the identification parameter after target data and assignment is back to client.
Preferably, generating a uniquely identified method corresponding to current target data is: current target data is carried out md5 encryption, obtains a character string, then this character string is unique identification.
Preferably, in response judge module, if the determination result is YES, then return an information to client, prompting does not have more fresh content.
Compared to existing technology, beneficial effect of the present invention is: service end all generates unique identification according to the target data obtained at every turn, by judging that whether this unique identification is identical with the last unique identification being sent to client, thus determine to be sent to client the need of by target data, if identical, then do not need to send, obviously, this can save unnecessary flow for user, and ensures that the data that client receives are up-to-date.In addition, the identification length generated through md5 encryption is shorter, is convenient to transmission, as long as and data different, its mark generated also is not the same substantially, therefore substantially there will not be false judgment, is very suitable as unique identification.
Accompanying drawing explanation
Fig. 1 is the method flow diagram in embodiments of the invention.
Embodiment
Below, by reference to the accompanying drawings and embodiment, the present invention is described further:
Fig. 1 is a kind of method of saving access services device flow of the present invention, comprises the following steps:
Steps A: client initiates request of data to service end, subsidiary identification parameter in request of data;
Step B: service end obtains target data according to request of data, generates the unique identification that corresponds to target data, and judges that whether this unique identification is identical with identification parameter, if so, then without the need to returning target data, if not, then performs step C;
Step C: by unique identification assignment to identification parameter, and the identification parameter after target data and assignment is back to client.
Based on above-mentioned steps, in steps A, client initiates request of data, comprise an identification parameter, if client initiates request of data first, then this identification parameter is null value, if not initiating request of data first, then this identification parameter for last by service end institute's assignment and the identification parameter returned.
In stepb, service end is according to the request of data in steps A, also can be regarded as the request of data be currently received, obtain current target data, a unique identification is generated according to current target data, uniquely identified generation method is preferably: current target data is carried out md5 encryption, obtains a character string, then this character string is unique identification.Wherein, the character string obtained is 16 or 32, as long as content is constant, then the character string generated also can not become, and content has become, and character string also can not be identical.The character string obtained (i.e. unique identification) is compared with the identification parameter that client sends, if identical, then illustrate that current target data is identical with the target data in client, just need not return a target data again, correspondingly, an information can be returned, indicate without more fresh content; If different, then illustrate that current target data is different from the target data in client, just need current target data to be back in client, and the character string assignment of correspondence is returned client in the lump to identification parameter.
In fact, when client initiates request of data next time, be equivalent to circulation step A to step C.Pass through the method, utilize service end all to generate unique identification according to the target data obtained at every turn, by judging that whether this unique identification is identical with the last unique identification being sent to client, thus determine to be sent to client the need of by target data, if identical, then do not need to send, obviously, this can save unnecessary flow for user, and ensures that the data that client receives are up-to-date.In addition, the identification length generated through md5 encryption is shorter, is convenient to transmission, as long as and data different, its mark generated also is not the same substantially, therefore substantially there will not be false judgment, is very suitable as unique identification.
Corresponding to above-mentioned method, the invention also discloses a kind of system of saving access services device flow, comprise with lower module:
Data demand module, is located at client, for initiating request of data to service end, and subsidiary identification parameter in request of data;
Response judge module, is located at service end, for obtaining target data according to request of data, generate the unique identification that corresponds to target data, and judge that whether this unique identification is identical with identification parameter, if, then without the need to returning target data, if not, then response Executive Module is performed;
Response Executive Module, is located at service end, for by unique identification assignment to identification parameter, and the identification parameter after target data and assignment is back to client.
Preferably, generating a uniquely identified method corresponding to current target data is: current target data is carried out md5 encryption, obtains a character string, then this character string is unique identification.
Preferably, in response judge module, if the determination result is YES, then return an information to client, prompting does not have more fresh content.
To one skilled in the art, according to technical scheme described above and design, other various corresponding change and deformation can be made, and all these change and deformation all should belong within the protection range of the claims in the present invention.

Claims (6)

1. save a method for access services device flow, it is characterized in that, comprise the following steps:
Steps A: client initiates request of data to service end, subsidiary identification parameter in request of data;
Step B: service end obtains target data according to request of data, generates the unique identification that corresponds to target data, and judges that whether this unique identification is identical with identification parameter, if so, then without the need to returning target data, if not, then performs step C;
Step C: by unique identification assignment to identification parameter, and the identification parameter after target data and assignment is back to client.
2. the method for saving access services device flow according to claim 1, it is characterized in that, generating a uniquely identified method corresponding to current target data is: current target data is carried out md5 encryption, obtains a character string, then this character string is unique identification.
3. the method for saving access services device flow according to claim 1, is characterized in that, in stepb, if the determination result is YES, then returns an information to client, and prompting does not have more fresh content.
4. save a system for access services device flow, it is characterized in that, comprise with lower module:
Data demand module, is located at client, for initiating request of data to service end, and subsidiary identification parameter in request of data;
Response judge module, is located at service end, for obtaining target data according to request of data, generate the unique identification that corresponds to target data, and judge that whether this unique identification is identical with identification parameter, if, then without the need to returning target data, if not, then response Executive Module is performed;
Response Executive Module, is located at service end, for by unique identification assignment to identification parameter, and the identification parameter after target data and assignment is back to client.
5. the system of saving access services device flow according to claim 4, it is characterized in that, generating a uniquely identified method corresponding to current target data is: current target data is carried out md5 encryption, obtains a character string, then this character string is unique identification.
6. the system of saving access services device flow according to claim 4, is characterized in that, in response judge module, if the determination result is YES, then return an information to client, prompting does not have more fresh content.
CN201510191693.1A 2015-04-21 2015-04-21 Method and system for saving traffic for accessing server Pending CN104811394A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510191693.1A CN104811394A (en) 2015-04-21 2015-04-21 Method and system for saving traffic for accessing server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510191693.1A CN104811394A (en) 2015-04-21 2015-04-21 Method and system for saving traffic for accessing server

Publications (1)

Publication Number Publication Date
CN104811394A true CN104811394A (en) 2015-07-29

Family

ID=53695900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510191693.1A Pending CN104811394A (en) 2015-04-21 2015-04-21 Method and system for saving traffic for accessing server

Country Status (1)

Country Link
CN (1) CN104811394A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630889A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and device for realizing generic cache
CN106534309A (en) * 2016-11-14 2017-03-22 晶赞广告(上海)有限公司 Data processing method and apparatus
CN107357876A (en) * 2017-07-06 2017-11-17 校脸科技(北京)有限公司 A kind of web access methods and device
CN108924265A (en) * 2018-08-23 2018-11-30 河南思维轨道交通技术研究院有限公司 Data capture method, device and web page server
CN109274760A (en) * 2018-10-19 2019-01-25 西安瑜乐文化科技股份有限公司 A kind of cold and hot data resolution method of Mobile Development
CN110727526A (en) * 2019-09-09 2020-01-24 上海陆家嘴国际金融资产交易市场股份有限公司 Big data computing task processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571709A (en) * 2010-12-16 2012-07-11 腾讯科技(北京)有限公司 Method for uploading file, client, server and system
CN102882974A (en) * 2012-10-15 2013-01-16 焦点科技股份有限公司 Method for saving website access resource by website identification version number
CN103916373A (en) * 2013-01-07 2014-07-09 腾讯科技(深圳)有限公司 Data updating method, server, client side and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571709A (en) * 2010-12-16 2012-07-11 腾讯科技(北京)有限公司 Method for uploading file, client, server and system
CN102882974A (en) * 2012-10-15 2013-01-16 焦点科技股份有限公司 Method for saving website access resource by website identification version number
CN103916373A (en) * 2013-01-07 2014-07-09 腾讯科技(深圳)有限公司 Data updating method, server, client side and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630889A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and device for realizing generic cache
CN105630889B (en) * 2015-12-18 2019-12-10 北京奇虎科技有限公司 Universal caching method and device
CN106534309A (en) * 2016-11-14 2017-03-22 晶赞广告(上海)有限公司 Data processing method and apparatus
CN107357876A (en) * 2017-07-06 2017-11-17 校脸科技(北京)有限公司 A kind of web access methods and device
CN108924265A (en) * 2018-08-23 2018-11-30 河南思维轨道交通技术研究院有限公司 Data capture method, device and web page server
CN109274760A (en) * 2018-10-19 2019-01-25 西安瑜乐文化科技股份有限公司 A kind of cold and hot data resolution method of Mobile Development
CN110727526A (en) * 2019-09-09 2020-01-24 上海陆家嘴国际金融资产交易市场股份有限公司 Big data computing task processing method and system
CN110727526B (en) * 2019-09-09 2023-02-03 未鲲(上海)科技服务有限公司 Method and system for processing big data computing task

Similar Documents

Publication Publication Date Title
CN104811394A (en) Method and system for saving traffic for accessing server
WO2021004144A1 (en) Domain name resolution method, domain name resolution device, household appliance, and storage medium
CN111447290A (en) Communication method and service data transmission method in block chain network
JP6114383B2 (en) Method and apparatus for index-based peer discovery
US9867011B2 (en) Identifying proximity history of computer devices
JP2017501615A5 (en)
CN106101067B (en) Method and terminal for binding intelligent equipment
CN110535970B (en) Evidence storing and processing method, device, equipment and medium of judicial chain
CN109151009B (en) CDN node distribution method and system based on MEC
CN104010285A (en) Short message filtering method and system, short message service center and terminal
CN104954468A (en) Resource allocation method and resource allocation device
JP2017538321A5 (en)
CN102523299B (en) Cache method for content identification based on message digests
WO2016131193A1 (en) Service discovery method and device in neighbor awareness network
CN103024085A (en) System and method for processing P2P (peer-to-peer) node request
CN105704256B (en) A kind of IP address management methods, devices and systems
WO2016086659A1 (en) Service message transmission method, device and system
CN103581040A (en) Server distributing device and server distributing method
CN105792247B (en) data pushing method and device
CN104796852A (en) Device discovery method and device for device-to-device communication and terminal
CN108093428B (en) Server for authenticating real traffic
CN112073531A (en) Method for realizing real-time monitoring system of Internet of things based on edge calculation
CN106815334A (en) A kind of data query method and device for terminal
CN104125310A (en) Semi-permanent address based message sending method
CN109600709B (en) Space crowdsourcing task allocation method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150729