Method, device, electronic device, and medium for generating forecast information
By segmenting input text into word vectors and using user history to predict intentions, the method effectively reduces annoying GIF pop-ups, enhancing user experience.
Patent Information
- Application Number
- JP2023507396
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-08-10
- Filing Date
- 2021-08-10
- Publication Date
- 2024-11-13
- Estimated Expiration
- 2041-08-10
AI Technical Summary
Existing methods for generating predictive information, such as automatically popping up GIF images, can be annoying to users and affect user experience due to frequent and unnecessary information pop-ups.
A method involving word segmentation of input text to generate word vectors, forming an input text vector, and predicting user intention using a user vector based on historical data to determine if a GIF image should be displayed, thereby reducing unnecessary pop-ups.
This approach improves user experience by accurately predicting user needs and reducing unwanted information pop-ups, ensuring that GIF images are displayed only when necessary.
Smart Images

Figure 0007583149000001 
Figure 0007583149000002 
Figure 0007583149000003
Abstract
Description
[Technical field]
[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application is filed based on a Chinese patent application bearing application number 202010797886.2, filing date August 10, 2020, and entitled "Method, Apparatus, Electronic Device and Medium for Generating Predictive Information," and claims priority to said Chinese patent application, the entire contents of which are hereby incorporated by reference into this application.
[0002] [Technical field] TECHNICAL FIELD Embodiments of the present disclosure relate to the field of computer technology, and specifically to methods, apparatus, electronic devices, and media for generating predictive information. [Background technology]
[0003] With the development of the Internet era, people frequently use electronic devices to input information for communication. The input information is generally text information. In order to make the input information rich and intuitive, GIF (Graphics Interchange Format) images related to the text information are often used. In order to improve the user experience, a method of automatically popping up a GIF image can be adopted. For example, when a user is having a conversation using private messages, a GIF image will automatically pop up when the user inputs text information. However, popping up GIF images too frequently may annoy the user and affect the user experience. Summary of the Invention
[0004] This Summary of the Disclosure is used to present concepts in a concise form that are described in detail in the Specific Embodiments section below. This Summary of the Disclosure is not intended to identify key or necessary features of the claimed invention, nor is it intended to limit the scope of the claimed invention.
[0005] Some embodiments of the present disclosure propose a method, an apparatus, an electronic device, and a medium for generating predictive information in order to solve the problems described in the background art above.
[0006] In a first aspect, some embodiments of the present disclosure provide a method for generating prediction information, the method includes: obtaining at least one input word obtained by word segmenting a target input text, generating a word vector for each input word of the at least one input word to obtain a group of word vectors, generating an input text vector based on the group of word vectors, and generating prediction information for predicting a user's intention based on the input text vector and a user vector.
[0007] In a second aspect, some embodiments of the present disclosure provide an apparatus for generating prediction information, the apparatus including: an acquisition unit for acquiring at least one input word obtained by word segmenting a target input text, a word vector generation unit configured to generate a word vector for each of the at least one input word obtained by word segmenting the target input text to obtain a word vector group, an input text vector generation unit for generating an input text vector based on the word vector group, and a generation unit for generating prediction information for predicting a user's intention based on the input text vector and a user vector.
[0008] In a third aspect, some embodiments of the present disclosure provide an electronic device, the electronic device including one or more processors and a storage device storing one or more programs, the one or more processors implementing a method as described in the first aspect when the one or more programs are executed by the one or more processors.
[0009] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium storing a computer program, which when executed by a processor, implements the method described in the first aspect.
[0010] One of the above-mentioned embodiments of the present disclosure has the following beneficial effects. An input text vector is generated by generating a word vector of an input word. A situation in which an error is likely to occur by directly generating an input text vector can be avoided. Then, prediction information for predicting a user's request intention is generated based on the input text vector and the user vector. Since the user vector is obtained based on user history information, it can reflect the user's behavior history. Therefore, the generated prediction information also more closely matches the needs of the user. This provides a method for determining a user's request intention according to the user vector and the input text vector. By predicting a user's request intention before a GIF image is popped up for the user, the pop-up of unnecessary information is reduced, so as not to inconvenience the user, and the user experience is improved.
[0011] The above and other features, advantages, and aspects of the disclosed embodiments will become more apparent with reference to the following specific embodiments in conjunction with the drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the components and elements are not necessarily drawn to scale. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a schematic diagram illustrating an application scene of a method for generating prediction information according to some embodiments of the present disclosure. [Diagram 2] 1 is a flowchart of some example methods for generating predictive information according to the present disclosure. [Diagram 3] FIG. 2 is a diagram showing an application scene of a method for generating prediction information according to some embodiments of the present disclosure. [Figure 4] FIG. 2 is a diagram showing an application scene of a method for generating prediction information according to some embodiments of the present disclosure. [Diagram 5]11 is a flow chart of another embodiment of a method for generating predictive information according to the present disclosure. [Figure 6] FIG. 11 is a diagram showing an application scene of a method for generating prediction information according to another embodiment of the present disclosure. [Figure 7] FIG. 1 is a schematic block diagram of some embodiments of an apparatus for generating predictive information according to the present disclosure. [Figure 8] FIG. 1 is a schematic diagram of an electronic device adapted to implement some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be realized in various forms and should not be construed as being limited to the embodiments described herein. Rather, these embodiments are provided to allow the present disclosure to be more clearly and completely understood. It should be understood that the drawings and embodiments of the present disclosure are used for illustrative purposes only and are not used to limit the scope of the present disclosure.
[0014] In addition, for ease of explanation, only parts related to the present invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other if not inconsistent.
[0015] It should be noted that concepts such as "first", "second", etc. referred to in this disclosure are used only to distinguish different devices, modules, or units, and do not define the order or interdependence of functions performed by these devices, modules, or units.
[0016] It should be understood by those skilled in the art that the modifications "a" and "multiple" referred to in the present disclosure are general rather than limiting, and should be understood as "one or more" unless expressly stated otherwise in the context.
[0017] The names of interactive messages or information between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only and are not used to limit the scope of these messages or information.
[0018] Hereinafter, the present disclosure will be described in detail in accordance with embodiments with reference to the drawings.
[0019] FIG. 1 is a schematic diagram illustrating an application scene of a method for generating prediction information according to some embodiments of the present disclosure.
[0020] As shown in FIG. 1, the computing device 101 obtains an input word 103 and an input word 104. Here, the input word 103 and the input word 104 are obtained by word segmentation of the input text 102. Of course, the above-mentioned word segmentation may be performed on the input text 102 by another computing device, and then the computing device directly obtains the word segmentation result, i.e., the input word 103 and the input word 104. Then, the computing device 101 generates a word vector 105 of the input word 103 and a word vector 106 of the input word 104. Based on the word vector 105 and the word vector 106, the computing device 101 generates an input text vector 107. Based on the input text vector 107 and the user vector 108, the computing device 101 generates prediction information 109.
[0021] The above-mentioned computing device 101 may be hardware or software. If the computing device is hardware, it may be realized as a distributed cluster of multiple servers or terminal devices, or as a single server or a single terminal device. If the computing device is software, it may be realized, for example, as multiple software or software modules used to provide distributed services, or as a single software or software module. No specific limitations are given here.
[0022] It should be understood that the number of computing devices in Figure 1 is merely exemplary, and any number of computing devices may be included according to actual needs.
[0023] 2 is a flowchart 200 of some example embodiments of a method for generating forecast information according to the present disclosure. The method for generating forecast information includes the following steps.
[0024] Step 201: Obtain at least one input word.
[0025] In some embodiments, the execution entity of the method for generating prediction information (the computing device 101 shown in FIG. 1) obtains the at least one input word via a wired or wireless connection. The at least one input word may be a word obtained by word-segmenting a target input text. For example, the execution entity receives a text input by a user as the target input text. Then, the received target input text is subjected to a word-segmenting process to obtain at least one input word. Also, for example, the execution entity receives an input word input by a user as the at least one input word.
[0026] In addition, the above wireless connection means may include, but are not limited to, 3G / 4G connections, Wi-Fi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other wireless connection means currently known or developed in the future.
[0027] Step 202: Generate a word vector for each of the at least one input word to obtain a set of word vectors.
[0028] In some embodiments, the execution entity can generate word vectors of the input words in various ways. For example, the execution entity can perform word embedding for each of the at least one input word to obtain a word vector for each input word, and combine the word vectors to obtain the word vectors. For example, the execution entity can obtain the word vectors of the input words by looking up in a predefined word vector table. Here, the word vector table represents the correspondence between the input words and the word vectors.
[0029] Word embedding, as mentioned above, is a general term for language models and learning techniques in Natural Language Processing (NLP). The concept is to embed a high-dimensional space, whose dimensionality is the number of all words, into a continuous vector space with a much lower dimensionality, where each word or phrase is mapped to a vector on the real-number domain. Specifically, a word vector may be a vector where a word or phrase is mapped to real numbers by a word embedding technique. Conceptually, it is about the mathematical embedding of each word from a one-dimensional space into a lower-dimensional continuous vector space.
[0030] Step 203: Generate an input text vector based on the group of word vectors.
[0031] In some embodiments, the execution entity generates the input text vector by addition. For example, the execution entity may add the word vectors in the group of word vectors using a cumulative addition method to generate the input text vector. For example, the execution entity adds the word vectors in the group of word vectors using an average method and then calculates an average value to generate the input text vector.
[0032] Step 204: Generate prediction information for predicting a user's intention based on the input text vector and the user vector.
[0033] In some embodiments, the execution entity obtains a dot multiplication result by dot multiplying the input text vector and the user vector. The execution entity obtains the user vector by performing a lookup based on the user account information in a predefined correspondence table between user account information and user vectors. Here, the user vector may be a vector representing a history of user operations. As an example, the user vector may be a vector representing a history of whether or not a user clicked on a pop-up GIF image. The dot multiplication result is processed using an activation function to obtain a dot multiplication score. Here, the activation function may be a Sigmoid function, which can be used to map data to a (0,1) interval. The score may have multiple representation formats, such as a probability. Here, the dot multiplication of vectors (dot product) is also called an inner product of vectors or a quantity product. The dot multiplication may be a multiplication of two vectors by multiplying the corresponding digits one by one and then adding them, and the result of the dot multiplication is a scalar.
[0034] In some alternative embodiments of some examples, the user vector is obtained based on user history information, which may be history operation information of whether the user clicks on the popup image.
[0035] The execution entity preferably processes the point multiplication result using a normalization method to obtain a point multiplication score. The normalization method can be used to convert the data into a decimal number between (0,1).
[0036] In some embodiments, the actor compares the obtained point multiplication score with a predefined threshold to obtain a comparison result, and generates predictive information for predicting a user's intention based on the comparison result, the predictive information may be a textual representation of the comparison result, and the predefined threshold may be a score value for determining whether the point multiplication score satisfies a requirement.
[0037] As an example, the obtained point multiplication score may be "0.8 points" and the predetermined threshold may be "0.6 points." The execution entity compares the point multiplication score with the predetermined threshold to obtain a comparison result that "the point multiplication score is greater than the predetermined threshold." Then, the execution entity generates prediction information that "the user may need a GIF image popup."
[0038] As an example, in the application scene of FIG. 3, when the user inputs the information "Meow" into the input box 301 after receiving the message, the obtained point multiplication score may be "0.9 points", and the predetermined threshold value may be "0.6 points". Then, the above-mentioned execution entity generates prediction information that "the user may need a GIF image pop-up" based on the comparison result. As a result, the above-mentioned execution entity displays the display image 302. Alternatively, when the user clicks the image 302, the above-mentioned execution entity may transmit the image 302 as transmission information. In the application scene of FIG. 4, when the user inputs the information "I like both" into the input box 301 after receiving the message, the obtained point multiplication score may be "0.3 points". Then, the above-mentioned execution entity can generate prediction information that "the user may not need a GIF image pop-up" based on the comparison result. As a result, the above-mentioned execution entity does not display the image. Alternatively, when the user clicks the send button 303, the above-mentioned execution entity may transmit the information entered by the user into the input box 301.
[0039] In some alternative embodiments of some examples, the method includes: determining whether to pop up an image based on the prediction information for predicting a user's intention; in response to determining to pop up an image, selecting at least one image from an image database as a popup image to obtain a group of popup images; ranking popup images in the group of popup images based on user history information to obtain a sequence of popup images; selecting a predetermined number of popup images from the sequence of popup images; and displaying the predetermined number of popup images in a target interface.
[0040] In some alternative embodiments of some examples, the method of selecting at least one image from an image database as a popup image in response to determining to pop up an image and obtaining a set of popup images includes obtaining a feature vector of each image in the image database in response to determining to pop up an image and obtaining a set of feature vectors, determining a correlation between each feature vector of the set of feature vectors and the input text vector and obtaining a set of correlation degrees, and selecting an image from the image database whose correlation degree is greater than a predetermined threshold as a popup image based on the set of correlation degrees, and obtaining a set of popup images.
[0041] As an example, the prediction information for predicting the user's intention may be "the user may need a popup of a GIF image." The execution entity identifies an image (e.g., a GIF image) to be popup. Then, the execution entity obtains a feature vector of each image in an image database. Here, the image database includes at least one image and a feature vector corresponding to the image. The correlation degree may be a score representing that there is a correlation between the feature vector and the input text vector. The execution entity may calculate the correlation degree between each feature vector and the input text vector by an algorithm, or may obtain the correlation degree between each feature vector and the input text vector using a pre-trained correlation degree model. Then, the execution entity selects images from the image database having a correlation degree greater than a predetermined threshold as popup images, and obtains a group of popup images. The user history information may include whether the user clicked on the popup image, or may include the number of times the clicked popup image was clicked by the user. Thus, the execution entity obtains a popup image sequence by ranking the group of popup images in descending order of the number of clicks. Finally, the execution entity selects a predetermined number of popup images from the obtained popup image sequence to display on the target interface.
[0042] In some alternative embodiments of some examples, the execution subject inputs the input text vector and the user vector into a pre-trained prediction information generation model to obtain prediction information. The execution subject generates the prediction information generation model through the following steps: in a first step, obtain a training sample group including a sample input text vector, a sample user vector, and sample prediction information. in a second step, select a training sample from the training sample group. in a third step, input the sample input text vector and the sample user vector in the training sample of the training sample group into an initial model. in a fourth step, compare the output prediction information with the sample prediction information to obtain an information loss value. in a fifth step, compare the information loss value with a predetermined threshold to obtain a comparison result. in a sixth step, determine whether the training of the initial model is completed based on the comparison result. in a seventh step, determine the initial model as a prediction information generation model in response to the completion of training of the initial model.
[0043] In some alternative embodiments of some examples, a gradient descent optimization method is employed during training of the predictive information generation model to reduce the information loss value.
[0044] In some alternative embodiments of some examples, the execution entity obtains a user vector through the following steps: first, the execution entity obtains account information of a user. Second, the execution entity searches for operation history information of a user from a database based on the account information of the user. The database includes the account information of the user and corresponding operation history information. Third, the execution entity performs word embedding on the operation history record information of the user to obtain an operation history information vector. Fourth, the execution entity determines the obtained operation history information vector as the user vector of the user.
[0045] In some alternative embodiments of some examples, the above-mentioned sample prediction information may be sample information for indicating whether the user clicked on the popup image. The sample prediction information may be, for example, "0" or "1". Here, when the sample prediction information is "0", it may indicate that "the user did not click on the popup image", and when the sample prediction information is "1", it may indicate that "the user clicked on the popup image".
[0046] The information loss value may be a value obtained by inputting the output prediction information and the corresponding sample prediction information as parameters into the executed loss function. Here, the loss function (e.g., squared loss function, exponential loss function, etc.) is typically for evaluating the degree of discrepancy between the model's prediction value (e.g., the sample feature corresponding to the sample frame) and the true value (e.g., the sample feature corresponding to each of the multiple sample frames obtained by the above step). This is a non-negative real-valued function. In general, the smaller the loss function, the more robust the model. The loss function may be set according to actual demand. As an example, the loss function may be a cross entropy loss function.
[0047] Here, the initial model may be an untrained model, or a model that has not reached a preset condition after training. The initial model may be a model having a deep neural network structure. The pre-trained feature extraction model may be a pre-trained neural network model for feature extraction. The neural network model may have various existing neural network structures. For example, the neural network structure may be a Convolutional Neural Network (CNN). The storage location of the initial model is not limited in the present disclosure.
[0048] In some alternative embodiments of some examples, the method further includes, in response to identifying that training of the initial model is not complete, adjusting relevant parameters in the initial model and reselecting samples from the set of training samples and continuing the training step using the adjusted initial model as the initial model.
[0049] In some alternative embodiments of some examples, the training sample set is updated as follows: obtain a user-related information set, the user-related information set including an input text vector, a user vector, and prediction information that is not prediction information obtained through prediction by the prediction information generation model; perform data augmentation on the user-related information set based on a predetermined ratio to obtain an augmented user-related information set; and add the augmented user-related information set to the training sample set to generate an updated training sample set.
[0050] As an example, the data augmentation of the user-related information set includes repeatedly sampling user-related information in the user-related information set based on a predetermined ratio to obtain an augmented user-related information set.
[0051] In some alternative embodiments of some examples, in the actual execution process of the prediction information generation model, when the user-related information in the user-related information group is passed through the prediction information generation model to determine the user's intention, the user-related information obtained in the process of accumulating new data is mixed with the result of model interference. As a result, the generated prediction information becomes inaccurate. This affects the user's experience. Therefore, in the actual execution process, a certain percentage (e.g., 90%) of the user-related information is passed through the prediction information generation model to determine the user's intention. For the remaining (e.g., the remaining 10%) of the user-related information, the amount of data is expanded to the full volume ratio by repeating sampling. Furthermore, the next training is performed on the prediction information generation model using these data. The data used in this training does not contain the result of model interference, which contributes to improving the accuracy of the prediction information generation model. Such a method is called data bias reduction.
[0052] The execution body may update the training sample group of the prediction information generation model at a predetermined period.
[0053] Any of the above-mentioned various embodiments of the present disclosure have the following beneficial effects: An input text vector is generated by generating a word vector of an input word. It is possible to avoid a situation where an error is likely to occur when the input text vector is directly generated. Then, prediction information for predicting a user's request intention is generated based on the input text vector and the user vector. As a result, since the user vector is obtained based on user history information, the user vector can reflect the user's past behavior. As a result, the generated prediction information also better matches the user's needs. As a result, a method for determining a user's request intention based on the user vector and the input text vector is provided, which contributes to reducing popups of unnecessary information. It is possible to avoid causing inconvenience to the user and improve the user experience.
[0054] With continued reference to Figure 5, Figure 5 shows a flow chart 500 of another embodiment of a method for generating forecast information according to the present disclosure. The method for generating forecast information includes the following steps: In step 501, at least one input word is obtained.
[0055] In step 502, a word vector is generated for each of the at least one input word to obtain a set of word vectors.
[0056] In some embodiments, the specific implementation and effects of steps 501-502 may refer to steps 201-202 in the corresponding embodiments of FIG. 2, and will not be further described here.
[0057] In step 503, the user vector is obtained.
[0058] In some embodiments, the execution entity can obtain the user vector in various ways. For example, the execution entity can obtain the user vector from a local database. Also, for example, the execution entity can obtain the user vector by connecting to another electronic device through a wired or wireless connection.
[0059] In step 504, the above user vector is input into the pre-trained fully connected network to obtain a new user vector.
[0060] In some embodiments, the above-mentioned execution entity can input the above-mentioned user vector into a pre-trained fully-connected network to obtain a new user vector, where the above-mentioned pre-trained fully-connected network has a non-linear ability and can extract more user features.
[0061] In step 505, each word vector in the set of word vectors is point-multiplied with the new user vector to generate a score to obtain a set of scores.
[0062] In some embodiments, the execution entity point-multiplies each of the word vectors in the group of word vectors by the new user vector. The obtained point-multiplication results are processed using a normalization method to obtain scores for the point-multiplication results, and the scores are combined to obtain a group of scores, where the scores are used to represent the weights of the word vectors. The normalization method is used to convert the data into decimals between [0,1].
[0063] In step 506, an input text vector is generated based on the word vectors and the scores.
[0064] In some embodiments, the execution entity first determines the score in the score set corresponding to each of the word vectors in the word vector set as a weight of the word vector, then multiplies each of the word vectors in the word vector set by the corresponding weight to obtain a multiplication result, and then adds each of the obtained multiplication results to obtain an input text vector.
[0065] For example, the word vector set is "[A(1,2,3),B(6,9,8),C(3,4,7)]" and the score set is "[A-0.4,B-0.8,C-0.1]". The execution entity multiplies each word vector in the word vector set by its corresponding score (weight), and the multiplication results are "(1,2,3)*0.4", "(6,9,8)*0.8" and "(3,4,7)*0.1", respectively. The execution entity adds the obtained multiplication results to obtain the input text vector "[0.4(1,2,3)+0.8(6,9,8)+0.1(3,4,7)]".
[0066] In step 507, the input text vector and the new user vector are dot-multiplied to obtain a dot-multiplied score.
[0067] In some embodiments, the execution entity point-multiplies the input text vector and the new user vector to obtain a point multiplication result, and further processes the point multiplication result through a normalization method to obtain the point multiplication score.
[0068] In step 508, predictive information is generated for predicting a user's intention based on the obtained point multiplication scores.
[0069] In some embodiments, the specific implementation and effects of step 508 may refer to step 204 in the embodiments corresponding to FIG. 2, and will be omitted here.
[0070] As an example, in the application scene of FIG. 6, the computing device 101 obtains an input word 602 and an input word 603. Here, the input word 602 and the input word 603 may be obtained by word segmentation of the input text 601. Of course, the above-mentioned word segmentation may be performed on the input text 601 by another computing device, and then the computing device may directly obtain the word segmentation result and input the input word 602 and the input word 603. Then, the computing device 101 generates a word vector 604 of the input word 602 and a word vector 605 of the input word 603. As an example, the computing device 101 obtains a user vector 607. Then, the computing device 101 inputs the user vector 607 into a pre-trained fully connected network 608 to obtain a new user vector 609. Next, the computing device 101 performs point multiplication of the word vector 604 and the word vector 605 with the above-mentioned new user vector 609 to generate a score, and obtains a (point multiplication) score group 610. The computing device 101 then generates an input text vector 611 based on the word vector 604, the word vector 605, and the above (point multiplication) score set 610. The computing device 101 then point multiplies the input text vector 611 with the above new user vector 609 to obtain a point multiplication score 612. Finally, the computing device 101 generates prediction information 613 from the obtained point multiplication score 612.
[0071] It should be understood that the number of computing devices in Figure 6 is merely approximate, and any number of computing devices may be included according to actual needs.
[0072] One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: First, a word vector of an input word is generated to obtain a group of word vectors. A new optimized user vector is obtained by passing the user vector through a fully connected network. Next, each word vector in the group of word vectors is dot-multiplied with the new user vector to obtain a group of scores, and an input text vector is generated. Furthermore, a dot-multiplication score is obtained by dot-multiplying the input text vector with the new user vector. The accuracy of the dot-multiplication score can be improved based on two dot-multiplications with the new user vector. Finally, prediction information is generated based on the dot-multiplication score. This provides a method for predicting a user's request intention in advance based on the user vector and the dot-multiplication of the user vector and the input text vector, which contributes to reducing the popup of unnecessary information. This can avoid inconvenience to the user and contribute to improving the user experience.
[0073] Continuing to refer to FIG. 7, as an implementation of the methods in the above figures, the present disclosure provides several embodiments of an apparatus for generating predictive information corresponding to the embodiment of the method described in FIG. 2, which may be specifically applied to various electronic devices.
[0074] As shown in FIG. 7, an apparatus 700 for generating prediction information in some embodiments includes an acquisition unit 701, a word vector generation unit 702, an input text vector generation unit 703, and a generation unit 704. Here, the acquisition unit 701 acquires at least one input word obtained by word-segmenting a target input text. The word vector generation unit 702 generates a word vector for each input word of the at least one input word to obtain a word vector group. The input text vector generation unit 703 generates an input text vector based on the word vector group. The generation unit 704 generates prediction information for predicting a user's intention based on the input text vector and the user vector.
[0075] In some alternative embodiments of some examples, the input text vector generation unit 703 of the apparatus 700 for generating prediction information is further configured to sum word vectors of the group of word vectors to obtain the input text vector.
[0076] In some alternative embodiments of some examples, the input text vector generation unit 703 of the apparatus 700 for generating prediction information is further configured to obtain a user vector, and obtain the input text vector based on the group of word vectors, the user vector, and an attention mechanism network.
[0077] In some alternative embodiments of some examples, the input text vector generating unit 703 of the apparatus for generating prediction information 700 is configured to input the user vector into a pre-trained fully connected network to obtain a new user vector, and input the word vectors and the new user vector into the attention mechanism network to obtain the input text vector.
[0078] In some alternative embodiments of some examples, the input text vector generating unit 703 of the apparatus 700 for generating prediction information is configured to point-multiply each word vector in the group of word vectors with the user vector to generate a score, and obtain the group of scores. The input text vector is obtained based on the group of word vectors and the group of scores.
[0079] In some embodiments of some examples, the generation unit 704 of the apparatus 700 for generating prediction information is further configured to point-multiply the input text vector and the new user vector to obtain a point multiplication score, and generate prediction information based on the point multiplication score.
[0080] In some alternative embodiments of some examples, the generation unit 703 of the apparatus 700 for generating prediction information is further configured to input the input text vector and the user vector into a prediction information generation model trained by a pre-trained sample set to obtain prediction information.
[0081] In some alternative embodiments of some examples, the training samples in the trained sample group include a sample input text vector, a sample user vector, and sample prediction information, and the prediction information generation model is obtained by training the sample input text vector and the sample user vector as inputs and the sample prediction information as a desired output.
[0082] In some alternative embodiments of some examples, the trained sample set is updated by the following steps: obtain a user-related information set; the user-related information in the user-related information set includes an input text vector, a user vector, and prediction information that is not obtained by prediction using the prediction information generation model; perform data augmentation on the user-related information set based on a predetermined ratio to obtain an augmented user-related information set; and add the augmented user-related information set to the trained sample set to generate an updated training sample set.
[0083] In some alternative embodiments of some examples, the user history information includes history operation record information of whether the user clicked on the popup image.
[0084] In some alternative embodiments of some examples, based on the prediction information for predicting a user's intention, determine whether to pop up an image. In response to determining to pop up an image, select at least one image from an image database as a popup image to obtain a group of popup images. Based on the user history operation information, rank the popup images in the group of popup images to obtain a sequence of popup images. Select a predetermined number of popup images from the sequence of popup images. Display the predetermined number of popup images in a target interface.
[0085] In some alternative embodiments of some examples, the above-mentioned step of selecting at least one image from an image database as a popup image in response to determining to pop up an image includes the following steps: in response to determining to pop up an image, obtaining a feature vector for each image in the image database to obtain a group of feature vectors, identifying a relevance between each feature vector in the group of feature vectors and the input text vector to obtain a group of relevance degrees, and based on the group of relevance degrees, selecting an image from the image database whose relevance degree is greater than a predetermined threshold as a popup image, to obtain a group of popup images.
[0086] It should be noted that each unit described for the apparatus 700 corresponds to each step of the method described with reference to Fig. 2. Therefore, the operations, features, and beneficial effects resulting therefrom described above with respect to the method also apply to the apparatus 700 and its units as well, and are omitted here.
[0087] 8 shows a structural schematic diagram of an electronic device (e.g., the computing device of FIG. 1) 800 suitable for implementing some embodiments of the present disclosure. The server shown in FIG. 8 is merely an example and does not pose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
[0088] 8, the electronic device 800 includes a processing device (e.g., a central processor, a graphics processor, etc.) 801 that can perform various appropriate operations and processes according to a program stored in a read only memory (ROM) 802 or loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data necessary for the operation of the electronic device 800. The processing device 801, the ROM 802, and the RAM 803 are connected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0089] In general, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 allows the electronic device 800 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 8 illustrates an electronic device 800 having various devices, it should be understood that it is not necessary to implement or include all of the devices shown. Instead, more or less means may be implemented or included. Each block illustrated in FIG. 8 may represent one device or may represent multiple devices as needed.
[0090] In particular, according to some embodiments of the present disclosure, the processes described with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product, the product including a computer program carried on a computer-readable medium, the computer program including program code for performing the method shown in the flowchart. In some such embodiments, the computer program may be downloaded and installed from a network via a communication device 809, or may be installed from a storage device 808, or may be installed from a ROM 802. When the computer program is executed by the processing device 801, the above functions defined in the method of some embodiments of the present disclosure are performed.
[0091] It should be noted that the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to, the following: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical memory device, a magnetic memory device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device. Meanwhile, in some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband as part of a carrier carrying computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted over any suitable medium, including, but not limited to, wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
[0092] In some embodiments, the clients and servers may communicate utilizing any now known or later developed network protocol, such as HyperText Transfer Protocol (HTTP), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), a network of networks (e.g., the Internet), an end-to-end network (e.g., an ad-hoc end-to-end network), and any now known or later developed networks.
[0093] The computer-readable medium may be included in the device or may be a separate entity not incorporated in the electronic device. The computer-readable medium includes one or more programs, which, when executed by the electronic device, cause the electronic device to: obtain at least one input word obtained by word segmenting a target input text; generate a word vector for each of the at least one input word to obtain a group of word vectors; generate an input text vector based on the group of word vectors; and generate prediction information for predicting a user's intention based on the input text vector and a user vector.
[0094] Computer program code for carrying out operations of some embodiments of the present disclosure can be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and traditional procedural programming languages such as the "C" language, or a combination thereof. The program code can run entirely on the user computer, partially on the user computer, as a separate software package, partially on the user computer, partially on a remote computer, or entirely on a remote computer or server. When a remote computer is involved, the remote computer can be connected to the user computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).
[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code that includes one or more executable instructions for implementing a given logical function. It should also be noted that in some alternative implementations, the functions shown in the blocks may occur in a different order than that shown in the drawings. For example, two blocks depicted in succession may actually be executed substantially in parallel, or may be executed in a reverse order depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs a given function or operation, or may be implemented in a combination of dedicated hardware and computer instructions.
[0096] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may be included in a processor, and may be described as a processor including an acquisition unit, a word vector generation unit, an input text vector generation unit, and a generation unit. Here, the names of these units may not be limiting, and for example, the acquisition unit may be described as a "unit for acquiring at least one input word."
[0097] The functions described above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0098] According to one or more embodiments of the present disclosure, a method for generating a prediction is provided, the method including: obtaining at least one input word obtained by word segmenting a target input text; generating a word vector for each of the at least one input word to obtain a group of word vectors; generating an input text vector based on the group of word vectors; and generating prediction information for predicting a user's intention based on the input text vector and a user vector.
[0099] According to one or more embodiments of the present disclosure, generating an input text vector based on the group of word vectors includes summing word vectors in the group of word vectors to obtain the input text vector.
[0100] According to one or more embodiments of the present disclosure, generating an input text vector based on the group of word vectors includes obtaining a user vector; and obtaining the input text vector based on the group of word vectors, the user vector, and an attention mechanism network.
[0101] According to one or more embodiments of the present disclosure, obtaining the input text vector based on the group of word vectors, the user vector, and an attention mechanism network includes: inputting the user vector into a pre-trained fully connected network to obtain a new user vector; and inputting the group of word vectors together with the new user vector into the attention mechanism network to obtain the input text vector.
[0102] According to one or more embodiments of the present disclosure, inputting the group of word vectors and the new user vector into the attention mechanism network to obtain the input text vector includes: point-multiplying each word vector in the group of word vectors with the user vector to generate a score to obtain a group of scores; and generating the input text vector based on the group of word vectors and the group of scores.
[0103] According to one or more embodiments of the present disclosure, generating prediction information based on the input text vector and the user vector includes: point-multiplying the input text vector and the new user vector to obtain a point multiplication score; and generating prediction information based on the point multiplication score.
[0104] According to one or more embodiments of the present disclosure, generating prediction information based on the input text vector and a user vector includes inputting the input text vector and the user vector into a prediction information generation model trained by a pre-trained sample group to obtain prediction information.
[0105] According to one or more embodiments of the present disclosure, the training samples in the trained sample group include a sample input text vector, a sample user vector, and sample prediction information, and the prediction information generation model is obtained by training using the sample input text vector and the sample user vector as inputs and the sample prediction information as a desired output.
[0106] According to one or more embodiments of the present disclosure, the trained sample set is updated by the steps of obtaining a user-related information set including an input text vector, a user vector, and prediction information that is not obtained by prediction by the prediction information generation model, augmenting the user-related information set based on a predetermined ratio to obtain an augmented user-related information set, and adding the augmented user-related information set to a training sample set to generate an updated training sample set.
[0107] According to one or more embodiments of the present disclosure, the method of claim 1, wherein the user history information includes history operation information of whether a user clicks on a popup image.
[0108] According to one or more embodiments of the present disclosure, the method further includes: determining whether to pop up an image based on the prediction information for predicting a user's intention; in response to determining to pop up an image, selecting at least one image from an image database as a popup image to obtain a group of popup images; ranking popup images in the group of popup images based on the user historical operation information to obtain a popup image sequence; selecting a predetermined number of popup images from the popup image sequence; and displaying the predetermined number of popup images on a target interface.
[0109] According to one or more embodiments of the present disclosure, the step of selecting at least one image from the image database as a popup image and obtaining a group of popup images in response to a determination to pop up an image includes: obtaining a feature vector for each image in the image database in response to a determination to pop up an image and obtaining a group of feature vectors; determining a relevance between each feature vector in the group of feature vectors and the input text vector and obtaining a group of relevance levels; and selecting, based on the group of relevance levels, an image from the image database whose relevance level is greater than a predetermined threshold as a popup image and obtaining the group of popup images.
[0110] According to one or more embodiments of the present disclosure, an apparatus for generating prediction information is provided, the apparatus including: an acquisition unit for acquiring at least one input word obtained by word segmenting a target input text, a word vector generation unit for generating a word vector for each of the at least one input word to obtain a word vector group, an input text vector generation unit for generating an input text vector based on the word vector group, and a generation unit for generating prediction information for predicting a user's intention based on the input text vector and a user vector.
[0111] According to one or more embodiments of the present disclosure, an electronic device is provided, the electronic device including one or more processors and a storage device storing one or more programs, the one or more processors implementing a method according to any of the above embodiments when the one or more programs are executed by the one or more processors.
[0112] According to one or more embodiments of the present disclosure, a computer readable medium is provided that stores a computer program which, when executed by a processor, implements the method according to any of the above embodiments.
[0113] The above description is merely a description of some preferred embodiments of the present disclosure and the technical principles applied. Those skilled in the art will understand that the scope of the invention according to the embodiments of the present disclosure is not limited to the invention consisting of a specific combination of the above constituent elements, but also covers other inventions consisting of any combination of the above constituent elements or their equivalent features without departing from the above inventive idea, for example, inventions formed by mutually replacing the above features with technical features having similar functions (but not limited to) disclosed in the embodiments of the present disclosure.
Claims
1. A method for generating predictive information, executed by a computing device, comprising: Obtaining at least one input word obtained by word segmenting a target input text; generating a word vector for each of the at least one input word to obtain a set of word vectors; generating an input text vector based on the set of word vectors; generating prediction information for predicting a user's intention based on the input text vector and a user vector obtained from user history information; Including, The step of generating an input text vector based on the group of word vectors includes: Obtaining a user vector; inputting the user vector into a pre-trained fully connected network to obtain a new user vector; inputting the word vectors and the new user vector into an attention mechanism network to obtain the input text vector; Including, The above-mentioned inputting the word vectors and the new user vector into the attention mechanism network to obtain the input text vector includes: point-multiplying each word vector in the set of word vectors with a new user vector to generate a score to obtain a set of scores; generating the input text vector based on the set of word vectors and the set of scores; Including, The step of generating prediction information based on the input text vector and the user vector includes: dot-multiplying the input text vector and the new user vector to obtain a dot-multiply score; generating the prediction information based on the point multiplication score; 23. A method for generating predictive information, comprising:
2. The step of generating an input text vector based on the group of word vectors includes: summing the word vectors in the set of word vectors to obtain the input text vector 2. The method of claim 1, comprising:
3. The step of generating prediction information based on the input text vector and the user vector includes: Inputting the input text vector and the user vector into a prediction information generation model trained by a pre-trained sample group to obtain the prediction information. The method of claim 1 or 2, comprising:
4. The training samples in the trained sample set include a sample input text vector, a sample user vector, and a sample prediction information; the prediction information generation model is obtained by training the model using the sample input text vectors and the sample user vectors as inputs and the sample prediction information as a desired output; The method according to claim 3.
5. The trained sample set includes: obtaining a group of user-related information including an input text vector, a user vector, and prediction information that is not obtained by prediction using the prediction information generation model; augmenting the set of user-related information based on a predetermined ratio to obtain an augmented set of user-related information; adding the augmented user-related information set to the training sample set to generate an updated training sample set; Updated by The method according to claim 4.
6. The user history information includes history operation information on whether the user clicked on a pop-up image. The method of claim 1.
7. determining whether to pop up an image based on the predictive information for predicting a user's intent; in response to determining to pop up the image, selecting at least one image from an image database as a pop-up image to obtain a set of pop-up images; ranking the popup images in the set of popup images based on the user history information to obtain a popup image sequence; selecting a predetermined number of popup images from the sequence of popup images; displaying the predetermined number of pop-up images on a target interface; The method of claim 6, comprising:
8. In response to determining to pop up the image, selecting at least one image from the image database as a pop-up image to obtain the set of pop-up images, responsive to determining to pop up the image, obtaining a feature vector for each image in the image database to obtain a set of feature vectors; Identifying a degree of association between each feature vector of the group of feature vectors and the input text vector to obtain a group of degrees of association; selecting, as a pop-up image, an image having a relevance degree greater than a predetermined threshold from the image database based on the relevance degree group, thereby acquiring the pop-up image group; The method of claim 7, comprising:
9. an acquisition unit for acquiring at least one input word obtained by word segmentation of a target input text; a word vector generating unit for generating a word vector for each of the at least one input word to obtain a set of word vectors; an input text vector generation unit for generating an input text vector based on the set of word vectors; a generating unit for generating prediction information for predicting a user's intention based on the input text vector and a user vector obtained from user history information; Including, The input text vector generation unit: Get the user vector, inputting the user vector into a pre-trained fully connected network to obtain a new user vector; The word vectors and the new user vector are input into an attention mechanism network to obtain the input text vector. It is configured as follows: The above-mentioned inputting the word vectors and the new user vector into the attention mechanism network to obtain the input text vector includes: point-multiplying each word vector in the set of word vectors with a new user vector to generate a score to obtain a set of scores; generating the input text vector based on the set of word vectors and the set of scores; Including, The generating unit comprises: dot-multiplying the input text vector and the new user vector to obtain a dot-multiply score; Generating the predictive information based on the point multiplication scores 23. An apparatus for generating predictive information, configured to:
10. one or more processors; a storage device storing one or more programs; said one or more programs, when executed by said one or more processors, causing said one or more processors to perform a method according to any one of claims 1 to 8; electronic equipment.
11. A computer readable medium storing a computer program which, when executed by a processor, implements the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Image retrieval device
JP2010218181A
Image retrieval device and image retrieval method
JP2011070412A
Information processing device, information processing method and program
JP2018088051A
Systems and methods for suggesting emojis
JP2019504413A
Knowledge search device, method for searching for knowledge, and knowledge search program
JP2020067864A
