CN104063405B - Microblog terminal and its method for managing subscriber data data - Google Patents
Microblog terminal and its method for managing subscriber data data Download PDFInfo
- Publication number
- CN104063405B CN104063405B CN201310097465.9A CN201310097465A CN104063405B CN 104063405 B CN104063405 B CN 104063405B CN 201310097465 A CN201310097465 A CN 201310097465A CN 104063405 B CN104063405 B CN 104063405B
- Authority
- CN
- China
- Prior art keywords
- data
- subscriber
- uin
- subscriber data
- database
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
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)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of microblog terminal and its method for managing social data, it is that index stores the subscriber data data obtained to default unified database that method, which includes: with data user's identification code (UIN),;When the subscriber data data of storage are more than preset threshold, the source scene identity according to pre-set user data for deleting storage is the subscriber data data of interim UIN index.Using technical solution of the present invention, it can be improved microblog terminal to the efficiency of management of subscriber data data, reduce microblog terminal inquiry subscriber data data to the occupancy of memory source, to improve the response performance of microblog terminal.
Description
Technical field
The present invention relates to the sides of network communications technology more particularly to a kind of microblog terminal and its management subscriber data data
Method.
Background technique
Microblogging as extension message mechanism of transmission new product using increasingly extensive, currently, the application of microblog terminal exists
Following problems:
One, using not closing for a long time, microblog terminal can obtain microblogging microblog terminal from background server in the process of running
Take a large number of users data, wherein microblog terminal is inquired by head portrait and modifies agreement from background server corresponding acquisition use
Account obtains agreement by the simple data of user and obtains the simple data number of user from background server is corresponding as data
According to obtaining user's particulars data from background server is corresponding by user's particulars data acquisition protocols;Pass through difference
The subscriber data data that agreement obtains are respectively stored in the disparate databases of microblog terminal memory, such as: user's head portrait data
Data are stored in database CustomHeadDataStore, and the simple data of user is stored in database
In AccountDataStore, user's particulars data are stored in database ContactInfoStore;
In addition, it is preset with corresponding data storage capacity threshold value respectively for each database, it is corresponding when what is cached in database
When subscriber data data are more than preset threshold, microblog terminal carries out data scrubbing according to the strategy of first in first out, so as to cause micro-
Rich terminal would generally be automatically deleted the subscriber data data obtained, delete so that microblog terminal is frequently necessary to reacquire
The subscriber data data removed reduce the response performance of microblog terminal, shadow to increase the data process load of microblog terminal
User experience is rung;
Two, it is simple to need to inquire respectively when retrieving subscriber data storage user's head portrait data, user for microblog terminal
The database of data and user's particulars data, i.e. microblog terminal retrieve a subscriber data and usually require inquiry repeatedly
Database, inquiry complexity is excessively high, and it is low to will lead to when the data of inquiry is excessive search efficiency, while can occupy microblogging
A large amount of memory sources of terminal cause the response performance of microblog terminal to reduce, to influence user experience.
That is, that there are the efficiencies of management is low, it is big to occupy for management of the microblog terminal to subscriber data data in the prior art
The problem of measuring memory source, it is low so as to cause the response performance of microblog terminal, influence user experience.
Summary of the invention
In view of this, the main purpose of the present invention is to provide the sides of a kind of microblog terminal and its management subscriber data data
Method, to solve low efficiency existing for management of the microblog terminal to subscriber data data in the prior art, occupy a large amount of memory sources
The problem of.
In order to achieve the above objectives, the technical scheme of the present invention is realized as follows:
The present invention provides a kind of methods that microblog terminal manages social data, which comprises
It is the subscriber data data that obtain of index storage into unified database with CUSTOMER ID UIN, and by the number
Interim UIN is identified as according to UIN corresponding to the casual user's data stored in library;
When the subscriber data data of the database purchase are more than preset threshold, at least one in the database is deleted
The subscriber data data of interim UIN index.
Preferably, the method also includes:
The type of the subscriber data data is identified in the database;
Correspondingly, the database is retrieved according to UIN to be checked and type identification when inquiring subscriber data data,
If retrieving the UIN and the matched subscriber data data of type identification, using the subscriber data data retrieved as looking into
Ask result;Otherwise, inquiry failure.
Preferably, the type of the data of identity user in the database includes:
The index UIN of the subscriber data data of the corresponding UIN of subscriber data data and the database purchase that will acquire
It is matched, if updating the use of UIN index described in the database there are matched index UIN in the database
The type identification of family data;Otherwise, the type identification of the subscriber data data of the acquisition is added in the database.
Preferably, the method also includes:
When the subscriber data data for deleting all interim UIN indexes in the database, the database purchase
When subscriber data data are still above the preset threshold, the non-provisional subscriber data number in the database of predetermined amount is deleted
According to.
Preferably, the method also includes:
According to the subscriber data data of acquisition, the mapping for establishing the microblog account of UIN user corresponding with the UIN is closed
System.
Preferably, the method also includes:
Determine whether the subscriber data data are casual user according to the source scene of acquired subscriber data data
Data.
Preferably, whether the source scene of the subscriber data data according to acquired in determines the subscriber data data
For casual user's data, comprising:
The source of the subscriber data data is determined according to the source scene identity that acquired subscriber data data carry
Scene, and judge whether the source scene of the subscriber data data is preset interim source scene, if it is, determining institute
Stating subscriber data data is casual user's data;Otherwise, it is determined that the subscriber data data are non-provisional subscriber data number
According to.
The present invention also provides a kind of microblog terminal, the microblog terminal includes: access module, mark module and deletion mould
Block;Wherein,
The access module, for being that index stores the subscriber data data obtained into unified database with UIN;
The mark module, corresponding to casual user's data for will be stored in the memory module database
UIN is identified as interim UIN;
The removing module, the subscriber data data for storing in the access module database are more than preset threshold
When, delete the subscriber data data of the interim UIN index of at least one in the database.
Preferably, the mark module, for identifying the subscriber data data in the access module database
Type;
The microblog terminal further include: enquiry module, for retrieving the access according to UIN to be checked and type identification
Module database, and when retrieving the UIN and the matched subscriber data data of type identification, the subscriber data that will be retrieved
Data are as query result.
Preferably, the mark module, the corresponding UIN of subscriber data data for being also used to will acquire and the access module
The index UIN of the subscriber data data of database purchase is matched, if there are matched index UIN in the database,
Then update the type identification of the subscriber data data of UIN index described in the database;Otherwise, it adds in the database
The type identification of the subscriber data data of the acquisition.
Preferably, the removing module, is also used to user's money of all interim UIN indexes in deleting the data
Expect data, when the subscriber data data of the database purchase are still above the preset threshold, deletes the data of predetermined amount
Non-provisional subscriber data data in library.
Preferably, the microblog terminal further include:
Mapping block establishes the micro- of UIN user corresponding with the UIN for the subscriber data data according to acquisition
The mapping relations of rich account.
Preferably, the mark module, the source for the subscriber data data for being also used to be obtained according to the access module
Scape determines whether the subscriber data data are casual user's data.
Preferably, the mark module, be also used to be carried according to the subscriber data data that the access module obtains come
Source scene identity determines the source scene of the subscriber data data, and judge the subscriber data data source scene whether
For preset interim source scene, if it is, determining the subscriber data data for casual user's data;Otherwise, sentence
The fixed subscriber data data are non-provisional subscriber data data.
A kind of microblog terminal provided by the present invention and its method for managing subscriber data data, pass through the user in storage
When data is more than preset threshold, the source scene identity according to pre-set user data for deleting storage is casual user
The subscriber data data of identification code (UIN, User Identity Number) index avoid the prior art in storage user's money
Material often deletes the subscriber data data of non-provisional source scene when being more than preset threshold, cause subsequent to need to reacquire number
The problem of according to, low efficiency and reducing microblog terminal response performance;Also, the subscriber data data that will acquire preset unified database
Storage, so when inquiring subscriber data data, can inquire accordingly by keyword of the index UIN of subscriber data data
Data, search efficiency is high, ensure that the response performance of microblog terminal, improves user experience.
Detailed description of the invention
Fig. 1 is the implementation process schematic diagram that microblog terminal of the present invention manages subscriber data data method;
Fig. 2 is the composed structure schematic diagram of the microblog terminal of present invention management subscriber data data;
Fig. 3 is the realization schematic diagram that subscriber data data are managed in one embodiment of the invention;
Fig. 4 is the implementation process schematic diagram that subscriber data data are stored in one embodiment of the invention;
Fig. 5 is the implementation process schematic diagram that subscriber data data are cleared up in one embodiment of the invention;
Fig. 6 is the implementation process schematic diagram that subscriber data data are inquired in one embodiment of the invention.
Specific embodiment
The technical solution of the present invention is further elaborated in the following with reference to the drawings and specific embodiments.
The present invention provides a kind of method of microblog terminal management subscriber data data, as shown in Figure 1, comprising:
Step 101: being the subscriber data data that obtain of index storage into unified database with UIN, and by the data
UIN corresponding to the casual user's data stored in library is identified as interim UIN.
Wherein, the type of the subscriber data data includes but are not limited to: being inquired using head portrait and modifies agreement acquisition
User's head portrait data, obtained using the simple data of user the simple data of user that agreement obtains (for example including with
Family microblog account, user's microblogging pet name) data and using user's particulars data acquisition protocols obtain user provide in detail
Expect the classes such as (for example including user's microblogging homepage, individual subscriber introduction, user's education background information and user authentication information) data
Type;The subscriber data data include the UIN information that the subscriber data data correspond to user, in this way, can the user
Data corresponds to the UIN of user and stores the subscriber data data for index.
Wherein, the subscriber data data can when user browses microblogging, triggering takes from corresponding from the background by microblog terminal
Device of being engaged in obtains, can also be from the server of storage subscriber data data to microblog terminal active push.
Wherein, the unified database is the organizational form of microblog terminal subscriber data data described in memory storage, root
It is set according to data item involved in user's head portrait data, the simple data of user and user's particulars data,
The subscriber data data that user corresponds to UIN and the corresponding user are saved, in this way, it is corresponding to form user in the database
The mapping relations of UIN and subscriber data data.
Preferably, the method also includes: the user is determined according to the source scene of acquired subscriber data data
Whether data is casual user's data.
Wherein, the source scene include: microblogging homepage, refer to the square Ye He page etc..User is clear in the source scene
When looking at, microblog terminal obtains and stores the subscriber data data of the source scene user, and according to user's actively access
The source scene is preset as interim source scene or non-provisional source scene by the frequency of source scene.For example, can will use
Householder moves the highest microblogging homepage of access frequency and refers to that page is preset as non-provisional source scene, most by user's active access frequency
Low square page is preset as interim source scene, corresponding, by the rope of the subscriber data data obtained from non-provisional source scene
Draw UIN and be identified as non-provisional UIN, the index UIN of the subscriber data data obtained from interim source scene is identified as temporarily
UIN.It should be noted that the frequency of user's scene is actively browsed in the embodiment of the present invention according to user, by user's scene
The user's scene for distinguishing multiple ranks is not limited in dividing into casual user's scene and non-provisional user's scene;Also, this hair
Bright embodiment is not limited only to distinguish casual user's data and non-provisional subscriber data data according to the source scene, real
It is all suitable for microblog terminal in the application of border, it can be used in distinguishing casual user's data and non-provisional subscriber data data
Rule of judgment should also be suitable for the present invention, the protection scope of the embodiment of the present invention should be belonged to.
Step 102: when the subscriber data data stored in the database are more than preset threshold, deleting the database
In at least one interim UIN index subscriber data data.
Wherein, the threshold value can set with one of lower threshold value or concurrently set following two:
The maximum capacity of the subscriber data data of database purchase;
The quantity maximum value of the index UIN of the subscriber data data of database purchase.
For example, when the quantity maximum value of the index UIN of the default subscriber data data with database purchase is the threshold value,
Then when the index UIN of the subscriber data data of the database purchase is more than default UIN quantity maximum value, the data are deleted
The subscriber data data of the interim UIN index of at least one in library;The index UIN of the default subscriber data data with database purchase
Quantity maximum value and database purchase subscriber data data maximum capacity simultaneously when being threshold value, in the data inventory
The subscriber data data of storage are more than the index UIN of the subscriber data data of default maximum capacity or the database purchase super
When crossing default UIN quantity maximum value, the subscriber data data of the interim UIN index of at least one in the database are deleted.It needs
Illustrate, the threshold value setting means of the embodiment of the present invention be not limited only to it is above-mentioned lifted, in practical application it is all be suitable for it is micro-
Rich terminal, and the threshold value setting means for the purpose of controlling data storage capacity, the guarantor of the embodiment of the present invention should be belonged to
Protect range.
The preset threshold can be set according to the memory size of microblog terminal, be more than pre- in the subscriber data data of storage
If when threshold value, the source scene identity according to subscriber data data for deleting storage is the subscriber data data of interim UIN index,
It can avoid occupying a large amount of memory source of microblog terminal.
It wherein, can be according to storage when deleting the subscriber data data of the interim UIN index of at least one in the database
The sequencing of the subscriber data data deletes at least one described interim UIN index according to the strategy first deleted first is stored
Subscriber data data;Or according to the preset priority for deleting subscriber data data type, delete it is described at least one face
When UIN index preset kind subscriber data data, such as the pre-set priority be user's head portrait data > user
When simple data > user's particulars data, according to the simple data > of user's head portrait data > user
The priority (priority is from high to low) of user's particulars data deletes the subscriber data of at least one interim UIN index
Data;Or the interim preset priority of source scene is corresponded to according to the subscriber data data of the interim UIN index, delete institute
The subscriber data data of at least one interim UIN index are stated, such as the priority of preset interim source scene is interim source
When the interim source scene 2 of 1 > of scene, according to the interim interim source scene 2 of 1 > of source scene priority (priority from
It is high to Low), delete the subscriber data data of at least one interim UIN index.
Preferably, the method also includes: when the subscriber data for deleting all interim UIN indexes in the database
Data when the subscriber data data of the database purchase are still above the preset threshold, delete the database of predetermined amount
In non-provisional subscriber data data.
Wherein, non-provisional subscriber data data are the subscriber data data of the non-provisional UIN index, and described delete makes a reservation for
It, can be according to storing the successive suitable of the subscriber data data when non-provisional subscriber data data in the database of amount
Sequence, according to the subscriber data data for first storing strategy deletion at least one the non-provisional UIN index first deleted;Or according to
The preset priority for deleting subscriber data data type deletes the preset kind of at least one non-provisional UIN index
Subscriber data data, such as the pre-set priority are that the simple data > user of user's head portrait data > user is detailed
When data, according to the preferential of the simple data > user particulars data of user's head portrait data > user
Grade (priority is from high to low) deletes the subscriber data data of at least one non-provisional UIN index;Or according to described non-
The subscriber data data of interim UIN index correspond to the non-provisional preset priority of source scene, at least one non-faces described in deletion
When UIN index subscriber data data, such as preset non-provisional source scene priority be non-provisional 1 > of source scene it is non-
When interim source scene 2, according to the non-provisional non-provisional source scene 2 of 1 > of source scene priority (priority from height to
It is low), delete the subscriber data data of at least one non-provisional UIN index.
Preferably, the method also includes: identify the type of the subscriber data data in the database;
Correspondingly, the database is retrieved according to UIN to be checked and type identification when inquiring subscriber data data,
If retrieving the UIN and the matched subscriber data data of type identification, using the subscriber data data retrieved as looking into
Ask result;Otherwise, inquiry failure.
Preferably, the type of the data of identity user in the database includes: the subscriber data data that will acquire
Corresponding UIN is matched with the index UIN of the subscriber data data of the database purchase, if existed in the database
Matched index UIN then updates the type identification of the subscriber data data of UIN index described in the database;Otherwise, in institute
State the type identification that the subscriber data data of the acquisition are added in database.
Wherein, the subscriber data data of the corresponding UIN of the subscriber data data and database purchase of the acquisition
When indexing UIN matching, indicate that the stored UIN corresponds to the subscriber data data of user in the database, correspondingly, needing
It will be according to the subscriber data data of the subscriber data data and stored correspondence UIN of the correspondence UIN of acquisition
Type, the type identification of the subscriber data data of more UIN index described in new database.
Preferably, the method also includes: according to the subscriber data data of acquisition, it is corresponding with the UIN to establish the UIN
The mapping relations of the microblog account of user.
Wherein, by establishing the mapping relations, it can satisfy and look into the microblog account pair according to user's microblog account is counter
Answer the needs of UIN.
Preferably, the method also includes:
Determine whether the subscriber data data are casual user according to the source scene of acquired subscriber data data
Data.
Preferably, whether the source scene of the subscriber data data according to acquired in determines the subscriber data data
For casual user's data, comprising:
The source of the subscriber data data is determined according to the source scene identity that acquired subscriber data data carry
Scene, and judge whether the source scene of the subscriber data data is preset interim source scene, if it is, determining institute
Stating subscriber data data is casual user's data;Otherwise, it is determined that the subscriber data data are non-provisional subscriber data number
According to.
Wherein, the subscriber data data of separate sources scene carry corresponding source scene identity, so pass through parsing institute
The source scene identity that the subscriber data data of acquisition carry, it may be determined that the source scene of the subscriber data data.
For example, presetting microblogging homepage and referring to that page is non-provisional source scene, square page is interim source scene;
So, when parsing acquired subscriber data data carrying microblogging homepage mark, it may be determined that user's money
The source scene for expecting data is microblogging homepage, since microblogging homepage is predetermined to be non-provisional source scene, therefore, it is determined that acquired
Subscriber data data be non-provisional subscriber data data;
When parsing acquired subscriber data data carrying and referring to page mark, it may be determined that the subscriber data data
Source scene is to refer to page, due to referring to that page is predetermined to be non-provisional source scene, therefore, it is determined that acquired subscriber data number
According to for non-provisional subscriber data data;
When parsing acquired subscriber data data carrying square page mark, it may be determined that the subscriber data data
Source scene is square page, since square page is predetermined to be interim source scene, therefore, it is determined that acquired subscriber data data
For casual user's data.
Fig. 2 is the composed structure schematic diagram of the microblog terminal of present invention management subscriber data data, as shown in Fig. 2, described
Microblog terminal specifically includes that access module 21, mark module 22 and removing module 23;Wherein,
Access module 21, for being that index stores the subscriber data data obtained into unified database with UIN;
Mark module 22, UIN corresponding to casual user's data for will be stored in 21 database of access module
It is identified as interim UIN;
Removing module 23, when the subscriber data data for storing in 21 database of access module are more than preset threshold,
Delete the subscriber data data of the interim UIN index of at least one in the database.
Preferably, mark module 22 is used to identify the type of the subscriber data data in 21 database of access module;
The microblog terminal further include: enquiry module 24, for being deposited according to UIN to be checked and type identification retrieval
21 database of modulus block, and when retrieving the UIN and the matched subscriber data data of type identification, the user that will be retrieved
Data is as query result.
Preferably, the corresponding UIN of subscriber data data and 21 data of access module that mark module 22 is also used to will acquire
The index UIN of the subscriber data data of library storage is matched, if there are matched index UIN in the database, more
The type identification of the subscriber data data of UIN index described in the new database;Otherwise, in the database described in addition
The type identification of the subscriber data data of acquisition.
Preferably, removing module 23 is also used to the subscriber data of all interim UIN indexes in deleting the data
Data when the subscriber data data of the database purchase are still above the preset threshold, delete the database of predetermined amount
In non-provisional subscriber data data.
Preferably, the microblog terminal further include: mapping block 25 is established for the subscriber data data according to acquisition
The mapping relations of the microblog account of UIN user corresponding with the UIN.
Preferably, the source scene for the subscriber data data that mark module 22 is also used to be obtained according to access module 21 determines
Whether the subscriber data data are casual user's data.
Preferably, mark module 22 is also used to the source scene carried according to the subscriber data data that access module 21 obtains
Mark determines the source scene of the subscriber data data, and judges whether the source scene of the subscriber data data is default
Interim source scene, if it is, determining the subscriber data data for casual user's data;Otherwise, it is determined that described
Subscriber data data are non-provisional subscriber data data.
Embodiment
In the present embodiment, microblog terminal is based on Standard Template Library (STL, Standard Template Library) technology
Subscriber data data are stored, using UIN as search index, and subscriber data data are cleared up, class corresponding to above-mentioned realization
Figure is specific as shown in figure 3, being described further below with reference to Fig. 3 and concrete scene to the embodiment of the present invention.
It is that index storage obtains with UIN when the subscriber data data of microblog terminal confirmation storage are without departing from preset threshold
Subscriber data data, and the index UIN user's microblog account corresponding with the UIN for establishing the subscriber data data of acquisition is reflected
Relationship is penetrated, the index UIN of the subscriber data data is identified as faces also according to the source scene of the subscriber data data of acquisition
When UIN or non-provisional UIN, aforesaid operations it is specifically as shown in Figure 4, comprising the following steps:
Step 401~402: judging whether the subscriber data data of storage exceed preset threshold, if it was exceeded, being transferred to step
Rapid 402 and sequentially it is transferred to step 403;Otherwise, directly it is transferred to step 403;
In the present embodiment, the subscriber data data of default storage correspond to the subscriber data of UIN quantity maximum value and storage
The maximum capacity of data, correspondingly, when the subscriber data data of storage are more than default UIN quantity maximum value or the storage
When exceeding preset capacity maximum value of subscriber data data, then need to be transferred to the subscriber data data of step 402 cleaning storage.
The subscriber data data are index with the UIN of user corresponding to the subscriber data data, are stored to default system
One database, and the type of the subscriber data data is identified in presetting same database, the subscriber data data include
But it is not limited only to Types Below: user's head portrait data, the simple data of user and user's particulars data.
Storage realization of the processing based on STL technology as shown in figure 3, specifically:
- STL::map < DWORD, T > M_mapData
+ HRESULT SetData(DWORD dwUin, BYTE cDataType, T*pData) ()
Wherein, DWORD is 32 signless integers for defining UIN, and unified database M_mapData is for storing UIN
Subscriber data data segment T with taking the UIN as index, can so form the mapping of UIN to subscriber data data segment T, BYTE
CDataType is for defining a byte length type identification.
Wherein, the M_mapData can carry out tissue in the form of following table:
Table 1
Subscriber data data and its type identification of the microblog terminal in subscriber data data segment T storage UIN index, institute
Following form tissue can be used by stating subscriber data data segment T:
Table 2
Wherein, user's head portrait data, the simple data of user and user's particulars data are to using ten
Senary number 0x1,0x2 and 0x4 mark, the type identification are the subscriber data data of subscriber data data segment T storage
Sum of corresponding mark, for example, the subscriber data Data Data section T of one UIN index store user's head portrait data with
When the simple data two types data of user, the type identification is the corresponding mark 0x1 of user's head portrait data and uses
The simple data in family it is corresponding mark 0x2's and i.e. 0x3.
Microblog terminal establishes the UIN and the UIN to application also according to the corresponding UIN of subscriber data data of acquisition
The mapping relations of the microblog account at family, the realization based on STL technology as shown in figure 3, specifically:
- STL::map < CSsting, DWORD > M_mapAccounttoUin
Microblog terminal also parses the source scene identity that the acquired subscriber data data of storage carry, described in determination
The source scene of subscriber data data, and determine whether the source scene is preset interim source scene, and will temporarily come
Scene corresponding subscriber data data judging in source is casual user's data, by the corresponding subscriber data of non-provisional source scene
Data judging is non-provisional subscriber data data;UIN corresponding to casual user's data is identified as interim UIN, it will be non-
UIN corresponding to casual user's data is identified as non-provisional UIN.
The non-provisional UIN and interim UIN are stored in the form of chained list, and the realization based on STL technology is as shown in figure 3, tool
Body are as follows:
- STL::list map < DWORD > M_highUinList
- STL::list map < DWORD > M_OtherUinList
Wherein, M_highUinList is non-provisional UIN chained list, and M_OtherUinList is interim UIN chained list.
Step 403: whether inquiry M_mapData has stored the corresponding UIN of the subscriber data data of acquisition, if so,
It is then transferred to step 404 and ends processing;Otherwise, it is transferred to step 405, and sequence executes step 406 and 407;
Wherein, step 403 judging result is yes, indicates that the subscriber data data that acquisition has been stored in M_mapData are corresponding
UIN index subscriber data data, at this point, only the subscriber data data of the acquisition need to be stored into M_mapData institute
State the subscriber data data segment T of UIN index;Also, if the determination result is YES, it is corresponding with the UIN that the UIN has been established in expression
The mapping relations of the microblog account of user.
Step 404: the subscriber data data that will acquire are stored to the subscriber data number of UIN index described in M_mapData
According to section T, the type identification of the subscriber data data segment T of the UIN index is updated;
Step 405: the UIN is added in M_mapData, and the subscriber data data that will acquire are stored to M_
The subscriber data data segment T of UIN index described in mapData;
Wherein, step 403 judging result is no, indicates the subscriber data data for not having storage to obtain in M_mapData
The subscriber data data of corresponding UIN index, at this time, it may be necessary to stored in M_mapData the UIN and with the UIN be rope
The subscriber data data drawn;Also, step 403 judging result be it is no, be also represented by that not establish the UIN corresponding with the UIN
The mapping relations of the microblog account of user.
Step 406: establishing the mapping relations of UIN user's microblog account corresponding with the UIN;
Step 407: by the index UIN of the subscriber data data of the acquisition be added to HighUinList or
OtherUinList。
Judge the subscriber data data for casual user's money according to the source scene of the subscriber data data of the acquisition
Expect data or non-provisional subscriber data data, and then the index UIN of the subscriber data data of the acquisition is added to corresponding
HighUinList or OtherUinList.
Specifically, the processing of step 402 cleaning subscriber data data is as shown in Figure 5, comprising the following steps:
Step 501: judging whether that the subscriber data data for having stored interim UIN index are transferred to step if stored
502;Otherwise, it is transferred to step 503;
Specifically, if OtherUinList chained list is sky, then it represents that do not store the subscriber data number of interim UIN index
According to;Otherwise the subscriber data data for being stored with interim UIN index are indicated.
Step 502: deleting the subscriber data data segment T of at least one interim UIN index in M_mapData;
In step 502, according to the sequencing for storing subscriber data data in M_mapData, first deleted according to first storing
Strategy to delete subscriber data the data segment T, the interim UIN of at least one interim UIN index be OtherUinList
UIN in chained list.
Step 503: deleting the subscriber data data segment T of non-provisional UIN index in the M_mapData of predetermined amount.
In step 503, according to the sequencing for storing subscriber data data in M_mapData, first deleted according to first storing
Strategy delete predetermined amount non-provisional UIN index subscriber data data segment T, the non-provisional UIN is M_highUinList
UIN in chained list.
When microblog terminal inquires subscriber data data, looked into stored subscriber data data with UIN and type identification
It askes and the matched data of the inquiry request, aforesaid operations is specifically as shown in Figure 6, comprising the following steps:
Step 601: judging whether the index UIN in M_mapData matches with the UIN of inquiry, if it does, being transferred to step
602;Otherwise, it is transferred to step 604;
Step 602: it is described matching UIN index subscriber data data segment T type identification whether the type mark with inquiry
Matching is known, if it does, being transferred to step 603;Otherwise, it is transferred to step 604;
Step 601 and 602 realization of the processing based on STL technology as shown in figure 3, specifically:
+ HRESULT QueryData(DWORD dwUin, BYTE cDataType, T*pData) ()
Judge whether type identification is matched to be exemplified below:
Citing one, the matching UIN index the type identification of subscriber data data segment T be 0x1, illustrate that the user provides
It has been stored with corresponding user's head portrait data in material data segment T, then when the type identification of inquiry is 0x1, type mark
Knowledge being capable of successful match;Otherwise it fails to match;
Citing two, the matching UIN index the type identification of subscriber data data segment T be 0x3, illustrate that the user provides
It is stored with corresponding user's head portrait data and the simple data of user in material data segment T, then when the type of inquiry
Be identified as 0x1,0x2 or 0x3(i.e. 0x1 and 0x2's and) when, type identification being capable of successful match;Otherwise it fails to match;
Citing three, the matching UIN index the type identification of subscriber data data segment T be 0x7, illustrate that the user provides
Corresponding user's head portrait data, the simple data of user and user's particulars data have been stored in material data segment T,
So when the type identification of inquiry be 0x1,0x2,0x3(, that is, 0x1 and 0x2's and), 0x4,0x5(, that is, 0x1 and 0x4's and), 0x6
(i.e. 0x2 and 0x4's and), 0x7(, that is, 0x1,0x2 and 0x4's and) when, type identification can successful match;Otherwise it fails to match.
Step 603: returning to the data and S_OK message of the respective type of the matched subscriber data data segment T;Wherein,
The expression of S_OK message inquires matched subscriber data data.
Step 604: returning to E_FAIL message.
Wherein, the E_FAIL message expression that step 604 returns does not inquire matched subscriber data data.
If module of the present invention is realized in the form of software function module and sells or use as independent product
When, it also can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention essence
On in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software product
It is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, service
Device or the network equipment etc.) execute the method for the invention all or part.And storage medium above-mentioned includes: USB flash disk, moves
Dynamic hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access
Memory), the various media that can store program code such as magnetic or disk.In this way, the present invention is not limited to any specific
Hardware and software combine.
Correspondingly, the present invention also provides a kind of computer storage mediums, wherein it is stored with computer program, the computer journey
Sequence is for executing subscriber data data managing method provided by the invention.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.
Claims (12)
1. a kind of method that microblog terminal manages social data, which is characterized in that the described method includes:
It is the subscriber data data that obtain of index storage into unified database with CUSTOMER ID UIN, and by the database
UIN corresponding to casual user's data of middle storage is identified as interim UIN;Wherein, the unified database is that microblogging is whole
The same position for holding the subscriber data data described in memory storage, sets according to data item involved in the subscriber data data
It is fixed, save UIN and its corresponding subscriber data data;Wherein, casual user's data includes subdivided data: being used
Account is as data, the simple data of user, user's particulars data;
When the subscriber data data of the database purchase are more than preset threshold, provided according to the user of the interim UIN index
The pre-set priority for expecting data, deletes the subscriber data data of the interim UIN index of at least one in the database;
The method also includes:
Determine whether the subscriber data data are the casual user according to the source scene of acquired subscriber data data
Data;
Wherein, the source scene includes: microblogging homepage, refers to the square Ye He page;
The source scene of the subscriber data data according to acquired in determines whether the subscriber data data are described interim
Subscriber data data include:
When the source scene of acquired subscriber data data is microblogging homepage, refers to page, the subscriber data data are determined
For non-provisional subscriber data data;When the source scene of acquired subscriber data data is square page, the user is determined
Data is casual user's data;
Wherein, the pre-set priority of the subscriber data data of the interim UIN index includes: casual user's data
The pre-set priority of the pre-set priority of subdivided data and the corresponding interim source scene of casual user's data.
2. the method according to claim 1, wherein the method also includes:
The type of the subscriber data data is identified in the database;
Correspondingly, the database is retrieved according to UIN to be checked and type identification when inquiring subscriber data data, if
The UIN and the matched subscriber data data of type identification are retrieved, then is tied the subscriber data data retrieved as inquiry
Fruit;Otherwise, inquiry failure.
3. according to the method described in claim 2, it is characterized in that, the type of the data of identity user in the database
Include:
The index UIN of the subscriber data data of the corresponding UIN of subscriber data data and the database purchase that will acquire is carried out
Matching updates user's money of UIN index described in the database if there are matched index UIN in the database
Expect the type identification of data;Otherwise, the type identification of the subscriber data data of the acquisition is added in the database.
4. the method according to claim 1, wherein the method also includes:
As the subscriber data data for deleting all interim UIN indexes in the database, the user of the database purchase
When data is still above the preset threshold, the non-provisional subscriber data data in the database of predetermined amount are deleted.
5. method according to claim 1,2,3 or 4, which is characterized in that the method also includes:
According to the subscriber data data of acquisition, the mapping relations of the microblog account of UIN user corresponding with the UIN are established.
6. the method according to claim 1, wherein the source of the subscriber data data according to acquired in
Scape determines whether the subscriber data data are casual user's data, comprising:
The source scene of the subscriber data data is determined according to the source scene identity that acquired subscriber data data carry,
And judge whether the source scene of the subscriber data data is preset interim source scene, if it is, determining the use
Family data is casual user's data;Otherwise, it is determined that the subscriber data data are non-provisional subscriber data data.
7. a kind of microblog terminal, which is characterized in that the microblog terminal includes: access module, mark module and removing module;Its
In,
The access module, for being that index stores the subscriber data data obtained into unified database with UIN;Wherein, institute
The same position that unified database is microblog terminal subscriber data data described in memory storage is stated, according to the subscriber data number
It is set according to related data item, saves UIN and its corresponding subscriber data data;
The mark module, UIN corresponding to casual user's data for will be stored in the memory module database
It is identified as interim UIN;Wherein, casual user's data includes subdivided data: user's head portrait data, user are simple
Data, user's particulars data;
The removing module, when the subscriber data data for storing in the access module database are more than preset threshold,
According to the pre-set priority of the subscriber data data of the interim UIN index, the interim UIN of at least one in the database is deleted
The subscriber data data of index;
The source scene of the mark module, the subscriber data data for being also used to be obtained according to the access module determines the use
Whether family data is casual user's data;Wherein, the source scene include: microblogging homepage, refer to page and
Square page;
The mark module is also used to, and when the source scene of acquired subscriber data data is microblogging homepage, refers to page, is sentenced
The fixed subscriber data data are non-provisional subscriber data data;When the source scene of acquired subscriber data data is square
When page, determine the subscriber data data for casual user's data;
Wherein, the pre-set priority of the subscriber data data of the interim UIN index includes: casual user's data
The pre-set priority of the pre-set priority of subdivided data and the corresponding interim source scene of casual user's data.
8. microblog terminal according to claim 7, which is characterized in that
The mark module, for identifying the type of the subscriber data data in the access module database;
The microblog terminal further include: enquiry module, for retrieving the access module according to UIN to be checked and type identification
Database, and when retrieving the UIN and the matched subscriber data data of type identification, the subscriber data data that will be retrieved
As query result.
9. microblog terminal according to claim 8, which is characterized in that
The mark module, the corresponding UIN of subscriber data data for being also used to will acquire and the access module database purchase
The index UIN of subscriber data data matched, if there are matched index UIN in the database, update described in
The type identification of the subscriber data data of UIN index described in database;Otherwise, the acquisition is added in the database
The type identification of subscriber data data.
10. microblog terminal according to claim 7, which is characterized in that
The removing module is also used to the subscriber data data of all interim UIN indexes in deleting the data, described
When the subscriber data data of database purchase are still above the preset threshold, delete non-provisional in the database of predetermined amount
Subscriber data data.
11. according to claim 8,9 or 10 microblog terminals, which is characterized in that the microblog terminal further include:
Mapping block establishes the microblogging account of UIN user corresponding with the UIN for the subscriber data data according to acquisition
Number mapping relations.
12. microblog terminal according to claim 7, which is characterized in that
The mark module, the source scene identity for being also used to be carried according to the subscriber data data that the access module obtains are true
The source scene of the fixed subscriber data data, and judge whether the source scene of the subscriber data data is preset interim
Source scene, if it is, determining the subscriber data data for casual user's data;Otherwise, it is determined that user's money
Material data are non-provisional subscriber data data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310097465.9A CN104063405B (en) | 2013-03-22 | 2013-03-22 | Microblog terminal and its method for managing subscriber data data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310097465.9A CN104063405B (en) | 2013-03-22 | 2013-03-22 | Microblog terminal and its method for managing subscriber data data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104063405A CN104063405A (en) | 2014-09-24 |
CN104063405B true CN104063405B (en) | 2019-06-14 |
Family
ID=51551121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310097465.9A Active CN104063405B (en) | 2013-03-22 | 2013-03-22 | Microblog terminal and its method for managing subscriber data data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104063405B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106209584B (en) * | 2016-07-01 | 2018-10-26 | 腾讯科技(深圳)有限公司 | User information processing method, client and server Internet-based |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4580514B2 (en) * | 2000-07-05 | 2010-11-17 | 株式会社東芝 | Information reference system connection information management server, mobile communication terminal and proxy server |
CN101158976A (en) * | 2007-11-21 | 2008-04-09 | 金蝶软件(中国)有限公司 | Method and system for data-base recording enquire preprocess |
CN102053984A (en) * | 2009-11-10 | 2011-05-11 | 杜卓 | Systems and methods for information retrieval, information query and information issue |
CN101944135A (en) * | 2010-10-22 | 2011-01-12 | 道有道(北京)科技有限公司 | Information processing system and method |
CN102831231B (en) * | 2012-08-30 | 2015-04-08 | 东莞宇龙通信科技有限公司 | Mobile terminal and file management method |
-
2013
- 2013-03-22 CN CN201310097465.9A patent/CN104063405B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104063405A (en) | 2014-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109299102B (en) | HBase secondary index system and method based on Elastcissearch | |
CN102521334B (en) | Data storage and query method based on classification characteristics and balanced binary tree | |
CN107918612B (en) | The implementation method and device of key assignments memory system data structure | |
US9507821B2 (en) | Mail indexing and searching using hierarchical caches | |
CN103345521B (en) | A kind of method and apparatus processing key assignments in Hash table database | |
CN109299157B (en) | Data export method and device for distributed big single table | |
CN104516974B (en) | A kind of management method and device of file system directories item | |
CN108804516A (en) | Similar users search device, method and computer readable storage medium | |
CN105159950B (en) | Mass data real-time sequencing query method and system | |
CN110399348A (en) | File deletes method, apparatus, system and computer readable storage medium again | |
CN107305570B (en) | Data retrieval method and system | |
US7536512B2 (en) | Method and apparatus for space efficient identification of candidate objects for eviction from a large cache | |
CN112800287A (en) | Full-text indexing method and system based on graph database | |
CN111198856A (en) | File management method and device, computer equipment and storage medium | |
CN109753504A (en) | Data query method and device | |
CN105005567B (en) | Interest point query method and system | |
CN106161193B (en) | Mail processing method, device and system | |
JP2007133809A5 (en) | ||
CN110119396B (en) | Data management method and related product | |
CN110134698A (en) | Data managing method and Related product | |
CN104063405B (en) | Microblog terminal and its method for managing subscriber data data | |
CN102129454A (en) | Method and system for processing encyclopaedia data based on cloud storage | |
US20170262368A1 (en) | Linked-list-based method and device for application caching management | |
CN105528463B (en) | A kind of the index data loading method and device of search engine | |
CN110413724A (en) | A kind of data retrieval method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |