The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first keyword, the second keyword, etc. are for distinguishing different keywords, and are not for describing a specific order of the keywords.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present invention, unless otherwise specified, "a plurality" means two or more, for example, a plurality of elements means two or more elements, and the like.
The embodiment of the invention provides a chat record query method and electronic equipment, which can receive a first keyword input by a user; acquiring a first group of chat records corresponding to the first keyword from all the chat records stored in the electronic equipment, and displaying N identifiers, wherein one identifier is used for indicating a category to which the first group of chat records belongs, and N is a positive integer; receiving a first input to a first one of the N identifiers; in response to the first input, displaying a summary of a second set of chat records, the second set of chat records being chat records in the first set of chat records that belong to the category indicated by the first identification. Through the scheme, the user can trigger the electronic equipment to inquire the first chat records corresponding to the first keyword from all the stored chat records by inputting the first keyword, and N identifiers used for indicating the categories of the chat records are displayed. Because the user knows the category to which the chat record to be queried belongs, the user can trigger the electronic device to display the abstract of the chat record belonging to the category indicated by the first identifier in the first group of chat records (i.e., the abstract of the second group of chat records) by inputting the first identifier in the N identifiers (i.e., the category identifier to which the chat record to be queried belongs), so that the number of the chat records displayed by the electronic device can be reduced, and the efficiency of searching the chat records is improved.
The electronic device in the embodiment of the present invention may be an electronic device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
The following describes a software environment applied to the chat record query method provided by the embodiment of the present invention, taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of an android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the chat record query method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the chat record query method may operate based on the android operating system shown in fig. 1. Namely, the processor or the electronic device can implement the chat record query method provided by the embodiment of the invention by running the software program in the android operating system.
The electronic device in the embodiment of the invention can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiment of the present invention is not particularly limited.
The execution subject of the chat record query method provided in the embodiment of the present invention may be the electronic device, or may also be a functional module and/or a functional entity capable of implementing the chat record query method in the electronic device, and may specifically be determined according to actual use requirements, which is not limited in the embodiment of the present invention. The following takes an electronic device as an example to exemplarily explain a chat log query method provided by the embodiment of the present invention.
In the embodiment of the invention, under the condition of a chat application program interface displayed on a screen of an electronic device, a user can trigger the electronic device to inquire a first chat record corresponding to a first keyword from all stored chat records by inputting the first keyword in a search bar of the interface, and N identifiers used for indicating the category of the chat records are displayed on the interface. Because the user knows the category to which the chat record to be inquired belongs, the user can trigger the electronic device to display the abstract of the chat record belonging to the category indicated by the first identifier in the first group of chat records by inputting the category identifier to which the chat record to be inquired belongs, so that the number of the chat records displayed by the electronic device is reduced, and the efficiency of searching the chat records is improved.
As shown in fig. 2, an embodiment of the present invention provides a method for querying a chat log, which may include the following steps 101 to 104.
Step 101, the electronic device receives a first keyword input by a user.
Optionally, in this embodiment of the present invention, before step 101, the user may trigger the electronic device to display a search interface of the chat log, and the user may input the first keyword in a specified area of the search interface of the chat log, for example, the specified area is a search bar. The search interface of the chat records can be a search interface of a chat application program on the electronic equipment; the search interface of the chat records can also be a short message search interface of the electronic equipment; the search interface for the chat log can also be a search interface for other possible chat logs in the electronic device. The method can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
It should be noted that, the following embodiment takes the search interface of the chat log as an example of the search interface of the chat application on the electronic device, and does not limit the scope of the present invention.
Optionally, in this embodiment of the present invention, before step 101, the method for querying a chat record provided in this embodiment of the present invention may further include generating a plurality of preset keywords according to the chat record stored in the electronic device, and the user may control the electronic device to search the chat records corresponding to the plurality of preset keywords by quickly searching the keywords input by the user or the keywords generated by the electronic device, so that the user searches the chat records required by the user from the chat records corresponding to the plurality of preset keywords. Specifically, the electronic device may generate at least one preset keyword according to each group of chat records stored in the electronic device.
It should be noted that, in the embodiment of the present invention, the chat records stored in the electronic device are stored in groups. Each group of chat records is at least one chat record collected by the electronic equipment in a preset time period, and the preset time period can be a first time period stored in the electronic equipment or a second time period set by a user. For example, assuming that the preset time period is 200 seconds, if the user and friend a have performed two chats within 200 seconds and generated 4 chatting records, the electronic device may collect the 4 chatting records as a set of chatting records and store the set of chatting records in the electronic device.
Optionally, in the embodiment of the present invention, the generating at least one preset keyword according to a group of chat records in the chat records stored in the electronic device may be implemented in at least one of the following manners: the electronic equipment can identify the text information in the chat records and generate at least one preset keyword according to the text information; the electronic equipment can identify pictures in the chat records and generate at least one preset keyword according to picture information generated by identifying the pictures; the electronic equipment can also recognize voice information in the chat records and generate at least one preset keyword according to the text information corresponding to the voice information. The specific implementation manner may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
For example, the preset keywords may be words or information indicating time in a group of chat records, such as "weekday", "wednesday", and the like; the preset keywords can also be texts or information representing places in a group of chat records, such as 'XXX hotel', 'Jiefore 67' and the like; the preset keywords can also be characters or information with high frequency in a group of chat records, such as "XXX meeting", "party", and the like; the preset keywords can also be words or information which represents special meanings in a group of chat records, such as express bill numbers, telephone numbers and the like.
Optionally, in this embodiment of the present invention, the manner of inputting the first keyword by the user may be any of the following: handwriting input, touch virtual keyboard input, voice input, and the like. The specific implementation manner may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
And 102, the electronic equipment acquires a first group of chat records corresponding to the first keyword from all the chat records stored in the electronic equipment, and displays the N identifications.
Wherein, the one identifier may be used to indicate a category to which the first group of chat records belongs, and N is a positive integer.
It should be noted that, in the embodiment of the present invention, the first group of chat records is at least one group of chat records corresponding to the first keyword in all chat records stored in the electronic device.
Optionally, in this embodiment of the present invention, an implementation manner of obtaining the chat record corresponding to the first keyword may be any of the following implementation manners: the method comprises the steps that firstly, the electronic equipment can match a first keyword with a plurality of preset keywords stored in the electronic equipment, and the chat records corresponding to at least one preset keyword with the matching degree higher than a threshold value are determined to be a first group of chat records corresponding to the first keyword; in the second mode, the electronic device may search for the first keyword from the plurality of preset keywords, and determine the plurality of preset keywords as the chat records corresponding to the first keyword as the first group of chat records corresponding to the first keyword. And thirdly, the electronic equipment traverses all the chat records, acquires the chat records comprising the first keyword, and determines the chat records as a first group of chat records corresponding to the first keyword. The specific implementation manner may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
For example, if the first keyword input by the user is "in a meeting", the electronic device may perform matching among a plurality of preset keywords, and finding a plurality of preset keywords with a matching degree higher than 80% includes: "take a meeting", "hold a meeting", and "meeting", and determine the chat records corresponding to a plurality of preset keywords "take a meeting", "hold a meeting", and "meeting" as a first set of chat records corresponding to "take a meeting" (i.e., a first keyword).
Alternatively, if the keyword input by the user is "afternoon", the electronic device may search for "afternoon" (i.e., the first keyword) among the plurality of preset keywords, and determine chat records corresponding to all "afternoon" of the plurality of preset keywords as the first group of chat records.
Optionally, in the embodiment of the present invention, the display manner for displaying the N identifiers may be displaying the N identifiers in a preset area on an interface of the electronic device; the method also can be used for displaying a first suspension control on an interface of the electronic equipment and displaying N identifications in the first suspension control; it is also possible to display a popup on the interface of the electronic device and display N identifiers in the popup. The specific display mode may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
Optionally, in this embodiment of the present invention, after generating a plurality of preset keywords according to a chat record stored in the electronic device, the method for querying a chat record provided in this embodiment of the present invention may further include: and determining the category of the chat records according to a plurality of preset keywords generated by the chat records.
Optionally, in this embodiment of the present invention, the electronic device may generate at least one keyword according to a group of chat records, and a manner of determining the category of the chat record according to the at least one keyword may be any of the following: firstly, the electronic equipment classifies a word stock according to a preset scene and determines the category of the chat record according to at least one keyword corresponding to the chat record. Secondly, the electronic device classifies the at least one keyword according to a first classification algorithm, and determines the category of the chat record according to the classification of the at least one keyword, wherein the first classification algorithm may be any one of the following: least squares regression classification algorithm, Bayesian classification algorithm, classification tree classification algorithm, support vector machine classification algorithm, ensemble learning classification algorithm, convolutional neural network classification algorithm, or the like. Thirdly, the electronic device performs clustering operation on the chat records by taking the at least one keyword as a clustering feature according to a first clustering algorithm, and determines the category of the chat records according to the public features of other chat records at the clustering position of the chat records, wherein the first clustering algorithm can be any one of the following algorithms: a K-means clustering algorithm, a mean shift clustering algorithm, a density-based clustering algorithm, a Gaussian mixture model clustering algorithm, an agglomeration clustering algorithm, and the like. The specific way of determining the category of the chat record may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
Step 103, the electronic device receives a first input of a first identifier of the N identifiers.
Optionally, in this embodiment of the present invention, the first input may be used to select the first identifier from the N identifiers. Specifically, the first input may be a voice input, and the voice may be used to instruct the electronic device to select the first identifier from the N identifiers; the first input may be a preset gesture input, and if the "OK" gesture indicates the first identifier, the first input may be an input of the "OK" gesture performed by the user on the camera of the electronic device; the first input may also be a touch input to the displayed first identifier, where the touch click input may specifically be any one of: single click input, double click input, long press input, slide input, or the like. The specific input mode of the first input may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
Illustratively, assuming that a search interface of a chat application is displayed on a screen of an electronic device, the electronic device receives a user input of a first keyword, retrieves a chat log (i.e., a first set of chat logs) corresponding to the first keyword in response to the input, and displays N identifiers. The user can trigger the voice input control of the electronic equipment and perform voice input, and the electronic equipment responds to the voice input of the user and selects the first identifier from the N identifiers. Wherein the voice input may be used to instruct the electronic device to select the first identifier from the N identifiers.
Illustratively, assuming that a search interface of a chat application is displayed on a screen of an electronic device, the electronic device receives a user input of a first keyword, retrieves a chat log (i.e., a first set of chat logs) corresponding to the first keyword in response to the input, and displays N identifiers. The user may trigger an input (i.e., a first input) to the first identifier by a sliding input to a preset direction on the search interface, where the sliding input to the preset direction corresponds to the input to the first identifier.
Step 104, the electronic device displays a summary of the second set of chat logs in response to the first input.
The second group of chat records are chat records belonging to the category indicated by the first identifier in the first group of chat records.
Optionally, in this embodiment of the present invention, the electronic device may generate a corresponding summary according to a plurality of preset keywords of each chat record, where the summary is a brief description of chat content of the chat record, and the summary may be used to indicate the chat record.
Optionally, in the embodiment of the present invention, the method for generating the corresponding summary according to the plurality of preset keywords of each chat record may be any of the following manners: in a first mode, the electronic device extracts sentences which can include a plurality of preset keywords in the chat records, and recombines the extracted sentences into the abstract through a second algorithm, wherein the second algorithm can be an algorithm capable of realizing language translation, synonymous replacement and sentence abbreviation functions. And secondly, the electronic equipment identifies a plurality of preset keywords of a group of chat records, identifies the plurality of preset keywords according to a preset template format of the electronic equipment, fills the preset template with the plurality of preset keywords, and generates the abstract corresponding to the chat records, wherein the preset template format is a template of a general abstract preset by the electronic equipment, and the template can comprise a vacancy filled with the plurality of preset keywords. The specific manner of generating the abstract may be determined according to actual use requirements, and embodiments of the present invention are not particularly limited.
By way of example, the embodiment of the present invention is exemplarily illustrated in the above second mode. The method includes the following steps that a plurality of preset keywords of a certain group of chat records in all chat records stored by the electronic equipment are assumed as follows: "13 th 9 th 2019", "family WeChat group", "parents", "eleven-homecoming" and "buy specialties". If the preset template format of the electronic equipment is as follows: "XXX (multiple time preset keywords), verb (adjusted according to chat log adaptability) XXX (multiple preset keywords) is made between XXX (multiple place preset keywords) and XXX (multiple people preset keywords)", then the electronic device can recognize multiple preset keywords and fill the multiple preset keywords into the corresponding positions of the preset template, thereby generating the summary of the chat log as: "9/13/2019, discuss buying a specialty with parents in family WeChat group eleven times home".
Optionally, in this embodiment of the present invention, the user may trigger the electronic device to display the specific content of the chat record indicated by the summary by inputting a certain summary of the second group of chat records. The input of the chat record content triggered by the user to be displayed by the electronic equipment can be any one of the following: single click input to the summary, long press input to the summary, slide input to the summary, etc. The specific input mode may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
Optionally, in this embodiment of the present invention, the electronic device may display the summaries of the chat records according to the time sequence of the chat records. Illustratively, the electronic device can display summaries of the second set of chat logs in chronological order of the chat logs.
It should be noted that, in the embodiment of the present invention, when the electronic device displays the second group of the summary of the chat records, the electronic device may cancel displaying the N identifiers, and may also keep displaying the N identifiers. The following embodiment is exemplified by the electronic device displaying the summary of the second group of chat records, and continuously displaying the N identifiers.
Optionally, in the embodiment of the present invention, the display mode of the electronic device for displaying the second group of chat record summaries may specifically be any one of the following display modes: directly displaying at least one abstract of a second group of chat records on a search interface of an application program in a first mode; the electronic equipment displays a new interface or a pop-up window, and the interface or the pop-up window can comprise at least one abstract of a second group of chat records; in a third mode, if the electronic device can be an electronic device including a first screen and a second screen, the electronic device can display an abstract of at least one second group of chat records on the first screen, and when the user triggers one group of chat record abstract in the abstract of at least one second group of chat records, the electronic device can display specific contents of the chat records on the second screen. The display mode of the specific chat record abstract can be determined according to the actual use requirement, and the embodiment of the invention is not particularly limited.
Illustratively, as shown in fig. 3 (a), a search interface of a chat application is displayed on theelectronic device 001, a user can input "restaurant" (i.e., a first keyword) in asearch bar 002 of the search interface through akeyboard 003, theelectronic device 001 obtains a first group of chat records corresponding to "restaurant" from all the chat records stored in theelectronic device 001 in response to the input of the user, and displays 6 identifiers: "life", "work", "learning", "family", "pet" and "shopping". As shown in fig. 3 (b), the user may correspond to the user's click input (i.e., the second input) by clicking "live" 004 (i.e., the first identifier) among the 6 identifiers, and theelectronic device 001 displays a summary of 5 second group chat records at adisplay area 005 of the search interface of the chat application as shown in fig. 3 (c).
The embodiment of the invention provides a chat record query method, which can receive a first keyword input by a user; acquiring a first group of chat records corresponding to the first keyword from all the chat records stored in the electronic equipment, and displaying N identifiers, wherein one identifier can be used for indicating a category to which the first group of chat records belongs, and N is a positive integer; receiving a first input to a first one of the N identifiers; in response to the first input, displaying a summary of a second set of chat records, the second set of chat records being chat records in the first set of chat records that belong to the category indicated by the first identification. Through the scheme, the user can trigger the electronic equipment to inquire the first chat records corresponding to the first keyword from all the stored chat records by inputting the first keyword, and N identifiers used for indicating the categories of the chat records are displayed. Because the user knows the category to which the chat record to be queried belongs, the user can trigger the electronic device to display the abstract of the chat record belonging to the category indicated by the first identifier in the first group of chat records (i.e., the abstract of the second group of chat records) by inputting the first identifier in the N identifiers (i.e., the category identifier to which the chat record to be queried belongs), so that the number of the chat records displayed by the electronic device can be reduced, and the efficiency of searching the chat records is improved.
Optionally, with reference to fig. 2, as shown in fig. 4, the step 102 may specifically be performed by first performing the step 102a, and after the step 102a, the steps 102b1 and 102b2 may be performed, or the steps 102c1 and 102c2 may be performed.
Step 102a, the electronic device determines whether a plurality of preset keywords include a first keyword.
The preset keywords are keywords generated according to all chat records stored in the electronic equipment.
It should be noted that, in the embodiment of the present invention, after the step 101, if the determination result in the step 102a is yes, that is, if the first keyword is included in the plurality of preset keywords, the following steps 102b1 and 102b2 are performed; if the determination result in the step 102a is "no", that is, if the first keyword is not included in the plurality of preset keywords, the following steps 102c1 and 102c2 are performed.
Optionally, in this embodiment of the present invention, the electronic device may traverse a plurality of preset keywords stored in the electronic device, and determine whether the plurality of preset keywords include the first keyword.
Step 102b1, the electronic device obtains a first group of chat records including the first keyword from all chat records stored by the electronic device.
It should be noted that, in the embodiment of the present invention, the manner of obtaining the first group of chat records including the first keyword may be to determine the first group of chat records by matching or searching the first keyword among a plurality of preset keywords; the manner of obtaining the first set of chat logs including the first keyword may also be to traverse all chat logs, obtaining the first set of chat logs including the first keyword. Specifically, refer to the description in step 102, which is not described herein again.
Step 102b2, the electronic device determines whether the number of the first group of chat records is less than a preset number.
It should be noted that, in the embodiment of the present invention, if the determination result in the step 102b2 is "no", that is, if the number of the first group of chat records is greater than or equal to the preset number, the following step 102b21 is executed.
Optionally, in the embodiment of the present invention, the preset number may be determined according to a screen of the electronic device and a user use habit. The method can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
For example, assuming that at most 10 summaries of chat records can be displayed on one interface of the screen of the electronic device at one time, if the usage habit of the user is to search summaries of chat records of the first three pages, the preset number may be set to 30, that is, in the case that the number of the first group of chat records is less than 30, the electronic device displays summaries of the first group of chat records, the user may trigger the screen of the electronic device to slide and display the summaries of the first group of chat records, and the user may quickly find the chat records that the user needs to search by browsing a small number of summaries.
Optionally, in the embodiment of the present invention, the relationship between the number of the first group of chat records and the preset number is determined by specifically adopting any one of the following manners: and performing difference judgment, ratio judgment, formula judgment and the like. The method can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
Step 102b21, the electronic device displays the N identifiers.
It should be noted that, in the embodiment of the present invention, after the electronic device executes step 102b21, the electronic device then executes step 103 and step 104.
In addition, in the embodiment of the present invention, reference may be made to the related description in step 102 for the display manner of the electronic device for displaying the N identifiers, which is not described herein again.
Illustratively, as shown in fig. 3 (a), a search interface of a chat application is displayed on theelectronic device 001, a user may input "restaurant" (i.e., a first keyword) in asearch bar 002 of the search interface through akeyboard 003, theelectronic device 001, in response to the input of the user, searches for "restaurant" from a plurality of preset keywords stored in the electronic device, and acquires all chat records including "restaurant", i.e., a first group of chat records. Then, it is determined whether the number of the first group of chat records is less than a preset number, and assuming that the number of all chat records including "restaurant" is 5 (i.e., the number of the first group of chat records is 5), and the preset number is 10, if the electronic device detects that the number of all chat records including "restaurant" is less than the preset number (i.e., 5 < 10), the electronic device displays 6 identifiers on the search interface, as shown in (b) of fig. 3, where the 6 identifiers are: "life", "work", "learning", "family", "pet" and "shopping".
Optionally, in this embodiment of the present invention, if the determination result in the step 102b2 is yes, that is, if the number of the first group of chat records is less than the preset number, the following step 102b22 may be performed.
Step 102b22, the electronic device displays a summary of the first set of chat records.
It should be noted that, in the embodiment of the present invention, reference may be made to the relevant description in step 104 for a manner of generating an abstract of each chat record in the first group of chat records and a manner of displaying the first group of chat records, and details are not described here again.
It can be understood that, in the embodiment of the present invention, in a case that the first keyword is included in the plurality of preset keywords, a first group of chat records including the first keyword is obtained from all chat records stored in the electronic device, and in a case that the number of the first group of chat records is less than the preset number, the electronic device displays an abstract of the first group of chat records. Therefore, when the number of the first group of chat records is smaller than the preset number, the electronic equipment does not need to accept the operation of selecting the identifier by the user, and the abstract of the first group of chat records is directly displayed, so that the use by the user is facilitated, and the time of the user is saved.
And step 102c1, the electronic equipment determines the keyword with the highest matching degree with the first keyword in the plurality of preset keywords as the target keyword.
The semantic features originally refer to semantic elements that are specific to a real word in linguistics, can restrict the syntactic format in which the real word is located, and are sufficiently different from other real words. Semantic feature analysis in the natural language processing field and the machine learning field refers to an analysis method for analyzing and summarizing semantic features common to words at the same position in the same sentence pattern.
Optionally, in this embodiment of the present invention, before step 102c1, the method for querying a chat record provided in this embodiment of the present invention may further include: and acquiring semantic information of the first keyword. Wherein, the semantic information of the first keyword may include semantic features of the first keyword.
Optionally, in the embodiment of the present invention, the determining the target keyword may specifically be: the electronic equipment matches semantic information of a plurality of preset keywords with semantic information of the first keyword, and determines a plurality of preset keywords with the highest matching degree with the semantic information of the first keyword in the plurality of preset keywords as target keywords. The semantic information matching refers to calculating the matching degree of semantic features which can be included in the semantic information by using semantic feature analysis, and the semantic information of each of the plurality of preset keywords can include the semantic features of the plurality of preset keywords.
Step 102c2, the electronic device obtains a first group of chat records including the target keyword from all chat records stored in the electronic device, and displays the N identifiers.
It should be noted that, in the embodiment of the present invention, a manner of obtaining the first group of chat records including the target keyword and a manner of displaying the N identifiers in step 102c2 may refer to the related description in step 102, and details are not described here again.
Illustratively, as shown in fig. 5 (a), a search interface of a chat application is displayed on anelectronic device 001, a user may input "restaurant" (i.e., a first keyword) in asearch bar 002 of the search interface through akeyboard 003, theelectronic device 001 determines whether "restaurant" is included in a plurality of preset keywords of theelectronic device 001 in response to the input of the user, and if "restaurant" is not included in the plurality of preset keywords of the electronic device, the electronic device determines a keyword "restaurant" having a highest degree of matching with "restaurant" among the plurality of preset keywords as a target keyword. Theelectronic device 001 searches for "restaurant" from a plurality of preset keywords stored in the electronic device and acquires all chat records including "restaurant", i.e., a first group of chat records. As shown in fig. 5 (b), the electronic device displays "restaurant" (i.e., a target keyword) in thesearch bar 002, and displays 6 identifiers on the search interface, the 6 identifiers being: "life", "work", "learning", "family", "pet" and "shopping".
It can be understood that, in the embodiment of the present invention, when a chat record including a first keyword cannot be found in the electronic device through the first keyword, the electronic device may determine, according to the matching degree between the first keyword and a plurality of preset keywords, the plurality of preset keywords with the highest matching degree as target keywords, and search for a corresponding chat record through the target keywords. Therefore, the problem that the electronic equipment cannot find the chat records due to the fact that the first keywords input by the user are inaccurate can be solved, namely, the intelligence of the electronic equipment is improved, user operation is reduced, and user experience is improved.
Optionally, as shown in fig. 6 with reference to fig. 2, after the step 104, the method for querying a chat record according to the embodiment of the present invention may further include obtaining another keyword and performing a query operation, and specifically according to a difference in a manner of obtaining the other keyword, after the step 104, the step 105a1 and the step 105a2 (i.e., implementation manner one) may be performed, or the step 105b1 to the step 105b3 (i.e., implementation manner two) may be performed. The following embodiments specifically describe the first implementation and the second implementation, respectively.
Implementation mode one
Step 105a1, the electronic device receives a third keyword input by the user.
It should be noted that, in the embodiment of the present invention, the input manner of the third keyword may specifically refer to a description related to the user inputting the first keyword in step 101, and is not described herein again.
Optionally, in the embodiment of the present invention, the first keyword or the target keyword may be displayed in an input interface where the electronic device displays the third keyword input by the user. And the first keyword or the target keyword is in a non-editing state, and the user can edit the third keyword on the corresponding input interface.
It should be noted that, the following embodiments are exemplarily described by taking an example that the first keyword or the target keyword is displayed in the input interface of the electronic device, where the user inputs the third keyword, and the first keyword or the target keyword is in a non-editing state.
Step 105a2, the electronic device displays the summary update of the second group of chat records as the summary of the third group of chat records.
The third group of chat records is a chat record which can include a third key in the second group of chat records.
Optionally, in this embodiment of the present invention, the electronic device may obtain, according to the third keyword, a chat record including the third keyword from the second group of chat records. The specific acquisition mode may be any one of the following: in the first mode, according to the third keyword, directly searching the chat records comprising the third keyword in the second group of chat records; searching a third keyword in a plurality of preset keywords of a second group of chat records according to the third keyword, and determining the chat records with the plurality of preset keywords as the third keyword as a third group of chat records; and if the second chat does not include the third keyword, the electronic equipment determines a target keyword corresponding to the third keyword according to the matching degree of the third keyword and a plurality of preset keywords in the second group of chat records, and acquires the second group of chat records including the target keyword. The method can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
Illustratively, as shown in fig. 7 (a), in asearch bar 002 of a search interface displaying a chat application on a screen of theelectronic device 001, a keyword "restaurant" (i.e., a first keyword) in a non-editing state is displayed, and the interface further displays 6 identifiers: "life," "work," "study," "family," "pet," and "shopping," where the "life" identification (i.e., first identification) 004 is in the selected state and a summary of 5 chat records (i.e., summaries of the second set of chat records) is displayed indisplay area 005. The user can input "weekend" (i.e., third keyword) in thesearch bar 002 of the search interface through thekeyboard 003, theelectronic apparatus 001 searches the chat records including "weekend" from the second group of chat records in response to the input by the user, theelectronic apparatus 001 displays the summary update of the second group of chat records as the summary of the chat records including "weekend" in the second group of chat records (i.e., the summary of the third group of chat records), and as shown in fig. 7 (b), theelectronic apparatus 001 displays the content update in thedisplay area 005 as the summaries of two chat records. Namely, abstract 0051 "day X month X XX year, in restaurant XXX … …" and abstract 0052 "day X month X XX year, on weekend XX restaurant …".
It can be understood that, in the embodiment of the present invention, the electronic device receives a third keyword input by the user, and the electronic device displays the summary update of the second group of chat records as the summary of the third group of chat records in response to the third keyword input by the user. Because the third keyword is the keyword input by the user, the user can filter the second group of chat records by inputting the keyword again, so that the number of the chat records displayed by the electronic equipment is reduced again, and the efficiency of searching the chat records is improved.
Implementation mode two
Step 105b1, the electronic device displays at least one fourth keyword.
The at least one fourth keyword is a keyword in the second group of chat records, and the fifth keyword is any keyword in the at least one fourth keyword.
Optionally, in this embodiment of the present invention, the at least one fourth keyword is a keyword in a plurality of preset keywords in the second group of chat records. Wherein the plurality of preset keywords in the second group of chat logs can include at least one fourth keyword.
Optionally, in this embodiment of the present invention, the display manner of the at least one fourth keyword may be that a control or a popup is displayed on a target interface of the electronic device, and the at least one fourth keyword is displayed in the control or the popup; the display mode of the at least one fourth keyword may also be that the at least one fourth keyword is displayed in a designated area of an interface of the electronic device.
Step 105b2, the electronic device receives a second input of the fifth keyword by the user.
The fifth keyword is any keyword among the at least one first keyword.
Optionally, in an embodiment of the present invention, the second input may be used to select a fifth keyword from at least one fourth keyword. In particular, the second input may be a speech input, which may be used to indicate a fifth keyword of the at least one fourth keyword; the first input may also be a touch click input on a fifth keyword of the at least one displayed fourth keyword, where the touch click input may specifically be any one of: single click input, double click input, or long press input, etc. The specific input mode of the first input may be determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
Step 105b3, the electronic device, in response to the second input, displays an updated summary of the second set of chat records as a summary of the fourth set of chat records.
The fourth group of chat records is a chat record which can include the fifth keyword in the second group of chat records.
It should be noted that, in the embodiment of the present invention, reference may be made to the description in step 105a2 in the foregoing embodiment in a manner that the electronic device may obtain, according to the fifth keyword, the chat record including the fifth keyword in the second group of chat records (i.e., the fourth group of chat records), and details are not repeated herein.
Illustratively, as shown in (a) of fig. 8, in the search interface in which the chat application is displayed on the screen of theelectronic device 001, thesearch bar 002 is displayed, and three fourth keywords are respectively displayed above the search bar 002: the interface also displays 6 identifiers, namely: "life," "work," "study," "family," "pet," and "shopping," where the "life" identification (i.e., first identification) 004 is in the selected state and a summary of 5 chat records (i.e., summaries of the second set of chat records) is displayed indisplay area 005. The user may click on the selection keyword a (i.e., the fifth keyword) 006, and the electronic device responds to the input of the user selection keyword a, as shown in fig. 8 (b), theelectronic device 001 displays the content update in thedisplay area 005 as an abstract 0051 and an abstract 0053 (i.e., the abstract of the fourth group of chat records).
It can be understood that, in the embodiment of the present invention, in the case that the electronic device displays the at least one fourth keyword, the user may perform an input on a fifth keyword of the at least one fourth keyword, and the electronic device displays, in response to the input of the fifth keyword by the user, an updated summary of the second group of chat records as a summary of the fourth group of chat records. Because the fourth keyword is a keyword in the second group of chat records, the user can filter the second group of chat records through the fourth keyword, so that the number of the chat records displayed by the electronic device is reduced again, and the efficiency of searching the chat records is improved.
It should be noted that, in the embodiment of the present invention, the chat log query method shown in each of the above figures is exemplarily described by combining one figure in the embodiment of the present invention. In specific implementation, the chat record query method shown in each of the above figures may also be implemented in combination with any other figures that may be combined and are illustrated in the above embodiments, and details are not described here.
As shown in fig. 9, an embodiment of the invention provides anelectronic device 900. The electronic device may include: a receivingmodule 901, aprocessing module 902 and adisplay module 903. The receivingmodule 901 may be configured to receive a first keyword input by a user. Theprocessing module 902 may be configured to obtain, from all chat records stored in the electronic device, a first group of chat records corresponding to the first keyword received by the receivingmodule 901, and control thedisplay module 903 to display N identifiers, where one identifier may be used to indicate a category to which the first group of chat records belongs, and N is a positive integer. The receivingmodule 901 may further be configured to receive a first input of a first identifier of the N identifiers. A displayingmodule 903, configured to display an abstract of a second group of chat records in response to the first input received by the receivingmodule 901, where the second group of chat records is a chat record in the first group of chat records belonging to the category indicated by the first identifier.
Optionally, in this embodiment of the present invention, theprocessing module 902 may be specifically configured to, when the plurality of preset keywords include a first keyword, obtain a first group of chat records including the first keyword from all chat records stored in the electronic device; and controls thedisplay module 903 to display the N identifiers when the number of the first group of chat logs is greater than or equal to a preset number. Or, theprocessing module 902 may be specifically configured to, when the first keyword is not included in the multiple preset keywords, determine a keyword with a highest matching degree with the first keyword from the multiple preset keywords as the target keyword; and acquires a first group of chat records including the target keyword from all chat records stored in the electronic device, and controls thedisplay module 903 to display the N identifiers. The preset keywords are keywords generated according to all chat records stored in the electronic equipment.
Optionally, in this embodiment of the present invention, thedisplay module 903 may be further configured to display an abstract of the first group of chat records when the number of the first group of chat records is less than the preset number.
Optionally, in this embodiment of the present invention, the receivingmodule 901 may be further configured to receive a third keyword input by a user. The displayingmodule 903 may be further configured to update and display the summary of the second group of chat records as a summary of a third group of chat records, where the third group of chat records is a chat record of the second group of chat records that includes the third keyword received by the receivingmodule 901.
Optionally, in this embodiment of the present invention, thedisplay module 903 may be further configured to display at least one fourth keyword, where the at least one fourth keyword is a keyword in the second group of chat records, and the fifth keyword is any keyword in the at least one fourth keyword. The receivingmodule 901 may be further configured to receive a second input of the fifth keyword by the user. The displayingmodule 903 may be further configured to update and display the summary of the second group of chat records as a summary of a fourth group of chat records in response to the second input received by the receivingmodule 901, where the fourth group of chat records is a chat record in the second group of chat records that includes the fifth keyword.
The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the above method embodiments, and is not described herein again to avoid repetition.
The embodiment of the invention provides electronic equipment, wherein a user can trigger the electronic equipment to inquire a first chat record corresponding to a first keyword from all stored chat records by inputting the first keyword, and N identifiers used for indicating the category of the chat records are displayed. Because the user knows the category to which the chat record to be queried belongs, the user can trigger the electronic device to display the abstract of the chat record belonging to the category indicated by the first identifier in the first group of chat records (i.e., the abstract of the second group of chat records) by inputting the first identifier in the N identifiers (i.e., the category identifier to which the chat record to be queried belongs), so that the number of the chat records displayed by the electronic device can be reduced, and the efficiency of searching the chat records is improved.
Fig. 10 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention. As shown in fig. 10, theelectronic device 200 includes, but is not limited to:radio frequency unit 201,network module 202,audio output unit 203,input unit 204,sensor 205,display unit 206,user input unit 207,interface unit 208,memory 209,processor 210, and power supply 211. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 10 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
Theuser input unit 207 is configured to receive a first keyword input by a user. Theprocessor 210 is configured to obtain a first group of chat records corresponding to the first keyword received by theuser input unit 207 from all chat records stored in the electronic device, and control thedisplay unit 206 to display N identifiers, where one identifier is used to indicate a category to which the first group of chat records belongs, and N is a positive integer. Theuser input unit 207 is further configured to receive a first input of a first identifier of the N identifiers. Adisplay unit 206, configured to display an abstract of a second group of chat records in response to the first input received by theuser input unit 207, where the second group of chat records is a chat record in the first group of chat records that belongs to the category indicated by the first identifier.
The embodiment of the invention provides electronic equipment, wherein a user can trigger the electronic equipment to inquire a first chat record corresponding to a first keyword from all stored chat records by inputting the first keyword, and N identifiers used for indicating the category of the chat records are displayed. Because the user knows the category to which the chat record to be queried belongs, the user can trigger the electronic device to display the abstract of the chat record belonging to the category indicated by the first identifier in the first group of chat records (i.e., the abstract of the second group of chat records) by inputting the first identifier in the N identifiers (i.e., the category identifier to which the chat record to be queried belongs), so that the number of the chat records displayed by the electronic device can be reduced, and the efficiency of searching the chat records is improved.
It should be understood that, in the embodiment of the present invention, theradio frequency unit 201 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to theprocessor 210; in addition, the uplink data is transmitted to the base station. In general,radio frequency unit 201 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, theradio frequency unit 201 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via thenetwork module 202, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
Theaudio output unit 203 may convert audio data received by theradio frequency unit 201 or thenetwork module 202 or stored in thememory 209 into an audio signal and output as sound. Also, theaudio output unit 203 may also provide audio output related to a specific function performed by the electronic apparatus 200 (e.g., a call signal reception sound, a message reception sound, etc.). Theaudio output unit 203 includes a speaker, a buzzer, a receiver, and the like.
Theinput unit 204 is used to receive an audio or video signal. Theinput unit 204 may include a Graphics Processing Unit (GPU) 2041, amicrophone 2042, and acamera module 2043, and thegraphics processor 2041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on thedisplay unit 206. The image frames processed by thegraphic processor 2041 may be stored in the memory 209 (or other storage medium) or transmitted via theradio frequency unit 201 or thenetwork module 202. Themicrophone 2042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via theradio frequency unit 201 in case of a phone call mode. Thecamera module 2043 collects images and transmits the collected images to thegraphic processor 2041.
Theelectronic device 200 also includes at least onesensor 205, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of thedisplay panel 2061 according to the brightness of ambient light, and a proximity sensor that can turn off thedisplay panel 2061 and/or the backlight when theelectronic device 200 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); thesensors 205 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
Thedisplay unit 206 is used to display information input by the user or information provided to the user. Thedisplay unit 206 may include adisplay panel 2061, and thedisplay panel 2061 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), or the like.
Theuser input unit 207 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, theuser input unit 207 includes atouch panel 2071 andother input devices 2072.Touch panel 2071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 2071 (e.g., user operation on or near thetouch panel 2071 using a finger, a stylus, or any other suitable object or attachment). Thetouch panel 2071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 210, and receives and executes commands sent by theprocessor 210. In addition, thetouch panel 2071 may be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. Theuser input unit 207 may includeother input devices 2072 in addition to thetouch panel 2071. In particular, theother input devices 2072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not further described herein.
Further, atouch panel 2071 may be overlaid on thedisplay panel 2061, and when thetouch panel 2071 detects a touch operation on or near thetouch panel 2071, the touch panel is transmitted to theprocessor 210 to determine the type of the touch event, and then theprocessor 210 provides a corresponding visual output on thedisplay panel 2061 according to the type of the touch event. Although thetouch panel 2071 and thedisplay panel 2061 are shown as two separate components in fig. 10 to implement the input and output functions of the electronic device, in some embodiments, thetouch panel 2071 and thedisplay panel 2061 may be integrated to implement the input and output functions of the electronic device, and are not limited herein.
Theinterface unit 208 is an interface for connecting an external device to theelectronic apparatus 200. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Theinterface unit 208 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within theelectronic apparatus 200 or may be used to transmit data between theelectronic apparatus 200 and the external device.
Thememory 209 may be used to store software programs as well as various data. Thememory 209 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, thememory 209 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Theprocessor 210 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in thememory 209 and calling data stored in thememory 209, thereby performing overall monitoring of the electronic device.Processor 210 may include one or more processing units; optionally, theprocessor 210 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 210.
Theelectronic device 200 may further include a power source 211 (such as a battery) for supplying power to each component, and optionally, the power source 211 may be logically connected to theprocessor 210 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, theelectronic device 200 includes some functional modules that are not shown, and thus are not described in detail herein.
Optionally, an embodiment of the present invention further provides an electronic device, which includes aprocessor 210 as shown in fig. 10, amemory 209, and a computer program that is stored in thememory 209 and is executable on theprocessor 210, and when the computer program is executed by theprocessor 210, the processes of the foregoing method embodiment are implemented, and the same technical effect can be achieved, and details are not described here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the method embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. Examples of the computer-readable storage medium include a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk and an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.