Summary of the invention
The object of this invention is to provide a kind of chat group searching method and system of the common chat room based on car-mounted terminal, respond the searching request of car-mounted terminal user to group fast, feedback search result to enable server.
The searching method of the chat group based on car-mounted terminal provided by the invention, comprising: server forms index information based on the information of the indoor chat group of public chat; Described index information is for inquiring about described chat group; Described index information is stored to index database; Described index database regularly carries out maintenance update by server; Server receives and responds the chat group searching request initiated from car-mounted terminal, carries out indexed search to index database, feeds back the Search Results for described searching request to car-mounted terminal.
Optionally, described index information comprise be associated with chat group group number, chat group name and chat group brief introduction.
Optionally, described server periodically or at the appointed time carry out maintenance update to index database.
Optionally, described server carries out maintenance update to index database and comprises: the chat group information obtaining common chat room, compares, increases, changes or delete described index information with the index information in index database.
Optionally, the searching request that described server receives comprises precise search or searches for generally; Described precise search comprises the group number providing chat group; Describedly search for the keyword comprising and chat group name or chat group brief introduction are provided generally.
Optionally, when indexed search cannot find the index information corresponding with described searching request, server carries out thorough search to the chat group of common chat room.
Described method also comprises: server receives and the chat group responded from car-mounted terminal joins request, and searches for this chat group, and join request described in passing in common chat room.If server cannot search described chat group in common chat room, then feed back this chat group of car-mounted terminal and cancel.
Present invention also offers a kind of search system of the chat group based on car-mounted terminal, comprising:
Index database, for storing the index information corresponding with chat group;
Unit set up in index, is connected with described index database, based on the chat group information in common chat room, sets up index information, and be added in index database by above-mentioned index information;
Index upgrade unit, is connected with described index database, regularly obtains the chat group information in common chat room, and compares with the index information in index database, upgrade described index information;
Search unit, is connected with described index database, receives the searching request of car-mounted terminal, and in index database, searches for relevant index information according to described searching request;
Feedback unit, receives the Search Results that search unit produces, and is fed back to car-mounted terminal.
Optionally, described index information comprise be associated with chat group group number, chat group name and chat group brief introduction.
Described index upgrade unit periodically or at the appointed time carry out maintenance update to index database.Describedly maintenance update is carried out to index database comprise increase, change or delete described index information.
Described searching request comprises precise search or searches for generally; Described precise search comprises the group number providing chat group; Describedly search for the keyword comprising and chat group name or chat group brief introduction are provided generally.
If when described search unit cannot find the index information corresponding with described searching request in index database, carry out thorough search to the chat group of common chat room.
Also comprise request and pass on unit, described request is pass on unit and is joined request for the chat group received from car-mounted terminal, searches for this chat group and join request described in passing in common chat room.If described request passs on unit cannot search described chat group, then feed back this chat group of car-mounted terminal and cancel.
Compared with prior art, the invention has the beneficial effects as follows: in advance to the chat group information obtaining common chat room, and form index database, when responding user search request, directly in index database, searching for relevant index information, thus accelerating search speed.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, are described in detail the specific embodiment of the present invention below in conjunction with accompanying drawing.
Set forth a lot of detail in the following description so that fully understand the present invention, but the present invention can also adopt other to be different from alternate manner described here to implement, therefore the present invention is not by the restriction of following public specific embodiment.
Fig. 3 shows the schematic flow sheet of the searching method of the chat group based on car-mounted terminal of the present invention, and basic step comprises:
Step S101, server obtain the chat group information of common chat room, form index information and store the index database of described index information, and server regularly carries out maintenance update to index database;
Concrete, usually according to the common feature that chat theme or the user (herein and use described later refer to car-mounted terminal per family) that participates in chat have, public chat indoor have diversified chat group.And server is the above-mentioned chat group of difference, can distribute chat group one random and unduplicated group number.The unique identifying information of this group number and chat group.In addition the founder of chat group, comprises the user or server administrators that have and create chat group authority, and when creating chat group, to chat group name or can fill in the relevant informations such as simple introduction, above-mentioned chat group name is also not exclusive.
First server obtains the information of the indoor each chat group of public chat, and described chat group information comprises chat group name, group's brief introduction and group number etc.Above-mentioned group number and chat group name, group's brief introduction are associated according to above-mentioned chat group information by described server, become an index information, the index database of the group of many index informations composition common chat room.
Because common chat room has diversity and mutability, its chat group also comprises provisional chat group or permanent chat group, and therefore the number of chat group is not fixing, often there is the establishment of chat group or cancels.On the other hand, chat group is had to the keeper of administration authority, the establishment user of such as server administrators or chat group and the administrator specified, the name of the chat group that is all subject to variation or profile information.And for a chat group created, uniquely invariably its group number, because server needs according to group number identification chat group.
The index database of previous formation cannot the chat group of real-time response change, and server regularly can only obtain the chat group information of public chat indoor again, and upgrades former index database.Such as, the name of certain chat group changes, and name new for above-mentioned chat group, in the process of maintenance update index database, by again writing the index information corresponding to this chat group, is updated in index information by server.If create new chat group in addition, server then adds new index information corresponding with it in index database; If former chat group is cancelled, server then deletes index information corresponding with it.
Step S102, initiate the searching request of chat group with user orientation server;
For the user of car-mounted terminal, can search for according to different demands, described searching request comprises search information.The group number of the chat group that such as user its anticipation known adds, directly can carry out precise search based on group number, send in searching request comprise this group number to server; Or user only wants to search for the interested chat group of its possibility, can search for generally, send in searching request comprise this keyword to server based on keyword.More specifically, described keyword search can be divided into chat group name to search for or chat group brief introduction search, and namely search group name or brief introduction have the chat group of this keyword.
Step S103, server, according to the searching request of user, first carry out indexed search to index database, if cannot obtain the index information corresponding with searching request, then carry out thorough search to common chat room, and to user feedback Search Results.
Concrete, server, according to the search information comprised in the searching request of user, first carries out indexed search to index database, if described indexed search cannot obtain relative index information, then carries out thorough search in public chat indoor again, searches chat group.Through above-mentioned indexed search and thorough search, if after server search to the index information be associated with search information or chat group, by described index information or chat group information feed back to user.Such as, the searching request of user is the precise search comprising group number, if after server finds this index information in index database, directly feed back to this information such as chat group name, chat group brief introduction of user, so that user determines whether required chat group voluntarily.And if the searching request of user is comprise searching for generally of keyword, if server finds all index informations relevant to described keyword in index database, above-mentioned index information is all fed back to user, so that user selects the chat group wanting to add voluntarily.And based on the searching request of user, server cannot find the index information be associated with search information in index database, then carry out thorough search in public chat indoor, if still relevant chat group cannot be searched, then feed back client and do not search relevant chat group.
Step S104, user select chat group according to the Search Results of server feedback, and initiate to join request, and server is searched for this chat group and pass on and joins request in common chat room.
Concrete, because server is complete index information to the Search Results of user feedback, comprise group number, chat group name and chat group brief introduction.When user selectes after a certain chat group sends and join request, server just directly can find corresponding chat group according to the group number of this chat group, and passs on this and join request.
It is pointed out that, because index database is regular update, within the interval time of twice renewal, if chat group there occurs change, such as described chat group is cancelled, and server is unforeseen.Even if the therefore server feedback index information of user's chat group, and go in common chat room, to search this chat group according to the group number of this chat group, also likely cannot find corresponding chat group.Now index database can this chat group of feedback user be cancelled.
From above-mentioned chat group searching method, the chat group information that the present invention collects in common chat room in advance forms index database, when user carries out chat group inquiry, directly inquire about in index database according to the search information of user, can greatly search speed be improved, thus can respond in time.Therefore above-mentioned searching method is very suitable for the search need of the user using car-mounted terminal logon server.
For realizing above-mentioned chat group searching method, present invention also offers a kind of chat group search system of common chat room.Fig. 4 shows the module diagram of the chat group search system based on car-mounted terminal of the present invention.The basic module of described statistical system comprises:
Index database 101, for storing the index information corresponding with chat group.
Unit 102 set up in index, connects public chat chamber system, based on the chat group information in common chat room, set up the index information corresponding with described chat group, and be added in index database 101 by described index information.
Index upgrade unit 103, connects public chat chamber system, regularly obtains the chat group information in common chat room, and compares with the index information in index database 101, upgrade described index information.It can be upgrade the fixed cycle that described index upgrade unit 103 carries out renewal, also can be upgrade the fixed time.Described renewal comprises, to the amendment of index information, interpolation or deletion.
Search unit 104, described search unit 104 receives the searching request of user, and first carries out indexed search to index database 101 according to the search information in searching request; When indexed search fails to obtain relevant search result, then thorough search is carried out to common chat room.
Feedback unit 105, receives the Search Results of search unit 104, and is fed back to user.
Concrete, described search information comprises group number, chat group name, chat group brief introduction etc.When search unit 104 searches the index information relevant to above-mentioned search information in index database 101, described index information is sent to feedback unit 105, is sent to user via feedback unit 105; When indexed search cannot find relative index information, then according to search information, thorough search is carried out to public chat indoor, and accordingly result is fed back to user by feedback unit 105.In addition, suppose that information of searching in the searching request of user is for empty, be then defaulted as search all, all information in index database 101 are sent to feedback unit 105 by described search unit 104, are sent to user via feedback unit 105.
Also comprise request and pass on unit 106, described request passs on the request adding chat group that unit 106 receives user, according to the group number of the chat group that user selectes, searches for this chat group from common chat room, and described joining request is sent to this chat group, treat that its keeper examines.If request is pass on unit 106 and cannot be searched this chat group from common chat room, then this chat group of feedback user is cancelled.
Below in conjunction with specific embodiment, the chat group searching method of common chat room of the present invention and system are described in detail.In the present embodiment, described user is car-mounted terminal, and index database initial condition is empty.
Shown in composition graphs 3 and Fig. 4, first in common chat room server, chat group search system is connected with chat room system, thus obtains the information of the indoor each chat group of public chat.Described public chat indoor may comprise one or more chat group, and each chat group has group number and the relevant information such as chat group name, chat group brief introduction of its server-assignment.Above-mentioned group number and this chat group are bound, and are the foundations of server identification chat group, are therefore unique and unduplicated.The relevant informations such as chat group name, chat group brief introduction then can be write by the user or keeper this chat group to administration authority and are changed voluntarily.
The information of unit 102 according to above-mentioned chat group set up in the index of chat group search system, writes the index information corresponding with each chat group, and be added in index database 101 by described index information.And index upgrade unit 103, then regularly obtain the information of the indoor chat group of public chat, the index information in index database 101 compared and upgrades, comprise newly-built index information, renewal or delete old index information etc.
After having complete index database 101, chat group search system of the present invention just can according to described index database 101, and the searching request of relative users carries out indexed search fast.
Concrete, in the present embodiment, suppose that Client-initiated searching request is based on searching for generally, user cannot provide group number accurately, and provide only the keyword interested to it, and the query object of described keyword is chat group brief introduction.
Search unit 104, after receiving above-mentioned searching request, first uses described keyword, compares to the chat group brief introduction comprised in bar index information each in index database 101.When the chat group brief introduction searched in some index informations and described keyword match, be sent to feedback unit 105 by above-mentioned index information, and feed back to user by feedback unit 105 with tabular form.
Suppose that the keyword of user is comparatively uncommon, do not have an index information to coincide with it in index database 101, then search unit 104 is after having carried out indexed search, proceeds to and carries out real-time thorough search to common chat room.If still relevant chat group can not be searched, then inform that user does not search relevant chat group by feedback unit 105.
And hypothesis is through above-mentioned indexed search, user has obtained required chat group list, and user selects one of them chat group voluntarily, and initiates to join request.Unit 106 is pass in the request of chat group search system, according to the group number of the chat group that user selectes, and the relevant chat group of search in common chat room.For server, due to the group number of known chat group, therefore above-mentioned search procedure can find corresponding chat group quickly and accurately, and passs on joining request of user, waits for the examination & approval of chat group.If but in common chat room, this chat group is cancelled, and index database 101 does not upgrade in time, request is pass on unit 106 and cannot be found this chat group, then this chat group of feedback user is cancelled.
Although the present invention discloses as above with preferred embodiment, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.