Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, in one embodiment, a kind of group's message stores method in social networks, comprises the following steps:
Step S102, receives group's message.
The data content of group's message comprises group number and message content.Message content comprises message and sends information, transmitting time and message body content.Message body content is the content of the expression message semantics that user inputs.
Step S104, extracts group number and the message content of group message, generates the message SN of group's message.
Can generate the message SN of globally unique identifier group message, namely the message SN of any two group's message is different, also can generate the message SN of unique identification group message in group, and namely the message SN of any two group's message of same group two is different.
Step S106, by the group of group's message number, message SN and message content corresponding stored in tables of data.
Step S108, sets up the index of tables of data according to group number and message SN.
The memory address of the record in tables of data can be obtained, generate the corresponding relation inventory of the memory address of the group that comprises in record number and message SN and record, namely obtain the index of tables of data, further, this corresponding relation inventory can be stored.
Step S110, refines the message attributes of group's message according to the message content of group's message.
Step S112, sets up the corresponding relation of the group number of group's message, message attributes and message SN.
Can by the group of group's message number, message attributes and message SN corresponding stored to tables of data or in file.
In one embodiment, in the corresponding relation of the group of group's message number, message attributes and message SN, each message attributes of the group of group's message number and message SN and this group's message forms one group of corresponding relation respectively.
Step S112 can comprise the following steps: according to the Message Record of the quantity such as the number generation of the message attributes of group's message, every bar Message Record comprises the group number of group message, a message attributes and message SN, and the message attributes that different messages record comprises is different; Store the Message Record of group's message.
In the present embodiment, article one, the group number of group's message forms one group of corresponding relation respectively with each message attributes of message SN and this group's message, instead of multiple message attributes of group's message are combined, further the message attributes of the group of this group's message number and message SN and this group's message is combined and set up corresponding relation, thus only need single message attributes to mate with single message attributes when inquiring about group's message, and do not need the combination of single message attributes with multiple message attributes of group's message to mate, thus group information query speed can be improved.
In one embodiment, the message attributes of group's message of refinement comprises at least one in comprised popular words, type feature and sender of the message's mark.
Fig. 2 is the corresponding relation schematic diagram of the group number of the group's message set up in an embodiment, message attributes and message SN.As shown in Figure 2, for (group number, sender, transmitting time, message SN, body matter) be respectively (" 80000 ", " 10000 ", " 20140213 ", " 887 ", " communication Shenzhen ") and (" 80000 ", " 20000 ", " 20140214 ", " 888 ", " instant messaging ") two group's message, the message attributes can refined from Article 1 group message comprises: sender identifies " 10000 ", the popular words " Shenzhen " comprised, the popular words " communication " comprised, the message attributes can refined from Article 2 group message comprises: sender identifies " 20000 ", the popular words " immediately " comprised, the popular words " communication " comprised, further, group number and each message attributes and corresponding message SN are set up corresponding relation as shown in Figure 2.
In one embodiment, the step of refining according to message content the popular words that group message comprises comprises: the words comprised according to the popular character word stock prestored extracts the popular words in the body matter of message content.
The body matter of message content can be carried out participle, obtain independently words; Further, the words be included in the popular character word stock set up in advance can be extracted in independently words.The body matter of message content is carried out participle can according to the existing segmenting method based on string matching, based on understand segmenting method and Corpus--based Method segmenting method etc. carry out, do not repeat them here.Further, participle can be obtained each independently words mate with all words of popular character word stock, judge each independently words whether be included in popular character word stock, and record the words that is included in popular character word stock.
Or, the words be included in the body matter of message content can be obtained in the popular character word stock prestored.Concrete, each words in popular character word stock can be mated with the body matter of message content, judge whether it is included in body matter, record the words be included in body matter.
In one embodiment, before the step of refining the popular words that group's message comprises according to message content, group's message stores method in above-mentioned social networks also comprises the process setting up popular character word stock, comprises the following steps: the words frequency of occurrence in statistics named web page content; The words that acquisition frequency of occurrence exceedes threshold value is popular words; Store popular words to database to set up popular character word stock.
In one embodiment, the step of refining the type feature of group's message according to message content comprises at least one following step:
(1) judge the time type belonging to group's message according to the transmitting time in message content, the time type belonging to group's message is added to the type feature of group message.
Time type can comprise transmission types and the outer transmission types of special time etc. in special time.If transmitting time belongs in special time, then judge that group's message belongs to special time transmission types, otherwise, belong to the outer transmission types of special time.
(2) corresponding according to the sender of the message's information in message content group members classification judges the sender's categories class belonging to group's message, the sender's categories class belonging to group's message is added to the type feature of group message.
Sender's classification can comprise group master, keeper and common group members etc.; Accordingly, sender's categories class can comprise the main transmission types of group, keeper's transmission types and common group members transmission types etc.
(3) corresponding according to the sender of the message's information in message content group members grade judges the sender's rating-type belonging to group's message, the sender's rating-type belonging to group's message is added to the type feature of group message.
Sender's grade can comprise new hand's level, middle rank, senior and senior level etc.; Accordingly, sender's rating-type can comprise new hand's level transmission types, intermediate transmission types, senior transmission types and senior level transmission types etc.
(4) judge whether the body matter in message content comprises picture, if so, then picture relevant information is added to the type feature of group message.
In one embodiment, the picture relevant information being added to the type feature of message content can be: comprise picture.The type feature of message content comprises: comprise picture, then comprise picture in description messages content.
In another embodiment, the picture/mb-type belonging to picture that comprises of identifiable design message content.Picture/mb-type can comprise self-defined expression type, system expression type and sectional drawing type etc.Concrete, the picture that message content can be comprised is expressed one's feelings with the self-defined expression prestored and system and is mated, to judge whether the picture that message content comprises is self-defined expression or system expression, neither the self-defined expression picture that nonsystematic is expressed one's feelings again can be judged to be sectional drawing.Further, the picture/mb-type belonging to picture that message content can be comprised is added to the type feature of message content.
(5) judge whether the body matter in message content comprises link, if so, then link relevant information is added to the type feature of group message.
In one embodiment, the picture relevant information being added to the type feature of message content can be: comprise link.The type feature of message content comprises: comprise link, then comprise link in description messages content.
In another embodiment, the link type belonging to link that comprises of identifiable design message content.Link type can comprise 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 physical culture link type etc.Concrete, the corresponding relation of chained address and link type can be prestored, judge the link type belonging to the link that message content comprises according to this corresponding relation.Further, the link type belonging to link that message content can be comprised is added to the type feature of message content.
(6) judge the text length type belonging to group's message according to the number of words of the body matter in message content or number of characters, the text length type belonging to group's message is added to the type feature of group message.
Length type can comprise and belong to long type of message and short message types etc.If number of words or the number of characters of the body matter in message content exceed threshold value, then can judge that group message belongs to long type of message, otherwise, can judge that group message belongs to short message types.
(7) judge whether group's message belongs to system message according to the body matter in message content, if so, then system message relevant information is added to the type feature of group message.Whether can comprise default system message mark (such as the printed words of " system message ") according to the body matter in message content and judge whether group message belongs to system message.
In one embodiment, the system message relevant information being added to the type feature of message content can be: belong to system message.The type feature of message content comprises: belong to system message, then illustrate that group's message belongs to system message.
In another embodiment, the system message type belonging to identifiable design group message.System message type can comprise faciation volume notice, group's video/verbal announcement, group's documentary information, group's notice, group's applicative notifications, group members Notification of Changes and group's grade Notification of Changes etc.Concrete, whether can comprise according to the body matter in message content the system message type that corresponding system message type mark judges belonging to group message.Further, the system message type belonging to group's message can be added to the type feature of group message.
As shown in Figure 3, in one embodiment, the group's message query method in a kind of social networks client, comprises the following steps:
Step S302, display message attributes input control.
In one embodiment, message attributes input control comprises at least one in key word of the inquiry input control, type of message selection control and sender of the message's information input control.
Wherein, the words that comprises for inputting group's message to be checked of key word of the inquiry input control; Type of message selects control for selecting the type feature of group's message to be checked; Sender of the message's information input control is for inputting sender of the message's information of group's message to be checked.
In one embodiment, type of message selection control comprises at least one in following control:
For selecting the control of the time type belonging to group's message to be checked, for selecting the control of the sender's categories class belonging to group's message to be checked, for selecting the control of the sender's rating-type belonging to group's message to be checked, for selecting the control of the picture relevant information of group's message to be checked, for selecting the control of the link relevant information of group's message to be checked, for selecting the control of the text length type belonging to group's message to be checked and for selecting the control etc. of the system message relevant information of group's message to be checked.
Step S304, obtains the message attributes of input by message attributes input control.
Step S306, receives the instruction inquiring about group's message according to message attributes in designated group.
Step S308, encapsulates information query request in groups by the group of designated group number with message attributes.
Step S310, sends the request of group's information query to server.
Server can comprise the step in the group's message query method in social networking service device hereinafter described according to the process of group's information query acquisition request Query Result, does not repeat them here.
Step S312, the Query Result that group's information query request that reception server returns is corresponding.
Step S314, the message content that display Query Result comprises.
As shown in Figure 4, in one embodiment, the group's message query method in a kind of social networking service device, comprises the following steps:
Step S402, receives the request of group information query, and inquiry request comprises group number and the message attributes of group's message to be checked.
In one embodiment, the message attributes of group's message comprises at least one in words, the type feature of group's message and the sender of the message's information of group's message that group message comprises.
In one embodiment, type feature comprises at least one in following characteristics: the system message relevant information of the picture relevant information of the time type belonging to group's message, the sender's categories class belonging to group's message, sender's rating-type belonging to group's message, group's message, the link relevant information of group's message, the text length type belonging to group's message and group's message.
Step S404, searches the group number of group's message to be checked and message SN corresponding to message attributes, obtains the message SN of group's message to be checked in the corresponding relation of the group number of the group's message set up in advance, message attributes and message SN.
Step S406, set up in advance for store the group number of group message, message SN and message content tables of data index in, search corresponding memory address according to the group number of group's message to be checked and message SN.
Step S408, the memory address according to correspondence reads message content, obtains Query Result.
In one embodiment, in the corresponding relation of the group of group's message number, message attributes and message SN, each message attributes of the group of group's message number and message SN and this group's message forms one group of corresponding relation respectively; As shown in Figure 5, step S404 comprises the following steps:
Step S502, partner each message attributes of the group of group's message to be checked number and group's message to be checked keyword.
Step S504, searches message SN corresponding to every a pair keyword in the corresponding relation of the group number of the group's message set up in advance, message attributes and message SN.
Step S506, obtains the common factor of message SN corresponding to every a pair keyword, obtains the message SN of group's message to be checked.
The message SN that certain a pair keyword is corresponding is meet this message SN to the message attributes in keyword, and the common factor of the message SN that every a pair keyword is corresponding is then the message SN of all message attributes meeting group's message to be checked.
In one embodiment, group's message stores querying method in social networks, comprises the step in the group's message stores method in the social networks in above-mentioned any embodiment, the group's message query method in social networks client and the group's message query method in social networking service device.
Fig. 6 A and Fig. 6 B is the application scenarios schematic diagram of the process of the storage group message of group's message stores querying method in the social networks in an embodiment and the process of inquiry group message.As shown in Figure 6A, the process storing group's message comprises the following steps:
(1.1) group's message of group's server receives client transmission.
(1.2) group's server extracts group number and the message content of group message, generates the message SN of group's message.
(1.3) group's server by the group of group's message number, message SN and message content corresponding stored in the tables of data of group's message database.
(1.4) group's server sets up the index of tables of data according to group number and message SN, and by the index stores set up in group's message database.
(1.5) message content of group's message and message SN send to attribute to refine server by group's server.
(1.6) attribute refines server refines group's message message attributes according to the message content of group's message.
(1.7) attribute refinement server is key with the group of group's message number with message attributes, forms key-value pair with the message SN of group's message for being worth, and is encrypted by key-value pair.
(1.8) key-value pair after encryption is sent to search platform.
(1.9) key-value pair that receives of search platform storage.
As shown in Figure 6B, the process of inquiring about group's message comprises the following steps:
(2.1) client display message attributes input control, the message attributes of input is obtained by message attributes input control, receive the instruction inquiring about group's message according to message attributes in designated group, the group of designated group number is encapsulated information query request in groups with message attributes.
(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 information query, and inquiry request comprises group number and the message attributes of group's message to be checked, and attribute refines server according to the cipher mode in (1.7), the group of group's message to be checked number and message attributes is encrypted.
(2.4) group of the group's message to be checked after encryption number is sent to search platform with message attributes.
(2.5), in the key-value pair that search platform form at the group that prestores number and message attributes and message SN, with the group of group's message to be checked number and message attributes for key searches the message SN of correspondence, the message SN of group's message to be checked is obtained.
(2.6) message SN of group's message to be checked sends to attribute to refine server by search platform.
(2.7) message SN of group's message to be checked is decrypted according to the decryption method symmetrical with encryption method by attribute refinement server.
(2.8) attribute refine server in group's message database for store the group number of group message, message SN and message content tables of data index in, group number according to group's message to be checked searches corresponding memory address with message SN, memory address according to correspondence reads message content, obtains group Query Result that information query request is corresponding.
(2.9) attribute refines server and Query Result corresponding for the request of group's information query is returned to client.
(2.10) client receives attribute and refines Query Result corresponding to group's information query request of returning of server, the message content that client display Query Result comprises.
In the present embodiment, the key-value pair that group number and message attributes and message SN are formed is stored separately in search platform, separate with the message data be stored in group message database and store, and search message SN and search message content according to group number with message SN to have been come by the attribute refinement server and search platform with independent processing ability respectively with message attributes according to group number, thus query processing speed can be accelerated; And be stored in key-value pair that group in search platform number and message attributes and message SN formed and be through encryption, can effectively reduce information leakage risk, raising information security.
As shown in Figure 7, in one embodiment, group's message stores system in a kind of social networks, comprise that module 710 set up in group message reception module 702, group number and content extraction module 704, sequence number generation module 706, message storage module 708, index, attribute refines module 712 and attribute corresponding relation building module 714, wherein:
Group's message reception module 702 is for receiving group message.
The data content of group's message comprises group number and message content.Message content comprises message and sends information, transmitting time and message body content.Message body content is the content of the expression message semantics that user inputs.
Group number and content extraction module 704 are for extracting group number and the message content of group message.
Sequence number generation module 706 is for generating the message SN of group message.
Sequence number generation module 706 can generate the message SN of globally unique identifier group message, namely the message SN of any two group's message is different, also can generate the message SN of unique identification group message in group, namely the message SN of any two group's message of same group two is different.
Message storage module 708 for by the group of group's message number, message SN and message content corresponding stored in tables of data.
Index sets up module 710 for setting up the index of tables of data according to group number and message SN.
The memory address that module 710 can obtain the record in tables of data set up in index, generate the corresponding relation inventory of the memory address of the group that comprises in record number and message SN and record, namely obtain the index of tables of data, further, this corresponding relation inventory can be stored.
Attribute refines module 712 for refining the message attributes of group's message according to the message content of group's message.
Attribute corresponding relation building module 714 is for setting up the corresponding relation of the group number of group message, message attributes and message SN.
Attribute corresponding relation building module 714 can by the group of group's message number, message attributes and message SN corresponding stored to tables of data or in file.
In one embodiment, in the corresponding relation of the group of group's message number, message attributes and message SN, each message attributes of the group of group's message number and message SN and this group's message forms one group of corresponding relation respectively.
Attribute corresponding relation building module 714 can according to the Message Record of the quantity such as the number generation of the message attributes of group's message, every bar Message Record comprises the group number of group message, a message attributes and message SN, and the message attributes that different messages record comprises is different, further, the Message Record of group's message is stored.
In the present embodiment, article one, the group number of group's message forms one group of corresponding relation respectively with each message attributes of message SN and this group's message, instead of multiple message attributes of group's message are combined, further the message attributes of the group of this group's message number and message SN and this group's message is combined and set up corresponding relation, thus only need single message attributes to mate with single message attributes when inquiring about group's message, and do not need the combination of single message attributes with multiple message attributes of group's message to mate, thus group information query speed can be improved.
In one embodiment, the message attributes of group's message of attribute refinement module 712 refinement comprises at least one in comprised popular words, type feature and sender of the message's mark.
As shown in Figure 8, in one embodiment, attribute refines module 712 and comprises popular words extraction module 802, type feature refinement module 804 and sender's marker extraction module 808, wherein:
Popular words extraction module 802, for extracting the popular words that group's message comprises according to message content.
Type feature refines module 804, for refining the type feature of group's message according to message content.
Sender's marker extraction module 806, for extracting sender's mark of group's message according to message content.
In another embodiment, attribute refines popular words extraction module 802 that module 712 can only comprise, type feature refines any one or any two modules in module 804 and sender's marker extraction module 806.
In one embodiment, popular words extraction module 802 extracts the popular words in the body matter of message content for the words comprised according to the popular character word stock prestored.
The body matter of message content can be carried out participle by popular words extraction module 802, obtains independently words; Further, the words be included in the popular character word stock set up in advance can be extracted in independently words.The body matter of message content is carried out participle can according to the existing segmenting method based on string matching, based on understand segmenting method and Corpus--based Method segmenting method etc. carry out, do not repeat them here.Further, popular words extraction module 802 participle can be obtained each independently words mate with all words of popular character word stock, judge each independently words whether be included in popular character word stock, and record the words that is included in popular character word stock.
Or popular words extraction module 802 can obtain in the popular character word stock prestored the words be included in the body matter of message content.Concrete, each words in popular character word stock can mate with the body matter of message content by popular words extraction module 802, judges whether it is included in body matter, records the words be included in body matter.
In one embodiment, group's message stores system in above-mentioned social networks also comprises popular character word stock and sets up module (not shown), for adding up the words frequency of occurrence in named web page content, the words that acquisition frequency of occurrence exceedes threshold value is popular words, stores popular words to database to set up popular character word stock.
In one embodiment, type feature refinement module 804 comprises at least one module in time type refinement module, sender's categories class refinement module, sender's rating-type refinement module, pictorial information refinement module, link information refinement module, text length type refinement module and system message information abstraction module (above module is not shown), wherein:
Time type refines module for judging the time type belonging to group's message according to the transmitting time in message content, the time type belonging to group's message is added to the type feature of group message.
Time type can comprise transmission types and the outer transmission types of special time etc. in special time.If transmitting time belongs in special time, then time type refinement module judges that group's message belongs to special time transmission types, otherwise, judge that group's message belongs to the outer transmission types of special time.
Sender's categories class refinement module judges the sender's categories class belonging to group's message for the group members classification corresponding according to the sender of the message's information in message content, the sender's categories class belonging to group's message is added to the type feature of group message.
Sender's classification can comprise group master, keeper and common group members etc.; Accordingly, sender's categories class can comprise the main transmission types of group, keeper's transmission types and common group members transmission types etc.
Sender's rating-type refinement module judges the sender's rating-type belonging to group's message for the group members grade corresponding according to the sender of the message's information in message content, the sender's rating-type belonging to group's message is added to the type feature of group message.
Sender's grade can comprise new hand's level, middle rank, senior and senior level etc.; Accordingly, sender's rating-type can comprise new hand's level transmission types, intermediate transmission types, senior transmission types and senior level transmission types etc.
Pictorial information refines module for judging whether the body matter in message content comprises picture, if so, then picture relevant information is added to the type feature of group message.
In one embodiment, the picture relevant information being added to the type feature of message content can be: comprise picture.The type feature of message content comprises: comprise picture, then comprise picture in description messages content.
In another embodiment, pictorial information refines the picture/mb-type belonging to picture that module identifiable design message content comprises.Picture/mb-type can comprise self-defined expression type, system expression type and sectional drawing type etc.Concrete, the picture that message content can comprise by pictorial information refinement module is expressed one's feelings with the self-defined expression prestored and system and is mated, to judge whether the picture that message content comprises is self-defined expression or system expression, neither the self-defined expression picture that nonsystematic is expressed one's feelings again can be judged to be sectional drawing.Further, the picture/mb-type belonging to picture that message content can comprise by pictorial information refinement module is added to the type feature of message content.
Link information refines module for judging whether the body matter in message content comprises link, if so, then link relevant information is added to the type feature of group message.
In one embodiment, the picture relevant information being added to the type feature of message content can be: comprise link.The type feature of message content comprises: comprise link, then comprise link in description messages content.
In another embodiment, link information refines the link type belonging to link that module identifiable design message content comprises.Link type can comprise 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 physical culture link type etc.Concrete, above-mentioned storage system also comprises link type memory module (not shown), for storing the corresponding relation of chained address and link type, link information refines the link type that module can judge belonging to the link that message content comprises according to this corresponding relation.Further, the link type belonging to link that message content can comprise by link information refinement module is added to the type feature of message content.
Text length type refines the text length type that module is used for judging belonging to group's message according to the number of words of the body matter in message content or number of characters, the text length type belonging to group's message is added to the type feature of group message.
Length type can comprise and belong to long type of message and short message types etc.If number of words or the number of characters of the body matter in message content exceed threshold value, then text length type refinement module can judge that group message belongs to long type of message, otherwise text length type refines module can judge that group message belongs to short message types.
System message information abstraction module is used for judging whether group's message belongs to system message according to the body matter in message content, if so, then system message relevant information is added to the type feature of group message.Whether system message information abstraction module can comprise default system message mark (such as the printed words of " system message ") according to the body matter in message content judges whether group message belongs to system message.
In one embodiment, the system message relevant information being added to the type feature of message content can be: belong to system message.The type feature of message content comprises: belong to system message, then illustrate that group's message belongs to system message.
In another embodiment, the system message type belonging to system message information abstraction module identifiable design group message.System message type can comprise faciation volume notice, group's video/verbal announcement, group's documentary information, group's notice, group's applicative notifications, group members Notification of Changes and group's grade Notification of Changes etc.Concrete, whether system message information abstraction module can comprise according to the body matter in message content the system message type that corresponding system message type mark judges belonging to group message.Further, 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 social networks, comprises display module 902, message attributes acquisition module 904, command reception module 906, request package module 908, request sending module 910 and Query Result receiver module 912, wherein:
Display module 902 is for showing message attributes input control.
In one embodiment, message attributes input control comprises at least one in key word of the inquiry input control, type of message selection control and sender of the message's information input control.
Wherein, the words that comprises for inputting group's message to be checked of key word of the inquiry input control; Type of message selects control for selecting the type feature of group's message to be checked; Sender of the message's information input control is for inputting sender of the message's information of group's message to be checked.
In one embodiment, type of message selection control comprises at least one in following control:
For selecting the control of the time type belonging to group's message to be checked, for selecting the control of the sender's categories class belonging to group's message to be checked, for selecting the control of the sender's rating-type belonging to group's message to be checked, for selecting the control of the picture relevant information of group's message to be checked, for selecting the control of the link relevant information of group's message to be checked, for selecting the control of the text length type belonging to group's message to be checked and for selecting the control etc. of the system message relevant information of group's message to be checked.
Message attributes acquisition module 904 is for obtaining the message attributes of input by message attributes input control.
Command reception module 906 inquires about the instruction of group's message in designated group according to message attributes for receiving.
Request package module 908 is for encapsulating information query request in groups by the group of designated group number with message attributes.
Request sending module 910 is for sending group information query request to server.
Server is identical according to the process of group's information query acquisition request Query Result with the group's message query server in social networks hereinafter described according to the process of group's information query acquisition request Query Result, does not repeat them here.
Query Result receiver module 912 is for Query Result corresponding to group's information query request that reception server returns.
Display module 902 is also for showing the message content that Query Result comprises.
As shown in Figure 10, in one embodiment, the group's message query server in a kind of social networks, comprises request receiving module 1002, sequence number searches module 1004, memory address searches module 1006 and message content read module 1008, wherein:
Request receiving module 1002 is for receiving group information query request, and inquiry request comprises group number and the message attributes of group's message to be checked.
In one embodiment, the message attributes of group's message comprises at least one in words, the type feature of group's message and the sender of the message's information of group's message that group message comprises.
In one embodiment, type feature comprises at least one in following characteristics: the system message relevant information of the picture relevant information of the time type belonging to group's message, the sender's categories class belonging to group's message, sender's rating-type belonging to group's message, group's message, the link relevant information of group's message, the text length type belonging to group's message and group's message.
Sequence number searches module 1004 for message SN corresponding to the group number and message attributes that search group's message to be checked in the corresponding relation of the group number of the group's message set up in advance, message attributes and message SN, obtains the message SN of group's message to be checked.
Memory address search module 1006 for set up in advance for store the group number of group message, message SN and message content tables of data index in, search corresponding memory address according to the group number of group's message to be checked and message SN.
Message content read module 1008 reads message content for the memory address according to correspondence, obtains Query Result.
In one embodiment, in the corresponding relation of the group of group's message number, message attributes and message SN, each message attributes of the group of group's message number and message SN and this group's message forms one group of corresponding relation respectively; As shown in figure 11, sequence number is searched module 1004 and is comprised keyword and search unit 1104 and common factor acquiring unit 1106 to component units 1102, sequence number, wherein:
Keyword to component units 1102 for keyword that each message attributes of the group of group's message to be checked number and group's message to be checked is partnered.
Sequence number searches unit 1104 for searching message SN corresponding to every a pair keyword in the corresponding relation of the group number of the group's message set up in advance, message attributes and message SN.
Common factor acquiring unit 1106, for obtaining the common factor of message SN corresponding to every a pair keyword, obtains the message SN of group's message to be checked.
The message SN that certain a pair keyword is corresponding is meet this message SN to the message attributes in keyword, and the common factor of the message SN that every a pair keyword is corresponding is then the message SN of all message attributes meeting group's message to be checked.
Group's message stores inquiry system in social networks, comprises the group's message stores system in the social networks in above-mentioned any embodiment, the group's information query client in social networks and the module included by group's message query server in social networks.
As shown in figure 12, in a specific embodiment, the group's message stores inquiry system in above-mentioned social networks, comprises with lower module:
Module 710 and message transmission module 1202 set up in group's message reception module 702, group number and content extraction module 704, sequence number generation module 706, message storage module 708, index, 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, request receiving module 1002, key sending module 1210, deciphering module 1214, memory address search module 1006, message content read module 1008, Query Result return module 1216, is distributed in attribute and refines on server 20;
Attribute corresponding relation building module 714, sequence number search module 1004 and sequence number sending module 1212, are distributed 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 receiver module 912, in distribution in client 40.
Group's message stores inquiry system in social networks stores in the process of group's message:
Group's message that group's message reception module 702 sends for receiving client 40.
Group number and content extraction module 704 are for extracting group number and the message content of group message, and sequence number generation module 706 is for generating the message SN of group message.
Message storage module 708 for by the group of group's message number, message SN and message content corresponding stored in the tables of data of group's message database.
Module 710 sets up tables of data index according to group number and message SN set up in index, and by the index stores set up in group's message database.
Message transmission module 1202 refines server 20 for the message content of group's message and message SN being sent to attribute.
Attribute refines module 712 for refining the message attributes of group's message according to the message content of group's message.
Key-value pair sets up module 1204 for being key with the group of group's message number with message attributes, forming key-value pair with the message SN of group's message for being worth.
Encrypting module 1206 is for being encrypted key-value pair.
Key-value pair sending module 1208 is for being sent to search platform 30 by the key-value pair after encryption.
Attribute corresponding relation building module 714 is for storing the key-value pair received.
In the process of the group's message stores inquiry system inquiry group message in social networks:
Display module 902 is for showing message attributes input control, message attributes acquisition module 904 is for obtaining the message attributes of input by message attributes input control, command reception module 906 inquires about the instruction of group's message in designated group according to message attributes for receiving, request package module 908 is for encapsulating information query request in groups by the group of designated group number with message attributes.
Request sending module 910 refines server 20 for sending group information query request to attribute.
Request receiving module 1002 is for receiving group information query request, and inquiry request comprises group number and the message attributes of group's message to be checked.
Encrypting module 1206 is also for being encrypted the group of group's message to be checked number with message attributes according to the mode be encrypted by key-value pair.
Key sending module 1210 is for sending to search platform 30 by the group of the group's message to be checked after encryption number with message attributes.
Sequence number searches module 1004 in the key-value pair that forms in the group that prestores number and message attributes and message SN, with the group of group's message to be checked number and message attributes for key searches corresponding message SN, obtain the message SN of group's message to be checked.
Sequence number sending module 1212 refines server 20 for the message SN of group's message to be checked being sent to attribute.
Deciphering module 1214 is for being decrypted the message SN of group's message to be checked according to the decryption method symmetrical with encryption method.
Memory address search module 1006 in group's message database for store the group number of group message, message SN and message content tables of data index in, group number according to group's message to be checked searches corresponding memory address with message SN, message content read module 1008 reads message content for the memory address according to correspondence, obtains group Query Result that information query request is corresponding.
Query Result returns module 1216 for Query Result corresponding for the request of group's information query is returned to client 40.
Query Result receiver module 912 refines Query Result corresponding to group's information query request of returning of server for receiving attribute.
Display module 902 is also for showing the message content that Query Result comprises.
In the present embodiment, the key-value pair that group number and message attributes and message SN are formed is stored separately in search platform, separate with the message data be stored in group message database and store, and search message SN and search message content according to group number with message SN to have been come by the attribute refinement server and search platform with independent processing ability respectively with message attributes according to group number, thus query processing speed can be accelerated; And be stored in key-value pair that group in search platform number and message attributes and message SN formed and be through encryption, can effectively reduce information leakage risk, raising information security.
Group's message stores method and system in above-mentioned social networks, not only generate the message SN of group's message, by the group number of group's message, message SN and message content corresponding stored are in tables of data, the index of this tables of data is set up according to group number and message SN, also refine the message attributes of group's message, set up the group number of group's message, the corresponding relation of message attributes and message SN, thus make when inquiring about group's message, corresponding message SN can be searched with message attributes according to the group of group's message to be checked number, in the index of tables of data, corresponding memory address is searched with message SN further according to group number, corresponding group's message is obtained according to memory address, search in the process of corresponding message SN according to group number with message attributes, the group of group's message to be checked number is only needed to mate with message attributes with the group number of storage with message attributes, and do not need key word of the inquiry and entire message body matter to be carried out search and mate to judge whether key word of the inquiry is contained in message, thus can inquiry velocity be accelerated, and to search corresponding memory address in the index according to group number and message SN and obtain corresponding group's message according to memory address be also fastish process, therefore, group's message stores method and system in above-mentioned social networks stores the mode of group's message, the speed of inquiring about group's message can be made to be greatly improved.
Group's message query method in above-mentioned social networks client and the group's information query client in social networks, the message attributes of input is obtained by message attributes input control, group number is encapsulated information query request in groups with message attributes and is sent to server, make server can search group message according to group number with message attributes, relative to search coupling keyword to be checked in the entire message body matter of all records of tables of data, the speed finding target message can be improved.
Group's message query method in above-mentioned social networking service device and the group's message query server in social networks, group number according to group's message to be checked searches corresponding message SN with message attributes, in the index of tables of data, corresponding memory address is searched with message SN further according to group number, corresponding group's message is obtained according to memory address, search in the process of corresponding message SN according to group number with message attributes, the group of group's message to be checked number is only needed to mate with message attributes with the group number of storage with message attributes, and do not need key word of the inquiry and entire message body matter to be carried out search and mate to judge whether key word of the inquiry is contained in message, thus can inquiry velocity be accelerated, and to search corresponding memory address in the index according to group number and message SN and obtain corresponding group's message according to memory address be also fastish process, therefore, the speed of inquiring about group's message can be made to be greatly improved.
In like manner, the mode of the group's message stores querying method in above-mentioned social networks and the storage of system and inquiry group message, can make the speed of inquiring about group's message be greatly improved.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, as in the embodiment of the present invention, this program can be stored in the storage medium of computer system, and performed by least one processor in this computer system, to realize the flow process of the embodiment comprised as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above embodiment only have expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.