User portrait-based instruction construction and use method and device, and medium
By generating user portraits and building personalized instructions based on this, the problem of lack of personalization of instructions in the prior art is solved, and more efficient and personalized user interaction is achieved.
Patent Information
- Application Number
- CN202510094604.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
AI Technical Summary
It is difficult for the prior art to generate personalized instructions that meet different user characteristics, and traditional instruction construction methods lack flexibility and scalability, and cannot be dynamically adjusted to meet the diverse needs of users.
By collecting user background information, interest information and behavioral information, user portraits are generated using feature extraction algorithms and clustering analysis algorithms. Based on user portraits, build and match command templates to generate personalized personal instructions.
It realizes the generation of highly personalized instructions based on user portraits, improves the pertinence and effectiveness of instructions, enhances the user experience, and enables the AI system to better understand user intentions and provide personalized services.
Smart Images

Figure CN120011635A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of large model instructions, and in particular to a method, device and medium for constructing and using instructions based on user portraits. Background Art
[0002] In today's information society, with the rapid development of Internet technology and the popularization of smart devices, the interaction between users and digital systems has become increasingly frequent. However, traditional information retrieval and question-answering systems often adopt a general processing method, ignoring the individual differences between users, resulting in a lack of pertinence and personalization in the response content. In order to improve user experience and meet the diverse needs of users, refined modeling and personalized services for users have become a hot topic in research.
[0003] On the one hand, traditional user portrait construction methods mainly rely on basic information of users, such as age and gender, but this information often fails to fully reflect the interests and behavioral characteristics of users. At the same time, even if the interests and behaviors of users are taken into account, there is often a lack of systematic processing and analysis methods, making it difficult to effectively transform this information into specific instructions that can guide system behavior. On the other hand, most of the existing instruction construction and use methods are based on fixed templates or rules, lacking flexibility and scalability. This fixed method is difficult to adapt to the diverse needs of different user groups, and cannot be dynamically adjusted according to users' real-time behavior and information feedback.
[0004] Therefore, how to generate instructions that meet the characteristics of different users and apply the instructions to user problems has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a method, device and medium for constructing and using instructions based on user portraits, so as to solve the following technical problems: how to generate instructions that meet the characteristics of different users and apply the instructions to user problems.
[0006] In a first aspect, an embodiment of the present application provides a method for constructing and using instructions based on user portraits, characterized in that the method includes: collecting background information, interest information and behavior information of a user group; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus direction and preferred content, and the behavior information includes search records, question and answer records and browsing records; processing the background information, interest information and behavior information of the user group based on a preset feature extraction algorithm and a clustering analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for a group and an individual user portrait for an individual, and the user portrait includes at least one of the following data: age, Occupation, hobbies, language style and comprehensive background; processing the group user portrait based on a preset template database to generate multiple first instruction template sets; processing multiple first instruction templates based on a preset data enhancement algorithm to generate multiple second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; matching the individual user portrait based on multiple second instruction template sets to generate a personal instruction template set suitable for the individual user portrait; collecting user questions, processing the user questions and personal instruction template sets based on a preset similarity algorithm and natural language processing algorithm to generate personal instructions; processing the personal instructions and user questions based on a preset AI big model to generate replies.
[0007] In one implementation of the present application, the background information, interest information and behavior information of the user group are processed based on a preset feature extraction algorithm and a cluster analysis algorithm to generate a user portrait, specifically including: cleaning, screening and organizing the background information, interest information and behavior information to generate a text description of the user portrait; extracting user features of the text description based on the feature extraction algorithm; wherein the feature extraction algorithm includes but is not limited to a text mining algorithm, a keyword extraction algorithm and a sentiment analysis algorithm; generating a personal user portrait based on the user features; processing the features based on a preset PCA dimensionality reduction algorithm to determine the main user features of the text description; processing the main user features based on the cluster analysis algorithm to divide the user group into multiple sub-user groups; calculating and processing multiple sub-user groups based on the feature extraction to label the user groups corresponding to the multiple sub-user groups with portrait labels to generate a group user portrait.
[0008] In one implementation of the present application, the user features are processed based on a preset PCA dimensionality reduction algorithm to determine the main user features of the text description, specifically including: normalizing the user features; calculating the covariance matrix of the user features based on the PCA dimensionality reduction algorithm, and solving its eigenvalues and eigenvectors; and selecting a preset number of user features as the main user features according to the order of eigenvalues from large to small.
[0009] In one implementation of the present application, the group user portrait is processed based on a preset template database to generate multiple first instruction template sets, specifically including: constructing a template database; wherein the template database contains multiple preset instruction templates, each instruction template contains a framework, keywords and grammatical structure; filling the user tag of the group user portrait into the corresponding position in the template database to generate a first instruction template set matching the group user portrait.
[0010] In one implementation of the present application, multiple first instruction templates are processed based on a preset data enhancement algorithm to generate multiple second instruction template sets, specifically including: performing synonym replacement, sentence transformation and semantic expansion on each template in the first instruction template set to generate multiple extended instruction templates; screening and optimizing the multiple extended instruction templates to obtain a second instruction template set.
[0011] In one implementation of the present application, the personal user portrait is matched based on multiple second instruction template sets to generate a personal instruction template set suitable for the personal user portrait, specifically including: cross-matching the personal user portrait based on multiple second instruction template sets to determine multiple second instruction template sets matching the personal user portrait; processing multiple second instruction template sets matching the personal user portrait based on the natural language processing algorithm to generate a personal adaptation template set adapted to the personal user portrait; writing user features in the personal user portrait into the personal adaptation template set to generate a personal instruction template set suitable for the personal user portrait.
[0012] In one implementation of the present application, user questions are collected, and the user questions and a set of personal instruction templates are processed based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions, specifically including: collecting user questions; processing the user questions and a set of personal instruction templates based on the similarity algorithm to select an adapted personal instruction template that is adapted to the user questions; processing the user questions based on the natural language algorithm to extract question feature words of the user questions; wherein the question feature words are associated with feature words in the personal instruction template; and replacing corresponding placeholders and keywords of the adapted personal instruction template based on the question feature words to generate personal instructions.
[0013] In one implementation of the present application, the personal instructions and user questions are processed based on a preset AI big model to generate a reply, specifically including: passing the personal instructions and user questions as input data to the AI big model; the AI big model performs semantic understanding, context analysis, and knowledge reasoning on the input data based on deep learning; based on the analysis results, the AI big model generates reply content that matches the personal instructions and user questions.
[0014] In a second aspect, an embodiment of the present application further provides an instruction construction and use device based on user portraits, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: collect background information, interest information and behavior information of a user group; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus direction and preferred content, and the behavior information includes search records, question and answer records and browsing records; the background information, interest information and behavior information of the user group are processed based on a preset feature extraction algorithm and a clustering analysis algorithm to generate a user portrait; wherein the user portrait includes A group user portrait and a personal user portrait for an individual, wherein the user portrait includes at least one of the following data: age, occupation, hobby, language style and comprehensive background; processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets; processing a plurality of the first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; matching the personal user portrait based on a plurality of the second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; collecting user questions, processing the user questions and the personal instruction template set based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; processing the personal instructions and user questions based on a preset AI big model to generate replies.
[0015] In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium for constructing and using instructions based on user portraits, storing computer executable instructions, wherein the computer executable instructions are configured to: collect background information, interest information, and behavior information of a user group; wherein the background information includes age, gender, occupation, and cultural background, the interest information includes focus direction and preferred content, and the behavior information includes search records, question and answer records, and browsing records; process the background information, interest information, and behavior information of the user group based on a preset feature extraction algorithm and a clustering analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for a group and an individual user portrait for an individual, and the user portrait includes at least One of the following data: age, occupation, hobbies, language style and comprehensive background; processing the group user portrait based on a preset template database to generate multiple first instruction template sets; processing multiple first instruction templates based on a preset data enhancement algorithm to generate multiple second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; matching the personal user portrait based on multiple second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; collecting user questions, processing the user questions and the personal instruction template set based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; processing the personal instructions and user questions based on a preset AI big model to generate replies.
[0016] The embodiment of the present application provides a method, device and medium for constructing and using instructions based on user portraits. By comprehensively collecting the background, interests and behavior information of the user group, and using feature extraction and cluster analysis algorithms, a user portrait containing rich data is generated, which covers both group characteristics and individual differences. Through the template database, multiple first instruction template sets are quickly generated according to the group user portrait, and then expanded into the second instruction template set through the data enhancement algorithm, which greatly enriches the diversity and adaptability of the instruction template. By matching the personal user portrait with the second instruction template set, a highly personalized personal instruction template set is generated to ensure that the instructions are closely related to the user characteristics. When the user asks a question, personal instructions are quickly and accurately generated through the similarity algorithm and the natural language processing algorithm, which improves the pertinence and effectiveness of the instructions. Finally, personal instructions and user questions are processed through the AI big model, deep semantic understanding, context analysis and knowledge reasoning are performed, and more intelligent reply content that meets user needs is generated. Not only the efficiency and accuracy of instruction generation are improved, but also the user experience is enhanced, so that the AI system can better understand the user's intentions and provide personalized and intelligent services. At the same time, through the optimization of PCA dimensionality reduction algorithm and cluster analysis algorithm, the computational complexity is reduced, the processing speed and stability of the system are improved, and the personalization and accuracy of instruction generation are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A flowchart of a method for constructing and using instructions based on user portraits provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the internal structure of a device for constructing and using instructions based on user portraits provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0021] The embodiments of the present application provide a method, device and medium for constructing and using instructions based on user portraits, so as to solve the following technical problem: how to generate diversified instructions that meet the characteristics of different users.
[0022] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0023] Figure 1 A flowchart of instruction construction and use based on user portrait is provided in the embodiment of the present application. Figure 1 As shown, the embodiment of the present application provides a method for constructing and using instructions based on user portraits, which specifically includes the following steps:
[0024] Step 1: Collect background information, interest information and behavior information of the user group; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus direction and preferred content, and the behavior information includes search history, question and answer history and browsing history.
[0025] Background information is the basic attributes of users, including age, gender, occupation and cultural background. This information can provide a theoretical basis for the question-answering model to understand user needs and provide personalized answers.
[0026] Age: refers to the actual age or age group of the user. Users of different age groups have different knowledge needs, language habits, and interests. For example, young people may pay more attention to fashion and technology topics, while the elderly may pay more attention to health and wellness topics.
[0027] In the embodiment of the present application, the user's age information can be obtained through user registration information, questionnaire survey or third-party data interface.
[0028] Gender: refers to the gender attribute of the user. Gender differences can lead to differences in users' interests, consumption habits, and language expressions. For example, female users may be more interested in beauty and parenting topics, while male users may be more interested in sports and automobile topics.
[0029] The embodiments of the present application can obtain the user's gender information through self-declaration by the user, behavior pattern analysis (such as shopping preferences), or inference from social media information.
[0030] Occupation: refers to the job or industry that the user is engaged in. Occupation determines the user's pace of life, spending power, and specific needs.
[0031] For example, white-collar users may be more concerned with topics such as workplace skills and time management, while student users may be more concerned with topics such as study materials and exam information.
[0032] The embodiment of the present application can obtain the user's occupational information through occupational information filled in by the user, work email domain name analysis or social media occupational tags.
[0033] Cultural background: refers to the user's education level, language usage habits and cultural identity.
[0034] Cultural background affects users’ values and aesthetics, which in turn affects their acceptance of Q&A content. For example, users with different cultural backgrounds may have different expectations and ways of expressing the answer to the same question.
[0035] The embodiment of the present application can infer the user's cultural background through the educational background, language usage habits or content consumption preferences filled in by the user.
[0036] Interest information reflects users' long-term interests and specific preferences, including focus areas and preferred content.
[0037] Focus: refers to the topics or fields that users have been paying attention to or interested in for a long time. For example, technology, sports, and entertainment. Through the content that users actively subscribe to, the keywords that they frequently search for, or the follow-up lists on social media, the embodiments of the present application can identify the user's focus. This information helps the question-answering model understand the user's interests and provide more targeted answers.
[0038] Preferred content: refers to the content type, style or specific work that the user prefers. For example, the type of movie, music style or news category that the user likes. Through the user's historical browsing history, likes, comments or sharing behavior, the embodiment of the present application can analyze the user's preferred content. This information helps the question-answering model understand the user's aesthetic preferences and content selection habits, so as to provide answers that are more in line with the user's taste.
[0039] Behavioral information reflects users' immediate needs and long-term behavior patterns, including search history, question and answer history, and browsing history.
[0040] Search history: records the query history of users on search engines. Search history is a direct reflection of users' immediate needs and also reflects users' long-term interests. For example, if a user frequently searches for a topic recently, it may indicate a high interest in the topic. The present invention obtains the user's search history through the search engine's log data or the user's authorized access rights (Note: it can be associated with a third-party platform to obtain search history).
[0041] Question and answer records: refers to the question and answer data generated when users interact with the question and answer big model. These data include questions raised by users, answers from the big model, and user feedback (such as satisfaction evaluation, further questions). By recording and analyzing these question and answer data, the embodiment of the present application can understand the user's needs, questions, interests, and knowledge mastery.
[0042] For example, if a user asks the same question multiple times, it may mean that the answer of the big model is not clear or accurate enough. The present invention obtains the user's question and answer record through the log data of the big model system or the access permission authorized by the user.
[0043] Browsing history: users’ browsing paths, dwell time, and click behaviors on websites and apps. Browsing history is an important basis for understanding users’ interests, preferences, and behavior patterns. For example, if users frequently browse articles or videos in a certain category, it may indicate that they have a high interest in that category.
[0044] The embodiments of the present application can collect the user's browsing history through tracking technology, log analysis or user behavior tracking tools.
[0045] Step 2: Process the background information, interest information and behavior information of the user group based on the preset feature extraction algorithm and cluster analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for the group and an individual user portrait for the individual, and the user portrait includes at least one of the following data: age, occupation, hobbies, language style and comprehensive background.
[0046] Step 21: Clean, filter and organize background information, interest information and behavior information to generate a text description of the user portrait.
[0047] First, we clean the collected user background information (such as age, gender, occupation, and educational background), interest information (such as areas of interest and preferred content), and behavioral information during the big model question-and-answer process (such as question content, question time, question frequency, and feedback on the big model's answers). We remove duplicate, invalid, or erroneous data.
[0048] Furthermore, key information related to the user portrait is filtered out from the cleaned data. The above information can reflect the characteristics of the user, such as age range, occupation type, and interest field.
[0049] Furthermore, the selected key information is organized into a structured text description, for example, the user's age, occupation, and field of interest are described in the form of sentences.
[0050] In one embodiment of step 21 of the present application:
[0051] For a user who frequently uses the question-and-answer model, the background information collected is "30 years old, male, doctor, undergraduate", the interest information is "focused on the medical field, especially orthopedic knowledge", and the behavior information is "questions mostly involve treatment methods for orthopedic diseases, and answers are required to be concise and accompanied by illustrations."
[0052] After cleaning, screening and sorting, the following text description was generated: "The user is a 30-year-old male doctor with a bachelor's degree. He has a strong interest in the medical field, especially orthopedic knowledge. During the question-and-answer process, he mostly asked questions about the treatment methods of orthopedic diseases and required the answers to be concise and accompanied by pictures."
[0053] Step 22: extract user features of the text description based on a feature extraction algorithm; wherein the feature extraction algorithm includes but is not limited to a text mining algorithm, a keyword extraction algorithm, and a sentiment analysis algorithm.
[0054] First, potential user features are mined from the text description through text mining algorithms. For example, the topics, keywords, and phrases of the user's questions are extracted. These features can reflect the user's interests and concerns.
[0055] Furthermore, the key information in the text is extracted through the keyword extraction algorithm. For example, for a user whose occupation is a doctor, the keywords "medicine" and "orthopedics" can be extracted. These keywords can summarize the main characteristics of the user.
[0056] Furthermore, sentiment analysis algorithms are used to analyze the sentiment tendencies in user questions and feedback. For example, it is used to determine whether the user's satisfaction with the answers given by the large model is positive, negative, or neutral. Sentiment tendencies can reflect the user's attitude and preference towards the question-and-answer service.
[0057] In one embodiment of step 22 of the present application:
[0058] For the text description in step 21, "orthopedic diseases" and "treatment methods" are extracted through the text mining algorithm; and the sentiment analysis algorithm is used to determine that the user's requirement for the answer is "concise and with attached pictures".
[0059] Step 23: Generate a personal user portrait based on user characteristics.
[0060] First, based on the extracted user features, combined with the preset portrait template and rules, a user portrait for the individual is generated. The portrait template should contain the user's basic information, interests, hobbies, and language style comprehensive data.
[0061] Furthermore, the user characteristics are filled into the portrait template to generate a personal user portrait. The personal user portrait reflects the individual characteristics of the user and provides a basis for personalized services.
[0062] In one embodiment of step 23 of the present application:
[0063] For the above-mentioned user (the embodiment in steps 21-22), the preset portrait template is: "The user is {age} {gender} {occupation}, {education}, {background}, {hobby or behavior}" to generate the following personal user portrait: "The user is a 30-year-old male doctor with a bachelor's degree. He has a strong interest in the medical field, especially orthopedic knowledge. During the question-and-answer process, he prefers to ask questions about the treatment methods of orthopedic diseases, and requires the answers to be concise and accompanied by illustrations. His language style is professional and rigorous.".
[0064] Step 24: Process features based on a preset PCA dimensionality reduction algorithm to determine the main user features of the text description.
[0065] Step 241: normalize the user features.
[0066] Since the value ranges and dimensions of user features are different, directly performing PCA dimensionality reduction may cause the results to be affected by features with larger dimensions. Therefore, before performing PCA dimensionality reduction, step 241 normalizes the user features and uniformly scales the values of all features to a specific range (such as between 0 and 1) to eliminate the impact of dimensional differences on the results.
[0067] In the prior art, the present application adopts a minimum-maximum normalization algorithm.
[0068] In an embodiment of step 241 of the present application, the extracted user features include the user's question frequency, feedback positivity, and expertise in the field of interest. These features have different value ranges and dimensions, such as the question frequency is measured in times, while the feedback positivity is measured in percentages.
[0069] In order to eliminate the influence of dimensional differences on the PCA dimensionality reduction results, the minimum-maximum normalization method is used to normalize these features, and the values of all features are uniformly scaled to between 0 and 1.
[0070] Step 242: Calculate the covariance matrix of the user features based on the PCA dimensionality reduction algorithm, and solve its eigenvalues and eigenvectors.
[0071] By calculating the covariance matrix of user features and solving its eigenvalues and eigenvectors, we can find the main direction of data change, that is, the direction of the principal component. The covariance matrix reflects the correlation between user features, the eigenvalue represents the variance in the direction of the corresponding eigenvector, and the eigenvector represents the direction of the data in the new coordinate system.
[0072] In an embodiment of step 242 of the present application, taking user features as an example, the covariance matrix of these user features is calculated, and the eigenvalues and eigenvectors thereof are solved. The main change direction of the data (i.e., the principal component direction) is determined by the order of the eigenvalues.
[0073] For example, the extracted user features include three dimensions: question frequency, feedback positivity, and expertise in the field of focus. By calculating the covariance matrix and solving its eigenvalues and eigenvectors, it is found that question frequency and feedback positivity have higher loading coefficients in the direction of the first principal component, which indicates that these two features play a dominant role in data changes.
[0074] Step 243: Select a preset number of user features as main user features according to the order of feature values from large to small.
[0075] After obtaining the eigenvalue and eigenvector, a preset number of main user features are selected according to the order of the eigenvalue from large to small. The larger the eigenvalue, the larger the variance in the direction of the corresponding eigenvector, that is, the more obvious the data change in this direction and the more information it contains. Therefore, a preset number of eigenvectors with larger eigenvalues are selected as the main user features. It should be noted that the preset number is formulated according to demand. For example, the preset number in the embodiment of the present application can be set to 5.
[0076] In an embodiment of step 243 of the present application: taking user features as an example, the first two main user features (ie, the first two principal components) are selected according to the order of feature values from large to small.
[0077] Step 25: Process the main user features based on a cluster analysis algorithm to divide the user group into multiple sub-user groups.
[0078] The main user features extracted in step 24 are processed by a cluster analysis algorithm, and the user group is divided into multiple sub-user groups according to the similarities and differences of the user features. Each sub-user group has similar user features, such as similar question topics, interest areas, and language styles.
[0079] In one embodiment of step 25 of the present application: taking the user group of the large question-answer model as an example, the extracted main user features are processed by a K-means algorithm, and the user group is divided into multiple sub-user groups by calculating the similarity between the user features (such as the Euclidean distance).
[0080] For example, users who are interested in the medical field can be divided into one sub-user group, and users who are interested in the legal field can be divided into another sub-user group. Users in each sub-user group have similar user characteristics and behavior patterns, which facilitates the subsequent generation of group user portraits and the provision of personalized services.
[0081] Step 26: Calculate and process multiple sub-user groups based on feature extraction to label user groups corresponding to the multiple sub-user groups with portrait labels to generate group user portraits.
[0082] Perform feature extraction and analysis on the multiple sub-user groups divided in step 25 to extract the main features of each sub-user group. Then, based on these main features, label the user group corresponding to each sub-user group with a portrait label (age group, occupation type, hobbies, language style). Finally, generate a group user portrait for the group in combination with the portrait label. The group user portrait can reflect the overall characteristics and behavior patterns of the sub-user group.
[0083] In an embodiment of step 26 of the present application, feature extraction and analysis are performed on the multiple sub-user groups that are divided. Users in the sub-user group that focuses on the medical field generally have a high educational background and professional medical knowledge background; while users in the sub-user group that focuses on the legal field generally have a deep understanding and attention to legal provisions and cases. Based on these main features, portrait labels (such as "medical professionals" and "legal professionals") are respectively labeled for these two sub-user groups.
[0084] Sub-user group 11: medical professionals, highly educated;
[0085] Sub-user group 12: Legal professionals, those concerned with legal regulations.
[0086] Finally, these portrait tags are combined to generate group user portraits for these two sub-user groups.
[0087] Step 3: Process the group user portrait based on a preset template database to generate multiple first instruction template sets.
[0088] Step 31, constructing a template database; wherein the template database includes a variety of preset instruction templates, each instruction template includes a framework, keywords and grammatical structure.
[0089] The database contains a variety of pre-designed instruction templates. These templates are customized to meet the needs of the question-answering big model in different application scenarios. Framework: defines the basic structure and layout of the instruction template, including the introduction, question body, and ending part. Keywords: are the core vocabulary in the instruction, which are directly related to the function and purpose of the instruction. For example, in the instruction template about health consultation, "health", "symptoms", and "treatment" are keywords. The selection of keywords should be based on the interests and needs in the user portrait to ensure the pertinence and effectiveness of the instructions. Grammatical structure: The grammatical structure is used to ensure the grammatical correctness and standardization of the instructions so that the generated instructions can be accurately parsed and executed by the question-answering big model. The design of the grammatical structure should follow the standards of natural language processing and the requirements of the question-answering big model.
[0090] It should be noted that the instruction templates in the template database come from multiple channels such as expert design, historical data analysis, and user feedback.
[0091] It is understandable that with the continuous changes in user needs and the continuous advancement of question-answering big model technology, the template database needs to be updated and maintained regularly. This includes adding new instruction templates, optimizing existing templates, deleting outdated templates, etc.
[0092] Step 32: Fill the user tags of the group user portraits into corresponding positions in the template database to generate a first instruction template set that matches the group user portraits.
[0093] The user tags in the group user portrait are combined with the instruction templates in the template database, and a set of instruction templates matching the sub-user group is generated by filling in or modifying the keywords, frames and grammatical structures in the templates.
[0094] First, extract key user tags from the group user portrait, such as age, gender, interest, occupation, and region.
[0095] Further, according to the user tag, a corresponding instruction template is selected from the template database.
[0096] Furthermore, by filling in or modifying keywords, frames or grammatical structures in the templates, a set of instruction templates matching a specific user group is generated.
[0097] For example, for a user subgroup described as "20-30 years old, female, interested in fashion shopping, and student by profession", an instruction template related to fashion shopping may be selected, and the "student" and "female" tags may be filled into corresponding positions in the template.
[0098] In one embodiment of step 32 of the present application:
[0099] Group user tags:
[0100] Age: 20-30 years old
[0101] Gender: Female
[0102] Hobbies: Fashion shopping
[0103] Occupation: Student
[0104] Select a fashion shopping related instruction template from the template database, for example, select the following template:
[0105] {User type} wants to know the latest information and matching suggestions about {fashion topic: to be extracted}. Please provide {level of detail: brief / detailed} answers.
[0106] Fill in the user tags in the corresponding positions in the template to generate an instruction template: Students want to know the latest information and detailed answers about the latest fashion trends and matching skills. Please provide detailed answers.
[0107] Repeat the above process to generate multiple instruction templates, and then generate an instruction template set:
[0108] 1. Students want to know the latest information and matching suggestions about the latest fashion shoes. Please provide detailed answers.
[0109] 2. Female users want to know the latest information and brief answers about spring clothing matching, please provide.
[0110] 3. Young women want to know the latest information and detailed answers about how to use cosmetics and skin care techniques. Please provide them.
[0111] Step 4: Process the plurality of first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets.
[0112] Step 41: Perform synonym replacement, sentence transformation and semantic expansion on each template in the first instruction template set to generate multiple extended instruction templates.
[0113] By performing synonym replacement, sentence transformation and semantic expansion on each template in the first instruction template set, a plurality of extended instruction templates having similar meanings to the original templates but different expressions are generated.
[0114] Through natural language processing technology, the keywords in the instruction template are replaced with their synonyms or near-synonyms. For example, in the instruction template about health consultation, "health" is replaced with "physical health" or "health status".
[0115] By changing the sentence structure of the instruction template, such as changing a declarative sentence into an interrogative sentence, changing an active sentence into a passive sentence, a variety of extended instruction templates with different expressions are generated.
[0116] Under the premise of keeping the original meaning of the instruction template unchanged, the instruction template can be semantically extended by adding additional information or description. For example, in the instruction template about travel recommendations, in addition to providing basic travel destination recommendations, additional information about travel seasons, transportation methods, and accommodation recommendations can be added. Semantic extension can enrich the content of the instruction template and improve the quality of the response of the question-answering model to user questions.
[0117] Step 42: Screen and optimize multiple extended instruction templates to obtain a second instruction template set.
[0118] The multiple extended instruction templates generated in step 41 are screened and optimized to obtain a second instruction template set that meets the requirements.
[0119] First, the generated extended instruction templates are checked for duplication through natural language processing technology or hash algorithm. For duplicate instruction templates, only one copy is retained to ensure the uniqueness and simplicity of the second instruction template set.
[0120] Furthermore, the quality of the extended instruction templates can be evaluated through manual review or machine learning methods. The evaluation indicators can include the clarity, accuracy, and applicability of the instruction templates. For instruction templates with lower quality, such as those that are vague, ambiguous, or do not meet user needs, they should be deleted or modified.
[0121] Furthermore, during the screening and optimization process, the instruction templates can be further optimized and adjusted. For example, lengthy or complex instruction templates can be simplified, and ambiguous instruction templates can be clarified and corrected. Through optimization and adjustment, the ease of use and adaptability of instruction templates can be improved, so that the question-answering model can understand and respond more accurately when processing user questions.
[0122] It is understandable that when generating the second set of instruction templates, it is also necessary to pay attention to controlling the number of instruction templates. Although the data enhancement algorithm can generate a large number of extended instruction templates, too many instruction templates may cause matching difficulties or response delays in the large question-and-answer model when processing user questions. Therefore, it is necessary to reasonably control the quantity and quality of instruction templates according to actual conditions and needs. The quantity control process can be manually selected or selected in the order of generation.
[0123] In an embodiment of step 42 of the present application:
[0124] Original instruction template: Please recommend a good movie.
[0125] Then, the original instruction template is processed according to the above steps.
[0126] Perform synonym replacement to get "Please recommend a wonderful movie" and "Please introduce a good movie";
[0127] By changing the sentence structure, we can get "Is there any good movie you can recommend to me" and "I need a good movie recommendation";
[0128] After semantic expansion, we can get "Please recommend a good movie suitable for watching at night" and "Please recommend a good movie suitable for couples to watch together".
[0129] Step 5: Match the personal user portrait based on multiple second instruction template sets to generate a personal instruction template set suitable for the personal user portrait.
[0130] Step 51: Cross-matching is performed based on the plurality of second instruction template sets and the personal user portrait to determine a plurality of second instruction template sets that match the personal user portrait.
[0131] First, we disassemble the individual user portraits and extract key feature tags. These tags can include multi-dimensional information such as user interest preferences (such as "likes technology content"), behavioral habits (such as "prefers long text answers"), and knowledge background (such as "focuses on the field of drones").
[0132] Furthermore, similarity calculation related to cosine similarity is performed based on the extracted feature labels and the features of each second instruction template set, and the similarity or matching score between each feature label and the template set features is calculated.
[0133] Finally, multiple instruction template sets are selected according to the scores and combined to determine multiple second instruction template sets that match the personal user portrait.
[0134] In one embodiment of step 51 of the present application: there is a user who likes science and technology content, prefers concise and clear answers, and often pays attention to drone technology.
[0135] According to the above-mentioned feature tags, templates related to science and technology content and with concise and clear answers are selected from multiple second instruction template sets, and special attention is paid to instruction templates related to drone technology for combination.
[0136] For example, the combined multiple second instruction template sets include "User {age}, {occupation}, {background}, {language habits}, please list the application cases of user {age}, {occupation}, {background}, {language habits}, {type of drone} in {applicable field}", "User {age}, {occupation}, {background}, {language habits}, please {detailed / simple} describe the application advantages of {type of drone} in {applicable field}".
[0137] Step 52: Process multiple second instruction template sets that match the personal user portrait based on the natural language processing algorithm to generate a personal adaptation template set that is adapted to the personal user portrait.
[0138] First, text preprocessing (such as word segmentation, part-of-speech tagging, and syntactic analysis) is performed on the plurality of second instruction template sets.
[0139] Furthermore, semantic analysis and sentiment analysis operations are performed on the preprocessed template set according to the natural language processing algorithm to extract the key information and sentiment tendency in the template.
[0140] Furthermore, the template set is processed according to the user characteristics of the personal user portrait (such as adding personalized vocabulary, adjusting sentence structure), and finally a set of personal adaptation templates adapted to the personal user portrait is generated.
[0141] In an embodiment of step 52 of the present application, the above-mentioned technology user is taken as an example.
[0142] When generating a set of personal adaptation templates, more scientific and technological vocabulary and long explanations are added to the templates based on the user's preferences ("prefer long-text answers", "focus on the drone field", "like technology content").
[0143] For example, the processed instruction template is: "User {age}, {occupation}, {background}, {language habits}, please explain in detail the application advantages of {type of drone} in {applicable field}, and give examples of its actual application scenarios."
[0144] Step 53: Write the user features in the personal user portrait into the personal adaptation template set to generate a personal instruction template set suitable for the personal user portrait.
[0145] First, the user features of the user are extracted.
[0146] Furthermore, the adaptation template set is filled accordingly according to these user characteristics.
[0147] In one embodiment of step 53 of the present application:
[0148] User characteristics: The user is 30 years old, a software engineer, has a background in drone technology, and prefers professional terminology.
[0149] Fill the user characteristics into the adaptation template set to generate a personal instruction template: "The user is 30 years old, a software engineer, has a background in drone technology, and prefers professional terms. Please explain in detail the application advantages of {type of drone} in {applicable field} and give examples of its actual application scenarios."
[0150] Step 6: Collect user questions, and process the user questions and the personal instruction template set based on a preset similarity algorithm and natural language processing algorithm to generate personal instructions.
[0151] Step 61: Collect user questions.
[0152] In an embodiment of step 61 of the present application, an input box is provided on the user interface to allow the user to manually input questions; or the user's voice input is converted into text form through voice recognition technology.
[0153] Step 62: Process the user question and the personal instruction template set based on a similarity algorithm to select an adapted personal instruction template that is adapted to the user question.
[0154] First, user questions are preprocessed, such as removing stop words and performing stem extraction operations, in order to improve the accuracy of similarity calculation.
[0155] Furthermore, the preprocessed user question is similar to each personal instruction template. The similarity calculation adopts the cosine similarity algorithm. According to the calculated similarity score, the personal instruction template with the highest score is selected as the adapted personal instruction template for adapting the user question.
[0156] Step 63: Process the user's question based on a natural language algorithm to extract question feature words of the user's question; wherein the question feature words are associated with feature words in the personal instruction template.
[0157] First, part-of-speech tagging and named entity recognition algorithms are used to extract feature words in user questions, including nouns, verbs, and adjectives.
[0158] The extracted feature words will be matched and associated with the feature words in the personal instruction template.
[0159] Step 64: Replace corresponding placeholders and keywords of the adapted personal instruction template based on the question feature words to generate personal instructions.
[0160] First, the placeholders and keywords in the adapted personal instruction template are identified. The placeholders and keywords are used to represent the specific content and information in the user's question.
[0161] Furthermore, the extracted question feature words are matched and replaced with placeholders and keywords.
[0162] The personal instructions finally generated will serve as a tool to assist users in asking questions, helping them to interact with the question-answering model more efficiently.
[0163] In one embodiment of step 64 of the present application, there is a student user who wants to understand the proof process of a mathematical theorem.
[0164] First, the AI model collected the student’s question through the user interface: “Please explain the proof of the Pythagorean theorem in detail.”
[0165] Next, the student's question is matched with the personal instruction template set through a similarity algorithm. Assume that there is a template in the personal instruction template set: "The user is 13 years old, a student, a junior high school student, prefers simple terms, please briefly explain the proof process of [theorem name] and give relevant examples." Through similarity calculation, this template is selected as the adapted personal instruction template for the student's question.
[0166] Furthermore, the question-answering model extracts the question feature words "Pythagorean Theorem" and "details" through the natural language processing algorithm.
[0167] Furthermore, the extracted feature words are replaced with the placeholder "[theorem name]" in the adapted personal instruction template, and "detailed" replaces "simple" in the personal instruction template. It can be understood that in this replacement process, "prefer simple terms" has the opposite meaning of "detailed", so the user feature is deleted.
[0168] To generate the final personal instruction: "User is 13 years old, student, junior high school, please explain the proof process of the Pythagorean theorem in detail and give relevant examples."
[0169] Understandably, when the user asked the question again, the user characteristics in the personal instruction template were still "User is 13 years old, student, junior high school, prefers simple terms, please briefly explain the proof process of [theorem name] and give relevant examples."
[0170] If a user asks questions containing the word "detailed" or words with similar meanings to "detailed" multiple times, the user characteristics will be updated and the personal instruction template will be updated. The update trigger condition can be the number of times the word appears or the time.
[0171] Step 7: Process personal instructions and user questions based on the preset AI big model to generate responses.
[0172] Step 71: Pass personal instructions and user questions as input data to the AI big model.
[0173] Step 72: The AI big model performs semantic understanding, context analysis, and knowledge reasoning on the input data based on deep learning.
[0174] After receiving the input data, the AI big model first encodes the input text through a deep learning network to extract its semantic features.
[0175] Furthermore, the AI big model will perform contextual analysis on the input data to understand the relationship between user questions and personal instructions as well as the conversational environment in which they are located.
[0176] Finally, the AI model will perform knowledge reasoning through its own knowledge base to generate responses that are highly matched to user questions and personal instructions.
[0177] It should be noted that AI big models are existing technologies, such as GPT and Wenxinyiyan.
[0178] Step 73: Based on the analysis results, the AI big model generates response content that matches the personal instructions and user questions.
[0179] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides an instruction construction and use device based on user portrait, and its structure is as follows Figure 2 shown.
[0180] Figure 2 A schematic diagram of the internal structure of a device for constructing and using instructions based on user portraits provided in an embodiment of the present application. Figure 2 As shown, the device includes:
[0181] at least one processor 201;
[0182] and, a memory 202 communicatively connected to the at least one processor;
[0183] The memory 202 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 201 to enable at least one processor 201 to:
[0184] Collecting background information, interest information and behavior information of the user group; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus direction and preferred content, and the behavior information includes search records, question and answer records and browsing records; processing the background information, interest information and behavior information of the user group based on a preset feature extraction algorithm and a cluster analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for the group and a personal user portrait for the individual, and the user portrait includes at least one of the following data: age, occupation, hobby, language style and comprehensive background; processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets; processing a plurality of the first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; matching the personal user portrait based on a plurality of the second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; collecting user questions, processing the user questions and the personal instruction template set based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; processing the personal instructions and user questions based on a preset AI big model to generate replies.
[0185] Some embodiments of the present application provide corresponding Figure 1 A non-volatile computer storage medium constructed and used based on user portrait instructions, storing computer executable instructions, wherein the computer executable instructions are set as:
[0186] Collecting background information, interest information and behavior information of the user group; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus direction and preferred content, and the behavior information includes search records, question and answer records and browsing records; processing the background information, interest information and behavior information of the user group based on a preset feature extraction algorithm and a cluster analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for the group and a personal user portrait for the individual, and the user portrait includes at least one of the following data: age, occupation, hobby, language style and comprehensive background; processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets; processing a plurality of the first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; matching the personal user portrait based on a plurality of the second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; collecting user questions, processing the user questions and the personal instruction template set based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; processing the personal instructions and user questions based on a preset AI big model to generate replies.
[0187] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0188] The system and medium provided in the embodiments of the present application correspond one-to-one to the method. Therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.
[0189] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage) that contain computer-usable program code.
[0190] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0193] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0194] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory forms such as read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0195] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0196] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0197] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, replacement, and improvement made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for constructing and using instructions based on user portraits, characterized in that: The method comprises: Collecting background information, interest information and behavior information of user groups; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus and preferred content, and the behavior information includes search history, question and answer history and browsing history; Processing the background information, interest information and behavior information of the user group based on a preset feature extraction algorithm and cluster analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for the group and an individual user portrait for the individual, and the user portrait includes at least one of the following data: age, occupation, hobby, language style and comprehensive background; Processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets; Processing the plurality of first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; Matching the personal user portrait based on the plurality of second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; Collecting user questions, and processing the user questions and a set of personal instruction templates based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; The personal instructions and user questions are processed based on a preset AI big model to generate a response.
2. The method for constructing and using instructions based on user portraits according to claim 1, characterized in that: The background information, interest information and behavior information of the user group are processed based on a preset feature extraction algorithm and a cluster analysis algorithm to generate a user portrait, specifically including: Clean, filter and organize the background information, interest information and behavior information to generate a text description of the user portrait; Extracting user features of the text description based on the feature extraction algorithm; wherein the feature extraction algorithm includes but is not limited to a text mining algorithm, a keyword extraction algorithm, and a sentiment analysis algorithm; Generate a personal user portrait based on the user characteristics; Processing the features based on a preset PCA dimensionality reduction algorithm to determine the main user features of the text description; Processing the main user features based on the cluster analysis algorithm to divide the user group into a plurality of sub-user groups; Based on the feature extraction, the plurality of sub-user groups are calculated and processed to label the user groups corresponding to the plurality of sub-user groups with portrait labels to generate group user portraits.
3. The method for constructing and using instructions based on user portrait according to claim 2, characterized in that: The user features are processed based on a preset PCA dimensionality reduction algorithm to determine the main user features of the text description, specifically including: Normalizing the user features; Calculate the covariance matrix of the user features based on the PCA dimensionality reduction algorithm, and solve its eigenvalues and eigenvectors; According to the descending order of feature values, a preset number of user features are selected as the main user features.
4. The method for constructing and using instructions based on user portraits according to claim 1, characterized in that: Processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets specifically includes: Constructing a template database; wherein the template database includes a plurality of preset instruction templates, each instruction template includes a framework, keywords and a grammatical structure; The user tags of the group user portraits are filled into corresponding positions in the template database to generate a first instruction template set that matches the group user portraits.
5. The method for constructing and using instructions based on user portraits according to claim 4, characterized in that: Processing the plurality of first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets specifically includes: Perform synonym replacement, sentence transformation and semantic expansion on each template in the first instruction template set to generate multiple extended instruction templates; The plurality of extended instruction templates are screened and optimized to obtain a second instruction template set.
6. The method for constructing and using instructions based on user portraits according to claim 1, characterized in that: Matching the personal user portrait based on the plurality of second instruction template sets to generate a personal instruction template set suitable for the personal user portrait specifically includes: Cross-matching the individual user portrait with the plurality of second instruction template sets to determine a plurality of second instruction template sets matching the individual user portrait; Processing a plurality of second instruction template sets matching the personal user portrait based on the natural language processing algorithm to generate a personal adaptation template set adapted to the personal user portrait; The user features in the personal user portrait are written into the personal adaptation template set to generate a personal instruction template set suitable for the personal user portrait.
7. The method for constructing and using instructions based on user portraits according to claim 1, characterized in that: Collecting user questions, and processing the user questions and the personal instruction template set based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions, specifically including: Collect user questions; Processing the user question and the personal instruction template set based on the similarity algorithm to select an adapted personal instruction template adapted to the user question; Processing the user's question based on the natural language algorithm to extract question feature words of the user's question; wherein the question feature words are associated with feature words in the personal instruction template; The corresponding placeholders and keywords of the adapted personal instruction template are replaced based on the question feature words to generate personal instructions.
8. The method for constructing and using instructions based on user portraits according to claim 1, characterized in that: The personal instructions and user questions are processed based on the preset AI big model to generate responses, including: Passing the personal instructions and user questions as input data to the AI big model; The AI big model performs semantic understanding, context analysis, and knowledge reasoning on input data based on deep learning; Based on the analysis results, the AI big model generates response content that matches the personal instructions and user questions.
9. A device for constructing and using instructions based on user portraits, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: Collecting background information, interest information and behavior information of user groups; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus and preferred content, and the behavior information includes search history, question and answer history and browsing history; Processing the background information, interest information and behavior information of the user group based on a preset feature extraction algorithm and cluster analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for the group and an individual user portrait for the individual, and the user portrait includes at least one of the following data: age, occupation, hobby, language style and comprehensive background; Processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets; Processing the plurality of first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; Matching the personal user portrait based on the plurality of second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; Collecting user questions, and processing the user questions and a set of personal instruction templates based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; The personal instructions and user questions are processed based on a preset AI big model to generate a response.
10. A non-volatile computer storage medium for constructing and using instructions based on user profiles, storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Collecting background information, interest information and behavior information of user groups; wherein the background information includes age, gender, occupation and cultural background, the interest information includes focus and preferred content, and the behavior information includes search history, question and answer history and browsing history; Processing the background information, interest information and behavior information of the user group based on a preset feature extraction algorithm and cluster analysis algorithm to generate a user portrait; wherein the user portrait includes a group user portrait for the group and an individual user portrait for the individual, and the user portrait includes at least one of the following data: age, occupation, hobby, language style and comprehensive background; Processing the group user portrait based on a preset template database to generate a plurality of first instruction template sets; Processing the plurality of first instruction templates based on a preset data enhancement algorithm to generate a plurality of second instruction template sets; wherein the number of the second instruction template sets is the same as the number of the first instruction template sets; Matching the personal user portrait based on the plurality of second instruction template sets to generate a personal instruction template set suitable for the personal user portrait; Collecting user questions, and processing the user questions and a set of personal instruction templates based on a preset similarity algorithm and a natural language processing algorithm to generate personal instructions; The personal instructions and user questions are processed based on a preset AI big model to generate a response.