[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN103309902A - Method and device for storing and searching user information in social network - Google Patents

Method and device for storing and searching user information in social network Download PDF

Info

Publication number
CN103309902A
CN103309902A CN2012100703243A CN201210070324A CN103309902A CN 103309902 A CN103309902 A CN 103309902A CN 2012100703243 A CN2012100703243 A CN 2012100703243A CN 201210070324 A CN201210070324 A CN 201210070324A CN 103309902 A CN103309902 A CN 103309902A
Authority
CN
China
Prior art keywords
shard
engine
user profile
database
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012100703243A
Other languages
Chinese (zh)
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.)
More Entertainment Information Technology (beijing) Co Ltd
Original Assignee
More Entertainment Information Technology (beijing) 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 More Entertainment Information Technology (beijing) Co Ltd filed Critical More Entertainment Information Technology (beijing) Co Ltd
Priority to CN2012100703243A priority Critical patent/CN103309902A/en
Publication of CN103309902A publication Critical patent/CN103309902A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for storing and searching user information in a social network and a system for storing and looking for the user information in the social network. The method comprises the steps: user information data is firstly input to a shard engine; the shard engine disperses the user information data to databases for being stored respectively according to an internal dispersion rule; after receiving a user information query instruction, a social network server forwards the query instruction to the shard engine; the shard engine carries out query on a corresponding database according to a built-in mechanism and obtains a query result; and the social network server integrates the query result and returns the query result. With the adoption of the technical scheme disclosed by the invention, a reliable data access speed is provided for a terminal; by realizing the SQL (Structured Query Language)-like statement support, the complexity of changing an original mode of a system to a new mode is reduced, underlying implementation is concealed, the implementation principle is not required to be understood, the use complexity is lowered, and meanwhile the device is compatible with various languages to a great extent by using provided MySQL-like interfaces.

Description

The method and apparatus that user profile is stored and searched in a kind of social networks
Technical field
The present invention relates to the social networks technical field, relate in particular to the method and apparatus that user profile is stored and searched in a kind of social networks.
Background technology
At present take address list in the social networks on basis, user's cell phone address book is mainly picked up from the source of good friend's relation, according to reliable statistics, the number of contacts that general each user on average has is 200, and system need to be for this some user, storing his address list good friend relation, is exactly 200 record/users like this.
Process for such data at present, usually the database design principle that adopts to be the single table in single storehouse, such design is relatively directly directly perceived, but the data for magnanimity are processed inquiry, all have certain bottleneck and restricted, such as query latency, reflection slowly, serious even cause the database collapse, data exception is lost.
About above-mentioned mass data inquiry bottleneck and restricted, test as follows:
Suppose take the rough calculation of medium scale social networks number as 100 general-purpose families, according to user's matched rule, unique user inquiry amount, also be 200 corresponding number/person, estimate that each user needed to rescan customer relationship one time in one month, the user that then need to scan average p.s. is, 1000000 users/30 day/24 hours/60 seconds=23.14 users, average per second need to be processed 23.14 query requests in other words, processing needs the number of inquiry to be characterized as 23.14*200=4628 bar/second (in the reality, 100 general-purpose families can not all be any active ues, but calculated value is mean value, the peak value actual numerical value might be 2-3 times of calculated value, and therefore according to the system maximization principle, this computing formula is rational).According to evaluation, can be to the database build-up of pressure of general server deployment scenario when the inquiry peak value.Usually relevant database (such as mysql) reaches at 1,000 ten thousand o'clock and namely has the performance that the data query ability descends in single table quantity in addition, if according to noted earlier 200,000,000 data volumes are arranged, and unusual poor efficiency of search efficiency so.Simultaneously, in the situation that index is arranged, upgrade the very difficulty that operation also will become.
Be to be stored into a certain database of server after with data scanning in the common way in this field, then carry out single table and search.Will there be two technical matterss in this, and the one, entire scan and transmit user data, will causing the user to use equipment, temporary to take resource excessive, simultaneously Internet Transmission difficulty, easily lost part data; The 2nd, exist the data (such as hundred million ranks) when data volume is excessive in the single table in single storehouse to search unusual difficult that coupling will become, speed is slow and consume ample resources.
Summary of the invention
The object of the invention is to propose the method and system that user profile is stored and searched in a kind of social networks, can be friends storage and the reliable content support of coupling raising based on phone number.
For reaching this purpose, the present invention by the following technical solutions:
The method that user profile is stored and searched in a kind of social networks may further comprise the steps:
A, the user profile data are input to the shard engine;
B, shard engine are distributed to database according to inside dispersion rule with described user profile data and store respectively;
After C, social networking service device are received the user profile query statement, described query statement is transmitted to the shard engine;
D, shard engine are inquired about to the database of correspondence by built-in mechanism, obtain Query Result;
E, social networking service device return after Query Result is integrated.
Among the step B, by parallel mode described user profile data are distributed to database and store respectively.
Among the step D, the shard engine walks abreast and inquires about to the database of correspondence by built-in mechanism.
The system that user profile is stored and searched in a kind of social networks comprises input media, shard engine, database, server and terminal, and input media is connected with the shard engine, the shard engine is connected with database, and the shard engine is connected with server, and server is connected with terminal, wherein
Input media is used for the user profile data are input to the shard engine;
The shard engine is used for being distributed to database according to the user profile data that inside disperses rule that input media is sent and stores respectively, and be used for the user profile query statement that reception server is sent, inquire about to the database of correspondence by built-in mechanism, obtain Query Result, send to server;
Database is used for the storing subscriber information data;
Server is used for the user profile query statement that receiving terminal is sent, and is transmitted to the shard engine, and is used for receiving the Query Result that the shard engine is sent, and returns to terminal after Query Result is integrated;
Terminal is used for sending the user profile query statement to server, and is used for the Query Result that reception server is sent.
Database is for being no less than 2 databases.
Adopted technical scheme of the present invention, for terminal provides reliable data access speed, by realizing the support of class SQL statement, reduced system moves to new model from original pattern complexity, hidden bottom layer realization, do not needed to understand and realize principle, reduced and use complexity, the class mysql interface that provides simultaneously makes it accomplish maximum compatibility to various language.
Description of drawings
Fig. 1 is the system architecture schematic diagram that user profile is stored and searched in the specific embodiment of the invention.
Fig. 2 is the process flow diagram that user profile is stored and searched in the specific embodiment of the invention.
Embodiment
Further specify technical scheme of the present invention below in conjunction with accompanying drawing and by embodiment.
Fig. 1 is the system architecture schematic diagram that user profile is stored and searched in the specific embodiment of the invention.As shown in Figure 1, this is applied to the storage of user profile in the social networks and the system of searching comprises input media 101, shard engine 102, a plurality of database 103, server 104 and terminal 105.
Input media is connected with the shard engine, and the shard engine is connected with database, and the shard engine is connected with server, and server is connected with terminal.
Input media is input to the shard engine with the user profile data, the user profile data that the shard engine disperses rule that input media is sent according to inside are distributed to database and store respectively, and the user profile query statement sent of reception server, inquire about to the database of correspondence by built-in mechanism, obtain Query Result, send to server, database storing subscriber information data, the user profile query statement that the server receiving terminal is sent, be transmitted to the shard engine, and receive the Query Result that the shard engine is sent, return to terminal after Query Result integrated, terminal to server sends the user profile query statement, and the Query Result sent of reception server.
Fig. 2 is the process flow diagram that user profile is stored and searched in the specific embodiment of the invention.As shown in Figure 2, the flow process that user profile is stored and searched in this social networks may further comprise the steps:
Step 201, by input media the user profile data of magnanimity in the social networks are input to the shard engine.
Step 202, shard engine are distributed to a plurality of databases by parallel mode with the user profile data according to inside dispersion rule and store respectively, because storing process is executed in parallel, can reduce consuming time.
Step 203, social networking service device are transmitted to the shard engine with query statement after receiving the user profile query statement that terminal sends.
Step 204, shard engine are inquired about to the database of correspondence by built-in mechanism is parallel, obtain Query Result.
Step 205, social networking service device return after Query Result is integrated.
In whole flow process, the shard engine is between server application interface and the database, has acted on behalf of the operation of server to database.MYSHARD offers one of user " empty table ", be exactly that the user holds that table and carried out various operations (haset, hadelete, select) just, it has a powerful function is exactly can be at inner submeter, and the user has been covered this internal zone dividing but in fact.So needn't be concerned about for the user how many data volumes has, several hundred million tens hundred million can.MYSHARD inside may be finished with a MYSQL, several MYSQL or a few station server, is an empty table but represent all the time to the user.This powerful subregion is transparent to the user.
The corresponding inconvenience that brings is exactly that it has the concept of " subregion key ", and it utilizes this subregion key exactly, and the record that operate the user corresponds in that table in that database of that MYSQL of that concrete station server.So write application code, not only to know the KEY of this empty table, the impression of this subregion key also will be arranged.The where back of the order of MYSHARD will be caught up with this subregion key at once.Simply say, find the physics table according to the subregion key exactly, then statement is sent over and carried out, if but the where back is not at once with the subregion key, and leave no choice but so do, that have to this table not be done any subregion and only finishes with an entity list, etc. data volume surpass certain limit after performance will descend.
The above; only for the better embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with the people of this technology in the disclosed technical scope of the present invention; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (5)

1. user profile storage and the method for searching in the social networks is characterized in that, may further comprise the steps:
A, the user profile data are input to the shard engine;
B, shard engine are distributed to database according to inside dispersion rule with described user profile data and store respectively;
After C, social networking service device are received the user profile query statement, described query statement is transmitted to the shard engine;
D, shard engine are inquired about to the database of correspondence by built-in mechanism, obtain Query Result;
E, social networking service device return after Query Result is integrated.
2. the method that user profile is stored and searched in a kind of social networks according to claim 1 is characterized in that, among the step B, by parallel mode described user profile data is distributed to database and stores respectively.
3. the method that user profile is stored and searched in a kind of social networks according to claim 1 is characterized in that, among the step D, the shard engine walks abreast and inquires about to the database of correspondence by built-in mechanism.
4. user profile storage and the system of searching in the social networks, it is characterized in that, comprise input media, shard engine, database, server and terminal, input media is connected with the shard engine, the shard engine is connected with database, and the shard engine is connected with server, and server is connected with terminal, wherein
Input media is used for the user profile data are input to the shard engine;
The shard engine is used for being distributed to database according to the user profile data that inside disperses rule that input media is sent and stores respectively, and be used for the user profile query statement that reception server is sent, inquire about to the database of correspondence by built-in mechanism, obtain Query Result, send to server;
Database is used for the storing subscriber information data;
Server is used for the user profile query statement that receiving terminal is sent, and is transmitted to the shard engine, and is used for receiving the Query Result that the shard engine is sent, and returns to terminal after Query Result is integrated;
Terminal is used for sending the user profile query statement to server, and is used for the Query Result that reception server is sent.
5. the system that user profile is stored and searched in a kind of social networks according to claim 4 is characterized in that database is for being no less than 2 databases.
CN2012100703243A 2012-03-16 2012-03-16 Method and device for storing and searching user information in social network Pending CN103309902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100703243A CN103309902A (en) 2012-03-16 2012-03-16 Method and device for storing and searching user information in social network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100703243A CN103309902A (en) 2012-03-16 2012-03-16 Method and device for storing and searching user information in social network

Publications (1)

Publication Number Publication Date
CN103309902A true CN103309902A (en) 2013-09-18

Family

ID=49135139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100703243A Pending CN103309902A (en) 2012-03-16 2012-03-16 Method and device for storing and searching user information in social network

Country Status (1)

Country Link
CN (1) CN103309902A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107851164A (en) * 2015-07-27 2018-03-27 日本电信电话株式会社 Secure computing system, secret computing device, secret computational methods and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916261A (en) * 2010-07-28 2010-12-15 北京播思软件技术有限公司 Data partitioning method for distributed parallel database system
CN102333112A (en) * 2011-07-22 2012-01-25 深圳市财富万方信息技术有限公司 Method and system for sharing personal information on internet
CN102375853A (en) * 2010-08-24 2012-03-14 中国移动通信集团公司 Distributed database system, method for building index therein and query method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916261A (en) * 2010-07-28 2010-12-15 北京播思软件技术有限公司 Data partitioning method for distributed parallel database system
CN102375853A (en) * 2010-08-24 2012-03-14 中国移动通信集团公司 Distributed database system, method for building index therein and query method
CN102333112A (en) * 2011-07-22 2012-01-25 深圳市财富万方信息技术有限公司 Method and system for sharing personal information on internet

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107851164A (en) * 2015-07-27 2018-03-27 日本电信电话株式会社 Secure computing system, secret computing device, secret computational methods and program
CN107851164B (en) * 2015-07-27 2021-06-08 日本电信电话株式会社 Secret calculation system, secret calculation apparatus, secret calculation method, and storage medium

Similar Documents

Publication Publication Date Title
CN104636477B (en) The De-weight method of push list before a kind of information push
CN104182488A (en) Search method, server and client
CN101000623A (en) Method for image identification search by mobile phone photographing and device using the method
JP2011520201A5 (en)
CN102301358A (en) Textual disambiguation using social connections
CN103226393A (en) Input method and equipment
CN102591911A (en) Real-time personalized recommendation of location-related entities
CN103368992A (en) Message push method and device
CN102436513A (en) Distributed retrieval method and system
CN103942221B (en) Search method and equipment
CN104090901A (en) Method, device and server for processing data
WO2018190885A1 (en) Techniques to automate bot creation for web pages
CN102142035A (en) Method and equipment for sequencing multiple character information records
CN111125523A (en) Searching method, searching device, terminal equipment and storage medium
CN103020125A (en) Method for providing service resource, input method, server and electronic equipment
CN115039090A (en) Data query method, device, server and storage medium
CN115168338A (en) Data processing method, electronic device and storage medium
CN101753416A (en) Message sending method and device
CN102982034A (en) Internet website information search method and search system
CN102103606A (en) Technology for realizing advanced search of commodities on mobile phone client
CN101778124A (en) Method for accessing Internet by mobile client end and page access server
KR20130064447A (en) Method and appratus for providing search results using similarity between inclinations of users and device
CN103309902A (en) Method and device for storing and searching user information in social network
CN104750860A (en) Data storage method of uncertain data
CN101626628B (en) Digital number and web address mapping and pushing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20130918

RJ01 Rejection of invention patent application after publication