CN109145182A - Collecting method, device, computer equipment and system - Google Patents

Collecting method, device, computer equipment and system Download PDF

Info

Publication number
CN109145182A
CN109145182A CN201710461347.XA CN201710461347A CN109145182A CN 109145182 A CN109145182 A CN 109145182A CN 201710461347 A CN201710461347 A CN 201710461347A CN 109145182 A CN109145182 A CN 109145182A
Authority
CN
China
Prior art keywords
script
browser
webpage
server
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710461347.XA
Other languages
Chinese (zh)
Other versions
CN109145182B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710461347.XA priority Critical patent/CN109145182B/en
Publication of CN109145182A publication Critical patent/CN109145182A/en
Application granted granted Critical
Publication of CN109145182B publication Critical patent/CN109145182B/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 collecting method, device, computer equipment and systems, belong to computer field.This method comprises: browser obtains the first script according to ingress label, the ingress label is added in the webpage during displaying web page through browser by management client;The browser is when running first script, corresponding second script of the webpage is obtained from the server, first script is the script for being used to provide the described the running environment of the second script, and second script is the script for carrying out data acquisition to the webpage;The browser carries out data acquisition when running second script, to the webpage;It solves when acquiring data by web crawlers in a terminal, needs to be arranged for the terminal more IP address to avoid one of IP address from being prohibited from using, the higher problem of complexity of caused acquisition data;Reduce the complexity of data acquisition of terminal.

Description

Collecting method, device, computer equipment and system
Technical field
The present embodiments relate to computer field, in particular to a kind of collecting method, device, computer equipment and System.
Background technique
With the development of the network information technology, the web data that website, forum, blog etc. include is more and more, in order to from Valid data are filtered out in webpage, terminal usually requires according to certain rules, data acquisition is carried out to webpage, by these data It is sent to server, these data are analyzed and processed by server, to obtain sorted data.
In a kind of typical collecting method, terminal acquires webpage information by web crawlers method.The network is climbed Worm method, comprising: terminal crawls task according to preset by web crawlers, sends net to web server every preset duration Page acquisition request (HTTP request), web server send the web data of the webpage, net according to the webpage acquisition request to terminal Network crawler is acquired the web data.Wherein, web crawlers is a kind of automatic program for obtaining web page contents, which climbs Worm has the function of simulation browser operation.
Since number of site has formulated anti-crawler strategy, such as: web server obtains the end carried in webpage acquisition request The address IP (Internet Protocol, IP) at end, detect the IP access track whether meet it is following rule at least one Kind: (1) the interval duration for accessing webpage is fixed;Total amount of access within (2) one days is greater than default value;For meet it is above-mentioned extremely A kind of IP of few rule, forbids the IP address to access the website again.If terminal needs a certain by web crawlers long-term acquisition The webpage information of website needs to preset more IP address to avoid one of IP address from being asked by what website was forbidden to use Topic improves the complexity of terminal acquisition webpage information.
Summary of the invention
The data in webpage are acquired in order to solve to be arranged in a terminal multiple IP address, terminal is caused to acquire the number According to the higher problem of complexity, the embodiment of the invention provides a kind of collecting method, device, computer equipment and be System.The technical solution is as follows:
In a first aspect, a kind of collecting method is provided, applied to the terminal for being equipped with browser and management client In, which comprises
The browser obtains the first script according to ingress label, and the ingress label is by the management client described It is added to during displaying web page through browser in the webpage, the ingress label is for triggering the browser from server Obtain the first script;
The browser obtains the corresponding crus secunda of the webpage when running first script, from the server This, first script is the script for being used to provide the described the running environment of the second script, and second script is for institute State the script that webpage carries out data acquisition;
The browser carries out data acquisition when running second script, to the webpage.
Second aspect provides a kind of collecting method, which comprises
The first script is sent at least one terminal, first script is that the browser in the terminal is showing webpage During, what when ingress label added in the webpage by operational management client, requested;
The second script, request when second script is the first script described in the browser execution are sent to the terminal , first script is the script for being used to provide the described the running environment of the second script, and second script is for institute State the script that webpage carries out data acquisition;
Receive the data of the collected webpage of second script.
The third aspect provides a kind of data acquisition device, applied in the terminal for being equipped with management client, the dress It sets and includes:
First obtains module, and for obtaining first script according to the ingress label, the ingress label is aobvious The label being added to during showing webpage by the management client in the webpage, the ingress label is for triggering from clothes Business device obtains the first script;
Second obtains module, for when running first script that the first acquisition module is got, from described Server obtains corresponding second script of the webpage, and first script is the running environment for being used to provide the described the second script Script, second script be for the webpage carry out data acquisition script;
Data acquisition module, for run it is described second acquisition module get second script when, to described Webpage carries out data acquisition.
Fourth aspect, provides a kind of data acquisition device, and described device includes:
First sending module, for sending the first script at least one terminal, first script is in the terminal Browser during showing webpage, the request when ingress label added in the webpage by operational management client 's;
Second sending module, for sending the second script to the terminal, second script is the browser execution It is requested when first script, first script is the script for being used to provide the described the running environment of the second script, described Second script is the script for carrying out data acquisition to the webpage;
Module is obtained, for obtaining the data of the collected webpage of second script.
5th aspect, provides a kind of computer equipment, and the terminal includes processor and memory, in the memory It is stored at least one instruction, at least one section of program, code set or instruction set, described at least one instructs, is at least one section described Program, the code set or instruction set are loaded by the processor and are executed the collecting method to realize first aspect offer Or the collecting method that second aspect provides.
6th aspect, provides a kind of data collection system, and the data collection system includes terminal and server,
The terminal includes the data acquisition device that the third aspect provides;
The server includes the data acquisition device that fourth aspect provides.
7th aspect, provides a kind of computer readable storage medium, at least one finger is stored in the storage medium Enable, at least one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or Instruction set loaded by the processor and executed with realize first aspect provide collecting method or second aspect provide Collecting method.
Technical solution bring beneficial effect provided in an embodiment of the present invention includes:
By during displaying web page through browser, being added into oral thermometer parent in the web page by management client, from And trigger browser and obtain the first script and the second script, enable management client to access the behavior of webpage according to user, Triggering browsing client acquires the data in the webpage by the second script;It solves by the web crawlers in a terminal When acquiring data, need to be arranged for the terminal more IP address to avoid one of IP address from being prohibited from using, it is caused Acquire the higher problem of complexity of data;Since the behavior that user accesses webpage is usually irregular, and each user The number that same website is accessed in one day will not be too high, and therefore, the terminal that website usually will not forbid user to use is corresponding IP address;In addition, even if website prohibits the corresponding IP address of terminal that user uses net can also be accessed by other users The behavior of page obtains the data in webpage, acquires data it is not necessary that multiple IP address are arranged in same terminal, reduces end The complexity of end acquisition data.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the structural schematic diagram of data collection system provided by one embodiment of the present invention;
Fig. 2A is the flow chart of collecting method provided by one embodiment of the present invention;
Fig. 2 B is the schematic diagram that terminal provided by one embodiment of the present invention shows data;
Fig. 2 C is the schematic diagram that terminal provided by one embodiment of the present invention shows data;
Fig. 2 D is the schematic diagram that terminal provided by one embodiment of the present invention shows data;
Fig. 3 is that the terminal that another embodiment of the present invention provides determines whether to issue the schematic diagram of the first script;
Fig. 4 is the block diagram of data acquisition device provided by one embodiment of the present invention;
Fig. 5 is the block diagram of data acquisition device provided by one embodiment of the present invention;
Fig. 6 is the structural schematic diagram of terminal provided by one embodiment of the present invention;
Fig. 7 is the structural schematic diagram of server provided by one embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Firstly, to the present embodiments relate to several nouns be introduced.
Browser: for being requested to server and showing webpage.Optionally, browser can only include requesting and showing net The function of page;Alternatively, browser both includes the function of requesting and show webpage, it further include other functions, such as: instant messaging function Energy, on-line payment function.It is all that there is request and show that the client of webpage function belongs to the browsing in the embodiment of the present invention Device.
Management client: for monitoring the webpage of browse request.When management client web page monitored, the net can be obtained The banner of page.
Optionally, management client can also detect corresponding webpage with the presence or absence of rogue program according to banner.
Optionally, banner is web page address (or uniform resource locator (Uniform Resource Locator, URL));Alternatively, banner is the domain name of webpage, and such as: xxx.com;Xxx.cn etc..
Optionally, management client obtains address mark.Address mark can be internet protocol address (Internet Protocol Address, IP address), or the mark in geographical location locating for terminal, the present embodiment do not limit this It is fixed.
Second script: for carrying out data acquisition to the webpage during displaying web page through browser.Optionally, Two scripts are that developer is preconfigured for different webpages, that is, each webpage corresponds at least one second script, Mei Ge The corresponding a type of data of two scripts acquisition.
Such as: certain shopping website includes the integral point panic buying page and the special price page, the integral point panic buying page correspond to crus secunda everyday This A and the second script B, the special price page corresponds to the second script C everyday.Wherein, the second script A is for acquiring in the integral point panic buying page Stockpile number is greater than the corresponding data of article of preset quantity;Second script B is lower than for acquiring price in the integral point panic buying page The corresponding data of article of default price.Second script C is used to acquire the object that price in the special price page everyday is lower than default price The corresponding data of product.
Optionally, in the embodiment of the present invention, the second script is js file.Js file refers to javascript scripting language A kind of formatted file write, it usually needs at least one of cooperation html, php, java language use.Js file is used for Web sphere generally cannot be opened directly, need to use by running webpage.
First script: for providing running environment during displaying web page through browser for the second script.Terminal passes through Running the first script can control the load and operation of the second script.If browser needs to run the second script, browser is needed It to be embedded in first script in advance in webpage, browser execution second script could be made by the first script.In other words It says, which provides the entrance of the second script of browser execution.
Optionally, in the embodiment of the present invention, the first script is main.js file.
Optionally, different webpages corresponds to the same main.js file, and in other words, main.js file is general.
The application scenarios of the embodiment of the present invention are introduced below.
Referring to FIG. 1, it illustrates the structural schematic diagrams of data collection system provided by one embodiment of the present invention.This is System includes at least one terminal 110 and server 120.
Terminal 110 can be mobile phone, tablet computer, wearable device, pocket computer on knee and desktop computer Deng the present embodiment is not construed as limiting this.
Browser 111 and management client 112 are installed in terminal 110.Terminal 110 is by wireless network mode or has Gauze network mode and server 120, which are established, to be communicated to connect.
Management client 112 sends first to server 120 by the communication connection between terminal 110 and server 120 The text that the first script is sent to terminal 110 is requested in file address request, correspondingly, server 120 according to first file address Part address, management client 112 obtain the file address of first script, the file address of first script are added to browsing In the page code for the webpage that device 111 is currently shown.
Browser 111 detects the file address of the first script during executing the page code of current web page, to Server 120 sends the request of the first file acquisition, and correspondingly, server 120 is requested according to first file acquisition to terminal 110 The first script is sent, browser 111 obtains first script.
Since the file address of the first script is first sent to management client 112 by server 120, then to browser 111 The first script is sent, allows server 120 after issuing the first script, changes the store path (text of the first script Part address), at this point, browser 111 when requesting first script next time, can also be sent modified according to server 120 Store path gets the first script, improves the flexibility that server 120 stores the first script.
Optionally, browser 111 sends the to server 120 by communication connection between terminal 110 and server 120 The request of two file addresses, correspondingly, server 120 request to send the second script to terminal 110 according to second file address File address.The first script in browser 111 obtains the file address of the second script.
Browser 111 detects the file address of the second script by the first script, sends the second file to server 120 Acquisition request, correspondingly, server 120 request to send the second script, browser to terminal 110 according to second file acquisition The first script in 111 obtains second script.
Since the file address of the second script is first sent to the first script in browser 111 by server 120, then to One script sends the second script, allows server 120 after issuing the second script, changes the storage road of the second script Diameter (file address), at this point, the modification that browser 111 when requesting second script next time, can also be sent according to server 120 Store path afterwards gets the second script, improves the flexibility that server 120 stores the second script.
Browser 111 runs the data in the webpage that currently shows of the second script acquisition by the first script, and by the number According to being sent to server 120.
Optionally, the second script is the corresponding js file of webpage that browser 111 is currently shown, and second script is used for Acquire the data of predefined type.
Optionally, browser 111 and management client 112 can be mutually independent application program, or same Different function in a application program, the present embodiment are not construed as limiting this.
Optionally, operation has accurate system in server 120, which is used to provide backstage precisely service, such as: It includes but is not limited to following several that the backstage that accurate system provides, which precisely services: according to the address label in the request of the first file address Knowledge determines whether to issue the first script, issues the first script according to the request of the first file acquisition, issued the second script according to last time The duration being spaced between the request of the second file address is received with this, and/or, according to the environment in the request of the second file address Parameter determines whether to issue the second script.
Wherein, environmental parameter is used to determine whether browser 111 supports the second script of operation for server 120.
Optionally, environmental parameter includes: the version number of browser 111, and/or, the type of browser 111.
Optionally, server 120 can be server cluster or individual server, this implementation is not construed as limiting this.
Optionally, the present embodiment only by taking server 120 sends the first script and the second script to terminal 110 as an example into Row explanation, in actual implementation, the quantity of terminal 110 is at least one, and the present embodiment is not construed as limiting this.
Optionally, above-mentioned wireless network or cable network use standard communication techniques and/or agreement.Network be usually because Special net, it may also be any network, including but not limited to local area network (Local Area Network, LAN), Metropolitan Area Network (MAN) (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or nothing Any combination of gauze network, dedicated network or Virtual Private Network).In some embodiments, using including hypertext markup Language (HyperText Mark-up Language, HTML), extensible markup language (Extensible Markup Language, XML) etc. technology and/or format represent the data by network exchange.It additionally can be used such as safe Socket layer (Secure Socket Layer, SSL), Transport Layer Security (Trassport Layer Security, TLS), void Quasi- dedicated network (Virtual Private Network, VPN), Internet Protocol Security (Internet Protocol Security, IPsec) etc. conventional encryption techniques encrypt all or some links.In further embodiments, can also make Replace or supplement above-mentioned data communication technology with customization and/or the exclusive data communication technology.
Fig. 2A is please referred to, it illustrates the flow charts of collecting method provided by one embodiment of the present invention.The data Acquisition method is applied in data collection system shown in FIG. 1, and this method may include following steps:
Step 201, server sends the first script to terminal.
First script is browser in terminal during showing webpage, through operational management client in webpage It is requested when the ingress label of addition.
Step 202, browser obtains the first script according to ingress label.
Wherein, ingress label is added in webpage during displaying web page through browser by management client, it is described enter Mouth label obtains the first script for triggering browser from server the first foot of acquisition from server for triggering the browser This.
In the present embodiment, browser shows webpage according to the browse operation received.
In a kind of mode, displaying web page through browser refers to: terminal receives the clear of user's input by man-machine interactive interface Look at operation;Start browser according to the browse operation, and shows the webpage of browse operation instruction by the browser.
In a further mode of operation, displaying web page through browser refers to: terminal receives what user inputted by man-machine interactive interface Start-up operation;Start browser according to the start-up operation;The browse operation of user's input is received by the man-machine interactive interface, is led to Cross the webpage that the browser shows browse operation instruction.
Optionally, browse operation and start-up operation are clicking operation, long press operation, slide, character entering function, language At least one of sound input operation.
Optionally, browse operation and start-up operation are identical or different.
Ingress label is used to add external scripts (the first script) in the page code of webpage, schematically, entrance mark Label are script label.
Optionally, management client adds ingress label in the bottom of the page code of webpage.
In the present embodiment, ingress label includes tag attributes.Tag attributes are used to indicate address (the first foot of external scripts This file address), schematically, tag attributes src.
Step 203, server sends the second script to terminal.
Second script is requested when being the first script of browser execution.
Step 204, browser obtains corresponding second script of webpage from server when running the first script.
Step 205, browser carries out data acquisition to webpage when running the second script.
First script passes through fortune by the first script of browser execution for providing the running environment of the second script, terminal Row first script runs the second script, and the data of corresponding types in webpage are acquired by second script.
Optionally, after browser collects the data in webpage, server is sent the data to.
Step 206, server obtains the data of the collected webpage of the second script.
Optionally, server obtains the data of webpage every preset duration from browser;Alternatively, server receives browser Collect the data reported after the data in webpage.
The present embodiment does not limit the specific value of preset duration, schematically, preset duration 10min.
Optionally, after server receives the data of the collected webpage of the second script, classify to each data Storage, in these data of terminal request, terminal classification shows these data.
In one example, the data of the article in shopping page with discount coupon are stored together by server, work as end When end request has the data of article of discount coupon, server sends these data to terminal, and with reference to Fig. 2 B, terminal is after certificate In the valence page 21, showing has the data of the article of discount coupon.Wherein, terminal can be the terminal of reported data, be also possible to Other terminals, the present embodiment are not construed as limiting this.
In yet another example, the data for the article that price is lower than default price are stored together by server, work as terminal When price being requested to be lower than the data of the article of default price, server sends these data to terminal, and with reference to Fig. 2 C, terminal exists In the Chinese cabbage valence page 22, display price is lower than the data of the article of default price.Wherein, terminal can be the end of reported data End, is also possible to other terminals, the present embodiment is not construed as limiting this.
Optionally, server records the situation of change of one group of data, and in this group of data of terminal request, sends to terminal The situation of change of this group of data shows the situation of change by terminal.
Optionally, above-mentioned one group of data include the price data of article, the time, the volume residual of article that obtain data etc. Data associated with the article.
In one example, server is stored with the situation of change of item price, when the data of the terminal request article, The situation of change of the item price is sent to terminal by server, and with reference to Fig. 2 D, terminal shows the variation feelings of the price of the article Condition 23.Wherein, terminal can be the terminal of reported data, be also possible to other terminals, and the present embodiment is not construed as limiting this.
In conclusion collecting method provided in this embodiment, by passing through during displaying web page through browser Management client is added into oral thermometer parent in the web page, so that triggering browser obtains the first script and the second script, so that pipe The behavior of webpage can be accessed according to user by managing client, and triggering browsing client acquires the number in the webpage by the second script According to;It solves when acquiring data by the web crawlers in a terminal, needs to be arranged for the terminal more IP address One of IP address is avoided to be prohibited from using, the higher problem of complexity of caused acquisition data;Since user accesses The behavior of webpage be usually it is irregular, and each user the number of same website is accessed in one day will not be too high, therefore, net The corresponding IP address of the terminal that usually user will not be forbidden to use of standing;In addition, even if website prohibits the terminal pair that user uses The IP address answered can also access the behavior of webpage by other users to obtain the data in webpage, without in same terminal It is middle that multiple IP address are set to acquire data, reduce the complexity of data acquisition of terminal.
Optionally, embodiment of the method for terminal side, step 201,203,206 can be implemented separately in step 202,204,205 The embodiment of the method for server side can be implemented separately, the present embodiment is not construed as limiting this.
The first script is obtained to the mode of management client addition ingress label and browser in step 202 below The mode that browser obtains the second script in mode, step 205 describes in detail respectively.
The first, the mode of management client addition ingress label.
In the present embodiment, during displaying web page through browser, management client adds ingress label in webpage, packet Include following steps:
1) management client is monitored browser.
Terminal is monitored browser by management client, includes, but are not limited to, the following ways:
In a kind of mode, management client is supervised in real time by monitoring whether browser has sent webpage acquisition request Whether control browser needs to show webpage.When management client, which monitors browser, has sent webpage acquisition request, determine clear Device of looking at needs to show webpage.At this point, browser obtains the banner in webpage acquisition request.
In a further mode of operation, management client is supervised in real time by monitoring whether browser receives web data packet Whether control browser needs to show webpage.When management client, which monitors browser, receives web data packet, browsing is determined Device needs to show webpage.At this point, browser obtains the banner shown in browser by preset interface.
2) when management client monitors displaying web page through browser, management client is to server the first file of transmission Location request.
The request of first file address issues the file address of the first script for request server.
In the present embodiment, browser is monitored by the management client in terminal, shows net monitoring browser When page, triggering browser sends the first file address to server and requests.
Optionally, browser can also send the first file address from trend server when loading webpage to be shown Request.
When terminal acquires data by web crawlers, according to the web page crawl data for crawling task instruction.If crawling task The webpage of instruction does not have user's access, or expects access without user, then, the data in the collected webpage of terminal are The data not needed by user, at this point, consumed resource when data acquisition of terminal can be wasted, meanwhile, it can also waste server The memory space occupied when storing the data.
And in the present embodiment, management client accesses the browse operation of webpage according to user, to determine that browser acquires The opportunity of data, so that terminal acquires the data of the webpage under the premise of user has accessed the webpage, that is, the number of the webpage According to being needed by user, for the data in the webpage that the direct acquisition server of terminal is specified, saves terminal and adopt Collect consumed resource when data, meanwhile, it also saves server and stores the memory space occupied when the data.
Optionally, the request of the first file address includes at least one of address label knowledge and banner.
Address mark is for determining whether that management client sends the first script for server.Address mark can reflect Bandwidth provided by the currently used network of terminal.
Banner is used to determine corresponding second script of webpage that browser is shown for server.
Optionally, when server does not need to determine corresponding second script of webpage, such as: when all webpages correspond to it is same When the second script, banner can not be carried in the request of the first file address.
3) server receives the first file address request that management client is sent in displaying web page through browser.
4) server determines whether that terminal sends the first script according to address mark.
Optionally, blacklist is prestored in server, which includes the address in the lesser area of at least one bandwidth Mark.If the address mark in the request of the first file address that server receives belongs to the blacklist, it is determined that do not send the One script, process terminate;If the address mark in the first file address request that server receives is not belonging to the blacklist, It determines and sends the first script, at this point, executing step 5).Wherein, the address in blacklist identifies the bandwidth that corresponding area provides Lower than pre-set bandwidths.
For the terminal in remote districts access webpage, bandwidth provided by the currently used network of the terminal may be compared with Small, since browser is during showing webpage, the data for obtaining the webpage have occupied biggish bandwidth.If showing During webpage, browser also obtains the first script and the second script, is likely to result in asking for displaying web page through browser Caton Topic.Therefore, in the present embodiment, server according to address mark by determining whether to send the first script, in address mark pair When the bandwidth that the area answered provides is lower than pre-set bandwidths, the first script is not sent to terminal, ensure that displaying web page through browser Smooth degree.
With reference to Fig. 3, after server receives the first file address request 301, obtain in first file address request 301 Address mark 302, detect in the blacklist 303 prestored with the presence or absence of the address mark 302;Server is detecting to be not present When address mark 302, determines and send the first script.
5) when determining to send the first script to terminal according to address mark, server sends first to management client The file address of script.
Optionally, the file address of the first script is used to indicate server address, port numbers and the first script in server In at least one of storage location.
6) management client receives server in the file address for determining the first script sent when issuing the first script.
7) management client adds ingress label according to the file address of the first script in webpage.
Management client adds ingress label in the page code of webpage, and ingress label includes tag attributes;Management visitor Family end sets the value of tag attributes to the file address of the first script.
Schematically, this step is indicated by following codes: src=123.456.567.8008.
In conclusion collecting method provided in this embodiment, by being requested by server according to the first file address In address mark determine whether to send the first script, which, which identifies, is used to indicate the bandwidth of corresponding area, so that server When determining that terminal is run in the lesser area of bandwidth, the first script is not sent to terminal, ensure that terminal shows webpage Smooth degree.
It optionally, can also be according to net in the request of the first file address after server receives the request of the first file address The banner of page, determines corresponding second script of webpage.
Optionally, the corresponding relationship between banner and the second script is prestored in server.Server is according to prestoring Corresponding relationship and the first file address request in banner, determine corresponding second script.
Optionally, each banner corresponds at least one second script, the number of each second script acquisition corresponding types According to.
With reference to Fig. 3, after server receives the first file address request 301, obtain in first file address request 301 Banner 304, from corresponding relationship 305 determine corresponding second script of banner 304.
The second, browser obtains the first script.
In the present embodiment, browser obtains first script according to the ingress label, including the following steps:
1) when the file address of the first script in browser execution ingress label, the first file acquisition is sent to server Request.
The request of first file acquisition includes the file address of the first script.
Browser runs the page code of webpage line by line, when running to the tag attributes of page code bottom, according to this The value of tag attributes, that is, the file address of the first script sends the request of the first file acquisition to server.
Optionally, browser sends the request of the first file acquisition to server according to the file address of the first script and refers to: The file address of first script is carried in the request of the first file acquisition, first file acquisition request is sent to service Device.
2) server receives the first file acquisition request sent when browser execution ingress label.
Server searches the first script according to the file address of the first script in the request of the first file acquisition.
3) server requests to send the first script to terminal according to the first file acquisition.
4) browser receives the first script that server is sent according to the request of the first file acquisition.
Third, browser obtain the second script.
In the present embodiment, browser obtains corresponding second script of webpage when running the first script, from server, including Following steps.
1) the first script of browser execution sends the second file address to server and requests.
The request of second file address issues the file address of the second script for request server.
2) server receives the second file address request that browser is sent when running the first script.
3) server requests the file address that the second script is sent to terminal according to the second file address.
Optionally, the file address of the second script is used to indicate server address, port numbers and the second script in server In at least one of storage location.
4) browser receives the file address of the second script by the first script.
Terminal receives the file address of the second script, and the file address of the acquisition file is assigned to the first foot by the first script Tag attributes in this.
Optionally, the tag attributes in the first script are the marks for the second script tag that browser adds in the first script Sign attribute;Alternatively, the tag attributes in the first script are the tag attributes for the second script tag defaulted in the first script.
The representation of tag attributes in second script tag can be with the expression side of the tag attributes in ingress label Formula is identical, can also be different from the representation of the tag attributes in ingress label, and the present embodiment is not construed as limiting this.Schematically Ground, the representation of the tag attributes in the second script tag are src.
5) browser sends the request of the second file acquisition to server when running the file address of the second script.
The request of second file acquisition includes the file address of crus secunda sheet.
Browser runs the code in the first script line by line, when the tag attributes run in the second script tag, root According to the value of the tag attributes, that is, the file address of the second script sends the request of the second file acquisition to server.
6) server receives the second file acquisition request sent when the file address of the second script of browser execution.
7) server requests to send the second script to terminal according to the second file acquisition.
8) browser receives the second script that server is sent according to the request of the second file acquisition.
Optionally, before step 3), when the first script of browser execution, the environmental parameter of browser can also be obtained, The environmental parameter is used to determine whether browser supports the second script of operation for server;Environmental parameter is added to by browser Second file address request, at this point, the request of the second file acquisition includes file address and the environmental parameter of crus secunda sheet.
Wherein, the first script includes the code for obtaining environmental parameter, and browser obtains browsing by running the code The environmental parameter of device.
In this case, after server receives the request of the second file address, it is also necessary to be determined according to environmental parameter clear Whether device of looking at supports the second script of operation;Crus secunda is sent when determining that browser supports the second script of operation, then to terminal This file address, that is, execute step 3).
Optionally, the blacklist of browser is preset in server.It include at least one browsing in the blacklist of browser The type of the version number of device and/or at least one browser.
Optionally, whether the version number of the browser of the environmental parameter instruction in the request of the second file address of server detection Belong to the blacklist of browser;If belonging to, it is determined that browser supports the second script of operation;Execute step 3);If being not belonging to, Determine that browser does not support the second script of operation, process terminates.
When the type for not allowing the second script to run since the version of browser is lower or the type of browser is, this When, even if the second script is sent to terminal by server, the browser in the terminal is also unable to run second script, wastes Server sends the transfer resource that the second script occupies.
In the present embodiment, by carrying environmental parameter in the second Address requests that terminal is sent, enable the server to Determine whether browser supports the second script of operation according to the environmental parameter;When determining to support the second script of operation, to Terminal sends second script, in this way, can operate normally second script after browser receives the second script, save Server sends the bandwidth resources occupied when the second script.
Optionally, before step 3), server can also detect the second script whether was issued in preset duration;If It did not issued the second script in preset duration, then sends the file address of the second script to terminal.
Whether server issued the second script by detection in preset duration, to detect the acquisition of the second script indirectly The freshness of data.The present embodiment does not limit the numerical value of preset duration, and schematically, preset duration is 6 hours.
When server detects to issue the second script in preset duration, illustrate that there are terminals in the preset duration The collected data of the second script were reported, at this point, the freshness of the data is higher, server without obtaining the number again According to save transfer resource, that is, server does not need to issue the second script to terminal, and process terminates.
When server detects not issue the second script in preset duration, illustrate to be not present in the preset duration Terminal reported the collected data of the second script, at this point, the freshness of the data is lower, server needs to obtain the number According to guarantee the validity of the data of storage, that is, server needs to issue the second script to terminal, executes step 3).
Following is apparatus of the present invention embodiment, can be used for executing embodiment of the present invention method.For apparatus of the present invention reality Undisclosed details in example is applied, embodiment of the present invention method is please referred to.
Referring to FIG. 4, it illustrates the block diagrams of data acquisition device provided by one embodiment of the present invention.The device has The exemplary function of method of above-mentioned terminal side is executed, function can also be executed corresponding software by hardware realization by hardware It realizes.The apparatus may include: first, which obtains module 410, second, obtains module 420 and data acquisition module 430.
First obtains module 410, and for obtaining the first script according to the ingress label, the ingress label is to show The label being added into the webpage during webpage, the ingress label obtain the first foot for triggering from server This;
Second obtains module 420, for it is corresponding to obtain the webpage from the server when running first script Second script, first script is the script for being used to provide the described the running environment of the second script, the crus secunda It originally is the script for carrying out data acquisition to the webpage;
Data acquisition module 430, for carrying out data acquisition to the webpage when running second script.
Optionally, described device further include: adding module.
The adding module, for the ingress label to be added in the webpage during showing webpage.
Optionally, the adding module includes: monitoring unit, the first transmission unit, the first receiving unit and adding unit.
Monitoring unit, for being monitored to the browser;
First transmission unit sends the to the server for when monitoring the browser and showing the webpage The request of one file address, the first file address request include that address label is known;The first file address request is for requesting The server issues the file address of first script, and the address mark is for determining whether institute for the server It states management client and sends first script;
First receiving unit is determining send when issuing first script described first for receiving the server The file address of script;
Adding unit adds the ingress label for the file address according to first script in the webpage.
Optionally, the adding unit, is also used to:
The ingress label is added in the page code of the webpage, the ingress label includes tag attributes;By institute The value for stating tag attributes is set as the file address of first script;
Described first obtains module, is also used to:
When running the file address of first script in the ingress label, the first file is sent to the server Acquisition request, the first file acquisition request include the file address of first script;The server is received according to institute State first script that the request of the first file acquisition is sent.
Optionally, first transmission unit, is also used to:
When monitoring the display webpage, the banner of the webpage is obtained;
The banner is carried in the request of first file address, sends first text to the server Part Address requests, the first file acquisition request include address mark and the banner;The banner is used Corresponding second script of the webpage is determined in the confession server.
Optionally, described second module is obtained, comprising:
Second transmission unit sends the second file address to the server and requests for running first script;
Second receiving unit, for receiving the file address of second script by first script;
Third transmission unit, for when running the file address of second script, send to the server described in The request of second file acquisition, the second file acquisition request include the file address of second script;
Third receiving unit, described second sent for receiving the server according to second file acquisition request Script.
Optionally, second transmission unit, is also used to:
When running first script, environmental parameter is obtained, the environmental parameter is used for described in confession server determination Whether device is supported to run second script;
Second file address request that the environmental parameter is added to sends second text to the server Part Address requests;File address and the environmental parameter of the second file acquisition request including second script.
Correlative detail can refer to above method embodiment.
Referring to FIG. 5, it illustrates the block diagrams of data acquisition device provided by one embodiment of the present invention.The device has The exemplary function of method of above-mentioned server side is executed, function can also be executed corresponding soft by hardware realization by hardware Part is realized.The apparatus may include: the first sending module 510, the second sending module 520 and acquisition module 530.
First sending module 510, for sending the first script to terminal, first script is the browsing in the terminal Device during showing webpage, what when ingress label added in the webpage by operational management client, requested;
Second sending module 520, for sending the second script to the terminal, second script is the browser fortune It is requested when row first script, first script is the script for being used to provide the described the running environment of the second script, institute Stating the second script is the script for carrying out data acquisition to the webpage;
Module 530 is obtained, for obtaining the data of the collected webpage of second script.
Optionally, first sending module 510, comprising:
First receiving unit, sent for receiving the management client when the browser shows the webpage The request of one file address, the first file address request include that address label is known;
First determination unit, for determining whether that the terminal sends first script according to address mark;
First transmission unit, for determining to send first script to the terminal when according to address mark When, the file address of first script is sent to the management client, the management client is according to first script File address, add ingress label in the webpage;
Second receiving unit, first file sent when for receiving ingress label described in the browser execution obtain Request is taken, the first file acquisition request includes the file address of first script;
Second transmission unit sends first script to the terminal for requesting according to first file acquisition.
Optionally, described device further include: determining module.
Determining module determines the net for the banner of the webpage according to the request of first file address Corresponding second script of page.
Optionally, second sending module 520, comprising:
Third receiving unit, the second file address sent for receiving the browser when running first script Request, the second file address request include the environmental parameter of the browser;
Second determination unit, for determining whether the browser is supported to run the crus secunda according to the environmental parameter This;
Third transmission unit, for when determining that the browser is supported to run second script, to the terminal Send the file address of second script;
4th receiving unit, sent when for receiving the file address of the second script described in the browser execution described in The request of second file acquisition;
4th transmission unit sends second script to the terminal for requesting according to second file acquisition.
Optionally, described device further include: detection module and third sending module.
Detection module, for detecting whether issued second script in preset duration;
Third sending module when for not issuing second script in the preset duration, is sent out to the terminal Send the file address of second script.
It should be understood that data acquisition device provided by the above embodiment, only being partitioned into above-mentioned each functional module Row is for example, can according to need in practical application and be completed by different functional modules above-mentioned function distribution, i.e., by clothes The internal structure of business device is divided into different functional modules, to complete all or part of the functions described above.In addition, above-mentioned The data acquisition device and collecting method embodiment that embodiment provides belong to same design, the specific implementation process side of being detailed in Method embodiment, which is not described herein again.
The embodiment of the invention also provides a kind of computer readable storage medium, which be can be Computer readable storage medium included in memory;It is also possible to individualism, it can without the computer in supplying terminal Read storage medium.Computer-readable recording medium storage has at least one instruction, at least one section of program, code set or instruction set, At least one instruction, at least one section of program, code set or instruction set are loaded by processor and are executed to realize above-mentioned each side The collecting method for the terminal side that method embodiment provides.
The embodiment of the invention also provides a kind of computer readable storage medium, which be can be Computer readable storage medium included in memory;It is also possible to individualism, without the computer in supplying server Readable storage medium storing program for executing.Computer-readable recording medium storage has at least one instruction, at least one section of program, code set or instruction Collection, at least one instruction, at least one section of program, code set or instruction set are loaded by processor and are executed above-mentioned each to realize The collecting method for the server side that embodiment of the method provides.
Fig. 6 may include penetrating it illustrates the structural schematic diagram of terminal 600 provided by one embodiment of the present invention, the terminal Frequently (RF, Radio Frequency) circuit 601, include one or more the memory of computer readable storage medium 602, input unit 603, display unit 604, sensor 605, voicefrequency circuit 606, Wireless Fidelity (WiFi, Wireless Fidelity) module 607, the processor 608 and the components such as power supply 609 that include one or more than one processing core. It will be understood by those skilled in the art that the restriction of terminal structure shown in Fig. 6 not structure paired terminal, may include than diagram More or fewer components perhaps combine certain components or different component layouts.Wherein:
RF circuit 601 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 608 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuit 601 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses Family identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier (LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuit 601 can also by wireless communication with network and its He communicates equipment.Any communication standard or agreement, including but not limited to global system for mobile telecommunications system can be used in the wireless communication Unite (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 602 can be used for storing software program and module, and processor 608 is stored in memory 602 by operation Software program and module, thereby executing various function application and data processing.Memory 602 can mainly include storage journey Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function Such as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created data according to terminal (such as audio data, phone directory etc.) etc..In addition, memory 602 may include high-speed random access memory, can also include Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memory 602 can also include Memory Controller, to provide processor 608 and input unit 603 to memory 602 Access.
Input unit 603 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, in a specific embodiment In, input unit 603 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or touching Control plate, collect user on it or nearby touch operation (such as user using any suitable object such as finger, stylus or Operation of the attachment on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to preset formula It sets.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined The touch orientation of user is surveyed, and detects touch operation bring signal, transmits a signal to touch controller;Touch controller from Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 608, and can reception processing Order that device 608 is sent simultaneously is executed.Furthermore, it is possible to a variety of using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes touch sensitive surface.In addition to touch sensitive surface, input unit 603 can also include other input equipments.Specifically, other are defeated Entering equipment can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse One of mark, operating stick etc. are a variety of.
Display unit 604 can be used for showing information input by user or be supplied to user information and terminal it is various Graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.Display Unit 604 may include display panel, optionally, can using liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further , touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, send processing to Device 608 is followed by subsequent processing device 608 and is provided on a display panel accordingly according to the type of touch event to determine the type of touch event Visual output.Although touch sensitive surface and display panel are to realize input and input as two independent components in Fig. 6 Function, but in some embodiments it is possible to touch sensitive surface and display panel are integrated and realizes and outputs and inputs function.
Terminal may also include at least one sensor 605, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel, proximity sensor can close display panel and/or back when terminal is moved in one's ear Light.As a kind of motion sensor, gravity accelerometer can detect (generally three axis) acceleration in all directions Size can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 606, loudspeaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 606 can By the electric signal after the audio data received conversion, it is transferred to loudspeaker, voice signal output is converted to by loudspeaker;It is another The voice signal of collection is converted to electric signal by aspect, microphone, is converted to audio data after being received by voicefrequency circuit 606, then After the processing of audio data output processor 608, it is sent to such as another terminal through RF circuit 601, or by audio data Output is further processed to memory 602.Voicefrequency circuit 606 is also possible that earphone jack, with provide peripheral hardware earphone with The communication of terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 607 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 6 is shown WiFi module 607, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely Become in the range of the essence of invention and omits.
Processor 608 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and/or module being stored in memory 602, and call and be stored in memory 602 Data execute the various functions and processing data of terminal, to carry out integral monitoring to mobile phone.Optionally, processor 608 can wrap Include one or more processing cores;Preferably, processor 608 can integrate application processor and modem processor, wherein answer With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication. It is understood that above-mentioned modem processor can not also be integrated into processor 608.
Terminal further includes the power supply 609 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system and processor 608 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system Etc. functions.Power supply 609 can also include one or more direct current or AC power source, recharging system, power failure inspection The random components such as slowdown monitoring circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., and details are not described herein.
Specifically in embodiments of the present invention, terminal 600 further includes having memory and one or more than one journey Sequence, perhaps more than one program is stored in memory and is configured to by one or more than one processor for one of them It executes.Said one or more than one program include the instruction for executing the collecting method of above-mentioned terminal side.
Fig. 7 is the structural schematic diagram of server provided by one embodiment of the present invention.Server 700 includes central processing list Member (English: Central Processing Unit, abbreviation: CPU) 701 including random access memory (English: random Access memory, referred to as: RAM) 702 and read-only memory (English: read-only memory, referred to as: ROM) 703 be System memory 704, and the system bus 705 of connection system storage 704 and central processing unit 701.The server 700 It further include the basic input/output (I/O system) 706 of information being transmitted between each device helped in computer, and use In the mass-memory unit 707 of storage program area 713, application program 714 and other program modules 715.
The basic input/output 706 includes display 708 for showing information and inputs letter for user The input equipment 709 of such as mouse, keyboard etc of breath.Wherein the display 708 and input equipment 709 are all by being connected to The i/o controller 710 of system bus 705 is connected to central processing unit 701.The basic input/output 706 Can also include input and output controller 710 with for receive and handle from keyboard, mouse or electronic touch pen etc. it is multiple its The input of his equipment.Similarly, i/o controller 710 also provides output to display screen, printer or other kinds of defeated Equipment out.
The mass-memory unit 707 is by being connected to the bulk memory controller (not shown) of system bus 705 It is connected to central processing unit 701.The mass-memory unit 707 and its associated computer-readable medium are server 700 provide non-volatile memories.That is, the mass-memory unit 707 may include such as hard disk or read-only light The computer-readable medium of disk (English: Compact Disc Read-Only Memory, abbreviation: CD-ROM) driver etc (not shown).
Without loss of generality, the computer-readable medium may include computer storage media and communication media.Computer Storage medium includes information such as computer readable instructions, data structure, program module or other data for storage The volatile and non-volatile of any method or technique realization, removable and irremovable medium.Computer storage medium includes RAM, ROM, Erasable Programmable Read Only Memory EPROM (English: erasable programmable read-only memory, letter Claim: EPROM), electrically erasable programmable read-only memory (English: electrically erasable programmable Read-only memory, referred to as: EEPROM), flash memory or other solid-state storages its technologies, CD-ROM, digital versatile disc (English Text: Digital Versatile Disc, referred to as: DVD) or other optical storages, cassette, tape, disk storage or other Magnetic storage device.Certainly, skilled person will appreciate that the computer storage medium be not limited to it is above-mentioned several.Above-mentioned System storage 704 and mass-memory unit 707 may be collectively referred to as memory.
According to various embodiments of the present invention, the server 700 can also be arrived by network connections such as internets Remote computer operation on network.Namely server 700 can be by the network interface that is connected on the system bus 705 Unit 711 is connected to network 712, in other words, Network Interface Unit 711 also can be used be connected to other kinds of network or Remote computer system (not shown).
Specifically in embodiments of the present invention, server 700 further includes having memory and one or more than one journey Sequence, perhaps more than one program is stored in memory and is configured to by one or more than one processor for one of them It executes.Said one or more than one program include the instruction for executing the collecting method of above-mentioned server side.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (15)

1. a kind of collecting method, which is characterized in that described applied to being equipped in the terminal of browser and management client Method includes:
The browser obtains the first script according to ingress label, and the ingress label is by the management client in the browsing Device is added in the webpage during showing webpage, and the ingress label is obtained for triggering the browser from server First script;
The browser obtains corresponding second script of the webpage, institute when running first script, from the server Stating the first script is the script for being used to provide the described the running environment of the second script, and second script is for the webpage Carry out the script of data acquisition;
The browser carries out data acquisition when running second script, to the webpage.
2. the method according to claim 1, wherein the browser according to ingress label obtain the first script it Before, further includes:
The management client is monitored the browser;
When the management client monitors the browser and shows the webpage, the management client is to the server The request of the first file address is sent, the first file address request includes that address label is known;The first file address request is used In the file address for requesting the server to issue first script, the address mark for being for server determination It is no to send first script to the management client;
The management client receives the server and is determining first script sent when issuing first script File address;
The management client adds the ingress label according to the file address of first script in the webpage.
3. according to the method described in claim 2, it is characterized in that,
The management client adds ingress label in the webpage according to the file address of first script, comprising:
The management client adds the ingress label in the page code of the webpage, and the ingress label includes label Attribute;The management client sets the value of the tag attributes to the file address of first script;
The browser obtains first script according to ingress label, comprising:
When the file address of first script in ingress label described in the browser execution, the is sent to the server The request of one file acquisition, the first file acquisition request include the file address of first script;The browser receives First script that the server is sent according to first file acquisition request.
4. according to the method described in claim 2, it is characterized in that, described monitor the browser in the management client When showing the webpage, the management client sends the first file address to the server and requests, comprising:
When the management client monitors the browser and shows the webpage, the management client obtains the webpage Banner;
The management client carries the banner in the request of first file address, sends to the server The first file address request, the first file acquisition request include address mark and the banner;It is described Banner is used to determine corresponding second script of the webpage for the server.
5. method according to any one of claims 1 to 4, which is characterized in that the browser is running first script When, corresponding second script of the webpage is obtained from the server, comprising:
First script described in the browser execution sends the second file address to the server and requests;
The browser receives the file address of second script by first script;
The browser sends second file acquisition when running the file address of second script, to the server Request, the second file acquisition request include the file address of second script;
The browser receives second script that the server is sent according to second file acquisition request.
6. according to the method described in claim 5, it is characterized in that, the first script described in the browser execution, to the clothes Business device sends the request of the second file address, comprising:
When the first script described in the browser execution, the environmental parameter of the browser is obtained, the environmental parameter is for supplying The server determines whether the browser is supported to run second script;
Second file address that the environmental parameter is added to by the browser is requested, to described in server transmission The request of second file address;The second file acquisition request includes file address and the environment ginseng of second script Number.
7. a kind of collecting method, which is characterized in that the described method includes:
The first script is sent at least one terminal, first script is mistake of the browser in the terminal in display webpage Cheng Zhong, what when ingress label added in the webpage by operational management client requested;
The second script is sent to the terminal, second script is requested when being the first script described in the browser execution, First script is the script for being used to provide the described the running environment of the second script, and second script is for the net Page carries out the script of data acquisition;
Obtain the data of the collected webpage of second script.
8. the method according to the description of claim 7 is characterized in that described send the first script to terminal, comprising:
Receive the first file address request that the management client sends when the browser shows the webpage, described the The request of one file address includes that address label is known;
Determine whether that the terminal sends first script according to address mark;
When determining to send first script to the terminal according to address mark, sent to the management client The file address of first script, the management client is according to the file address of first script, in the webpage Add ingress label;
First file acquisition request sent when receiving ingress label described in the browser execution, first file obtain Taking request includes the file address of first script;
It is requested to send first script to the terminal according to first file acquisition.
9. method according to claim 7 or 8, which is characterized in that described to send the second script to the terminal, comprising:
Receive the second file address request that the browser is sent when running first script, second file address Request includes the environmental parameter of the browser;
Determine whether the browser is supported to run second script according to the environmental parameter;
When determining that the browser is supported to run second script, the file of second script is sent to the terminal Address;
Second file acquisition request sent when receiving the file address of the second script described in the browser execution;
It is requested to send second script to the terminal according to second file acquisition.
10. according to the method described in claim 9, it is characterized in that, the text for sending second script to the terminal Before part address, further includes:
Whether detection issued second script in preset duration;
If not issuing second script in the preset duration, the file of second script is sent to the terminal Address.
11. a kind of data acquisition device, which is characterized in that applied in the terminal for being equipped with management client, described device packet It includes:
First obtains module, and for obtaining the first script according to ingress label, the ingress label is the process in display webpage In the label in the webpage is added to by the management client, the ingress label obtains first for triggering from server Script;
Second obtain module, for run it is described first acquisition module get first script when, from the service Device obtains corresponding second script of the webpage, and first script is the foot for being used to provide the described the running environment of the second script This, second script is the script for carrying out data acquisition to the webpage;
Data acquisition module, for run it is described second acquisition module get second script when, to the webpage Carry out data acquisition.
12. a kind of data acquisition device, which is characterized in that described device includes:
First sending module, for sending the first script at least one terminal, first script is clear in the terminal Device is look at during showing webpage, what when ingress label added in the webpage by operational management client requested;
Second sending module, for sending the second script to the terminal, second script is described in the browser execution It is requested when the first script, first script is the script for being used to provide the described the running environment of the second script, described second Script is the script for carrying out data acquisition to the webpage;
Module is obtained, for obtaining the data of the collected webpage of second script.
13. a kind of computer equipment, which is characterized in that the terminal includes processor and memory, is stored in the memory Have at least one instruction, at least one section of program, code set or instruction set, at least one instruction, at least one section of program, The code set or instruction set are loaded by the processor and are executed to realize that the data as described in claim 1 to 6 is any are adopted Set method, alternatively, collecting method a method according to any one of claims 7 to 11.
14. a kind of data collection system, which is characterized in that the data collection system includes terminal and server,
The terminal includes data acquisition device described in claim 11;
The server includes data acquisition device described in claim 12.
15. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium Few one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or the instruction Collection is loaded by the processor and is executed to realize the collecting method as described in claim 1 to 6 is any, alternatively, as weighed Benefit requires 7 to 11 any collecting methods.
CN201710461347.XA 2017-06-15 2017-06-15 Data acquisition method and device, computer equipment and system Active CN109145182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710461347.XA CN109145182B (en) 2017-06-15 2017-06-15 Data acquisition method and device, computer equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710461347.XA CN109145182B (en) 2017-06-15 2017-06-15 Data acquisition method and device, computer equipment and system

Publications (2)

Publication Number Publication Date
CN109145182A true CN109145182A (en) 2019-01-04
CN109145182B CN109145182B (en) 2022-07-12

Family

ID=64804178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710461347.XA Active CN109145182B (en) 2017-06-15 2017-06-15 Data acquisition method and device, computer equipment and system

Country Status (1)

Country Link
CN (1) CN109145182B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209506A (en) * 2019-12-24 2020-05-29 车智互联(北京)科技有限公司 Data analysis system and method
CN113898254A (en) * 2021-10-11 2022-01-07 石家庄华泰电力工具有限公司 Remote control method and management system suitable for intelligent safety management cabinet

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083182A1 (en) * 2000-12-18 2002-06-27 Alvarado Juan C. Real-time streamed data download system and method
CN101620630A (en) * 2009-06-29 2010-01-06 北京黑米天成科技有限公司 WEB action data collecting model based on JS script
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
CN103714082A (en) * 2012-10-09 2014-04-09 上海博路信息技术有限公司 Mobile dynamic data engine based internet access analysis system
CN104504125A (en) * 2014-12-30 2015-04-08 北京国双科技有限公司 Web page data monitoring method and device
CN106469185A (en) * 2016-08-29 2017-03-01 浪潮电子信息产业股份有限公司 A kind of method carrying out data collection in website statistics

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083182A1 (en) * 2000-12-18 2002-06-27 Alvarado Juan C. Real-time streamed data download system and method
CN101620630A (en) * 2009-06-29 2010-01-06 北京黑米天成科技有限公司 WEB action data collecting model based on JS script
CN103714082A (en) * 2012-10-09 2014-04-09 上海博路信息技术有限公司 Mobile dynamic data engine based internet access analysis system
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
CN104504125A (en) * 2014-12-30 2015-04-08 北京国双科技有限公司 Web page data monitoring method and device
CN106469185A (en) * 2016-08-29 2017-03-01 浪潮电子信息产业股份有限公司 A kind of method carrying out data collection in website statistics

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209506A (en) * 2019-12-24 2020-05-29 车智互联(北京)科技有限公司 Data analysis system and method
CN111209506B (en) * 2019-12-24 2023-05-30 车智互联(北京)科技有限公司 Data analysis system and method
CN113898254A (en) * 2021-10-11 2022-01-07 石家庄华泰电力工具有限公司 Remote control method and management system suitable for intelligent safety management cabinet

Also Published As

Publication number Publication date
CN109145182B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN105824958B (en) A kind of methods, devices and systems of inquiry log
CN103617165B (en) Picture loading method, device and terminal
CN108345543B (en) Data processing method, device, equipment and storage medium
CN103455582B (en) The display packing of browser navigation page and mobile terminal
CN105787776A (en) Information processing method and apparatus
CN108984548A (en) Content of pages caching method and device
CN108471376A (en) Data processing method, apparatus and system
CN107040609A (en) A kind of network request treating method and apparatus
CN106557962A (en) Method of payment, apparatus and system
CN109145183A (en) Push the method and device of information to be presented
CN106708496A (en) Processing method and apparatus for label page in graphic interface
CN109408150A (en) It is a kind of to apply loading method and mobile terminal fastly
CN108536594A (en) Page test method, device and storage device
CN108153778A (en) Webpage store method, webpage read method and device
CN103336838B (en) A kind of processing method of webpage, device and terminal device
CN107291465A (en) page display method, device and storage medium
CN109756767A (en) Preview data playback method, device and storage medium
CN107766358A (en) The method and relevant apparatus that a kind of page is shared
CN110020293A (en) Multi-medium data methods of exhibiting, device and storage medium
CN104216929A (en) Method and device for intercepting page elements
CN109088844A (en) Information intercepting method, terminal, server and system
CN105955597A (en) Method and device for displaying information
CN104063400B (en) Data search method and data search device
CN108763544A (en) A kind of display methods and terminal
US10540415B2 (en) Apparatus and method for managing history information in an electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant