Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
As shown in Figure 1, in one embodiment, group's message storage method in a kind of social networks includes the following steps:
Step S102 receives group's message.
The data content of group's message includes group number and message content.When message content includes that message sends information, sends
Between and message body content.Message body content is the content input by user for indicating message semantics.
Step S104 extracts the group number and message content of group's message, generates the message SN of group's message.
The message SN of globally unique identifier's group's message is produced, i.e., the message SN of arbitrary two group's message is not
Together, the message SN of unique mark group's message in group is also produced, i.e. arbitrary two group's message of same group two disappears
It is different to cease sequence number.
Step S106 corresponds to the group number of group's message, message SN and message content in storage to tables of data.
Step S108 establishes the index of tables of data according to group number and message SN.
Can obtain the storage address of the record in tables of data, generate group number and message SN included in record and
The correspondence inventory of the storage address of record further, it is clear can to store the correspondence to get to the index of tables of data
It is single.
Step S110 refines the message attributes of group's message according to the message content of group's message.
Step S112 establishes the group number of group's message, the correspondence of message attributes and message SN.
The group number, message attributes and message SN of group's message can be corresponded in storage to tables of data or in file.
In one embodiment, in the correspondence of the group number of group's message, message attributes and message SN, a group disappears
The group number and message SN of breath are respectively formed one group of correspondence with each message attributes of this group's message.
Step S112 may include following steps:According to the message note of the quantity such as the number of the message attributes of group's message generation
Record, every Message Record includes group number, a message attributes and the message SN of group's message, and different messages record is included
Message attributes it is different;Store the Message Record of group's message.
In the present embodiment, each message attributes point of the group number and message SN and this group's message of group's message
One group of correspondence is not formed, rather than multiple message attributes of group's message are combined, further by this group
The group number and message SN of message are combined with the message attributes of this group's message establishes correspondence, in inquiry group's message
When only need to match single message attribute with single message attribute, without by single message attribute and group's message
The combination of multiple message attributes is matched, to which group information query speed can be improved.
In one embodiment, the message attributes of group's message of refinement include the popular words for being included, type feature and
At least one of sender of the message's mark.
Fig. 2 shows for the correspondence of the group number for the group's message established in one embodiment, message attributes and message SN
It is intended to.As shown in Fig. 2, for(Group number, sender, sending time, message SN, body matter)Respectively(" 80000 ",
" 10000 ", " 20140213 ", " 887 ", " communication Shenzhen ")With(" 80000 ", " 20000 ", " 20140214 ", " 888 ", " immediately
Communication ")Two group's message, the message attributes that can be refined from first group's message include:Sender identifies " 10000 ", institute
Including popular words " Shenzhen ", the popular words " communication " that is included, the message attributes that can be refined from Article 2 group's message
Including:Sender's mark " 20000 ", the popular words " instant " for being included, the popular words " communication " for being included;Further
, group number and each message attributes are established into correspondence as shown in Figure 2 with corresponding message SN.
In one embodiment, according to message content refine group's message included popular words the step of include:According to
Popular words in the body matter for the words extraction message content that pre-stored hot topic character word stock is included.
The body matter of message content can be segmented, obtain independent words;Further, it can extract independent word
The words being included in word in the popular character word stock pre-established.The body matter of message content is carried out participle can be according to existing
The segmenting method based on string matching, the segmenting method based on understanding and the segmenting method based on statistics etc. progress,
This is repeated no more.Further, all words progress of each independent words that participle can be obtained and popular character word stock
Match, judge whether each independent words is included in popular character word stock, and records the words being included in popular character word stock.
Alternatively, the words being included in pre-stored popular character word stock in the body matter of message content can be obtained.Tool
Body, each words in popular character word stock can be matched with the body matter of message content, judge whether it is included in
In body matter, record is included in the words in body matter.
In one embodiment, before the step of refining the popular words that group's message is included according to message content, on
It further includes establishing the process of popular character word stock to state group's message storage method in social networks, is included the following steps:Statistics is specified
Words frequency of occurrence in web page contents;It is popular words to obtain the words that frequency of occurrence is more than threshold value;Storage hot topic words is extremely
Database is to establish popular character word stock.
In one embodiment, the step of refining the type feature of group's message according to message content includes below at least one
A step:
(1)Judge the time type belonging to group's message according to the sending time in message content, by belonging to group's message when
Between type be added to the type feature of group message.
Time type may include transmission types and the outer transmission types of specific time etc. in specific time.If sending time belongs to
In specific time, then judge that group message belongs to specific time transmission types, otherwise, belongs to the outer transmission types of specific time.
(2)Judge the transmission belonging to group's message according to the corresponding group members classification of sender of the message's information in message content
Sender's categories class belonging to group's message is added to the type feature of group message by person's categories class.
Sender's classification may include group master, administrator and common group members etc.;Correspondingly, sender's categories class may include
The main transmission types of group, administrator's transmission types and common group members transmission types etc..
(3)Judge the transmission belonging to group's message according to the corresponding group members grade of sender of the message's information in message content
Sender's rating-type belonging to group's message is added to the type feature of group message by person's rating-type.
Sender's grade may include new hand's grade, intermediate, advanced and senior grade etc.;Correspondingly, sender's rating-type can wrap
Include new hand's grade transmission types, intermediate transmission types, advanced transmission types and senior grade transmission types etc..
(4)Judge whether the body matter in message content includes picture, if so, picture relevant information is added to group
The type feature of message.
In one embodiment, being added to the picture relevant information of the type feature of message content can be:Including picture.
The type feature of message content includes:Including picture, then include picture in description messages content.
In another embodiment, the picture/mb-type belonging to picture that recognizable message content includes.Picture/mb-type can wrap
Include self-defined expression type, system expression type and sectional drawing type etc..Specifically, can by picture that message content includes with prestore
Self-defined expression and system expression matching, to judge whether the picture that message content includes is self-defined expression or system table
Feelings, neither the picture of nonsystematic expression can determine that as sectional drawing self-defined expression again.Further, the figure that can include by message content
Picture/mb-type belonging to piece is added to the type feature of message content.
(5)The body matter in message content is judged whether comprising link, if so, link relevant information is added to group
The type feature of message.
In one embodiment, being added to the picture relevant information of the type feature of message content can be:Including link.
The type feature of message content includes:Including link, then include link in description messages content.
In another embodiment, the link type belonging to link that recognizable message content includes.Link type can wrap
Include music links type, video link type, Shopping directery type, news links type, social link type, financial links category
Type, diet link type, healthy link type and sport link type etc..Specifically, chained address can be prestored and linked
The correspondence of type judges the link type belonging to link that message content includes according to the correspondence.Further, may be used
Link type belonging to link that message content includes is added to the type feature of message content.
(6)The text length class belonging to group's message is judged according to the number of words of the body matter in message content or number of characters
The long short type of text belonging to group's message is added to the type feature of group message by type.
Long short type may include belonging to long message type and short message types etc..If the word of the body matter in message content
Number or number of characters are more than threshold value, then can determine that group message belongs to long message type, otherwise, can determine that group message belongs to short message class
Type.
(7)Judge whether group's message belongs to system message according to the body matter in message content, if so, system is disappeared
Breath relevant information is added to the type feature of group message.Whether can include preset system according to the body matter in message content
Message marks(Such as the printed words of " system message ")To judge whether group message belongs to system message.
In one embodiment, being added to the system message relevant information of the type feature of message content can be:Belong to
System message.The type feature of message content includes:Belong to system message, then illustrates that group message belongs to system message.
In another embodiment, it can recognize that the system message type belonging to group's message.System message type may include group
Photograph album notice, group's video/verbal announcement, group's documentary information, group's notice, group's applicative notifications, group members Notification of Changes and group
Grade Notification of Changes etc..Specifically, whether can include corresponding system message type mark according to the body matter in message content
Remember to judge the system message type belonging to group message.Further, the system message type belonging to group's message can be added to
The type feature of group's message.
As shown in figure 3, in one embodiment, group's message query method in a kind of social network client, including with
Lower step:
Step S302 shows message attributes input control.
In one embodiment, message attributes input control includes key word of the inquiry input control, type of message selection control
At least one of part and sender of the message's information input control.
Wherein, key word of the inquiry input control is for inputting the words that group's message to be checked is included;Type of message selects
Control is used to select the type feature of group's message to be checked;Sender of the message's information input control is for inputting group's message to be checked
Sender of the message's information.
In one embodiment, type of message selection control includes at least one of following control:
For selecting the control of the time type belonging to group's message to be checked, for selecting the hair belonging to group's message to be checked
The control of the person's of sending categories class, the control for selecting sender's rating-type belonging to group's message to be checked are waited for for selection
It inquires the control of the picture relevant information of group's message, the control of link relevant information for selecting group's message to be checked, be used for
Select the control of the long short type of text belonging to group's message to be checked related to for selecting the system message of group's message to be checked
The control etc. of information.
Step S304 obtains the message attributes of input by message attributes input control.
Step S306 receives the instruction for inquiring group's message in designated group according to message attributes.
Step S308, by the group number of designated group and message attributes encapsulation information query request in groups.
Step S310 sends the request of group's information query to server.
Server may include that social networks described below takes according to the process of group's information query acquisition request query result
The step being engaged in group's message query method in device, details are not described herein.
Step S312 receives group's information query that server returns and asks corresponding query result.
Step S314, the message content that display query result includes.
As shown in figure 4, in one embodiment, group's message query method in a kind of social network server, including with
Lower step:
Step S402 receives the request of group's information query, and inquiry request includes the group number and message attributes of group's message to be checked.
In one embodiment, the message attributes of group's message include that group message words that is included, the type of group's message are special
At least one of the sender of the message's information for group message of seeking peace.
In one embodiment, type feature includes at least one of following characteristics:Group message belonging to time type,
Sender's categories class belonging to group's message, sender's rating-type belonging to group's message, the picture relevant information of group's message, group
The system message relevant information of the long short type of text and group's message belonging to the link relevant information of message, group's message.
Step S404 is looked into the correspondence of the group number of the group's message pre-established, message attributes and message SN
The group number and the corresponding message SN of message attributes for looking for group's message to be checked, obtain the message SN of group's message to be checked.
Step S406, in group number, the data of message SN and message content for storing group's message pre-established
In the index of table, corresponding storage address is searched according to the group number of group's message to be checked and message SN.
Step S408 reads message content according to corresponding storage address, obtains query result.
In one embodiment, in the correspondence of the group number of group's message, message attributes and message SN, a group disappears
The group number and message SN of breath are respectively formed one group of correspondence with each message attributes of this group's message;Such as Fig. 5 institutes
Show, step S404 includes the following steps:
Step S502 partners each message attributes of the group number of group's message to be checked and group's message to be checked pass
Key word.
Step S504 is looked into the correspondence of the group number of the group's message pre-established, message attributes and message SN
Look for the corresponding message SN of every a pair of of keyword.
Step S506 obtains the intersection per the corresponding message SN of a pair of of keyword, obtains disappearing for group's message to be checked
Cease sequence number.
Certain corresponding message SN of a pair of keyword is the message SN for meeting this to the message attributes in keyword,
And it is then the message for all message attributes for meeting group's message to be checked per the intersection of the corresponding message SN of a pair of of keyword
Sequence number.
In one embodiment, group's message in a kind of social networks stores querying method, including any of the above-described embodiment
In social networks in group's message storage method, group's message query method and social networking service in social network client
The step in group's message query method in device.
Fig. 6 A and Fig. 6 B are storage group's message of group's message storage querying method in the social networks in one embodiment
Process and inquiry group's message process application scenarios schematic diagram.As shown in Figure 6A, the process of storage group's message includes following
Step:
(1.1)Group's server receives group's message that client is sent.
(1.2)The group number and message content of group's server extraction group's message, generate the message SN of group's message.
(1.3)The group number of group's message, message SN and message content are corresponded to storage and arrive group's message data by group's server
In the tables of data in library.
(1.4)Group's server establishes the index of tables of data according to group number and message SN, and the index of foundation is stored
Into group's message database.
(1.5)The message content of group's message and message SN are sent to attribute and refine server by group's server.
(1.6)Attribute refines the message attributes that server refines group's message according to the message content of group's message.
(1.7)Attribute refine server using the group number of group's message and message attributes as key, with the message SN of group's message
Key-value pair is formed for value, and key-value pair is encrypted.
(1.8)Encrypted key-value pair is sent to search platform.
(1.9)The key-value pair that search platform storage receives.
As shown in Figure 6B, the process of inquiry group's message includes the following steps:
(2.1)Client shows message attributes input control, and the message category of input is obtained by message attributes input control
Property, the instruction for inquiring group's message in designated group according to message attributes is received, the group number of designated group and message attributes are packaged into
Group's information query request.
(2.2)Client sends the request of group's information query and refines server to attribute.
(2.3)Attribute refines server and receives the request of group's information query, and inquiry request includes the group number of group's message to be checked
And message attributes, attribute refine server according to(1.7)In cipher mode, by the group number and message attributes of group's message to be checked
It is encrypted.
(2.4)The group number of encrypted group's message to be checked and message attributes are sent to search platform.
(2.5)Search platform pre-stored group number and message attributes in the key-value pair of message SN composition, with
The group number and message attributes of group's message to be checked are that key searches corresponding message SN, obtain the message sequence of group's message to be checked
Row number.
(2.6)The message SN of group's message to be checked is sent to attribute and refines server by search platform.
(2.7)Attribute refine server according to the symmetrical decryption method of encryption method by the message of group's message to be checked
Sequence number is decrypted.
(2.8)Attribute refine server in group's message database for store the group number of group's message, message SN and
In the index of the tables of data of message content, corresponding storage is searched according to the group number of group's message to be checked and message SN
Message content is read in location according to corresponding storage address, obtains group information query and asks corresponding query result.
(2.9)Attribute, which refines server, asks corresponding query result to return to client group's information query.
(2.10)Client receives attribute and refines the corresponding query result of group's information query request that server returns, client
End shows the message content that query result includes.
In the present embodiment, the key-value pair that group number and message attributes are formed with message SN is stored separately in search platform
In, it is stored separately with the message data being stored in group message database, and message sequence is searched according to group number and message attributes
Row number and message content is searched according to group number and message SN service is refined by the attribute with independent processing ability respectively
Device and search platform are completed, so as to accelerate query processing speed;And it is stored in the group number in search platform and message category
Property the key-value pair that is formed with message SN be that can effectively reduce information leakage risk by encrypted, improve information security.
As shown in fig. 7, in one embodiment, group's message storage system in a kind of social networks, including group's message connect
Module 702, group number and content extraction module 704 are received, sequence number generation module 706, message storage module 708, indexes and establishes mould
Block 710, attribute refine module 712 and attribute corresponding relation building module 714, wherein:
Group's message reception module 702 is for receiving group's message.
The data content of group's message includes group number and message content.When message content includes that message sends information, sends
Between and message body content.Message body content is the content input by user for indicating message semantics.
Group number and content extraction module 704 are used to extract the group number and message content of group's message.
Sequence number generation module 706 is used to generate the message SN of group's message.
Sequence number generation module 706 produces the message SN of globally unique identifier's group's message, i.e., arbitrary two groups disappear
The message SN of breath is different, also produces the message SN of unique mark group's message in group, i.e. same group two appoints
The message SN of two group's message of meaning is different.
Message storage module 708, which is used to the group number of group's message, message SN and message content corresponding to storage, arrives data
In table.
Index establishes index of the module 710 for establishing tables of data according to group number and message SN.
Index establishes the storage address for the record that module 710 can obtain in tables of data, generates group number included in record
Correspondence inventory with the storage address of message SN and record further, can be deposited to get to the index of tables of data
Store up the correspondence inventory.
Attribute refines the message attributes that module 712 is used to refine group's message according to the message content of group's message.
Attribute corresponding relation building module 714 is used to establish pair of the group number of group's message, message attributes and message SN
It should be related to.
The group number, message attributes and message SN of group's message can be corresponded to and be stored by attribute corresponding relation building module 714
To in tables of data or in file.
In one embodiment, in the correspondence of the group number of group's message, message attributes and message SN, a group disappears
The group number and message SN of breath are respectively formed one group of correspondence with each message attributes of this group's message.
Attribute corresponding relation building module 714 can be remembered according to the message of the quantity such as the number of the message attributes of group's message generation
Record, every Message Record includes group number, a message attributes and the message SN of group's message, and different messages record is included
Message attributes it is different, further, store the Message Record of group's message.
In the present embodiment, each message attributes point of the group number and message SN and this group's message of group's message
One group of correspondence is not formed, rather than multiple message attributes of group's message are combined, further by this group
The group number and message SN of message are combined with the message attributes of this group's message establishes correspondence, in inquiry group's message
When only need to match single message attribute with single message attribute, without by single message attribute and group's message
The combination of multiple message attributes is matched, to which group information query speed can be improved.
In one embodiment, the message attributes of group's message of attribute refinement module 712 refinement include included hot topic
At least one of words, type feature and sender of the message's mark.
As shown in figure 8, in one embodiment, it includes popular words extraction module 802, type that attribute, which refines module 712,
Feature refines module 804 and sender's marker extraction module 808, wherein:
Popular words extraction module 802, for extracting the popular words that group's message is included according to message content.
Type feature refines module 804, the type feature for refining group's message according to message content.
Sender's marker extraction module 806, the sender for extracting group's message according to message content identify.
In another embodiment, attribute refines popular words extraction module 802, the type spy that module 712 can include only
Sign refines any one or any two module in module 804 and sender's marker extraction module 806.
In one embodiment, popular words extraction module 802 for being included according to pre-stored popular character word stock
Words extraction message content body matter in popular words.
Popular words extraction module 802 can segment the body matter of message content, obtain independent words;Into one
Step, it can extract the words in the popular character word stock for being included in and pre-establishing in independent words.It will be in the text of message content
Appearance carries out participle can be according to the existing segmenting method based on string matching, the segmenting method based on understanding and based on statistics
The equal of segmenting method carries out, and details are not described herein.Further, popular words extraction module 802 can obtain participle each
Independent words is matched with all words of popular character word stock, judges whether each independent words is included in popular words
In library, and record the words being included in popular character word stock.
Alternatively, popular words extraction module 802, which can obtain in pre-stored popular character word stock, is included in message content
Words in body matter.Specifically, popular words extraction module 802 can by each words in popular character word stock in message
The body matter of appearance is matched, and judges whether it is included in body matter, and record is included in the words in body matter.
In one embodiment, group's message storage system in above-mentioned social networks further includes that popular character word stock establishes module
(It is not shown in figure), for counting the words frequency of occurrence in named web page content, obtain the words that frequency of occurrence is more than threshold value
For popular words, stores popular words and establish popular character word stock to database.
In one embodiment, it includes that time type refines module, sender's categories class that type feature, which refines module 804,
Refine module, sender's rating-type refines module, pictorial information refines module, link information refines module, text length class
Type refines module and system message information abstraction module(The above module is not shown in figure)At least one of module, wherein:
Time type refines module and is used to judge the time type belonging to group's message according to the sending time in message content,
Time type belonging to group's message is added to the type feature of group message.
Time type may include transmission types and the outer transmission types of specific time etc. in specific time.If sending time belongs to
In specific time, then time type refinement module judgement group's message belongs to specific time transmission types, otherwise, it is determined that group's message category
In transmission types outside specific time.
Sender's categories class refines module and is used for according to the corresponding group members of sender of the message's information in message content
Classification judges sender's categories class belonging to group's message, and sender's categories class belonging to group's message is added to group message
Type feature.
Sender's classification may include group master, administrator and common group members etc.;Correspondingly, sender's categories class may include
The main transmission types of group, administrator's transmission types and common group members transmission types etc..
Sender's rating-type refines module and is used for according to the corresponding group members of sender of the message's information in message content
Grade judges sender's rating-type belonging to group's message, and sender's rating-type belonging to group's message is added to group message
Type feature.
Sender's grade may include new hand's grade, intermediate, advanced and senior grade etc.;Correspondingly, sender's rating-type can wrap
Include new hand's grade transmission types, intermediate transmission types, advanced transmission types and senior grade transmission types etc..
Pictorial information refines module and is used to judge whether the body matter in message content to include picture, if so, will figure
Piece relevant information is added to the type feature of group message.
In one embodiment, being added to the picture relevant information of the type feature of message content can be:Including picture.
The type feature of message content includes:Including picture, then include picture in description messages content.
In another embodiment, pictorial information refines the picture category belonging to the picture that module can recognize that message content includes
Type.Picture/mb-type may include self-defined expression type, system expression type and sectional drawing type etc..Specifically, pictorial information refines
Module can match the picture that message content includes with the self-defined expression and system expression to prestore, to judge that message content includes
Picture whether be self-defined expression or system expression, neither the picture of self-defined expression nonsystematic expression again can determine that cut
Figure.Further, pictorial information refines module and the picture/mb-type belonging to picture that message content includes can be added in message
The type feature of appearance.
Link information refines module and is used to judge whether the body matter in message content to include link, if so, by chain
Connect the type feature that relevant information is added to group message.
In one embodiment, being added to the picture relevant information of the type feature of message content can be:Including link.
The type feature of message content includes:Including link, then include link in description messages content.
In another embodiment, link information refines the links category belonging to the link that module can recognize that message content includes
Type.Link type may include music links type, video link type, Shopping directery type, news links type, social link
Type, financial link type, diet link type, healthy link type and sport link type etc..Specifically, above-mentioned storage system
System further includes link type memory module(It is not shown in figure), the correspondence for storing chained address and link type, chain
Connect the link type belonging to the link that information abstraction module can judge that message content includes according to the correspondence.Further,
Link information, which refines module, can be added to the link type belonging to link that message content includes the type feature of message content.
The long short type of text refines module and is used to judge group according to the number of words or number of characters of the body matter in message content
The long short type of text belonging to group's message is added to the type feature of group message by the long short type of text belonging to message.
Long short type may include belonging to long message type and short message types etc..If the word of the body matter in message content
Number or number of characters are more than threshold value, then the long short type of text refines module and can determine that group message belongs to long message type, otherwise, text
Long short type refines module and can determine that group message belongs to short message types.
System message information abstraction module is used to judge whether group's message belongs to according to the body matter in message content
System message, if so, system message relevant information to be added to the type feature of group message.System message information abstraction module can
Whether include preset system message label according to the body matter in message content(Such as the printed words of " system message ")To sentence
Whether disconnected group's message belongs to system message.
In one embodiment, being added to the system message relevant information of the type feature of message content can be:Belong to
System message.The type feature of message content includes:Belong to system message, then illustrates that group message belongs to system message.
In another embodiment, system message information abstraction module can recognize that the system message type belonging to group's message.
System message type may include that faciation volume notice, group's video/verbal announcement, group's documentary information, group's notice, group's application are logical
Know, group members Notification of Changes and group's grade Notification of Changes etc..Specifically, system message information abstraction module can be according to message content
In body matter whether judge the system message type belonging to group message comprising corresponding system message type mark.Into one
Step, the system message type belonging to group's message can be added to the type feature of group message by system message information abstraction module.
As shown in figure 9, in one embodiment, group's information query client in a kind of social networks, including display mould
Block 902, command reception module 906, is asked package module 908, request sending module 910 and is looked at message attributes acquisition module 904
Result receiving module 912 is ask, wherein:
Display module 902 is for showing message attributes input control.
In one embodiment, message attributes input control includes key word of the inquiry input control, type of message selection control
At least one of part and sender of the message's information input control.
Wherein, key word of the inquiry input control is for inputting the words that group's message to be checked is included;Type of message selects
Control is used to select the type feature of group's message to be checked;Sender of the message's information input control is for inputting group's message to be checked
Sender of the message's information.
In one embodiment, type of message selection control includes at least one of following control:
For selecting the control of the time type belonging to group's message to be checked, for selecting the hair belonging to group's message to be checked
The control of the person's of sending categories class, the control for selecting sender's rating-type belonging to group's message to be checked are waited for for selection
It inquires the control of the picture relevant information of group's message, the control of link relevant information for selecting group's message to be checked, be used for
Select the control of the long short type of text belonging to group's message to be checked related to for selecting the system message of group's message to be checked
The control etc. of information.
Message attributes acquisition module 904 is used to obtain the message attributes of input by message attributes input control.
Command reception module 906 is for receiving the instruction for inquiring group's message in designated group according to message attributes.
Package module 908 is asked to be used for the group number of designated group and message attributes encapsulation information query request in groups.
Request sending module 910 is for sending the request of group's information query to server.
Process of the server according to group's information query acquisition request query result and the group in social networks described below
Message query server is identical according to the process of group's information query acquisition request query result, and details are not described herein.
Group's information query that query result receiving module 912 is used to receive server return asks corresponding query result.
Display module 902 is additionally operable to the message content that display query result includes.
As shown in Figure 10, in one embodiment, group's message query server in a kind of social networks, including request connect
Module 1002, sequence number searching module 1004, storage address searching module 1006 and message content read module 1008 are received,
In:
For request receiving module 1002 for receiving the request of group's information query, inquiry request includes the group number of group's message to be checked
And message attributes.
In one embodiment, the message attributes of group's message include that group message words that is included, the type of group's message are special
At least one of the sender of the message's information for group message of seeking peace.
In one embodiment, type feature includes at least one of following characteristics:Group message belonging to time type,
Sender's categories class belonging to group's message, sender's rating-type belonging to group's message, the picture relevant information of group's message, group
The system message relevant information of the long short type of text and group's message belonging to the link relevant information of message, group's message.
Sequence number searching module 1004 is used in the group number of the group's message pre-established, message attributes and message SN
The group number and the corresponding message SN of message attributes that group's message to be checked is searched in correspondence, obtain group's message to be checked
Message SN.
Storage address searching module 1006 be used for pre-establish the group number for storing group message, message SN and
In the index of the tables of data of message content, corresponding storage is searched according to the group number of group's message to be checked and message SN
Location.
Message content read module 1008 is used to read message content according to corresponding storage address, obtains query result.
In one embodiment, in the correspondence of the group number of group's message, message attributes and message SN, a group disappears
The group number and message SN of breath are respectively formed one group of correspondence with each message attributes of this group's message;Such as Figure 11 institutes
Show, sequence number searching module 1004 includes that keyword obtains list to component units 1102, sequence number searching unit 1104 and intersection
Member 1106, wherein:
Keyword is used to disappear each of the group number of group's message to be checked and group's message to be checked to component units 1102
Breath attribute partners keyword.
Sequence number searching unit 1104 is used in the group number of the group's message pre-established, message attributes and message SN
It is searched in correspondence per the corresponding message SN of a pair of of keyword.
Intersection acquiring unit 1106 is used to obtain the intersection of the corresponding message SN of every a pair of of keyword, obtains to be checked
The message SN of group's message.
Certain corresponding message SN of a pair of keyword is the message SN for meeting this to the message attributes in keyword,
And it is then the message for all message attributes for meeting group's message to be checked per the intersection of the corresponding message SN of a pair of of keyword
Sequence number.
In a kind of social networks in group's message storage inquiry system, including any of the above-described embodiment in social networks
Group's message query server in group's information query client and social networks in group's message storage system, social networks is wrapped
The module included.
As shown in figure 12, in a specific embodiment, group's message in above-mentioned social networks stores inquiry system, packet
It includes with lower module:
Group's message reception module 702, group number and content extraction module 704, sequence number generation module 706, message store mould
Block 708, index establish module 710 and message transmission module 1202, are distributed on group message server 10;
Attribute refines module 712, key-value pair sets up module 1204, encrypting module 1206, key-value pair sending module 1208, asks
Receiving module 1002, key sending module 1210, deciphering module 1214, storage address searching module 1006, message content is asked to read
Module 1008, query result return to module 1216, are distributed in attribute and refine on server 20;
Attribute corresponding relation building module 714, sequence number searching module 1004 and sequence number sending module 1212, are distributed in
On search platform 30;
And display module 902, message attributes acquisition module 904, command reception module 906, request package module 908,
Request sending module 910 and query result receiving module 912, in distribution in client 40.
During group's message storage inquiry system in social networks stores group's message:
Group's message reception module 702 is used to receive group's message of the transmission of client 40.
Group number and content extraction module 704 are used to extract the group number and message content of group's message, sequence number generation module 706
Message SN for generating group's message.
Message storage module 708 is used to the group number of group's message, message SN and message content corresponding to storage to disappear to group
In the tables of data for ceasing database.
Index establishes the index that module 710 establishes tables of data according to group number and message SN, and the index of foundation is deposited
It stores up in group's message database.
Message transmission module 1202, which is used to the message content of group's message and message SN being sent to attribute, refines service
Device 20.
Attribute refines the message attributes that module 712 is used to refine group's message according to the message content of group's message.
Key-value pair is set up module 1204 and is used for using the group number of group's message and message attributes as key, with the message sequence of group's message
Number key-value pair is formed for value.
Encrypting module 1206 is for key-value pair to be encrypted.
Key-value pair sending module 1208 is used to encrypted key-value pair being sent to search platform 30.
Attribute corresponding relation building module 714 is for storing the key-value pair received.
During group's message storage inquiry system in social networks inquires group's message:
Display module 902 is for showing that message attributes input control, message attributes acquisition module 904 are used to pass through message category
Property input control obtain input message attributes, command reception module 906 for receive looked into designated group according to message attributes
The instruction of group's message is ask, request package module 908 is used to the group number of designated group and message attributes encapsulating information query in groups and ask
It asks.
Request sending module 910 refines server 20 for sending the request of group's information query to attribute.
For request receiving module 1002 for receiving the request of group's information query, inquiry request includes the group number of group's message to be checked
And message attributes.
Encrypting module 1206 is additionally operable to the group number of group's message to be checked and to disappear in such a way that key-value pair is encrypted
Breath attribute is encrypted.
Key sending module 1210 is used to the group number of encrypted group's message to be checked and message attributes being sent to search flat
Platform 30.
Sequence number searching module 1004 is used for the key in pre-stored group number and message attributes and message SN composition
It is worth centering, corresponding message SN is searched as key using the group number of group's message to be checked and message attributes, group to be checked is obtained and disappears
The message SN of breath.
Sequence number sending module 1212, which is used to the message SN of group's message to be checked being sent to attribute, refines server
20。
Deciphering module 1214 be used for according to the symmetrical decryption method of encryption method by the message sequence of group's message to be checked
Row number is decrypted.
Storage address searching module 1006 is for group number, the message sequence for storing group's message in group's message database
Number and message content tables of data index in, corresponding storage is searched according to the group number of group's message to be checked and message SN
Address, message content read module 1008 are used to read message content according to corresponding storage address, obtain group information query and ask
Seek corresponding query result.
Query result returns to module 1216 and is used to ask corresponding query result to return to client 40 group's information query.
Query result receiving module 912 is used to receive group's information query that attribute refinement server returns and asks corresponding look into
Ask result.
Display module 902 is additionally operable to the message content that display query result includes.
In the present embodiment, the key-value pair that group number and message attributes are formed with message SN is stored separately in search platform
In, it is stored separately with the message data being stored in group message database, and message sequence is searched according to group number and message attributes
Row number and message content is searched according to group number and message SN service is refined by the attribute with independent processing ability respectively
Device and search platform are completed, so as to accelerate query processing speed;And it is stored in the group number in search platform and message category
Property the key-value pair that is formed with message SN be that can effectively reduce information leakage risk by encrypted, improve information security.
Group's message storage method in above-mentioned social networks and system not only generate the message SN of group's message, by group
Group number, message SN and the message content of message correspond in storage to tables of data, are established and be somebody's turn to do according to group number and message SN
The index of tables of data also refines pair of the message attributes of group's message, the group number for establishing group's message, message attributes and message SN
It should be related to, so that when inquiring group's message, corresponding disappear can be searched according to the group number and message attributes of group's message to be checked
Sequence number is ceased, corresponding storage address is further searched in the index of tables of data according to group number and message SN, according to depositing
It stores up address and obtains corresponding group's message, during searching corresponding message SN according to group number and message attributes, it is only necessary to
The group number of group's message to be checked and message attributes are matched with the group number of storage and message attributes, without that will inquire
Keyword scans for matching to judge whether key word of the inquiry is contained in message, so as to add with entire message body matter
Fast inquiry velocity, and corresponding storage address is searched according to group number and message SN in the index and is obtained according to storage address
It is also fastish process to obtain corresponding group's message, and therefore, group's message storage method and system in above-mentioned social networks are deposited
The mode for storing up group's message may make the speed of inquiry group's message to be greatly improved.
Group's information query client in group's message query method and social networks in above-mentioned social network client is led to
The message attributes that message attributes input control obtains input are crossed, by group number and message attributes encapsulation information query request transmission in groups
To server so that server can search group's message according to group number and message attributes, relative to all records in tables of data
Search matches keyword to be checked in entire message body matter, and the speed for finding target message can be improved.
Group's message query server in group's message query method and social networks in above-mentioned social network server, root
Corresponding message SN is searched according to the group number and message attributes of group's message to be checked, further according to group number and message SN
Corresponding storage address is searched in the index of tables of data, and corresponding group's message is obtained according to storage address, according to group number and is disappeared
Cease during attribute searches corresponding message SN, it is only necessary to by the group number of group's message to be checked and message attributes with deposit
The group number and message attributes of storage are matched, without scanning for matching key word of the inquiry with entire message body matter
To judge whether key word of the inquiry is contained in message, so as to accelerate inquiry velocity, and existed according to group number and message SN
It is also fastish process to search corresponding storage address in index and obtain corresponding group's message according to storage address, because
This, may make the speed of inquiry group's message to be greatly improved.
Similarly, the side of the storage and inquiry group's message of the group's message storage querying method and system in above-mentioned social networks
Formula may make the speed of inquiry group's message to be greatly improved.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, in the embodiment of the present invention, which can be stored in the storage medium of computer system, and by the computer system
At least one processor executes, and includes the flow such as the embodiment of above-mentioned each method with realization.Wherein, the storage medium can be
Magnetic disc, CD, read-only memory(Read-Only Memory, ROM)Or random access memory(Random Access
Memory, RAM)Deng.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
Cannot the limitation to the scope of the claims of the present invention therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.