Method, apparatus and computer program product for generating reports
By combining language models and graph neural networks, reports are automatically generated, solving the problems of time-consuming and inefficient report generation in existing technologies, and achieving more comprehensive analysis and more efficient report generation.
Patent Information
- Application Number
- CN202410517058.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2025-10-31
AI Technical Summary
Existing report generation methods are time-consuming, inefficient, and prone to errors, and cannot generate comprehensive reports, especially for large amounts of object data. Existing automated methods can only analyze data of specific objects, and the report content is not rich enough.
By combining language models and graph neural networks, the system generates the first text by acquiring object data related to user reviews, and then uses graph neural networks to generate a report based on the relationships between multiple objects.
It improves the efficiency and accuracy of report generation, enabling the generation of more comprehensive analysis results by considering data from one object with data from multiple other objects.
Smart Images

Figure CN120873175A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, and more specifically, to methods, apparatus, and computer program products for generating reports. Background Technology
[0002] Object data, such as product reviews, feedback, or surveys, often contains valuable information, such as user satisfaction or suggestions regarding the current product or object. Therefore, analyzing object data to generate reports can help product suppliers understand user needs, preferences, and expectations, thereby improving product quality, performance, and innovation.
[0003] A language model, or Natural Language Generation (NLG) model, is a probability distribution model of words in natural language, typically used for processing text data. This technique has achieved significant results in various applications, such as text summarization, machine translation, and information retrieval. Summary of the Invention
[0004] Embodiments of this disclosure relate to methods, apparatus, and computer program products for generating reports.
[0005] According to one aspect of this disclosure, a method for generating a report is provided. The method includes acquiring object data associated with user ratings of objects; generating first text of the objects from the object data using a language model; and generating a report from the first text using a graph neural network, wherein the graph neural network is associated with multiple objects.
[0006] According to another aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processor and a memory, wherein the memory is coupled to the at least one processor and has instructions stored thereon. When executed by the processor, the instructions cause the electronic device to perform the following actions: acquiring object data, the object data being associated with user ratings of the object; generating first text of the object from the object data using a language model; and generating a report from the first text and a graph neural network, wherein the graph neural network is associated with a plurality of objects.
[0007] According to another aspect of this disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-volatile computer-readable medium and includes machine-executable instructions that, when executed, cause a machine to: acquire object data, the object data being associated with user evaluations of the object; generate first text of the object from the object data using a language model; and generate a report from the first text and a graph neural network, wherein the graph neural network is associated with a plurality of objects.
[0008] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0009] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram of an example environment in which some embodiments of this disclosure may be implemented for methods of generating reports is shown;
[0011] Figure 2 A flowchart of a method for generating a report according to some embodiments of the present disclosure is shown;
[0012] Figure 3 A flowchart of a method for generating first text according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A flowchart is shown of another method for generating first text according to some embodiments of the present disclosure;
[0014] Figure 5 A flowchart of a method for modifying a first template according to some embodiments of the present disclosure is shown;
[0015] Figure 6 A flowchart of a method for modifying a report according to some embodiments of the present disclosure is shown;
[0016] Figure 7 A schematic diagram of a process for generating a report according to an embodiment of the present disclosure is shown; and
[0017] Figure 8 A block diagram of a device that can implement some embodiments of the present disclosure is shown. Detailed Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0020] Current report generation methods are typically manual, requiring manual execution of various specialized tasks such as data collection, statistics, and classification to analyze object data and generate reports about that object. This approach is time-consuming, inefficient, and prone to errors, especially with large amounts of object data. While some automated report generation methods exist, these methods can only analyze specific object data or generate text content related to a specific object, resulting in relatively limited report content and an inability to create comprehensive reports.
[0021] To address this, embodiments of this disclosure propose a scheme for generating reports based on a language model. In embodiments of this disclosure, object data associated with user ratings of objects is obtained; a language model generates first text of the objects based on the object data; and a report is generated based on the first text and a graph neural network, wherein the graph neural network is associated with multiple objects.
[0022] In this way, machine learning can use natural language models to generate reports about objects, which is more convenient, time-saving, and improves accuracy and efficiency. Furthermore, through embodiments of this disclosure, reports can be generated by considering object data from one object with multiple other objects, resulting in more comprehensive analysis results.
[0023] Figure 1 A schematic diagram of an example environment 100 in which some embodiments of this disclosure may be implemented for a method of generating a report is shown. For example... Figure 1 As shown, environment 100 may include data acquisition module 102, insight extraction module 104, graph neural network (GNN) module 106, and report generation module 108.
[0024] like Figure 1 As shown, environment 100 includes a data acquisition module 102, which can preprocess object data 112. For example, data acquisition module 102 can accept raw object data in various formats, such as text, CSV, and JSON, and transform it for appropriate input to insight extraction module 104. For example, object data can be correlated with user ratings of objects.
[0025] like Figure 1As shown, environment 100 includes an insight extraction module 104, which can generate insights about objects based on preprocessed object data. For example, insights about objects can be text output generated by a machine based on its understanding of causality, sentiment, anomaly, trend, and other patterns in the object data.
[0026] In some embodiments, the insight extraction module 104 may encode preprocessed object data 114. In some embodiments, the insight extraction module 104 may be implemented as a language model, such as a transformer-based model. In some embodiments, the insight extraction module 104 may be trained 116 through contrastive learning to obtain more accurate insights.
[0027] like Figure 1 As shown, environment 100 includes a graph neural network module 10, which can be pre-configured or pre-trained to associate a graph neural network with multiple objects or multiple products. For example, the graph neural network can reflect the relationships between multiple objects. Specifically, the hierarchy in the graph neural network can represent the classification architecture of objects, each node can represent an object, and the edges between nodes can represent the relationships between objects. For example, the hierarchy of the graph neural network can include progressively smaller ranges from top to bottom.
[0028] In some embodiments, the object may be a laptop product, the layers in the graph neural network may represent different categories or different series, such as business laptops, gaming laptops, ultrabooks and 2-in-1 laptops, and the nodes in the graph neural network may represent different laptop products (their categories or models), and the edges may represent which laptop products are included in a particular category or series.
[0029] In some embodiments, the object can be an electronic product. The first layer in the graph neural network can represent a broad category of electronic products, such as computers, mobile phones, wearable devices, and other electronics. The second layer can represent different subcategories within a specific broad category, and the third layer can represent different product models within a specific subcategory. In this embodiment, nodes can represent different electronic products, and edges can represent relationships between different electronic products, such as belonging to the same or different categories, belonging to the same or different series, inclusion relationships, or parallel relationships.
[0030] like Figure 1As shown, environment 100 includes a report generation module 108, which can generate a report based on insights about objects from insight extraction module 104 and a graph neural network from graph neural network module 106. In some embodiments, report generation module 108 may include a template library. For example, report generation module 108 can select an appropriate template from the template library based on the insights about objects generated by insight extraction module 104, and generate a report based on the selected template, a first text, and the graph neural network.
[0031] In some embodiments, environment 100 may further include a feedback module 110, which may include a user feedback loop for generating user feedback on a corresponding report. In some embodiments, the user feedback loop may generate corresponding feedback based on a report from report generation module 108. The feedback module 108 may then transmit the feedback to report generation module 108 to modify the template or report.
[0032] It should be understood that Figure 1 The types and numbers of modules, data transmission processes, arrangements, and implementation methods shown are merely illustrative. Environment 100 may include different numbers and arrangements of models, data transmission processes, and various additional elements. It should be understood that the models, networks, or algorithms described above are provided merely as examples, and different models, networks, or algorithms can be used to implement various modules of environment 100.
[0033] Figure 2 A flowchart of a method 200 for generating a report according to some embodiments of the present disclosure is shown. Reference is made herein to better describe method 200. Figure 1 The example environment 100 described herein is described together.
[0034] In step 202, retrieve object data associated with user ratings of the object. For example, for... Figure 1 In the example environment 100, the data acquisition module 102 can acquire object data related to the user's evaluation of a specific object.
[0035] In some embodiments, object data may include user ratings of a particular object or product. For example, ratings may include neutral, positive, or negative ratings. Specifically, a neutral rating may be a user's suggestion of the product, a positive rating may be a user's praise of the product, and a negative rating may be a user's criticism of the product.
[0036] In 204, the language model generates the first text of the object based on the object data. For example, for... Figure 1In the example environment 100, the insight extraction module 104 can generate the first text of the object based on the object data. In some embodiments, the first text of the object can be an insight about the object, that is, text associated with the object generated by the insight extraction module 104 based on the user's evaluation of the object. For example, the first text may include sentiment understanding, summaries, trend predictions, causal inferences, and anomaly analysis of the evaluation generated by a language model.
[0037] In some embodiments, the language model can be implemented as a transducer-based model. For example, a transducer-based model can extract feature vectors from object data, encode the feature vectors, and generate first text based on the encoded vector features. In some embodiments, the transducer-based model can be trained based on contrastive learning to improve accuracy and relevance over time. References will be made below. Figure 4 The training of language models is discussed.
[0038] In some embodiments, the language model can be implemented as any known NLG, such as BERT, GPT-2, and T5, which leverages large-scale pre-training on a large text corpus and fine-tuning for specific downstream tasks to generate fluent and coherent text. It should be understood that the models, networks, or algorithms described above are provided merely as examples, and different models, networks, or algorithms can be used to implement language models.
[0039] In step 206, a report is generated based on the first text and a graph neural network, where the graph neural network is associated with multiple objects. For example, for... Figure 1 In the example environment 100, a report can be generated by the report generation module 108 based on the first text from the insight extraction module 104 and the graph neural network from the graph neural network module 106.
[0040] In some embodiments, a graph neural network is a neural network that operates on graph-structured data (e.g., social networks, knowledge graphs, and molecular graphs). In some embodiments, a graph neural network can learn node representations and side representations by aggregating and propagating information across the graph. In some embodiments, a graph neural network can model relationships between multiple objects, such as based on categories, series, and hierarchical relationships between different objects. For example, nodes can represent different products, and edges can represent relationships between different products.
[0041] Method 200 enables machines to generate reports about objects using language models, eliminating the need for human intervention. This is more convenient, time-saving, and improves accuracy and efficiency. Furthermore, because Method 200 combines first text based on object data with a graph neural network based on relationships between multiple objects, it can generate reports considering multiple other objects from the object data of one object, resulting in more comprehensive analysis results.
[0042] In one embodiment, for example, when the object data is a user's negative review of a product, method 200 can understand the negative review and analyze the reasons for it from the first text, and based on the first text and a graph neural network analysis, analyze whether similar problems exist in other related products (e.g., other products in the same series or other products in the same category), and reflect this in the report. Therefore, the report generated according to method 200 can include more comprehensive analysis results.
[0043] Figure 3 A flowchart of a method 300 for generating first text according to some embodiments of the present disclosure is shown. Reference is made herein to better describe method 300. Figure 1 The example environment 100 described herein is described together.
[0044] In section 302, object data is preprocessed to determine its characteristics. For example, for... Figure 1 In the example environment 100, the data acquisition module 102 can preprocess the data object 112 to determine the characteristics of the object data. In some embodiments, the characteristics of the object data can be feature vectors extracted from the object data. For example, the object data can be tokenized to segment the text of the object data into individual tokens so that the subsequent model can better understand and process the text data.
[0045] In some embodiments, the Bag of Words model can be used to extract feature vectors from text data. For example, the Bag of Words model can extract words from the text to form a set of words to construct a bag of words, count the frequency of each word in the text to determine the word frequency, and construct the feature vector of the text data with the words in the bag of words as the dimension and the word frequency as the value of the corresponding dimension.
[0046] In some embodiments, N-grams can be used to extract N consecutive words from text data as features to determine the features of the text data. In some embodiments, a pre-trained word vector model can be used to map words to vectors to determine the features of the text data. In some embodiments, the features of the text data can be determined based on text statistical features, such as word length, part-of-speech tagging, etc.
[0047] In 304, the features are encoded. For example, for... Figure 1 In the example environment 100, the data object can be encoded 114 by the insight extraction module 104 to obtain encoded features. In some embodiments, the features of the object data can be encoded by a transformer-based model. In this embodiment, feature extraction can be performed on the text data by the embedding layer of the transformer-based model, a multi-head attention mechanism can be used to perform weighted summation of features at different locations to capture semantic relationships in the text, and a feedforward network can further extract and transform features from the output of the attention mechanism to encode the features.
[0048] In some embodiments, feature vectors (text lexical units) generated from object data can be input into a language model, which then encodes the input features into a rich contextual representation based on the feature vectors and the language model's parameters. In some embodiments, the parameters of the language model can be trained and tuned based on subsequently generated text, thereby improving text quality.
[0049] In step 306, the first text of the object is generated based on the encoded features. For example, for... Figure 1 In example environment 100, the insight extraction module 104 can generate the first text of an object based on encoded feature vectors. In some embodiments, the language model can analyze and interpret the encoded features to identify potential patterns, relationships, and trends, and then combine domain knowledge and context to generate the first text. In some embodiments, a decoding mechanism can be used to generate the first text step by step.
[0050] like Figure 3 As shown, preprocessing object data 302 may include: filtering object data at 308; normalizing the filtered object data at 310; and extracting features of the object data based on the normalized object data at 306.
[0051] In some embodiments, object data can be cleaned to remove irrelevant information, correct errors, and process missing information, thereby filtering the object data. It should be understood that any data cleaning function known in the art can be applied to clean object data.
[0052] In some embodiments, text data can be cleaned by removing noise such as special symbols and extra spaces; standardizing the encoding format of the text; correcting and converting capitalization using spell checking tools or algorithms; standardizing capitalization as needed; segmenting the text into words or phrases; and removing common words that are not of much significance to the analysis, etc.
[0053] In some embodiments, filtered object data can be normalized to adjust the data to a common scale without distorting differences within the range of values. In some embodiments, filtered text data can be represented as vectors using a Vector Space Model (VSM), and normalization can be performed on these vectors. In some embodiments, Locality Sensitive Hashing (LSH) can be used to map text data to a hash space, achieving text-like clustering and normalization. In some embodiments, topic models such as Latent Dirichlet Allocation (LDA) can be used to model and normalize the topics of the text data.
[0054] In some embodiments, object data can be normalized using a bag-of-words model combined with TF-IDF weight calculation. For example, all words in the text are extracted to form a bag-of-words set; the frequency of each word in each part of the text is counted to calculate the term frequency (TF); the inverse document frequency (IDF) is calculated to measure the rarity of a word in the entire text; and the TF-IDF weight is calculated, i.e., the term frequency and the inverse document frequency are multiplied to obtain the normalized weight of each word. By calculating TF-IDF weights, words that appear frequently in specific parts of the text but are relatively uncommon in the entire text set can be highlighted, thus better representing the features of the text.
[0055] It should be understood that the types, numbers, arrangements, and implementation methods of the models, networks, and algorithms shown above are merely exemplary, and method 300 may include different models, networks, or algorithms, as well as various additional models, networks, or algorithms, etc.
[0056] Figure 4 A flowchart of another method 400 for generating first text according to some embodiments of the present disclosure is shown. For example, method 400 includes training a language model and generating first text using the trained language model. For example, method 400 may be... Figure 1 The feature extraction module 104 in environment 100 is executed.
[0057] like Figure 4 As shown, at step 402, the loss is determined based on the first text, the first sample, and the second sample. In some embodiments, the first sample is generated from the first text, and the second sample is obtained from a sample library. For example, the first text may be manually entered or generated by a language model.
[0058] In some embodiments, a first sample is emotionally associated with a first text, and a second sample is not emotionally associated with the first text. In some embodiments, a first sample is semantically associated with a first text, and a second sample is not semantically associated with the first text. In some embodiments, the association between a sample and the first text is determined based on substantive meaning, such as taking into account irony, polysemy, or homonymy. In some embodiments, the association between a sample and the first text is determined by considering the context of the text.
[0059] For example, the first text could be a user's negative evaluation of the product, such as "This product is bad." In this case, the first sample could be text associated with that negative evaluation, such as "This product performs poorly," "This product is slow," "This product takes a long time to process," and so on. Furthermore, the second sample could be a neutral evaluation of the product, such as a suggestion, or a positive evaluation, such as "This product performs well," "This product is fast," and so on.
[0060] In some embodiments, the loss can be determined as follows: at 410, coded object features are determined based on object data; at 412, coded first sample features are determined based on a first sample; and at 414, coded second sample features are determined based on a second sample. Furthermore, the loss is determined based on the coded object features, the coded first sample features, and the coded second sample features.
[0061] For example, based on the above... Figure 3 The various data preprocessing and encoding methods described herein are used to preprocess and encode object data, first sample data, and second sample data to determine encoded object features, first sample features, and second sample features. It should be understood that feature vectors extracted from object data are encoded to obtain encoded object features, feature vectors extracted from the first sample are encoded to obtain encoded first sample features, and feature vectors extracted from the second sample are encoded to obtain encoded second sample features.
[0062] In some embodiments, contrastive learning can be applied to the encoded features to highlight distinguishing features, thereby training the language model. In some embodiments, the loss can be determined by constructing a loss function using the following formula:
[0063]
[0064] Where L constrative (E) is the loss associated with the encoded feature E, E i This is the coded i-th data point, which here represents the coded object feature, E. pos(i) This is the positive example corresponding to the i-th data point, where E is the encoded first sample feature.j Let j be the j-th data point, which is the encoded second sample feature. N is the number of data points, which is the number of samples in the sample library, and τ is the temperature parameter.
[0065] It should be understood that L constrative The smaller (E) is, the closer data point i is to the data point of the positive sample and the farther it is from sample j, meaning the particular feature is more prominent. In other words, the loss L constrative The smaller (E) is, the better the language model, and the higher the accuracy and relevance, and vice versa.
[0066] like Figure 4 As shown, at 404, the loss is minimized to train the language model. For example, the loss L is minimized. constrative (E) To minimize the size of the language model, thereby achieving higher accuracy and relevance. At 406, the object data is encoded using the trained language model to obtain enhanced features, and at 408, the first text is generated based on the enhanced features. It should be understood that method 400 may also include, prior to 406, preprocessing the object data to determine features that can be input into the language model for encoding.
[0067] Method 400 can be used to train a language model and use the trained language model to generate first text, which can have higher accuracy and relevance to the object data.
[0068] Figure 5 A flowchart of a method 500 for modifying a first template according to some embodiments of the present disclosure is shown. At 502, a first template is selected from a plurality of templates based on first text, the first template being associated with an evaluation of an object. For example, a template library may include a variety of pre-set templates associated with different evaluations. For example, the template library may include positive evaluation templates, neutral evaluation templates, and negative evaluation templates.
[0069] At 504, augmented content is generated by the language model based on the first text and the graph neural network. As described above, the graph neural network is associated with relationships between multiple objects. In some embodiments, feature vectors can be extracted from the first text to obtain text terms, features can be obtained from the graph neural network as graph terms, and the text terms and graph terms are input into the language model to generate augmented content.
[0070] In some embodiments, nodes of a graph neural network can be used as graph terms through node embedding. In some embodiments, node representations of intermediate layers of a graph neural network can be obtained as graph terms. In some embodiments, features can be extracted as graph terms by leveraging the aggregation of neighborhood information by the graph neural network. It should be understood that these feature extraction methods are provided only as examples, and other methods can be used to extract features.
[0071] In some embodiments, the first text can be generated based on a user's negative evaluation of an object, enhanced content can be generated based on the first text and a graph neural network associated with multiple objects, and a negative evaluation template can be selected from a template library based on the first text. In the above embodiments, the first text can analyze why the user is dissatisfied with the object or what the user considers the object's defects, as well as the causes and solutions to these defects, while the enhanced text can analyze whether other multiple objects also have the same defects or are at risk of having such defects, and corresponding solutions.
[0072] In some embodiments, a report can be generated by adding enhanced content to a negative evaluation template. In the above embodiments, the report can reflect the user's perception of a defect in an object, the cause of the defect, other objects at risk of having the defect, other objects at risk of not having the defect, and recommend relevant objects to the user based on the user's needs.
[0073] At 506, a report is generated based on the first template and the enhanced content. In some embodiments, the first template may be input into a language model, and the language model generates the report based on the first template and the enhanced content. It should be understood that other models or neural networks may also be used to generate the report. The report generated based on the first template and the enhanced content utilizes a graph neural network, which is able to take into account the relationships between multiple other objects, thus obtaining more comprehensive analysis results.
[0074] In 508, user feedback on the report is obtained. For example, user feedback on the report can be obtained from a user feedback loop. A user feedback loop is a continuously looping process that involves collecting user feedback, analyzing it, making improvements or adjustments based on the feedback, and then providing the improved report to the user again, collecting feedback again, and so on, to improve user satisfaction.
[0075] At 510, a score for the report is generated based on the report and feedback. In some embodiments, reinforcement learning can be applied to user feedback to improve the relevance and clarity of the report over time. For example, a reinforcement learning agent can be set up to score the report based on the report and feedback. Furthermore, a reward function can be defined to measure the reward or magnitude of the action taken by the agent in a given state; the agent can learn an optimal behavioral policy by maximizing the reward.
[0076] In step 512, the first template is modified based on the reported score. In some embodiments, a threshold can be set, and when the score falls below the threshold, it is determined that the first template needs to be modified. In some embodiments, the agent can modify the first template based on feedback from the environment (i.e., rewards) to maximize the reward.
[0077] It should be understood that Method 500 introduces a reinforcement learning mechanism, which can dynamically modify the template based on user feedback. This can improve the quality of the template over time, making it more accurate and relevant, thereby improving the accuracy and efficiency of report generation.
[0078] Figure 6 A flowchart of a method 600 for modifying a report according to some embodiments of the present disclosure is shown. At 602, a first template is selected from a plurality of templates based on first text, the first template being associated with an evaluation of an object. At 604, augmented content is generated by a language model based on the first text and a graph neural network. At 606, a report is generated based on the first template and the augmented content. In some embodiments, the first template may be input into a language model, and the report may be generated by the language model based on the first template and the augmented content. It should be understood that 602-608 are similar to... Figure 5 The 502-504 series will not be discussed further.
[0079] like Figure 6 As shown, method 600 further includes, at 608, obtaining user feedback on the report, and at 610, modifying the report based on the feedback. In some embodiments, the report can be modified based on the feedback using reinforcement learning. For example, a reward function can be defined to measure the amount of reward or reward obtained by the agent, and the agent can maximize the reward by modifying the report.
[0080] It should be understood that Method 600 allows reports to be dynamically modified based on user feedback, enabling reports to meet users' evolving needs and adapt to changing user preferences without extensive manual intervention. Furthermore, the language model used to generate the reports becomes more accurate and efficient over time.
[0081] Figure 7A schematic diagram of a process 700 for generating a report according to an embodiment of the present disclosure is shown. Figure 7 As shown, template selection 704 is performed based on the first text 702 generated by the language model from object data to select a first template 706. In some embodiments, the language model generates enhanced content 710 based on the first text and the graph neural network 708. For example, features of the first text and features of the graph neural network 708 can be extracted to generate the enhanced content 710. For example, as described above, the graph neural network can map complex relationships between multiple objects.
[0082] In some embodiments, the language model can combine the enhanced content 710 with the first template 706 to generate a report 712. For example, the enhanced content 710 can be added to the first template 706 to generate the report 712. In some embodiments, feedback 716 can be obtained through a user feedback loop 714, and the template or report 720 can be adjusted based on the feedback 716. It should be understood that the above process performed through a language model is merely exemplary, and can also be performed through other models, neural networks, or algorithms.
[0083] In some embodiments, reinforcement learning 718 can be used to optimize report 712 based on user feedback 716. In some embodiments, reinforcement learning 718 is applied to feedback 716, an agent is trained based on a first template 706 and feedback 716, a reward value is calculated, and the template or report 720 is adjusted based on the reward value.
[0084] In some embodiments, an agent can be trained in reinforcement learning 718, and a reward value can be calculated for the agent based on feedback 716. The agent can update its policy based on the reward value, modify the template or report, and then the modified template or report is passed through user feedback loop 714 to generate feedback 716, and the reward value is calculated again. This process is iterated and repeated until a satisfactory reward value is obtained. In other words, until the agent achieves satisfactory performance or convergence.
[0085] In some embodiments, feedback 716 may only reflect negative user feedback to report 712. For example, feedback 716 may not be generated when the user is satisfied with the report, and feedback 716 may be generated when the user is dissatisfied with report 712. In the above embodiments, the model for reinforcement learning 718 only needs to be enabled when feedback 716 is detected, thereby simplifying the process, reducing computation, and saving energy.
[0086] It should be understood that the reinforcement learning 718 and the conditioning template or report 720 described above can be performed by a language model, or by other models, neural networks or algorithms, and this disclosure does not impose any limitations.
[0087] Process 700 enables automated generation of reports on objects, eliminating the need for manual intervention and offering greater convenience, time savings, and improved accuracy and efficiency. Because Process 700 incorporates a graph neural network that maps relationships between multiple objects, reports based on data from one object can consider multiple other objects, resulting in more comprehensive analysis. Furthermore, Process 700 includes a user feedback loop, continuously improving the accuracy and relevance of knowledge and reports. In addition, Process 700 incorporates reinforcement learning, dynamically meeting user needs and continuously learning through feedback loops, making it more accurate and efficient over time.
[0088] Figure 8 A schematic block diagram of an example device 800 that can be used to implement embodiments of the present disclosure is shown. As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 802 or loaded from storage unit 808 into random access memory (RAM) 803. Various programs and data required for the operation of device 800 may also be stored in RAM 803. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0089] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0090] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as methods 200-600 and process 700. For example, in some embodiments, methods 200-600 and process 700 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of methods 200-600 and process 700 described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute methods 200-600 and process 700 by any other suitable means (e.g., by means of firmware).
[0091] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard objects (ASSPs), systems-on-a-chip (SoCs), payload programmable logic devices (CPLDs), and so on.
[0092] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0093] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer 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 of the foregoing. Furthermore, although operations are depicted in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0094] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for generating a report, comprising: Retrieve object data associated with user ratings of objects; The language model generates the first text of the object based on the object data; as well as The report is generated based on the first text and a graph neural network, wherein the graph neural network is associated with multiple objects.
2. The method according to claim 1, The acquisition of the object data includes preprocessing the object data to determine the characteristics of the object data; and The first text that generates the object includes: Encode the features; as well as The first text of the object is generated based on the encoded features.
3. The method of claim 2, wherein determining the features of the object data comprises: Filter the object data; Normalize the filtered object data; as well as The features of the object data are extracted based on the normalized object data.
4. The method of claim 1, wherein generating the report comprises: Based on the first text, a first template is selected from a plurality of templates, the first template being associated with the evaluation, and the plurality of templates being preset; The language model generates additional content based on the first text and the graph neural network; as well as The report is generated based on the first template and the enhanced content.
5. The method according to claim 4, further comprising: Obtain feedback from the user regarding the report; A score for the report is generated based on the report and the feedback. as well as Modify the first template based on the score in the report.
6. The method according to claim 1, further comprising: Obtain feedback from the user regarding the report; The report was revised based on the feedback received.
7. The method according to claim 1, wherein the evaluation includes a neutral evaluation, a positive evaluation, or a negative evaluation of the object.
8. The method of claim 1, further comprising training the language model, wherein the language model is trained by: Based on the first text, the first sample, and the second sample, determine the loss; and To minimize the loss in order to train the language model, The first sample is generated based on the first text, and the second sample is obtained from a sample library; and The first sample is emotionally associated with the first text, while the second sample is not emotionally associated with the first text.
9. The method of claim 8, wherein determining the loss comprises: Based on the object data, determine the coded object characteristics; Based on the first sample, determine the coded features of the first sample; Based on the second sample, determine the coded features of the second sample; and The loss is determined based on the encoded object features, the encoded first sample features, and the encoded second sample features.
10. The method of claim 8, wherein generating the first text comprises: Preprocess the object data to determine its characteristics; The features are encoded by a trained language model to obtain enhanced features; as well as The first text is generated based on the enhanced features.
11. An electronic device, comprising: At least one processor; as well as A memory, coupled to the at least one processor and having instructions stored thereon, which, when executed by the at least one processor, cause the electronic device to perform actions, including: Retrieve object data associated with user ratings of objects; The language model generates the first text of the object based on the object data; and A report is generated based on the first text and a graph neural network, wherein the graph neural network is associated with multiple objects.
12. The electronic device of claim 11, wherein generating the first text of the object comprises: Preprocess the object data to determine its characteristics; Encode the features; as well as The first text of the object is generated based on the encoded features.
13. The electronic device of claim 12, wherein determining the characteristics of the object data comprises: Filter the object data; Normalize the filtered object data; as well as The features of the object data are determined based on the normalized object data.
14. The electronic device of claim 11, wherein generating the report comprises: Based on the first text, a first template is selected from a plurality of templates, the first template being associated with the evaluation, and the plurality of templates being preset; Additional content is generated by a language model based on the first text and the graph neural network. as well as The report is generated based on the first template and the enhanced content.
15. The electronic device according to claim 14, further comprising: Obtain feedback from the user regarding the report; A score for the report is generated based on the report and the feedback. as well as Modify the first template based on the score in the report.
16. The electronic device according to claim 11, further comprising: Obtain feedback from the user regarding the report; The report was revised based on the feedback received.
17. The electronic device of claim 11, further comprising training the language model, wherein the language model is trained by: Based on the first text, the first sample, and the second sample, determine the loss; and To minimize the loss in order to train the language model, The first sample is generated based on the first text, and the second sample is obtained from a sample library; and The first sample is emotionally associated with the first text, while the second sample is not emotionally associated with the first text.
18. The electronic device of claim 17, wherein determining the loss comprises: Based on the object data, determine the coded object characteristics; Based on the first sample, determine the coded features of the first sample; Based on the second sample, determine the coded features of the second sample; and The loss is determined based on the encoded object features, the encoded first sample features, and the encoded second sample features.
19. The electronic device of claim 18, wherein generating the first text comprises: Preprocess the object data to determine its characteristics; The features are encoded by a trained language model to obtain enhanced features; as well as The first text is generated based on the enhanced features.
20. A computer program product tangibly stored on a non-volatile computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to: Retrieve object data associated with user ratings of objects; Generate the first text of the object based on the object data; and A report is generated based on the first text and a graph neural network, wherein the graph neural network is associated with multiple objects.