CN104219250B - Web data acquisition methods and device and web data sending method and device - Google Patents

Web data acquisition methods and device and web data sending method and device Download PDF

Info

Publication number
CN104219250B
CN104219250B CN201410505004.5A CN201410505004A CN104219250B CN 104219250 B CN104219250 B CN 104219250B CN 201410505004 A CN201410505004 A CN 201410505004A CN 104219250 B CN104219250 B CN 104219250B
Authority
CN
China
Prior art keywords
web data
server end
data
client
change
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
CN201410505004.5A
Other languages
Chinese (zh)
Other versions
CN104219250A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201410505004.5A priority Critical patent/CN104219250B/en
Publication of CN104219250A publication Critical patent/CN104219250A/en
Application granted granted Critical
Publication of CN104219250B publication Critical patent/CN104219250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a kind of web data acquisition methods and device and web data sending method and device.The web data acquisition methods judge the notification message sent by server end whether is received in preset time using client;If client receives the notification message sent by server end in preset time, client sends request message;If client does not receive the notification message sent by server end in preset time, client sends request message after preset time to server end;The web data to change that client the reception server end is sent.By the present invention, solve the problems, such as that timing goes the real time data that service end and client load increase and network bandwidth are deactivated caused by request data refresh page on line to take.

Description

Web data acquisition methods and device and web data sending method and device
Technical field
The present invention relates to web data process field, in particular to a kind of web data acquisition methods and device and Web data sending method and device.
Background technology
Internet has a wide range of applications in daily life, and people can obtain oneself demand from internet Data message.In order to meet the needs of user, webpage front-end needs to show real-time data message, i.e., before current time The content of certain a period of time.But these contents need the data volume difference showed in the different periods, in this case, How real time data showing and to user more preferable viewing experience become key issue in client is realized.
Currently available technology realizes real time data showing in client, i.e. client using the method for global refresh page Request data on line is gone according to certain time interval, after obtaining the data replied on line, is stored that data in internal memory, Client overall situation refresh page, shows the data newly obtained on webpage.It is this to go on line to ask according to certain time interval The method of data is simply easily realized, still, if any change does not occur for the data to be shown, equally regularly to go to send out Request is sent, data are postbacked by server, finally includes data on the page, can thus increase the negative of service end and client Carry;And frequently " ask-postback " between service end and client, it will take the network bandwidth of server and client side; Using regularly going the method client of request data on line to store the real time data obtained every time, therefore, it will take client Hold sizable memory headroom.
For being gone in correlation technique using timing on line, service end and client are born caused by request data refresh page The problem of real time data that load increase and network bandwidth are deactivated takes, not yet proposes effective solution at present.
The content of the invention
It is a primary object of the present invention to provide a kind of web data acquisition methods and device and web data sending method And device, with solve using timing go on line caused by request data refresh page service end and client load increase and The problem of real time data that network bandwidth is deactivated takes.
To achieve these goals, according to an aspect of the invention, there is provided a kind of web data acquisition methods.The net Page data acquisition methods include:Client judges the notification message sent by server end whether is received in preset time, Wherein, notification message is that web data variable quantity that server end judges in preset time is more than disappearing of being sent during predetermined threshold value Breath;If client receives the notification message sent by server end in preset time, client is sent Request message, wherein, request message is used for the web data to change that request server end monitors;If client exists The notification message sent by server end is not received in preset time, client is sent after preset time to server end Request message;The web data to change that client the reception server end is sent.
Further, the client in web data acquisition methods includes silverlight webpage front-ends.
Further, after the web data to change that client the reception server end is sent, the web data obtains Method is taken also to include:Client includes the web data to change on webpage.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of web data sending method, the net Page data sending method includes:Server end judges whether the web data variable quantity in preset time is more than predetermined threshold value; If server end judges that the web data variable quantity in preset time is more than predetermined threshold value, server end is sent out to client Notification message is sent, wherein, notification message is used to notify that the data on client terminal web page are changed;Received server-side is asked Message, wherein, request message is that client receives the message sent after notification message, and request message is used for request server Hold the web data to change monitored;The web data that server end changes to client.
Further, the server end in the web data sending method includes silverlight webpage front-ends.
Further, server end judge web data variable quantity in preset time whether be more than predetermined threshold value it Before, the web data sending method also includes:Server end is classified to web data;Server end is carried out to web data Monitoring in real time;Server end judges whether have web data to change in preset time;If there is net in preset time Page data changes, and server end obtains the web data variable quantity to be changed in preset time.
Further, server end judge whether to have in preset time web data change including:Server end Judge whether web data is data fluctuations type;If web data is data fluctuations type, judge current time data with Whether previous moment data are identical, if current time data are different from previous moment data, illustrate that web data becomes Change;If web data is not data fluctuations type, judge whether the value of web data is more than 0, if the value of web data is big In 0, then illustrate that web data changes.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of web data acquisition device, the net Page data acquisition device specifically includes:First judge module, whether received for judging client in preset time by taking The notification message that business device end is sent, wherein, the notification message is that the server end judges the net in the preset time Page data variable quantity is more than the message sent during predetermined threshold value;First sending module, for when the client is described default When the notification message sent by the server end is received in the time, request message is sent to the server end, its In, the request message is used to ask the web data to change that the server end monitors;Second sending module, use In when the client does not receive the notification message sent by the server end in the preset time, pass through After the preset time request message is sent to the server end;First receiving module, for receiving the server The web data to change that end is sent.
Further, the web data acquisition device also includes display module, for by the webpage number to change According to being shown on webpage.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of web data dispensing device, the net Page data dispensing device specifically includes:Second judge module, for whether judging the web data variable quantity in preset time More than predetermined threshold value;3rd sending module, for being more than described preset when the web data variable quantity in the preset time During threshold value, sent a notification message to client, wherein, the notification message is used to notify the data on the client terminal web page to send out Change is given birth to;Second receiving module, for receiving request message, wherein, the request message is that the client receives institute The message sent after notification message is stated, the request message is used for the webpage number to change that request server end monitors According to;4th sending module, for the web data that changes described in being sent to the client.
Further, the data sending device also includes:Sort module, for classifying to the web data;Prison Module is controlled, for being monitored in real time to the web data;3rd judge module, it is in the preset time for judging It is no to there is web data to change;Acquisition module, for when thering is web data to change in the preset time, obtaining The web data variable quantity to be changed in the preset time.
Further, the 3rd judge module includes:First judging submodule, for judging whether the web data is several According to fluctuation types;Second judging submodule, for when the web data is data fluctuations type, judging current time data It is whether identical with previous moment data, if the current time data are different from the previous moment data, illustrate described in Web data changes;3rd judging submodule, for when the web data is not data fluctuations type, described in judgement Whether the value of web data is more than 0, if the value of the web data is more than 0, illustrates that the web data changes.
The invention provides a kind of web data acquisition methods and device and web data sending method and device, pass through this Whether the web data acquisition methods that invention provides judge to receive in preset time using client is sent by server end Notification message, wherein, notification message is that server end judges that web data variable quantity in preset time is more than default threshold The message sent during value;If client received in preset time by server end send notification message, client to Server end sends request message, wherein, request message is used for the web data to change that request server end monitors; If client does not receive the notification message sent by server end in preset time, client is backward by preset time Server end sends request message;The web data to change that client the reception server end is sent, solve timing and go The real-time number that service end and client load increase and network bandwidth are deactivated caused by request data refresh page on line The problem of according to taking, and then reduce server end and the effect of client load and occupied network bandwidth.
Brief description of the drawings
The accompanying drawing for forming the part of the application is used for providing a further understanding of the present invention, schematic reality of the invention Apply example and its illustrate to be used to explain the present invention, do not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart according to the first embodiment of web data acquisition methods of the present invention;
Fig. 2 is the flow chart according to the first embodiment of web data sending method of the present invention;
Fig. 3 is the flow chart according to the second embodiment of web data sending method of the present invention;
Fig. 4 is the flow chart according to the 3rd embodiment of web data sending method of the present invention;
Fig. 5 is the schematic diagram according to the first embodiment of web data acquisition device of the present invention;And
Fig. 6 is the schematic diagram according to the first embodiment of web data dispensing device of the present invention.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order that those skilled in the art is better understood from the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, in ordinary skill Personnel do not make the every other embodiment obtained under the premise of creative work, should all belong to the protection model of the present invention Enclose.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so use Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except illustrating herein or Order beyond those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover Cover non-exclusive include.
The present invention is intended to provide a kind of web data acquisition methods and device and web data sending method and device.
Fig. 1 is the flow chart according to the first embodiment of the web data acquisition methods of the present invention.As shown in figure 1, the net Page data acquisition methods include steps S101 to step S104:
Step S101, client judge the notification message sent by server end whether is received in preset time, its In, notification message is that the web data variable quantity that server end judges in preset time is more than disappearing of being sent during predetermined threshold value Breath.
Client is provided with preset time, the preset time is the maximum time interval of data renewal.Work as server end When having monitored that web data changes, server end can obtain web data renewal amount.Only when server end monitors When web data renewal amount exceedes predetermined threshold value, server end just can send a notification message to client.Work as server end During the web data renewal amount deficiency predetermined threshold value monitored, it will not be sent a notification message to client.In order to prevent client Data can timely update, client is provided with preset time, and the maximum time interval of data renewal.Even if server end During the web data renewal amount deficiency predetermined threshold value monitored, client can also be sent by preset time to server end to be used for Ask the message of web data to change.By setting preset time, and the maximum time interval of data renewal, ensure that Client terminal web page data upgrade in time.
Step S102, if client receives the notification message sent by server end, client in preset time Request message is sent to server end, wherein, request message is used for the webpage number to change that request server end monitors According to.
The notification message that client the reception server end is sent, the notification message are that server end monitors number on webpage The message sent afterwards according to changing, the notification message can include the type of the web data to change, change Position of the web data in webpage, and knots modification of web data to change etc..When the data hair in webpage It is raw to change, and when web data renewal amount exceedes predetermined threshold value, server end to the data progress statistical monitoring that changes, and Notify in form of a message to client, inform that the data on client terminal web page are changed.
After client receives the notification message sent by server end, learn that the data on webpage are changed, visitor Family end can send request message, the data to change that request server end monitors to server end.The request message can To include the content of the data to change, position of the data to change etc..Client send request message the purpose of be for From server end the data to be changed in webpage, and the data Cun Chudao clients that will be changed in webpage are obtained, with It is easy to refresh in webpage the data to change in real time, ensures the real-time and accuracy of data message in webpage.
Step S103, if client does not receive the notification message sent by server end, client in preset time End sends request message after preset time to server end.
Client does not receive the notification message sent by server end in preset time, it may be possible to which server end monitors To in preset time web data do not change, it is also possible to the web data to be changed in preset time is more Newly measure insufficient predetermined threshold value.But no matter which kind of situation, in order to ensure upgrading in time for client terminal web page data, set at client It is equipped with preset time, and data renewal maximum time interval.In preset time not notified message when, client can pass through Request message is sent to server end after preset time, for the web data for asking to change in preset time.
Step S104, the web data to change that client the reception server end is sent.
After client receives the notification message sent by server end, client can send request to server end and disappear Breath, asks the web data to change.After server end receives the request message of client transmission, the request message is entered Row response, the information of the web data to be changed in webpage is subjected to comprehensive analysis, and the progress of the data to changing is whole Reason, transmit to the client for sending request message.The packet to change that client the reception server end is sent.Clothes The packet to change that business device end arranges includes the content of the web data to change, and the webpage to change The information such as the position of data.
Preferably, client signified in the web data acquisition methods can include silverlight webpage front-ends. Silverlight is webpage front-end application development solution, is the main exploitation of rich internet application strategy Platform, it provides multimedia and high degree of interactivity front end applications journey in Web page application program in a manner of browser externally hung component The effective solution of sequence.
Preferably, after the web data to change that client the reception server end is sent, the web data obtains Method, which also includes client, includes the web data to change on webpage.In order to meet the needs of user, client needs The web data to change is subjected to real-time update, is shown on webpage.Client is from received server-side to changing After the web data of change, real-time update webpage, refresh the web data to change by the way of Local hydrodynamic unit.Only count According to being just updated after changing to the web data to change, reduce the load of server end and client, together When also alleviate occupancy situation to network bandwidth.
Web data acquisition methods according to embodiments of the present invention, judge whether received in preset time using client To the notification message sent by server end, wherein, notification message is that server end judges the web data in preset time Variable quantity is more than the message sent during predetermined threshold value;Led to if client receives in preset time by what server end was sent Know message, client sends request message, wherein, request message is used for the generation that request server end monitors The web data of change;If client does not receive the notification message sent by server end, client in preset time After preset time request message is sent to server end;The webpage number to change that client the reception server end is sent According to solving timing and remove on line service end and client load increase and network bandwidth caused by request data refresh page The problem of real time data being deactivated takes, so as to reduce server end and client load, while also alleviates Netowrk tape The higher situation of wide occupancy.
As can be seen from the above description, the web data acquisition methods of the embodiment of the present invention use Real-time Monitoring Data And the mode of Local hydrodynamic unit, only data change and just updated the data, and reduce the load of server end and client, and reduce To the occupancy of network bandwidth.
According to an embodiment of the invention, a kind of web data sending method is additionally provided.Fig. 2 is according to webpage number of the present invention According to the flow chart of the first embodiment of sending method.As shown in Fig. 2 the web data sending method includes:
Step S201, server end judge whether the web data variable quantity in preset time is more than predetermined threshold value.
When web data changes, server end can be monitored to the web data to change.Work as server End has monitored that web data changes, and when the renewal amount of the web data to change exceedes predetermined threshold value, server End can send a notification message to client, and notice client terminal web page data are changed.When the data in webpage only have Fraction data change, when being changed even without data, if server end notice client terminal web page data occur Change, the web data that client request changes, will so take the net at client and server end Network bandwidth, and the load of client and server end can be greatly increased.Web data is provided with server end more The threshold value newly measured, when the renewal amount of the web data to change exceedes predetermined threshold value, server end can just be sent out to client A notification message is sent, notice client terminal web page data change, and reduce the load at client and server end, while Reduce the occupancy of network bandwidth.
Step S202, if server end judges that the web data variable quantity in preset time is more than predetermined threshold value, Server end sends a notification message to client, wherein, notification message is used to notify that the data on client terminal web page are become Change.
When meeting that web data renewal amount exceedes predetermined threshold value, server end sends a notification message, and the notification message can To include the type of the web data to change, position of the web data to change in webpage, and change The changing content of web data etc..Server end is monitored in real time to the data in webpage, when monitoring the number in webpage According to changing, and when web data renewal amount exceedes predetermined threshold value, server end notifies, to client, to accuse in form of a message Know that the data on client terminal web page are changed.
Step S203, received server-side request message, wherein, request message is after client receives notification message The message of transmission, request message are used for the web data to change that request server end monitors.
Request message of the received server-side from client, the request message are used for the hair that request server end detects The data for changing, the request message can include the type of the web data to change, and the web data to change exists Position in webpage, and changing content of the web data to change etc..Only when server end monitors have in webpage Data change, and when web data renewal amount exceedes predetermined threshold value, are just notified that client has data to change, client End just can send request message to server end to ask the web data of change.It can so eliminate because frequently being asked on line Data and caused by server end and client load the problem of increasing.
Step S204, the web data that server end changes to client.
After server end receives the request message of client transmission, the request message is responded, will be sent out in webpage The information of the raw data changed carries out comprehensive analysis, and the data to changing arrange, and transmits and is asked to transmission The client of message.
Preferably, the server end in the web data sending method includes silverlight webpage front-ends.
The web data sending method of the embodiment of the present invention, the web data in preset time is judged using server end Whether variable quantity is more than predetermined threshold value;It is default that if server end judges that the web data variable quantity in preset time is more than Threshold value, server end send a notification message to client, wherein, notification message is used to notify the data on client terminal web page to occur Change;Received server-side request message, wherein, request message is that client receives disappearing for notification message transmission afterwards Breath, request message are used for the web data to change that request server end monitors;Server end is sent to client The web data for changing, solve and remove on line service end and client load caused by request data refresh page with timing The problem of real time data that increase and network bandwidth are deactivated takes, both ensure that the real-time and validity of web data, And can reduces server end and the load of client and the occupancy of network bandwidth.
Fig. 3 is the flow chart according to the second embodiment of web data sending method of the present invention.As shown in figure 3, the webpage Data transmission method for uplink includes:
Step S301, server end are classified to web data.
The data in webpage are divided into data fluctuations type and data Value Types in server end.Data fluctuations type master If the change fluctuation of Monitoring Data, the default data value of data fluctuations type is the data value of last moment.Data Value Types Default data value be 0.
Step S302, server end are monitored in real time to web data.
Server end is that web data sets event sniffer, and web data is monitored in real time.Work as event sniffer It when having monitored that data change, can be sent a notification message to client, notify that the data in client terminal web page are become Change.
Step S303, server end judge whether have web data to change in preset time.
Server end sets event sniffer to sentence to whether data change by being monitored to web data It is disconnected.Event sniffer judges whether web data changes according to the difference of data type.For the number of data fluctuations type According to when the data and the data difference of last moment at current time, then saying that data are changed.Such as certain hot topic is closed The volumes of searches last moment of keyword is 1000, current time 988, then illustrates that the data are changed.For data value class The data of type, when the data value at current time is more than 0, then illustrate that data are changed, its data default value is 0.Such as Web page access amount, last moment 1000, then last moment data changed.The moment web page access amount be 0, then this when Data are carved not change.
Step S304, if having web data to change in preset time, server end is obtained in preset time The web data variable quantity to change.
When the event sniffer of server end monitors have web data to be changed in preset time, server end Analysis and arrangement can be carried out to the web data to change, so as to obtain the web data renewal amount to change.Obtain webpage Data renewal amount is to judge whether server thinks that client sends a notification message.When web data renewal amount exceedes default threshold During value, server sends a notification message to client, and notice client has web data to change;When web data renewal amount During insufficient predetermined threshold value, server end will not send a notification message to client.After more than preset time, client can be automatic Ground asks to send the web data of change to server end, so reduces the load of client and server and occupied Network bandwidth.
Step S305, server end judge whether the web data variable quantity in preset time is more than predetermined threshold value.
The step is the same as above-mentioned steps S201.
Step S306, if server end judges that the web data variable quantity in preset time is more than predetermined threshold value, Server end sends a notification message to client, wherein, notification message is used to notify that the data on client terminal web page are become Change.
The step is the same as above-mentioned steps S202.
Step S307, received server-side request message, wherein, request message is after client receives notification message The message of transmission, request message are used for the web data to change that request server end monitors.
The step is the same as above-mentioned steps S203.
Step S308, the web data that server end changes to client.
The step is the same as above-mentioned steps S204.
The web data sending method of the embodiment of the present invention, web data is classified using server end;Server End is monitored in real time to web data;Server end judges whether have web data to change in preset time;If There is web data to change in preset time, server end obtains the web data change to be changed in preset time Amount;Server end judges whether the web data variable quantity in preset time is more than predetermined threshold value;If server end judges The web data variable quantity gone out in preset time is more than predetermined threshold value, and server end sends a notification message to client;Service Device end receives request message, wherein, request message is that client receives the message sent after notification message, and request message is used In the web data to change that request server end monitors;The webpage number that server end changes to client According to.By the embodiment of the present invention, solve the problems, such as the load increase of server end and client caused by being asked on frequent line, Decrease occupied server end and the network bandwidth of client simultaneously.
Fig. 4 is the flow chart according to the 3rd embodiment of web data sending method of the present invention.As shown in figure 4, the webpage Data transmission method for uplink includes:
Step S401, server end are classified to web data.
The step is the same as above-mentioned steps S301.
Step S402, server end are monitored in real time to web data.
The step is the same as above-mentioned steps S302.
Step S403, server end judge whether web data is data fluctuations type.
Judge whether data are data fluctuations type, in order to judge whether data are sent out according to the difference of data type Changing.Because different data types judges that the method whether data change is different.Such as data fluctuations The data of type, when current time data and previous moment data difference when, then say that data are changed.Such as The volumes of searches previous moment of certain is popular keyword is 1000, current time 988, then illustrates that the data are changed.For The data of data Value Types, when the data value at current time is more than 0, then illustrate that data are changed, its data default value For 0.Such as web page access amount, previous moment 1000, then previous moment data changed.The moment web page access amount is 0, then the time data do not change.
Step S404, if web data is data fluctuations type, judge that current time data are with previous moment data It is no identical, if current time data are different from previous moment data, illustrate that web data changes.
For the data of data fluctuations type, when current time data and previous moment data difference when, then illustrate Say that data are changed, if the data at current time are identical with the data of previous moment, illustrate that data do not become Change.
Step S405, if web data is not data fluctuations type, judge whether the value of web data is more than 0, if The value of web data is more than 0, then illustrates that web data changes.
For the data of data Value Types, its data default value is 0.When the data value at current time is more than 0, then illustrate Data are changed, and when the data value at current time is equal to 0, then illustrate that data do not change.
Step S406, if having web data to change in preset time, server end is obtained in preset time The web data variable quantity to change.
The step is the same as above-mentioned steps S304.
Step S407, server end judge whether the web data variable quantity in preset time is more than predetermined threshold value.
The step is the same as above-mentioned steps S201.
Step S408, if server end judges that the web data variable quantity in preset time is more than predetermined threshold value, Server end sends a notification message to client, wherein, notification message is used to notify that the data on client terminal web page are become Change.
The step is the same as above-mentioned steps S202.
Step S409, received server-side request message, wherein, request message is after client receives notification message The message of transmission, request message are used for the web data to change that request server end monitors.
The step is the same as above-mentioned steps S203.
Step S410, the web data that server end changes to client.
The step is the same as above-mentioned steps S204.
The web data sending method of the embodiment of the present invention, web data is classified using server end;Server End is monitored in real time to web data;Server end judges whether web data is data fluctuations type;If web data Be data fluctuations type, judge whether current time data identical with previous moment data, if current time data with it is previous Time data is different, then illustrates that web data changes;If web data is not data fluctuations type, web data is judged Value whether be more than 0, if the value of web data be more than 0, illustrate that web data changes;If have in preset time Web data changes, and server end obtains the web data variable quantity to be changed in preset time;Server end is sentenced Whether the web data variable quantity to break in preset time is more than predetermined threshold value;If server end is judged in preset time Web data variable quantity be more than predetermined threshold value, server end sends a notification message to client;Received server-side request disappears Breath;The web data that server end changes to client, solve on frequent line ask caused by server end and The problem of load increase of client, the occupied server end of reduction and the network bandwidth and client of client are reached With the effect of the load of server end.
As can be seen from the above description, the web data sending method of the embodiment of the present invention, by judging webpage number Whether exceed predetermined threshold value according to renewal amount to determine whether server end notifies that client terminal web page data are changed, client The web data to change that server end is sent carries out real-time update, solves server caused by being asked on frequent line The problem of load increase of end and client, network bandwidth and the visitor of the occupied server end of reduction and client are reached The effect of the load of family end and server end.
It should be noted that can be in such as one group of computer executable instructions the flow of accompanying drawing illustrates the step of Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not The order being same as herein performs shown or described step.
Fig. 5 is the schematic diagram according to the first embodiment of web data acquisition device of the present invention.As shown in figure 5, the webpage Data acquisition facility includes:First judge module 10, the first sending module 20, the second sending module 30, the first receiving module 40 With display module 50.
First judge module 10, whether received by the logical of server end transmission in preset time for judging client Know message, wherein, the notification message is that the server end judges that the web data variable quantity in the preset time is big The message sent when predetermined threshold value.
First sending module 20, for being sent out when the client receives in the preset time by the server end During the notification message sent, request message is sent to the server end, wherein, the request message is used to ask the clothes The web data to change that business device end monitors.
Second sending module 30, for not received by the server end in the preset time when the client During the notification message sent, the request message is sent to the server end after the preset time.
First receiving module 40, for receiving the web data to be changed described in the server end transmission.
Display module 50, for the web data to change to be included in webpage.
Web data acquisition device in the embodiment of the present invention can be located at client.The web data of the embodiment of the present invention Acquisition device includes:First judge module 10, sent out for judging whether client receives in preset time by server end The notification message sent, wherein, the notification message is that the server end judges that the web data in the preset time becomes Change amount is more than the message sent during predetermined threshold value;First sending module 20, for when the client is in the preset time When receiving the notification message sent by the server end, request message is sent to the server end, wherein, it is described Request message is used to ask the web data to change that the server end monitors;Second sending module 30, for working as When the client does not receive the notification message sent by the server end in the preset time, by described After preset time the request message is sent to the server end;First receiving module 40, for receiving the server end The web data to change sent;Display module 50, for the web data to change to be included in net On page.The web data acquisition device solves goes on line service end and visitor caused by request data refresh page using timing The problem of real time data that the load increase of family end and network bandwidth are deactivated takes, so as to reduce server end and client Load and occupied network bandwidth.
According to an embodiment of the invention, a kind of web data dispensing device is additionally provided.Fig. 6 is according to webpage number of the present invention According to the schematic diagram of the first embodiment of dispensing device.As shown in fig. 6, the web data dispensing device includes:Second judge module 110, the 3rd sending module 120, the second receiving module 130, the 4th sending module 140, sort module 150, monitoring module 160, 3rd judge module 170 and acquisition module 180.Wherein the 3rd judge module 170 specifically includes:First judging submodule 1701, Second judging submodule 1702 and the 3rd judging submodule 1703.
Second judge module 110, for judging whether the web data variable quantity in preset time is more than predetermined threshold value.
3rd sending module 120, for being more than the default threshold when the web data variable quantity in the preset time During value, sent a notification message to client, wherein, the notification message is used to notify the data on the client terminal web page to occur Change.
Second receiving module 130, for receiving request message, wherein, the request message is that the client receives The message sent after the notification message, the request message are used for the webpage to change that request server end monitors Data.
4th sending module 140, for the web data that changes described in being sent to the client.
Preferably, the data sending device also includes:Sort module 150, for classifying to the web data;Prison Module 160 is controlled, for being monitored in real time to the web data;3rd judge module 170, for judging when described default It is interior whether to there is web data to change;Acquisition module 180, there is web data to become in the preset time for working as During change, the web data variable quantity to be changed in the preset time is obtained.
Preferably, the 3rd judge module 170 specifically includes:First judging submodule 1701, for judging the webpage number According to whether being data fluctuations type;Second judging submodule 1702, for when the web data is data fluctuations type, sentencing Whether disconnected current time data and previous moment data are identical, if the current time data and the previous moment data are not Together, then illustrate that the web data changes;3rd judging submodule 1703, for not being data wave when the web data During dynamic type, judge whether the value of the web data is more than 0, if the value of the web data is more than 0, illustrate the net Page data changes.
The web data dispensing device of the embodiment of the present invention includes:Second judge module 110, the 3rd sending module 120, the Two receiving modules 130, the 4th sending module 140, sort module 150, monitoring module 160, the 3rd judge module 170 and acquisition mould Block 180.Wherein the 3rd judge module 170 specifically includes:First judging submodule 1701, the second judging submodule 1702 and the 3rd Judging submodule 1703.Solved by the web data dispensing device of the embodiment of the present invention and request data on line is gone using timing The problem of real time data that service end and client load increase and network bandwidth are deactivated caused by refresh page takes. Server end and the load of client and the effect of occupied network bandwidth are reduced so as to reach.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific Hardware and software combines.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

  1. A kind of 1. web data acquisition methods, it is characterised in that including:
    Client judges the notification message sent by server end whether is received in preset time, wherein, the notice disappears Breath is that the server end judges that the web data variable quantity in the preset time is more than the message sent during predetermined threshold value;
    If the client receives the notification message sent by the server end in the preset time, described Client sends request message to the server end, wherein, the request message is used to ask the server end to monitor The web data to change;
    If the client does not receive the notification message sent by the server end, institute in the preset time State client and send the request message to the server end after the preset time;And
    The client receives the web data to change that the server end is sent;
    Wherein, the notification message comprises at least one of following:The type of the web data to change, described change The knots modification of position and the web data that changes of the web data of change in webpage.
  2. 2. web data acquisition methods according to claim 1, it is characterised in that the client includes: Silverlight webpage front-ends.
  3. 3. web data acquisition methods according to claim 1, it is characterised in that the client receives the server Also include after the web data to change that end is sent:
    The client includes the web data to change on webpage.
  4. A kind of 4. web data sending method, it is characterised in that including:
    Server end judges whether the web data variable quantity in preset time is more than predetermined threshold value;
    If the server end judges that the web data variable quantity in the preset time is more than the predetermined threshold value, institute Server end is stated to send a notification message to client, wherein, the notification message is used to notify the number on the client terminal web page According to being changed;
    The received server-side request message, wherein, the request message is that the client receives the notification message The message sent afterwards, the request message are used to ask the web data to change that the server end monitors;With And
    The web data to be changed described in the server end to client transmission;
    Wherein, the notification message comprises at least one of following:The type of the web data to change, described change The knots modification of position and the web data that changes of the web data of change in webpage.
  5. 5. web data sending method according to claim 4, it is characterised in that the server end includes: Silverlight webpage front-ends.
  6. 6. web data sending method according to claim 4, it is characterised in that server end is judged in preset time Web data variable quantity whether be more than predetermined threshold value before also include:
    The server end is classified to the web data;
    The server end is monitored in real time to the web data;
    The server end judges whether have web data to change in the preset time;And
    If having web data to change in the preset time, the server end is obtained and sent out in the preset time The web data variable quantity for changing.
  7. 7. web data sending method according to claim 6, it is characterised in that the server end is judged described pre- If whether have in the time web data change including:
    The server end judges whether the web data is data fluctuations type;
    If the web data is data fluctuations type, judge whether current time data are identical with previous moment data, such as Current time data described in fruit are different from the previous moment data, then illustrate that the web data changes;And
    If the web data is not data fluctuations type, judge whether the value of the web data is more than 0, if the net The value of page data is more than 0, then illustrates that the web data changes.
  8. A kind of 8. web data acquisition device, it is characterised in that including:
    First judge module, the notice sent by server end whether is received for judging client in preset time and is disappeared Breath, wherein, the notification message is that the server end judges that the web data variable quantity in the preset time is more than in advance If the message sent during threshold value;
    First sending module, for receiving the institute sent by the server end in the preset time when the client When stating notification message, request message is sent to the server end, wherein, the request message is used to ask the server end The web data to change monitored;
    Second sending module, for not receiving what is sent by the server end in the preset time when the client During the notification message, the request message is sent to the server end after the preset time;And
    First receiving module, for receiving the web data to be changed described in the server end transmission;
    Wherein, the notification message comprises at least one of following:The type of the web data to change, described change The knots modification of position and the web data that changes of the web data of change in webpage.
  9. 9. web data acquisition device according to claim 8, it is characterised in that the web data acquisition device also wraps Include:
    Display module, for the web data to change to be included in webpage.
  10. A kind of 10. web data dispensing device, it is characterised in that including:
    Second judge module, for judging whether the web data variable quantity in preset time is more than predetermined threshold value;
    3rd sending module, for when the web data variable quantity in the preset time is more than the predetermined threshold value, to Client sends a notification message, wherein, the notification message is used to notify that the data on the client terminal web page are changed;
    Second receiving module, for receiving request message, wherein, the request message is that the client receives the notice The message sent after message, the request message are used for the web data to change that request server end monitors;With And
    4th sending module, for the web data that changes described in being sent to the client;
    Wherein, the notification message comprises at least one of following:The type of the web data to change, described change The knots modification of position and the web data that changes of the web data of change in webpage.
CN201410505004.5A 2014-09-26 2014-09-26 Web data acquisition methods and device and web data sending method and device Active CN104219250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410505004.5A CN104219250B (en) 2014-09-26 2014-09-26 Web data acquisition methods and device and web data sending method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410505004.5A CN104219250B (en) 2014-09-26 2014-09-26 Web data acquisition methods and device and web data sending method and device

Publications (2)

Publication Number Publication Date
CN104219250A CN104219250A (en) 2014-12-17
CN104219250B true CN104219250B (en) 2017-11-14

Family

ID=52100384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410505004.5A Active CN104219250B (en) 2014-09-26 2014-09-26 Web data acquisition methods and device and web data sending method and device

Country Status (1)

Country Link
CN (1) CN104219250B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138706A (en) * 2015-09-30 2015-12-09 浪潮(北京)电子信息产业有限公司 Data diagnosis method, device and system for distributed type file system
CN106657345A (en) * 2016-12-28 2017-05-10 深圳天珑无线科技有限公司 Server access method and device and terminal
US11275807B2 (en) * 2017-11-07 2022-03-15 Google Llc React to location changes on web pages
CN112883253A (en) * 2021-05-06 2021-06-01 药渡经纬信息科技(北京)有限公司 Data processing method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783804A (en) * 2004-12-01 2006-06-07 华为技术有限公司 Realtime updating method for net page data
CN101626339A (en) * 2008-07-07 2010-01-13 英华达(上海)电子有限公司 Method and system for downloading network data
EP2574004A1 (en) * 2010-05-21 2013-03-27 ZTE Corporation Method, apparatus and system for improving synchronization efficiency of really simple syndication service
CN103177042A (en) * 2011-12-26 2013-06-26 宇龙计算机通信科技(深圳)有限公司 Method and device for browsing webpage
CN103368857A (en) * 2012-03-26 2013-10-23 北大方正集团有限公司 Method and system for transmitting data information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783804A (en) * 2004-12-01 2006-06-07 华为技术有限公司 Realtime updating method for net page data
CN101626339A (en) * 2008-07-07 2010-01-13 英华达(上海)电子有限公司 Method and system for downloading network data
EP2574004A1 (en) * 2010-05-21 2013-03-27 ZTE Corporation Method, apparatus and system for improving synchronization efficiency of really simple syndication service
CN103177042A (en) * 2011-12-26 2013-06-26 宇龙计算机通信科技(深圳)有限公司 Method and device for browsing webpage
CN103368857A (en) * 2012-03-26 2013-10-23 北大方正集团有限公司 Method and system for transmitting data information

Also Published As

Publication number Publication date
CN104219250A (en) 2014-12-17

Similar Documents

Publication Publication Date Title
CN105407180B (en) The information push method and device of server
CN104219250B (en) Web data acquisition methods and device and web data sending method and device
CN104104653B (en) A kind of synchronous method, apparatus and system of page info
CN103778236B (en) Web data distribution processing method and device and auto-building html files treating method and apparatus
CN110708256B (en) CDN scheduling method, CDN scheduling device, network equipment and storage medium
CN104202220A (en) Pressure test method and pressure test device
CN105099763B (en) Equipment goes offline based reminding method and device
CN102035859A (en) Method, system and device for displaying upload progress
CN103166871A (en) System and method of large-scale internet server network to achieve load balancing
CN104199970B (en) Web data updates processing method and processing device
CN105978971A (en) Message pushing method and device, and message pushing server
CN101917406B (en) Data transmission method and data transmission system
CN107249136A (en) Method for connecting network and device
CN103401837B (en) A kind of real time data method for pushing towards SCADA system
CN103312593A (en) Message distribution system and message distribution method
CN103780621B (en) A kind of remote table sharing method and system
CN106570006B (en) Multimedia file recommendation system and delivery information storage method
CN103428260A (en) System and method for allocating server to terminal and efficiently delivering messages to the terminal
CN105471674B (en) The method and system of testing server performance
CN106570011A (en) Distributed crawler URL seed distribution method, dispatching node, and grabbing node
CN110213155B (en) Communication processing method, communication processing device, related equipment and storage medium
CN109587806A (en) A kind of scheduling request sending method and terminal device
CN105637904A (en) Traffic coordination for communication sessions involving wireless terminals and server devices
CN103678332A (en) System, browser and method for displaying page
CN104050408B (en) Mobile terminal, and method, device and system for distributing advertisement monitoring requests

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Webpage data acquisition method and apparatus and webpage data transmission method and device

Effective date of registration: 20190531

Granted publication date: 20171114

Pledgee: Shenzhen Black Horse World Investment Consulting Co., Ltd.

Pledgor: Beijing Guoshuang Technology Co.,Ltd.

Registration number: 2019990000503

PE01 Entry into force of the registration of the contract for pledge of patent right
CP02 Change in the address of a patent holder

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Patentee after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Patentee before: Beijing Guoshuang Technology Co.,Ltd.

CP02 Change in the address of a patent holder