A reply information recommendation method and device, a storage medium, and an electronic device
By extracting the text features of each word in the user input information, candidate response information matching the word is determined, and response information recommended to merchants is filtered out based on the text features of the candidate response information. This solves the problem of lack of diversity in response information recommendation in existing technologies and achieves more accurate and diversified response effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SANKUAI ONLINE TECH CO LTD
- Filing Date
- 2022-05-30
- Publication Date
- 2026-06-02
AI Technical Summary
Existing reply recommendation methods only consider one semantic meaning of user input, resulting in a lack of diversity in merchants' replies. This fails to meet users' diverse semantic needs in different contexts and negatively impacts user experience.
By extracting the text features of each word in the user input information, candidate response information matching the word is determined, and response information recommended to merchants is selected based on the text features of the candidate response information, taking into account multiple semantic perspectives for response information recommendation.
It expands the options available to merchants when replying to messages, improves the accuracy and effectiveness of replies, meets users' diverse semantic needs in different contexts, and enhances the user experience.
Smart Images

Figure CN115017282B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of Internet technology, and in particular to a method, apparatus, storage medium, and electronic device for recommending reply information. Background Technology
[0002] In the process of online shopping, to help merchants better respond to user inquiries and improve user retention, many e-commerce platforms assist merchants with reply recommendations. That is, when a merchant receives a message from a user, the platform automatically recommends several suitable replies. The merchant simply selects the most appropriate reply and responds with a single click.
[0003] Existing reply recommendation methods typically select the most suitable reply from a pre-stored list of replies based on the semantics of the user's message. However, in most cases, an input message can convey multiple meanings, especially in continuous conversations. Given the context, an input message can be interpreted in various ways. Current message reply methods only consider one semantic meaning of the user's message when recommending replies to merchants. The selected replies are all responses addressing this single semantic meaning, differing only in expression but conveying the same complete meaning.
[0004] like Figure 1 As shown, a user inquires with a seller about why a product isn't working after using it. Generally, a product's lack of effectiveness can be caused by many factors. Therefore, sellers can respond to this question from various angles, or they can first gather more details from the user before providing a specific reply. Existing response recommendation methods would directly provide suggestions such as... Figure 1 The recommended replies shown are as follows. It can be seen that although these three recommended replies differ in content, they all express the same meaning: the user hasn't used the product long enough and should continue using it for a while. However, if this isn't actually the reason why the product is ineffective, the merchant's reply will not help the user at all, and the user experience will be correspondingly poor.
[0005] In communication with users, the messages they send can convey different meanings in different contexts, requiring responses with varying degrees of nuance. Existing response recommendation methods, when recommending responses to merchants, only consider one semantic meaning of the user's message and provide responses based solely on that meaning, clearly failing to meet the need for diverse responses. Summary of the Invention
[0006] This specification provides a method, apparatus, storage medium, and electronic device for recommending response information, to at least partially solve the aforementioned problems existing in the prior art.
[0007] The following technical solution is adopted in this specification:
[0008] This manual provides a method for recommending response information, including:
[0009] Obtain user input information;
[0010] Extract the text features of each word in the input information;
[0011] For each word in the input information, candidate response information that matches the text features of that word is determined as candidate response information that matches the input information;
[0012] Based on the text features of the candidate response information, the response information recommended to the merchant is selected from each candidate response information.
[0013] Optionally, extract the text features of each word in the input information, specifically including:
[0014] The input information is fed into a pre-trained model to extract the text features of each word in the input information.
[0015] Before filtering out recommended responses to merchants from among the candidate responses based on their textual features, the method further includes:
[0016] The candidate response information is input into the model to extract the text features of the candidate response information.
[0017] Optionally, candidate response information matching the text features of the word is determined, specifically including:
[0018] Based on the textual features of the word, index input information matching the word is determined in a pre-established index library. The index library contains index input information, index response information, textual features of the index input information, and the correspondence between each index input information and each index response information.
[0019] Based on the index library, determine the index response information corresponding to the index input information, as candidate response information matching the text features of the word.
[0020] Optionally, based on the text features of the candidate response information, the response information recommended to the merchant is filtered from the candidate response information, specifically including:
[0021] For each candidate response, based on the text features of the candidate response and the text features of each word in the input information, the relevant text features of the input information corresponding to the candidate response are determined;
[0022] Based on the relevant text features of each candidate response information corresponding to the input information, the response information recommended to the merchant is selected from each candidate response information.
[0023] Optionally, based on the text features of the candidate response information and the text features of each word in the input information, the relevant text features of the input information corresponding to the candidate response information are determined, specifically including:
[0024] For each word in the input information, the weight of the word corresponding to the candidate response information is determined based on the text features of the word and the text features of the candidate response information.
[0025] Based on the text features of each word in the input information and the weight of each word corresponding to each candidate response, the relevant text features of the input information corresponding to the candidate response are determined.
[0026] Optionally, based on the relevant text features corresponding to each candidate response information in the input information, the response information recommended to the merchant is filtered from the candidate response information, specifically including:
[0027] For each candidate response, the degree of relevance between the input information and the candidate response is determined based on the relevant text features of the input information corresponding to that candidate response and the text features of the candidate response.
[0028] Based on the relevance of each candidate response to the input information, the response information recommended to the merchant is selected from the candidate responses.
[0029] Optionally, an index can be pre-built, specifically including:
[0030] Obtain index input information, index response information, and the correspondence between each index input information and each index response information;
[0031] Extract the text features of each word in the index input information and the text features of the index response information;
[0032] For each word in each index input, the relevance between the word and the index response is determined based on the text features of the word and the text features of the index response that matches the index input.
[0033] Based on the degree of relevance between the word and the index response information, determine the text features of the index input information;
[0034] An index database is established based on the correspondence between the input information and the response information of each index, and the textual characteristics of the input information of each index.
[0035] Optionally, the method further includes:
[0036] For each index response in the index library, when there are at least two index inputs corresponding to the index response, the text features of each index input corresponding to the index response are averaged to obtain purified text features.
[0037] The purified text features are redefined as the text features of each index input information corresponding to the index response information.
[0038] Optional, pre-trained models, specifically including:
[0039] Obtain sample input information, sample response information, and the correspondence between each sample input information and each sample response information;
[0040] The sample input information is input into the model to be trained, so that the model can extract the text features to be optimized for each word in the sample input information;
[0041] Based on the text features to be optimized for each word in the sample input information, candidate sample response information that matches the sample input information is determined from each sample response information;
[0042] Extract the text features to be optimized from the response information of each candidate sample;
[0043] Based on the text features to be optimized for each word in the sample input information and the text features to be optimized for each candidate sample response information, the degree of correlation between the sample input information and each candidate sample response information is determined.
[0044] For each sample input, the model is trained with the optimization objective of selecting the candidate sample response information that has the highest relevance to that sample input information as the sample response information corresponding to that sample input information.
[0045] This specification provides a response information recommendation device, the device comprising:
[0046] The module retrieves user input information.
[0047] The extraction module extracts the text features of each word in the input information;
[0048] The determination module determines candidate response information that matches the text features of each word in the input information, and uses this as the candidate response information that matches the input information.
[0049] The filtering module selects the recommended response information for merchants from among the candidate response information based on the text features of the candidate response information.
[0050] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for recommending response information.
[0051] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for recommending response information.
[0052] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0053] The response recommendation method provided in this specification first obtains the user's input information and extracts the text features of each word in the input information. Candidate response information that matches the text features of each word in the input information is then identified as matching candidate response information. Finally, based on the text features of the candidate response information, the recommended response information is selected for merchants. When using this method for response recommendation, the input information is divided into multiple semantics based on multiple different words. Different candidate response information is recalled based on each semantic, and the most suitable response information is selected from the candidate response information to recommend to the merchant, thus broadening the merchant's response options and improving the response effect. Attached Figure Description
[0054] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0055] Figure 1 This is a schematic diagram illustrating an example of an existing method described in this specification;
[0056] Figure 2 This is a flowchart illustrating one of the response information recommendation methods in this specification;
[0057] Figure 3 This is a schematic diagram of a response information recommendation device provided in this specification;
[0058] Figure 4 The corresponding information provided in this specification Figure 2 A schematic diagram of an electronic device. Detailed Implementation
[0059] Currently, most e-commerce platforms use a reply recommendation method that involves extracting the text features of the input information sent by the user after the merchant receives the input information, representing it as a vector, and then determining several reply information based on the extracted text features and recommending them to the merchant.
[0060] Typically, input information can express multiple semantics, and the meaning obtained from different perspectives is often different. However, a text feature represented by a vector can only express one semantic. Existing response recommendation methods only consider one possible semantic when faced with input information and select response information based on only this one semantic. This approach forces merchants to choose only one perspective when responding to users. When the semantics actually expressed by the user do not match the recommended response information, the merchant can only edit the response themselves. At this time, the recommended response information cannot provide any help to the merchant.
[0061] To address the aforementioned technical problems, this specification provides a method for recommending response information from multiple perspectives.
[0062] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.
[0063] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0064] Figure 2 This is a flowchart illustrating one of the response information recommendation methods in this specification, which specifically includes the following steps:
[0065] S100: Obtain input information from the user.
[0066] All steps in the recommended response method provided in this manual can be implemented by any electronic device with computing capabilities, such as a server or terminal.
[0067] The purpose of this method is to help merchants respond to user inquiries; therefore, it first requires obtaining the user's input information. This input information can be text, text converted from speech, text extracted from images, etc.
[0068] S102: Extract the text features of each word in the input information;
[0069] In order to take into account all the semantics that the input information may express, each word in the input information can be regarded as an individual semantic perspective, and the text features of each word in the input information are extracted.
[0070] Additionally, some words cannot express any semantics that can be replied to individually when used alone, such as conjunctions like "de", "he", "huo", and modal particles like "a", "ya", "ne", etc. Therefore, before extracting the text features of each word in the input information, the words in the input information can be filtered to filter out the specified words in each word of the input information, and then the text features of the remaining words in the input information are extracted. Among them, the specified words include but are not limited to conjunctions, particles, prepositions, etc.
[0071] S104: For each word in the input information, determine the candidate reply information that matches the text feature of the word as the candidate reply information that matches the input information.
[0072] For each word in the input information, at least one candidate reply information that matches the word can be determined according to the text feature of the word. Among them, the candidate reply information can be pre-set. Since the semantics expressed by the text features of different words are different, the semantics of the candidate reply information that matches the text features of different words will also be different. Taking the candidate reply information that matches each word in the input information as the candidate reply information that matches the input information, multiple candidate reply information for replying from different semantic perspectives can be obtained.
[0073] Among them, for the text feature of each word in the input information, at least one candidate reply information can be determined. The number of candidate reply information determined according to the text features of different words can be the same or different, and this specification does not limit this here.
[0074] S106: According to the text features of the candidate reply information, screen out the reply information recommended to the merchant from each candidate reply information.
[0075] At this time, according to the text features of the candidate reply information, the reply information that is most suitable for replying to the input information can be screened out from each candidate reply information and recommended to the merchant.
[0076] When using the response recommendation method provided in this manual, the input information sent by the user can be semantically analyzed. Multiple text features expressing different semantics are obtained based on the words in the input information. For each word's text feature, several different candidate responses are determined, and the recommended response is selected from these candidates. Unlike traditional methods that only respond to one possible semantic meaning of the input information, this method can determine multiple different candidate responses for each possible semantic meaning of the input information. This greatly expands the merchant's choices when responding, increases the probability of accurate responses, and improves the effectiveness of the merchant's responses.
[0077] Typically, various language models, such as BERT, can be used to extract text features. Specifically, when extracting the text features of each word in the input information, the input information can be fed into a pre-trained model to extract the text features of each word. Before selecting the recommended response information for the merchant from the candidate response information based on its text features, the candidate response information can be fed into the model to extract its text features.
[0078] When determining candidate response information that matches the text features of each word in the input information, various methods can be used. This specification provides one embodiment for reference. Specifically, based on the text features of the word, index input information matching the word can be determined in a pre-established index library. The index library contains index input information, index response information, text features of the index input information, and the correspondence between each index input information and each index response information. Based on the index library, the index response information corresponding to the index input information is determined as candidate response information matching the text features of the word.
[0079] In practical applications, an index library is pre-built based on historical data and experience. This library stores pre-defined correspondences between index input and response information, with each response corresponding to a specific index input. Typically, for each index input in the index library, the corresponding response is the most suitable response. Therefore, after determining the text features of each word in the input, the index library is searched for matching words, and the corresponding responses are used as candidate responses. A word matching an index input is defined as the similarity between the text features of the word and the text features of the index input exceeding a specific threshold.
[0080] After identifying candidate response information in step S104, the candidate response information can be further filtered to determine the response information recommended to the merchant. Since different candidate response information determined based on different words in the input information addresses different angles in the response, the relevant text features of the input information for each candidate response information can be determined based on the text features of each word in the input information. Specifically, for each candidate response information, the relevant text features of the input information corresponding to that candidate response information can be determined based on the text features of that candidate response information and the text features of each word in the input information; based on the relevant text features of the input information corresponding to each candidate response information, the response information recommended to the merchant can be filtered from the candidate response information.
[0081] In this system, the relevant text features corresponding to each input message are used to represent the text features exhibited by the input message when the semantics of the input message matches the semantics of the candidate response message. It should be noted that the relevant text features of the input message will vary depending on the candidate response message; the relevant text features of the input message will be different for each different candidate response message.
[0082] When determining the relevant text features of input information, since different candidate responses are determined based on different words in the input information, the relevant text features corresponding to each candidate response can be determined for each different input information. Specifically, for each word in the input information, the weight of the word corresponding to the candidate response can be determined based on the text features of the word and the text features of the candidate response; the relevant text features of the input information corresponding to the candidate response can be determined based on the text features of each word in the input information and the weight of each word corresponding to each candidate response. Here, the weight of a word in the input information corresponding to a candidate response specifically represents the weight of the word when its semantics match the semantics of the candidate response. In practical applications, many words themselves have multiple semantics, and the weight of a word will differ depending on its semantics. For example, when the candidate response is related to mobile phone sales, the weight of the word "apple" will be lower when its semantics refer to fruit, but higher when its semantics refer to a brand name.
[0083] The relevant text features corresponding to one input message and one candidate response message can be determined using the following formula:
[0084]
[0085] Among them, c r c represents the relevant text features of the input information. i c j This represents the text features of each word in the input information, where k is the number of words in the input information, and w is the text feature of each word. i The weight of each word is represented by r; r represents the text features of the candidate response; e is a natural constant; and d is a constant that can be set and changed as needed. For each candidate response, the relevant text features of the input information corresponding to that candidate response can be calculated using the above formula.
[0086] The formula represents the proportion of the relevance of the current word's text features to the candidate response information within the sum of the relevances of all words to the candidate response information. A higher proportion results in a higher weight for the current word. It's important to note that the weights of the words in the input information are not fixed. The weights of the words in the input information differ depending on the candidate response information. When the candidate response information changes, the weights of the words in the input information also change, requiring recalculation using the above formula.
[0087] After determining the relevant text features corresponding to each candidate response, the degree of correlation between the input information and each candidate response can be further determined based on these text features, in order to filter the candidate responses. Specifically, for each candidate response, the degree of correlation between the input information and the candidate response can be determined based on the relevant text features corresponding to that candidate response and the text features of the candidate response itself; based on the degree of correlation between each candidate response and the input information, response information recommended to the merchant can be filtered from the candidate responses.
[0088] The relevance degree characterizes the degree of matching between an input and a candidate response when the input is responded to with a candidate response. A higher relevance degree indicates a better match between the two, meaning the candidate response is more suitable for responding to the input. The specific calculation method for relevance degree is as follows:
[0089] s = dot(c r ,r)
[0090] Where s represents the relevance between the input information and the candidate response information, and c r This represents the relevant text features of the input information corresponding to the candidate response information, r represents the text features of the candidate response information, and dot represents the dot product.
[0091] Based on the correlation between the input information determined in step S108 and each candidate response, the response information recommended to the merchant can be selected from among the candidate responses. Specifically, when selecting response information based on correlation, the candidate responses with the highest correlation can be selected as the response information recommended to the merchant, or all candidate responses with a correlation greater than a specified threshold can be selected as the response information recommended to the merchant.
[0092] Additionally, since the semantics of each word in the index input information of the index library are not the same, in order to obtain the best correspondence effect, when building the index library, the text features of the index input information can be determined based on the correlation between the text features of each word in the index input information and the text features of the corresponding index response information. Specifically, the index input information, index response information, and the correspondence between each index input information and each index response information can be obtained; the text features of each word in the index input information and the text features of the index response information can be extracted; for each word in each index input information, the correlation between the word and the index response information is determined based on the text features of the word and the text features of the index response information that matches the index input information; the text features of the index input information are determined based on the correlation between the word and the index response information; and the index library is built based on the correspondence between each index input information and each index response information and the text features of each index input information.
[0093] The index input and response information used when building the index repository is usually obtained from human dialogues in historical data. Therefore, the correspondence between the index input and response information is known. At this point, it is necessary to determine the text features of the index input and response information so that the correspondence can be clearly defined when calling the index repository. The text features of the index response information can be directly determined, but since the index input information may have multiple different semantics, it is necessary to determine the semantic with the highest matching degree with the index response information from among these different semantics, making the text feature corresponding to this semantic the text feature of the index input information. Specifically, it can be calculated using the following formula:
[0094]
[0095] Among them, c e The text features representing the index input information, c i r represents the text features of each word in the indexed input information. eThe text features represent the index response information, and dot represents the dot product. The index input information corresponds to the index response information in the formula. The meaning of the above formula is that, among the words in the index input information, the word with the highest correlation between its text features and the text features of the index response information is selected, and the text features of that word are used as the text features of the index input information.
[0096] Furthermore, in the initially established index library, there may be situations where different index input information matches the same index response information. In this case, to ensure a one-to-one correspondence between the text features of the index input information and the text features of the index response information, semantic purification can be performed on the index input information in the index library. Specifically, for each index response information in the index library, when there are at least two index input information corresponding to that index response information, the text features of each index input information corresponding to that index response information are averaged to obtain purified text features; these purified text features are then redefined as the text features of each index input information corresponding to that index response information.
[0097] Specifically, when different text features in the index database result in identical index response information, the text features can be refined using the following formula:
[0098]
[0099] Where μ represents the purified text features, c x Let represent the text features of each index input, and n represent the number of index inputs with the same corresponding index response. The formula above indicates that averaging the text features of all index inputs with the same corresponding index response yields the refined text features.
[0100] Furthermore, the model used in this specification is used to extract text features. Specifically, during model training, sample input information, sample response information, and the correspondence between each sample input and each sample response are obtained. The sample input information is input into the model to be trained, so that the model extracts the text features to be optimized for each word in the sample input information. Based on the text features to be optimized for each word in the sample input information, candidate sample responses matching the sample input information are determined from each sample response. The text features to be optimized for each candidate sample response are extracted. Based on the text features to be optimized for each word in the sample input information and the text features to be optimized for each candidate sample response, the correlation between the sample input information and each candidate sample response is determined. For each sample input, the candidate sample response with the highest correlation to that sample input is used as the optimization target, and the model is trained accordingly.
[0101] While acquiring sample input and response information, the known correspondence between them can be used as annotations. When determining candidate sample responses, the correlation between each word in the sample input and each sample response can be determined based on the text features to be optimized for each word in the sample input and the text features to be optimized for each sample response. At least one sample response feature matching each word in the sample input is selected, and the sample responses matching each word in the input are considered candidate sample responses matching the sample input.
[0102] Given sample responses that match the input information, the model can be trained with the highest relevance candidate response as the matching response. When determining the relevance between the input and candidate responses, the same method used to determine the relevant text features corresponding to the input and candidate responses can be employed. This involves identifying the unoptimized relevant text features for each candidate response and determining the relevance between the input and candidate responses based on these unoptimized features. Alternatively, the unoptimized text features of each word in the input can be directly averaged, and the resulting text features can be directly used as the unoptimized text features for the input, thus determining the relevance between the input and candidate responses.
[0103] It's worth noting that during model training, pre-built index input information can be used as sample input information, and index response information can be used as sample response information for model training. In this case, the correspondence between sample input information and sample output information is more accurate, resulting in better training performance.
[0104] The above is the response information recommendation method provided in this manual. Based on the same idea, this manual also provides a corresponding response information recommendation device, such as... Figure 3 As shown.
[0105] Figure 3 This specification provides a schematic diagram of a response information recommendation device, which specifically includes:
[0106] Module 200 retrieves user input information;
[0107] Extraction module 202 extracts the text features of each word in the input information;
[0108] The determining module 204 determines candidate response information that matches the text features of each word in the input information, and uses this as candidate response information that matches the input information.
[0109] The filtering module 206 filters out the reply information recommended to the merchant from each candidate reply information based on the text features of the candidate reply information.
[0110] In an alternative embodiment:
[0111] The extraction module 202 is specifically used to input the input information into a pre-trained model so as to extract the text features of each word in the input information through the model;
[0112] The filtering module 206 is specifically used to input the candidate response information into the model so as to extract the text features of the candidate response information through the model.
[0113] In an alternative embodiment:
[0114] The determining module 204 is specifically used to determine, based on the text features of the word, index input information matching the word in a pre-established index library, wherein the index library contains index input information, index response information, text features of the index input information, and the correspondence between each index input information and each index response information; and to determine, based on the index library, the index response information corresponding to the index input information as candidate response information matching the text features of the word.
[0115] In an alternative embodiment:
[0116] The filtering module 206 is specifically used to, for each candidate response, determine the relevant text features of the input information corresponding to the candidate response based on the text features of the candidate response and the text features of each word in the input information; and filter out the response information recommended to the merchant from each candidate response based on the relevant text features of the input information corresponding to each candidate response.
[0117] In an alternative embodiment:
[0118] The filtering module 206 is specifically used to determine the weight of each word in the input information corresponding to the candidate response information based on the text features of the word and the text features of the candidate response information; and to determine the relevant text features of the input information corresponding to the candidate response information based on the text features of each word in the input information and the weight of each word corresponding to each candidate response information.
[0119] In an alternative embodiment:
[0120] The filtering module 206 is specifically used to determine the degree of relevance between the input information and the candidate response information for each candidate response information based on the relevant text features of the input information corresponding to the candidate response information and the text features of the candidate response information; and to filter out the response information recommended to the merchant from the candidate response information based on the degree of relevance between each candidate response information and the input information.
[0121] In an alternative embodiment:
[0122] The device further includes a building module 208, specifically used to acquire index input information, index response information, and the correspondence between each index input information and each index response information; extract the text features of each word in the index input information and the text features of the index response information; for each word in each index input information, determine the degree of relevance between the word and the index response information based on the text features of the word and the text features of the index response information that matches the index input information; determine the text features of the index input information based on the degree of relevance between the word and the index response information; and build an index database based on the correspondence between each index input information and each index response information and the text features of each index input information.
[0123] In an alternative embodiment:
[0124] The device further includes a purification module 210, which is specifically used for each index response information in the index library. When there are at least two index input information corresponding to the index response information, the module performs mean processing on the text features of each index input information corresponding to the index response information to obtain purified text features; and redetermines the purified text features as the text features of each index input information corresponding to the index response information.
[0125] In an alternative embodiment:
[0126] The device further includes a training module 212, specifically used to acquire sample input information, sample response information, and the correspondence between each sample input information and each sample response information; input the sample input information into the model to be trained, so as to extract the text features to be optimized for each word in the sample input information through the model; determine the candidate sample response information that matches the sample input information in each sample response information according to the text features to be optimized for each word in the sample input information; extract the text features to be optimized for each candidate sample response information; determine the correlation between the sample input information and each candidate sample response information according to the text features to be optimized for each word in the sample input information and the text features to be optimized for each candidate sample response information; and train the model for each sample input information with the candidate sample response information that has the highest correlation with the sample input information as the sample response information corresponding to the sample input information as the optimization target.
[0127] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 2 Recommended methods for providing reply information.
[0128] This instruction manual also provides Figure 4 The diagram shows a schematic structural representation of the electronic device. Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 2 The method for recommending response information is described above. Of course, besides software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0129] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.
[0130] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0131] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0132] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0133] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0134] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0136] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0138] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0139] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0140] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0141] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0142] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0143] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0144] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0145] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this application.
Claims
1. A reply information recommendation method characterized by comprising: include: Obtain user input information; Extract the text features of each word in the input information; For each word in the input information, candidate response information that matches the text features of that word is determined as candidate response information that matches the input information; Based on the text features of the candidate response information, the response information recommended to the merchant is selected from each candidate response information; Extracting the text features of each word in the input information specifically includes: The input information is fed into a pre-trained model to extract the text features of each word in the input information. Before filtering out recommended responses to merchants from among the candidate responses based on their textual features, the method further includes: The candidate response information is input into the model so that the text features of the candidate response information can be extracted by the model; Pre-trained models, specifically including: Obtain sample input information, sample response information, and the correspondence between each sample input information and each sample response information; The sample input information is input into the model to be trained, so that the model can extract the text features to be optimized for each word in the sample input information; Based on the text features to be optimized for each word in the sample input information, candidate sample response information that matches the sample input information is determined from each sample response information; Extract the text features to be optimized from the response information of each candidate sample; Based on the text features to be optimized for each word in the sample input information and the text features to be optimized for each candidate sample response information, the degree of correlation between the sample input information and each candidate sample response information is determined. For each sample input, the model is trained with the optimization objective of selecting the candidate sample response information that has the highest relevance to that sample input information as the sample response information corresponding to that sample input information.
2. The method of claim 1, wherein, Determine candidate response information that matches the text features of the word, specifically including: Based on the textual features of the word, index input information matching the word is determined in a pre-established index library. The index library contains index input information, index response information, textual features of the index input information, and the correspondence between each index input information and each index response information. Based on the index library, determine the index response information corresponding to the index input information, as candidate response information matching the text features of the word.
3. The method of claim 1, wherein, Based on the text features of the candidate response information, response information recommended to merchants is selected from each candidate response information, specifically including: For each candidate response, based on the text features of the candidate response and the text features of each word in the input information, the relevant text features of the input information corresponding to the candidate response are determined; Based on the relevant text features of each candidate response information corresponding to the input information, the response information recommended to the merchant is selected from each candidate response information.
4. The method of claim 3, wherein, Based on the text features of the candidate response information and the text features of each word in the input information, the relevant text features of the input information corresponding to the candidate response information are determined, specifically including: For each word in the input information, the weight of the word corresponding to the candidate response information is determined based on the text features of the word and the text features of the candidate response information. Based on the text features of each word in the input information and the weight of each word corresponding to each candidate response, the relevant text features of the input information corresponding to the candidate response are determined.
5. The method of claim 3, wherein, Based on the relevant text features corresponding to each candidate response information in the input information, the response information recommended to the merchant is filtered out from the candidate response information, specifically including: For each candidate response, the degree of relevance between the input information and the candidate response is determined based on the relevant text features of the input information corresponding to that candidate response and the text features of the candidate response. Based on the relevance of each candidate response to the input information, the response information recommended to the merchant is selected from the candidate responses.
6. The method of claim 2, wherein, Pre-establishing an index library specifically includes: Obtain index input information, index response information, and the correspondence between each index input information and each index response information; Extract the text features of each word in the index input information and the text features of the index response information; For each word in each index input, the relevance between the word and the index response is determined based on the text features of the word and the text features of the index response that matches the index input. Based on the degree of relevance between the word and the index response information, determine the text features of the index input information; An index database is established based on the correspondence between the input information and the response information of each index, and the textual characteristics of the input information of each index.
7. The method of claim 6, wherein, The method further includes: For each index response in the index library, when there are at least two index inputs corresponding to the index response, the text features of each index input corresponding to the index response are averaged to obtain purified text features. The purified text features are redefined as the text features of each index input information corresponding to the index response information.
8. A reply information recommendation apparatus characterized by comprising: include: The module retrieves user input information. The extraction module extracts the text features of each word in the input information; The determination module determines candidate response information that matches the text features of each word in the input information, and uses this as the candidate response information that matches the input information. The filtering module filters out the reply information recommended to the merchant from each candidate reply information based on the text features of the candidate reply information; Extracting the text features of each word in the input information specifically includes: The input information is fed into a pre-trained model to extract the text features of each word in the input information. Before filtering out the recommended response information for merchants from the candidate response information based on its text features, the process also includes: The candidate response information is input into the model so that the text features of the candidate response information can be extracted by the model; Pre-trained models, specifically including: Obtain sample input information, sample response information, and the correspondence between each sample input information and each sample response information; The sample input information is input into the model to be trained, so that the model can extract the text features to be optimized for each word in the sample input information; Based on the text features to be optimized for each word in the sample input information, candidate sample response information that matches the sample input information is determined from each sample response information; Extract the text features to be optimized from the response information of each candidate sample; Based on the text features to be optimized for each word in the sample input information and the text features to be optimized for each candidate sample response information, the degree of correlation between the sample input information and each candidate sample response information is determined. For each sample input, the model is trained with the optimization objective of selecting the candidate sample response information that has the highest relevance to that sample input information as the sample response information corresponding to that sample input information.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 7.