A method, device, electronic equipment and storage medium for predicting context information
By receiving the target profile features and contextual information of the target object, and using the contextual prediction model to dynamically adjust the contextual information prediction results, the problem of low prediction accuracy and efficiency in existing technologies is solved, and personalized contextual information matching and efficient input are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-12-03
- Publication Date
- 2026-05-22
AI Technical Summary
When predicting context information, existing technologies cannot meet the flexible and diverse needs of different target objects with a unified set of context information, resulting in poor prediction accuracy and low input efficiency.
By receiving the target profile features of the target object, combining them with the preceding information, and using a trained following information prediction model, the prediction results of the following information are dynamically adjusted to meet personalized needs.
This improves the accuracy and input efficiency of the following information prediction, ensuring that the prediction results match the profile features of the target object and meet personalized needs.
Smart Images

Figure CN116226320B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and storage medium for predicting subsequent information. Background Technology
[0002] When the target audience uses an input method to edit text, chat, or search for content through a search engine, the writing assistance tool usually predicts the various subsequent information that the target audience may input based on the preceding information that the target audience has already entered, and displays the predicted subsequent information so that the target audience can directly select it, thereby reducing the input cost for the target audience and improving input efficiency and experience.
[0003] In related technologies, when predicting context information, it is usually necessary to statistically analyze the preceding and following information of all target objects input within a historical time period, and then determine the set of context information associated with each preceding information.
[0004] However, when the above scheme is adopted, the predicted set of context information is the same when different target objects input the same context information. The unified set of context information cannot meet the flexible and diverse usage needs of different target objects. The target object needs to search multiple times in the predicted set of context information to select the context information to be input, which reduces the accuracy of the context information provided and also affects the input efficiency of the context information for the target object. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and storage medium for predicting contextual information, so as to improve the accuracy of predicting contextual information and improve the efficiency of inputting contextual information for target objects.
[0006] The specific technical solutions provided in this application are as follows:
[0007] A method for predicting subsequent information includes:
[0008] When the above information is received from the target object, the target profile features corresponding to the target object are obtained, and the corresponding target information group is obtained based on the above information and the target profile features.
[0009] The target information group is input into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group, and their respective candidate conditional probabilities.
[0010] Based on the at least one candidate context information and its corresponding candidate conditional probability, at least one target context information of the preceding context information is obtained.
[0011] An apparatus for predicting contextual information, comprising:
[0012] The first acquisition module is used to obtain the target profile features corresponding to the target object when it receives the above information input by the target object, and obtain the corresponding target information group based on the above information and the target profile features;
[0013] The second acquisition module is used to input the target information group into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability.
[0014] The third obtaining module is used to obtain at least one target context information of the preceding context information based on the at least one candidate context information and their respective candidate conditional probabilities.
[0015] Optionally, when obtaining the target profile features corresponding to the target object, the first obtaining module is specifically used for:
[0016] Based on the historical input records associated with the target object, obtain the target profile features corresponding to the target object; or,
[0017] Based on the historical click records associated with the target object, the target profile features corresponding to the target object are obtained.
[0018] Optionally, when obtaining the target profile features corresponding to the target object based on the historical input records associated with the target object, the first obtaining module is specifically used for:
[0019] Based on the identification information of the target object, obtain the first occurrence count of each attribute dimension phrase in the historical input records associated with the target object;
[0020] Select at least one attribute-dimensional phrase whose first occurrence count reaches a preset threshold for the first input information;
[0021] Based on the selected at least one attribute dimension phrase and the mapping relationship between each attribute dimension phrase and the attribute dimension label, obtain the attribute dimension label corresponding to each of the selected at least one attribute dimension phrase.
[0022] Based on at least one attribute dimension label, obtain the target profile features corresponding to the target object.
[0023] Optionally, when obtaining the target profile features corresponding to the target object based on the historical click records associated with the target object, the first obtaining module is specifically used for:
[0024] Based on the identification information of the target object, obtain the second occurrence count of each of the at least one historical click information clicked by the target object from the candidate click information list in the historical click records associated with the target object;
[0025] Select at least one historical click information whose second occurrence count reaches the preset threshold for the first click information count;
[0026] Based on the selected historical click information and the mapping relationship between each click information and the attribute dimension label, obtain the attribute dimension label corresponding to each of the selected historical click information.
[0027] Based on at least one attribute dimension label, the target profile features corresponding to the target object are obtained.
[0028] Optionally, when obtaining the target profile features corresponding to the target object, the first obtaining module is specifically used for:
[0029] Based on the historical records associated with the target object, and combined with collaborative filtering, the similarity between the historical records and the candidate records in each candidate cluster is determined, and clusters that meet the similarity conditions are selected from each candidate cluster. Each candidate cluster is obtained by clustering each historical object based on the similarity between the candidate records associated with each historical object.
[0030] Based on the cluster labels corresponding to the selected clusters, the target profile features corresponding to the target object are obtained.
[0031] Optionally, when obtaining the target profile features corresponding to the target object based on at least one attribute dimension label, the first obtaining module is specifically used for:
[0032] Convert at least one attribute dimension label into a feature string;
[0033] Based on at least one feature string, obtain the target profile features corresponding to the target object.
[0034] Optionally, when obtaining the target profile features corresponding to the target object based on at least one feature string, the first obtaining module is specifically used for:
[0035] Based on at least one feature string, select at least one set of feature strings that meet a set quantity threshold;
[0036] Based on at least one set of feature strings, obtain the target profile features corresponding to the target object.
[0037] Optionally, when the target information set is input into the trained context prediction model, the second acquisition module is specifically used for:
[0038] Obtain an attribute dimension corresponding to the target profile feature, and select the trained context prediction model corresponding to the attribute dimension from the various candidate context prediction models that have been trained.
[0039] Input the target information group into the trained context prediction model.
[0040] Optionally, when obtaining at least one target context information of the preceding context based on at least one candidate context information and its corresponding candidate conditional probability, the second obtaining module is specifically used for:
[0041] From at least one candidate conditional probability, select at least one target conditional probability that satisfies the probability condition;
[0042] The candidate context information corresponding to at least one target conditional probability is used as at least one target context information of the context information.
[0043] Optionally, when inputting the target information group into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability, the second obtaining module is specifically used for:
[0044] Based on the trained context prediction model, obtain sample information groups that match the target information group;
[0045] At least one sample context information corresponding to the sample information group and its corresponding candidate conditional probability are taken as at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability.
[0046] Optionally, when training the prediction model below, the following may also be included:
[0047] The fourth acquisition module is used to acquire a set of sample information groups, wherein each sample information group includes: the sample profile features corresponding to the sample object, and the sample context information of a sample input and a selected sample context information within a set historical time period;
[0048] The first determination module is used to determine the context information of each sample information group and the number of times it appears in the historical association with the corresponding sample information group.
[0049] The second determining module is used to determine the candidate conditional probability of the sample context information in each sample information group based on the number of occurrences of each historical association and to store the association.
[0050] Optionally, when determining the candidate conditional probability of the context information of each sample in each sample information group based on the obtained occurrence counts of each historical association, the second determining module is specifically used for:
[0051] Determine the total number of times sample information groups with identical contextual information and sample profile features appear in the sample information group set;
[0052] Based on the ratio of the number of occurrences of each historical association to the total number of occurrences, the candidate conditional probabilities corresponding to the context information of each sample information group are determined.
[0053] Optionally, when obtaining the sample profile features corresponding to each sample object, the fourth obtaining module is also used for:
[0054] For each sample object, obtain the sample attribute dimension label corresponding to at least one attribute dimension; wherein, the attribute dimension includes at least one of the following: gender dimension, age dimension, personality dimension, interest dimension, and region dimension;
[0055] Convert at least one sample attribute dimension label into the corresponding sample feature string;
[0056] Based on at least one sample feature string, obtain the sample profile features corresponding to the sample object.
[0057] Optionally, when obtaining sample profile features corresponding to a sample object based on at least one sample feature string, the fourth obtaining module is specifically used for:
[0058] Based on at least one sample feature string, select a set of at least one sample feature string that meets a set quantity threshold;
[0059] Based on at least one set of sample feature strings, obtain the sample profile features corresponding to the sample object.
[0060] Optionally, when selecting at least one target conditional probability that satisfies the probability condition from at least one candidate conditional probability, the third obtaining module is specifically used for:
[0061] From at least one candidate conditional probability, select at least one target conditional probability that reaches the probability threshold; or,
[0062] From at least one candidate conditional probability, select at least one target conditional probability of a predetermined number in descending order of candidate conditional probabilities.
[0063] An electronic device provided in this application includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of any of the above-described methods for predicting the following information.
[0064] This application provides a computer-readable storage medium including program code. When the program code is run on an electronic device, the program code is used to cause the electronic device to perform the steps of any of the above-described methods for predicting the following information.
[0065] This application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any of the above-described methods for predicting context information.
[0066] The beneficial effects of this application are as follows:
[0067] This application provides a method, apparatus, electronic device, and storage medium for predicting context information. In this application embodiment, upon receiving context information input from a target object, target profile features corresponding to the target object are obtained, and a corresponding target information group is obtained based on the context information and target profile features. The target information group is input into a trained context prediction model to obtain at least one candidate context information corresponding to the target information group, and its respective candidate conditional probability. Based on at least one candidate context information and its respective candidate conditional probability, at least one target context information of the context information is obtained.
[0068] In this embodiment, the target profile features of the target object and the input context information are considered as a target information group. Target objects with different target profile features belong to different target information groups. For different target information groups, the at least one target context information predicted by the trained context prediction model is flexible and varies. Therefore, this application can specifically determine at least one target context information that target objects with different target profile features may input, even if the input context information is the same. This can meet the flexible and diverse usage needs of different target objects, avoid target context information that is obviously mismatched with the target object's target profile features, and improve the accuracy and relevance of the predicted context information. Furthermore, based on the at least one target context information determined by this application, the target object can quickly select the context information to be input, thereby improving the efficiency of the target object in inputting context information.
[0069] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0070] Figure 1 This is a schematic diagram illustrating the application scenario in the embodiments of this application;
[0071] Figure 2 This is a schematic diagram illustrating the training process of the prediction model described below in an embodiment of this application;
[0072] Figure 3 This is a schematic diagram illustrating sample portrait features in an embodiment of this application.
[0073] Figure 4 This is a schematic diagram illustrating an example of a sample information group set in an embodiment of this application;
[0074] Figure 5 This is a schematic diagram illustrating an example of the historical association between the sample context information and the sample information group in this embodiment of the application.
[0075] Figure 6 This is a schematic diagram illustrating an example of obtaining the candidate conditional probability corresponding to the context information of a sample in an embodiment of this application.
[0076] Figure 7 This is a schematic diagram illustrating the input and output information of the prediction model described below in an embodiment of this application.
[0077] Figure 8 This is a schematic diagram illustrating the correspondence between sample attribute dimension labels and sample feature strings in an embodiment of this application.
[0078] Figure 9 This is a schematic diagram illustrating another example of obtaining a set of sample feature strings in an embodiment of this application;
[0079] Figure 10 This is a flowchart illustrating a method for predicting context information in an embodiment of this application.
[0080] Figure 11 This is an example diagram illustrating the acquisition of sample context information and corresponding candidate conditional probabilities in an embodiment of this application.
[0081] Figure 12 This is a schematic diagram of the process for obtaining the target profile features corresponding to the target object in an embodiment of this application;
[0082] Figure 13 This is a schematic diagram illustrating an example of obtaining target profile features in an embodiment of this application;
[0083] Figure 14 This is a schematic diagram of the process for obtaining the target profile features corresponding to the target object in an embodiment of this application;
[0084] Figure 15 This is a schematic diagram illustrating an example of obtaining target profile features in an embodiment of this application;
[0085] Figure 16 This is a schematic diagram illustrating an example of obtaining a set of feature strings in an embodiment of this application;
[0086] Figure 17 This is a schematic diagram of the process for obtaining the target profile features corresponding to the target object in an embodiment of this application;
[0087] Figure 18 This is a schematic diagram of the process for obtaining the target profile features corresponding to the target object in an embodiment of this application;
[0088] Figure 19 This is a schematic diagram illustrating an example of obtaining target input information clusters in an embodiment of this application;
[0089] Figure 20 This is a schematic diagram illustrating another example of obtaining target input information clusters in the embodiments of this application;
[0090] Figure 21 This is a schematic diagram of the process for obtaining the target profile features corresponding to the target object in an embodiment of this application;
[0091] Figure 22 This is a schematic diagram illustrating an example of obtaining target click information clusters in an embodiment of this application;
[0092] Figure 23 This is a schematic diagram illustrating another cluster of target click information obtained in an embodiment of this application;
[0093] Figure 24 This is a schematic diagram illustrating an example of obtaining target profile features during the implementation of this application.
[0094] Figure 25 This is a schematic diagram illustrating an example of the prediction model selected in the implementation of this application;
[0095] Figure 26 This is a schematic diagram illustrating the overall process of predicting the following information in the embodiments of this application;
[0096] Figure 27 This is a schematic diagram of the structure of a device for predicting context information in an embodiment of this application;
[0097] Figure 28 This is a schematic diagram of the structure of a training device for a text prediction model in an embodiment of this application;
[0098] Figure 29 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application;
[0099] Figure 30 This is a schematic diagram of the structure of a computing device in an embodiment of this application. Detailed Implementation
[0100] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0101] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0102] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0103] The preceding information refers to the input content that the target has already completed, such as the content in the input box or the content that has been sent in a WeChat chat; or the content entered into the search box when searching in a search engine. For example, the preceding information could be "Hello" or "I want to buy lipstick".
[0104] The following information refers to content provided based on the preceding information that can be directly selected by the target audience. This is not limited to text content at the word or sentence level, but can also include other forms of content such as emoticons. For example, the following information can be words, sentences, emoticons, animations, or any combination of the above. For example, the following information could be "I am," "classmate," "Welcome," etc., or it could be a static image emoticon or a dynamic emoticon.
[0105] Target audience: refers to the user who is currently entering the above information.
[0106] Historical users: refers to users who entered the above information within a historical time period.
[0107] User profile features refer to a tagged user model abstracted from at least one of the following dimensions: gender, age, personality, interests, and location. For example, user profile features could be "male, 18 years old, likes playing basketball, outgoing and lively personality" or "male, 50 years old, calm personality," etc.
[0108] Target information group: This refers to an information group containing the target profile features of the target object and the preceding text information input by the target object. Different target profile features or different preceding text information correspond to different target information groups. For example: The target information group contains "<Gender: Male, Age: 20>, Input preceding text: <Hello>".
[0109] The artificial intelligence technology in the embodiments of this application will be explained below to facilitate understanding by those skilled in the art.
[0110] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0111] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0112] Computer vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in tasks such as target recognition, tracking, and measurement, and further performs image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0113] Key technologies in speech technology include Automatic Speech Recognition (ASR), Text-to-Speech (TTS), and Voiceprint Recognition. Enabling computers to hear, see, speak, and feel is the future direction of human-computer interaction, with speech emerging as one of the most promising methods.
[0114] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.
[0115] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0116] Autonomous driving technology typically includes high-precision maps, environmental perception, behavior decision-making, path planning, motion control, and other technologies, and autonomous driving technology has broad application prospects.
[0117] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0118] The design concept of the embodiments of this application is briefly introduced below:
[0119] With the rapid development of artificial intelligence technology, a pressing technical problem in the field of artificial intelligence technology is how to accurately predict the various subsequent information that the target user may input based on the preceding information that the target user has already entered, so that the user can quickly select the subsequent information to be entered.
[0120] In related technologies, when predicting context information, the usual approach is to statistically analyze the preceding and following information input by all target objects within a historical time period, and then determine the set of context information associated with each preceding information. Using this method, when different target objects input the same preceding information, the predicted set of context information will be the same. For example, in related technologies, the determined set of context information associated with the preceding information "Goodnight" is "Wife" and "Sweet Dreams." When both target object A and target object B input "Goodnight," the determined set of context information will both be "Wife" and "Sweet Dreams."
[0121] The problem is that if target user A is male, the predicted context is relatively accurate. However, if target user B is female, she is highly likely to input "husband." But the predicted context for target user B using this technology is still "wife" or "sweet dreams." This results in the predicted context not containing the desired information, forcing target user B to search multiple times or even manually type "husband" to complete the input. This undoubtedly increases the time required for target user B to input the context, reducing her efficiency. Furthermore, the accuracy of the predicted context for target user B using this technology is poor.
[0122] Therefore, under the relevant technology, when different target objects input the same preceding information, the predicted following information set is the same. The unified following information set cannot meet the flexible and diverse usage needs of different target objects. The target object needs to search multiple times in the predicted following information set to select the following information to be input, or even needs to manually input the following information, which reduces the accuracy of the following information provided and also affects the efficiency of the target object's following information input.
[0123] In view of this, embodiments of this application propose a method, apparatus, electronic device, and storage medium for predicting contextual information. To address the problem that a unified set of contextual information cannot meet the flexible and diverse usage needs of different target objects, resulting in poor accuracy of the provided contextual information and low input efficiency of contextual information for target objects, embodiments of this application employ target profile features to distinguish the attributes of target objects. Combining the target profile features of the target object with the input contextual information, a target information group is obtained. After obtaining the target information group, the target information group is input into a trained contextual prediction model, and the output of the trained contextual prediction model is used to obtain at least one target contextual information of the contextual information. In embodiments of this application, the target profile features and contextual information are combined to jointly predict at least one target contextual information that a target object that matches the target profile features may input. Therefore, the contextual information prediction is targeted and can meet the flexible and diverse usage needs of different target objects. Based on the at least one target contextual information determined in this application, the target object can quickly select the contextual information to be input, thus the input efficiency of the target object's contextual information is high, improving the accuracy of the predicted contextual information.
[0124] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0125] See Figure 1 The diagram shown is an application scenario illustration in an embodiment of this application. This application scenario illustration includes a terminal device 110 and a server 120. The terminal device 110 and the server 120 can communicate via a communication network.
[0126] In this embodiment, the terminal device 110 may be, but is not limited to, a smartphone, tablet computer, laptop computer, desktop computer, etc. A target application with predictive context information functionality is pre-installed in the terminal device 110; the target application's functionality is not limited to predicting context information. The target application may be a pre-installed client application, web application, mini-program, etc. The terminal device 110 may include one or more processors 1101, a memory 1102, an I / O interface 1103 for interacting with the server 120, and a display screen 1104, etc.
[0127] The server is the backend server corresponding to the target application, providing services to the target application. Server 120 may include one or more processors 1201, memory 1202, and I / O interfaces 1203 for interacting with terminal device 110. Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal device 110 and server 120 can be directly or indirectly connected via wired or wireless communication; this embodiment does not impose limitations on this connection.
[0128] In this embodiment of the application, the prediction of the following information can be performed on the terminal device 110 or on the server 120.
[0129] When the terminal device 110 performs context prediction, when the terminal device 110 receives the context information input by the target object, it obtains the target profile features corresponding to the target object, and obtains the corresponding target information group based on the context information and the target profile features; it inputs the target information group into the trained context prediction model, and obtains at least one target context information of the context information based on the output result.
[0130] When server 120 predicts context information, upon receiving the context information input by the target object, terminal device 110 sends the received context information to server 120. Server 120 then obtains the target profile features corresponding to the target object and, based on the context information and target profile features, obtains a corresponding target information group. The target information group is input into a trained context prediction model, and based on the output, at least one target context information is obtained. This at least one target context information is then fed back to terminal device 110.
[0131] In this embodiment of the application, the predicted information can be applied to chat scenarios, text document editing scenarios, and search engine search scenarios, but is not limited to the above scenarios.
[0132] Application Scenario 1: Chat Scenario.
[0133] When predicting the following information is applied to chat scenarios, such as when the target object enters the preceding information in the message box through chat software, the target profile features corresponding to the target object are obtained. Based on the target profile features corresponding to the target object and the preceding information, the following information that the target object may send to the other party is predicted.
[0134] Application Scenario 2: Text Document Editing Scenario.
[0135] When the predicted next text information is applied to the text document editing scenario, for example, when the user opens a text document editing software and enters the above text information, the target portrait features corresponding to the target object are obtained. Based on the target portrait features corresponding to the target object and the above text information, the next text information that the target object may enter is predicted.
[0136] Application Scenario 3: Search Engine Search Scenario.
[0137] When the predicted next text information is applied to the search engine search scenario, for example, when the target object enters the above text information in the search box through the search engine, the target portrait features corresponding to the target object are obtained. Based on the target portrait features corresponding to the target object and the above text information, the next text information that the target object may enter is predicted, so that data search can be performed based on the predicted next text information.
[0138] In the embodiments of the present application, the predicted next text information may be input method association prediction, AI association prediction, phonetic conversion prediction, error correction prediction, word formation prediction, etc. Among them, the input method association prediction refers to word prediction. For example, if the above text information entered by the target object is "prosperous", the predicted next text information is "strong and prosperous". The AI association prediction refers to sentence prediction. For example, if the above text information entered by the target object is "The grass on the prairie is lush", the predicted next text information is "want to eat small barbecue". The phonetic conversion prediction refers to predicting the corresponding Chinese characters according to the pinyin. For example, if the above text information entered by the target object is "shou ji", the predicted next text information is "mobile phone". The error correction prediction refers to predicting the corresponding Chinese characters according to the incorrect pinyin. For example, if the above text information entered by the target object is "wimen", the predicted next text information is "we". The word formation prediction refers to predicting the characters or words that can form words with the characters entered by the target object. For example, if the above text information entered by the target object is "I", the predicted next text information is "love" or "love you", etc.
[0139] Next, with reference to the accompanying drawings, the process of training the next text prediction model in the embodiments of the present application will be described. The training process in the embodiments of the present application can be applied to Figure 1 the terminal device 110 or the server 120 shown.
[0140] Refer to Figure 2 shown, which is a schematic diagram of the training process of the next text prediction model in the embodiments of the present application. Next, with reference to the attached Figure 2 , the training process of the next text prediction model in the embodiments of the present application will be described:
[0141] S20: Obtain a set of sample information groups, wherein each sample information group contains: the sample profile features of the corresponding sample object, and the sample context information of a sample object input within a set historical time period and the selected sample context information.
[0142] In this embodiment of the application, sample profile features of each sample object within a set historical time period are collected, as well as sample context information input by each sample object and selected sample background information; wherein, the so-called sample profile features refer to a labeled user model abstracted from at least one of the sample object's gender dimension, age dimension, personality dimension, interest dimension, and geographic dimension.
[0143] For example: See Figure 3 The diagram shown is an example illustration of sample portrait features in an embodiment of this application. Sample portrait feature 1 is "male, 18 years old, likes playing basketball, outgoing and lively personality", and sample portrait feature 2 is "male, 50 years old, likes swimming, calm personality", etc.
[0144] The so-called sample information group refers to a combination of sample profile features of the corresponding sample object, as well as a sample context information input by the sample object and a selected sample context information within a set historical time period.
[0145] For example: The sample profile feature of sample object A is "male, age 18". If the sample context information input by sample object A within a historical time period is "hello", and the sample context information selected for the sample context information is "I", then ""male, age 18, hello, "I"" will be a sample information group.
[0146] It should be noted that within a set historical time period, multiple different sample information groups will be collected. The contextual information of the samples in these different sample information groups may differ, but the sample profile features and contextual information of the samples in these different sample information groups are the same.
[0147] For example: Sample information group A is "Male, 18 years old, Hello, "I", Sample information group B is "Male, 18 years old, Hello, "I am", Sample information group C is "Male, 18 years old, Hello, "You", Sample information group D is "Male, 18 years old, Hello, "We", Sample information group E is "Male, 18 years old, Hello, "Classmate"". In sample information groups A, B, C, D, and E, the sample profile features and the above information of the input sample are all the same.
[0148] Additionally, it should be noted that the sample information group set refers to the set composed of various sample information groups.
[0149] For example: See Figure 4 The diagram shown is an example of a sample information group set in an embodiment of this application. The sample information group set contains 5 sample information groups, namely sample information group 1 to sample information group 5. Among them, sample information group 1 is "Male, Hello, I", sample information group 2 is "Male, Hello, Classmate", sample information group 3 is "Female, Goodnight, Sweet Dreams", sample information group 4 is "Female, Goodnight, Love", and sample information group 5 is "Female, Age 30, Makeup, Becoming Beautiful".
[0150] In this way, after collecting the set of sample information groups, the sample information group set can be used for subsequent training of the prediction model.
[0151] S21: Determine the context information of each sample in each sample information group and the number of times it appears in the historical association with the corresponding sample information group.
[0152] The following two methods can be used to determine the context information of each sample information group and the number of times it appears in the historical association with the corresponding sample information group.
[0153] Method 1:
[0154] In this embodiment of the application, after collecting the sample information group set, for each sample information group in the sample information group set, the sample context information in the sample information group is determined, and the number of times the sample context information and the sample information group are historically associated is counted.
[0155] Within a defined historical time period, the sample object selects the following text information after inputting the sample context information in the sample information group. Taking the sample information group as a unit, the number of times each sample object with the same sample profile features and inputting the same sample context information selects the following text information is summarized to obtain the historical association frequency between the following text information and the corresponding sample information group.
[0156] For example: See Figure 5The diagram illustrates an example of the historical association frequency between the sample context information and the sample information group in this embodiment of the application. The sample information group is “"Gender: Male, Hello", “I”. Here, “Gender: Male” represents the sample profile feature corresponding to the sample object, “Hello” represents the sample context information input by the sample object, and “I” represents the sample context information selected by the sample object. Within a set historical time period, sample object A, whose sample profile feature is “Gender: Male”, selected the sample context information “I” 100 times after inputting the sample context information “Hello” in the sample information group. Sample object B, whose sample profile feature is “Gender: Male”, selected the sample context information “I” 200 times after inputting the sample context information “Hello” in the sample information group. Therefore, the historical association frequency between the sample information group “"Gender: Male, Hello", “I” and the sample information group is 100 + 200 = 300 times.
[0157] Method 2:
[0158] When determining the context information of each sample information group and the historical association frequency with the corresponding sample information group, the sample objects are not distinguished. Instead, the sample profile features, the input context information of the sample object, and the selected context information of the sample object are classified according to the sample profile features, the input context information of the sample object, and the selected context information of the sample object. In specific implementation, sample information groups with the same sample profile features and the same context information are grouped into one category. That is, in the same category, the sample profile features and the corresponding context information of each context information are the same. Then, the frequency of each context information of the context information in the same cluster is counted, and the frequency of the context information is used as the historical association frequency between the context information and the corresponding sample information group.
[0159] For example, a sample profile feature for a certain category is "male," and the sample context is "hello." The phrase "I" appears 300 times in the context of samples within this category. Therefore, the historical association count between the phrase "I" and the corresponding sample information group is determined to be 300 times. Specifically, the phrase "I" in this category refers to all sample objects whose sample profile feature is "male" and whose input context is "hello."
[0160] S22: Based on the number of occurrences of each historical association, determine the candidate conditional probabilities of the context information of each sample in each sample information group and store them in association.
[0161] In this embodiment of the application, the terminal device or server collects a set of sample information groups and determines the sample context information in each sample information group and the number of times it appears in the historical association with the corresponding sample information group. Each sample information group can obtain a number of times it appears in the historical association.
[0162] For example: Sample information group 1 is “Gender: Male, Hello, “I””, and the following text “I” appears 100 times in its historical association with sample information group 1. Sample information group 2 is “Gender: Male, Hello, “Classmate””, and the following text “Classmate” appears 50 times in its historical association with sample information group 2. Sample information group 3 is “Gender: Female, Goodnight, Sweet Dreams”, and the following text “Sweet Dreams” appears 120 times in its historical association with sample information group 3. Sample information group 4 is “Gender: Female, Goodnight, “Love”, and the following text “Love” appears 60 times in its historical association with sample information group 4.
[0163] When determining the candidate conditional probability of the context information of a sample, it is first necessary to obtain sample information groups that contain the same sample profile features and sample context information. Then, based on the number of times the corresponding historical associations occur in each sample information group that contains the same sample profile features and sample context information, the candidate conditional probability of the context information of the sample in the corresponding sample information group is determined.
[0164] Optionally, sample information groups with identical contextual information and sample profile features are identified separately. The total number of occurrences of each sample information group in the sample information group set is then used to determine the candidate conditional probability corresponding to the contextual information of each sample information group based on the ratio of the number of occurrences of each historical association to the corresponding total number of occurrences.
[0165] Let's continue with the examples above. See also... Figure 6 The diagram illustrates an example of obtaining candidate conditional probabilities corresponding to the context information of a sample in this embodiment. Sample information group 1 and sample information group 2 are sample information groups containing the same sample profile features and sample context information. In sample information group 1, the historical association corresponding to the context information "I" appears 100 times, and in sample information group 2, the historical association corresponding to the context information "classmate" appears 50 times. Therefore, when the sample profile feature is "male" and the context information is "hello", the candidate conditional probability of the corresponding context information "I" is 100 / (100+50) = 0.667. The candidate conditional probability of the corresponding context information "classmate" is 50 / (100+50) = 0.333.
[0166] Sample information groups 3 and 4 contain the same sample profile features and sample context information. In sample information group 3, the historical association corresponding to the context information "sweet dreams" appears 120 times, and in sample information group 4, the historical association corresponding to the context information "love" appears 60 times. Therefore, when the sample profile feature is "female" and the context information is "goodnight," the candidate conditional probability of the corresponding context information "sweet dreams" is 120 / (120+60) = 0.667. The candidate conditional probability of the corresponding context information "love" is 60 / (150+60) = 0.333.
[0167] In this embodiment, after obtaining the occurrence counts of each historical association and determining the candidate conditional probabilities of the following text information in each sample information group, the candidate conditional probabilities of the following text information in each sample information group are stored in association to obtain a trained following text prediction model. When the target information group is input into the trained following text prediction model and the following text information is predicted using the trained following text prediction model, the prediction of the following text information is also based on the stored candidate conditional probabilities of the following text information in each sample information group.
[0168] During the training of the context prediction model, the input is a set of sample information groups. This set includes various sample information groups, each containing: sample profile features corresponding to the sample object, and, within a defined historical time period, a sample's preceding context and a selected sample's following context. Based on the context prediction model, the historical association frequency between the following context information in each sample information group and the corresponding sample information group is determined. Based on the obtained historical association frequencies, the candidate conditional probabilities of the following context information in each sample information group are determined.
[0169] The following text prediction model outputs the candidate conditional probabilities of the following text information for each sample information group.
[0170] For example: See Figure 7The diagram illustrates, for example, the input and output information of the context prediction model in this application embodiment. The sample information groups input to the context prediction model are: Sample Information Group 1 "Gender: Male, Hello, Me", Sample Information Group 2 "Gender: Male, Hello, I am", Sample Information Group 3 "Gender: Female, Hello, Classmate", and Sample Information Group 4 "Gender: Female, Hello, We". Based on the context prediction model, the historical association frequency between the sample context information "I" and Sample Information Group 1 is determined to be 100 times. The historical association frequency between the sample context information "I am" and Sample Information Group 2 is determined to be 50 times. The historical association frequency between the sample context information "Classmate" and Sample Information Group 3 is determined to be 40 times. The historical association frequency between the sample context information "We" and Sample Information Group 4 is determined to be 120 times. The candidate conditional probability of the sample context information "I" in Sample Information Group 1 is determined to be 100 / (100+50) = 0.667. The candidate conditional probability of the sample context information "I am" in Sample Information Group 2 is determined to be 50 / (100+50) = 0.333. The candidate conditional probability of the context information "classmate" in sample information group 3 is determined to be 40 / (40+120) = 0.25. The candidate conditional probability of the context information "we" in sample information group 4 is determined to be 120 / (40+120) = 0.75. The context prediction model outputs "Gender: Male, Hello, I, 100, 0.667", "Gender: Male, Hello, I am, 50, 0.333", "Gender: Female, Hello, classmate, 40, 0.25", and "Gender: Female, Hello, we, 120, 0.75".
[0171] Optionally, in this embodiment of the application, the sample profile features corresponding to each sample object are determined in the following way:
[0172] For each sample object, obtain the sample attribute dimension label corresponding to at least one attribute dimension; wherein, the attribute dimension includes at least one of the following: gender dimension, age dimension, personality dimension, interest dimension, and region dimension;
[0173] Convert at least one sample attribute dimension label into the corresponding sample feature string;
[0174] Based on at least one sample feature string, obtain the sample profile features corresponding to the sample object.
[0175] In this embodiment, to improve the efficiency of predicting contextual information and facilitate obtaining prediction results through the contextual prediction model, the concept of strings is introduced into the training process of the contextual prediction model. For a sample object, after obtaining the sample attribute dimension labels corresponding to at least one attribute dimension, each of the at least one sample attribute dimension labels is converted into a corresponding sample feature string.
[0176] It should be noted that the sample attribute dimension label consists of two parts: the attribute dimension itself and the specific feature corresponding to that attribute dimension. Similarly, the converted sample feature string also consists of two parts: the string corresponding to the attribute dimension and the string corresponding to the specific feature under that attribute dimension. These strings can be numbers, letters, symbols, etc., but are not limited to these.
[0177] Terminal devices or servers can define the mapping between attribute dimensions and attribute dimension strings, and the mapping between specific features under each attribute dimension and specific feature strings. Based on these mappings, at least one sample attribute dimension label can be converted into the corresponding sample feature string.
[0178] The attribute dimensions include at least one of the following: gender, age, personality, interests, and region.
[0179] See Figure 8 The diagram illustrates an example of the correspondence between sample attribute dimension labels and sample feature strings in an embodiment of this application. For instance, if the attribute dimension is gender, and the sample attribute dimension label is "Male," then "Gender" is the attribute dimension, and "Male" is the attribute dimension label. For example, if the string corresponding to the gender attribute is "0," the string corresponding to the gender dimension feature "Male" is "0," and the string corresponding to the gender dimension feature "Female" is "1," then the sample feature string converted from the sample attribute dimension label "Male" is "0, 0." The sample feature string converted from the sample attribute dimension label "Female" is "0, 1."
[0180] If the attribute dimension is age, for example, the sample attribute dimension label is "age 18 years old", where "age" is the attribute dimension and "18 years old" is the attribute dimension label. You can assign a corresponding string to each age feature. Ideally, you can divide the age feature into multiple age ranges, with each age range corresponding to a string. For example, if the string corresponding to the age attribute is "1", the string corresponding to the age dimension feature "0-24 years old" is "0", and the string corresponding to the age dimension feature "25-50 years old" is "1", then the sample feature string converted from the sample attribute dimension label "age 18 years old" is "1,0". The sample feature string converted from the sample attribute dimension label "age 50 years old" is "1,1".
[0181] If the attribute dimension is a personality dimension, for example, the sample attribute dimension label is "extroverted," where "personality" is the attribute dimension and "extroverted" is the attribute dimension label. For instance, if the string corresponding to the personality attribute is "2," the string corresponding to the personality dimension feature "extroverted" is "0," and the string corresponding to the personality dimension feature "introverted" is "1," then the sample attribute dimension label converted from "extroverted" would be "2,0." The sample attribute dimension label converted from "introverted" would be "2,1."
[0182] If the attribute dimension is an interest dimension, for example, the sample attribute dimension label is "loves playing basketball," where "loves" is the attribute dimension and "plays basketball" is the attribute dimension label. For instance, if the string corresponding to the interest attribute is "3," the string corresponding to the interest dimension feature "plays basketball" is "0," and the string corresponding to the interest dimension feature "plays soccer" is "1," then the sample feature string converted from the sample attribute dimension label "loves playing basketball" would be "3,0." The sample feature string converted from the sample attribute dimension label "loves playing soccer" would be "3,1."
[0183] If the attribute dimension is a geographic dimension, for example, the sample attribute dimension label is "place of origin city A", where "place of origin" is the attribute dimension and "city A" is the attribute dimension label. Different strings can be assigned to different cities. For example, the string corresponding to the geographic attribute can be "4", the string corresponding to the geographic dimension feature "city A" can be "0", and the string corresponding to the geographic dimension feature "city B" can be "1". Then, the sample feature string converted from the sample attribute dimension label "place of origin city A" will be "4, 0". The sample feature string converted from the sample attribute dimension label "place of origin city B" will be "4, 1". It should be noted that the city is only an example, and the embodiments of this application do not limit the granularity of geographic division; it can also be provincial, district, county, etc.
[0184] After converting at least one sample attribute dimension label into a corresponding sample feature string, the sample profile feature corresponding to the sample object is obtained based on at least one sample feature string. Alternatively, at least one sample feature string can be directly used as the sample profile feature corresponding to the sample object.
[0185] Optionally, for each of the at least one attribute dimension obtained from the sample object, the corresponding sample attribute dimension label is converted into a corresponding sample feature string. This typically includes multiple sample feature strings. When training the context prediction model, these multiple sample feature strings can be arbitrarily combined to obtain multiple sample profile features. The problem with this is that there may be too many sample profile features, leading to low training efficiency of the context prediction model.
[0186] Based on the above considerations, in this embodiment of the application, the sample profile features corresponding to the sample object are obtained based on at least one sample feature string, specifically including:
[0187] Based on at least one sample feature string, select a set of at least one sample feature string that meets a set quantity threshold;
[0188] Based on at least one set of sample feature strings, obtain the sample profile features corresponding to the sample object.
[0189] In this embodiment of the application, selecting at least one set of sample feature strings that meets a set of predetermined number thresholds can be achieved by selecting a set of sample feature strings that includes a predetermined number threshold of sample feature strings.
[0190] For example: at least one sample feature string obtained includes "0,1", "1,1", "2,0". Set the quantity threshold to 2. Then, randomly select two sample feature strings from "0,1", "1,1", "2,0", and the resulting sample feature string sets are "0,1", "1,1", "0,1", "2,0" and "1,1", "2,0" respectively.
[0191] Furthermore, considering that when predicting context information based on the context prediction model, the target profile features corresponding to the target object may only contain one attribute dimension label, in order to ensure that the trained context prediction model can predict the context information, in this embodiment, at least one set of sample feature strings that meets a set of predetermined quantity thresholds is selected. Alternatively, the set of sample feature strings can be composed of no more than the predetermined quantity threshold.
[0192] For example: See Figure 9 The diagram illustrates an example of obtaining a set of sample feature strings in an embodiment of this application. At least one sample feature string is obtained, including "0,1", "1,1", and "2,0". A quantity threshold of 2 is set. Then, no more than two sample feature strings are arbitrarily selected from "0,1", "1,1", and "2,0", resulting in sets of sample feature strings of "0,1", "1,1", "2,0", "0,1", "1,1", "0,1", "2,0", and "1,1", "2,0" respectively.
[0193] Additionally, it should be noted that in this embodiment, the context prediction model is trained using the sample profile features corresponding to the sample object, the input preceding context information, and the selected context information. When predicting context information later, in some cases, if the target profile features corresponding to the target object are not obtained when the preceding context information input by the target object is received, the context information can be predicted using other context prediction models trained only based on the input preceding context information and the selected context information. This embodiment does not limit this process.
[0194] In this embodiment of the application, after the context prediction model is trained, the target object inputs context information, and the trained context prediction model predicts at least one target context information based on the context information. See also... Figure 10 The diagram shown is a flowchart illustrating a method for predicting context information in an embodiment of this application. The following is a description of the process, in conjunction with the attached diagram. Figure 10 Detailed explanation:
[0195] S30: When the above information input by the target object is received, the target profile features corresponding to the target object are obtained, and the corresponding target information group is obtained based on the above information and the target profile features.
[0196] In this embodiment, the target object inputs the preceding information on a terminal device. The terminal device has a pre-installed target application with the function of predicting the following information; however, the function of the target application is not limited to predicting the following information. The target application can be a pre-installed client application, a web application, a mini-program, etc. The target object opens the pre-installed target application on the terminal device and inputs the preceding information within the target application.
[0197] When a target user inputs the aforementioned information into a target application, the terminal device can receive this information and obtain the target profile features corresponding to that user. Target profile features refer to at least one attribute dimension label used to characterize the target user's attributes. Attribute dimensions include at least one of the following: gender, age, personality, interests, and geographic location.
[0198] Typically, the target user needs to log in to the target application and then enter the information mentioned above within the application. The target application can provide the target user with profile feature editing options. By enabling these options, the target user can edit their own target profile features. After logging into the target application, the application's backend information can be used to determine the target user's login information and the edited target profile features.
[0199] The target object can access the profile feature editing options and edit its own target profile features in ways including but not limited to the following two:
[0200] Method 1: After the target object opens the profile feature editing options, the application provides the target object with selectable attribute dimension labels, such as "lively personality," "male," and "hobby: playing soccer," etc. The attribute dimension label selected by the target object becomes the target profile feature edited by the target object.
[0201] Method 2: After the target object opens the profile feature editing option, the target application provides a window for the target object to input its profile features. The target object enters its own profile features in the profile feature window, and after the target object confirms the input, the editing process of its own profile features is completed.
[0202] After receiving the contextual information input from the target object and obtaining the target profile features corresponding to the target object, the contextual information and target profile features can be considered as a target information group. A corresponding target information group refers to a group containing the contextual information and target profile features that corresponds to the target object. Different target objects will have the same target information group if they have the same target profile features and the same input contextual information. Conversely, different target objects will have different target information groups if they have different target profile features or different input contextual information.
[0203] S31: Input the target information group into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group, and their respective candidate conditional probabilities.
[0204] After obtaining the corresponding target information group based on the contextual information of the target object and the target profile features, the target information group is input into the trained context prediction model. The context prediction model then outputs a prediction result corresponding to the target information group based on the contextual information and target profile features contained within it.
[0205] In training the context prediction model, a set of sample information groups is obtained. The context information of each sample information group in the set of sample information groups is determined, and the number of times the historical association with the corresponding sample information group is determined. Based on the obtained number of times the historical association occurs, the candidate conditional probability of the context information of each sample information group is determined and associated and stored.
[0206] Therefore, the target information group is input into the trained context prediction model, and the output of the context prediction model is at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability.
[0207] S32: Based on at least one candidate context information and its corresponding candidate conditional probability, obtain at least one target context information of the preceding context information.
[0208] Based on the trained context prediction model, at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability are obtained; wherein, each candidate conditional probability is determined based on the number of times the corresponding candidate context information and the target information group are associated within a set historical time period.
[0209] In this embodiment, during the training of the context prediction model, the candidate conditional probabilities corresponding to the sample context information are determined based on the number of historical associations between sample context information and sample information groups within a set historical time period. After the context prediction model is trained, the target information group is input into the trained context prediction model. Based on the trained context prediction model, a sample information group matching the target information group is obtained. This can be achieved by obtaining the same sample information group as the target information group. The trained context prediction model includes at least one sample context information corresponding to the sample information group and its corresponding candidate conditional probabilities. After obtaining the same sample information group as the target information group, at least one sample context information corresponding to the sample information group and its corresponding candidate conditional probabilities can be directly used as at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probabilities.
[0210] For example: See Figure 11 The diagram illustrates an example of obtaining sample context information and corresponding candidate conditional probabilities in an embodiment of this application. The trained context prediction model includes sample information group 1 as “Male, Hello,” “I,” with the sample context information “I,” and a candidate conditional probability of “I” of 0.667. Sample information group 2 is “Male, Hello,” “Classmate,” with the sample context information “Classmate” of 0.333. Sample information group 3 is “Female, Goodnight,” “Sweet Dreams,” with the sample context information “Sweet Dreams” of 0.667. Sample information group 4 is “Female, Goodnight,” “Love,” with the sample context information “Love” of 0.333. Based on the context information input by the target object and the target profile features corresponding to the target object, the corresponding target information group is obtained as “Male, Hello.” Therefore, based on the trained context prediction model, sample information groups matching the target information group are sample information group 1 and sample information group 2. The text information of at least one sample corresponding to the sample information group and their respective candidate conditional probabilities are "I", with a candidate conditional probability of 0.667; "classmate", with a candidate conditional probability of 0.333.
[0211] From at least one candidate conditional probability, select at least one target conditional probability that satisfies the probability condition, and use the candidate context information corresponding to each of the at least one target conditional probability as at least one target context information of the preceding context.
[0212] After obtaining at least one candidate conditional probability, at least one target conditional probability that satisfies a probability condition is selected from the at least one candidate conditional probability. This probability condition can be selecting the largest candidate conditional probability; that is, selecting the largest candidate conditional probability from the at least one candidate conditional probability as the target conditional probability, and using the candidate context information corresponding to the target conditional probability as the target context information of the preceding information.
[0213] Let's illustrate with the example above. For instance, if the target information group is "Male, Hello", based on the trained context prediction model, sample information groups matching the target information group are obtained as sample information group 1 and sample information group 2. At least one sample context message corresponding to each sample information group and its corresponding candidate conditional probability are: "I", with a candidate conditional probability of 0.667; and "classmate", with a candidate conditional probability of 0.333. Because 0.667 > 0.333, the target context message for the preceding information "Hello" is determined to be "I".
[0214] Optionally, in the embodiments of this application, at least one target conditional probability that satisfies the probability condition can be selected from at least one candidate conditional probability in the following two ways.
[0215] Method 1: Select at least one target conditional probability that reaches the probability threshold from at least one candidate conditional probability.
[0216] For example, given the target information group as "Male, Hello", based on a trained context prediction model, the sample information groups matching the target information group are sample information group 1, sample information group 2, sample information group 3, and sample information group 4. The candidate conditional probability for the context information "I" in sample information group 1 is 0.667; the candidate conditional probability for the context information "I am" in sample information group 2 is 0.63; the candidate conditional probability for the context information "classmate" in sample information group 3 is 0.52; and the candidate conditional probability for the context information "Are you there?" in sample information group 4 is 0.43. For example, the probability threshold is set to 0.5. Because the candidate conditional probability for the context information "I" is 0.667 > 0.5, the candidate conditional probability for the context information "I am" is 0.63 > 0.5, and the candidate conditional probability for the context information "classmate" is 0.52 > 0.5, at least one target conditional probability is determined to be 0.667, 0.63, and 0.52, respectively.
[0217] The candidate context information "I", "I am", and "classmate" corresponding to at least one target conditional probability of 0.667, 0.63, and 0.52 are used as at least one target context information of the preceding context.
[0218] Method 2: Select at least one target conditional probability from at least one candidate conditional probability in descending order of candidate conditional probability.
[0219] For example, if the target information group is "Male, Hello", based on a trained context prediction model, the sample information groups matching the target information group are sample information group 1, sample information group 2, sample information group 3, and sample information group 4. The candidate conditional probability for the context information "I" in sample information group 1 is 0.667; the candidate conditional probability for the context information "I am" in sample information group 2 is 0.63; the candidate conditional probability for the context information "classmate" in sample information group 3 is 0.52; and the candidate conditional probability for the context information "Are you there?" in sample information group 4 is 0.43. For example, if the preset number is 2, the candidate conditional probabilities corresponding to each context information are sorted from largest to smallest as follows: 0.667 > 0.63 > 0.52 > 0.43. Then, two target conditional probabilities are selected, with probabilities of 0.667 and 0.63 respectively.
[0220] The candidate context information "I" and "I am" corresponding to at least one target conditional probability of 0.667 and 0.63 respectively are used as at least one target context information of the preceding context.
[0221] Optionally, the target object logs into the target application and then enters the aforementioned information within the application. If the target application does not provide the target object with the option to edit its profile features, or if it does provide this option but the target object does not edit its profile features, then, based on these considerations, to ensure that the target profile features corresponding to the target object can be obtained, this embodiment provides obtaining the target profile features corresponding to the target object based on the historical input records associated with the target object; or, obtaining the target profile features corresponding to the target object based on the historical click records associated with the target object.
[0222] Optionally, in this embodiment of the application, the process for obtaining the target profile features corresponding to the target object based on the historical input records associated with the target object is as follows:
[0223] See Figure 12 The diagram shown is a flowchart illustrating the process of obtaining the target profile features corresponding to the target object in an embodiment of this application. The process of obtaining the target profile features corresponding to the target object based on the historical input information associated with the target object is as follows:
[0224] S40: Based on the identification information of the target object, obtain the first occurrence count of each of at least one attribute dimension phrase in the historical input records associated with the target object.
[0225] Within a defined time period, the target user typically needs to log in to the target application, triggering various input messages within the application. Each time the target user logs in, the application's backend information can be used to determine their login details and the information they entered during the historical time period, and the frequency of each input message can be counted. The target user's associated historical input records include all the information they entered within the application after logging in during the historical time period. Examples of input messages include "lipstick" and "best friend." The target user's identification information can be their login information, such as their username.
[0226] The system retrieves at least one attribute dimension phrase from the historical input records associated with the target object. An attribute dimension phrase refers to input information in the historical input records that has a corresponding attribute dimension label. Attribute dimension phrases include attribute dimension words, short phrases, or emojis. The correspondence between input information and attribute dimension labels is pre-established. It should be noted that the correspondence between input information and attribute dimension labels can be one-to-one or one-to-many. For example, the input information "lipstick" corresponds to the attribute dimension label "female," or the input information "lipstick" corresponds to the attribute dimension labels "female" and "loves makeup," etc. In this case, the input information "lipstick" in the historical input record is an attribute dimension phrase.
[0227] After obtaining at least one attribute dimension phrase from the historical input records associated with the target object, the first occurrence count of each attribute dimension phrase in the historical input records can be calculated.
[0228] S41: Select at least one attribute dimension phrase whose first occurrence count reaches the preset first input information frequency threshold.
[0229] Because information that is frequently input by the target object within a set time period is more likely to reflect the target object's profile characteristics. Based on the above considerations, in this embodiment of the application, after obtaining the first occurrence count of at least one attribute dimension phrase in the historical input records associated with the target object within a set time period, at least one attribute dimension phrase whose first occurrence count reaches a preset first input information frequency threshold is selected from each attribute dimension phrase based on the first occurrence count of each attribute dimension phrase.
[0230] For example: Given the target object's input of the following attribute phrases within a specified time period: "lipstick," "best friend," and "yoga." The first occurrence count of the attribute phrase "lipstick" is 300 times, "best friend" is 260 times, and "yoga" is 40 times. The preset threshold for the first input information count is 200 times. Because the first occurrence counts of the attribute phrases "lipstick" and "best friend" reach the preset threshold, at least one attribute phrase is selected as "lipstick" and "best friend."
[0231] S42: Based on the selected at least one attribute dimension phrase and the mapping relationship between each attribute dimension phrase and the attribute dimension label, obtain the attribute dimension label corresponding to each of the selected at least one attribute dimension phrase; based on the at least one attribute dimension label, obtain the target profile feature corresponding to the target object.
[0232] After selecting at least one attribute dimension phrase, the attribute dimension label corresponding to each of the selected attribute dimension phrases is obtained according to the pre-established mapping relationship between each attribute dimension phrase and the attribute dimension label. Then, based on the at least one attribute dimension label, the target profile features corresponding to the target object are obtained.
[0233] Specifically, if, during the training of the text prediction model, for each sample object, at least one attribute dimension corresponding to the sample attribute dimension label is obtained, and then the sample profile features corresponding to the sample object are obtained based on the sample attribute dimension label, then the target profile features corresponding to the target object are directly obtained based on at least one attribute dimension label.
[0234] If, during the training of a context prediction model, for a sample object, at least one attribute dimension corresponding to each attribute dimension is obtained, and each attribute dimension label is converted into a corresponding sample feature string, and then the sample profile features corresponding to the sample object are obtained based on the at least one sample feature string, then based on the at least one attribute dimension label, it is also necessary to first convert the at least one attribute dimension label into a corresponding sample feature string, and then obtain the target profile features corresponding to the target object based on the at least one sample feature string. It should be noted that the correspondence between attribute dimension labels and sample feature strings in the process of training the context prediction model is the same as the correspondence between attribute dimension labels and sample feature strings in the process of predicting context information.
[0235] To illustrate further, see the examples above, for instance: Figure 13The diagram illustrates an example of obtaining target profile features in this embodiment. Within a set time period, the target object inputs the attribute dimension phrases "lipstick," "best friend," and "yoga." At least one attribute dimension phrase, "lipstick" and "best friend," is selected if its occurrence count reaches a preset threshold. The attribute dimension label corresponding to the attribute dimension phrase "lipstick" is "female, likes makeup," and the attribute dimension label corresponding to the attribute dimension phrase "best friend" is "female." Based on the attribute dimension label "female, likes makeup," the target profile features corresponding to the target object are obtained.
[0236] If at least one sample attribute dimension label was not converted into a corresponding sample feature string during the training of the text prediction model, then the target profile feature corresponding to the target object will be obtained directly based on the attribute dimension label "female, likes makeup". For example, "female, likes makeup" will be used as the target profile feature corresponding to the target object.
[0237] When training a text prediction model, at least one sample attribute dimension label is converted into a corresponding sample feature string. For example, the attribute dimension label "female, likes makeup" is converted into a feature string, such as "0, 1", "3, 2". Based on the feature strings "0, 1", "3, 2", the target profile features corresponding to the target object are obtained. For example, "0, 1", "3, 2" can be used as the target profile features corresponding to the target object.
[0238] Optionally, if, during the training of the context prediction model, at least one set of sample feature strings that meets a set of predetermined thresholds is selected based on at least one sample feature string, and the sample profile features corresponding to the sample object are obtained based on this set of at least one sample feature string, then during context information prediction, after converting at least one attribute dimension label into feature strings, at least one set of feature strings that meets a set of predetermined thresholds is selected based on at least one feature string, and the target profile features corresponding to the target object are obtained based on this set of at least one feature string. In this case, at least one set of feature strings can be directly used as the target profile features corresponding to the target object.
[0239] For example: at least one feature string obtained includes "0,1", "1,1", "2,0". The quantity threshold is set to 2. Then, by arbitrarily selecting no more than two feature strings from "0,1", "1,1", "2,0", the resulting feature string sets are "0,1", "1,1", "2,0", "0,1", "1,1", "0,1", "2,0" and "1,1", "2,0".
[0240] Optionally, in this embodiment of the application, the process of obtaining the target profile features corresponding to the target object based on the historical click records associated with the target object is as follows:
[0241] See Figure 14 The diagram shown is a flowchart illustrating the process of obtaining the target profile features corresponding to the target object in an embodiment of this application. The process of obtaining the target profile features corresponding to the target object based on the historical click records associated with the target object is as follows:
[0242] S50: Based on the identification information of the target object, obtain the second occurrence count of each of the at least one historical click information clicked by the target object from the candidate click information list in the historical click records associated with the target object.
[0243] Within a defined time period, the target user typically needs to log in to the target application. Each time the target user logs in, the application provides and displays a list of candidate clickable information. The target user can then click on items in this list. For example, a shopping application might provide a list of candidate clickable information including "men's clothing," "women's clothing," "sportswear," "long skirts," "short skirts," and "suits." The information displayed in this list constitutes the target user's historical click information. By retrieving the target user's associated historical click records, after the target user clicks on at least one historical click from the candidate clickable information list, the second occurrence count of each historical click can be calculated. The target user's identification information can include their login information, such as their username.
[0244] A pre-established mapping between each click message and its corresponding attribute dimension label has been created. It should be noted that this mapping can be one-to-one or one-to-many. For example, the click message "short skirt" might correspond to the attribute dimension label "female," or the click message "short skirt" might correspond to the attribute dimension labels "female" and "loves makeup," etc.
[0245] S51: Select at least one historical click information whose second occurrence count reaches the preset threshold for the first click information count.
[0246] Because information that is selected more frequently from the candidate click information list within a set time period better reflects the target profile characteristics of the target object. Based on the above considerations, in this embodiment of the application, after obtaining the second occurrence count corresponding to at least one historical click information clicked by the target object from the candidate click information list within a set time period, at least one historical click information whose second occurrence count reaches a preset first click information count threshold is selected from the historical click information based on the second occurrence count of each historical click information.
[0247] For example, in the historical click records associated with the target object, the target object clicked at least one historical click item from the candidate click information list, namely "women's clothing", "short skirt", and "long skirt". The second occurrence count of the historical click information "women's clothing" is 280 times, the second occurrence count of the historical click information "short skirt" is 240 times, and the second occurrence count of the historical click information "long skirt" is 180 times. The preset threshold for the first click information is 200 times. Because the second occurrence counts of the historical click information "women's clothing" and "short skirt" reach the preset threshold for the first click information, at least one historical click item is selected as "women's clothing" and "short skirt".
[0248] S52: Based on the selected historical click information and the mapping relationship between each click information and the attribute dimension label, obtain the attribute dimension label corresponding to each of the selected historical click information.
[0249] After selecting at least one historical click record, the attribute dimension labels corresponding to each of the selected historical click records are obtained based on the pre-established mapping relationship between each click record and its corresponding attribute dimension labels. Then, based on the at least one attribute dimension label, the target profile features corresponding to the target object are obtained.
[0250] Specifically, if, during the training of the text prediction model, for each sample object, at least one attribute dimension corresponding to the sample attribute dimension label is obtained, and then the sample profile features corresponding to the sample object are obtained based on the sample attribute dimension label, then the target profile features corresponding to the target object are directly obtained based on at least one attribute dimension label.
[0251] If, during the training of a context prediction model, for a sample object, at least one attribute dimension corresponding to each attribute dimension is obtained, and each attribute dimension label is converted into a corresponding sample feature string, and then the sample profile features corresponding to the sample object are obtained based on the at least one sample feature string, then based on the at least one attribute dimension label, it is also necessary to first convert the at least one attribute dimension label into a corresponding sample feature string, and then obtain the target profile features corresponding to the target object based on the at least one sample feature string. It should be noted that the correspondence between attribute dimension labels and sample feature strings in the process of training the context prediction model is the same as the correspondence between attribute dimension labels and sample feature strings in the process of predicting context information.
[0252] To illustrate further, see the examples above, for instance: Figure 15 The diagram illustrates an example of obtaining target profile features in this embodiment. Within a set time period, the target object's historical click records are obtained, where at least one historical click from the candidate click information list indicates that the target object is "women's clothing," "short skirt," or "long skirt." Selecting at least one historical click that appears at a preset threshold for the first click information, where the number of occurrences reaches the threshold, indicates that the target object is either "women's clothing" or "short skirt." The attribute dimension label corresponding to the historical click information "women's clothing" is "female," and the attribute dimension label corresponding to the historical click information "short skirt" is "female, likes makeup." Based on the attribute dimension label "female, likes makeup," the target profile features corresponding to the target object are obtained.
[0253] If at least one sample attribute dimension label was not converted into a corresponding sample feature string during the training of the text prediction model, then the target profile feature corresponding to the target object will be obtained directly based on the attribute dimension label "female, likes makeup". For example, "female, likes makeup" will be used as the target profile feature corresponding to the target object.
[0254] When training a text prediction model, at least one sample attribute dimension label is converted into a corresponding sample feature string. For example, the attribute dimension label "female, likes makeup" is converted into a feature string, such as "0, 1", "3, 2". Based on the feature strings "0, 1", "3, 2", the target profile features corresponding to the target object are obtained. For example, "0, 1", "3, 2" can be used as the target profile features corresponding to the target object.
[0255] Optionally, if, during the training of the context prediction model, at least one set of sample feature strings that meets a set of predetermined thresholds is selected based on at least one sample feature string, and the sample profile features corresponding to the sample object are obtained based on this set of at least one sample feature string, then during context information prediction, after converting at least one attribute dimension label into feature strings, at least one set of feature strings that meets a set of predetermined thresholds is selected based on at least one feature string, and the target profile features corresponding to the target object are obtained based on this set of at least one feature string. In this case, at least one set of feature strings can be directly used as the target profile features corresponding to the target object.
[0256] For example: See Figure 16 The diagram shown is an example of obtaining a set of feature strings in an embodiment of this application. At least one feature string obtained includes “0,1”, “1,4”, and “2,2”. A quantity threshold of 2 is set. Then, by arbitrarily selecting no more than two feature strings from “0,1”, “1,4”, and “2,2”, the obtained feature string sets are “0,1”, “1,4”, “2,2”, “0,1”, “1,4”, “0,1”, “2,2”, and “1,4”, “2,2”, respectively.
[0257] See Figure 17 The diagram shown is a flowchart illustrating the process of obtaining the target profile features corresponding to the target object in an embodiment of this application. The process of obtaining the target profile features corresponding to the target object is as follows:
[0258] S60: Based on the historical records associated with the target object, and combined with collaborative filtering, determine the similarity between the historical records and the candidate records in each candidate cluster, and select the clusters that meet the similarity conditions from each candidate cluster; wherein, each candidate cluster is obtained by clustering each historical object based on the similarity between the candidate records associated with each historical object.
[0259] The historical records associated with the target object include historical input records and historical click records associated with the target object. In this embodiment, each candidate cluster is obtained by clustering each historical object based on the similarity between the candidate records associated with each historical object. Each candidate cluster contains the identification information of each historical object and the candidate records corresponding to each historical object.
[0260] Based on the target object's identification information, obtain the frequency of occurrence of each historical record associated with the target object within a set time period, and select at least one historical record whose frequency reaches a preset threshold. Determine the similarity between the selected at least one historical record and each candidate record contained in each candidate cluster. From all candidate clusters, select the cluster with the highest similarity.
[0261] In obtaining candidate clusters, the similarity between candidate records associated with each historical object can be obtained using a collaborative filtering algorithm, and then the historical objects can be clustered based on these similarities. When selecting clusters that meet the similarity criteria from the candidate clusters, the similarity between at least one selected historical record and each candidate record contained in each candidate cluster can be obtained using a collaborative filtering algorithm, and then the cluster with the highest similarity can be selected.
[0262] In this embodiment, a collaborative filtering algorithm is used to calculate the similarity between users based on the similarity between historical records, thereby achieving user clustering. In item-based collaborative filtering, similarity is obtained through a user-item matrix. At this point, we do not need to extract specific features. We only need to calculate the similarity, for example, by calculating the cosine of two vectors, to obtain the similarity between two items.
[0263] User-based collaborative filtering: This method uses similarity statistics to find neighboring users with similar hobbies or interests, hence the name user-based collaborative filtering or neighbor-based collaborative filtering.
[0264] 1. Collecting user information:
[0265] Collecting information that represents user interests. Typical website systems use ratings or reviews, a method known as "active rating." Another method is "passive rating," where the system automatically rates users based on their behavior patterns, eliminating the need for users to directly input data. E-commerce websites have an advantage in acquiring data from passive ratings, as user purchase records are highly valuable.
[0266] 2. Nearest neighbor search (NNS):
[0267] User-based collaborative filtering starts with finding another group of users who share similar interests with user A, essentially calculating the similarity between the two users. For example, it finds n users with similar interests to user A, and uses their ratings of user M as a prediction of A's rating of M. Different algorithms are typically chosen depending on the data; commonly used similarity algorithms include Pearson Correlation Coefficient, Cosine-based Similarity, and Adjusted Cosine Similarity.
[0268] 3. Generate recommendation results:
[0269] With a nearest neighbor set, we can predict the interests of target users and generate recommendations. Different forms of recommendations are used depending on the purpose, with common results including Top-N recommendations and relationship-based recommendations. Top-N recommendations are generated for individual users, producing different results for each person. For example, by statistically analyzing the nearest neighbors of user A, recommendations are selected based on their high frequency of occurrence and absence in user A's rating categories. Relationship-based recommendations involve mining association rules from the records of nearest neighbors.
[0270] Methods for calculating similarity:
[0271] 1. The Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient, is a linear correlation coefficient and one of the most commonly used correlation coefficients. It is denoted by r and reflects the degree of linear correlation between two variables X and Y. The value of r ranges from -1 to 1; a larger absolute value indicates a stronger correlation.
[0272] 2. Cosine distance, also known as cosine similarity, is a measure of the difference between two individuals by using the cosine of the angle between two vectors in a vector space.
[0273] 3. Adjusted Cosine Similarity. The introduction to cosine similarity states that it primarily distinguishes differences in direction and is insensitive to absolute numerical values. Therefore, it cannot measure the differences in values across all dimensions. This can lead to situations where, for example, users rate two pieces of content on a 5-point scale, with users X and Y rating them as (1,2) and (4,5) respectively. Using cosine similarity yields a result of 0.98, indicating extreme similarity. However, based on the ratings, X seems to dislike the two pieces of content, while Y seems to like them. The insensitivity of cosine similarity to numerical values causes errors in the result. To correct this inconsistency, adjusted cosine similarity is introduced. This involves subtracting a mean from the values in all dimensions. For example, if the mean ratings for X and Y are both 3, the adjusted values are (-2,-1) and (1,2), respectively. Using cosine similarity again yields -0.8, a negative similarity value with a significant difference, but clearly more realistic.
[0274] S61: Based on the cluster labels corresponding to the selected clusters, obtain the target profile features corresponding to the target object.
[0275] Because the essence of target profile features is an abstract, tagged user model, they can use dimensions such as gender, age, personality, interests, and location as target profile features. Alternatively, they can use the cluster labels corresponding to the selected clusters as target profile features. The cluster labels can be the category identifier of the selected cluster, or the attribute dimension label corresponding to at least one historical object contained within the selected cluster. The category identifier is used to uniquely distinguish the selected clusters; for example, the category identifier can be the category number of the selected cluster.
[0276] Based on the category identifiers corresponding to the selected clusters, the target profile features corresponding to the target object are obtained. Alternatively, the category identifiers corresponding to the selected clusters can be directly used as the target profile features corresponding to the target object.
[0277] If, during the training of the context prediction model, for each sample object, at least one attribute dimension corresponding to a sample attribute dimension label is obtained, and each of these at least one sample attribute dimension label is converted into a corresponding sample feature string, and then the sample profile features corresponding to the sample object are obtained based on at least one sample feature string, then it is also necessary to first convert the category identifier corresponding to the selected cluster into a corresponding sample feature string, and then use the sample feature string as the target profile features corresponding to the target object. In this embodiment, the category identifier corresponding to the selected cluster is used as a sample attribute dimension label corresponding to one attribute dimension. It should be noted that the correspondence between attribute dimension labels and sample feature strings in the process of training the context prediction model is the same as the correspondence between attribute dimension labels and sample feature strings in the process of predicting context information.
[0278] Optionally, when the target object is associated with a history record that is a historical input record, see [link to relevant documentation]. Figure 18 The diagram shows a flowchart for obtaining the target profile features corresponding to the target object.
[0279] S70: Based on the historical input records associated with the target object, select the target input information cluster from each candidate input information cluster; each candidate input information cluster is obtained by clustering each historical object based on the input similarity between the historical input records associated with each historical object.
[0280] In this embodiment, each candidate input information cluster is obtained by clustering each historical object based on the input similarity between the historical input records associated with each historical object. Each candidate input information cluster contains the identification information of each historical object and its corresponding historical input record.
[0281] Based on the target object's identification information, obtain the first occurrence count of each attribute dimension phrase in the historical input records associated with the target object within a set time period. Select at least one attribute dimension phrase whose first occurrence count reaches a preset second input information frequency threshold. Determine the input similarity between at least one attribute dimension phrase and each attribute dimension phrase contained in each candidate input information cluster. From all candidate input information clusters, select the target input information cluster with the highest input similarity.
[0282] Specifically, when obtaining candidate input information clusters, the input similarity between the attribute dimension phrases of each historical object input can be obtained using a collaborative filtering algorithm, and then the historical objects can be clustered based on the input similarity. When obtaining target input information clusters, the input similarity between at least one attribute dimension phrase selected based on its first occurrence count and the input similarity between each candidate input information cluster and the attribute dimension phrases contained in each candidate input information cluster can be obtained using a collaborative filtering algorithm, and then the target input information cluster with the highest input similarity can be selected.
[0283] For example: See Figure 19 The diagram illustrates an example of obtaining target input information clusters in this embodiment. The obtained candidate input information clusters are candidate input information cluster 1, candidate input information cluster 2, and candidate input information cluster 3. Based on the collaborative filtering algorithm, the input similarity between the selected attribute dimension phrase and each attribute dimension phrase contained in candidate input information cluster 1 is 0.8; the input similarity between the selected attribute dimension phrase and each attribute dimension phrase contained in candidate input information cluster 2 is 0.7; and the input similarity between the selected attribute dimension phrase and each attribute dimension phrase contained in candidate input information cluster 3 is 0.5. The candidate attribute dimension phrase cluster with the highest input similarity to the i-th attribute dimension phrase is candidate input information cluster 1; therefore, candidate input information cluster 1 is selected as the target input information cluster.
[0284] It should be noted that if multiple attribute dimension phrases are selected, the input similarity between each selected attribute dimension phrase and each attribute dimension phrase contained in candidate input information cluster 1, candidate input information cluster 2, and candidate input information cluster 3 is obtained. Then, the maximum value among the obtained input similarities is selected, and the candidate input information cluster corresponding to the maximum value among the input similarities is taken as the target input information cluster.
[0285] For example: See Figure 20The diagram illustrates an example of obtaining target input information clusters in this embodiment. Two attribute dimension phrases, attribute dimension phrase A and attribute dimension phrase B, are selected. Based on the collaborative filtering algorithm, the input similarity between attribute dimension phrase A and each attribute dimension phrase contained in candidate input information cluster 1 is 0.8, and the input similarity between attribute dimension phrase B and each attribute dimension phrase contained in candidate input information cluster 1 is 0.7. The input similarity between attribute dimension phrase A and each attribute dimension phrase contained in candidate input information cluster 2 is 0.7, and the input similarity between attribute dimension phrase B and each attribute dimension phrase contained in candidate input information cluster 2 is 0.75. The input similarity between attribute dimension phrase A and each attribute dimension phrase contained in candidate input information cluster 3 is 0.5, and the input similarity between attribute dimension phrase B and each attribute dimension phrase contained in candidate input information cluster 3 is 0.4. The maximum value among all input similarities is determined to be 0.8. The candidate input information cluster corresponding to the maximum value among all input similarities of 0.8 is candidate input information cluster 1. Therefore, candidate input information cluster 1 is taken as the target input information cluster.
[0286] S71: Based on the input category identifier corresponding to the target input information cluster, obtain the target profile features corresponding to the target object.
[0287] Because the essence of target profile features is an abstract, labeled user model, they can be based on dimensions such as gender, age, personality, interests, and location. Alternatively, they can be the input category identifier corresponding to the target input information cluster. The input category identifier uniquely distinguishes the target input information cluster. For example, the input category identifier can be the category number of the target input information cluster. If three candidate input information clusters are obtained, with category numbers 1, 2, and 3 respectively, and the candidate input information cluster with category number 1 is selected as the target input information cluster, then the category number of the target input information cluster is 1. The input category identifier corresponding to the target input information cluster is then category 1.
[0288] Based on the input category identifiers corresponding to the target input information clusters, target profile features corresponding to the target object are obtained. Alternatively, the input category identifiers corresponding to the selected target input information clusters can be directly used as the target profile features corresponding to the target object.
[0289] If, during the training of the context prediction model, for each sample object, at least one attribute dimension corresponding to a sample attribute dimension label is obtained, and each of these at least one sample attribute dimension label is converted into a corresponding sample feature string, and then based on at least one sample feature string, the sample profile features corresponding to the sample object are obtained, then it is also necessary to first convert the input category identifier corresponding to the selected target input information cluster into a corresponding sample feature string, and then use the sample feature string as the target profile features corresponding to the target object. In this embodiment, the input category identifier corresponding to the selected target input information cluster is used as a sample attribute dimension label corresponding to one attribute dimension. It should be noted that the correspondence between attribute dimension labels and sample feature strings during the training of the context prediction model is the same as the correspondence between attribute dimension labels and sample feature strings during the prediction of context information.
[0290] Optionally, when the target object is associated with a history record of clicks, see [link to relevant documentation]. Figure 21 The diagram shows a flowchart for obtaining the target profile features corresponding to the target object.
[0291] S80: Based on the historical click information of the target object from the candidate click information list, select the target click information cluster from each candidate click information cluster; each candidate click information cluster is obtained by clustering each historical object based on the click similarity between each historical click information of each historical object.
[0292] In this embodiment of the application, each candidate click information cluster is obtained by clustering each historical object based on the click similarity between the click information of each historical object. Each candidate click information cluster contains the identification information of each historical object and its corresponding historical click information.
[0293] Based on the target object's identification information, obtain the second occurrence count of each of at least one historical click from the candidate click information list within a set time period. Select at least one historical click whose second occurrence count reaches a preset threshold. Determine the click similarity between the selected at least one historical click and each historical click contained in each candidate click information cluster. From all candidate click information clusters, select the target click information cluster with the highest click similarity.
[0294] In obtaining candidate click information clusters, a collaborative filtering algorithm can be used to obtain the click similarity between historical click information of each historical object, and then the historical objects can be clustered based on the click similarity. In obtaining the target click information cluster, a collaborative filtering algorithm can be used to obtain at least one selected historical click information, and its click similarity can be compared with the historical click information contained in each candidate click information cluster, thus selecting the target click information cluster with the highest click similarity.
[0295] For example: See Figure 22 The diagram illustrates an example of obtaining target click information clusters in this embodiment. The obtained candidate click information clusters are candidate click information cluster 1, candidate click information cluster 2, and candidate click information cluster 3. Based on the collaborative filtering algorithm, the click similarity between the selected historical click information and the historical click information contained in candidate click information cluster 1 is 0.85; the click similarity between the selected historical click information and the historical click information contained in candidate click information cluster 2 is 0.8; and the click similarity between the selected historical click information and the historical click information contained in candidate click information cluster 3 is 0.5. The candidate click information cluster with the highest click similarity to the selected historical click information is candidate click information cluster 1; therefore, candidate click information cluster 1 is selected as the target click information cluster.
[0296] It should be noted that if multiple historical click information are selected, the click similarity between each selected historical click information and the historical click information contained in candidate click information cluster 1, candidate click information cluster 2 and candidate click information cluster 3 are obtained respectively. Then, the maximum value among the obtained click similarity values is selected, and the candidate click information cluster corresponding to the maximum value among the click similarity values is taken as the target click information cluster.
[0297] For example: See Figure 23The diagram illustrates an example of obtaining target click information clusters in this embodiment. Two historical click information sets, historical click information A and historical click information B, are selected. Based on the collaborative filtering algorithm, the click similarity between historical click information A and all historical click information in candidate click information cluster 1 is 0.9, and the click similarity between historical click information B and all historical click information in candidate click information cluster 1 is 0.85. The click similarity between historical click information A and all historical click information in candidate click information cluster 2 is 0.75, and the click similarity between historical click information B and all historical click information in candidate click information cluster 2 is 0.8. The click similarity between historical click information A and all historical click information in candidate click information cluster 3 is 0.5, and the click similarity between historical click information B and all historical click information in candidate click information cluster 3 is 0.45. The maximum value among all click similarities is determined to be 0.9. The candidate click information cluster corresponding to the maximum value among all click similarities of 0.9 is candidate click information cluster 1. Therefore, candidate click information cluster 1 is taken as the target click information cluster.
[0298] S81: Based on the click category identifier corresponding to the target click information cluster, obtain the target profile features corresponding to the target object.
[0299] Because the essence of target profile features is an abstract, labeled user model, they can use dimensions such as gender, age, personality, interests, and region as target profile features. Alternatively, they can use the click category identifier corresponding to the target click information cluster as the target profile feature. The click category identifier is used to uniquely distinguish the target click information cluster.
[0300] Optionally, the click category identifier corresponding to the selected target click information cluster is first converted into a corresponding sample feature string, and then the sample feature string is used as the target profile feature corresponding to the target object. In this embodiment, the click category identifier corresponding to the selected target click information cluster is used as a sample attribute dimension label corresponding to an attribute dimension.
[0301] Optionally, based on the historical records associated with the target object and the similarity between them and the candidate records in each candidate cluster, after selecting the clusters that meet the similarity conditions from each candidate cluster, the attribute dimension labels corresponding to at least one historical object contained in the selected cluster can be obtained. Based on at least one attribute dimension label, the target profile features corresponding to the target object can be obtained.
[0302] Optionally, when the historical records associated with the target object are historical input records, based on the historical input records associated with the target object and the input similarity between them and the historical input records in each candidate input information cluster, the target input information cluster that meets the input similarity condition is selected from each candidate input information cluster. Then, the attribute dimension label corresponding to at least one historical object contained in the target input information cluster is obtained. Based on at least one attribute dimension label, the target profile feature corresponding to the target object is obtained.
[0303] Each candidate input information cluster contains the identification information of each historical object and its corresponding historical input information. After selecting the target input information cluster, the attribute dimension labels corresponding to at least one historical object contained in the target input information cluster can be obtained. Then, based on at least one attribute dimension label, the target profile features corresponding to the target object are obtained. Typically, the target input information cluster contains multiple historical objects. In some cases, at least one attribute dimension label corresponding to some historical objects can be obtained. Then, based on at least one attribute dimension label corresponding to some historical objects, the target profile features corresponding to the target object are obtained. For example, the target profile features corresponding to the target object can be obtained based on at least one attribute dimension label corresponding to any historical object. Alternatively, the frequency of at least one attribute dimension label corresponding to each historical object in the target input information cluster can be counted, and the target profile features corresponding to the target object can be obtained based on the attribute dimension label with the highest frequency.
[0304] For example: See Figure 24 The diagram illustrates an example of obtaining target profile features in this application. The target input information cluster contains five historical objects: historical object 1, historical object 2, historical object 3, historical object 4, and historical object 5. The attribute dimension label corresponding to historical object 1 is "male," the attribute dimension label corresponding to historical object 2 is "male," the attribute dimension label corresponding to historical object 3 is "male," and the attribute dimension label corresponding to historical object 4 is "female." The attribute dimension label corresponding to historical object 5 could not be obtained. In the target input information cluster, the attribute dimension label "male" appears three times, and the attribute dimension label "female" appears once. Therefore, based on the attribute dimension label "male," the target profile features corresponding to the target object are obtained.
[0305] Optionally, based on at least one attribute dimension label, it is also necessary to first convert at least one attribute dimension label into a corresponding sample feature string, and then obtain the target profile features corresponding to the target object based on at least one sample feature string. It should be noted that the correspondence between attribute dimension labels and sample feature strings in the process of training the text prediction model is the same as the correspondence between attribute dimension labels and sample feature strings in the process of predicting text information.
[0306] Optionally, if, during the training of the context prediction model, at least one set of sample feature strings that meets a set of predetermined thresholds is selected based on at least one sample feature string, and the sample profile features corresponding to the sample object are obtained based on this set of at least one sample feature string, then during context information prediction, after converting at least one attribute dimension label into feature strings, at least one set of feature strings that meets a set of predetermined thresholds is selected based on at least one feature string, and the target profile features corresponding to the target object are obtained based on this set of at least one feature string. In this case, at least one set of feature strings can be directly used as the target profile features corresponding to the target object.
[0307] Optionally, when the historical records associated with the target object are historical click records, based on the historical click records associated with the target object and the click similarity between them and the historical click records in each candidate click information cluster, the target click information cluster that meets the click similarity condition is selected from each candidate click information cluster. Then, the attribute dimension label corresponding to at least one historical object contained in the target click information cluster is obtained. Based on at least one attribute dimension label, the target profile feature corresponding to the target object is obtained.
[0308] Each candidate click information cluster contains the identification information of each historical object and its corresponding historical click information. After selecting the target click information cluster, the attribute dimension label corresponding to at least one historical object contained in the target click information cluster can be obtained. Then, based on at least one attribute dimension label, the target profile feature corresponding to the target object can be obtained. Typically, a target click information cluster contains multiple historical objects. In some cases, at least one attribute dimension label corresponding to some historical objects can be obtained. Then, based on at least one attribute dimension label corresponding to some historical objects, the target profile feature corresponding to the target object can be obtained. For example, the target profile feature corresponding to the target object can be obtained based on at least one attribute dimension label corresponding to any historical object. Alternatively, the frequency of at least one attribute dimension label corresponding to each historical object in the target click information cluster can be counted, and the target profile feature corresponding to the target object can be obtained based on the attribute dimension label with the highest frequency.
[0309] For example, the target click information cluster contains 5 historical objects: Historical Object 1, Historical Object 2, Historical Object 3, Historical Object 4, and Historical Object 5. The attribute dimension label for Historical Object 1 is "Female," the attribute dimension label for Historical Object 2 is "Female," the attribute dimension label for Historical Object 3 is "Female," and the attribute dimension label for Historical Object 4 is "Male." The attribute dimension label for Historical Object 5 could not be obtained. In the target click information cluster, the attribute dimension label "Female" appears 3 times, and the attribute dimension label "Male" appears 1 time. Therefore, based on the attribute dimension label "Female," the target profile feature corresponding to the target object is obtained.
[0310] If, during the training of the text prediction model, for each sample object, at least one attribute dimension corresponding to the sample attribute dimension label is obtained, and then the sample profile features corresponding to the sample object are obtained based on the sample attribute dimension label, then the target profile features corresponding to the target object can be obtained directly based on at least one attribute dimension label.
[0311] If, during the training of a context prediction model, for a sample object, at least one attribute dimension corresponding to each attribute dimension is obtained, and each attribute dimension label is converted into a corresponding sample feature string, and then the sample profile features corresponding to the sample object are obtained based on the at least one sample feature string, then based on the at least one attribute dimension label, it is also necessary to first convert the at least one attribute dimension label into a corresponding sample feature string, and then obtain the target profile features corresponding to the target object based on the at least one sample feature string. It should be noted that the correspondence between attribute dimension labels and sample feature strings in the process of training the context prediction model is the same as the correspondence between attribute dimension labels and sample feature strings in the process of predicting context information.
[0312] Optionally, if, during the training of the context prediction model, at least one set of sample feature strings that meets a set of predetermined thresholds is selected based on at least one sample feature string, and the sample profile features corresponding to the sample object are obtained based on this set of at least one sample feature string, then during context information prediction, after converting at least one attribute dimension label into feature strings, at least one set of feature strings that meets a set of predetermined thresholds is selected based on at least one feature string, and the target profile features corresponding to the target object are obtained based on this set of at least one feature string. In this case, at least one set of feature strings can be directly used as the target profile features corresponding to the target object.
[0313] Optionally, in some cases, the target profile features corresponding to the target object contain only one attribute dimension label. For example, it may contain only gender, age, personality, interest, or geographic dimensions. In these cases, to improve the efficiency and accuracy of context prediction, a corresponding context prediction model can be trained for each attribute dimension, resulting in context prediction models for gender, age, personality, interest, and geographic dimensions, respectively.
[0314] When training the context prediction model for each attribute dimension, a set of sample information groups is obtained. Each sample information group contains: sample profile features corresponding to the sample object, and one sample context message and one selected sample context message from the sample object within a set historical time period. The sample profile features include an attribute dimension label. The number of times the sample context message in each sample information group is associated with the corresponding sample information group in history is determined. Based on the obtained number of times each historical association occurs, the candidate conditional probabilities of the sample context message in each sample information group are determined and stored in association.
[0315] For each attribute dimension, a corresponding context prediction model is trained. Then, when predicting context information, if the preceding context information of the target object is received, the target profile feature corresponding to the target object is obtained as an attribute dimension label. Based on the preceding context information and the target profile feature, the corresponding target information group is obtained. An attribute dimension corresponding to the target profile feature is obtained. From the trained candidate context prediction models, the context prediction model corresponding to the attribute dimension is selected, and the target information group is input into the selected context prediction model.
[0316] For example: See Figure 25 The diagram illustrates an example of selecting a context prediction model in this application. The trained candidate context prediction models are: candidate context prediction model 1 for the gender dimension, candidate context prediction model 2 for the age dimension, candidate context prediction model 3 for the personality dimension, candidate context prediction model 4 for the interest dimension, and candidate context prediction model 5 for the geographic dimension. If one of the attribute dimensions corresponding to the target profile features is the interest dimension, then from the trained candidate context prediction models, the context prediction model corresponding to the attribute dimension is selected as candidate context prediction model 4 for the interest dimension, and the target information group is input into the selected context prediction model.
[0317] In this embodiment of the application, for a target profile feature that contains only one attribute dimension, the target information group containing the context information of the target object input and the target profile feature is input into the context prediction model corresponding to the attribute dimension. This can avoid interference from other attribute dimension labels on the context information prediction, thereby improving the efficiency and accuracy of context information prediction.
[0318] Optional, see below Figure 26 The diagram shown illustrates the overall process for predicting context information in this embodiment of the application. The overall process for predicting context information in this embodiment includes:
[0319] S100: Obtain the sample profile features corresponding to each sample object.
[0320] Based on the historical input information or historical click information triggered by each sample object, obtain the sample profile features corresponding to each sample object.
[0321] S101: Based on the sample profile features corresponding to each sample object, train the prediction model below.
[0322] Each sample object's corresponding sample profile features, along with the context information of one sample input and the selected context information within a defined historical time period, constitute a sample information group. The sample information groups corresponding to each sample object collectively form a sample information group set. The context prediction model is trained based on this sample information group set.
[0323] The prediction model described below can be an N-gram model in natural language processing. An N-gram model is a statistical language model used to predict the nth word based on the previous (n-1) words. In the input application domain, the previous n-1 words refer to the preceding information already provided by the target, while the nth word is the content the target will input. The prediction results are provided as candidates for the target to choose from.
[0324] For example, the idea behind the N-gram model is as follows: Given a string of letters, such as "forex", what is the next most likely letter? From the training corpus data, N probability distributions can be obtained through maximum likelihood estimation: the probability of letter 'a' is 0.4, the probability of letter 'b' is 0.0001, etc. That is, using a large-scale corpus, conditional probabilities p(a|forex) = 0.4, p(b|forex) = 0.0001, etc., can be obtained statistically. In the field of input prediction, N-gram models at the word and sentence levels can usually be obtained by statistically analyzing large-scale user corpora, for example, p(thank you|okay,) = 0.3, p(suspicious frost on the ground|moonlight before the bed) = 0.9. After obtaining such a language model, it only needs to be stored as key-value pairs or a trie tree. During the target input process, the preceding information is used as the key, and after matching and obtaining the value in the language model, the top N candidates can be selected and provided to the user based on the magnitude of the conditional probabilities.
[0325] S102: Based on the trained context prediction model, predict the context information.
[0326] Upon receiving the context information input from the target object, the system obtains the target profile features corresponding to the target object, and based on the context information and target profile features, obtains the corresponding target information group. The target information group is then input into a trained context prediction model, and based on the output of the model, at least one target context information from the context information is obtained.
[0327] Based on the same inventive concept, embodiments of this application also provide a device for predicting subsequent information. See also... Figure 27 The diagram shown is a structural schematic of a device for predicting context information as described in the embodiments of this application, which may include:
[0328] The first acquisition module 4000 is used to obtain the target profile features corresponding to the target object when it receives the above information input by the target object, and obtain the corresponding target information group based on the above information and the target profile features;
[0329] The second acquisition module 4010 is used to input the target information group into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability.
[0330] The third obtaining module 4020 is used to obtain at least one target context information of the preceding context information based on at least one candidate context information and its corresponding candidate conditional probability.
[0331] Optionally, when obtaining the target profile features corresponding to the target object, the first obtaining module 4000 is specifically used for:
[0332] Based on the historical input records associated with the target object, obtain the target profile features corresponding to the target object; or,
[0333] Based on the historical click records associated with the target object, the target profile features corresponding to the target object are obtained.
[0334] Optionally, based on the historical input records associated with the target object, the target profile features corresponding to the target object are obtained. The first obtaining module 4000 is specifically used for:
[0335] Based on the identification information of the target object, obtain the first occurrence count of each attribute dimension phrase in the historical input records associated with the target object;
[0336] Select at least one attribute-dimensional phrase whose first occurrence count reaches a preset threshold for the first input information;
[0337] Based on the selected at least one attribute dimension phrase and the mapping relationship between each attribute dimension phrase and the attribute dimension label, obtain the attribute dimension label corresponding to each of the selected at least one attribute dimension phrase.
[0338] Based on at least one attribute dimension label, obtain the target profile features corresponding to the target object.
[0339] Optionally, when obtaining the target profile features corresponding to the target object based on the historical click records associated with the target object, the first obtaining module 4000 is specifically used for:
[0340] Based on the identification information of the target object, obtain the second occurrence count of each of the at least one historical click information clicked by the target object from the candidate click information list in the historical click records associated with the target object;
[0341] Select at least one historical click information whose second occurrence count reaches the preset threshold for the first click information count;
[0342] Based on the selected historical click information and the mapping relationship between each click information and the attribute dimension label, obtain the attribute dimension label corresponding to each of the selected historical click information.
[0343] Based on at least one attribute dimension label, obtain the target profile features corresponding to the target object.
[0344] Optionally, when obtaining the target profile features corresponding to the target object, the first obtaining module 4000 is specifically used for:
[0345] Based on the historical records associated with the target object, and combined with collaborative filtering, the similarity between the historical records and the candidate records in each candidate cluster is determined, and clusters that meet the similarity conditions are selected from each candidate cluster. Each candidate cluster is obtained by clustering each historical object based on the similarity between the candidate records associated with each historical object.
[0346] Based on the cluster labels corresponding to the selected clusters, the target profile features corresponding to the target object are obtained.
[0347] Optionally, when obtaining the target profile features corresponding to the target object based on at least one attribute dimension label, the first obtaining module 4000 is specifically used for:
[0348] Convert at least one attribute dimension label into a feature string;
[0349] Based on at least one feature string, obtain the target profile features corresponding to the target object.
[0350] Optionally, when obtaining the target profile features corresponding to the target object based on at least one feature string, the first obtaining module 4000 is specifically used for:
[0351] Based on at least one feature string, select at least one set of feature strings that meet a set quantity threshold;
[0352] Based on at least one set of feature strings, obtain the target profile features corresponding to the target object.
[0353] Optionally, when the target information group is input into the trained context prediction model, the second acquisition module 4010 is specifically used for:
[0354] Obtain an attribute dimension corresponding to the target profile feature, and select the trained context prediction model corresponding to the attribute dimension from the various candidate context prediction models that have been trained.
[0355] Input the target information group into the selected trained context prediction model.
[0356] Optionally, when obtaining at least one target context information of the preceding context based on at least one candidate context information and its corresponding candidate conditional probability, the second obtaining module 4010 is specifically used for:
[0357] From at least one candidate conditional probability, select at least one target conditional probability that satisfies the probability condition;
[0358] The candidate context information corresponding to at least one target conditional probability is used as at least one target context information of the context information.
[0359] Optionally, when the target information group is input into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability, the second obtaining module 4010 is specifically used for:
[0360] Based on the trained context prediction model, obtain sample information groups that match the target information group;
[0361] At least one sample context information corresponding to the sample information group and its corresponding candidate conditional probability are taken as at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability.
[0362] Optionally, when selecting at least one target conditional probability that satisfies the probability condition from at least one candidate conditional probability, the third obtaining module 4020 is specifically used for:
[0363] From at least one candidate conditional probability, select at least one target conditional probability that reaches the probability threshold; or,
[0364] From at least one candidate conditional probability, select at least one target conditional probability of a predetermined number in descending order of candidate conditional probabilities.
[0365] Optionally, in this application embodiment, a training device for the following prediction model is also provided, see [link to relevant documentation]. Figure 28 The diagram shown is a schematic representation of the training device for the route recommendation model in this embodiment of the application.
[0366] The fourth acquisition module 4100 is used to acquire a set of sample information groups, wherein each sample information group includes: the sample profile features corresponding to the sample object, and the sample context information and the selected sample context information input by the sample object within a set historical time period;
[0367] The first determining module 4110 is used to determine the sample context information in each sample information group and the number of times it appears in the historical association with the corresponding sample information group.
[0368] The second determining module 4120 is used to determine the candidate conditional probability of the sample context information in each sample information group based on the number of occurrences of each historical association and to store the association.
[0369] Optionally, when determining the candidate conditional probability of the context information of each sample in each sample information group based on the obtained occurrence counts of each historical association, the second determining module 4120 is specifically used for:
[0370] Determine the total number of times sample information groups with identical contextual information and sample profile features appear in the sample information group set;
[0371] Based on the ratio of the number of occurrences of each historical association to the total number of occurrences, the candidate conditional probabilities corresponding to the context information of each sample information group are determined.
[0372] Optionally, when obtaining the sample profile features corresponding to each sample object, the fourth obtaining module 4100 is also used for:
[0373] For each sample object, obtain the sample attribute dimension label corresponding to at least one attribute dimension; wherein, the attribute dimension includes at least one of the following: gender dimension, age dimension, personality dimension, interest dimension, and region dimension;
[0374] Convert at least one sample attribute dimension label into the corresponding sample feature string;
[0375] Based on at least one sample feature string, obtain the sample profile features corresponding to the sample object.
[0376] Optionally, when obtaining the sample profile features corresponding to the sample object based on at least one sample feature string, the fourth obtaining module 4100 is specifically used for:
[0377] Based on at least one sample feature string, select a set of at least one sample feature string that meets a set quantity threshold;
[0378] Based on at least one set of sample feature strings, obtain the sample profile features corresponding to the sample object.
[0379] Having described the methods and apparatus for predicting the following information according to exemplary embodiments of this application, we will now describe an electronic device according to another exemplary embodiment of this application.
[0380] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0381] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device, see reference. Figure 29 As shown, this is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. The electronic device 4200 may include at least a processor 4201 and a memory 4202. The memory 4202 stores program code, which, when executed by the processor 4201, causes the processor 4201 to perform the steps of any of the above-described methods for predicting the following information.
[0382] In some possible implementations, the computing device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps described above in the various exemplary embodiments of this application for predicting the following information.
[0383] The following reference Figure 30 To describe a computing device 4300 according to this embodiment of the present application. For example... Figure 30 As shown, the computing device 4300 is presented in the form of a general-purpose computing device. The components of the computing device 4300 may include, but are not limited to: at least one processing unit 4301, at least one storage unit 4302, and a bus 4303 connecting different system components (including storage unit 4302 and processing unit 4301).
[0384] Bus 4303 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0385] Storage unit 4302 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 43021 and / or cache storage unit 43022, and may further include read-only memory (ROM) 43023.
[0386] Storage unit 4302 may also include a program / utility 43025 having a set (at least one) of program modules 43024, such program modules 43024 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0387] The computing device 4300 can also communicate with one or more external devices 4304 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with the computing device 4300, and / or any device that enables the computing device 4300 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 4305. Furthermore, the computing device 4300 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 4306. As shown, network adapter 4306 communicates with other modules used in the computing device 4300 via bus 4303. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the computing device 4300, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0388] Based on the same inventive concept as the above-described method embodiments, various aspects of the method for predicting context information provided in this application can also be implemented as a program product, which includes program code. When the program product is run on an electronic device, the program code causes the electronic device to perform the steps in the method for predicting context information according to the various exemplary embodiments of this application described above. For example, the electronic device can perform actions such as... Figure 10 The steps are shown in the figure.
[0389] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0390] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0391] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for predicting subsequent information, characterized in that, include: Upon receiving the aforementioned information input by the target object, the target profile features corresponding to the target object are obtained based on the historical input records associated with the target object. Alternatively, based on the historical click records associated with the target object, the target profile features corresponding to the target object can be obtained; The method of obtaining target profile features corresponding to the target object based on the historical input records associated with the target object includes: obtaining the first occurrence count of at least one attribute dimension phrase in the historical input records associated with the target object according to the identification information of the target object; selecting at least one attribute dimension phrase whose first occurrence count reaches a preset first input information frequency threshold; obtaining the attribute dimension label corresponding to each of the selected at least one attribute dimension phrase according to the at least one attribute dimension phrase and the mapping relationship between each attribute dimension phrase and the attribute dimension label; and obtaining the target profile features corresponding to the target object based on the at least one attribute dimension label. Based on the historical click records associated with the target object, the target profile features corresponding to the target object are obtained, including: obtaining the second occurrence count of each of at least one historical click information clicked by the target object from the candidate click information list in the historical click records associated with the target object, according to the identification information of the target object; selecting at least one historical click information whose second occurrence count reaches a preset first click information count threshold; obtaining the attribute dimension label corresponding to each of the selected at least one historical click information according to the at least one historical click information and the mapping relationship between each click information and the attribute dimension label; and obtaining the target profile features corresponding to the target object based on the at least one attribute dimension label. Based on the above information and the target profile features, obtain the corresponding target information group; The target information group is input into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group, and their respective candidate conditional probabilities. Based on the at least one candidate context information and its corresponding candidate conditional probability, at least one target context information of the preceding context information is obtained.
2. The method as described in claim 1, characterized in that, Obtaining the target profile features corresponding to the target object specifically includes: Based on the historical records associated with the target object, and combined with collaborative filtering, the similarity between the historical records and the candidate records in each candidate cluster is determined, and clusters that meet the similarity conditions are selected from each candidate cluster; wherein, each candidate cluster is obtained by clustering the historical objects based on the similarity between the candidate records associated with each historical object. Based on the cluster labels corresponding to the selected clusters, the target profile features corresponding to the target object are obtained.
3. The method as described in claim 1, characterized in that, The step of obtaining the target profile features corresponding to the target object based on at least one attribute dimension label specifically includes: Convert the at least one attribute dimension label into a feature string; Based on at least one feature string, the target profile features corresponding to the target object are obtained.
4. The method as described in claim 3, characterized in that, The step of obtaining the target profile features corresponding to the target object based on at least one feature string specifically includes: Based on the at least one feature string, select at least one set of feature strings that meets the set quantity threshold; Based on the at least one set of feature strings, the target profile features corresponding to the target object are obtained.
5. The method as described in claim 1, characterized in that, The step of inputting the target information group into the trained context prediction model specifically includes: Obtain an attribute dimension corresponding to the target profile feature, and select the trained context prediction model corresponding to the attribute dimension from the various candidate context prediction models that have been trained. The target information group is input into the trained context prediction model.
6. The method as described in claim 1 or 5, characterized in that, The step of obtaining at least one target context information based on the at least one candidate context information and its corresponding candidate conditional probability specifically includes: From at least one candidate conditional probability, select at least one target conditional probability that satisfies the probability condition; The candidate context information corresponding to each of the at least one target conditional probabilities is used as at least one target context information of the preceding context information.
7. The method as described in claim 1, characterized in that, The step of inputting the target information group into a trained context prediction model to obtain at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability specifically includes: Based on the trained context prediction model, a sample information group that matches the target information group is obtained; The at least one sample context information corresponding to the sample information group and its corresponding candidate conditional probability are taken as the at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability.
8. The method as described in claim 6, characterized in that, The prediction model described below was trained in the following manner: Obtain a set of sample information groups, wherein each sample information group contains: sample profile features corresponding to the sample object, and, within a set historical time period, a sample context information input by the sample object and a selected sample context information; Determine the contextual information of each sample in each sample information group and the number of times it appears in the historical association with the corresponding sample information group; Based on the frequency of occurrence of each historical association, the candidate conditional probabilities of the sample context information in each sample information group are determined and stored in association.
9. The method as described in claim 8, characterized in that, The step of determining the candidate conditional probability of sample context information in each sample information group based on the obtained frequency of occurrence of each historical association specifically includes: Determine the total number of times sample information groups with identical sample context information and sample profile features appear in the sample information group set; Based on the ratio of the number of occurrences of each historical association to the total number of occurrences, the candidate conditional probability corresponding to the sample context information in each sample information group is determined.
10. The method as described in claim 8, characterized in that, The sample profile features corresponding to each sample object are determined in the following way: For the sample object, obtain sample attribute dimension labels corresponding to at least one attribute dimension; wherein, the attribute dimension includes at least one of gender dimension, age dimension, personality dimension, interest dimension, and region dimension; Convert at least one sample attribute dimension label into the corresponding sample feature string; Based on at least one sample feature string, obtain the sample profile features corresponding to the sample object.
11. The method as described in claim 10, characterized in that, The step of obtaining the sample profile features corresponding to the sample object based on at least one sample feature string specifically includes: Based on the at least one sample feature string, select at least one set of sample feature strings that meets a set quantity threshold; Based on the at least one set of sample feature strings, obtain the sample profile features corresponding to the sample object.
12. The method as described in claim 6, characterized in that, The step of selecting at least one target conditional probability that satisfies the probability condition from at least one candidate conditional probability specifically includes: From at least one candidate conditional probability, select at least one target conditional probability that reaches the probability threshold; or, From at least one candidate conditional probability, select at least one target conditional probability of a predetermined number in descending order of candidate conditional probabilities.
13. An apparatus for predicting subsequent information, characterized in that, include: The first obtaining module is used to, upon receiving the preceding information input by the target object, obtain the target profile features corresponding to the target object based on the historical input records associated with the target object; or, obtain the target profile features corresponding to the target object based on the historical click records associated with the target object. Specifically, when obtaining the target profile features corresponding to the target object based on the historical input records associated with the target object, the first obtaining module is used to: obtain the first occurrence count of each of at least one attribute dimension phrase in the historical input records associated with the target object according to the identification information of the target object; select at least one attribute dimension phrase whose first occurrence count reaches a preset first input information frequency threshold; obtain the attribute dimension label corresponding to each of the selected at least one attribute dimension phrase according to the at least one attribute dimension phrase and the mapping relationship between each attribute dimension phrase and the attribute dimension label; and obtain the target profile features corresponding to the target object based on the at least one attribute dimension label. When obtaining the target profile features corresponding to the target object based on the historical click records associated with the target object, the first obtaining module is specifically used to: obtain, according to the identification information of the target object, the second occurrence count corresponding to at least one historical click information clicked by the target object from the candidate click information list in the historical click records associated with the target object; select at least one historical click information whose second occurrence count reaches a preset first click information count threshold; obtain the attribute dimension label corresponding to each of the selected at least one historical click information based on the selected at least one historical click information and the mapping relationship between each click information and the attribute dimension label; and obtain the target profile features corresponding to the target object based on the at least one attribute dimension label. The first acquisition module is also used to obtain a corresponding target information group based on the above information and the target profile features; The second acquisition module is used to input the target information group into the trained context prediction model to obtain at least one candidate context information corresponding to the target information group and its corresponding candidate conditional probability. The third obtaining module is used to obtain at least one target context information of the preceding context information based on the at least one candidate context information and their respective candidate conditional probabilities.
14. The apparatus as claimed in claim 13, characterized in that, When obtaining the target profile features corresponding to the target object, the first obtaining module is specifically used for: Based on the historical records associated with the target object, and combined with collaborative filtering, the similarity between the historical records and the candidate records in each candidate cluster is determined, and clusters that meet the similarity conditions are selected from each candidate cluster. Each candidate cluster is obtained by clustering each historical object based on the similarity between the candidate records associated with each historical object. Based on the cluster labels corresponding to the selected clusters, the target profile features corresponding to the target object are obtained.
15. The apparatus as claimed in claim 13, characterized in that, When obtaining the target profile features corresponding to the target object based on at least one attribute dimension label, the first obtaining module is specifically used for: Convert at least one attribute dimension label into a feature string; Based on at least one feature string, obtain the target profile features corresponding to the target object.
16. The apparatus as claimed in claim 15, characterized in that, When obtaining the target profile features corresponding to the target object based on at least one feature string, the first obtaining module is specifically used for: Based on at least one feature string, select at least one set of feature strings that meet a set quantity threshold; Based on at least one set of feature strings, obtain the target profile features corresponding to the target object.
17. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of any of the methods described in claims 1 to 12.
18. A computer-readable storage medium, characterized in that, It includes program code that, when run on an electronic device, causes the electronic device to perform the steps of the method of any one of claims 1 to 12.
19. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 12.