CN108763239A - A kind of network access times computational methods and device - Google Patents
A kind of network access times computational methods and device Download PDFInfo
- Publication number
- CN108763239A CN108763239A CN201810239625.1A CN201810239625A CN108763239A CN 108763239 A CN108763239 A CN 108763239A CN 201810239625 A CN201810239625 A CN 201810239625A CN 108763239 A CN108763239 A CN 108763239A
- Authority
- CN
- China
- Prior art keywords
- page
- access times
- network access
- recorded
- accessed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of network access times computational methods and device, this method to include:Response receives accessing page request, shows the content of pages, and record accessed page ID;The page ID recorded within a preset period of time is obtained, to count the quantity of the identical page ID;And to the identical page ID of quantity, update the access times of the page simultaneously according to the quantity.Utilize the present invention, by caching the page ID being accessed in a period of time in advance, and count the quantity for being accessed page ID, then it will click on the identical page ID of quantity and be classified as one kind, to be updated simultaneously to the access times of these page IDs, the newer frequency of access times is significantly reduced with this, saves resource.
Description
Technical field
The present invention relates to Internet technical fields, more particularly to a kind of network access times computational methods and device.
Background technology
In recent years, as Internet technology develops and go deep into extensive use, the network information is in explosive growth, passes through browsing
Various websites obtain information and have become the conventional means that user obtains information at present.In practical applications, various information, resource hair
Cloth to website for user's inquiry, browsing, download etc., therefore derive the pattern of a kind of " popularity " record now, that is, when article,
When video etc. clicks access by user, access times can be shown simultaneously on current page, that is, user often clicks once, accesses
Number correspondingly increases once, to intuitively embody the popularity value of the page.
In the prior art, when recording " popularity value ", the background server of website can be when there is new access action every time
It is primary with regard to updating.In this way, while intuitively embodying " popularity value ", if current accessed flow is larger, this frequency, in real time
Update operation can occupy database performance, or even cause performance bottleneck, and network accesses paralysis.
Invention content
The invention mainly solves the technical problem of providing a kind of network access times computational methods and devices, in record page
The technical issues of capable of avoiding frequent updating access times in the prior art while face " popularity value " and causing performance bottleneck.
In order to solve the above technical problems, one aspect of the present invention is:A kind of network access times meter is provided
Calculation method, the method includes:Response receives accessing page request, shows the content of pages, and record accessed page
Face ID;The page ID recorded within a preset period of time is obtained, to count the quantity of the identical page ID;And to quantity phase
The same page ID updates the access times of the page according to the quantity simultaneously.
Wherein, the page ID recorded within a preset period of time is obtained, to count the quantity of the identical page ID, specifically
For:Obtain the page ID recorded within a preset period of time;It is ranked up according to the quantity of the page ID;And statistics is identical
The quantity of the page ID.
Wherein, the page ID identical to quantity updates the access times of the page, tool according to the quantity simultaneously
Body is:According to the identical page ID of the quantity quantification of each page ID;The page ID identical to quantity,
Access times are updated according to the quantity simultaneously.
Wherein, response receives accessing page request, shows the content of pages, and record accessed page ID, tool
Body is:Response receives accessing page request, shows the content of pages, and accessed page ID is recorded in caching or net
In network access log.
Wherein, the page ID recorded within a preset period of time is obtained, to count the quantity of the identical page ID, specifically
For:The page ID recorded within a preset period of time is obtained from the caching or network access log, to count identical described
The quantity of page ID.
Wherein, the page ID is resource ID, article ID or product IDs.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of network access times are provided
Computing device, described device include:Recording unit receives accessing page request for responding, shows the content of pages, and
The accessed page ID of record;Statistic unit, the page ID recorded within a preset period of time for obtaining the recording unit, with
Count the quantity of the identical page ID;And updating unit is accessed, it is used for the page ID identical to quantity, according to institute
It states quantity while updating the access times of the page.
Wherein, the recording unit includes:Acquisition module, for obtaining the page ID recorded within a preset period of time;Row
The quantity of sequence module, the page ID for being got according to the acquisition module is ranked up;And first computing module,
Quantity for counting the identical page ID according to the ranking results of the sorting module.
Wherein, the access updating unit includes:Second computing module, it is true for the quantity according to each page ID
The identical page ID of fixed number amount;Update module, for according to second computing module determine as a result, identical to quantity
The page ID, according to the quantity simultaneously update access times.
Wherein, described device further includes storage unit;Accessed page ID is recorded in described deposit by the recording unit
In storage unit.
The beneficial effects of the invention are as follows:The network access times computational methods and device provided in embodiment of the present invention,
By caching the page ID being accessed in a period of time in advance, and the quantity for being accessed page ID is counted, then will click on quantity
Identical page ID is classified as one kind, and to be updated simultaneously to the access times of these page IDs, visit is significantly reduced with this
It asks number newer frequency, saves resource.
Description of the drawings
Fig. 1 is a kind of flow diagram of network access times computational methods in first embodiment of the invention;
Fig. 2 is the flow diagram of the method for statistics same page ID quantity shown in FIG. 1;
Fig. 3 is the flow diagram shown in FIG. 1 to the identical page ID of quantity while the method that updates access times;
Fig. 4 is a kind of structural schematic diagram of network access times computing device in embodiment of the present invention;
Fig. 5 is the structural schematic diagram of recording unit shown in Fig. 4;
Fig. 6 is the structural schematic diagram of the access updating unit described in Fig. 5.
Specific implementation mode
The present invention is described in detail with embodiment below in conjunction with the accompanying drawings.
Referring to Fig. 1, for a kind of flow diagram of network access times computational methods in embodiment of the present invention, it should
Method includes:
Step S10:Response receives accessing page request, shows the content of pages, and record accessed page ID;
Wherein, accessed page ID is recorded in caching or network access log.
In the present embodiment, the page is the page that web browser is shown, user can access related letter by the page
Breath.Content of pages generally comprises:The basic elements such as text, image, table, hyperlink.Page ID it can be appreciated that resource ID,
Article ID, product IDs etc..
Step S11 obtains the page ID recorded within a preset period of time, to count the quantity of the identical page ID;
Wherein, the page ID recorded within a preset period of time is obtained from the caching or network access log, with statistics
The quantity of the identical page ID.
Please refer to Fig. 2, step S11, specially:
Step S20 obtains the page ID recorded within a preset period of time;
Step S21 is ranked up according to the quantity of the page ID;
Step S22 counts the quantity of the identical page ID.
Step S12, the page ID identical to quantity update the access time of the page according to the quantity simultaneously
Number.
Please refer to Fig. 3, step S12, specially:
Step S30, according to the identical page ID of the quantity quantification of each page ID;
Step S31, the page ID identical to quantity update access times simultaneously according to the quantity.
For example, Website server is counted and is updated to the access times for issuing several articles on the web site,
Operation principle is as follows.
User often clicks browsing once to the article of the website orientation, and it is corresponding to be recorded in this article that network accessed in day
Page ID then correspondingly increases primary.Website server is every one preset time, the page recorded to network access log
The quantity of face ID is counted, and statistical result is following (referring to table 1), wherein the preset time is by Website server according to net
The actual conditions stood are configured, these including but not limited to following factors of the factor that can refer to:Current time, website class
Type (video, the network novel, forum etc.), server database size.
Page ID | Access times |
6111 | 20 |
6112 | 5 |
6113 | 20 |
6114 | 20 |
6115 | 5 |
6.121 | 100 |
Table 1
According to the sequence of access times from big to small, these page IDs are ranked up, ranking results (refer to table as follows
2)。
Page ID | Access times |
6121 | 100 |
6111 | 20 |
6113 | 20 |
6114 | 20 |
6112 | 5 |
6115 | 5 |
Table 2
Merge the page ID of identical access times, and according to corresponding access times, it is identical to the access times after merging
Page ID be carried out at the same time update.For example, it is as shown in Table 2 be ranked up after, according to such as under type access number more
Newly (refer to table 3):
Touching quantity | Page ID |
100 | 6121 |
20 | 6111、6113、6114 |
5 | 6112、6115 |
Table 3
Therefore, by method as described above, update is carried out at the same time to the identical page ID of access times, significantly with this
Ground reduces the newer frequency of access times, saves resource, for example, 10000 a plurality of page IDs access record originally, it may be final
Regular is 30 a plurality of records, it is only necessary to be updated accordingly more than 30 times.In the above example, it needs to update 20+5+20+20 originally
+ 5+100=170 times, but finally regular is 3 records, it is only necessary to it updates 3 times.
Referring to Fig. 4, for a kind of structural schematic diagram of network access times computing device in embodiment of the present invention.It should
Device 40 includes:Recording unit 41, statistic unit 42 and access updating unit 43.
The recording unit 41 receives accessing page request for responding, and shows the content of pages, and records accessed
Page ID.
The statistic unit 42 is for obtaining the page ID that the recording unit records within a preset period of time, to count identical
The page ID quantity.
The access updating unit 43 is used for the page ID identical to quantity, updates the page simultaneously according to the quantity
The access times in face.
In the present embodiment, described device 40 further includes storage unit 44, the page that the recording unit 41 will be accessed
Face ID is recorded in the storage unit 44.Further, which is caching, can also be and is visited for preserving network
Ask the memory of daily record.
Please refer to Fig. 5, which includes:
Acquisition module 410, for obtaining the page ID recorded within a preset period of time;
The quantity of sorting module 411, the page ID for being got according to the acquisition module 410 is ranked up;
And
First computing module 412, for counting the identical page ID according to the ranking results of the sorting module 411
Quantity.
Please refer to Fig. 6, which includes:
Second computing module 430, for the identical page ID of quantity quantification according to each page ID;
Update module 431, for according to second computing module 430 determine as a result, the page identical to quantity
Face ID updates access times simultaneously according to the quantity.
The network access times computational methods and device provided in embodiment of the present invention, by caching a period of time in advance
Interior accessed page ID, and the quantity for being accessed page ID is counted, it then will click on the identical page ID of quantity and be classified as one kind,
To be updated simultaneously to the access times of these page IDs, the newer frequency of access times is significantly reduced with this, is saved
Resource.
Mode the above is only the implementation of the present invention is not intended to limit the scope of the invention, every to utilize this
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is relevant to be applied directly or indirectly in other
Technical field is included within the scope of the present invention.
Claims (10)
1. a kind of network access times computational methods, which is characterized in that the method includes:
Response receives accessing page request, shows the content of pages, and record accessed page ID;
The page ID recorded within a preset period of time is obtained, to count the quantity of the identical page ID;And
The page ID identical to quantity updates the access times of the page according to the quantity simultaneously.
2. network access times computational methods according to claim 1, which is characterized in that acquisition is remembered within a preset period of time
The page ID of record, to count the quantity of the identical page ID, specially:
Obtain the page ID recorded within a preset period of time;
It is ranked up according to the quantity of the page ID;And
Count the quantity of the identical page ID.
3. network access times computational methods according to claim 1, which is characterized in that the page identical to quantity
ID updates the access times of the page according to the quantity, specially simultaneously:
According to the identical page ID of the quantity quantification of each page ID;
The page ID identical to quantity updates access times simultaneously according to the quantity.
4. network access times computational methods according to claim 1, which is characterized in that response, which receives page access, asks
It asks, shows the content of pages, and record accessed page ID, specially:Response receives accessing page request, shows institute
Content of pages is stated, and accessed page ID is recorded in caching or network access log.
5. network access times computational methods according to claim 4, which is characterized in that acquisition is remembered within a preset period of time
The page ID of record, to count the quantity of the identical page ID, specially:It is obtained from the caching or network access log
The page ID recorded within a preset period of time, to count the quantity of the identical page ID.
6. the network access times computational methods according to claim 1-5 any one, which is characterized in that the page ID
For resource ID, article ID or product IDs.
7. a kind of network access times computing device, which is characterized in that described device includes:
Recording unit receives accessing page request for responding, and shows the content of pages, and record the accessed page
ID;
Statistic unit, the page ID recorded within a preset period of time for obtaining the recording unit, to count identical described
The quantity of page ID;And
Updating unit is accessed, the page ID identical to quantity is used for, updates the visit of the page simultaneously according to the quantity
Ask number.
8. network access times computing device according to claim 7, which is characterized in that the recording unit includes:
Acquisition module, for obtaining the page ID recorded within a preset period of time;
The quantity of sorting module, the page ID for being got according to the acquisition module is ranked up;And
First computing module, the quantity for counting the identical page ID according to the ranking results of the sorting module.
9. network access times computing device according to claim 7, which is characterized in that the access updating unit packet
It includes:
Second computing module, for the identical page ID of quantity quantification according to each page ID;
Update module, for according to second computing module determine as a result, the page ID identical to quantity, according to institute
It states quantity while updating access times.
10. network access times computing device according to claim 7, which is characterized in that described device further includes storage
Unit;Accessed page ID is recorded in the storage unit by the recording unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810239625.1A CN108763239A (en) | 2018-03-22 | 2018-03-22 | A kind of network access times computational methods and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810239625.1A CN108763239A (en) | 2018-03-22 | 2018-03-22 | A kind of network access times computational methods and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108763239A true CN108763239A (en) | 2018-11-06 |
Family
ID=63980606
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810239625.1A Pending CN108763239A (en) | 2018-03-22 | 2018-03-22 | A kind of network access times computational methods and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108763239A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101163045A (en) * | 2007-11-16 | 2008-04-16 | 北京金山软件有限公司 | Method and system of statistical web page access data |
CN101192989A (en) * | 2006-12-01 | 2008-06-04 | 阿里巴巴公司 | A method and device for updating webpage click number |
CN104461384A (en) * | 2014-11-28 | 2015-03-25 | 华为技术有限公司 | Data write-in method and storage device |
CN104462127A (en) * | 2013-09-22 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Recorded data updating method and device |
CN107749898A (en) * | 2017-08-24 | 2018-03-02 | 深圳市大讯永新科技有限公司 | DNS accesses data and sorted out and Intranet access accounting raising method, system |
-
2018
- 2018-03-22 CN CN201810239625.1A patent/CN108763239A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192989A (en) * | 2006-12-01 | 2008-06-04 | 阿里巴巴公司 | A method and device for updating webpage click number |
CN101163045A (en) * | 2007-11-16 | 2008-04-16 | 北京金山软件有限公司 | Method and system of statistical web page access data |
CN104462127A (en) * | 2013-09-22 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Recorded data updating method and device |
CN104461384A (en) * | 2014-11-28 | 2015-03-25 | 华为技术有限公司 | Data write-in method and storage device |
CN107749898A (en) * | 2017-08-24 | 2018-03-02 | 深圳市大讯永新科技有限公司 | DNS accesses data and sorted out and Intranet access accounting raising method, system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105550338B (en) | A kind of mobile Web cache optimization method based on HTML5 application cache | |
CN102354315B (en) | Generation method of site navigation page and device thereof | |
US8527585B2 (en) | Prereading method and system for web browser | |
US9405746B2 (en) | User behavior models based on source domain | |
CN102985921B (en) | There is the client terminal device high speed caching electronic document resources of e-sourcing data base | |
US6748491B2 (en) | Designing a cache using an LRU-LFU array | |
CN108363815A (en) | A kind of pre-reading method of Webpage, device and intelligent terminal | |
US20110093461A1 (en) | Extensible Custom Variables for Tracking User Traffic | |
US20150213484A1 (en) | System and method for tracking related events | |
CN105095423B (en) | Enumeration data wiring method and device | |
CN103530339A (en) | Mobile application information push method and device | |
CN108268622A (en) | Method and device for returning page and computer readable storage medium | |
CN103970753A (en) | Pushing method and pushing device for related knowledge | |
CN102222098A (en) | Method and system for pre-fetching webpage | |
CN107343031A (en) | A kind of method, apparatus for automatically updating file, electronic equipment and storage medium | |
CN108197338B (en) | Browser bookmark generation method and system and terminal device | |
CN107291940A (en) | Content of pages management method, device and associated server | |
CN102769818A (en) | Method and device for pushing information in mobile internet | |
CN102663049A (en) | Method and device for updating search engine web address library | |
CN107239537A (en) | A kind of method of document display, device, electronic equipment and readable storage medium storing program for executing | |
CN101188521B (en) | A method for digging user behavior data and website server | |
CN107315753B (en) | Paging method and device across multiple databases | |
Hoque et al. | Disk layout techniques for online social network data | |
CN107239542A (en) | A kind of data statistical approach, device, server and storage medium | |
CN104202418A (en) | Method and system for recommending commercial content distribution network for content provider |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |