CN104253870B - The method and apparatus of control data access cycle - Google Patents

The method and apparatus of control data access cycle Download PDF

Info

Publication number
CN104253870B
CN104253870B CN201410514052.0A CN201410514052A CN104253870B CN 104253870 B CN104253870 B CN 104253870B CN 201410514052 A CN201410514052 A CN 201410514052A CN 104253870 B CN104253870 B CN 104253870B
Authority
CN
China
Prior art keywords
cycle
access cycle
server
condition information
loading condition
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
CN201410514052.0A
Other languages
Chinese (zh)
Other versions
CN104253870A (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 Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network 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 Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201410514052.0A priority Critical patent/CN104253870B/en
Publication of CN104253870A publication Critical patent/CN104253870A/en
Application granted granted Critical
Publication of CN104253870B publication Critical patent/CN104253870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method and apparatus of control data access cycle, belong to Internet technical field.Methods described includes:The data access request that receiving terminal is sent, obtain the first local loading condition information, according to the loading condition information and the corresponding relation of access cycle prestored, determine the first access cycle corresponding to the first loading condition information, the cycle update notification for carrying for the first access cycle is sent to terminal, so that after cycle update notification is received, when reaching for the first access cycle, data access request is sent to server for terminal.Using the present invention, the flexibility being controlled to access cycle can be improved.

Description

The method and apparatus of control data access cycle
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method and apparatus of control data access cycle.
Background technology
With the continuous development of Internet technology, obtain the network information by application program (such as browser) turns into people Obtain the important channel of information.When opening certain application program, the application program can ask some service datas to server, Such as browser asks version updating data of the browser etc. to server.
Obtaining service data in application program, (user that the version updating data of such as browser, browser are shown is for clear Data of content look at certain topic set in device and delivered etc.) when, access cycle is previously provided with the application program, such as 2 minutes, when user opens the application program, the application program started timing, when length reaches 2 minutes at that time, the application program Data access request is sent to server, after server receives data access request, corresponding service data can be sent Give the application program.If using the numerous of the application program, each application program is with the access cycle that sets to server Service data is asked, the access frequency of service data is higher, may increase the network burden of server, in order to alleviate server Network burden, the new edition application for being provided with longer access cycle can be supplied to user, user installation redaction After application program, the application program can update the data according to longer request access cycle, can so reduce service data Access cycle, reduce the network burden of server.
During the present invention is realized, inventor has found that prior art at least has problems with:
When using the application program it is fewer in number when, the network burden of server mitigates, and now the application program is still With larger access cycle to server for services data, so that application program can not obtain service data in time, be This access cycle that can only be changed again in application program through the above way, and then by the access cycle after change to service Device asks service data, so as to so that the very flexible being controlled to access cycle.
The content of the invention
In order to solve problem of the prior art, the embodiments of the invention provide a kind of method of control data access cycle and Device.The technical scheme is as follows:
First aspect, there is provided a kind of method of control data access cycle, methods described include:
The data access request that receiving terminal is sent, obtains the first local loading condition information;
According to the loading condition information and the corresponding relation of access cycle prestored, the first loading condition letter is determined First access cycle corresponding to breath;
The cycle update notification for carrying first access cycle is sent to the terminal, so that the terminal is receiving To after the cycle update notification, when reaching first access cycle, data access request is sent to server.
Alternatively, the first loading condition information for obtaining local, including:
Obtain the occupancy of local a variety of default resource types;
The average value of the occupancy of a variety of default resource types is determined, as the first loading condition information.
Alternatively, the average value of the occupancy for determining a variety of default resource types, as the first loading condition Information, including:
According to power corresponding to the occupancy of a variety of default resource types and the various default resource types prestored Value, the weighted average of the occupancy of a variety of default resource types is determined, as the first loading condition information.
Alternatively, methods described also includes:
Reception carries the second loading condition information and the access cycle of the second access cycle sets request;
Will the corresponding storage of the second loading condition information and second access cycle to the loading condition information with In the corresponding relation of access cycle.
Second aspect, there is provided a kind of method of control data access cycle, methods described include:
Data access request is sent to server;So that the server after the data access request is received, obtains The first local loading condition information, according to the loading condition information and the corresponding relation of access cycle prestored, determines institute State the first access cycle corresponding to the first loading condition information;
Receive the cycle update notification for carrying for the first access cycle that the server is sent;
After the cycle update notification is received, when reaching first access cycle, number is sent to the server According to access request.
Alternatively, it is described after the cycle update notification is received, when reaching first access cycle, to the clothes Business device sends data access request, including:
If in the range of default access cycle, receiving the cycle update notification first access cycle Afterwards, when reaching first access cycle, data access request is sent to the server;
Methods described also includes:
If first access cycle not in the range of the default access cycle, is receiving the cycle more After new notice, when reaching the default access cycle being locally stored, data access request is sent to the server.
The third aspect, there is provided a kind of server, the server include:
Acquisition module, the data access request sent for receiving terminal, obtains the first local loading condition information;
Determining module, the loading condition information prestored for basis and the corresponding relation of access cycle, it is determined that described First access cycle corresponding to first loading condition information;
Sending module, the cycle update notification of first access cycle is carried for being sent to the terminal, so that The terminal is after the cycle update notification is received, and when reaching first access cycle, sends data to server and visits Ask request.
Alternatively, the acquisition module, is used for:
Obtain the occupancy of local a variety of default resource types;
The average value of the occupancy of a variety of default resource types is determined, as the first loading condition information.
According to power corresponding to the occupancy of a variety of default resource types and the various default resource types prestored Value, the weighted average of the occupancy of a variety of default resource types is determined, as the first loading condition information.
Alternatively, the server also includes memory module, is used for:
Reception carries the second loading condition information and the access cycle of the second access cycle sets request;
Will the corresponding storage of the second loading condition information and second access cycle to the loading condition information with In the corresponding relation of access cycle.
Fourth aspect, there is provided a kind of terminal, the terminal include:
Sending module, for sending data access request to server;So that the server is receiving the data visit After asking request, the first local loading condition information is obtained, according to the loading condition information and pair of access cycle prestored It should be related to, determine the first access cycle corresponding to the first loading condition information;
Receiving module, the cycle update notification for carrying for the first access cycle sent for receiving the server;
The sending module, for after the cycle update notification is received, when reaching first access cycle, to The server sends data access request.
5th aspect, there is provided a kind of system of control data access cycle, the system include server and terminal, its In:
The server, the data access request sent for receiving the terminal, obtains the first local loading condition Information;According to the loading condition information and the corresponding relation of access cycle prestored, the first loading condition information is determined Corresponding first access cycle;The cycle update notification for carrying first access cycle is sent to the terminal;
The terminal, for sending data access request to the server;Receive carrying for the server transmission The cycle update notification of first access cycle;After the cycle update notification is received, when reaching first access cycle, Data access request is sent to the server.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
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 the method flow diagram of control data access cycle provided in an embodiment of the present invention a kind of;
Fig. 2 is the method flow diagram of control data access cycle provided in an embodiment of the present invention a kind of;
Fig. 3 is the method flow diagram of control data access cycle provided in an embodiment of the present invention a kind of;
Fig. 4 is a kind of structural representation of system provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of server provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of terminal provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of server provided in an embodiment of the present invention;
Fig. 8 is a kind of structural representation of terminal provided in an embodiment of the present invention.
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.
Embodiment one
The embodiments of the invention provide a kind of method of control data access cycle, this method can be by server and terminal It is common to realize.
As shown in figure 1, the handling process of server can include the steps in this method:
Step 101, the data access request that receiving terminal is sent, obtains the first local loading condition information.
Step 102, according to the loading condition information and the corresponding relation of access cycle prestored, the first load feelings are determined First access cycle corresponding to condition information.
Step 103, the cycle update notification for carrying for the first access cycle is sent to terminal, so that terminal is receiving week After phase update notification, when reaching for the first access cycle, data access request is sent to server.
As shown in Fig. 2 the handling process of terminal can include the steps in this method:
Step 201, data access request is sent to server;So that server receives data access request, obtain local The first loading condition information, according to the loading condition information and the corresponding relation of access cycle prestored, determine that first is negative First access cycle corresponding to load situation information.
Step 202, the cycle update notification for carrying for the first access cycle that the reception server is sent.
Step 203, after cycle update notification is received, when reaching for the first access cycle, data is sent to server and are visited Ask request.
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
Embodiment two
The embodiments of the invention provide a kind of method of control data access cycle, this method can be by server and terminal It is common to realize.Server therein can be to the server for the terminal offer service data for being provided with certain application program, the clothes Business device can be single equipment or a device clusters, wherein can include multiple servers, can also include bearing Carry management equipment.Terminal can be provided with any terminal of the application program, such as computer, mobile phone.The present embodiment is to apply Program is to carry out the detailed description of scheme exemplified by browser, in the case of other application program similar, in the present embodiment Repeat no more.
As shown in figure 3, the handling process of this method can include the steps:
Step 301, terminal to server sends data access request.
Wherein, data access request is that the message of certain service data is asked to server, and service data is server to clear Look at the data that certain function of device provides, browsed for example, each user for show of the version updating data of browser, browser is directed to Certain topic set in device and data of content for delivering etc..
In force, some service datas of browser would generally be stored with server, to ensure the phase in browser Answer data to be the data of newest issue, such as the version updating data of browser would generally be stored with server, so as to clear Look at device to server ask the version updating data of browser when, server can send the version updating data of the browser To terminal, so as to be updated to the browser installed in terminal.Based on this, can be provided with to service data in browser Access cycle, such as 2 minutes or 5 minutes, the access cycle can be that developer is programmed in program code when developing browser In.When user opens browser, browser starts timing, when the duration of user's unlatching browser reaches the visit set in browser When asking the cycle, terminal can obtain the mark of the terminal, information of service data etc., generate data access request, be sent to clothes Business device.Wherein, the mark of terminal can be IP (Internet Protocol, Internet protocol) address of the terminal, MAC (Media Access Control, medium access control) address etc., the information of service data can be browsing for terminal installation The version identifier of device, or mark of a certain topic etc..Version updating data instance using service data as browser, if browsed The access cycle set in device is 5 minutes, and when the duration that user opens browser reaches 5 minutes, terminal can obtain the end The version number for the browser installed in the IP address at end, terminal, data access request is generated, is sent to server.
Step 302, the data access request that server receiving terminal is sent, obtains the first local loading condition information.
Wherein, loading condition information is to reflect the information of server load state, can be the current CPU of server (Central Processing Unit, central processing unit) occupancy, bandwidth usage, I/O (input/output, input/ Output) one or more or above-mentioned several occupancies in the information such as interface occupancy handle what is obtained by some Numerical value.
In force, so that loading condition information is the current CPU usage of server as an example, terminal is received in server During the data access request of transmission, server obtains the CPU usage of itself, as the first loading condition information of local, example Such as, when server receives data access request, the CPU usage of server is 80%, and server can be used as the using 80% One loading condition information.
Alternatively, the processing mode of the first local loading condition information of server acquisition can be carried below with varied For a kind of optional processing mode, may comprise steps of:
Step 1, server obtain the occupancy of local a variety of default resource types.
Wherein, default resource type can include bandwidth, CPU, I/O interface etc..
In force, technical staff can pre-set multiple resources type in the server, be adjusted as access cycle Reference, and store it in server, when server receives the data access request of terminal transmission, obtain server In the occupancy of multiple resources type that prestores, such as the resource type prestored in server is bandwidth and CPU, when When server receives data access request, the occupancy of server detection bandwidth and CPU occupancy, such as the occupancy of bandwidth Occupancy for 70%, CPU is 80%.
Step 2, server determine the average value of the occupancy of a variety of default resource types, believe as the first loading condition Breath.
In force, after server gets the occupancy of a variety of default resource types, a variety of will can preset resources-type The occupancy of type is added, and the species number of result divided by default resource type after will add up, obtains a variety of default resource types Occupancy arithmetic average, can be using the arithmetic average as the first loading condition information.For example, default resource type Can be bandwidth, CPU and I/O interfaces, the occupancy of bandwidth is that 70%, CPU occupancy is the occupancy of 80%, I/O interfaces For 84%, server can be added 70%, 80%, 84%, obtain the species number of 234%, 234% divided by default resource type Mesh 3, obtains 78%, can be using 78% as the first loading condition information.Can also be a variety of default resources-type by what is got The occupancy of type, the geometrical mean of the occupancy of a variety of default resource types is calculated, as the first loading condition information, specifically Calculating process can be carried out according to the algorithm of geometrical mean, will not be repeated here.
Alternatively, the weighted average of the occupancy of a variety of default resource types can also be believed as the first loading condition Breath, then the processing procedure of above-mentioned steps two can include herein below:Deposit according to the occupancy of a variety of default resource types and in advance Weights corresponding to the various default resource types of storage, server determine the weighted average of the occupancy of a variety of default resource types Value, as the first loading condition information.
In force, technical staff can pre-set the weights of a variety of default resource types in the server, such as provide Source Type is that weights corresponding to CPU can be 5, and is stored it in server, when server receives data access request When, the weights of each default resource type stored in server can be obtained, it is then possible to the occupancy by default resource type With corresponding weights be multiplied, then each multiplied result can be added, then divided by all weights sum, obtain a variety of default resources The weighted average of the occupancy of type, can be using the weighted average as the first loading condition information, for example, default resource Type can be bandwidth, CPU and I/O interfaces, and the occupancy that the occupancy of bandwidth is 70%, CPU is accounting for for 80%, I/O interfaces It is 84% with rate, weights corresponding to bandwidth are that weights corresponding to 2, CPU are that weights corresponding to 5, I/O interfaces are 3, and server passes through (70% × 2+80% × 5+84% × 3) (2+5+3), the weighted average of the occupancy of a variety of default resource types is calculated , can be using 79.2% as the first loading condition information for 79.2%.
Step 303, first is determined according to the loading condition information and the corresponding relation of access cycle, server that prestore First access cycle corresponding to loading condition information.
In force, technical staff can set different access cycles according to different loading condition information, for example, If loading condition information be 90%, now the network burden of server is larger, therefore, can by its corresponding access cycle One larger numerical value is set, if loading condition information is 20%, now the network burden of server is smaller, therefore, can One less numerical value is set with corresponding access cycle by its, loading condition information can be divided into multiple scopes, to every Individual scope sets an access cycle, can establish the corresponding relation of loading condition information and access cycle through the above way. When server gets the first loading condition information, it can be searched in above-mentioned corresponding relation, find the first loading condition First access cycle corresponding to information.Above-mentioned corresponding relation can be stored in table form, if loading condition information is with hundred The form of ratio is divided to represent that then above-mentioned corresponding relation can be as shown in table 1.
Table 1
Loading condition information Access cycle
0~40% 5 minutes
40%~70% 10 minutes
70%~100% 20 minutes
, can be by the corresponding relation of such as table 1, really if the first loading condition information that server is got is 60% Fixed 60% in the range of loading condition information is 40%~70%, and server can determine its (the corresponding access cycle One access cycle) it is 10 minutes.
Step 304, server sends the cycle update notification for carrying for the first access cycle to terminal.
In force, server can generate cycle update notification by the first access cycle, then can be by the cycle Update notification is sent to terminal corresponding to the mark of the terminal carried in data access request.Server can also judge server In whether be stored with newest service data, the process can be entered by the information of the service data carried in data access request OK, if newest service data is stored with server to be sent to terminal by newest service data, for example, with service Data are the version updating data instance of browser, can be clear including being currently installed in terminal in the information of above-mentioned service data Look at the version number of device, server can judge the browser of latest edition whether is stored with server according to the version number Data, if the server determine that the browser of latest edition be present, the data of the browser of latest edition can be sent to end End.The cycle update notification for carrying for the first access cycle is sent to the process of terminal by above-mentioned server, can also by with Under type is carried out:The first access cycle got can be arranged in service data by server, and send it to terminal.
Step 305, the cycle update notification for carrying for the first access cycle that terminal the reception server is sent.
In force, when terminal receives the cycle update notification of the first access cycle, prompting can be issued the user with Information, for example, in the form of pop-up box, ejection carries the window of the first access cycle, and to inform user, browser is next The secondary interval duration to server for services data, when terminal receives cycle update notification, user can not also be entered Row prompting.If terminal also receives the service data of server transmission, the service data can be handled accordingly, For example, service data is the version updating data of browser, and when terminal receives the version updating data of browser, Ke Yixian Show installation suggestion frame, when user clicks on the determination button in installation suggestion frame, terminal installs the browser of latest edition.
Step 306, after cycle update notification is received, when reaching for the first access cycle, terminal to server sends number According to access request.
In force, when terminal receives cycle update notification, start timer and start timing, it is all when reaching the first access During the phase, terminal can obtain the mark of the terminal, information of service data etc., generate data access request, be sent to server.
It is alternatively possible to certain trigger condition, accordingly, above-mentioned steps are set for the processing procedure of above-mentioned steps 306 306 processing procedure can include herein below:If in the range of default access cycle, receiving for the first access cycle To after cycle update notification, when reaching for the first access cycle, data access request is sent to server.
In force, technical staff can set scope access cycle in a browser, when server receives the first visit When asking the cycle, timer can be started and start timing, and judge for the first access cycle whether in the range of the access cycle, if First access cycle in the range of default access cycle, then can determine that the first access cycle was effective, when reaching the first access During the cycle, terminal can send data access request to server.
Correspondingly, if the first access cycle is not in the range of default access cycle, receiving, cycle renewal is logical After knowing, when reaching the default access cycle being locally stored, data access request is sent to server.
In force, if server determines that the first access cycle did not accessed week default by above-mentioned deterministic process In the range of phase, then it can determine that the first access cycle is invalid, terminal can use the access cycle set in browser, to service Device asks service data.
Above-mentioned scope access cycle is generally large, by setting scope access cycle in a browser, it is possible to prevente effectively from The first access cycle for causing terminal to receive due to server failure, particularly large or small situation occurred.
A kind of addition into server is additionally provided in the embodiment of the present invention or changes some corresponding loading condition information The method of access cycle, the processing procedure of this method may comprise steps of:
Step 1, server are received to carry the second loading condition information and set the access cycle of the second access cycle and asked Ask.
In force, technical staff can set set button, skill access cycle in the management application program of server Art personnel, which can click on, sets button the access cycle, can will now need the loading condition information (i.e. the added or changed Two loading condition information) and it is input to server corresponding access cycle (i.e. the second access cycle), when technical staff clicks on really When determining button, server generation can be triggered and carry the second loading condition information and the setting access cycle of the second access cycle Request, server, which receives, sets request the access cycle.
Step 2, server by the second loading condition information and the second access cycle corresponding storage to loading condition information with In the corresponding relation of access cycle.
In force, server can set in access cycle and the second loading condition information and the second visit are extracted in request Ask the cycle, and corresponded to storage into mapping table as shown in table 1.
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
Embodiment three
Based on identical technical concept, the embodiment of the present invention additionally provides a kind of server, as shown in figure 5, the server Including:
Acquisition module 510, the data access request sent for receiving terminal, obtain local the first loading condition letter Breath;
Determining module 520, for according to the loading condition information that prestores and the corresponding relation of access cycle, determining the First access cycle corresponding to one loading condition information;
Sending module 530, the cycle update notification of the first access cycle is carried for being sent to terminal, so that terminal exists After receiving cycle update notification, when reaching for the first access cycle, data access request is sent to server.
Alternatively, acquisition module 510, it is used for:
Obtain the occupancy of local a variety of default resource types;
The average value of the occupancy of a variety of default resource types is determined, as the first loading condition information.
Alternatively, acquisition module 510, it is used for:
According to weights corresponding to the occupancy of a variety of default resource types and the various default resource types that prestore, really The weighted average of the occupancy of fixed a variety of default resource types, as the first loading condition information.
Alternatively, the server also includes memory module, is used for:
Reception carries the second loading condition information and the access cycle of the second access cycle sets request;
Second loading condition information and the second access cycle of corresponding storage are arrived into loading condition information and pair of access cycle In should being related to.
Based on identical technical concept, the embodiment of the present invention additionally provides a kind of terminal, as shown in fig. 6, the terminal includes:
Sending module 610, for sending data access request to server;So that server is receiving data access request Afterwards, the first local loading condition information is obtained, according to the loading condition information and the corresponding relation of access cycle prestored, Determine the first access cycle corresponding to the first loading condition information;
Receiving module 620, the cycle update notification for carrying for the first access cycle sent for the reception server;
Sending module 610, for after cycle update notification is received, when reaching for the first access cycle, being sent out to server Send data access request.
Alternatively, sending module 610, it is used for:
If in the range of default access cycle, after cycle update notification is received, reach for the first access cycle During the first access cycle, data access request is sent to server;
Sending module 610 is additionally operable to:
If the first access cycle not in the range of default access cycle, after cycle update notification is received, reached During to the default access cycle being locally stored, data access request is sent to server.
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
Example IV
Based on identical technical concept, the embodiment of the present invention additionally provides a kind of system of control data access cycle, should System includes server and terminal, wherein:
Server, the data access request sent for receiving terminal, obtains the first local loading condition information;According to The loading condition information and the corresponding relation of access cycle prestored, determine the first access corresponding to the first loading condition information Cycle;The cycle update notification for carrying for the first access cycle is sent to terminal;
Terminal, for sending data access request to server;What the reception server was sent carried for the first access cycle Cycle update notification;After cycle update notification is received, when reaching for the first access cycle, data access is sent to server Request.
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
Embodiment five
Fig. 7 is refer to, it illustrates the structural representation of the server involved by the embodiment of the present invention, the server can be with For the method for the control data access cycle for implementing to provide in above-described embodiment.Specifically:
The server 1900 can produce bigger difference because configuration or performance are different, can include one or one with Upper central processing unit (central processing units, CPU) 1922 (for example, one or more processors) and deposit Storage medium 1930 (such as one or one of reservoir 1932, one or more storage application programs 1942 or data 1944 Individual above mass memory unit).Wherein, memory 1932 and storage medium 1930 can be of short duration storage or persistently storage.Deposit The program stored up in storage medium 1930 can include one or more modules (diagram does not mark), and each module can include Series of instructions in server is operated.Further, central processing unit 1922 could be arranged to and storage medium 1930 Communication, the series of instructions operation in storage medium 1930 is performed on server 1900.
Server 1900 can also include one or more power supplys 1926, one or more wired or wireless nets Network interface 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or, one or More than one operating system 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM Etc..
In the present embodiment, server 1900 can include memory, and one or more than one program, its In one or more than one program storage in memory, and be configured to by one or more than one computing device institute State one or more than one program bag contains the instruction for being used for being operated below:
The data access request that receiving terminal is sent, obtains the first local loading condition information;
According to the loading condition information and the corresponding relation of access cycle prestored, the first loading condition information pair is determined The first access cycle answered;
Sent to terminal and carry the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server.
Alternatively, the first local loading condition information is obtained, including:
Obtain the occupancy of local a variety of default resource types;
The average value of the occupancy of a variety of default resource types is determined, as the first loading condition information.
Optionally it is determined that the average value of the occupancy of a variety of default resource types, as the first loading condition information, bag Include:
According to weights corresponding to the occupancy of a variety of default resource types and the various default resource types that prestore, really The weighted average of the occupancy of fixed a variety of default resource types, as the first loading condition information.
Alternatively, this method also includes:
Reception carries the second loading condition information and the access cycle of the second access cycle sets request;
Second loading condition information and the second access cycle of corresponding storage are arrived into loading condition information and pair of access cycle In should being related to.
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
Embodiment six
Fig. 8 is refer to, it illustrates the structural representation of the terminal involved by the embodiment of the present invention, the terminal can be used for The method of control data access cycle provided in above-described embodiment is provided.Specifically:
Terminal 900 can include RF (Radio Frequency, radio frequency) circuit 110, include one or more meters The memory 120 of calculation machine readable storage medium storing program for executing, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (wireless fidelity, Wireless Fidelity) module 170, include one or the processing of more than one processing core The part such as device 180 and power supply 190.It will be understood by those skilled in the art that the terminal structure shown in Fig. 8 is not formed pair The restriction of terminal, it can include than illustrating more or less parts, either combine some parts or different part cloth Put.Wherein:
RF circuits 110 can be used for receive and send messages or communication process in, the reception and transmission of signal, especially, by base station After downlink information receives, transfer to one or more than one processor 180 is handled;In addition, it is sent to up data are related to Base station.Generally, RF circuits 110 include but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, use Family identity module (SIM) card, transceiver, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplex Device etc..In addition, RF circuits 110 can also be communicated by radio communication with network and other equipment.The radio communication can make With any communication standard or agreement, and including but not limited to GSM (Global System of Mobile communication, entirely Ball mobile communcations system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, WCDMA), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc..
Memory 120 can be used for storage software program and module, and processor 180 is stored in memory 120 by operation Software program and module, so as to perform various function application and data processing.Memory 120 can mainly include storage journey Sequence area and storage data field, wherein, storing program area can storage program area, the application program (ratio needed at least one function Such as sound-playing function, image player function) etc.;Storage data field can store uses created number according to terminal 900 According to (such as voice data, phone directory etc.) etc..In addition, memory 120 can include high-speed random access memory, can also wrap Include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts. Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input block 130 to memory 120 access.
Input block 130 can be used for the numeral or character information for receiving input, and generation is set with user and function Control relevant keyboard, mouse, action bars, optics or the input of trace ball signal.Specifically, input block 130 may include to touch Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, collect and use Family on or near it touch operation (such as user using any suitable object or annex such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment means are driven according to formula set in advance.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and the signal that touch operation is brought is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection means, and is converted into contact coordinate, then gives processor 180, and can reception processing device 180 The order sent simultaneously is performed.Furthermore, it is possible to using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.Except touch sensitive surface 131, input block 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), One or more in trace ball, mouse, action bars etc..
Display unit 140 can be used for display by the information of user's input or be supplied to the information and terminal 900 of user Various graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its any combination. Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal Show device), the form such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detects touching on or near it After touching operation, processor 180 is sent to determine the type of touch event, is followed by subsequent processing type of the device 180 according to touch event Corresponding visual output is provided on display panel 141.Although in figure, touch sensitive surface 131 and display panel 141 are as two Individual independent part realizes input and input function, but in some embodiments it is possible to by touch sensitive surface 131 and display surface Plate 141 is integrated and realizes input and output function.
Terminal 900 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings Device.Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 141, and proximity transducer can close display when terminal 900 is moved in one's ear Panel 141 and/or backlight.As one kind of motion sensor, gravity accelerometer can detect in all directions (generally Three axles) acceleration size, size and the direction of gravity are can detect that when static, available for identification mobile phone posture application (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Extremely The other sensors such as the gyroscope that can also configure in terminal 900, barometer, hygrometer, thermometer, infrared ray sensor, herein Repeat no more.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the COBBAIF between user and terminal 900.Audio Electric signal after the voice data received conversion can be transferred to loudspeaker 161, sound is converted to by loudspeaker 161 by circuit 160 Sound signal exports;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160 Voice data is converted to, then after voice data output processor 180 is handled, through RF circuits 110 to be sent to such as another end End, or voice data is exported to memory 120 further to handle.Voicefrequency circuit 160 is also possible that earphone jack, To provide the communication of peripheral hardware earphone and terminal 900.
WiFi belongs to short range wireless transmission technology, and terminal 900 can help user's transceiver electronicses by WiFi module 170 Mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 8 is shown WiFi module 170, but it is understood that, it is simultaneously not belonging to must be configured into for terminal 900, can exist as needed completely Do not change in the essential scope of invention and omit.
Processor 180 is the control centre of terminal 900, utilizes various interfaces and each portion of connection whole mobile phone Point, by running or performing the software program and/or module that are stored in memory 120, and call and be stored in memory 120 Interior data, the various functions and processing data of terminal 900 are performed, so as to carry out integral monitoring to mobile phone.Optionally, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modem processor, Wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor mainly handles nothing Line communicates.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 900 also includes the power supply 190 (such as battery) to all parts power supply, it is preferred that power supply can pass through electricity Management system and processor 180 are logically contiguous, so as to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.Power supply 190 can also include one or more direct current or AC power, recharging system, power supply event The random component such as barrier detection circuit, power supply changeover device or inverter, power supply status indicator.
Although being not shown, terminal 900 can also include camera, bluetooth module etc., will not be repeated here.Specifically in this reality Apply in example, the display unit of terminal 900 is touch-screen display, and terminal 900 also includes memory, and one or one More than program, one of them or more than one program storage in memory, and be configured to by one or one with Upper computing device states one or more than one program bag contains the instruction for being used for being operated below:
Data access request is sent to server;So that server after data access request is received, obtains local One loading condition information, according to the loading condition information and the corresponding relation of access cycle prestored, determine the first load feelings First access cycle corresponding to condition information;
The cycle update notification for carrying for the first access cycle that the reception server is sent;
After cycle update notification is received, when reaching for the first access cycle, data access request is sent to server.
Alternatively, after cycle update notification is received, when reaching for the first access cycle, data access is sent to server Request, including:
If in the range of default access cycle, after cycle update notification is received, reach for the first access cycle During the first access cycle, data access request is sent to server;
This method also includes:
If the first access cycle not in the range of default access cycle, after cycle update notification is received, reached During to the default access cycle being locally stored, data access request is sent to server.
During the present invention is implemented, the data access request of receiving terminal transmission, the first local loading condition information, root are obtained According to the loading condition information and the corresponding relation of access cycle prestored, the first visit corresponding to the first loading condition information is determined The cycle is asked, is sent to terminal and carries the cycle update notification of the first access cycle, so that terminal is to receive cycle renewal logical After knowing, when reaching for the first access cycle, data access request is sent to server, so, according to the current load feelings of server Condition information, determine that terminal sends the access cycle of data access request to server next time, without applying journey by renewal The mode of sequence is controlled to the cycle for accessing service data, it is thus possible to improve the flexibility being controlled to access cycle.
It should be noted that:The device for the control data access cycle that above-described embodiment provides is in control data access cycle When, only with the division progress of above-mentioned each functional module for example, in practical application, above-mentioned function can be divided as needed With by different functional module completions, i.e., the internal structure of server or terminal is divided into different functional modules, to complete All or part of function described above.In addition, device and the control of the control data access cycle that above-described embodiment provides The embodiment of the method in data access cycle belongs to same design, and its specific implementation process refers to embodiment of the method, no longer superfluous here State.
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 (10)

  1. A kind of 1. method of control data access cycle, it is characterised in that methods described includes:
    The data access request that receiving terminal is sent, obtains the first local loading condition information;
    According to the loading condition information and the corresponding relation of access cycle prestored, the first loading condition information pair is determined The first access cycle answered;
    The cycle update notification for carrying first access cycle is sent to the terminal, so that the terminal is receiving After stating cycle update notification, if in the range of default access cycle, reaching described first first access cycle During access cycle, data access request is sent to server;If first access cycle is not or not the default access week In the range of phase, then when reaching the default access cycle, data access request is sent to the server.
  2. 2. according to the method for claim 1, it is characterised in that the first loading condition information for obtaining local, including:
    Obtain the occupancy of local a variety of default resource types;
    The average value of the occupancy of a variety of default resource types is determined, as the first loading condition information.
  3. 3. according to the method for claim 2, it is characterised in that the occupancy for determining a variety of default resource types Average value, as the first loading condition information, including:
    According to weights corresponding to the occupancy of a variety of default resource types and the various default resource types that prestore, really The weighted average of the occupancy of fixed a variety of default resource types, as the first loading condition information.
  4. 4. according to the method for claim 1, it is characterised in that methods described also includes:
    Reception carries the second loading condition information and the access cycle of the second access cycle sets request;
    By the second loading condition information and second access cycle corresponding storage to the loading condition information with accessing In the corresponding relation in cycle.
  5. A kind of 5. method of control data access cycle, it is characterised in that methods described includes:
    Data access request is sent to server;So that the server after the data access request is received, obtains locally The first loading condition information, according to the loading condition information and the corresponding relation of access cycle prestored, determine described First access cycle corresponding to one loading condition information;
    Receive the cycle update notification for carrying for the first access cycle that the server is sent;
    After the cycle update notification is received, if first access cycle in the range of default access cycle, When reaching first access cycle, data access request is sent to the server;If first access cycle is not In the range of the default access cycle, then when reaching the default access cycle, send data to the server and visit Ask request.
  6. 6. a kind of server, it is characterised in that the server includes:
    Acquisition module, the data access request sent for receiving terminal, obtains the first local loading condition information;
    Determining module, for according to the loading condition information and the corresponding relation of access cycle prestored, determining described first First access cycle corresponding to loading condition information;
    Sending module, the cycle update notification of first access cycle is carried for being sent to the terminal, so that described Terminal after the cycle update notification is received, if first access cycle in the range of default access cycle, When reaching first access cycle, data access request is sent to the server;If first access cycle is not In the range of the default access cycle, then when reaching the default access cycle, send data to the server and visit Ask request.
  7. 7. server according to claim 6, it is characterised in that the acquisition module, be used for:
    Obtain the occupancy of local a variety of default resource types;
    The average value of the occupancy of a variety of default resource types is determined, as the first loading condition information, including:
    According to weights corresponding to the occupancy of a variety of default resource types and the various default resource types that prestore, really The weighted average of the occupancy of fixed a variety of default resource types, as the first loading condition information.
  8. 8. server according to claim 6, it is characterised in that the server also includes memory module, is used for:
    Reception carries the second loading condition information and the access cycle of the second access cycle sets request;
    By the second loading condition information and second access cycle corresponding storage to the loading condition information with accessing In the corresponding relation in cycle.
  9. 9. a kind of terminal, it is characterised in that the terminal includes:
    Sending module, for sending data access request to server;So that the server please in the reception data access After asking, the first local loading condition information is obtained, is closed according to the loading condition information prestored is corresponding with access cycle System, determines the first access cycle corresponding to the first loading condition information;
    Receiving module, the cycle update notification for carrying for the first access cycle sent for receiving the server;
    The sending module, for after the cycle update notification is received, if first access cycle is default In the range of access cycle, then when reaching first access cycle, data access request is sent to the server;If institute Stated for the first access cycle not in the range of the default access cycle, then when reaching the default access cycle, to described Server sends data access request.
  10. A kind of 10. system of control data access cycle, it is characterised in that the system includes server and terminal, wherein:
    The server, the data access request sent for receiving the terminal, obtains the first local loading condition information; According to the loading condition information and the corresponding relation of access cycle prestored, determine corresponding to the first loading condition information First access cycle;The cycle update notification for carrying first access cycle is sent to the terminal;
    The terminal, for sending data access request to the server;Receive the server transmission carries first The cycle update notification of access cycle;After the cycle update notification is received, if first access cycle is default Access cycle in the range of, then when reaching first access cycle, to the server send data access request;If First access cycle not in the range of the default access cycle, then when reaching the default access cycle, to institute State server and send data access request.
CN201410514052.0A 2014-09-29 2014-09-29 The method and apparatus of control data access cycle Active CN104253870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410514052.0A CN104253870B (en) 2014-09-29 2014-09-29 The method and apparatus of control data access cycle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410514052.0A CN104253870B (en) 2014-09-29 2014-09-29 The method and apparatus of control data access cycle

Publications (2)

Publication Number Publication Date
CN104253870A CN104253870A (en) 2014-12-31
CN104253870B true CN104253870B (en) 2018-01-12

Family

ID=52188393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410514052.0A Active CN104253870B (en) 2014-09-29 2014-09-29 The method and apparatus of control data access cycle

Country Status (1)

Country Link
CN (1) CN104253870B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872028B (en) * 2016-03-25 2019-04-26 努比亚技术有限公司 Server-side, client and access strategy management method
CN106657251A (en) * 2016-10-25 2017-05-10 广东欧珀移动通信有限公司 Data synchronizing method and apparatus
CN107040591B (en) * 2017-03-28 2020-06-19 北京小米移动软件有限公司 Method and device for controlling client
US10635825B2 (en) 2018-07-11 2020-04-28 International Business Machines Corporation Data privacy awareness in workload provisioning
CN112422575B (en) * 2020-11-24 2023-05-12 中国农业银行股份有限公司东莞分行 Control method and system for network access based on remote identity authentication
CN116389398B (en) * 2023-05-30 2023-10-20 阿里巴巴(中国)有限公司 Data access control method, vehicle control method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262238A (en) * 2008-04-23 2008-09-10 中兴通讯股份有限公司 An electronic device and communication access cycle control method based on electronic device
CN101494609A (en) * 2009-03-10 2009-07-29 杭州华三通信技术有限公司 Access control method and apparatus for simple network management protocol
CN103227754A (en) * 2013-04-16 2013-07-31 浪潮(北京)电子信息产业有限公司 Dynamic load balancing method of high-availability cluster system, and node equipment
CN103309986A (en) * 2013-06-18 2013-09-18 苏州阔地网络科技有限公司 Control method and system for webpage access

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262238A (en) * 2008-04-23 2008-09-10 中兴通讯股份有限公司 An electronic device and communication access cycle control method based on electronic device
CN101494609A (en) * 2009-03-10 2009-07-29 杭州华三通信技术有限公司 Access control method and apparatus for simple network management protocol
CN103227754A (en) * 2013-04-16 2013-07-31 浪潮(北京)电子信息产业有限公司 Dynamic load balancing method of high-availability cluster system, and node equipment
CN103309986A (en) * 2013-06-18 2013-09-18 苏州阔地网络科技有限公司 Control method and system for webpage access

Also Published As

Publication number Publication date
CN104253870A (en) 2014-12-31

Similar Documents

Publication Publication Date Title
CN104639672B (en) The method and apparatus for carrying out domain name mapping
CN105824958B (en) A kind of methods, devices and systems of inquiry log
CN104253870B (en) The method and apparatus of control data access cycle
CN104965721B (en) The method and device that a kind of pair of application program is updated
CN104618217B (en) Share method, terminal, server and the system of resource
CN105278937B (en) A kind of method and device showing pop-up box message
CN105096157B (en) Virtual objects method of reseptance, sending method, exchange method and equipment
CN104142868B (en) Establish the method and device of connection
CN103310009B (en) Method, device and terminal for updating webpage data
CN106791955B (en) A kind of method and system of determining live streaming duration
CN103631625B (en) A kind of method of data acquisition, user terminal, server and system
CN106294168B (en) A kind of method and system carrying out Application testing
CN104699501B (en) A kind of method and device for running application program
CN107204964A (en) A kind of methods, devices and systems of rights management
CN106131930A (en) A kind of WiFi network connection control method, device and terminal
CN104852802B (en) Auth method, equipment and system
CN107786424A (en) Audio/video communication method, terminal and server
CN104660769B (en) A kind of methods, devices and systems for adding associated person information
CN106713608A (en) Application function state modifying method and apparatus, and terminal
CN107465802A (en) A kind of methods, devices and systems for showing communication message
CN106951139A (en) Message notifying frame display methods and device
CN106789307B (en) Configuration data processing method, apparatus and system
CN107577795A (en) A kind of methods, devices and systems for recommending song
CN107122036A (en) CPU frequency adjusting method and device
CN106055598A (en) Information display method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20141231

Assignee: GUANGZHOU HUYA INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: Guangzhou Huaduo Network Technology Co., Ltd.

Contract record no.: 2018990000088

Denomination of invention: Method and device for controlling data access period

Granted publication date: 20180112

License type: Common License

Record date: 20180413

EE01 Entry into force of recordation of patent licensing contract