CN103744857A - Method for searching instant messaging chatting records for keywords - Google Patents

Method for searching instant messaging chatting records for keywords Download PDF

Info

Publication number
CN103744857A
CN103744857A CN 201310663449 CN201310663449A CN103744857A CN 103744857 A CN103744857 A CN 103744857A CN 201310663449 CN201310663449 CN 201310663449 CN 201310663449 A CN201310663449 A CN 201310663449A CN 103744857 A CN103744857 A CN 103744857A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
position
chat
keyword
key
information
Prior art date
Application number
CN 201310663449
Other languages
Chinese (zh)
Inventor
邱欢胜
Original Assignee
厦门亿联网络技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/30Information retrieval; Database structures therefor ; File system structures therefor
    • G06F17/30861Retrieval from the Internet, e.g. browsers
    • G06F17/30864Retrieval from the Internet, e.g. browsers by querying, e.g. search engines or meta-search engines, crawling techniques, push systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/30Information retrieval; Database structures therefor ; File system structures therefor
    • G06F17/30861Retrieval from the Internet, e.g. browsers
    • G06F17/30899Browsing optimisation
    • G06F17/30905Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The invention provides a method for searching instant messaging chatting records for keywords. The method comprises the steps that first, the keywords to be searched for are input, the range of the chatting records to be inquired is set, and inquiring is started; then, the information of each position of the keywords in the chatting records is inquired from the set range of the chatting records, and the information of each position of the keywords is stored in a keyword position list according to the inquired sequence; at last, the position information is taken out from the keyword position list to be positioned, and the chatting records before and after the position information are displayed in a chat window. By the adoption of the method, the information containing the keywords can be inquired rapidly according to the positions of the keywords in the chatting records.

Description

—种在即时通讯的聊天记录中搜索关键字的方法 - Method planted in instant messaging chats in search keywords

技术领域 FIELD

[0001] 本发明涉及一种在即时通讯的聊天记录中搜索关键字的方法。 [0001] The present invention relates to a method in a chat chat search keywords.

背景技术 Background technique

[0002] 当前,许多的即时通讯聊天工具中还是没有可以根据关键字查询聊天记录,当用户需要查询自己的一些聊天记录时候,需要在全部的聊天记录中查询,非常缓慢,在一些可以根据关键字查找聊天记录的即时通讯中,会将全部查询的记录都显示出来,没有前后文,在用户无法确定的情况下,还是需要一条一条的找,效率低下。 [0002] Currently, many instant messaging chat tool or no chats keyword query, when users need to check some of their chats when the need to check all chats, very slowly, according to some key Find the word of instant messaging chats, the record will be all queries are displayed, no text before and after, if the user can not be determined, or the need to find a one and inefficient.

发明内容 SUMMARY

[0003] 本发明要解决的技术问题,在于提供一种在即时通讯的聊天记录中搜索关键字的方法,可以在聊天记录中快速查找到用户自己需要的信息。 [0003] The present invention to solve the technical problem is to provide a method for searching keywords in IM chats, the user can quickly find the information they need in chats.

[0004] 本发明具体包括如下步骤: [0004] The present invention includes the following steps:

包括如下步骤: Comprising the steps of:

步骤10、输入要搜索的关键字并设置所要查询聊天记录的范围,开始查询; Step 10, the keywords input to search for the query and set the desired range of chat start inquiry;

步骤20、从设置的聊天记录的范围中查询关键字在聊天记录中的每一处位置信息,并将关键字的每一处位置信息按查询到的先后顺序存放入关键字位置列表中; Step 20, the location information query key every chats from the range of chats provided, and the position information every query keywords according to the order of the storage location keyword list;

步骤30、从关键字位置列表取出位置信息进行定位,在聊天窗口中显示所述位置信息前后的聊天记录。 Step 30, the position information extracted from the keyword list to locate a position, before and after the chat display position information in the chat window.

[0005] 进一步地,所述步骤30进一步具体为: [0005] Further, the step 30 is more specifically:

步骤31、若用户点击上一个按钮,则从关键字位置列表中取出最后一个位置信息进行定位,若用户点击下一个按钮,则从关键字位置列表中取出第一个位置信息进行定位; Step 31, if the user clicks on a button, the position of the keyword list from the withdrawn position information for positioning a last, when the user clicks the next button, the position from the keyword list to take the first position information is positioned;

步骤32、若用户再次点击上一次按钮或者下一个按钮,判断聊天记录是否变化或者关键字是否变化,若聊天记录无变化且关键字也无变化,则从关键字位置列表中取出当前位置信息的上一个或者下一个位置信息进行定位,若聊天记录变化或关键字变化,则重新遍历聊天记录,查找到关键字在聊天记录中的每一处位置信息,更新关键字位置列表,之后执行步骤31。 Step 32, if the user once again, a next button or click on the button, it is determined whether a change in chat or whether the change key, and if the key can not change the chat record unchanged, the position of the keyword list from the current position information extracted on or next the positioning position information, or if the change key change chat, the chat traversed again, to find every keyword recording position information in the chat, keyword location update lists, after performing step 31 .

[0006] 进一步地,所述关键字位置列表为一维数组。 [0006] Furthermore, the position of the keyword list is a one-dimensional array.

[0007] 进一步地,所述定位为关键字闻売定位。 [0007] Further, the smell positioned bai keyword targeting.

[0008] 进一步地,所述关键字的位置信息为关键字的位置值。 [0008] Further, the location information for the location of the keyword of keyword value.

[0009] 本发明具有如下优点:一种在即时通讯的聊天记录中搜索关键字的方法可以根据关键字在聊天记录中快速的查询到含有关键字的信息,并且可以快速地进行上一个和下一个关键字的切换。 [0009] The present invention has the following advantages: A method of instant messaging chat search key can quickly query key to the information contained in the keyword chats, and may be one lower and quickly a key switch.

附图说明 BRIEF DESCRIPTION

[0010] 下面参照附图结合实施例对本发明作进一步的说明。 [0010] The following embodiments with reference to the accompanying drawings in conjunction with embodiments of the present invention will be further described. [0011] 图1为本发明方法执行流程图。 [0011] FIG 1 performs a flow chart of the inventive method.

具体实施方式 Detailed ways

[0012] 如图1所示,一种在即时通讯的聊天记录中搜索关键字的方法,包含以下步骤: 步骤10、输入要搜索的关键字并设置所要查询聊天记录的范围,开始查询; [0012] 1, A chat chat search key method comprising the following steps: Step 10, the keywords input to search for the query and set the desired range of chat start inquiry;

步骤20、从限定的聊天记录范围中查询关键字在聊天记录中的每一处位置信息,并将关键字的位置信息存放入关键字位置列表中,关键字位置列表按照查询的先后顺序进行存放,关键字位置列表为一维数组,关键字的位置信息为关键字的位置值; Step 20, the location information query key every chats from the chat defined range, the location information is stored into the key position keyword list, keyword list stored in accordance with the position of the query sequence keyword position in the list is one-dimensional array, the location information for the location of the keyword keyword value;

步骤30、从关键字位置列表取出位置信息进行定位,在聊天窗口中显示所述位置信息iu后的聊天记录,定位为闻売定位,其中闻売定位为当如关键字会以区别于当如字体的颜色标注出来。 Step 30, is removed from the keyword list location information to locate the position, after the chat display position information in the chat window iu, bai positioned to locate the smell, wherein the smell bai positioned such that when a keyword as will distinguish when font color marked out.

[0013] 所述步骤30进一步具体为: [0013] The step 30 is a further detail:

步骤31、若用户点击上一个按钮,则从关键字位置列表中取出最后一个位置信息进行定位,若用户点击下一个按钮,则从关键字位置列表中取出第一个位置信息进行定位; Step 31, if the user clicks on a button, the position of the keyword list from the withdrawn position information for positioning a last, when the user clicks the next button, the position from the keyword list to take the first position information is positioned;

步骤32、若用户再次点击上一次按钮或者下一个按钮,判断聊天记录是否变化或者关键字是否变化,若聊天记录无变化且关键字也无变化,则从关键字位置列表中取出当前位置信息的上一个或者下一个位置信息进行定位,若聊天记录变化或关键字变化,则重新遍历聊天记录,查找到关键字在聊天记录中的每一处位置信息,更新关键字位置列表,之后执行步骤31。 Step 32, if the user once again, a next button or click on the button, it is determined whether a change in chat or whether the change key, and if the key can not change the chat record unchanged, the position of the keyword list from the current position information extracted on or next the positioning position information, or if the change key change chat, the chat traversed again, to find every keyword recording position information in the chat, keyword location update lists, after performing step 31 .

[0014] 具体实施例如下: [0014] Specific embodiments are as follows:

步骤一、输入要搜索的关键字并设置所要查询聊天记录的范围,开始查询; Step one, enter a keyword to search and set the range to be queried chats, starting inquiries;

步骤二、在历史消息中查找出所有关键字的位置,存放在一个关键字位置列表中,利用java的字符串提供的indexOf方法,对历史聊天记录进行遍历查找,每找到一个关键字的位置,就把这个位置信息放入关键字位置列表中,因此关键字位置列表中是按顺序存放要查找的关键字的位置信息。 Step two, find out the location of all the keywords in the message history, stored in a key position in the list, using the java string indexOf method provided, for chat history to traverse to find, find the location of every single keyword, this position put the information into the key position in the list, so the keyword position in the list is the order of the storage location information keywords you are looking for.

[0015] 步骤三、点击上一个按钮或下一个按钮后,从关键字位置列表中获取关键字的最后一个位置信息或第一个位置信息,利用JTextComponent组件提供的select方法,设置高亮的位置的开始位置(最后一个关键字的位置)和结束位置(关键字的长度)。 [0015] Step three, the next click a button or a button, the last acquired position information or the position information of a position of a keyword from the keyword list, using the select component provides JTextComponent method, provided the position of the highlighted starting position (position of the last keyword) and end position (the length of the keyword). 再次点击上一个按钮时,判断关键字是否改变或者历史聊天记录的内容是否发生变化(聊天记录增加,或者减少),如果没有发生变化(不重新遍历聊天记录,这样可以提高效率,减少资源开销),从关键字位置列表获取上一个关键字的位置,然后定位,设置高亮。 When you click on a button again to determine whether to change the keyword or the content of the chat history whether changes (chats increase, or decrease) the occurrence, if not changed (no re-iterate chats, so you can improve efficiency and reduce resource overhead) , get a list of keywords from a position on a key position, and then positioning, setting highlighted. 如果查找到第一个关键字位置时,再点击上一个按钮时,则定位到最后一个关键字的位置,使之可以进行循环。 If you find the time to the first keyword position, then click on a button, then navigate to the location of the last keyword, so that it can circulate. 如果关键字或者聊天记录发生变化,则重新遍历聊天记录,查找到每个关键字在聊天记录中的位置,更新关键字位置列表信息,从关键字位置列表中获取最后一个关键字的位置信息或者第一个关键字的位置信息,利用JTextComponent组件提供的select方法,设置高亮的位置的开始位置(最后一个关键字的位置)和结束位置(关键字的长度)。 If the keyword or chats changes, re-iterate chats, find the location of each keyword in the chat log, update your keyword list location information to obtain location information from the last keyword or keyword list of locations a start position information of the keyword, making use of select components provide JTextComponent method is provided highlighted position (position of the last keyword) and an end position (length of a key).

[0016] 本发明具有如下优点:一种在即时通讯的聊天记录中搜索关键字的方法可以根据关键字在聊天记录中快速的查询到含有关键字的信息,并且可以快速地进行上一个和下一个关键字的切换。 [0016] The present invention has the following advantages: A method of instant messaging chat search key can quickly query key to the information contained in the keyword chats, and may be one lower and quickly a key switch. [0017] 虽然以上描述了本发明的具体实施方式,但是熟悉本技术领域的技术人员应当理解,我们所描述的具体的实施例只是说明性的,而不是用于对本发明的范围的限定,熟悉本领域的技术人员在依照本发明的精神所作的等效的修饰以及变化,都应当涵盖在本发明的权利要求所保护的范围内。 [0017] While the above described specific embodiment of the present invention, but skilled in the art in the art will appreciate, our specific embodiments described are illustrative only and are not intended to limit the scope of the present invention, are familiar Those skilled in the art in equivalent modifications and variations in the spirit of the present invention is made, should be encompassed within the scope of the claims of the present invention is protected.

Claims (5)

  1. 1.一种在即时通讯的聊天记录中搜索关键字的方法,其特征在于:包括如下步骤: 步骤10、输入要搜索的关键字并设置所要查询聊天记录的范围,开始查询; 步骤20、从设置的聊天记录的范围中查询关键字在聊天记录中的每一处位置信息,并将关键字的每一处位置信息按查询到的先后顺序存放入关键字位置列表中; 步骤30、从关键字位置列表取出位置信息进行定位,在聊天窗口中显示所述位置信息前后的聊天记录。 1. A method in a chat chat in the search key, characterized by: comprising the following steps: Step 10, the keywords input to search for the query and set the desired range chat start inquiry; step 20, from chats range provided in the location information query key every chat record, the location information and every query keywords according to the order of the storage location keyword list; step 30, the key word list extracted position information to locate the position, the position of the display before and after the chat message in the chat window.
  2. 2.根据权利要求1所述的一种在即时通讯的聊天记录中搜索关键字的方法,其特征在于:所述步骤30进一步具体为: 步骤31、若用户点击上一个按钮,则从关键字位置列表中取出最后一个位置信息进行定位,若用户点击下一个按钮,则从关键字位置列表中取出第一个位置信息进行定位; 步骤32、若用户再次点击上一次按钮或者下一个按钮,判断聊天记录是否变化或者关键字是否变化,若聊天记录无变化且关键字也无变化,则从关键字位置列表中取出当前位置信息的上一个或者下一个位置信息进行定位,若聊天记录变化或关键字变化,则重新遍历聊天记录,查找到关键字在聊天记录中的每一处位置信息,更新关键字位置列表,之后执行步骤31。 According to one of the claims 1 keyword search method in the instant messaging chat, wherein: the step 30 is further detailed below: Step 31, if the user clicks on a button, the keyword from remove the last position in the list to locate the position information, if the user clicks the next button, the position from the keyword list to take the first position information is positioned; a step 32, a next button or a button if the user clicks again, the determination whether the key change, or whether the chat change, no change, and if the chat is also unchanged key, removed from the keyword list on a position or a lower position information of the current position information for positioning, when the key variation or chats word changes, then re-iterate chats, every key position to find information in the chat log, update your keyword position in the list, after performing step 31.
  3. 3.根据权利要求1或2所述的一种在即时通讯的聊天记录中搜索关键字的方法,其特征在于:所述关键字位置列表为一维数组。 3. A method according to claim 1 or claim keyword search method in the instant messaging chat, characterized in that: said keyword list is a one-dimensional array of positions.
  4. 4.根据权利要求1或2所述的一种在即时通讯的聊天记录中搜索关键字的方法,其特征在于:所述定位为关键字高亮定位。 4 according to one of claim 1 or claim 2 keyword search method in the instant messaging chat, wherein: said positioning highlight keyword targeting.
  5. 5.根据权利要求1或2所述的一种在即时通讯的聊天记录中搜索关键字的方法,其特征在于:所述关键字的位置信息为关键字的位置值。 5. A method according to claim 1 or claim keyword search method in the instant messaging chat, wherein: the location information of the key is a key value of the position.
CN 201310663449 2013-12-10 2013-12-10 Method for searching instant messaging chatting records for keywords CN103744857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201310663449 CN103744857A (en) 2013-12-10 2013-12-10 Method for searching instant messaging chatting records for keywords

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201310663449 CN103744857A (en) 2013-12-10 2013-12-10 Method for searching instant messaging chatting records for keywords

Publications (1)

Publication Number Publication Date
CN103744857A true true CN103744857A (en) 2014-04-23

Family

ID=50501875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201310663449 CN103744857A (en) 2013-12-10 2013-12-10 Method for searching instant messaging chatting records for keywords

Country Status (1)

Country Link
CN (1) CN103744857A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516629A (en) * 2014-12-01 2015-04-15 上海合合信息科技发展有限公司 Historical message display method and device
WO2015180306A1 (en) * 2014-05-27 2015-12-03 中兴通讯股份有限公司 Method and device for querying instant message, and computer storage medium
CN105183725A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Method for translating word on web page and electronic device
CN105208212A (en) * 2015-09-30 2015-12-30 努比亚技术有限公司 Chatting record display device and method
CN105243057A (en) * 2015-09-30 2016-01-13 北京奇虎科技有限公司 Method for translating web page contents and electronic device.
CN105354187A (en) * 2015-09-30 2016-02-24 北京奇虎科技有限公司 Method for translating webpage contents and electronic device
CN105376148A (en) * 2015-12-25 2016-03-02 北京奇虎科技有限公司 Chat message arrangement method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072205A (en) * 2007-06-21 2007-11-14 腾讯科技(深圳)有限公司 Chat information searching method and system
US20080172357A1 (en) * 2007-01-17 2008-07-17 Google Inc. Location in search queries
CN102541901A (en) * 2010-12-26 2012-07-04 上海量明科技发展有限公司 Method and system for identifying and outputting information during document reading
CN102779173A (en) * 2012-06-25 2012-11-14 北京奇虎科技有限公司 Webpage text highlight display method and webpage text highlight display system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172357A1 (en) * 2007-01-17 2008-07-17 Google Inc. Location in search queries
CN101072205A (en) * 2007-06-21 2007-11-14 腾讯科技(深圳)有限公司 Chat information searching method and system
CN102541901A (en) * 2010-12-26 2012-07-04 上海量明科技发展有限公司 Method and system for identifying and outputting information during document reading
CN102779173A (en) * 2012-06-25 2012-11-14 北京奇虎科技有限公司 Webpage text highlight display method and webpage text highlight display system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180306A1 (en) * 2014-05-27 2015-12-03 中兴通讯股份有限公司 Method and device for querying instant message, and computer storage medium
CN104516629A (en) * 2014-12-01 2015-04-15 上海合合信息科技发展有限公司 Historical message display method and device
CN105183725A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Method for translating word on web page and electronic device
CN105208212A (en) * 2015-09-30 2015-12-30 努比亚技术有限公司 Chatting record display device and method
CN105243057A (en) * 2015-09-30 2016-01-13 北京奇虎科技有限公司 Method for translating web page contents and electronic device.
CN105354187A (en) * 2015-09-30 2016-02-24 北京奇虎科技有限公司 Method for translating webpage contents and electronic device
CN105376148A (en) * 2015-12-25 2016-03-02 北京奇虎科技有限公司 Chat message arrangement method and device

Similar Documents

Publication Publication Date Title
US7711742B2 (en) Intelligent data query builder
US8364709B1 (en) Determining word boundary likelihoods in potentially incomplete text
US20130290319A1 (en) Performing application searches
US7840579B2 (en) Mobile device retrieval and navigation
US20080033921A1 (en) Method and apparatus for processing metadata
US20110066619A1 (en) Automatically finding contextually related items of a task
US20060294063A1 (en) Application launching via indexed data
US7769752B1 (en) Method and system for updating display of a hierarchy of categories for a document repository
US20100275109A1 (en) Efficient discovery, display, and autocompletion of links to wiki resources
US20090024595A1 (en) Automatic expanded language search
US20130268526A1 (en) Discovery engine
US20120023120A1 (en) Predictive query suggestion caching
CN101266603A (en) Webpage information sorting method, system and service system applying the classification
US20110202493A1 (en) Translating User Interaction With A Touch Screen Into Text
US20090157617A1 (en) Methods for enhancing digital search query techniques based on task-oriented user activity
CN101452453A (en) Input method web site navigation method and input method system
US20090157653A1 (en) Methods for enhancing digital search results based on task-oriented user activity
US20120185498A1 (en) Tokenized Search Suggestions
US20140279996A1 (en) Providing crowdsourced answers to information needs presented by search engine and social networking application users
US20090157729A1 (en) Methods for generating search engine index enhanced with task-related metadata
US20110320440A1 (en) Placement of search results using user intent
US20090112845A1 (en) System and method for language sensitive contextual searching
JP2007034466A (en) Information retrieval system and information retrieval program
US20130282703A1 (en) Semantically Enriched Search of Services
US20140074833A1 (en) User-specific synthetic context object matching

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
WD01