WO2022052817A1 - 搜索处理方法、装置、终端及存储介质 - Google Patents

搜索处理方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2022052817A1
WO2022052817A1 PCT/CN2021/114839 CN2021114839W WO2022052817A1 WO 2022052817 A1 WO2022052817 A1 WO 2022052817A1 CN 2021114839 W CN2021114839 W CN 2021114839W WO 2022052817 A1 WO2022052817 A1 WO 2022052817A1
Authority
WO
WIPO (PCT)
Prior art keywords
search
word
message
content
interface
Prior art date
Application number
PCT/CN2021/114839
Other languages
English (en)
French (fr)
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
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2022052817A1 publication Critical patent/WO2022052817A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Definitions

  • the present application relates to the field of computer and Internet technologies, and in particular, to a search processing method, device, terminal, and storage medium.
  • Chat application is one of the most commonly used applications, through which people can send and receive chat messages with friends, colleagues, classmates, etc.
  • a chat message in a chat application After a user receives a chat message in a chat application, if he wants to perform a search operation on some content in the chat message, he often needs to open another search application (such as a browser) with a search function, and then use the search application in the search application. Manually enter the corresponding keywords in , and then trigger the search application to perform the search operation.
  • another search application such as a browser
  • Embodiments of the present application provide a search processing method, device, terminal, and storage medium, which can improve the efficiency of performing operations on certain content in chat messages and reduce the complexity of operations.
  • the technical solution is as follows:
  • a search processing method applied to a chat application which is executed by a terminal, and the method includes:
  • chat session interface including chat messages
  • a search interface corresponding to the selected message content is displayed, and the search interface is used to implement a search function related to the selected message content.
  • a search processing method which is executed by a terminal, and the method includes:
  • a corresponding search operation is performed for the target word.
  • a processing method applied to a chat application which is executed by a terminal, and the method includes:
  • chat session interface including chat messages
  • a search processing apparatus applied to a chat application comprising:
  • a conversation interface display module for displaying a chat conversation interface, the chat conversation interface including chat messages
  • a toolbar display module configured to display a toolbar corresponding to the content of the selected message in the chat message in response to a content selection operation for the chat message, the toolbar including a search tool option;
  • a search interface display module configured to display a search interface corresponding to the selected message content in response to a selection operation for the search tool option, where the search interface is used to implement a search function related to the selected message content.
  • a search processing apparatus includes:
  • the user interface display module is used to display the user interface
  • an interface content determination module configured to determine the selected interface content in the user interface in response to a content selection operation for the user interface
  • a word selection interface display module configured to display a word selection interface corresponding to the content of the selected interface, where the word selection interface includes words obtained by performing word segmentation processing on the content of the selected interface;
  • a target word determination module configured to determine a target word in a selected state in response to a word selection operation on the word selection interface
  • a search operation execution module configured to execute a corresponding search operation for the target word.
  • a processing apparatus applied to a chat application comprising:
  • a conversation interface display module for displaying a chat conversation interface, the chat conversation interface including chat messages
  • a message content determination module configured to determine the selected message content in the chat message in response to a content selection operation for the chat message
  • a word selection interface display module configured to display a word selection interface corresponding to the content of the selected message, and the word selection interface includes words obtained by performing word segmentation on the content of the selected message;
  • a target word determination module configured to determine a target word in a selected state in response to a word selection operation on the word selection interface
  • An operation execution module configured to execute a corresponding operation on the target word.
  • a terminal includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, The at least one piece of program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned methods.
  • a computer-readable storage medium where at least one instruction, at least one segment of program, code set or instruction set is stored in the storage medium, the at least one instruction, the at least one segment of The program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned methods.
  • a computer program product or computer program where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal executes the above-mentioned methods.
  • a toolbar corresponding to the content of the selected message is displayed for the user to select the desired operation, thereby enriching the operation functions.
  • an operation entry for realizing the search function is provided. The user only needs to select the message content in the chat session interface and click the search tool option to trigger the execution of the search function, without performing application switching, Operations such as keyword input fully improve the efficiency of performing a search operation on certain content in the chat message, and reduce the complexity of the operation.
  • FIG. 1 is a schematic diagram of an application running environment provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a search processing method applied to a chat application provided by an embodiment of the present application
  • FIG. 3 to 6 are schematic diagrams of interfaces involved in the embodiment of FIG. 2;
  • FIG. 7 is a flowchart of a search processing method applied to a chat application provided by another embodiment of the present application.
  • FIG. 8 to 9 are schematic diagrams of interfaces involved in the embodiment of FIG. 7;
  • FIG. 10 is a flowchart of a processing method applied to a chat application provided by another embodiment of the present application.
  • FIG. 10 11 to 12 are schematic diagrams of interfaces involved in the embodiment of FIG. 10;
  • FIG. 13 is a flowchart of a search processing method provided by another embodiment of the present application.
  • FIG. 14 is a schematic diagram of a process for obtaining and displaying search results provided by an embodiment of the present application.
  • FIG. 15 is a block diagram of a search processing apparatus applied to a chat application provided by an embodiment of the present application.
  • 16 is a block diagram of a processing apparatus applied to a chat application provided by another embodiment of the present application.
  • FIG. 17 is a block diagram of a search processing apparatus provided by another embodiment of the present application.
  • FIG. 18 is a structural block diagram of a terminal provided by an embodiment of the present application.
  • FIG. 1 shows a schematic diagram of an application running environment provided by an embodiment of the present application.
  • the application running environment may include: a terminal 10 and a server 20 .
  • the terminal 10 may be an electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a PC (Personal Computer, personal computer) and the like.
  • a client of a chat application may be installed in the terminal 10 .
  • a chat application refers to any application that can provide a function of sending and receiving chat messages, such as social applications, instant messaging applications, shopping applications, game applications, office applications, Live video applications, etc.
  • the above chat message may be a chat message sent and received between two user accounts, or a chat message sent and received in a group, or an account corresponding to a user account and a system account (such as an AI (Artificial Intelligence, artificial intelligence) question answering system) ), which is not limited in this embodiment of the present application.
  • AI Artificial Intelligence, artificial intelligence
  • the server 20 is configured to provide background services for the terminal 10 to support the terminal 10 to implement various functions provided by the embodiments of the present application.
  • the server 20 may be the background server of the above chat application, and provides background services for the client of the chat application in the terminal 10 .
  • the server 20 may be a server, a server cluster composed of multiple servers, or a cloud computing service center.
  • the server 20 provides background services for multiple terminals 10 at the same time.
  • the terminal 10 and the server 20 can communicate with each other through the network 30 .
  • FIG. 2 shows a flowchart of a search processing method applied to a chat application provided by an embodiment of the present application.
  • the method can be applied to a terminal.
  • the execution subject of each step may be the terminal 10 in the application running environment shown in FIG. 1 , or may be a client of a chat application installed in the terminal 10 .
  • the method may include the following steps (210-230):
  • Step 210 displaying a chat session interface, where the chat session interface includes chat messages.
  • the chat session interface is a user interface used to display the sent and received chat messages and realize the function of sending and receiving chat messages.
  • the chat session interface can be an interface for private chat between two user accounts, an interface for group chat between multiple user accounts in a group, or a user account and other accounts (such as system accounts, official accounts, etc.) The interface for sending and receiving messages between.
  • Chat messages are included in the chat conversation interface.
  • the chat messages include at least one of the following: text messages, picture messages, and voice messages.
  • the message content of the above text message may be a word, a word, or a sentence or a combination of multiple sentences.
  • the message content of the above picture message may include one or more pictures.
  • the message content of the above voice message may include one or more pieces of voice.
  • a message bubble is displayed in the chat session interface, and the message content of the chat message is displayed in the message bubble.
  • chat messages also include file messages.
  • the above file message refers to the message corresponding to the file transmitted by the user through the chat session interface.
  • the message content of the file message includes one or more files, and the file may be a file of a type such as a text, a table, or a picture, which is not limited in this embodiment of the present application.
  • User A sends User B a document file through a chat application.
  • the chat session interface further includes information such as avatars, nicknames, and/or timestamps corresponding to chat messages of each account participating in the chat session.
  • the chat session interface may include timestamps corresponding to each chat message or timestamps corresponding to some chat messages, and the timestamps corresponding to the chat messages may be sending timestamps and/or receiving timestamps corresponding to the chat messages.
  • Step 220 in response to the content selection operation for the chat message, display a toolbar corresponding to the content of the selected message in the chat message, and the toolbar includes a search tool option.
  • the above content selection operation refers to an operation of selecting message content in the chat message.
  • the user may select the entire message content in the chat message as the selected message content, or may select part of the message content in the chat message as the selected message content.
  • the content selection operation includes a touch operation.
  • the above-mentioned touch operation includes operation types such as a single-click operation, a long-press operation, and a double-click operation, which are not limited in this embodiment of the present application.
  • the above-mentioned toolbar is an interface element used to provide the user with various operation tool options.
  • the display style of the toolbar is a rectangle or a rounded rectangle.
  • the above-mentioned toolbar is displayed above the chat session interface, or displayed next to the content of the selected message, so that the user can operate.
  • the search tool option is used to trigger a search operation for the selected message content.
  • the tool bar includes a search tool option, where the search tool option is a selection item corresponding to the search tool and is used to implement the search function provided by the search tool.
  • the above-mentioned tool bar also includes at least one of the following operation tool options: forwarding tool option, favorite tool option, deletion tool option, citation tool option, copy tool option, translation tool option, etc., which are not made in this embodiment of the present application. limited.
  • the forwarding tool option is used to trigger a forwarding operation for the selected message content.
  • the Favorite Tool option is used to trigger the favorite action for the selected message content.
  • the delete tool option is used to trigger a delete action on the selected message content.
  • the Quote Tool option is used to trigger a quote action on the selected message content.
  • the copy tool option is used to trigger a copy operation for the selected message content.
  • the translation tool option is used to trigger a translation operation for the content of the selected message, and the content of the selected message can be translated into the content of the specified language, or the content of the selected message can be translated into the content of the language selected by the user.
  • the so-called reference operation refers to copying the content of the selected message to the message sending box of the chat session interface, and then the user can input a reply message for the content of the selected message in the message sending box. In this way, the selected message content and the reply message can be sent.
  • the content selection operation may be performed on multiple chat messages. That is, the above-mentioned selected message content may include message content in one chat message, or may include message content in multiple chat messages.
  • the content of the selected message is different, and the operation tool options included in the toolbar are also different.
  • Step 230 In response to the selection operation for the search tool option, display a search interface corresponding to the selected message content.
  • the above-mentioned selection operation includes a click operation, and of course other operations may also be used, which is not limited in this embodiment of the present application.
  • the above search interface is used to implement a search function related to the selected message content.
  • the search interface includes a recommended search result related to the selected message content, where the recommended search result is a search result related to a keyword, and the keyword is a word in the selected message content.
  • the recommended search result may be a search result related to the keyword obtained by the chat application after intelligently identifying the content of the selected message and extracting the keyword.
  • the recommended search results may include web pages, articles, official accounts, small programs, etc., which are not limited in this embodiment of the present application.
  • the chat session interface 30 displays a chat message 31 and a toolbar 32 displayed after the chat message 31 is selected.
  • a search interface 34 is displayed, and search results 35 related to the chat message 31 are displayed in the search interface 34.
  • the toolbar corresponding to the content of the selected message is displayed, so that the user can select the operation to be performed, Rich operation functions.
  • an operation entry for realizing the search function is provided. The user only needs to select the message content in the chat session interface and click the search tool option to trigger the execution of the search function, without performing application switching, Operations such as keyword input fully improve the efficiency of performing a search operation on certain content in the chat message, and reduce the complexity of the operation.
  • the above method further comprises the steps of:
  • Step 231 in response to the selection operation for the search tool option, determining a plurality of search terms based on the content of the selected message.
  • the above search term is a word in the selected message content that may be the subject of the search, and the search term is the above keyword.
  • the plurality of search words include words that the user wants to search for.
  • the process of determining multiple search terms based on the content of the selected message is as follows: performing word segmentation on the content of the selected message to obtain a word segmentation result of the content of the selected message.
  • the word segmentation process described above refers to a process of dividing the text content into words or words.
  • the word segmentation result of the selected message content can be obtained through word segmentation processing.
  • the above word segmentation result includes a single character or a single word.
  • word segmentation processing is performed on the selected message content by using a neural network model, and the embodiments of the present application do not limit the technical means used to implement the word segmentation processing.
  • the neural network model has the function of word segmentation processing.
  • the neural network is trained based on multiple training samples to obtain a neural network model with a word segmentation processing function.
  • the training sample includes textual content that includes tagging information for tagging words in the textual content.
  • use the neural network to perform word segmentation processing on the text content included in the training sample to obtain words, compare the obtained words and the marked words in the text content, and adjust the parameters of the neural network based on the comparison results; Repeat the above process until a neural network model with word segmentation processing function is trained.
  • preliminary filtering processing is performed on the content of the selected message.
  • the above filtering process refers to filtering the special symbols or spaces in the content of the selected message. For example, expressions or redundant symbols in the content of the selected message can be filtered out by filtering. In this way, in the subsequent word segmentation processing, word segmentation processing can be performed on the filtered selected message content, thereby improving the accuracy of the word segmentation processing.
  • a possible word segmentation processing method is exemplarily described below, and the solution for word segmentation processing is not limited to this method.
  • chat message includes a text message
  • words are obtained by performing word segmentation on the text content included in the text message.
  • word segmentation processing is performed on the text content through Natural Language Processing (NLP).
  • NLP Natural Language Processing
  • the text content contained in the picture message is recognized and processed; the words are obtained by performing word segmentation processing on the recognized text content.
  • the text content contained in the picture message is identified through text recognition processing, and then the above word segmentation processing is performed on the identified text content.
  • the text content contained in the picture message is recognized and processed by optical character recognition (Optical Character Recognition, OCR).
  • chat message includes a voice message
  • voice recognition processing is performed on the voice message to obtain corresponding text content
  • word segmentation processing is performed on the recognized text content to obtain words.
  • the text content contained in the voice information is obtained through speech recognition processing, and then the above-mentioned word segmentation processing is performed on the recognized text content.
  • voice recognition processing is performed on the voice message through automatic speech recognition (Automatic Speech Recognition, ASR) to obtain corresponding text content.
  • ASR Automatic Speech Recognition
  • each word is scored with a recommendation degree, and a word with a recommendation degree score higher than a threshold is selected as the above-mentioned search word.
  • the recommendation degree score may be scored by combining multi-dimensional information such as search popularity of each word, user historical search records, etc., which is not limited in this embodiment of the present application.
  • the recommendation score of a word is obtained by weighting the search popularity of the word and the user's historical search records.
  • obtain the search popularity of the word and obtain the user's historical search record corresponding to the word, where the user's historical search record includes the word.
  • Count the number of records obtained by the user's historical search records perform weighting processing on the search popularity and the number of records, and obtain a recommendation score for the word. For example, the following first formula can be used to weight the search popularity and the number of records to obtain the recommendation score of the word.
  • S is the recommendation score of the word
  • hot is the search popularity of the word
  • num is the number of records
  • a and b are the two specified weighting coefficients
  • * is the multiplication operation.
  • the background server of the search application may include the search popularity of the word, and may include the user's historical search records corresponding to the word. Therefore, the search popularity of the word is obtained from the background server, and the user's historical search records corresponding to the word are obtained.
  • Step 232 Display a plurality of search terms determined based on the selected message content on the search interface corresponding to the selected message content.
  • the search interface includes a plurality of search terms determined based on the content of the selected message.
  • the search interface includes search results related to multiple search terms.
  • the search result is a result obtained from a network search based on some or all of the search words in the plurality of search words.
  • the above-mentioned search results related to the plurality of search words are arranged according to the degree of relevancy with the above-mentioned plurality of search words.
  • the above-mentioned search results related to multiple search terms are arranged according to page views.
  • the server increases the number of views of the search result as the search result is viewed.
  • the number of page views of the search result may be stored in the server and/or the number of page views of the search result is included in the search result. Therefore, in step 232, when each search result related to multiple search terms is obtained, the pageview volume of each search result is obtained from each search result, or the number of page views of each search result is obtained separately from the server where each search result is located.
  • the pageview volume of the search results, and each search result is ranked based on the pageview volume of each search result, and the search interface includes each ranked search result.
  • the above-mentioned arrangement of search results related to multiple search terms may be changed according to actual needs, for example, advertisement push.
  • one possible way of displaying search terms in the search interface is as follows:
  • the other search words may be hidden.
  • the search term display control is used to trigger the display of this other search term.
  • the search word display control can be triggered.
  • other search terms other than the M recommended search terms are displayed.
  • the determined search words are used as recommended search words, and the recommended search words and search word display controls are displayed in the search interface.
  • the foregoing threshold number is a preset value, such as 5 or 6, which is not limited in this embodiment of the present application.
  • the above-mentioned recommended search words are based on at least one condition such as user search records (that is, the search records of the current user, or the search records of all users), word semantic information, context, etc., from the above-mentioned multiple searches.
  • the recommended search term to the user identified in the term. In this way, the simplicity of the interface can be improved, the interface space can be saved, and at the same time, the normal use of the user can be guaranteed not to be affected.
  • a plurality of recommended search terms 41 and search results 42 corresponding to the plurality of recommended search terms 41 are displayed in the search interface 40 .
  • a search term display control 43 is also displayed in the search interface 40.
  • search interface 40 also displays text content 45 corresponding to the selected message content and a word selection control 46.
  • the word selection control 46 can be used to trigger the display of a word selection interface (not shown in the figure), related word selection interface and The description of the word selection control 46 is detailed in the following embodiments.
  • FIG. 5 it exemplarily shows a schematic diagram of another search interface.
  • Fig. 5(a) shows the search interface 51 and the loading prompt icon 54 in the loading state
  • Fig. 5(b) shows the search interface 52 and the error prompt information 55 in the error state
  • Fig. 5(c) shows the The search interface 53 and the refresh control 56 in the refreshed state are displayed.
  • Step 233 in response to a search triggering operation for a target search word among the plurality of search words, display a search result display interface corresponding to the target search word.
  • the above-mentioned target search term refers to any search term among multiple search terms.
  • the search result display interface includes search results related to the target search term, such as search results including the target search term.
  • the chat session interface 30 displays a chat message 31 and a toolbar 32 displayed after the chat message 31 is selected.
  • the search interface 34 is displayed.
  • the search interface 34 displays search results 35 related to the chat message 31 , and a search term display control 61 .
  • the search result display interface 62 corresponding to the target search term in the search term display control 61 is displayed.
  • the search result display interface 62 displays search results 63 related to the target search term.
  • the user can perform a touch operation on the search words to realize fast search, reduce the operation complexity, and improve the efficiency and flexibility of the search.
  • FIG. 7 shows a flowchart of a search processing method applied to a chat application provided by another embodiment of the present application.
  • the method can be applied to a terminal.
  • the execution subject of each step may be the terminal 10 in the application running environment shown in FIG. 1 , or may be a client of a chat application installed in the terminal 10 .
  • the method may include the following steps (701-708):
  • step 701 a chat session interface is displayed, and the chat session interface includes chat messages.
  • the chat message includes a text message, a picture message and/or a voice message.
  • Step 702 in response to the content selection operation for the chat message, display a toolbar corresponding to the content of the selected message in the chat message.
  • the tool bar includes at least one operation tool option, such as including a search tool option, a forward tool option, a favorite tool option, a delete tool option, a citation tool option, a copy tool option, a translation tool option, etc., the embodiment of the present application. This is not limited.
  • search tool option forwarding tool option, favorite tool option, deletion tool option, reference tool option, copy tool option, and translation tool option, please refer to the introduction in the above embodiment for details, and will not be repeated here. .
  • step 702 includes the following two implementations:
  • Mode 1 In response to the default selection operation for the chat message, determine the message content in the default selected state in the chat message; display a toolbar corresponding to the selected message content in the chat message, where the selected message content includes the message in the default selected state content.
  • the above-mentioned default selection operation includes a long-press operation, and of course other operations may also be performed, which is not limited in this embodiment of the present application.
  • the message content in the default selected state includes all message content corresponding to the chat message.
  • the selected message content includes the message content in the default selected state.
  • the message content in the default selected state in the chat message includes all the text content of the text message.
  • the message content in the default selected state in the chat message includes all text contents obtained by performing image recognition processing on the picture message.
  • the message content in the default selected state in the chat message includes all text contents obtained by performing speech recognition processing on the voice message.
  • Method 2 In response to a manual selection operation for the chat message, determine the content of the message in the manually selected state; display a toolbar corresponding to the content of the selected message in the chat message, where the content of the selected message includes the message in the manually selected state content.
  • the above manual selection operation refers to an operation of manually adjusting and selecting message content in the chat message.
  • the selected message content includes the message content in the manually selected state.
  • the message content in the manually selected state includes a paragraph of words in a chat message, or multiple paragraphs of discontinuous words.
  • the above content selection operation for chat messages further includes multiple selection operations for multiple chat messages.
  • the message contents corresponding to the multiple chat messages are combined, and the combined message contents are determined as the message contents in the selected state; the display corresponds to the selected message contents in the chat messages. toolbar.
  • the user may select multiple chat messages, and then perform corresponding operations on the selected message content in the multiple chat messages. For example, the user receives two messages, which are "XX District, XX Street, XX District, XX City" and "Consignee XXX, Phone XXXX". At this time, the user can select these two messages at the same time, and then merge the two messages.
  • chat message content corresponding to the chat message is displayed in the chat session interface.
  • step 2 in response to the manual selection operation for the chat message, the step of determining the message content in the manually selected state in the chat message includes the following sub-steps:
  • Each selection operation is used to select an item of message content in the chat message.
  • the selection operation may be a sliding selection operation.
  • the user performs a sliding selection operation in the text content corresponding to the chat message, and the word passed by the sliding trajectory of the sliding selection operation is the selected message content, or the starting point of the sliding selection operation. and the end point is the selected message content.
  • the chat message includes a text message
  • the text content corresponding to the chat message includes the text content included in the text message.
  • the chat message when the chat message includes a picture message, the text content corresponding to the chat message includes text content obtained by performing image recognition processing on the picture message.
  • the chat message when the chat message includes a voice message, the text content corresponding to the chat message includes text content obtained by performing speech recognition processing on the voice message.
  • the chat message is a picture message or a voice message
  • the text content corresponding to the chat message may be displayed next to the chat message, as shown below.
  • the user can manually select all or part of the message content in the chat message as the selected message content according to the user's own needs.
  • Step 703 in response to the selection operation for the search tool option, perform word segmentation processing on the selected message content to obtain words after word segmentation processing in the selected message content.
  • Step 704 Determine a plurality of search words in the words after word segmentation processing.
  • word segmentation is performed on the message content to obtain multiple words, a recommendation score for each word is obtained, and a word whose recommendation score exceeds a threshold is selected as a search word.
  • Step 705 Display a search interface corresponding to the selected message content, where the search interface includes the above-mentioned multiple search terms.
  • the search interface is used to implement the search function related to the selected message content.
  • the search interface includes a word selection control, and the above word selection control is used to trigger the display of the word selection interface.
  • the search interface includes search results related to chat messages.
  • the above-mentioned search results related to chat messages include preliminary search results obtained after performing intelligent search based on chat messages.
  • the above-mentioned search interface corresponding to the content of the selected message can also be understood as a display interface of preliminary search results obtained by intelligently searching the key content in the chat message.
  • the above intelligent search operation is not performed, and the search result is not displayed in the search interface.
  • Step 706 in response to the specified trigger operation for the search interface, display a word selection interface corresponding to the selected message content.
  • the above-mentioned specified trigger operation may be a trigger operation for a word selection control in the search interface.
  • the triggering operation may also be directed to a designated area in the search interface. For example, the user clicks the designated area to trigger the display of the word selection interface, which is not limited in this embodiment of the present application.
  • the word selection interface includes words obtained by performing word segmentation on the selected message content.
  • the word selection interface may be an independent interface or a window.
  • the display level of the word selection interface is higher than the search interface, and the word selection interface is superimposed on the upper layer of the search interface for display.
  • the word selection interface is a floating window, which is displayed floating above the search interface, and the user can drag and move the floating window.
  • the key words and non-key words in the words of the selected message content wherein, the key words are displayed on the word selection interface, and the non-key words are not displayed on the word selection interface.
  • the above key words include words that reflect the user's intention, or words that have key information. For example, subject, verb, noun in a sentence.
  • the above non-keywords include words that have no actual meaning, or words that do not affect the user's understanding. For example, words like "um”, "ah”, etc.
  • non-key words include modal particles.
  • no key information is included in the non-key words.
  • the step of determining the key words and non-key words in the words of the selected message content can be performed after step 703, at this time the key words can be displayed in the search interface, and the non-key words are not in the search interface. to display.
  • Step 707 in response to the word selection operation on the word selection interface, determine the target word in the selected state.
  • the word selection operation is a sliding selection operation.
  • an implementation manner of step 707 is as follows: in response to the sliding selection operation on the word selection interface, the word that the sliding trajectory of the sliding selection operation passes through is determined as the target word in the selected state .
  • the sliding track refers to the track passed by the object (such as the user's finger) that performs the sliding selection operation.
  • the terminal receives the sliding selection operation, it can record the position coordinates of the touch point in real time, and the sliding track is formed by sequentially connecting a plurality of touch points.
  • the words passed by the sliding track refer to the area where the display area of the word and the sliding track intersect.
  • Step 708 perform a search operation related to the target word.
  • search for search results that contain the target word and display the search results obtained from the search.
  • the search result display interface mentioned in the above embodiment displays the search result obtained by the above search, and the above-mentioned target word is displayed in the text editing box (ie the search box) in the search result display interface, and the above-mentioned target word is displayed.
  • the target word is editable text.
  • a search keyword is determined according to the target word, and search results related to the search keyword are obtained.
  • the search keyword may be determined based on the target word and a preset logical relationship, for example, the preset logical relationship may be an "and" relationship, so that All target terms need to be included in the search results.
  • the search keyword may be obtained by splicing multiple target words in a set order, for example, the target words include "game” and "video", and by splicing these two target words, " game video” as a search keyword.
  • the above setting order may be the selection order of each target word, or may be the arrangement order of each target word in the word selection interface, which is not limited in this embodiment of the present application.
  • the chat session interface 30 displays a chat message 31 and a toolbar 32 displayed after the chat message 31 is selected.
  • the search interface 34 is displayed.
  • the search interface 34 displays search results 35 related to the chat message 31 , a search term display control 61 , and a word selection control 81 .
  • a word selection interface 82 is displayed, and the user can select the target word 83 in the word selection interface 82 through a sliding selection operation.
  • step 702 in response to the selection operation for the search tool option, a search result display interface corresponding to the content of the selected message in the chat message is displayed.
  • a chat message 31 is displayed on the chat conversation interface 30 , and a toolbar 32 is displayed after the user selects a word 91 .
  • the search result presentation interface 62 for the word 91 is displayed.
  • the search result display interface 62 displays search results 63 related to the word 91 .
  • the user may also edit the word 91 in the text edit box 92 in the search result presentation interface 62 .
  • the user can quickly select the desired search term to trigger the execution of the corresponding search operation, without the need for the user to do it by himself. Select and enter search terms efficiently and quickly.
  • the word segmentation result of the selected message content can be displayed in the word selection interface, and the target word can be selected in the word selection interface through the word selection operation, so as to realize the target word
  • the function of performing the corresponding search operation on the word realizes flexible and customized selection of search words, and better meets the actual search needs of users.
  • FIG. 10 shows a flowchart of a search processing method applied to a chat application provided by another embodiment of the present application.
  • the method can be applied to a terminal.
  • the execution subject of each step may be the terminal 10 in the application running environment shown in FIG. 1 , or may be a client of a chat application installed in the terminal 10 .
  • the method may include the following steps (1001-1005):
  • step 1001 a chat session interface is displayed, and the chat session interface includes chat messages.
  • Step 1002 in response to the content selection operation for the chat message, determine the content of the selected message in the chat message.
  • the above-mentioned selected message content may be the message content in the default selected state in the chat message, or may be the message content in the manually selected state in the chat message.
  • a toolbar is displayed, and the toolbar may include at least one operation tool option, such as a search tool option.
  • Step 1003 displaying a word selection interface corresponding to the selected message content.
  • step 1003 word segmentation processing is also performed on the selected message content, and the word selection interface includes words obtained by performing word segmentation processing on the selected message content.
  • the process of performing word segmentation processing on the content of the selected message may refer to the introduction and description in the above embodiment for details, which will not be repeated here.
  • the above step 1003 is performed.
  • user operation steps are simplified and operation complexity is reduced.
  • Step 1004 in response to the word selection operation on the word selection interface, determine the target word in the selected state.
  • the target word in the selected state refers to the word selected by the word selection operation in the word selection interface.
  • the word selection operation is a sliding selection operation.
  • the sliding track formed by the sliding selection operation is determined by the starting position, the passing position and the ending position of the sliding selection operation.
  • the word that the sliding track passes through is the target word in the selected state.
  • the display style of the target word in the selected state is changed.
  • the above-mentioned target word in the selected state is the word selected by the user through the sliding selection operation.
  • the method of selecting the target word is not limited to the sliding selection operation, and may also be implemented by a click operation or other operations, which is not limited in this embodiment of the present application.
  • the word passed by the sliding track is determined as the target word in the selected state. It is more convenient and quick to determine the target word in the selected state by the words passed by the sliding track, and avoid the words outside the sliding track from being selected by the user, improve the flexibility and accuracy of selecting multiple discontinuous words, and at the same time The operation complexity is reduced, and it is more in line with people's usage habits. In terms of technical implementation, it is also more concise.
  • a single word, or multiple consecutive or non-consecutive words can be identified by a single swipe selection operation.
  • the sliding track may include multiple segments.
  • determine the words passed by each segment of the sliding track determine the target word in the selected state; wherein, the target word includes the words passed by each segment of the sliding track.
  • the user can perform multiple swipe selection operations in the word selection interface.
  • the word selection interface may support the user to perform multiple sliding selection operations in the interface, and record the multiple sliding tracks formed.
  • multiple segments of words can be determined through multiple sliding selection operations. In this way, the user can simultaneously select multiple discontinuous words in a segment of text as target words, so as to perform corresponding operations on the target words, such as Search operation.
  • Step 1005 perform a corresponding operation on the target word.
  • the corresponding operation performed in the foregoing step 1005 includes at least one of the following operation modes:
  • Operation mode 1 perform a search operation on the target word
  • Operation method 2 perform forwarding operation for the target word
  • Operation mode 3 perform a share operation on the target word
  • Operation mode 4 perform a favorite operation on the target word
  • Operation mode five perform a copy operation on the target word
  • Operation mode 6 perform translation operation on the target word
  • Operation mode 7 Execute document creation operation for the target word.
  • a text editing box is displayed in the word selection interface, and after the above step 1004, the following step is further included: displaying the target word in the text editing box. That is, the above text edit box includes the target word.
  • the above text edit box refers to a control that can edit text.
  • the target word in the selected state is displayed in the text editing box, and the target word in the selected state is editable text.
  • the user can edit the selected target word.
  • the edited target word is displayed in the text edit box.
  • the above-mentioned editing operation refers to an operation of performing editing actions such as addition or deletion of target words.
  • the edited target word refers to the word obtained by modifying the target word through an editing operation.
  • step 1005 may be performed as follows: a corresponding operation is performed on the modified target word.
  • performing a corresponding operation on the edited target word may be implemented by long-pressing the edited target word, or by clicking an operation option in the word selection interface.
  • the above-mentioned multiple operation options may also be directly displayed in the word selection interface displayed in step 1003, and it is not necessary to wait until the target word in the selected state is determined before displaying it.
  • the above-mentioned multiple operation options may be displayed in the word selection interface, or may be displayed in an independent interface.
  • the above-mentioned independent interface may be a pop-up window in which multiple operation options are displayed.
  • the above target operation option refers to any operation option among multiple operation options.
  • the user can select the target operation option according to his own intention, and then execute the operation corresponding to the target operation option to achieve the user's purpose.
  • the above operation options include, but are not limited to, search operation options, forward operation options, share operation options, favorite operation options, copy operation options, translation operation options, and document creation operation options.
  • the application that performs the operation and the application that displays the chat session interface are the same application, that is, the above-mentioned chat application.
  • the method flow provided by the embodiments of the present application is applied to the same application, and if a user wants to implement a certain function, there is no need to switch back and forth between multiple application programs, which can effectively reduce the operational complexity.
  • the chat session interface 30 displays a chat message 31 and a toolbar 32 displayed after the user selects the chat message 31 .
  • the word selection interface 82 is displayed, and the user can select the target word 83 through a sliding selection operation in the word selection interface 82.
  • a search control 84 is displayed in the word selection interface 82.
  • each word in the word selection interface is displayed with a word segmentation display effect. That is, each word has a certain degree of distinction.
  • the word selection result includes multiple word options, each word option displays a word, and a word option can be a rectangle or other shape. the interface elements area.
  • a word segmentation display effect is displayed in the word selection interface 120 .
  • the word “you” corresponds to a display box 121, indicating that "you” is a word after word segmentation
  • the word “drinking tea” corresponds to a display box 122, indicating that "drinking tea” is a two-character word after word segmentation.
  • the technical solutions provided by the embodiments of the present application by performing word segmentation processing on the text content corresponding to the chat message, the word segmentation result is displayed in the word selection interface, and the target word can be selected in the word segmentation result through the word selection operation. , thereby realizing the function of performing corresponding operations on target words, improving the flexibility, convenience and accuracy of performing operations on chat messages, reducing operational complexity, and enriching the functions executable in the chat session interface.
  • FIG. 13 shows a flowchart of a search processing method provided by another embodiment of the present application.
  • the method can be applied to a terminal.
  • the execution subject of each step can be the terminal 10 in the application running environment shown in FIG. 1 , the operating system of the terminal 10 , or the application installed and running in the terminal 10 (such as chat applications or other applications) client.
  • the method may include the following steps (1301-1305):
  • Step 1301 Display a user interface, where the user interface includes interface content.
  • the user interface may be any display interface displayed by the terminal.
  • it can be a user interface displayed by an operating system, such as a desktop, a setting interface, etc., or a user interface displayed by an application program installed in the terminal, such as a chat session interface of a chat application, and a game match interface of a game application. , the video playback interface of the video application, and so on.
  • the above-mentioned interface content may be visible content in the user interface, such as text and other content, or may be invisible content in the interface content, such as voice content.
  • the user interface is a chat interface
  • the content of the interface is chat messages
  • the chat messages may include visible text messages and/or picture messages, or the chat messages may include invisible voice messages.
  • Step 1302 in response to the content selection operation for the user interface, determine the selected interface content in the user interface.
  • the content selection operation is used to select interface content in the user interface.
  • the selected interface content may be the entire interface content in the user interface, or may be part of the interface content in the user interface.
  • the content of the selected interface may include a form such as text, picture, or voice, which is not limited in this embodiment of the present application.
  • Step 1303 Display a word selection interface corresponding to the selected interface content, and the word selection interface includes words obtained by performing word segmentation processing on the selected interface content.
  • words are obtained by directly performing word segmentation processing on the content of the selected interface in the form of text.
  • the selected interface content in non-text form is identified and processed to obtain the content of the selected interface in text form, and then the content of the selected interface in text form is obtained. Perform word segmentation to get words.
  • the above-mentioned recognition processing includes, but is not limited to, image recognition processing, voice recognition processing, and the like.
  • Step 1304 in response to the word selection operation on the word selection interface, determine the target word in the selected state.
  • the target word in the selected state refers to the word selected by the word selection operation in the word selection interface.
  • the word selection operation may be a sliding selection operation, a click selection operation, or other forms of operation.
  • a sliding selection operation the word passed by the sliding trajectory corresponding to the sliding selection operation is determined as the target word in the selected state; or, the closed graph formed by the sliding trajectory corresponding to the sliding selection operation is determined. word, identified as the selected target word.
  • Step 1305 perform a corresponding search operation for the target word.
  • a search keyword is determined according to the target word, and search results related to the search keyword are obtained.
  • the search keyword may be determined based on the target word and a preset logical relationship, for example, the preset logical relationship may be an "and" relationship, so that All target terms need to be included in the search results.
  • the search keyword may be obtained by splicing multiple target words in a set order, for example, the target words include "game” and "video", and by splicing these two target words, " game video" as a search keyword.
  • the above setting order may be the selection order of each target word, or may be the arrangement order of each target word in the word selection interface, which is not limited in this embodiment of the present application.
  • the intent classification corresponding to the search term is determined through an intent classification model.
  • the intent classification model may be a pre-trained machine learning model for implementing intent classification.
  • the training samples can be manually labeled, and then the model is trained using the training samples.
  • the output result of the intent classification model may include the weight of the search term in each intent classification.
  • the above-mentioned intention classification includes but is not limited to articles, public accounts, mini programs, videos, etc., which can be set according to actual needs, which is not limited in this embodiment of the present application.
  • the training sample includes textual information, at least one search term, and an intent classification, the at least one search term being a word in the textual information.
  • the intelligent model is trained based on each training sample, and an intent classification model with acquisition intent classification is obtained.
  • an intelligent model to perform word segmentation processing on the text content and at least one search term included in each training sample, obtain the intent classification corresponding to each training sample, and compare the meaning classification and corresponding meaning classification of each training sample respectively.
  • the intent classification included in each training sample, and the comparison result corresponding to each training sample is obtained.
  • the parameters of the intelligent model are adjusted based on the comparison results corresponding to each training sample; the above process is repeated until an intent model with the function of acquiring intent classification is trained.
  • the selected message content and the at least one search term are input into the intent classification model, so that the intent classification model is based on the content of the selected message and the at least one search term.
  • the weight of each search term in each intent classification is output. The weight of each search term in each intent category is used to reflect the user's search intent.
  • recall methods include, but are not limited to, inverted recall, vocabulary recall, vector recall, pattern matching recall, and the like.
  • Recall is the retrieval of search results related to a search term from a database.
  • a large number of search results related to the plurality of search words can be searched based on the plurality of search words, and there are many search results irrelevant to the user's search intention in the large number of search results. Therefore, based on the weight of each search term in each intent category, the search results related to the user's search intent are recalled from the large number of search results.
  • each recall result can be scored from dimensions such as timeliness and relevance of the recall results, and then sorted according to the scoring results.
  • the sorting method can also combine the timeliness, relevance, intent weight score, diversity and other dimensions of each recall result to score, and finally select several recall results with scores higher than the threshold as the final search result.
  • FIG. 15 shows a block diagram of a search processing apparatus applied to a chat application provided by an embodiment of the present application.
  • the apparatus has the function of implementing the above-mentioned method example, and the above-mentioned function may be implemented by hardware or by executing corresponding software by hardware.
  • the apparatus 1500 may include: a session interface display module 1501 , a toolbar display module 1502 and a search interface display module 1503 .
  • the conversation interface display module 1501 is configured to display a chat conversation interface, where the chat conversation interface includes chat messages.
  • the toolbar display module 1502 is configured to display a toolbar corresponding to the content of the selected message in the chat message in response to a content selection operation for the chat message, where the toolbar includes a search tool option.
  • the search interface display module 1503 is configured to display a search interface corresponding to the selected message content in response to a selection operation for the search tool option, where the search interface is used to implement a search function related to the selected message content.
  • the search interface includes a plurality of search terms determined based on the content of the selected message.
  • the search interface display module 1503 is further configured to display a search result display interface corresponding to the target search word in response to a search trigger operation for the target search word in the plurality of search words, in the search result display interface. Include search results related to the target search term.
  • the search interface display module 1503 is further configured to:
  • the threshold number of recommended search words and a search word display control in the search interface In the case that the number of the search words determined based on the content of the selected message is greater than a threshold number, display the threshold number of recommended search words and a search word display control in the search interface, where the plurality of search words include the threshold number of recommended search terms;
  • search term display control In response to a triggering operation for the search term display control, other search terms other than the recommended search term are displayed in the search interface.
  • the apparatus 1500 further includes: a word selection interface display module, a target word determination module, and a search operation execution module.
  • a word selection interface display module configured to display a word selection interface corresponding to the selected message content in response to a specified trigger operation for the search interface, where the word selection interface includes word segmentation processing for the selected message content words obtained after.
  • a target word determination module configured to determine a target word in a selected state in response to a word selection operation on the word selection interface.
  • a search operation execution module configured to execute a search operation related to the target word.
  • the word selection operation is a swipe selection operation.
  • the target word determination module is configured to, in response to a sliding selection operation on the word selection interface, determine the word passed by the sliding trajectory of the sliding selection operation as the target word in the selected state .
  • the apparatus 1500 further includes: a key word determination module, configured to determine key words from words obtained after word segmentation processing on the selected message content, and the word selection interface Used to display the determined keyword.
  • a key word determination module configured to determine key words from words obtained after word segmentation processing on the selected message content
  • the word selection interface Used to display the determined keyword.
  • a key word determination module is configured to determine key words and non-key words in the words; wherein the key words are displayed on the word selection interface, and all The non-key words are not displayed on the word selection interface.
  • the toolbar display module 1502 is used to:
  • the chat message In response to a manual selection operation for the chat message, determine the message content in the manually selected state in the chat message; display a toolbar corresponding to the selected message content in the chat message, the selected message content includes the The content of the message in the manually selected state.
  • chat session interface text content corresponding to the chat message is displayed in the chat session interface.
  • the toolbar display module 1502 is further configured to receive at least one selection operation for the text content corresponding to the chat message, and each selection operation is used to select an item of message content in the chat message; The message content selected by the selection operation is determined to be the message content in the manually selected state in the chat message.
  • the text content corresponding to the chat message includes the text content included in the text message; in the case that the chat message includes a picture message, The text content corresponding to the chat message includes the text content obtained by performing image recognition processing on the picture message; in the case that the chat message includes a voice message, the text content corresponding to the chat message includes performing an image recognition process on the voice message. Text content processed by speech recognition.
  • the toolbar corresponding to the content of the selected message is displayed, so that the user can select the operation to be performed, Rich operation functions.
  • an operation entry for realizing the search function is provided. The user only needs to select the message content in the chat session interface and click the search tool option to trigger the execution of the search function, without performing application switching, Operations such as keyword input fully improve the efficiency of performing a search operation on certain content in the chat message, and reduce the complexity of the operation.
  • FIG. 16 shows a block diagram of a processing apparatus applied to a chat application provided by another embodiment of the present application.
  • the apparatus has the function of implementing the above-mentioned method example, and the above-mentioned function may be implemented by hardware or by executing corresponding software by hardware.
  • the apparatus 1600 may include: a conversation interface display module 1601 , a message content determination module 1602 , a word selection interface display module 1603 , a target word determination module 1604 and an operation execution module 1605 .
  • the conversation interface display module 1601 is configured to display a chat conversation interface, where the chat conversation interface includes chat messages.
  • the message content determination module 1602 is configured to determine the selected message content in the chat message in response to the content selection operation for the chat message.
  • the word selection interface display module 1603 is configured to display a word selection interface corresponding to the selected message content, where the word selection interface includes words obtained by performing word segmentation on the selected message content.
  • the target word determination module 1604 is configured to determine a target word in a selected state in response to a word selection operation on the word selection interface.
  • the operation execution module 1605 is configured to perform a corresponding operation on the target word.
  • the word selection operation is a sliding selection operation
  • the target word determination module 1604 is configured to determine the sliding selection in response to the sliding selection operation on the word selection interface The sliding track of the operation; the word passed by the sliding track is determined as the target word in the selected state.
  • the target word determination module 1604 is configured to, when the sliding track includes multiple segments, determine the words passed by each segment of the sliding track; determine the target in the selected state words; wherein, the target words include words passed by each segment of the sliding track.
  • the operation execution module 1605 is configured to: perform a search operation for the target word; or perform a forwarding operation for the target word; or perform a sharing operation for the target word or, perform a collection operation for the target word; or, perform a copy operation for the target word; or, perform a translation operation for the target word; or, perform a document creation operation for the target word.
  • the apparatus 1600 further includes: an option display module, configured to display a plurality of operation options, and different operation options correspond to different operations.
  • the operation execution module 1605 is configured to, in response to a selection operation for a target operation option in the plurality of operation options, perform an operation corresponding to the target operation option for the target word.
  • the apparatus 1600 further includes: a toolbar display module and a search interface display module.
  • a toolbar display module configured to display a toolbar corresponding to the content of the selected message in the chat message in response to a content selection operation for the chat message, where the toolbar includes a search tool option.
  • a search interface display module configured to display a search interface corresponding to the selected message content in response to a selection operation for the search tool option, where the search interface is used to implement a search function related to the selected message content.
  • the word selection interface display module 1603 is further configured to perform the step of displaying the word selection interface corresponding to the selected message content in response to a specified trigger operation for the search interface.
  • the chat message includes at least one of the following: a text message, a picture message, and a voice message.
  • the apparatus 1600 further includes: a word segmentation processing module for:
  • chat message includes the text message, performing word segmentation processing on the text content included in the text message to obtain the word;
  • chat message includes the picture message, performing identification processing on the text content contained in the picture message, and performing word segmentation processing on the identified text content to obtain the words;
  • chat message When the chat message includes the voice message, voice recognition processing is performed on the voice message to obtain corresponding text content; the text content is subjected to word segmentation processing to obtain the word.
  • the apparatus 1600 further includes: a key word determination module, configured to determine key words from words obtained after word segmentation processing on the selected message content, and the word selection interface Used to display the determined keyword.
  • a key word determination module configured to determine key words from words obtained after word segmentation processing on the selected message content
  • the word selection interface Used to display the determined keyword.
  • a key word determination module is configured to determine key words and non-key words in the words; wherein the key words are displayed on the word selection interface, and all The non-key words are not displayed on the word selection interface.
  • the apparatus 1600 further includes: a text box display module and a word editing module.
  • a text box display module configured to display a text edit box, where the text edit box includes the target word.
  • a word editing module configured to display the modified target word in the text editing box in response to an editing operation for the target word.
  • the operation execution module 1605 is configured to execute a corresponding operation on the modified target word.
  • the application performing the operation and the application displaying the chat session interface are the same application.
  • the technical solutions of the embodiments provided in this application by performing word segmentation processing on the text content corresponding to the chat message, the word segmentation result is displayed in the word selection interface, and the target word can be selected in the word segmentation result through the word selection operation. words, so as to realize the function of performing corresponding operations on target words, improve the flexibility, convenience and accuracy of performing operations on chat messages, reduce the complexity of operations, and enrich the functions that can be performed in the chat session interface.
  • FIG. 17 shows a block diagram of a search processing apparatus provided by another embodiment of the present application.
  • the apparatus has the function of implementing the above-mentioned method example, and the above-mentioned function may be implemented by hardware or by executing corresponding software by hardware.
  • the apparatus 1700 may include: a user interface display module 1701 , an interface content determination module 1702 , a word selection interface display module 1703 , a target word determination module 1704 and a search operation execution module 1705 .
  • the user interface display module 1701 is used to display the user interface.
  • the interface content determination module 1702 is configured to determine the selected interface content in the user interface in response to a content selection operation for the user interface.
  • the word selection interface display module 1703 is configured to display a word selection interface corresponding to the selected interface content, where the word selection interface includes words obtained after word segmentation processing is performed on the selected interface content.
  • the target word determination module 1704 is configured to determine a target word in a selected state in response to a word selection operation on the word selection interface.
  • the search operation execution module 1705 is configured to execute a corresponding search operation for the target word.
  • the search operation execution module 1705 is configured to determine a search keyword according to the target word; obtain search results related to the search keyword.
  • the word selection operation is a swipe selection operation.
  • the target word determination module 1704 is configured to determine the sliding trajectory of the sliding selection operation in response to the sliding selection operation on the word selection interface; determine the words passed by the sliding trajectory as The target term is selected.
  • the target word determination module 1704 is configured to, when the sliding track includes multiple segments, determine the words passed by each segment of the sliding track; determine the target in the selected state words; wherein, the target words include words passed by each segment of the sliding track.
  • the apparatus 1700 further includes: a key word determination module, configured to determine a key word and a non-key word in the word; wherein the key word is in the word The selection interface is displayed, and the non-keyword words are not displayed in the word selection interface.
  • a key word determination module configured to determine a key word and a non-key word in the word; wherein the key word is in the word The selection interface is displayed, and the non-keyword words are not displayed in the word selection interface.
  • the apparatus 1700 further includes: a text box display module and a word editing module.
  • a text box display module configured to display a text edit box, where the text edit box includes the target word.
  • a word editing module configured to display the modified target word in the text editing box in response to an editing operation for the target word.
  • the search operation execution module 1705 is further configured to execute a corresponding search operation for the modified target word.
  • FIG. 18 shows a structural block diagram of a terminal 1800 provided by an embodiment of the present application.
  • the terminal 1800 may be the terminal 10 in the application execution environment shown in FIG. 1 .
  • the terminal is used to implement the methods provided in the above embodiments. Specifically:
  • the terminal 1800 includes: a processor 1801 and a memory 1802 .
  • the processor 1801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 1801 can be implemented by at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field Programmable Gate Array, field programmable gate array), and PLA (Programmable Logic Array, programmable logic array).
  • the processor 1801 may also include a main processor and a co-processor.
  • the main processor is a processor used to process data in the wake-up state, also called CPU (Central Processing Unit, central processing unit); the co-processor is A low-power processor for processing data in a standby state.
  • the processor 1801 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing the content that needs to be displayed on the display screen.
  • the processor 1801 may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 1802 may include one or more computer-readable storage media, which may be non-transitory. Memory 1802 may also include high-speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, a non-transitory computer-readable storage medium in memory 1802 is used to store at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set and configured to be executed by one or more processors to implement the methods described above.
  • the terminal 1800 may optionally further include: a peripheral device interface 1803 and at least one peripheral device.
  • the processor 1801, the memory 1802 and the peripheral device interface 1803 can be connected through a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1803 through a bus, signal line or circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 1804 , a display screen 1805 , a camera assembly 1806 , an audio circuit 1807 , a positioning assembly 1808 and a power supply 1809 .
  • FIG. 18 does not constitute a limitation on the terminal 1800, and may include more or less components than the one shown, or combine some components, or adopt different component arrangements.
  • a computer-readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program , the code set or the instruction set, when executed by a processor, to implement the above-mentioned methods.
  • the computer-readable storage medium may include: ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), SSD (Solid State Drives, solid-state hard disk), or an optical disk.
  • the random access memory may include ReRAM (Resistance Random Access Memory, resistive random access memory) and DRAM (Dynamic Random Access Memory, dynamic random access memory).
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal executes the above-mentioned methods.
  • references herein to "a plurality” means two or more.
  • "And/or" which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/" generally indicates that the associated objects are an "or” relationship.
  • the numbering of the steps described in this document only exemplarily shows a possible execution sequence between the steps. In some other embodiments, the above steps may also be executed in different order, such as two different numbers. The steps are performed at the same time, or two steps with different numbers are performed in a reverse order to that shown in the figure, which is not limited in this embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Acoustics & Sound (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种搜索处理方法、装置、终端及存储介质,属于计算机和互联网技术领域。所述方法包括:显示聊天会话界面;响应于针对聊天消息的内容选择操作,显示与聊天消息中的选中消息内容对应的工具栏;响应于针对搜索工具选项的选择操作,显示选中消息内容对应的搜索界面。本申请通过在聊天会话界面中执行针对聊天消息的内容选择操作之后,显示与选中消息内容对应的工具栏,以供用户选择所需执行的操作,丰富操作功能。另外,通过在工具栏中设置搜索工具选项,提供用于实现搜索功能的操作入口,充分提升了对聊天消息中的某些内容执行搜索操作的效率,降低了操作复杂度。

Description

搜索处理方法、装置、终端及存储介质
本申请要求于2020年9月9日提交的申请号为202010942777.5、发明名称为“应用于聊天应用的搜索处理方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机和互联网技术领域,特别涉及一种搜索处理方法、装置、终端及存储介质。
背景技术
聊天应用是人们最常用的应用程序之一,人们通过聊天应用能够与朋友、同事、同学等收发聊天消息。
用户在聊天应用中接收到一条聊天消息之后,如果想要对该聊天消息中的某些内容执行搜索操作,往往需要打开另一具备搜索功能的搜索应用(如浏览器),然后在该搜索应用中手动输入相应的关键词,然后触发搜索应用执行搜索操作。
然而,上述方式操作较为复杂、低效。
发明内容
本申请实施例提供了一种搜索处理方法、装置、终端及存储介质,能够提升对聊天消息中的某些内容执行操作的效率,降低操作复杂度。所述技术方案如下:
根据本申请实施例的一个方面,提供了一种应用于聊天应用的搜索处理方法,由终端执行,所述方法包括:
显示聊天会话界面,所述聊天会话界面中包括聊天消息;
响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项;
响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能。
根据本申请实施例的一个方面,提供了一种搜索处理方法,由终端执行,所述方法包括:
显示用户界面;
响应于针对所述用户界面的内容选择操作,确定所述用户界面中的选中界面内容;
显示所述选中界面内容对应的字词选择界面,所述字词选择界面中包括对所述选中界面内容进行分词处理后得到的字词;
响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
针对所述目标字词执行对应的搜索操作。
根据本申请实施例的一个方面,提供了一种应用于聊天应用的处理方法,由终端执行,所述方法包括:
显示聊天会话界面,所述聊天会话界面中包括聊天消息;
响应于针对所述聊天消息的内容选择操作,确定所述聊天消息中的选中消息内容;
显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词;
响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
针对所述目标字词执行对应操作。
根据本申请实施例的一个方面,提供了一种应用于聊天应用的搜索处理装置,所述装置包括:
会话界面显示模块,用于显示聊天会话界面,所述聊天会话界面中包括聊天消息;
工具栏显示模块,用于响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项;
搜索界面显示模块,用于响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能。
根据本申请实施例的一个方面,提供了一种搜索处理装置,所述装置包括:
用户界面显示模块,用于显示用户界面;
界面内容确定模块,用于响应于针对所述用户界面的内容选择操作,确定所述用户界面中的选中界面内容;
选词界面显示模块,用于显示所述选中界面内容对应的字词选择界面,所述字词选择界面中包括对所述选中界面内容进行分词处理后得到的字词;
目标字词确定模块,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
搜索操作执行模块,用于针对所述目标字词执行对应的搜索操作。
根据本申请实施例的一个方面,提供了一种应用于聊天应用的处理装置,所述装置包括:
会话界面显示模块,用于显示聊天会话界面,所述聊天会话界面中包括聊天消息;
消息内容确定模块,用于响应于针对所述聊天消息的内容选择操作,确定所述聊天消息中的选中消息内容;
选词界面显示模块,用于显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词;
目标字词确定模块,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
操作执行模块,用于针对所述目标字词执行对应操作。
根据本申请实施例的一个方面,提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现上述各项方法。
根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现上述各项方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。终端的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该终端执行上述各项方法。
本申请实施例提供的技术方案可以带来如下有益效果:
通过在聊天会话界面中执行针对聊天消息的内容选择操作之后,显示与选中消息内容对应的工具栏,以供用户选择所需执行的操作,丰富操作功能。另外,通过在工具栏中设置搜索工具选项,提供用于实现搜索功能的操作入口,用户仅需在聊天会话界面中选择消息内容并点击搜索工具选项即可触发执行搜索功能,无需执行应用切换、关键词输入等操作,充分提升了对聊天消息中的某些内容执行搜索操作的效率,降低了操作复杂度。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附 图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例提供的应用程序运行环境的示意图;
图2是本申请一个实施例提供的应用于聊天应用的搜索处理方法的流程图;
图3至6是图2实施例所涉及的界面示意图;
图7是本申请另一个实施例提供的应用于聊天应用的搜索处理方法的流程图;
图8至9是图7实施例所涉及的界面示意图;
图10是本申请另一个实施例提供的应用于聊天应用的处理方法的流程图;
图11至12是图10实施例所涉及的界面示意图;
图13是本申请另一个实施例提供的搜索处理方法的流程图;
图14是本申请一个实施例提供的搜索结果的获取与展示流程的示意图;
图15是本申请一个实施例提供的应用于聊天应用的搜索处理装置的框图;
图16是本申请另一个实施例提供的应用于聊天应用的处理装置的框图;
图17是本申请另一个实施例提供的搜索处理装置的框图;
图18是本申请一个实施例提供的终端的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
请参考图1,其示出了本申请一个实施例提供的应用程序运行环境的示意图。该应用程序运行环境可以包括:终端10和服务器20。
终端10可以是诸如手机、平板电脑、游戏主机、电子书阅读器、多媒体播放设备、可穿戴设备、PC(Personal Computer,个人计算机)等电子设备。可选地,终端10中可以安装聊天应用的客户端。
在本申请实施例中,聊天应用是指任何能够提供聊天消息的收发功能的应用程序,例如社交类应用程序、即时通信类应用程序、购物类应用程序、游戏类应用程序、办公类应用程序、视频直播类应用程序等等。上述聊天消息可以是两个用户帐号之间收发的聊天消息,也可以是群组中收发的聊天消息,还可以是用户帐号与系统帐号(如AI(Artificial Intelligence,人工智能)问答系统对应的帐号)之间收发的聊天消息,本申请实施例对此不作限定。
服务器20用于为终端10提供后台服务,以支持终端10实现本申请实施例提供的各项功能。可选地,服务器20可以是上述聊天应用的后台服务器,为终端10中聊天应用的客户端提供后台服务。服务器20可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。可选地,服务器20同时为多个终端10提供后台服务。
可选地,终端10和服务器20之间可通过网络30进行互相通信。
请参考图2,其示出了本申请一个实施例提供的应用于聊天应用的搜索处理方法的流程图。该方法可应用于终端中,如各步骤的执行主体可以是图1所示的应用程序运行环境中的终端10,也可以是安装于终端10中聊天应用的客户端。该方法可以包括以下几个步骤(210~230):
步骤210,显示聊天会话界面,聊天会话界面中包括聊天消息。
聊天会话界面是用于展示收发的聊天消息、实现聊天消息的收发功能的用户界面。聊天会话界面可以是两个用户帐号之间私聊的界面,也可以是群组中的多个用户帐号进行群聊的界面,还可以是用户帐号与其他帐号(如系统帐号、公众号等)之间进行消息收发的界面。
聊天会话界面中包括聊天消息。可选地,聊天消息包括以下至少一种:文本消息、图片消息、语音消息。上述文本消息的消息内容可以是一个字,也可以是一个词,还可以是一个 句子或者多个句子的组合。上述图片消息的消息内容可以包括一张或者多张图片。上述语音消息的消息内容可以包括一段或者多段语音。可选地,聊天会话界面中显示消息气泡,该消息气泡中显示有聊天消息的消息内容。
可选地,聊天消息还包括文件消息。上述文件消息是指用户通过聊天会话界面传送的文件所对应的消息。文件消息的消息内容包括一个或者多个文件,该文件可以是文本、表格、图片等类型的文件,本申请实施例对此不作限定。例如,用户甲通过聊天应用向用户乙发送了一个文档文件。可选地,聊天会话界面中还包括参与聊天会话的各个帐号的头像、昵称、和/或聊天消息对应的时间戳等信息。其中,聊天会话界面可以包括每条聊天消息对应的时间戳或部分聊天消息对应的时间戳,聊天消息对应的时间戳可以为聊天消息对应的发送时间戳和/或接收时间戳。
步骤220,响应于针对聊天消息的内容选择操作,显示与聊天消息中的选中消息内容对应的工具栏,工具栏中包括搜索工具选项。
上述内容选择操作是指选择聊天消息中消息内容的操作。用户可以选择聊天消息中的全部消息内容作为选中消息内容,也可以选择聊天消息中的部分消息内容作为选中消息内容。可选地,内容选择操作包括触控操作。上述触控操作包括单击操作、长按操作、双击操作等操作类型,本申请实施例对此不作限定。
上述工具栏是用于向用户提供各个操作工具选项的界面元素。可选地,工具栏的显示样式为长方形或者圆角矩形等。可选地,上述工具栏显示在聊天会话界面上方,或者显示在选中消息内容的旁边,以便用户操作。可选地,搜索工具选项用于触发针对选中消息内容的搜索操作。可选地,工具栏中包括搜索工具选项,该搜索工具选项是搜索工具对应的选择项,用于实现搜索工具所提供的搜索功能。
可选地,上述工具栏中还包括以下至少一个操作工具选项:转发工具选项、收藏工具选项、删除工具选项、引用工具选项、复制工具选项、翻译工具选项等等,本申请实施例对此不作限定。
可选地,转发工具选项用于触发针对选中消息内容的转发操作。收藏工具选项用于触发针对选中消息内容的收藏操作。删除工具选项用于触发针对选中消息内容的删除操作。引用工具选项用于触发针对选中消息内容的引用操作。复制工具选项用于触发针对选中消息内容的复制操作。翻译工具选项用于触发针对选中消息内容的翻译操作,可以将选中消息内容翻译成指定语言的内容,或者,将选中消息内容翻译成用户选择的语言内容。
可选地,所谓引用操作是指将选中消息内容复制到聊天会话界面的消息发送框,然后用户可以在该消息发送框中输入针对该选中消息内容的回复消息。这样可以发送该选中消息内容和该回复消息。
可选地,可对多条聊天消息执行内容选择操作。也即,上述选中消息内容可以包括一条聊天消息中的消息内容,也可以包括多条聊天消息中的消息内容。
可选地,选中消息内容不同,工具栏中包含的操作工具选项也不同。
步骤230,响应于针对搜索工具选项的选择操作,显示选中消息内容对应的搜索界面。
可选地,上述选择操作包括点击操作,当然也可以是其他操作,本申请实施例对此不作限定。上述搜索界面用于实现与选中消息内容相关的搜索功能。可选地,搜索界面中包括与选中消息内容相关的推荐搜索结果,该推荐搜索结果是与关键词相关的搜索结果,该关键词是该选中消息内容中的词。
可选地,该推荐搜索结果可以是聊天应用通过对选中消息内容进行智能识别并提取关键词之后,获取到的与该关键词相关的搜索结果。推荐搜索结果可以包括网页、文章、公众号、小程序等,本申请实施例对此不作限定。
在一个示例中,如图3所示,聊天会话界面30显示有聊天消息31以及选择该聊天消息31后显示的工具栏32。在用户点击工具栏32中的搜索工具选项33(搜一搜)后,显示搜索 界面34,搜索界面34中显示有与聊天消息31相关的搜索结果35。
综上所述,本申请实施例提供的技术方案,通过在聊天会话界面中执行针对聊天消息的内容选择操作之后,显示与选中消息内容对应的工具栏,以供用户选择所需执行的操作,丰富操作功能。另外,通过在工具栏中设置搜索工具选项,提供用于实现搜索功能的操作入口,用户仅需在聊天会话界面中选择消息内容并点击搜索工具选项即可触发执行搜索功能,无需执行应用切换、关键词输入等操作,充分提升了对聊天消息中的某些内容执行搜索操作的效率,降低了操作复杂度。
在示例性实施例中,上述方法还包括如下步骤:
步骤231,响应于针对搜索工具选项的选择操作,基于选中消息内容确定多个搜索词。
上述搜索词是选中消息内容中可能作为搜索主体的词,该搜索词为上述关键词。可选地,多个搜索词中包括用户想要搜索的字词。
可选地,基于选中消息内容确定多个搜索词的过程如下:对选中消息内容进行分词处理,得到选中消息内容的分词结果。上述分词处理是指将文本内容划分为字或词的处理。通过分词处理可以得到选中消息内容的分词结果。上述分词结果包括单个文字、或者单个词语。可选地,通过神经网络模型对选中消息内容进行分词处理,本申请实施例对实现分词处理所采用的技术手段不作限制。该神经网络模型具有分词处理功能。
可选地,基于多个训练样本对神经网络进行训练,得到具有分词处理功能的神经网络模型。对于每个训练样本,该训练样本包括文本内容,该文本内容包括标记信息,该标记信息用于标记该文本内容中的字词。这样在训练时,使用神经网络对该训练样本包括的文本内容进行分词处理,得到字词,比较得到的字词和该文本内容中被标记的字词,基于比较的结果调整神经网络的参数;重复上述过程,直至训练出具有分词处理功能的神经网络模型。
可选地,在分词处理之前,对选中消息内容进行初步过滤处理。上述过滤处理是指过滤上述选中消息内容中的特殊符号或者空格。比如,通过过滤处理可以将选中消息内容中的表情或者多余的符号过滤掉。这样,在后续分词处理时,可对过滤后的选中消息内容进行分词处理,提高分词处理的准确性。
下面对一种可能的分词处理方式进行示例性说明,分词处理的方案不仅限于此种方式。
在聊天消息包括文本消息的情况下,对文本消息中包含的文本内容进行分词处理得到字词。可选地,通过自然语言处理(Natural Language Processing,NLP)对文本内容进行分词处理。
在聊天消息包括图片消息的情况下,对图片消息中包含的文本内容进行识别处理;对识别到的文本内容进行分词处理得到字词。可选地,通过文字识别处理识别出图片消息中包含的文本内容,再将识别到的文本内容进行上述分词处理。可选地,通过光学字符识别(Optical Character Recognition,OCR)对图片消息中包含的文本内容进行识别处理。
在聊天消息包括语音消息的情况下,对语音消息进行语音识别处理得到相应的文本内容;对识别到的文本内容进行分词处理得到字词。可选地,通过语音识别处理得到语音信息中包含的文本内容,再将识别到的文本内容进行上述分词处理。可选地,通过自动语音识别(Automatic Speech Recognition,ASR)对语音消息进行语音识别处理得到相应的文本内容。
可选地,在对选中消息内容进行分词处理得到多个字词之后,对各个字词进行推荐度打分,选择推荐度打分高于阈值的字词作为上述搜索词。其中,推荐度打分可以综合各个字词的搜索热度、用户历史搜索记录等多维度信息进行打分,本申请实施例对此不作限定。
在一个示例中,字词的推荐度打分通过对字词的搜索热度和用户历史搜索记录进行加权处理得到的。在实现时:获取该字词的搜索热度,以及获取该字词对应的用户历史搜索记录,该用户历史搜索记录包括该字词。统计获取的用户历史搜索记录的记录个数,对该搜索热度和记录个数进行加权处理,得到该字词的推荐度打分。例如,可以采用如下第一公式,对该 搜索热度和记录个数进行加权处理,得到该字词的推荐度打分。
第一公式为:S=a*hot+b*num;
在第一公式中,S为该字词的推荐度打分,hot为该字词的搜索热度,num为该记录个数,a和b为指定的两个加权系数,*为乘法运算。
可选地,搜索应用的后台服务器中可能包括该字词的搜索热度,以及可能包括该字词对应的用户历史搜索记录。所以从该后台服务器中获取该字词的搜索热度,以及获取该字词对应的用户历史搜索记录。
步骤232,在选中消息内容对应的搜索界面显示基于选中消息内容确定的多个搜索词。
可选地,搜索界面中包括基于选中消息内容确定的多个搜索词。
可选地,搜索界面中包括与多个搜索词相关的搜索结果。该搜索结果是基于该多个搜索词中的部分或全部搜索词,从网络中搜索得到的结果。
可选地,上述与多个搜索词相关的搜索结果根据与上述多个搜索词的相关度排列。在一个示例中,对于搜索界面中的每个搜索结果,基于该搜索结果包括的搜索词个数,确定该搜索结果的相关度,该相关度为该搜索结果与该多个搜索词之间的相关度;基于每个搜索结果的相关度,排列每个搜索结果,搜索界面包括排列的每个搜索结果。
可选地,上述与多个搜索词相关的搜索结果根据浏览量进行排列。在一个示例中,对于每个搜索结果,以及对于该搜索结果所在的服务器,当该搜索结果被浏览时,该服务器增加该搜索结果的浏览量。服务器中可能保存该搜索结果的浏览量和/或该搜索结果中包括该搜索结果的浏览量。所以在步骤232,在得到与多个搜索词相关的每个搜索结果时,从每个搜索结果中分别获取每个搜索结果的浏览量,或者,从每个搜索结果所在的服务器分别获取每个搜索结果的浏览量,基于每个搜索结果的浏览量,排列每个搜索结果,搜索界面包括排列的每个搜索结果。
可选地,上述与多个搜索词相关的搜索结果的排列可根据实际需要进行改变,例如广告推送。
在示例性实施例中,在搜索界面中显示搜索词的一种可能的方式如下:
1、检测搜索词的数量。
2、在基于选中消息内容确定的搜索词的数量大于阈值数量的情况下,在搜索界面中显示M个推荐搜索词以及搜索词显示控件,M个为该阈值数量。
在搜索词的数量大于阈值数量的情况下,选择M个向用户推荐的搜索词作为推荐搜索词,在搜索界面中初始化该M个推荐搜索词以及每个推荐搜索词对应的搜索词显示控件,显示该该M个推荐搜索词以及每个推荐搜索词对应的搜索词显示控件。
对于除该M个推荐搜索词之外的其他搜索词,可以隐藏该其他搜索词。搜索词显示控件用于触发显示该其他搜索词。可选地,用户需要显示被隐藏的其他搜索词时,可以触发搜索词显示控件。响应触发操作,显示除该M个推荐搜索词之外的其他搜索词。
在搜索词的数量小于或等于阈值数量的情况下,将确定的搜索词作为推荐搜索词,在搜索界面中显示该推荐搜索词以及搜索词显示控件。
可选地,上述阈值数量是预设值,如5或6等,本申请实施例对此不作限定。
可选地,上述推荐搜索词是根据用户搜索记录(即可是当前用户的搜索记录,也可是所有用户的搜索记录)、字词语义信息、上下文语境等至少一种条件,从上述多个搜索词中确定的向用户推荐的搜索词。这样,可以提升界面简洁度,节省界面空间,同时也可保证用户正常使用不受影响。
3、响应于针对搜索词显示控件的触发操作,在搜索界面中显示除推荐搜索词之外的其他搜索词。
在一个示例中,如图4所示,搜索界面40中显示有多个推荐搜索词41,以及对多个推荐搜索词41对应的搜索结果42。搜索界面40中还显示有搜索词显示控件43,当用户点击搜 索词显示控件43后,在搜索界面40中显示除推荐搜索词41之外的其他搜索词44。搜索界面40中还显示有选中消息内容对应的文本内容45以及字词选择控件46,上述字词选择控件46可用于触发显示字词选择界面(图中未示出),有关字词选择界面以及字词选择控件46的介绍详见下文实施例。
在一个示例中,如图5所示,其示例性示出了另一种搜索界面的示意图。图5(a)示出了在加载态下的搜索界面51及加载提示图标54;图5(b)示出了在错误态下的搜索界面52及错误提示信息55;图5(c)示出了在刷新态下的搜索界面53及刷新控件56。
步骤233,响应于针对多个搜索词中的目标搜索词的搜索触发操作,显示目标搜索词对应的搜索结果展示界面。
可选地,上述目标搜索词是指多个搜索词中的任一搜索词。搜索结果展示界面中包括与目标搜索词相关的搜索结果,如包含目标搜索词的搜索结果。
在一个示例中,如图6所示,聊天会话界面30显示有聊天消息31以及选择聊天消息31后显示的工具栏32。在用户点击工具栏32中的搜索工具选项33后,显示搜索界面34。搜索界面34中显示有与聊天消息31相关的搜索结果35,以及搜索词显示控件61。在用户点击搜索词显示控件61后,显示搜索词显示控件61中目标搜索词对应的搜索结果展示界面62。搜索结果展示界面62中显示有与目标搜索词相关的搜索结果63。
综上所述,本申请实施例提供的技术方案,通过在搜索界面中显示搜索词,用户可执行针对搜索词的触控操作实现快速搜索,降低操作复杂度,提升搜索的效率和灵活性。
请参考图7,其示出了本申请另一个实施例提供的应用于聊天应用的搜索处理方法的流程图。该方法可应用于终端中,如各步骤的执行主体可以是图1所示的应用程序运行环境中的终端10,也可以是安装于终端10中聊天应用的客户端。该方法可以包括以下几个步骤(701~708):
步骤701,显示聊天会话界面,聊天会话界面中包括聊天消息。
可选地,该聊天消息包括文本消息、图片消息和/或语音消息。
步骤702,响应于针对聊天消息的内容选择操作,显示与聊天消息中的选中消息内容对应的工具栏。
可选地,工具栏中包括至少一个操作工具选项,如包括搜索工具选项、转发工具选项、收藏工具选项、删除工具选项、引用工具选项、复制工具选项、翻译工具选项等等,本申请实施例对此不作限定。
其中,对搜索工具选项、转发工具选项、收藏工具选项、删除工具选项、引用工具选项、复制工具选项、翻译工具选项的解释,具体可参见上文实施例中的介绍说明,此处不再赘述。
在示例性实施例中,步骤702包括如下两种实现方式:
方式1:响应于针对聊天消息的默认选择操作,确定聊天消息中处于默认选中状态的消息内容;显示与聊天消息中的选中消息内容对应的工具栏,该选中消息内容包括处于默认选中状态的消息内容。
可选地,上述默认选择操作包括长按操作,当然也可以是其他操作,本申请实施例对此不作限定。可选地,处于默认选中状态的消息内容包括聊天消息对应的全部消息内容。在这种情况下,选中消息内容包括处于默认选中状态的消息内容。
可选地,在聊天消息包括文本消息的情况下,聊天消息中处于默认选中状态的消息内容包括该文本消息的全部文本内容。在聊天消息包括图片消息的情况下,聊天消息中处于默认选中状态的消息内容包括对该图片消息进行图像识别处理得到的全部文本内容。在聊天消息包括语音消息的情况下,聊天消息中处于默认选中状态的消息内容包括对该语音消息进行语音识别处理得到的全部文本内容。
方式2:响应于针对聊天消息的手动选择操作,确定聊天消息中处于手动选中状态的消 息内容;显示与聊天消息中的选中消息内容对应的工具栏,该选中消息内容包括处于手动选中状态的消息内容。
上述手动选择操作是指手动调整选择聊天消息中消息内容的操作。在这种情况下,选中消息内容包括处于手动选中状态的消息内容。可选地,手动选中状态的消息内容包括一条聊天消息中一段字词,或者,多段不连续的字词。通过在聊天消息中直接选取该一段字词或该多段不连续的字词后执行相应操作,有效减少了操作步骤,很大程度上提升了操作的灵活性。
在示例性实施例中,上述针对聊天消息的内容选择操作还包括针对多条聊天消息的多项选择操作。响应于针对多条聊天消息的多项选择操作,将多条聊天消息对应的消息内容进行合并,将合并后的消息内容确定为处于选中状态的消息内容;显示与聊天消息中的选中消息内容对应的工具栏。在这种情况下,用户可以选中多条聊天消息,进而针对多条聊天消息中的选中消息内容执行相应的操作。例如用户收到两条消息,分别是“XX市XX区XX街XX小区”、“收货人XXX,电话XXXX”,此时用户可将这两条消息同时选中,然后针对这两条消息合并后的消息“XX市XX区XX街XX小区,收货人XXX,电话XXXX”执行相应的操作,比如邮寄操作或者复制操作等操作,提升操作的灵活性。
在示例性实施例中,聊天会话界面中显示有聊天消息对应的文本内容。方式2中响应于针对聊天消息的手动选择操作,确定聊天消息中处于手动选中状态的消息内容的步骤包括如下子步骤:
a,接收针对聊天消息对应的文本内容的至少一个选择操作。
每个选择操作用于选择聊天消息中的一项消息内容。例如,该选择操作可以是滑动选择操作,用户在聊天消息对应的文本内容中执行滑动选择操作,该滑动选择操作的滑动轨迹经过的字词即为选择的消息内容,或者该滑动选择操作的起点和终点之间的字词即为选择的消息内容。
可选地,在聊天消息包括文本消息的情况下,聊天消息对应的文本内容包括文本消息中包含的文本内容。
可选地,在聊天消息包括图片消息的情况下,聊天消息对应的文本内容包括对图片消息进行图像识别处理得到的文本内容。
可选地,在聊天消息包括语音消息的情况下,聊天消息对应的文本内容包括对语音消息进行语音识别处理得到的文本内容。
例如,在聊天消息为图片消息或语音消息的情况下,聊天消息对应的文本内容可以显示在该聊天消息的旁边,如下方。这样,用户通过对该聊天消息对应的文本内容执行上述手动选择操作,即可实现按照用户自身需求,手动选择聊天消息中的全部或者部分的消息内容作为选中消息内容。
b,将至少一个选择操作所选择的消息内容,确定为聊天消息中处于手动选中状态的消息内容。
步骤703,响应于针对搜索工具选项的选择操作,对选中消息内容进行分词处理,得到选中消息内容分词处理后的字词。
步骤704,在分词处理后的字词中确定多个搜索词。
在一个示例中,对该消息内容进行分词处理,得到多个字词,获取每个字词的推荐度打分,选择推荐度打分超过阈值字词作为搜索词。
可选的,获取每个字词的推荐度打分的详细内容,具体可参见上文实施例中的介绍说明,此处不再赘述。
步骤705,显示选中消息内容对应的搜索界面,该搜索界面中包括上述多个搜索词。
搜索界面用于实现与选中消息内容相关的搜索功能。可选地,搜索界面中包括字词选择控件,上述字词选择控件用于触发显示字词选择界面。可选地,搜索界面中包括与聊天消息相关的搜索结果。上述与聊天消息相关的搜索结果包括基于聊天消息进行智能搜索后的得到 的初步搜索结果。上述选中消息内容对应的搜索界面也可理解为是对聊天消息中的关键内容进行智能搜索后所得初步搜索结果的展示界面。可选地,在聊天消息中不包含关键内容的情况下,不执行上述智能搜索操作,同时在搜索界面中不显示搜索结果。
步骤706,响应于针对搜索界面的指定触发操作,显示选中消息内容对应的字词选择界面。
可选地,上述指定触发操作可以是针对搜索界面中字词选择控件的触发操作。当然,在一些其他实施例中,也可以是针对搜索界面中的指定区域的触发操作,例如用户点击该指定区域即可触发显示字词选择界面,本申请实施例对此不作限定。
字词选择界面中包括对选中消息内容进行分词处理后得到的字词。可选地,字词选择界面可以是一个独立的界面,也可以是一个窗口。例如,字词选择界面的显示层级高于搜索界面,该字词选择界面叠加在搜索界面的上层进行显示。可选的,字词选择界面是浮窗,在搜索界面上方浮动显示,用户可以拖拽移动该浮窗。
可选地,确定上述选中消息内容的字词中的关键字词和非关键字词;其中,关键字词在字词选择界面进行显示,且非关键字词不在字词选择界面进行显示。上述关键字词包括体现用户意图的字词、或者具有关键信息的字词。例如,句子中的主语、动词、名词。上述非关键字词包括无实际意义的字词、或者不影响用户理解的字词。例如,“嗯”、“啊”等字。可选地,非关键字词包括语气助词。可选地,非关键字词中不包含关键信息。确定字词中的关键字词和非关键字词之后,将关键字词在字词选择界面或者搜索界面中进行显示,通过主动排除非关键字词,节省用户界面空间,便于准确分析用户意图,提升用户体验。
可选地,确定选中消息内容的字词中的关键字词和非关键字词的步骤可以在步骤703之后执行,此时关键字词可在搜索界面进行显示,且非关键字词不在搜索界面进行显示。
步骤707,响应于针对字词选择界面的字词选择操作,确定处于选中状态的目标字词。
可选地,字词选择操作为滑动选择操作。在示例性实施例中,步骤707的一种实现方式如下:响应于针对字词选择界面的滑动选择操作,将滑动选择操作的滑动轨迹所经过的字词,确定为处于选中状态的目标字词。
滑动轨迹是指执行滑动选择操作的物体(如用户手指)所经过的轨迹。终端在接收到滑动选择操作时,可以实时记录触摸点的位置坐标,滑动轨迹即由多个触摸点顺序连接构成。滑动轨迹所经过的字词是指字词的显示区域与滑动轨迹存在交集的区域。
步骤708,执行与目标字词相关的搜索操作。
例如,搜索包含目标字词的搜索结果,并将搜索得到的搜索结果进行显示。可选地,在上文实施例中提及的搜索结果展示界面显示上述搜索得到的搜索结果,以及在搜索结果展示界面中的文本编辑框(即搜索框)中显示上述目标字词,并且上述目标字词为可编辑文本。这样,能够有效满足用户在对搜索结果不满意时,对目标字词进行修改进而重新检索的需求,使得搜索操作更加灵活。
可选地,根据目标字词确定搜索关键词,获取与搜索关键词相关的搜索结果。在目标字词的数量为多个的情况下,在一个示例中,搜索关键词可以是基于目标字词以及预设逻辑关系确定的,例如该预设逻辑关系可以是“与”的关系,这样搜索结果中需要包含所有的目标字词。在另一个示例中,搜索关键词可以是按照设定顺序对多个目标字词拼接之后得到的,例如目标字词包括“游戏”和“视频”,对这两个目标字词进行拼接得到“游戏视频”作为搜索关键词。另外,上述设定顺序可以是各个目标字词的选择顺序,也可以是各个目标字词在字词选择界面中的排列顺序,本申请实施例对此不作限定。
在一个示例中,如图8所示,聊天会话界面30显示有聊天消息31以及选择聊天消息31后显示的工具栏32。在用户点击工具栏32中的搜索工具选项33后,显示搜索界面34。搜索界面34中显示有与聊天消息31相关的搜索结果35、搜索词显示控件61以及字词选择控件81。当用户点击字词选择控件81后,显示字词选择界面82,用户可以在字词选择界面82中 通过滑动选择操作选中目标字词83。之后,用户点击搜索按钮84触发执行与目标字词83相关的搜索操作。
在示例性实施例中,若以方式2执行步骤702,则响应于针对搜索工具选项的选择操作,显示与聊天消息中的选中消息内容对应的搜索结果展示界面。
如图9所示,聊天会话界面30显示有聊天消息31,用户在选中字词91后显示工具栏32。在用户点击工具栏32中的搜索工具选项33后,显示针对字词91的搜索结果展示界面62。搜索结果展示界面62中显示有与字词91相关的搜索结果63。用户还可在搜索结果展示界面62中的文本编辑框92中编辑字词91。
综上所述,本申请实施例提供的技术方案,通过在搜索界面中显示基于选中消息内容确定的多个搜索词,用户可以快速选择所需的搜索词触发执行相应的搜索操作,无需用户自行选择和输入搜索词,高效快捷。
另外,若用户想更进一步地进行搜索,可将选中消息内容的分词结果在字词选择界面中显示,并且可通过字词选择操作在字词选择界面中选择目标字词,从而实现针对目标字词执行相应搜索操作的功能,实现对搜索词的灵活、自定义选择,更好地满足用户的实际搜索需求。
请参考图10,其示出了本申请另一个实施例提供的应用于聊天应用的搜索处理方法的流程图。该方法可应用于终端中,如各步骤的执行主体可以是图1所示的应用程序运行环境中的终端10,也可以是安装于终端10中聊天应用的客户端。该方法可以包括以下几个步骤(1001~1005):
步骤1001,显示聊天会话界面,聊天会话界面中包括聊天消息。
步骤1002,响应于针对聊天消息的内容选择操作,确定聊天消息中的选中消息内容。
上述选中消息内容可以是聊天消息中处于默认选中状态的消息内容,也可以是聊天消息中处于手动选中状态的消息内容,具体可参见上文实施例中的介绍说明,此处不再赘述。
可选地,响应于针对聊天消息的内容选择操作,显示工具栏,该工具栏中可以包括至少一个操作工具选项,如搜索工具选项。
步骤1003,显示选中消息内容对应的字词选择界面。
在步骤1003中,还对选中消息内容进行分词处理,字词选择界面中包括对选中消息内容进行分词处理后得到的字词。其中,对选中消息内容进行分词处理的过程,具体可参见上文实施例中的介绍说明,此处不再赘述。
可选地,响应于针对工具栏中的搜索工具选项的选择操作,执行上述步骤1003。通过直接显示字词选择界面,简化用户操作步骤,降低操作复杂度。
步骤1004,响应于针对字词选择界面的字词选择操作,确定处于选中状态的目标字词。
可选地,处于选中状态的目标字词是指字词选择界面中的被字词选择操作选择的字词。
可选地,字词选择操作为滑动选择操作。通过滑动选择操作的起始位置、经过位置以及终止位置确定滑动选择操作形成的滑动轨迹,在字词选择界面中,该滑动轨迹经过的字词为处于选中状态的目标字词。
可选地,响应于针对字词选择界面中显示的字词的滑动选择操作,更改处于选中状态的目标字词的显示样式。可选地,高亮显示处于选中状态的目标字词。上述处于选中状态的目标字词是用户通过滑动选择操作选中的字词。当然,选择目标字词的方式并不仅限于滑动选择操作,还可以通过点击操作或者其他操作实现,本申请实施例对此不作限定。
可选地,将滑动轨迹所经过的字词,确定为处于选中状态的目标字词。通过滑动轨迹所经过的字词来确定选中状态的目标字词,更为方便快捷,并且避免了滑动轨迹外的字词被用户选中,提升选中多段不连续字词的灵活性与准确性,同时降低操作复杂度,更加符合人们的使用习惯。从技术的实现角度来讲,也更为简洁。可选地,通过一次滑动选择操作可确定 一个字词,或者多个连续或不连续的字词。
在一种可能的实施方式中,滑动轨迹可能包括多段。在滑动轨迹包括多段的情况下,确定各段滑动轨迹所经过的字词;确定处于选中状态的目标字词;其中,目标字词包括各段滑动轨迹所经过的字词。
可选地,用户可以在字词选择界面中执行多次滑动选择操作。可选地,字词选择界面可支持用户在界面中执行多次滑动选择操作,并记录所形成的多段滑动轨迹。可选地,通过多次滑动选择操作可确定多段字词,此种方式下用户可以同时选中一段文本中不连续的多个字词作为目标字词,从而针对目标字词执行相应的操作,例如搜索操作。
步骤1005,针对目标字词执行对应操作。
可选地,上述步骤1005中所执行对应操作包括以下至少一种操作方式:
操作方式一:针对目标字词执行搜索操作;
操作方式二:针对目标字词执行转发操作;
操作方式三:针对目标字词执行分享操作;
操作方式四:针对目标字词执行收藏操作;
操作方式五:针对目标字词执行复制操作;
操作方式六:针对目标字词执行翻译操作;
操作方式七:针对目标字词执行文档创建操作。
在示例性实施例中,在字词选择界面中显示文本编辑框,上述步骤1004之后,还包括如下步骤:在文本编辑框中显示目标字词。即上述文本编辑框中包括目标字词。上述文本编辑框是指可对文本进行编辑的控件。可选地,在文本编辑框中显示处于选中状态的目标字词,处于选中状态的目标字词为可编辑文本。在文本编辑框中,用户可以对处于选中状态的目标字词进行编辑。
响应于针对目标字词的编辑操作,在文本编辑框中显示编辑后的目标字词。上述编辑操作是指对目标字词进行增加或者删减等编辑行为的操作。编辑后的目标字词是指通过编辑操作对目标字词进行修改后得到的字词。
可选地,上述步骤1005可按照如下方式执行:针对修改后的目标字词执行对应操作。可选地,针对编辑后的目标字词执行对应操作可以通过长按编辑后的目标字词实现,也可以通过点击字词选择界面中的操作选项进行实现。通过提供对选中的目标字词进行进一步编辑的功能,可满足用户更多需求,简化用户操作,用户无需另外再行单独编辑搜索文本。
在示例性实施例中,上述步骤1004之后,还包括如下步骤:
1、显示多个操作选项。不同的操作选项对应于不同的操作。可选地,在步骤1003中显示的字词选择界面中也可直接显示上述多个操作选项,无需等到确定处于选中状态的目标字词之后再行显示。可选地,上述多个操作选项可以显示在字词选择界面中,也可在独立界面中进行显示。可选地,上述独立界面可以是一个弹窗,其中显示多个操作选项。
2、响应于针对多个操作选项中的目标操作选项的选择操作,针对目标字词执行与目标操作选项对应的操作。上述目标操作选项是指多个操作选项中任一操作选项。用户可根据自己的意图选择目标操作选项,进而执行与目标操作选项对应的操作,以达到用户目的。上述操作选项包括但不限于搜索操作选项、转发操作选项、分享操作选项、收藏操作选项复制操作选项、翻译操作选项以及文档创建操作选项。
在示例性实施例中,执行操作的应用程序和显示聊天会话界面的应用程序为同一应用程序,即为上述聊天应用。本申请实施例提供的方法流程应用于同一应用程序,用户想要实现某一功能,无需在多个应用程序之间来回切换,可有效降低操作复杂度。
在一个示例中,如图11所示,聊天会话界面30显示有聊天消息31以及用户选择聊天消息31后显示的工具栏32。在用户点击工具栏32中的搜索工具选项33后,显示字词选择界面82,用户可以在字词选择界面82中通过滑动选择操作选中目标字词83。另外,字词选择 界面82中还显示有搜索控件84。
在示例性实施例中,字词选择界面中的各个字词以分词显示效果进行显示。也即,各个字词之间具有一定的区分度,例如字词选择结果中包括多个字词选项,每个字词选项中显示有一个字词,一个字词选项可以是一块矩形或者其他形状的界面元素区域。
在一个示例中,如图12所示,字词选择界面120中显示分词显示效果。例如,文字“你”对应一个显示框121,表示“你”是分词后的单字;词语“喝茶”对应一个显示框122,表示“喝茶”是分词后的两字词语。
综上所述,本申请实施例提供的技术方案,通过对聊天消息对应的文本内容进行分词处理,在字词选择界面中显示分词结果,并且可通过字词选择操作在分词结果选中目标字词,从而实现针对目标字词执行相应操作的功能,提升针对聊天消息执行操作的灵活性、便捷性与准确性,降低操作复杂度,并且丰富了在聊天会话界面中可执行的功能。
请参考图13,其示出了本申请另一个实施例提供的搜索处理方法的流程图。该方法可应用于终端中,如各步骤的执行主体可以是图1所示的应用程序运行环境中的终端10,也可以是终端10的操作系统,还可以是终端10中安装运行的应用程序(如聊天应用或者其他应用程序)的客户端。该方法可以包括以下几个步骤(1301~1305):
步骤1301,显示用户界面,该用户界面包括界面内容。
该用户界面可以是终端显示的任意一个显示界面。例如,其可以是操作系统所显示的用户界面,如桌面、设置界面等,也可以是终端中安装的应用程序所显示的用户界面,如聊天应用的聊天会话界面、游戏应用的游戏对局界面、视频应用的视频播放界面,等等。
需要说明的是,上述界面内容可以是在用户界面中可见的内容,如文本等内容,也可以是在界面内容中不可见的内容,如语音内容等。例如,用户界面为聊天界面,界面内容为聊天消息,该聊天消息可以包括可见的文本消息和/或图片消息,或者,该聊天消息可以包括不可见的语音消息。
步骤1302,响应于针对用户界面的内容选择操作,确定用户界面中的选中界面内容。
该内容选择操作用于选择用户界面中的界面内容。
选中界面内容可以是用户界面中的全部界面内容,也可以是用户界面中的部分界面内容。另外,选中界面内容可以包括文本、图片或语音等形式,本申请实施例对此不作限定。
步骤1303,显示选中界面内容对应的字词选择界面,字词选择界面中包括对选中界面内容进行分词处理后得到的字词。
在选中界面内容为文本形式的情况下,直接对该文本形式的选中界面内容进行分词处理得到字词。
在选中界面内容为非文本形式(如图片或语音等形式)的情况下,对该非文本形式的选中界面内容进行识别处理,得到文本形式的选中界面内容,然后对该文本形式的选中界面内容进行分词处理得到字词。其中,上述识别处理包括但不限于图像识别处理、语音识别处理等。
步骤1304,响应于针对字词选择界面的字词选择操作,确定处于选中状态的目标字词。
可选地,处于选中状态的目标字词是指字词选择界面中的被字词选择操作选择的字词。
字词选择操作可以是滑动选择操作,也可以是点击选择操作或者其他形式的操作。例如,在滑动选择操作的情况下,将滑动选择操作对应的滑动轨迹所经过的字词,确定为处于选中状态的目标字词;或者,将滑动选择操作对应的滑动轨迹所形成的封闭图形内的字词,确定为处于选中状态的目标字词。
步骤1305,针对目标字词执行对应的搜索操作。
可选地,根据目标字词确定搜索关键词,获取与搜索关键词相关的搜索结果。
在目标字词的数量为多个的情况下,在一个示例中,搜索关键词可以是基于目标字词以 及预设逻辑关系确定的,例如该预设逻辑关系可以是“与”的关系,这样搜索结果中需要包含所有的目标字词。在另一个示例中,搜索关键词可以是按照设定顺序对多个目标字词拼接之后得到的,例如目标字词包括“游戏”和“视频”,对这两个目标字词进行拼接得到“游戏视频”作为搜索关键词。另外,上述设定顺序可以是各个目标字词的选择顺序,也可以是各个目标字词在字词选择界面中的排列顺序,本申请实施例对此不作限定。
综上所述,本申请实施例提供的技术方案,通过对选中界面内容进行分词处理,在字词选择界面中显示分词结果,并且可通过字词选择操作在分词结果选中目标字词,从而实现针对目标字词执行搜索操作的功能,充分提升了对界面中的某些内容执行搜索操作的效率,降低了操作复杂度。
下面,结合图14,对本申请实施例中涉及的搜索结果的获取与展示方式进行介绍说明。该过程可以如下:
1、对输入的搜索词进行意图分析。
在一个示例中,通过意图分类模型确定搜索词对应的意图分类。意图分类模型可以是预先训练好的用于实现意图分类的机器学习模型。在对该模型进行训练时,可以通过人工标注训练样本,然后采用训练样本对该模型进行训练。意图分类模型的输出结果可以包括搜索词在各意图分类的权重。
可选地,上述意图分类包括但不限于文章、公众号、小程序、视频等,这可以根据实际需求进行设定,本申请实施例对此不作限定。
可选地,对于每个训练样本,该训练样本包括文本信息、至少一个搜索词和意图分类,该至少一个搜索词是该文本信息中的字词。基于该每个训练样本对智能模型进行训练,得到具有获取意图分类的意图分类模型。
可选地,在训练时,使用智能模型对每个训练样本包括的文本内容和至少一个搜索词进行分词处理,得到每个训练样本对应的意图分类,分别比较每个训练样本对应的意思分类和每个训练样本包括的意图分类,得到每个训练样本对应的比较结果。基于每个训练样本对应的比较结果调整智能模型的参数;重复上述过程,直至训练出具有获取意图分类功能的意图模型。
可选地,在本申请实施例中,在得到选中消息内容以及基于选中消息内容得到至少一个搜索词时,向意图分类模型输入该选中消息内容和该至少一个搜索词,使该意图分类模型基于该选中消息内容和该至少一个搜索词,输出每个搜索词在各意图分类的权重。每个搜索词在各意图分类的权重用于反映用户的搜索意图。
2、对每个意图分类进行结果召回,得到各个分类的召回结果。
可选地,召回方式包括但不限于倒排召回、词表召回、向量召回、模式匹配召回等。召回是指从数据库中获取与搜索词相关的搜索结果。
其中,基于多个搜索词可以搜索到与该多个搜索词相关的大量搜索结果,该大量搜索结果中存在不少与用户搜索意图不相关的搜索结果。因此基于每个搜索词在各意图分类的权重,从该大量搜索结果中召回与用户搜索意图相关的搜索结果。
3、对每个分类的召回结果分别进行排序。
对于每个分类的召回结果,可以使用相关排序算法进行该分类下的排序。例如,可以从召回结果的时效性、相关性等维度,对各个召回结果进行打分,然后按照打分结果进行排序。
4、混合所有分类的召回结果,并排序输出搜索结果。
在对每个分类的召回结果进行排序之后,可以选择排序靠前的若干个召回结果,然后对选择的召回结果做进一步的混合排序。此处排序的方式也可以综合各个召回结果的时效性、相关性、意图权重分、多样性等维度进行打分,最后选择打分高于阈值的若干个召回结果作为最终的搜索结果。
需要说明的是,在本申请中为了简化说明,仅对几个示例性实施例进行了介绍说明,本申请各个实施例之间可以任意进行组合,即针对某一实施例中的相关介绍说明,可以应用于另一实施例中,本申请对此不作限制。
下述为本申请装置实施例,可用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图15,其示出了本申请一个实施例提供的应用于聊天应用的搜索处理装置的框图。该装置具有实现上述方法示例的功能,上述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置1500可以包括:会话界面显示模块1501、工具栏显示模块1502和搜索界面显示模块1503。
会话界面显示模块1501,用于显示聊天会话界面,所述聊天会话界面中包括聊天消息。
工具栏显示模块1502,用于响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项。
搜索界面显示模块1503,用于响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能。
在示例性实施例中,所述搜索界面中包括基于所述选中消息内容确定的多个搜索词。所述搜索界面显示模块1503,还用于响应于针对所述多个搜索词中的目标搜索词的搜索触发操作,显示所述目标搜索词对应的搜索结果展示界面,所述搜索结果展示界面中包括与所述目标搜索词相关的搜索结果。
在示例性实施例中,所述搜索界面显示模块1503,还用于:
在基于所述选中消息内容确定的所述搜索词的数量大于阈值数量的情况下,在所述搜索界面中显示所述阈值数量个推荐搜索词以及搜索词显示控件,所述多个搜索词包括所述阈值数量个推荐搜索词;
响应于针对所述搜索词显示控件的触发操作,在所述搜索界面中显示除所述推荐搜索词之外的其他搜索词。
在示例性实施例中,所述装置1500还包括:选词界面显示模块、目标字词确定模块和搜索操作执行模块。
选词界面显示模块,用于响应于针对所述搜索界面的指定触发操作,显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词。
目标字词确定模块,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词。
搜索操作执行模块,用于执行与所述目标字词相关的搜索操作。
在示例性实施例中,所述字词选择操作为滑动选择操作。
所述目标字词确定模块,用于响应于针对所述字词选择界面的滑动选择操作,将所述滑动选择操作的滑动轨迹所经过的字词,确定为处于选中状态的所述目标字词。
在示例性实施例中,所述装置1500还包括:关键字词确定模块,用于从对所述选中消息内容进行分词处理后得到的字词中,确定关键字词,所述字词选择界面用于显示所述确定的关键字词。
在示例性实施例中,关键字词确定模块,用于确定所述字词中的关键字词和非关键字词;其中,所述关键字词在所述字词选择界面进行显示,且所述非关键字词不在所述字词选择界面进行显示。
在示例性实施例中,所述工具栏显示模块1502,用于:
响应于针对所述聊天消息的默认选择操作,确定所述聊天消息中处于默认选中状态的消 息内容;显示与所述聊天消息中的选中消息内容对应的工具栏,所述选中消息内容包括所述处于默认选中状态的消息内容;
或者,
响应于针对所述聊天消息的手动选择操作,确定所述聊天消息中处于手动选中状态的消息内容;显示与所述聊天消息中的选中消息内容对应的工具栏,所述选中消息内容包括所述处于手动选中状态的消息内容。
在示例性实施例中,所述聊天会话界面中显示有所述聊天消息对应的文本内容。
所述工具栏显示模块1502,还用于接收针对所述聊天消息对应的文本内容的至少一个选择操作,每个选择操作用于选择所述聊天消息中的一项消息内容;将所述至少一个选择操作所选择的消息内容,确定为所述聊天消息中处于手动选中状态的消息内容。
在示例性实施例中,在所述聊天消息包括文本消息的情况下,所述聊天消息对应的文本内容包括所述文本消息中包含的文本内容;在所述聊天消息包括图片消息的情况下,所述聊天消息对应的文本内容包括对所述图片消息进行图像识别处理得到的文本内容;在所述聊天消息包括语音消息的情况下,所述聊天消息对应的文本内容包括对所述语音消息进行语音识别处理得到的文本内容。
综上所述,本申请实施例提供的技术方案,通过在聊天会话界面中执行针对聊天消息的内容选择操作之后,显示与选中消息内容对应的工具栏,以供用户选择所需执行的操作,丰富操作功能。另外,通过在工具栏中设置搜索工具选项,提供用于实现搜索功能的操作入口,用户仅需在聊天会话界面中选择消息内容并点击搜索工具选项即可触发执行搜索功能,无需执行应用切换、关键词输入等操作,充分提升了对聊天消息中的某些内容执行搜索操作的效率,降低了操作复杂度。
请参考图16,其示出了本申请另一个实施例提供的应用于聊天应用的处理装置的框图。该装置具有实现上述方法示例的功能,上述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置1600可以包括:会话界面显示模块1601、消息内容确定模块1602、选词界面显示模块1603、目标字词确定模块1604和操作执行模块1605。
会话界面显示模块1601,用于显示聊天会话界面,所述聊天会话界面中包括聊天消息。
消息内容确定模块1602,用于响应于针对所述聊天消息的内容选择操作,确定所述聊天消息中的选中消息内容。
选词界面显示模块1603,用于显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词。
目标字词确定模块1604,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词。
操作执行模块1605,用于针对所述目标字词执行对应操作。
在示例性实施例中,所述字词选择操作为滑动选择操作,所述目标字词确定模块1604,用于响应于针对所述字词选择界面的所述滑动选择操作,确定所述滑动选择操作的滑动轨迹;将所述滑动轨迹所经过的字词,确定为处于选中状态的所述目标字词。
在示例性实施例中,所述目标字词确定模块1604,用于在所述滑动轨迹包括多段的情况下,确定各段所述滑动轨迹所经过的字词;确定处于选中状态的所述目标字词;其中,所述目标字词包括各段所述滑动轨迹所经过的字词。
在示例性实施例中,所述操作执行模块1605,用于:针对所述目标字词执行搜索操作;或者,针对所述目标字词执行转发操作;或者,针对所述目标字词执行分享操作;或者,针对所述目标字词执行收藏操作;或者,针对所述目标字词执行复制操作;或者,针对所述目标字词执行翻译操作;或者,针对所述目标字词执行文档创建操作。
在示例性实施例中,所述装置1600还包括:选项显示模块,用于显示多个操作选项,不 同的操作选项对应于不同的操作。
所述操作执行模块1605,用于响应于针对所述多个操作选项中的目标操作选项的选择操作,针对所述目标字词执行与所述目标操作选项对应的操作。
在示例性实施例中,所述装置1600还包括:工具栏显示模块和搜索界面显示模块。
工具栏显示模块,用于响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项。
搜索界面显示模块,用于响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能。
所述选词界面显示模块1603,还用于响应于针对所述搜索界面的指定触发操作,执行所述显示所述选中消息内容对应的字词选择界面的步骤。
在示例性实施例中,所述聊天消息包括以下至少一种:文本消息、图片消息、语音消息。
在示例性实施例中,所述装置1600还包括:分词处理模块,用于:
在所述聊天消息包括所述文本消息的情况下,对所述文本消息中包含的文本内容进行分词处理得到所述字词;
在所述聊天消息包括所述图片消息的情况下,对所述图片消息中包含的文本内容进行识别处理,对识别到的所述文本内容进行分词处理得到所述字词;
在所述聊天消息包括所述语音消息的情况下,对所述语音消息进行语音识别处理得到相应的文本内容;对识别到的所述文本内容进行分词处理得到所述字词。
在示例性实施例中,所述装置1600还包括:关键字词确定模块,用于从对所述选中消息内容进行分词处理后得到的字词中,确定关键字词,所述字词选择界面用于显示所述确定的关键字词。
在示例性实施例中,关键字词确定模块,用于确定所述字词中的关键字词和非关键字词;其中,所述关键字词在所述字词选择界面进行显示,且所述非关键字词不在所述字词选择界面进行显示。
在示例性实施例中,所述装置1600还包括:文本框显示模块和字词编辑模块。
文本框显示模块,用于显示文本编辑框,所述文本编辑框中包括所述目标字词。
字词编辑模块,用于响应于针对所述目标字词的编辑操作,在所述文本编辑框中显示修改后的目标字词。
所述操作执行模块1605,用于针对所述修改后的目标字词执行对应操作。
在示例性实施例中,执行所述操作的应用程序和显示所述聊天会话界面的应用程序为同一应用程序。
综上所述,本申请提供的实施例的技术方案,通过对聊天消息对应的文本内容进行分词处理,在字词选择界面中显示分词结果,并且可通过字词选择操作在分词结果选中目标字词,从而实现针对目标字词执行相应操作的功能,提升针对聊天消息执行操作的灵活性、便捷性与准确性,降低操作复杂度,并且丰富了在聊天会话界面中可执行的功能。
请参考图17,其示出了本申请另一个实施例提供的搜索处理装置的框图。该装置具有实现上述方法示例的功能,上述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置1700可以包括:用户界面显示模块1701、界面内容确定模块1702、选词界面显示模块1703、目标字词确定模块1704和搜索操作执行模块1705。
用户界面显示模块1701,用于显示用户界面。
界面内容确定模块1702,用于响应于针对所述用户界面的内容选择操作,确定所述用户界面中的选中界面内容。
选词界面显示模块1703,用于显示所述选中界面内容对应的字词选择界面,所述字词选择界面中包括对所述选中界面内容进行分词处理后得到的字词。
目标字词确定模块1704,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词。
搜索操作执行模块1705,用于针对所述目标字词执行对应的搜索操作。
在示例性实施例中,所述搜索操作执行模块1705,用于根据所述目标字词确定搜索关键词;获取与所述搜索关键词相关的搜索结果。
在示例性实施例中,所述字词选择操作为滑动选择操作。所述目标字词确定模块1704,用于响应于针对所述字词选择界面的所述滑动选择操作,确定所述滑动选择操作的滑动轨迹;将所述滑动轨迹所经过的字词,确定为处于选中状态的所述目标字词。
在示例性实施例中,所述目标字词确定模块1704,用于在所述滑动轨迹包括多段的情况下,确定各段所述滑动轨迹所经过的字词;确定处于选中状态的所述目标字词;其中,所述目标字词包括各段所述滑动轨迹所经过的字词。
在示例性实施例中,所述装置1700还包括:关键字词确定模块,用于确定所述字词中的关键字词和非关键字词;其中,所述关键字词在所述字词选择界面进行显示,且所述非关键字词不在所述字词选择界面进行显示。
在示例性实施例中,所述装置1700还包括:文本框显示模块和字词编辑模块。
文本框显示模块,用于显示文本编辑框,所述文本编辑框中包括所述目标字词。
字词编辑模块,用于响应于针对所述目标字词的编辑操作,在所述文本编辑框中显示修改后的目标字词。
所述搜索操作执行模块1705,还用于针对所述修改后的目标字词执行对应的搜索操作。
综上所述,本申请实施例提供的技术方案,通过对选中界面内容进行分词处理,在字词选择界面中显示分词结果,并且可通过字词选择操作在分词结果选中目标字词,从而实现针对目标字词执行搜索操作的功能,充分提升了对界面中的某些内容执行搜索操作的效率,降低了操作复杂度。
请参考图18,其示出了本申请一个实施例提供的终端1800的结构框图。该终端1800可以是图1所示应用程序运行环境中的终端10。该终端用于实施上述实施例中提供的各项方法。具体来讲:
通常,终端1800包括有:处理器1801和存储器1802。
处理器1801可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1801可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1801也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1801可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1801还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器1802可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1802还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1802中的非暂态的计算机可读存储介质用于存储至少一个指令,至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集,且经配置以由一个或者一个以上处理器执行,以实现上述各项方法。
在一些实施例中,终端1800还可选包括有:外围设备接口1803和至少一个外围设备。处理器1801、存储器1802和外围设备接口1803之间可以通过总线或信号线相连。各个外围 设备可以通过总线、信号线或电路板与外围设备接口1803相连。具体地,外围设备包括:射频电路1804、显示屏1805、摄像头组件1806、音频电路1807、定位组件1808和电源1809中的至少一种。
本领域技术人员可以理解,图18中示出的结构并不构成对终端1800的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集在被处理器执行时以实现上述各项方法。
可选地,该计算机可读存储介质可以包括:ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取记忆体)、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取记忆体可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取记忆体)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。
在示例性实施例中,还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。终端的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该终端执行上述各项方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (27)

  1. 一种应用于聊天应用的搜索处理方法,其中,由终端执行,所述方法包括:
    显示聊天会话界面,所述聊天会话界面中包括聊天消息;
    响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项;
    响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能。
  2. 根据权利要求1所述的方法,其中,所述搜索界面中包括基于所述选中消息内容确定的多个搜索词;
    所述显示所述选中消息内容对应的搜索界面之后,还包括:
    响应于针对所述多个搜索词中的目标搜索词的搜索触发操作,显示所述目标搜索词对应的搜索结果展示界面,所述搜索结果展示界面中包括与所述目标搜索词相关的搜索结果。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    在基于所述选中消息内容确定的所述搜索词的数量大于阈值数量的情况下,在所述搜索界面中显示所述阈值数量个推荐搜索词以及搜索词显示控件,所述多个搜索词包括所述阈值数量个推荐搜索词;
    响应于针对所述搜索词显示控件的触发操作,在所述搜索界面中显示除所述M个推荐搜索词之外的其他搜索词。
  4. 根据权利要求1所述的方法,其中,所述显示所述选中消息内容对应的搜索界面之后,还包括:
    响应于针对所述搜索界面的指定触发操作,显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词;
    响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
    执行与所述目标字词相关的搜索操作。
  5. 根据权利要求4所述的方法,其中,所述字词选择操作为滑动选择操作;
    所述响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词,包括:
    响应于针对所述字词选择界面的滑动选择操作,将所述滑动选择操作的滑动轨迹所经过的字词,确定为处于选中状态的所述目标字词。
  6. 根据权利要求4所述的方法,其中,所述显示所述选中消息内容对应的字词选择界面之前,还包括:
    从对所述选中消息内容进行分词处理后得到的字词中,确定关键字词,所述字词选择界面用于显示所述确定的关键字词。
  7. 根据权利要求1至6任一项所述的方法,其中,所述响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,包括:
    响应于针对所述聊天消息的默认选择操作,确定所述聊天消息中处于默认选中状态的消息内容;显示与所述聊天消息中的选中消息内容对应的工具栏,所述选中消息内容包括所述处于默认选中状态的消息内容;
    或者,
    响应于针对所述聊天消息的手动选择操作,确定所述聊天消息中处于手动选中状态的消息内容;显示与所述聊天消息中的选中消息内容对应的工具栏,所述选中消息内容包括所述处于手动选中状态的消息内容。
  8. 根据权利要求7所述的方法,其中,所述聊天会话界面中显示有所述聊天消息对应的文本内容;
    所述响应于针对所述聊天消息的手动选择操作,确定所述聊天消息中处于手动选中状态的消息内容,包括:
    接收针对所述聊天消息对应的文本内容的至少一个选择操作,每个选择操作用于选择所述聊天消息中的一项消息内容;
    将所述至少一个选择操作所选择的消息内容,确定为所述聊天消息中处于手动选中状态的消息内容。
  9. 根据权利要求8所述的方法,其特征在于,
    在所述聊天消息包括文本消息的情况下,所述聊天消息对应的文本内容包括所述文本消息中包含的文本内容;
    在所述聊天消息包括图片消息的情况下,所述聊天消息对应的文本内容包括对所述图片消息进行图像识别处理得到的文本内容;
    在所述聊天消息包括语音消息的情况下,所述聊天消息对应的文本内容包括对所述语音消息进行语音识别处理得到的文本内容。
  10. 一种搜索处理方法,其中,由终端执行,所述方法包括:
    显示用户界面;
    响应于针对所述用户界面的内容选择操作,确定所述用户界面中的选中界面内容;
    显示所述选中界面内容对应的字词选择界面,所述字词选择界面中包括对所述选中界面内容进行分词处理后得到的字词;
    响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
    针对所述目标字词执行对应的搜索操作。
  11. 根据权利要求10所述的方法,其中,所述针对所述目标字词执行对应的搜索操作,包括:
    根据所述目标字词确定搜索关键词;
    获取与所述搜索关键词相关的搜索结果。
  12. 一种应用于聊天应用的处理方法,其中,由终端执行,所述方法包括:
    显示聊天会话界面,所述聊天会话界面中包括聊天消息;
    响应于针对所述聊天消息的内容选择操作,确定所述聊天消息中的选中消息内容;
    显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词;
    响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
    针对所述目标字词执行对应操作。
  13. 根据权利要求12所述的方法,其中,所述字词选择操作为滑动选择操作,所述响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词,包括:
    响应于针对所述字词选择界面的所述滑动选择操作,确定所述滑动选择操作的滑动轨迹;
    将所述滑动轨迹所经过的字词,确定为处于选中状态的所述目标字词。
  14. 根据权利要求13所述的方法,其中,所述将所述滑动轨迹所经过的字词,确定为处于选中状态的所述目标字词,包括:
    在所述滑动轨迹包括多段的情况下,确定各段所述滑动轨迹所经过的字词;
    确定处于选中状态的所述目标字词;其中,所述目标字词包括各段所述滑动轨迹所经过的字词。
  15. 根据权利要求12所述的方法,其中,所述针对所述目标字词执行对应操作,包括:
    针对所述目标字词执行搜索操作;或者,
    针对所述目标字词执行转发操作;或者,
    针对所述目标字词执行分享操作;或者,
    针对所述目标字词执行收藏操作;或者,
    针对所述目标字词执行复制操作;或者,
    针对所述目标字词执行翻译操作;或者,
    针对所述目标字词执行文档创建操作。
  16. 根据权利要求12所述的方法,其中,所述方法还包括:
    显示多个操作选项,不同的操作选项对应于不同的操作;
    所述针对所述目标字词执行对应操作,包括:
    响应于针对所述多个操作选项中的目标操作选项的选择操作,针对所述目标字词执行与所述目标操作选项对应的操作。
  17. 根据权利要求12所述的方法,其中,所述显示聊天会话界面之后,还包括:
    响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项;
    响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能;
    响应于针对所述搜索界面的指定触发操作,执行所述显示所述选中消息内容对应的字词选择界面的步骤。
  18. 根据权利要求12所述的方法,其中,所述聊天消息包括以下至少一种:文本消息、图片消息、语音消息。
  19. 根据权利要求18所述的方法,其中,所述方法还包括:
    在所述聊天消息包括所述文本消息的情况下,对所述文本消息中包含的文本内容进行分词处理得到所述字词;或者,
    在所述聊天消息包括所述图片消息的情况下,对所述图片消息中包含的文本内容进行识别处理,对识别到的所述文本内容进行分词处理得到所述字词;或者,
    在所述聊天消息包括所述语音消息的情况下,对所述语音消息进行语音识别处理得到相应的文本内容;对识别到的所述文本内容进行分词处理得到所述字词。
  20. 根据权利要求12所述的方法,其中,所述显示所述选中消息内容对应的字词选择界面之前,还包括:
    从对所述选中消息内容进行分词处理后得到的字词中,确定关键字词,所述字词选择界面用于显示所述确定的关键字词。
  21. 根据权利要求12-20任一项所述的方法,其中,所述确定处于选中状态的目标字词之后,还包括:
    显示文本编辑框,所述文本编辑框中包括所述目标字词;
    响应于针对所述目标字词的编辑操作,在所述文本编辑框中显示修改后的目标字词;
    所述针对所述目标字词执行对应操作,包括:
    针对所述修改后的目标字词执行对应操作。
  22. 一种应用于聊天应用的搜索处理装置,其中,所述装置包括:
    会话界面显示模块,用于显示聊天会话界面,所述聊天会话界面中包括聊天消息;
    工具栏显示模块,用于响应于针对所述聊天消息的内容选择操作,显示与所述聊天消息中的选中消息内容对应的工具栏,所述工具栏中包括搜索工具选项;
    搜索界面显示模块,用于响应于针对所述搜索工具选项的选择操作,显示所述选中消息内容对应的搜索界面,所述搜索界面用于实现与所述选中消息内容相关的搜索功能。
  23. 一种搜索处理装置,其中,所述装置包括:
    用户界面显示模块,用于显示用户界面;
    界面内容确定模块,用于响应于针对所述用户界面的内容选择操作,确定所述用户界面中的选中界面内容;
    选词界面显示模块,用于显示所述选中界面内容对应的字词选择界面,所述字词选择界 面中包括对所述选中界面内容进行分词处理后得到的字词;
    目标字词确定模块,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
    搜索操作执行模块,用于针对所述目标字词执行对应的搜索操作。
  24. 一种应用于聊天应用的处理装置,其中,所述装置包括:
    会话界面显示模块,用于显示聊天会话界面,所述聊天会话界面中包括聊天消息;
    消息内容确定模块,用于响应于针对所述聊天消息的内容选择操作,确定所述聊天消息中的选中消息内容;
    选词界面显示模块,用于显示所述选中消息内容对应的字词选择界面,所述字词选择界面中包括对所述选中消息内容进行分词处理后得到的字词;
    目标字词确定模块,用于响应于针对所述字词选择界面的字词选择操作,确定处于选中状态的目标字词;
    操作执行模块,用于针对所述目标字词执行对应操作。
  25. 一种终端,其中,所述终端包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如权利要求1至9任一项所述的应用于聊天应用的搜索处理方法,或者实现如权利要求10至11任一项所述的搜索处理方法,或者实现如权利要求12至21任一项所述的应用于聊天应用的搜索处理方法。
  26. 一种计算机可读存储介质,其中,所述存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如权利要求1至9任一项所述的应用于聊天应用的搜索处理方法,或者实现如权利要求10至11任一项所述的搜索处理方法,或者实现如权利要求12至21任一项所述的应用于聊天应用的搜索处理方法。
  27. 一种计算机程序产品,其中,所述计算机程序产品包括计算机指令,所述计算机指令存储由处理器加载并执行以实现如权利要求1至9任一项所述的应用于聊天应用的搜索处理方法,或者实现如权利要求10至11任一项所述的搜索处理方法,或者实现如权利要求12至21任一项所述的应用于聊天应用的搜索处理方法。
PCT/CN2021/114839 2020-09-09 2021-08-26 搜索处理方法、装置、终端及存储介质 WO2022052817A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010942777.5A CN112084305A (zh) 2020-09-09 2020-09-09 应用于聊天应用的搜索处理方法、装置、终端及存储介质
CN202010942777.5 2020-09-09

Publications (1)

Publication Number Publication Date
WO2022052817A1 true WO2022052817A1 (zh) 2022-03-17

Family

ID=73732543

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/114839 WO2022052817A1 (zh) 2020-09-09 2021-08-26 搜索处理方法、装置、终端及存储介质

Country Status (2)

Country Link
CN (1) CN112084305A (zh)
WO (1) WO2022052817A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242739A (zh) * 2022-07-28 2022-10-25 维沃移动通信有限公司 信息处理方法、装置和电子设备
CN116521037A (zh) * 2023-03-31 2023-08-01 深圳市赛凌伟业科技有限公司 一种文字处理方法和系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084305A (zh) * 2020-09-09 2020-12-15 腾讯科技(深圳)有限公司 应用于聊天应用的搜索处理方法、装置、终端及存储介质
CN112667124A (zh) * 2020-12-25 2021-04-16 北京搜狗科技发展有限公司 一种信息处理方法、装置和用于信息处理的装置
CN112732386A (zh) * 2021-01-08 2021-04-30 北京字跳网络技术有限公司 消息处理方法、装置、终端和存储介质
CN113656034B (zh) * 2021-08-24 2024-03-12 北京百度网讯科技有限公司 信息处理方法、装置、电子设备以及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357577A (zh) * 2017-07-01 2017-11-17 北京奇虎科技有限公司 一种基于移动终端的用户交互界面的搜索方法及装置
CN110691028A (zh) * 2019-09-16 2020-01-14 腾讯科技(深圳)有限公司 一种消息处理方法、装置、终端和存储介质
US20200042526A1 (en) * 2018-07-31 2020-02-06 LINE Plus Corporation Method, system, and non-transitory computer- readable record medium for searching for non-text using text in conversation
CN110955374A (zh) * 2019-11-22 2020-04-03 网易(杭州)网络有限公司 消息展示方法及装置
CN112084305A (zh) * 2020-09-09 2020-12-15 腾讯科技(深圳)有限公司 应用于聊天应用的搜索处理方法、装置、终端及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357577A (zh) * 2017-07-01 2017-11-17 北京奇虎科技有限公司 一种基于移动终端的用户交互界面的搜索方法及装置
US20200042526A1 (en) * 2018-07-31 2020-02-06 LINE Plus Corporation Method, system, and non-transitory computer- readable record medium for searching for non-text using text in conversation
CN110691028A (zh) * 2019-09-16 2020-01-14 腾讯科技(深圳)有限公司 一种消息处理方法、装置、终端和存储介质
CN110955374A (zh) * 2019-11-22 2020-04-03 网易(杭州)网络有限公司 消息展示方法及装置
CN112084305A (zh) * 2020-09-09 2020-12-15 腾讯科技(深圳)有限公司 应用于聊天应用的搜索处理方法、装置、终端及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242739A (zh) * 2022-07-28 2022-10-25 维沃移动通信有限公司 信息处理方法、装置和电子设备
CN115242739B (zh) * 2022-07-28 2024-03-22 维沃移动通信有限公司 信息处理方法、装置和电子设备
CN116521037A (zh) * 2023-03-31 2023-08-01 深圳市赛凌伟业科技有限公司 一种文字处理方法和系统
CN116521037B (zh) * 2023-03-31 2024-01-30 深圳市赛凌伟业科技有限公司 一种文字处理方法和系统

Also Published As

Publication number Publication date
CN112084305A (zh) 2020-12-15

Similar Documents

Publication Publication Date Title
WO2022052817A1 (zh) 搜索处理方法、装置、终端及存储介质
JP6942821B2 (ja) 複数のコーパスからの応答情報取得
CN108432190B (zh) 应答消息推荐方法及其设备
KR102249437B1 (ko) 메시지 분류에 기반한 메시지 교환 스레드의 자동화된 증대
WO2020140360A1 (zh) 基于剪贴板进行信息推送的方法、系统及终端设备
CN109271518B (zh) 用于对微博信息进行分类显示的方法和设备
US20190012373A1 (en) Conversational/multi-turn question understanding using web intelligence
CN110998560A (zh) 使用用户特定信息定制建议的方法和系统
US9218414B2 (en) System, method, and user interface for a search engine based on multi-document summarization
KR101911999B1 (ko) 피처 기반 후보 선택 기법
WO2016150083A1 (zh) 一种信息输入方法和装置
WO2022052749A1 (zh) 一种消息处理方法、装置、设备及存储介质
US10909202B2 (en) Information providing text reader
JP2017534941A (ja) オーファン発話検出システム及び方法
US20140164371A1 (en) Extraction of media portions in association with correlated input
WO2023240943A1 (zh) 生成数字人的方法、模型的训练方法、装置、设备和介质
JP2020521219A (ja) 関連コンテンツを使用した画像の効率的な増強
JP7204801B2 (ja) ニューラルネットワークに基づくマンマシンインタラクション方法、装置、及び媒体
JP6530573B1 (ja) メッセージ交換スレッドの拡張
WO2023226760A1 (zh) 一种话题推荐方法、装置、计算机设备及存储介质
US20140163956A1 (en) Message composition of media portions in association with correlated text
CN109791545A (zh) 用于包括图像的显示的资源的上下文信息
US20190138575A1 (en) Counterpointing system
CN111813236B (zh) 输入方法、装置、电子设备及可读存储介质
US11947774B1 (en) Techniques for utilizing audio segments for expression

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21865873

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21865873

Country of ref document: EP

Kind code of ref document: A1