CN104573035B - News information acquisition methods and system - Google Patents

News information acquisition methods and system Download PDF

Info

Publication number
CN104573035B
CN104573035B CN201510021210.3A CN201510021210A CN104573035B CN 104573035 B CN104573035 B CN 104573035B CN 201510021210 A CN201510021210 A CN 201510021210A CN 104573035 B CN104573035 B CN 104573035B
Authority
CN
China
Prior art keywords
paging
version number
news
parameter
information list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510021210.3A
Other languages
Chinese (zh)
Other versions
CN104573035A (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.)
Hangzhou Xizhao Technology Co Ltd
Original Assignee
Hangzhou Xizhao Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Xizhao Technology Co Ltd filed Critical Hangzhou Xizhao Technology Co Ltd
Priority to CN201510021210.3A priority Critical patent/CN104573035B/en
Publication of CN104573035A publication Critical patent/CN104573035A/en
Application granted granted Critical
Publication of CN104573035B publication Critical patent/CN104573035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of buffer service method and device, news information acquisition methods and system, and wherein buffer service method includes: that the data content of the information list is read from database, generates and carries the paging of paging label and version number's parameter and cache;Establish the Cache associativity relationship that paging label, version number's parameter and the paged data content three of the corresponding same paging page are constituted;When the information list content in server updates, read the data content of updated information list, upgrade version number's parameter corresponding to all paging pages, the Cache associativity relationship that the version number's parameter and updated paged data content three after establishing the paging label of the corresponding same paging page, upgrading are constituted;Receive terminal transmission be directed to the paging page of information list read requests when, pass through Cache associativity relationship, according to paging label and last time upgrade after version number's parameter, search simultaneously to terminal push described in paged data content.

Description

News information acquisition methods and system
Technical field
The present invention relates to computer communication field more particularly to the mobile Internet communications fields.
Background technique
With the development of internet technology, this news information acquisition modes have saved the rings such as traditional media publication distribution Section, and also relieve the limitation of traditionally on paper or TV media news information capacity etc..But this news information obtains Mode is taken also to bring new problem, although user can touch the more wide variety of news information in source, news letter Breath itself has very strong regional Characteristics, and the method for lacking comparatively perfect in the prior art is supported based on the new of geographical location Information inquiry is heard, the quick news information for obtaining the media event that periphery occurs of user is supported, when so that user being difficult to first Between obtain periphery media event news information, and track understanding media event.
And for that would generally be shown in the terminal in the form of information list as the biggish information of this kind of data volume of news information Show.Since terminal display area and network transmission limit, the method for generalling use paging query is shown by paging mode and is believed List is ceased, user can choose specific paging type, and user can be different by switching the Range Access of specific page Paging.
Simultaneously to improve information reading speed, caching system can be set up between terminal and server end, read great Rong It the use of caching system is directly terminal service when measuring information list data, it is possible to reduce the data interaction of terminal and server end, To greatly improve information reading speed.But it is directed in the above-mentioned system for needing to show information list using paging mode, frame Structure caching system can generate following technical problem: if constructing paging caching in caching system, user is cutting in first time user When changing page browsing, terminal directly access cache system can read the paging caching of the page, therefore can greatly improve User switches the rate that each paging accesses.Information list is updated in server end and (adds, modify or deletes and believe Cease the content of list) when, paging caching is also required to carry out updating operation accordingly, but same information list is existed simultaneously A variety of different paging types (including the customized paging type of certain customers), every time for more new capital of information list content Influence whether certain pagings caching in different paging types, and the diversity of paging type causes this update specifically to influence Which paging caching is difficult to judge, it is difficult to position and delete the influenced paging caching of this update, lead to paging cache maintenance It is difficult, it is difficult to ensure user is that read is newest paged data content in switching page access.Therefore, in the prior art Solution is to carry out paging processing to the database of server end, and which is simple and convenient easy to accomplish, but also limits The overall performance of access speed and system when user switches the different pages.
Summary of the invention
The present invention is to overcome intelligent terminal news acquisition methods in the prior art, and user is difficult to obtain the new of periphery The defect of information, and the deficiency of the data cached cache maintenance difficulty as back-office support are heard, providing one kind can believe When ceasing list content and updating, safeguard that buffer service method that the paged data content of information list accurately updates and one kind make It is the news information acquisition side that user filters out periphery news information with the geographical location based on user of the buffer service method Method and system.
To achieve the above object, the invention adopts the following technical scheme:
The present invention provides a kind of buffer service method, this method comprises:
Receive terminal transmission for information list read requests when, the number of the information list is read from database According to content, the paging caching for carrying paging label and version number's parameter is generated;Establish the paging mark of the corresponding same paging page The Cache associativity relationship that note, version number's parameter and paged data content three are constituted;
When the information list content in server updates, the data content of updated information list is read, is risen Version number's parameter corresponding to all paging pages of grade, the version after establishing the paging label of the corresponding same paging page, upgrading The Cache associativity relationship that number parameter and updated paged data content three are constituted;
Receive terminal transmission for the paging page of information list read requests when, by Cache associativity relationship, Version number's parameter after being upgraded according to paging label and last time finds the updated paged data content of last time, The paged data content described to terminal push.
By above technical scheme, when for the first time using a kind of paging type browsing information list, caching system is user Information list content is read, paging label and paged data content are generated according to current paging type, by establishing paging mark Note, the Cache associativity relationship of version number's parameter and paged data content.The system of obtaining can be marked according to paging and version number's parameter Position paged data content.User browses the information list or access when changing the different pages of information list again, all can be from Paged data content is directly read in caching system, to guarantee access speed.Server end to the information list content into When row updates, caching system reads updated information list data, carries out paging according to current paging type.Simultaneously to version The value of number parameter does upgrading processing, and is associated with the slow of the version number after paging label, upgrading and updated paged data content Deposit mapping.When being switched to a certain page access, version number's parameter after marking and be incremented by according to paging positions to be read user in this way Newest paged data content is got, and paging caching before then fails.Above technical scheme can in caching system structure It builds paging caching and guarantees that user's using terminal obtains the reading speed of information list, while when information list content updates, Old paged data content can all fail, and avoid and need to judge what update was influenced when each information list content updates A series of cumbersome work such as paged data content.
Preferably, the step of version number's parameter corresponding to all paging pages of upgrading, further comprise: to institute There is the value of the corresponding version number's parameter of the paging page to do incremental processing.
Preferably, the updated paged data content of last time is found, the paged data described to terminal push Further comprise after content: by Cache associativity relationship, the version number before being upgraded according to paging label and last time is joined Number is searched and deletes the paged data content before last time updates.
Preferably, described find the updated paged data content of last time, the paging described to terminal push The step of data content further comprises: whether single the data cached of data entries deposits in the current paging page of circulation searching If the data cached presence of single data entries, pushes the data cached of the single data entries to terminal, if single information The data cached of entry is not present, and the data and caching of the single data entries are read from database.
The present invention provides a kind of buffer service device, comprising:
Storage element is stored for the paging caching to information list;
Version number control unit, for when the information list content in server updates, to version number's parameter into Row upgrading;
Version number's recording unit, after storing version number control unit to the progress last time upgrading of version number's parameter The value of version number's parameter;
Associative cell, for establishing paging label, version number's parameter and the paged data content of the corresponding same paging page The Cache associativity relationship that three is constituted, and when the information list content in server updates, it establishes same point corresponding Page the page paging label, upgrading after version number's parameter and updated paged data content three constitute Cache associativity close System;
Push unit, the Cache associativity relationship for being established by associative cell, according to paging label and version number's parameter, Find paged data content.
Preferably, the version number control unit is further used for occurring more when the information list content in server When new, incremental processing is done to the value of version number's parameter.
Preferably, further include: comparing unit, the value of several version number's parameters for same paging label will to be associated with It is compared with the value of the version number's parameter stored in recording unit, determines version number's parameter before last time upgrades;
Monitoring unit upgrades it according to the last time that paging label and comparing unit determine by Cache associativity relationship Preceding version number's parameter searches and deletes the paged data content before last time updates.
Preferably, the push unit includes: screening unit, belong to the single of the current paging page for filtering out Data entries;
Whether searching unit, the data cached of single data entries filtered out for circulation searching screening unit deposit If the data cached presence of single data entries, pushes the data cached of the single data entries to terminal, if single information The data cached of entry is not present, and the data and caching of the single data entries are read from database.
The present invention provides a kind of news information acquisition methods, comprising:
The headline of certain media event and the news information list comprising news information are created in news database, are associated with The correspondence incidence relation of the affiliated longitude and latitude of headline and media event of media event, be associated with media event headline and The incidence relation of news information list;
The longitude and latitude of user geographic location is read in positioning, and is existed according to the longitude and latitude for reading user geographic location It is identified on electronic map and reads user geographic location;
It is inquired in news database in the longitude and latitude section determined based on the longitude and latitude for reading user geographic location Headline, caching system reads and generates the data cached of the headline of query result, and terminal reads query result The longitude and latitude of headline, and the corresponding geographical location of headline is identified on the electronic map;
Terminal receives the headline reading instruction for reading user, and the headline is read instruction and referred to, reads use Click mark corresponding to the headline on electronic map in family;
It is read and is instructed according to headline, terminal reads the data cached of headline and shows the headline;
Terminal receives the corresponding news information list reading instruction of headline for reading user, the headline pair The news information list answered is read instruction and is referred to, the headline that user clicks display is read;
Instruction is read according to the corresponding news information list of headline, caching system reads and generates corresponding news letter The paging caching of list is ceased, terminal reads the paging caching of the corresponding news information list of news label from caching system, and divides Page shows the news information list.
A kind of news information of the invention obtains system, comprising:
News database is suitable for storage news information table data and the corresponding longitude and latitude of news label;
Caching system, for managing the data cached of news information list;
Longitude and latitude module, suitable for obtaining the longitude and latitude of media event;
Enquiry module, suitable for inquiring the news label in longitude and latitude section;
Locating module: suitable for positioning the longitude and latitude for reading user location;
Interactive module is suitable for obtaining the list of server news information and corresponding longitude and latitude, and will read user's longitude and latitude It is transmitted to server;
Command reception module is suitable for receiving and reads user's news information list reading instruction;
Longitude and latitude integrates module, suitable for news label and reading user location are integrated into electronic map by longitude and latitude;
Display module, suitable for showing the longitude and latitude of the news label of integration and reading user location on the electronic map.
News information acquisition methods provided by the invention and system, by the warp of news information and headline and media event Latitude is associated, cooperates and positions to the longitude and latitude for reading user, and the news of media event in its vicinity occurs for user query Information and headline, so that easy-to-read user recognizes the information closely related with daily life occurred on its periphery.
Detailed description of the invention
Fig. 1 is the flow chart for the buffer service method that the embodiment of the present invention one provides.
Fig. 2 is the flow chart of buffer service method provided by Embodiment 2 of the present invention.
Fig. 3 is the flow chart for the buffer service method that the embodiment of the present invention three provides.
Fig. 4 is the flow chart of paged data content push of the present invention.
Fig. 5 is the schematic diagram for the buffer service device that the embodiment of the present invention four provides.
Fig. 6 is the flow chart for the information acquisition method that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described further with specific embodiment with reference to the accompanying drawings of the specification.
Embodiment one: the present embodiment provides a kind of buffer service methods, as shown in Figure 1, which comprises
101 when receiving the read requests for being directed to information list of terminal transmission, from the database reading information list Data content, generate carry paging label and version number's parameter paging cache;Establish point of the corresponding same paging page The Cache associativity relationship that page marker, version number's parameter and paged data content three are constituted;
102, when the information list content in server updates, read the data content of updated information list, Upgrade version number's parameter corresponding to all paging pages, the version after establishing the paging label of the corresponding same paging page, upgrading The Cache associativity relationship that this number parameter and updated paged data content three are constituted;
103 receive terminal transmission for the paging page of information list read requests when, closed by Cache associativity System, version number's parameter after being upgraded according to paging label and last time, finds in the updated paged data of last time Hold, the paged data content described to terminal push.
By above technical scheme, when for the first time using a kind of paging type browsing information list, caching system is user Information list content is read, paging label and paged data content are generated according to current paging type, by establishing paging mark Note, the Cache associativity relationship of version number's parameter and paged data content.The system of obtaining can be marked according to paging and version number's parameter Position paged data content.User browses the information list or access when changing the different pages of information list again, all can be from Paged data content is directly read in caching system, to guarantee access speed.Server end to the information list content into When row updates, caching system reads updated information list data, carries out paging according to current paging type.Simultaneously to version The value of number parameter does upgrading processing, and is associated with the slow of the version number after paging label, upgrading and updated paged data content Deposit mapping.When being switched to a certain page access, version number's parameter after marking and be incremented by according to paging positions to be read user in this way Newest paged data content is got, and paging caching before then fails.Above technical scheme can in caching system structure It builds paging caching and guarantees that user's using terminal obtains the reading speed of information list, while when information list content updates, Old paged data content can all fail, and avoid and need to judge what update was influenced when each information list content updates A series of cumbersome work such as paged data content.
Embodiment two: as shown in Fig. 2, the present embodiment provides a kind of buffer service methods, comprising:
201 when receiving the read requests for being directed to information list of terminal transmission, from the database reading information list Data content, and generate paging caching according to the selected paging type of user.
The paging of 202 default each paging pages of corresponding informance list caches name, presets each paging page of corresponding informance list Version number's parameter, version number's parameter of each paging of corresponding informance list is mutually indepedent.
203 pagings cache naming mechanism and increase version number's parameter as suffix.
In existing caching system, it is to be marked using paging caching name as paging, corresponds to same point in paging caching The paging caching name and paged data content of the page page are with the relationship of " key-value ".System caches name by paging and looks into It finds paged data content and is read out equal sequence of operations.
The slow naming mechanism of paging increases version number's parameter as suffix, can establish the paging of the corresponding same paging page The Cache associativity relationship of slow name, version number's parameter and paged data content.
By taking a news information list as an example, the paging caching naming mechanism for increasing version number's parameter as suffix be can be Form as wzxc_newslist_pN_vM (prefix _ news list _ paging code _ version number), wherein the value of N be 1,2 ... N; The value of M be 1,2 ... M, using the paging caching naming mechanism paging caching name be then wzxc_newslist_p1_v1, Wzxc_newslist_p2_v2 etc..
204, when the data content of the information list in server updates, read the number of updated information list According to content, incremental processing is done to version number's parameter corresponding to all pagings.
The incremental processing refers to that the numerical value to version number's parameter does+1 and is incremented by processing, and paging caches entitled wzxc_ The paging of newslist_p1_v1 caches, after primary update occurs for information list data content, the numerical value of version number's parameter does+ After 1 is incremented by processing, new paging caches entitled wzxc_newslist_p1_v2, caching name and updated this page of paging Data content association caching mapping is read in this way with the caching name of wzxc_newslist_p1_v2 data cached for more Paged data content after new.Similarly it is incremented by processing and is also possible to+2 or+3 or other incremental processing modes, this is this technology neck Details are not described herein for the customary means in domain.
205 when receiving the read requests for a certain paging page of information list, is had according to the generation of the corresponding paging The paging that last time is incremented by treated version number's parameter suffix caches name, finds the updated paged data of last time Content, the paged data content described to terminal push.
In each data cached update, version number's parameter carries out being incremented by processing, so that paging caching name changes, and So that former paging caching is become invalid cache, this ensures that read every time it is data cached be all newest.This method is not necessarily to Data cached which paging specifically influenced judged, therefore is easier to realize.And it is cached again compared to all pagings are directly deleted The method for generating paging caching, this method cache maintenance are more convenient not easy to make mistakes.After former paging caching becomes invalid cache, meeting According to being automatically deleted after the expired time of caching system.
As shown in figure 4, the process for pushing paged data content in the present embodiment includes:
Maintenance list is preset in 401 caching systems, for storing the single Information ID in information list.
402 when receiving the reading order for a certain paged content of information list, and first inquiry maintenance list caching is No presence reads if maintenance column table cache is not present and generates maintenance column table cache.
If 403 maintenance column table caches it is existing or generate maintenance column table cache after, filter out the single letter for belonging to the paging Cease ID.
The caching of the corresponding single information of the single Information ID of each of the paging described in 404 cyclic queries whether there is, if The caching of the single corresponding single information of Information ID is not present, and reads the corresponding single information content of the single Information ID, generates The caching of the corresponding single information of the Information ID, and it is data cached to push this;If the corresponding single information of single Information ID is slow Exist, then pushes the data cached of the corresponding single information of the single Information ID.
This method, the buffer service side provided as the present embodiment are used in the paging caching for reading information list Method advanced optimizes.The paged data content segmentation of information list is the caching number of single information with smaller capacity by this method According to, so that the single information is affected only for the update of single information from the background, cache storage can be greatly reduced in this way The capacity of content, significantly improves reading speed.When to reduce each buffer update, individual data terminal and cache server Between volume of transmitted data, therefore delay caused by concurrent amount of access increases can be significantly reduced.
Embodiment three: as shown in figure 3, the present embodiment provides a kind of buffer service methods, comprising:
301 when receiving the read requests for being directed to information list of terminal transmission, from the database reading information list Data content, and generate paging caching according to the selected paging type of user.
The paging of 302 default each pagings of corresponding informance list caches name, presets the version number of each paging of corresponding informance list Version number's parameter of parameter, each paging of corresponding informance list is mutually indepedent.
By taking a news information list as an example, paging caching naming mechanism is wzxc_newslist_pN (prefix _ news column Table _ paging code), form as N that the value of N is 1,2 ....
The form of 303 paged data contents is set as by the two-dimensional array of version number's parameter and paged data Composition of contents: The form of array (version number's parameter, paged data content).
By taking a news information list as an example, the paged data content stored in the form of described be can be, in corresponding first page The paged data content that the paging of appearance caches entitled wzxc_newslist_pN (prefix _ news list _ paging code) is array (M, paged data content), wherein the value of N be 1,2 ... N;The value of M is 1,2 ... M.
304 default version number's records, for storing current version number value;It is described to version number corresponding to all pagings Parameter, which is done, to be incremented by processing and refers to, does incremental processing to the version number value in version number's record, and the version number that will be incremented by that treated Value is assigned to version number's parameter corresponding to all pagings.
The incremental processing refers to that the numerical value to version number's parameter does+1 and is incremented by processing.It is with a news information list Example, when reading information list for the first time, the version number value stored in version number's record is 1, the paging caching of corresponding first page content Entitled wzxc_newslist_p1, corresponding paging caching is array (1, paged data content), in the news information list number After primary update occurs according to content, after the numerical value of version number's parameter does+1 incremental processing, the version number of storage in version number's record Value is 2, paging cache the corresponding paging caching of entitled wzxc_newslist_p1 be array (2, new paged data content) or Array (1, old paged data content) is similarly incremented by processing and is also possible to+2 or+3 or other incremental processing modes, this is this Details are not described herein for the customary means of technical field.
305 when receiving the reading order for a certain paged content of information list, and paging caching name is corresponding Version number value in array (version number's parameter, paged data content) in version number's parameter and version number's record is compared, and is read Point in the array (version number's parameter, paged data content) for the version number value for taking version number's parameter to be equal in version number's record Page data content, and delete array (version number parameter, paging of version number's parameter less than the version number value in version number's record Data content).
After news information list updates, when user reads again the content of first page, according in corresponding first page The paging of appearance caches entitled wzxc_newslist_p1, and inquiring corresponding paging caching is array (2, paged data content) Or array (1, paged data content), the version number value stored in version number's record at this time is 2, and reading array (2, paging number According to content) in paged data content, and delete array (1, paged data content).
Not only can guarantee in this way read every time it is data cached all to be newest, but also compared to the method implemented in one, energy It is enough to delete former paging caching, avoid the former paging caching as Trash cache from occupying excessive space.This method is slow without judgement Which paging that deposit data specifically influences, therefore be easier to realize.And it is regenerated point compared to all pagings caching is directly deleted The method of caching of page, this method cache maintenance is more convenient, not easy to make mistakes.
As shown in figure 4, the process for pushing paged data content in the present embodiment includes:
Maintenance list is preset in 401 caching systems, for storing the single Information ID in information list.
402 when receiving the reading order for a certain paged content of information list, and first inquiry maintenance list caching is No presence reads if maintenance column table cache is not present and generates maintenance column table cache.
If 403 maintenance column table caches it is existing or generate maintenance column table cache after, filter out the single letter for belonging to the paging Cease ID.
The caching of the corresponding single information of the single Information ID of each of the paging described in 404 cyclic queries whether there is, if The caching of the single corresponding single information of Information ID is not present, and reads the corresponding single information content of the single Information ID, generates The caching of the corresponding single information of the Information ID, and it is data cached to push this;If the corresponding single information of single Information ID is slow Exist, then pushes the data cached of the corresponding single information of the single Information ID.
This method, the buffer service side provided as the present embodiment are used in the paging caching for reading information list Method advanced optimizes.The paged data content segmentation of information list is the caching number of single information with smaller capacity by this method According to, so that the single information is affected only for the update of single information from the background, cache storage can be greatly reduced in this way The capacity of content, significantly improves reading speed.When to reduce each buffer update, individual data terminal and cache server Between volume of transmitted data, therefore delay caused by concurrent amount of access increases can be significantly reduced.
Example IV: as shown in figure 5, the present invention provides a kind of buffer service device, comprising:
Storage element 501 is stored for the paging caching to information list;
Version number control unit 502, for when the information list content in server updates, to version number's parameter Value make be incremented by processing;
Version number's recording unit 503 carries out last time upgrading to version number's parameter for storing version number control unit The value of version number's parameter afterwards;
Associative cell 504, for establishing in paging label, version number's parameter and the paged data of the corresponding same paging page Hold the Cache associativity relationship that three is constituted, and when the information list content in server updates, it is same to establish correspondence The paging page paging label, upgrading after version number's parameter and updated paged data content three constitute Cache associativity Relationship;
Push unit 505, the Cache associativity relationship for being established by associative cell are joined according to paging label and version number Number, finds paged data content.
The push unit 505 further comprises:
Screening unit 5051, for filtering out the single data entries for belonging to the current paging page;
Searching unit 5052, the single data entries filtered out for circulation searching screening unit it is data cached whether In the presence of if the data cached presence of single data entries, pushes the data cached of the single data entries to terminal, if single letter Breath the data cached of entry is not present, and the data and caching of the single data entries are read from database.
Comparing unit 506, for that will be associated in the value and recording unit for several version number's parameters that same paging marks The value of version number's parameter of storage is compared, and determines version number's parameter before last time upgrades;
Monitoring unit 507 is upgraded by Cache associativity relationship according to the last time that paging label and comparing unit determine Version number's parameter before searches and deletes the paged data content before last time updates.
Embodiment five: as shown in fig. 6, the present embodiment provides a kind of news information acquisition methods, comprising:
The headline of certain media event and the news information list comprising news information are created in 601 news databases, It is associated with the headline of media event and the correspondence incidence relation of the affiliated longitude and latitude of media event, is associated with the news mark of media event The incidence relation of topic and news information list;
The longitude and latitude of user geographic location is read in 602 positioning, and according to the longitude and latitude for reading user geographic location Degree identifies on the electronic map reads user geographic location;
603 inquire the longitude and latitude section determined based on the longitude and latitude for reading user geographic location in news database Interior headline, caching system read and generate the data cached of the headline of query result, and terminal reads query result Headline longitude and latitude, and identify the corresponding geographical location of headline on the electronic map;
604 terminals receive the headline reading instruction for reading user, and the headline is read instruction and referred to, reads User clicks mark corresponding to the headline on electronic map;
605 read instruction according to headline, and terminal reads the data cached of headline and shows the headline;
606 terminals receive the corresponding news information list reading instruction of headline for reading user, the news mark It inscribes corresponding news information list and reads to instruct and refer to, read the headline that user clicks display;
607 read instruction according to the corresponding news information list of headline, and caching system reads and generates corresponding new The paging caching of information list is heard, terminal reads the paging caching of the corresponding news information list of news label from caching system, And the Pagination Display news information list.
In the present embodiment in news information acquisition methods, caching system uses embodiment one or embodiment two or embodiment three The paging caching of the buffer service method maintenance news information list of offer, and push paged data content.
News information acquisition methods provided by the invention and system, by the warp of news information and headline and media event Latitude is associated, cooperates and positions to the longitude and latitude for reading user, and the news of media event in its vicinity occurs for user query Information and headline, so that easy-to-read user recognizes the information closely related with daily life occurred on its periphery. Buffer service method described in the embodiment of the present invention one or embodiment two has been used simultaneously, can effectively ensure that information reads speed Degree, and can effectively be controlled when concurrent amount of access increases and read delay time, guarantee use when largely concurrently accessing Family experience, especially suitable for the media event for being applied to paroxysmal media event or needing persistently to track.
Embodiment six: the present embodiment provides a kind of news informations to obtain system, comprising: it is new to be suitable for storage for news database Hear information list data and the corresponding longitude and latitude of news label;Caching system is suitable for use in and reads and generate from news database News information list it is data cached;Longitude and latitude module, suitable for obtaining the longitude and latitude of media event;Enquiry module is suitable for inquiry News label in longitude and latitude section;Locating module: suitable for positioning the longitude and latitude for reading user location;Interactive module is suitable for The list of server news information and corresponding longitude and latitude are obtained, and is transmitted to server for user's longitude and latitude is read;Command reception Module is suitable for receiving and reads user's news information list reading instruction;Longitude and latitude integrates module, is suitable for news label and reading User location is integrated into electronic map by longitude and latitude;Display module suitable for the news label that will be integrated and reads user location Longitude and latitude is shown on the electronic map.
In the present embodiment in news information acquisition methods, caching system uses embodiment one or embodiment two or embodiment three The paging caching of the buffer service method maintenance news information list of offer, and push paged data content.
News information provided in this embodiment obtains system, by the longitude and latitude of news information and headline and media event It is associated, cooperate and the longitude and latitude for reading user is positioned, the news information of media event in its vicinity occurs for user query And headline, so that easy-to-read user recognizes the information closely related with daily life occurred on its periphery, and It can allow for reading user to give more sustained attention interested media event, obtain the most news information of the media event.
Those of ordinary skill in the art will appreciate that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, described program can store in computer-readable medium.

Claims (3)

1. a kind of news information acquisition methods, characterized in that include:
The headline of certain media event and the news information list comprising news information are created in news database, are associated with news The correspondence incidence relation of the affiliated longitude and latitude of headline and media event of event, is associated with the headline and news of media event The incidence relation of information list;
The longitude and latitude of user geographic location is read in positioning, and according to the longitude and latitude of reading user geographic location in electronics It is identified on map and reads user geographic location;
It is inquired in news database new in the longitude and latitude section determined based on the longitude and latitude for reading user geographic location Title is heard, caching system reads and generate the data cached of the headline of query result, and terminal reads the news of query result The longitude and latitude of title, and the corresponding geographical location of headline is identified on the electronic map;Terminal, which receives, reads the new of user Title reading instruction is heard, the headline is read instruction and referred to, the headline institute on user's click electronic map is read Corresponding mark;
It is read and is instructed according to headline, terminal reads the data cached of headline and shows the headline;Terminal receives Instruction, the corresponding news information list of the headline are read in the corresponding news information list of headline for reading user It reads instruction to refer to, reads the headline that user clicks display;
Instruction is read according to the corresponding news information list of headline, caching system reads and generates corresponding news information column The paging of table caches, and terminal reads the paging caching of the corresponding news information list of news label from caching system, and paging is aobvious Show the news information list;
The caching system reads and includes: the step of generating the paging caching of corresponding news information list
Receive terminal transmission for information list read requests when, out of, database reads the information list data Hold, generates the paging caching for carrying paging label and version number's parameter;Establish paging label, the version of the corresponding same paging page The Cache associativity relationship that this number parameter and paged data content three are constituted;
When the information list content in server updates, the data content of updated information list is read, upgrades institute There is version number's parameter corresponding to the paging page, version number's ginseng after establishing the paging label of the corresponding same paging page, upgrading The Cache associativity relationship that several and updated paged data content three is constituted;Wherein, all paging page institutes of the upgrading are right The step of version number's parameter answered, further comprise: incremental processing is done to the value of the corresponding version number's parameter of all paging pages;
Receive terminal transmission for the paging page of information list read requests when, by Cache associativity relationship, according to Version number's parameter after paging label and last time upgrading, finds the updated paged data content of last time, to end The end push paged data content;Wherein, paging label, version number's parameter and the paging of the corresponding same paging page are established The Cache associativity relationship that data content three is constituted specifically:
Receive terminal transmission for information list read requests when, out of, database reads the information list data Hold, and generates paging caching according to the selected paging type of user;
The paging of default each paging of corresponding informance list caches name, presets version number's parameter of each paging of corresponding informance list, right Answer version number's parameter of each paging of information list mutually indepedent;
The form of paged data content is set as by the two-dimensional array of version number's parameter and paged data Composition of contents: array (version This number parameter, paged data content) form;
Default version number's record, for storing current version number value;Described does version number's parameter corresponding to all pagings Incremental processing refers to, does incremental processing to the version number value in version number's record, and the version number value assignment that will be incremented by that treated To version number's parameter corresponding to all pagings;
When receiving the reading order for a certain paged content of information list, by the corresponding array (version of paging caching name This number parameter, paged data content) in version number's parameter and version number record in version number value be compared, read version number Parameter is equal in the paged data in the array (version number's parameter, paged data content) of the version number value in version number's record Hold, and deletes array (version number parameter, paged data in of version number's parameter less than the version number value in version number's record Hold).
2. news information acquisition methods according to claim 1, characterized in that the step of pushing the paged data content Include:
Maintenance list is preset in caching system, for storing the single Information ID in information list;
When receiving the reading order for a certain paged content of information list, first inquiry maintenance list caching whether there is, If maintenance column table cache is not present, reads and generate maintenance column table cache;
If maintenance column table cache it is existing or generate maintenance column table cache after, filter out the single Information ID for belonging to the paging;
The caching of the corresponding single information of the single Information ID of each of paging described in cyclic query whether there is, if single information The caching of the corresponding single information of ID is not present, and reads the corresponding single information content of the single Information ID, generates the Information ID The caching of corresponding single information, and it is data cached to push this;If the caching of the corresponding single information of single Information ID exists, Push the data cached of the corresponding single information of the single Information ID.
3. a kind of news information using news information acquisition methods described in as claimed in claim 1 or 22 obtains system, characterized in that Include:
News database is suitable for storage news information table data and the corresponding longitude and latitude of news label;
Caching system, for managing the data cached of news information list;
Longitude and latitude module, suitable for obtaining the longitude and latitude of media event;
Enquiry module, suitable for inquiring the news label in longitude and latitude section;
Locating module: suitable for positioning the longitude and latitude for reading user location;
Interactive module is suitable for obtaining the list of server news information and corresponding longitude and latitude, and will read the transmission of user's longitude and latitude To server;
Command reception module is suitable for receiving and reads user's news information list reading instruction;
Longitude and latitude integrates module, suitable for news label and reading user location are integrated into electronic map by longitude and latitude;
Display module, suitable for showing the longitude and latitude of the news label of integration and reading user location on the electronic map.
CN201510021210.3A 2015-01-16 2015-01-16 News information acquisition methods and system Active CN104573035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510021210.3A CN104573035B (en) 2015-01-16 2015-01-16 News information acquisition methods and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510021210.3A CN104573035B (en) 2015-01-16 2015-01-16 News information acquisition methods and system

Publications (2)

Publication Number Publication Date
CN104573035A CN104573035A (en) 2015-04-29
CN104573035B true CN104573035B (en) 2019-07-23

Family

ID=53089097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510021210.3A Active CN104573035B (en) 2015-01-16 2015-01-16 News information acquisition methods and system

Country Status (1)

Country Link
CN (1) CN104573035B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657193B (en) * 2015-11-02 2019-11-19 腾讯科技(深圳)有限公司 A kind of request processing method, device, terminal device and server
CN105843958A (en) * 2016-04-15 2016-08-10 北京思特奇信息技术股份有限公司 Cache-based server paging method and system
CN113158110B (en) * 2016-07-08 2024-06-25 创新先进技术有限公司 Data processing method and device
CN106940867B (en) * 2017-02-24 2020-11-20 深圳国泰安教育技术有限公司 Financial transaction method and device
CN106934057A (en) * 2017-03-22 2017-07-07 福建中金在线信息科技有限公司 A kind of data cached update method of paging and device
CN107317855B (en) * 2017-06-21 2020-09-08 上海志窗信息科技有限公司 Data caching method, data requesting method and server
CN107577775B (en) * 2017-09-08 2021-12-10 北京奇艺世纪科技有限公司 Data reading method and device, electronic equipment and readable storage medium
CN109684283B (en) * 2018-12-24 2022-03-29 国电南瑞科技股份有限公司 Local caching method, system and equipment for CIM/G file of mobile application
CN111523066B (en) * 2019-02-02 2023-06-30 阿里巴巴集团控股有限公司 Data acquisition method and device
CN110597859B (en) * 2019-09-06 2022-03-29 天津车之家数据信息技术有限公司 Method and device for querying data in pages
CN114722046A (en) * 2022-04-18 2022-07-08 聚好看科技股份有限公司 Server and home page cache data version generation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188605A (en) * 2011-12-30 2013-07-03 上海博泰悦臻电子设备制造有限公司 Field news interactive system
CN104123235A (en) * 2013-04-26 2014-10-29 国际商业机器公司 Device and method for visiting data recording stored in cache on server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8321389B2 (en) * 2009-01-08 2012-11-27 International Business Machines Corporation Method, apparatus and computer program product for maintaining file system client directory caches with parallel directory writes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188605A (en) * 2011-12-30 2013-07-03 上海博泰悦臻电子设备制造有限公司 Field news interactive system
CN104123235A (en) * 2013-04-26 2014-10-29 国际商业机器公司 Device and method for visiting data recording stored in cache on server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
用memcached做实时分页缓存;benlamk;《https://www.cnblogs.com/lben/archive/2012/10/26/2741695.html》;20121026;正文1-2页

Also Published As

Publication number Publication date
CN104573035A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104573035B (en) News information acquisition methods and system
US6952730B1 (en) System and method for efficient filtering of data set addresses in a web crawler
CN106484828B (en) Distributed internet data rapid acquisition system and acquisition method
US6766315B1 (en) Method and apparatus for simultaneously accessing a plurality of dispersed databases
US20100318538A1 (en) Predictive searching and associated cache management
KR101672901B1 (en) Cache Management System for Enhancing the Accessibility of Small Files in Distributed File System
CN105677826A (en) Resource management method for massive unstructured data
CN103092857A (en) Method and device for sorting historical records
JP2011054189A (en) Personalized search method and personalized search system
CN102129428B (en) A kind of method and device realizing subscription information from webpage
CN103678494A (en) Method and device for client side and server side data synchronization
CN103488704A (en) Method and device for storing data
CN105740472A (en) Distributed real-time full-text search method and system
WO2014187159A1 (en) A method and an apparatus for performing offline access to web pages
CN103955533B (en) A kind of page tree data acquisition device based on buffer queue and method
CN101420376B (en) Method and device for updating data
CN102214192A (en) Method for realizing data curve chart display on Web page and server
CN107291940A (en) Content of pages management method, device and associated server
CN106681995B (en) Data caching method, data query method and device
CN101477748A (en) Traffic condition management method and system
CN105791460A (en) DNS agent cache optimization method and system based on multi-dimension aggregation
CN106874481A (en) A kind of metadata of distributed type file system information-reading method and system
RU2004135313A (en) METHOD FOR STORING PAGES IN MEMORY OF MOBILE DEVICE (OPTIONS) AND MOBILE DEVICE FOR ITS IMPLEMENTATION
KR101654314B1 (en) Distributed processing system in spatial data and method for operating the same
CN109634911A (en) A kind of storage method based on HDFS CD server

Legal Events

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