Industry report generation method and system based on deep learning
The implicit representation of industry text data is obtained and strengthened through deep learning methods, and labeled adjustment is performed in the natural language processing network, which solves the efficiency and quality problems of traditional industry report generation methods and achieves high-quality report generation.
Patent Information
- Application Number
- CN202411273064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Traditional industry report generation methods rely on manual operations, are time-consuming and labor-intensive and are susceptible to subjective factors, making it difficult to ensure the quality and efficiency of reports. Deep learning models face uneven data distribution and sparse features during training, resulting in insufficient generalization capabilities. .
Using a deep learning-based method, implicit representation reinforcement operations are performed by obtaining the paragraph implicit representation of original industry text data, and loading it into a natural language processing network for labeled adjustment, and introducing implicit representation inference collaborative training task , improve text quality recognition capabilities and universality.
Automated, efficient and accurate industry report generation is achieved, alleviating overtraining and early stopping, and improving the quality and reliability of reports.
Smart Images

Figure CN118780264B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a method and system for generating industry reports based on deep learning. Background Art
[0002] With the rapid development of information technology, especially the widespread application of big data and artificial intelligence technology, the way industry reports are generated is undergoing profound changes. Traditional industry report generation methods mainly rely on manual collection, collation and analysis of data. This process is not only time-consuming and labor-intensive, but also easily affected by subjective factors, making it difficult to ensure the quality and efficiency of the report. Therefore, how to automatically, efficiently and accurately generate industry reports has become an urgent problem to be solved in the industry. In the field of natural language processing (NLP), the rise of deep learning technology has provided new possibilities for the automated processing and analysis of text data. When applying deep learning technology to industry report generation, it also faces a series of challenges. Industry text data is usually diverse, complex and massive, which makes it easy for the model to encounter problems such as uneven data distribution and sparse features during training, resulting in insufficient model generalization ability. Summary of the invention
[0003] In view of this, the present application provides an industry report generation method and system based on deep learning.
[0004] The technical solution of this application is implemented as follows:
[0005] On the one hand, the present application provides an industry report generation method based on deep learning, including: obtaining an implicit representation of a paragraph set of original industry text data; performing an implicit representation enhancement operation on the implicit representation of the paragraph set to obtain an implicit representation of a paragraph set to be loaded; loading the implicit representation of the paragraph set to be loaded into a natural language processing network to obtain the industry text quality of the original industry text data, wherein the natural language processing network is obtained by labeled adjustment based on implicit representation reasoning learning and text quality reasoning learning, and the input of the natural language processing network is a first text template library, which includes an implicit representation of a first text template and a priori label of the implicit representation of the first text template, the priori label represents the industry text quality of the implicit representation of the first text template, and the implicit representation of the first text template is the implicit representation of the text after the implicit representation enhancement operation is performed; the original industry text data that meets the preset industry text quality conditions is used as reference data for the industry report, so as to generate an industry report based on the reference data.
[0006] In a second aspect, the present application provides a computer system, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the above-described method when executing the program.
[0007] Beneficial effects of the present application: The present application provides an industry report generation method and system based on deep learning, which introduces a collaborative training task of implicit representation reasoning in the adjustment phase of the natural language processing network. Based on this, the natural language processing network is made to obtain a richer implicit text representation of each text paragraph based on implicit representation reasoning learning during the text quality reasoning learning process, which helps alleviate the high variance problem and early stopping phenomenon caused by over-training of the quality segmentation network. In this way, the quality recognition ability and universality of the neural network for industry texts are increased, which helps to identify high-quality industry texts in massive industry texts, so as to generate accurate, reliable and high-quality industry reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A schematic diagram of an implementation flow of a method for generating an industry report based on deep learning provided in an embodiment of the present application;
[0009] Figure 2 A hardware entity schematic diagram of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0010] Figure 1 A schematic diagram of the implementation flow of a method for generating an industry report based on deep learning provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes the following steps: Step S10: Obtain implicit representation of a paragraph set of original industry text data.
[0011] In step S10, the computer system is responsible for obtaining the implicit representation of the paragraph set of the original industry text data. First, the computer system collects a large amount of original text data related to the financial technology industry from various sources (such as company annual reports, industry research reports, news articles, forum discussions, etc.). These data may contain a variety of information such as descriptions of emerging financial technologies, market trend analysis, competition landscape, and changes in policies and regulations.
[0012] Next, in order to convert these raw texts into a form that the computer can understand and process, the system executes step S10. Specifically, step S10 includes two sub-steps: Paragraph division: The computer system first divides these raw text data into paragraphs. This means that the system will identify paragraph separators in the text (such as line breaks, specific HTML tags or Markdown tags, etc.), thereby dividing long texts into multiple shorter paragraphs. For example, a description of the application of blockchain technology in the financial field can be divided into multiple paragraphs such as introducing the principles of blockchain technology, application cases of blockchain in the financial field, challenges faced and solutions.
[0013] Implicit representation mining: After completing paragraph division, the system performs implicit representation mining on each paragraph. This step usually involves natural language processing (NLP) technology, especially the application of word embedding or sentence embedding models. For example, the system can use pre-trained BERT (Bidirectional Encoder Representations from Transformers) models or GPT (Generative Pre-trained Transformer) series models, which can map text paragraphs into high-dimensional vector space and generate implicit representation vectors for each paragraph.
[0014] The implicit representation vector captures the semantic information in the paragraph, making the originally discrete text data continuous and computable. For example, a paragraph describing the advantages of blockchain technology can have an implicit representation vector that is closer to vectors similar to concepts such as "decentralization", "high security" and "high transparency" in some dimensions, which reflects the theme and core meaning of the paragraph content.
[0015] Through these steps, the computer system converts the original industry text data into an implicit representation of a collection of paragraphs, laying the foundation for subsequent natural language processing, text quality assessment, and industry report generation. This implicit representation not only retains the key information in the text, but also enables the computer system to efficiently analyze and process this information using deep learning models. It is worth noting that the specific form of the implicit representation (such as the dimension of the vector, the value range of the elements, etc.) depends on the NLP model and algorithm used. In practical applications, these parameters are often adjusted and optimized according to specific tasks and data sets. In addition, with the continuous development of NLP technology, new models and algorithms continue to emerge, providing more possibilities and options for the mining of implicit representations.
[0016] Step S20: performing an implicit representation enhancement operation on the implicit representation of the paragraph set to obtain an implicit representation of the paragraph set to be loaded.
[0017] In step S20 of the embodiment of the present application, the computer system further enhances the implicit representation of the paragraph set obtained in step S10 to generate a richer and more distinctive implicit representation of the paragraph set to be loaded. The computer system first obtains the implicit representation of the paragraph set processed by step S10. These representations are usually a series of high-dimensional vectors, each of which corresponds to a paragraph in the original text data and contains the semantic information of the paragraph. In order to improve the quality of these implicit representations and enable them to play a greater role in the subsequent industry report generation process, the system executes step S20 to perform implicit representation enhancement operations.
[0018] The implicit representation enhancement operation can be implemented in a variety of ways. Here, two common methods are used as examples: One method is to enhance through an implicit representation enhancement component. A computer system can use a pre-trained implicit representation enhancement component to enhance the implicit representation of a paragraph collection. This enhancement component itself is a complex machine learning model, such as a neural network based on an attention mechanism, which can identify and amplify key features in the implicit representation while suppressing irrelevant or noise information.
[0019] The input is a set of implicit representation vectors of paragraph sets {v1, v2, …, vn}, where vi∈Rd is a d-dimensional vector representing the implicit representation of the i-th paragraph. The reinforcement component receives these vectors as input, and captures the correlation and importance differences between vectors through multiple layers of nonlinear transformations (such as fully connected layers, attention layers, etc.), thereby generating a reinforced set of vectors {v1′, v2′, …, vn′}. The reinforced implicit representation of the paragraph set, these vectors enhance certain key features while retaining the original information, so that the subsequent processing steps can more easily capture the core points in the text.
[0020] Another simple and effective implicit representation enhancement method is masking, in which the computer system randomly or strategically selects some elements in the implicit representation vector of the paragraph to be set to zero (or replaced with a specific filler value), and then requires the model to reconstruct or predict the masked parts based on the remaining information.
[0021] The input is the same as above, which is the implicit representation vector set {v1, v2, …, vn} of the paragraph set. For each vector vi, the system randomly selects a part of the elements (such as the first k elements of the vector, or elements selected according to a certain probability distribution) for masking. Then, another model (such as an autoencoder) is used to try to restore these masked elements. During the training process, the model learns how to infer the content of the masked part from the remaining information, thereby enhancing the overall expressiveness of the vector. Although this method does not directly generate a new enhanced vector, it indirectly improves the robustness and generalization ability of the original implicit representation through the training process. In practical applications, the original vector can be used directly as the enhanced representation, or combined with the reconstruction error of the autoencoder to generate a "soft" enhanced representation. Note that no matter which enhancement method is used, its effect depends on the training quality and generalization ability of the enhanced component or model. In practical applications, these models may be trained with a large amount of labeled data to ensure that they can accurately capture the key information in the text data and perform effective enhancement processing.
[0022] In addition, although no specific calculation formula or loss function is given directly here, the training process of reinforcement components or models usually involves the calculation and optimization of loss functions. For example, in the training of autoencoders, mean square error (MSE) can be used as a metric for reconstruction error, and the model parameters can be optimized through the back propagation algorithm.
[0023] Step S30: Load the implicit representation of the set of paragraphs to be loaded into the natural language processing network to obtain the industry text quality of the original industry text data, wherein the natural language processing network is obtained by label adjustment based on implicit representation reasoning learning and text quality reasoning learning, and the input of the natural language processing network is a first text template library, which includes an implicit representation of a first text template and a priori label of the implicit representation of the first text template, the priori label represents the industry text quality of the implicit representation of the first text template, and the implicit representation of the first text template is an implicit representation of the text after performing an implicit representation enhancement operation.
[0024] In an embodiment of the present application, the computer system has completed the paragraph division and implicit representation mining of the original industry text data (step S10), and obtained the implicit representation of the set of paragraphs to be loaded through the implicit representation enhancement operation (step S20). These enhanced implicit representations not only retain the key information of the original text, but also enhance their expressiveness and robustness through specific enhancement strategies. Next, the computer system loads these enhanced implicit representations into a pre-trained NLP network. This NLP network is specially designed and trained to evaluate the quality of industry texts. It combines the two capabilities of implicit representation reasoning learning and text quality reasoning learning. Specifically, the network learns how to map the input implicit representation to the corresponding text quality score through a labeled calibration (ie, supervised training) process.
[0025] During the training phase, the NLP network uses the first text template library as training data. This template library contains multiple first text template implicit representations and their corresponding prior tags (i.e., manually annotated text quality scores). Each first text template implicit representation is a text implicit representation that has undergone implicit representation enhancement operations, ensuring the consistency of the training data with the actual application scenario.
[0026] When the NLP network receives the implicit representation of the set of paragraphs to be loaded as input, it will use the knowledge learned in the training phase to reason and analyze these inputs. Each layer in the network (such as embedding layer, convolution layer, recurrent neural network layer, attention layer, etc.) will extract and transform the features of the input data layer by layer, and finally generate a numerical score representing the quality of the text.
[0027] This score reflects the comprehensive performance of the original industry text data in terms of content quality, information richness, logical clarity, etc. The computer system can use this score to determine which text data has higher quality, thereby screening out reference data suitable for generating industry reports.
[0028] Note that the specific implementation of NLP networks may involve complex machine learning models and algorithms. For example, the network may use convolutional neural networks (CNNs) to capture local features in text, or recurrent neural networks (RNNs) and their variants (such as long short-term memory networks (LSTMs)) to process sequence data. In addition, attention mechanisms may also be used to enhance the network's focus on key information.
[0029] During the training process, the NLP network optimizes its parameters by minimizing the loss function. The loss function is usually used to measure the difference between the network's predicted value and the true value. Common loss functions include mean square error (MSE), cross entropy loss, etc.
[0030] Finally, through the evaluation in step S30, the computer system can efficiently screen out high-quality original industry text data, providing reliable material for subsequent industry report generation.
[0031] Step S40: using the original industry text data that meets the preset industry text quality conditions as reference data for the industry report, so as to generate the industry report based on the reference data.
[0032] In an embodiment of the present application, in step S40, the computer system selects reference data that meets the standards from the evaluated original industry text data according to the preset industry text quality conditions, providing a solid content foundation for subsequent report generation. Specifically, the computer system first judges each original industry text data based on the text quality score output by the natural language processing network in step S30. These scores comprehensively reflect the performance of the text in multiple dimensions such as content depth, information accuracy, logical clarity, and industry relevance. By comparing these scores with the preset industry text quality conditions, the system can automatically identify which text data has a higher value and is suitable as a reference for industry reports.
[0033] The preset industry text quality conditions are usually set based on industry norms, user needs and past experience, and may include a series of specific quantitative indicators, such as the minimum score threshold, the frequency of occurrence of specific keywords, the completeness of specific information points, etc. For example, in a report generation scenario in the fintech industry, the preset conditions may require that the text quality score must not be less than 8 points (out of 10 points), and must also include interpretations of the latest regulatory policies, analysis of industry development trends, and case studies of typical companies.
[0034] Once the computer system has completed the screening of text data, the original industry text data that meets the preset conditions is officially determined as the reference data for the industry report. These reference data are not only of high quality, but also rich and diverse in content, covering all aspects and angles of the industry, providing a comprehensive source of information for report compilers. Next, report compilers can use these reference data, combined with their own professional knowledge, industry insights and creative ideas, to start writing industry reports. During the writing process, they can use the specific information, views or data charts in the reference data to support the analysis, forecasts and suggestions in the report. At the same time, they can also further organize, summarize and refine the reference data to form a more organized and readable report content.
[0035] As an implementation manner, the step S10 of obtaining the implicit representation of the paragraph set of the original industry text data specifically includes:
[0036] Step S11: dividing the original industry text data into paragraphs to obtain a plurality of text paragraphs;
[0037] Step S12: performing implicit representation mining on the multiple text paragraphs to obtain implicit representations of the paragraph set.
[0038] In the embodiment of the present application, step S10 is implemented through two sub-steps (S11 and S12) of paragraph division and implicit representation mining, thereby laying a foundation for subsequent processing and analysis.
[0039] In step S11, the computer system divides the continuous original industry text data into structured paragraph units. This division not only helps to reduce the size of a single processing unit and improve processing efficiency, but also preserves the natural segmentation information of the text, which is convenient for subsequent analysis and understanding.
[0040] Specifically, the computer system preprocesses the raw text data, including removing irrelevant characters (such as HTML tags, special symbols, etc.), unifying the encoding format, converting to plain text format, etc. This step ensures the neatness and consistency of the text data, and facilitates subsequent processing. Next, the system uses natural language processing (NLP) technology to identify paragraph separators in the text. In standard document formats, paragraph separators are usually marked by line breaks (such as \n\n in Unix / Linux systems, or \r\n\r\n in Windows systems). However, when processing text in non-standard formats (such as content directly captured from web pages), the system may adopt more complex strategies to identify paragraph boundaries, such as by analyzing the semantic coherence of the text, changes in paragraph themes, etc. Once the paragraph separators are identified, the system can divide the raw text data into multiple independent text paragraphs. Each paragraph contains a relatively complete piece of information or argument, providing a basic unit for subsequent processing and analysis.
[0041] For example, take a description of blockchain technology as an example: "Blockchain technology is a decentralized distributed ledger technology that uses encryption algorithms to ensure the security of data transmission and access without relying on centralized trust institutions. The application areas of blockchain are very wide, including finance, supply chain management, the Internet of Things, etc. In the financial field, blockchain technology can be used in multiple scenarios such as cross-border payments, asset securitization, and supply chain finance. Specifically, blockchain technology realizes the automated execution of transactions through smart contracts, reducing transaction costs and risks. At the same time, the immutability of blockchain also ensures the security and transparency of transaction data. These advantages make blockchain have huge application potential in the financial field." After paragraph division, the above text is divided into two paragraphs:
[0042] Paragraph 1: "Blockchain technology is a decentralized distributed ledger technology that uses encryption algorithms to ensure the security of data transmission and access without relying on a centralized trust institution. Blockchain has a wide range of applications, including finance, supply chain management, and the Internet of Things."
[0043] Paragraph 2: "In the financial sector, blockchain technology can be used in multiple scenarios such as cross-border payments, asset securitization, and supply chain finance. Specifically, blockchain technology realizes the automated execution of transactions through smart contracts, reducing transaction costs and risks. At the same time, the immutability of blockchain also ensures the security and transparency of transaction data. These advantages make blockchain have huge application potential in the financial sector."
[0044] In step S12, multiple text paragraphs are mined for implicit representation to obtain implicit representations of paragraph sets. After the paragraph division is completed, the computer system mines the implicit representation of each text paragraph, that is, converts it into a form that can be efficiently stored, processed and compared in the computer system. This implicit representation is usually generated based on the semantic content of the text and can capture the key information and features in the paragraph.
[0045] Specifically, the system can use pre-trained word embedding models (such as Word2Vec, GloVe, or FastText) to convert each word in a paragraph into a point in a high-dimensional vector space. These vectors capture the semantic similarity and contextual relationship between words, so that similar words are close to each other in the vector space. Since the embedding of a single word may not fully represent the semantic content of the entire paragraph, the system further combines the word vectors in the paragraph into sentence embeddings or paragraph embeddings. This can be achieved through simple average pooling, weighted average pooling, weighted average based on attention mechanism, or more complex neural network models (such as BERT, RoBERTa, etc.). In addition to word embedding and sentence embedding, the system can also use NLP technology to extract other features in the paragraph, such as named entity recognition (NER), part-of-speech tagging (POS Tagging), dependency parsing, etc. These features provide richer semantic and structural information for the paragraph, which is helpful for subsequent text quality assessment and analysis. For example, taking paragraph 1 as an example, after implicit representation mining, the implicit representation vector of the paragraph can be obtained (taking the BERT model as an example): Paragraph 1 implicit representation vector: [0.123, -0.456, 0.789, ..., -0.001] (assuming that this is a high-dimensional vector, only some dimensions are shown here). This vector captures the key semantic information in paragraph 1, such as concepts such as "blockchain technology", "decentralization", "distributed ledger", "encryption algorithm" and their interrelationships. In the subsequent processing process, the computer system can use this vector to perform text similarity calculation, classification, clustering and other operations.
[0046] Through the above two sub-steps (S11 and S12), the computer system converts the original continuous industry text data into a structured implicit representation of a paragraph set. This representation not only retains the original information of the text, but also converts it into a data structure that can be directly processed by the computer through the semantic vector.
[0047] As an implementation manner, the step S20, performing an implicit representation enhancement operation on the implicit representation of the paragraph set to obtain an implicit representation of the paragraph set to be loaded, may specifically include:
[0048] The implicit representation of the paragraph set is loaded into an implicit representation enhancement component to obtain the implicit representation of the paragraph set to be loaded, wherein the implicit representation enhancement component is generated by pseudo-label adjustment (i.e., unlabeled training) of the second text template implicit representation, the template enhanced implicit representation and the first implicit representation; or; the implicit representation of the paragraph set is shielded to obtain the implicit representation of the paragraph set to be loaded.
[0049] In the first embodiment, the implicit representation enhancement component is used for enhancement. In this embodiment, the computer system loads the implicit representation of the paragraph set into a specially designed implicit representation enhancement component, and through the processing of the component, the enhanced implicit representation of the paragraph set to be loaded is obtained. The implicit representation enhancement component itself is a complex machine learning model, which is generated through pseudo-label adjustment (i.e., unlabeled training) and can automatically learn and optimize how to better enhance the implicit representation of the text.
[0050] In order to train the implicit representation enhancement component, a second text template library is constructed. This library contains various types of text templates and their corresponding enhanced versions. For example, the abstract of a scientific research paper can be used as a text template, and the key experimental results, conclusions, etc. in the abstract are specially emphasized or restated to form a template-enhanced implicit representation. These text templates and enhanced representations are processed by implicit representation mining and converted into vector form. The training process of the implicit representation enhancement component does not rely on manually annotated labels, but is carried out through self-supervised learning. Specifically, the component will try to learn from the second text template implicit representation how to generate an output that is closer to the template-enhanced implicit representation. In this process, the component will continuously optimize its internal parameters to minimize the difference between the output and the template-enhanced implicit representation. The key to pseudo-label calibration is to design a reasonable loss function to measure the closeness between the output and the desired target. Commonly used loss functions include mean square error (MSE), cosine similarity loss, etc. During the training process, in addition to the second text template implicit representation and the template-enhanced implicit representation, the first implicit representation (i.e., the implicit representation of the paragraph set output in step S10) is also introduced. Although these first implicit representations are not enhanced, they represent real data in actual application scenarios. By incorporating these data into the training process, the implicit representation enhancement component can be more adaptable to actual application needs. After training, the implicit representation enhancement component can enhance the implicit representation of the new paragraph set. In this process, the component will use the knowledge it has learned to optimize the first implicit representation of the input and generate an enhanced implicit representation of the set of paragraphs to be loaded. These enhanced implicit representations retain the original information while adding more details and features, making it easier for subsequent processing steps to capture key information in the text.
[0051] In the second embodiment, the masking operation is used for reinforcement. Unlike the first embodiment, this method does not rely on complex machine learning models, but instead achieves the reinforcement of implicit representations through simple data transformation. Specifically, the computer system masks some elements in the implicit representation of the paragraph set (such as zeroing or replacing them with specific values), and then requires the model to reconstruct or predict the masked parts based on the remaining information. In the specific implementation of the masking operation, for each paragraph implicit representation vector, the computer system randomly selects a certain proportion of elements for masking. For example, 20% of the elements in the masked vector can be selected. The specific implementation of the masking operation can be to set the values of these elements to 0, or to replace them with a specific filler value (such as -1 or a very small floating point number). Although this embodiment itself does not directly involve model training, it can be used in combination with other machine learning models. For example, an autoencoder model can be trained to reconstruct the masked implicit representation. During the training phase, the autoencoder learns how to recover complete information from the masked implicit representation. In practical applications, although the autoencoder is not directly used for reconstruction, the masking process itself can make other processing steps (such as classifiers, clustering algorithms, etc.) more dependent on the unmasked key information. Through the masking operation, part of the information in the implicit representation of the paragraph set is hidden, forcing subsequent processing steps to focus more on the remaining key information. Although this method is simple and direct, it can also improve the expressiveness and discrimination of text data to a certain extent.
[0052] Step S20 optimizes the implicit representation of the paragraph set through an implicit representation enhancement operation, thereby providing a higher quality data foundation for subsequent industry report generation.
[0053] As an implementation mode, the method further includes a training process of implicitly representing the reinforcement component, specifically including:
[0054] Step S201: obtaining a second text template library and a basic implicit representation enhancement component, wherein the second text template library includes the second text template implicit representation, the template enhanced implicit representation and the first implicit representation;
[0055] Step S202: loading the second text template library into the basic implicit representation enhancement component, and obtaining a second implicit representation by inference, wherein the second implicit representation is obtained by simulating the second text template implicit representation and the template enhanced implicit representation;
[0056] Step S203: determining a first training error according to the second implicit representation and the first implicit representation;
[0057] Step S204: adjusting the basic implicit representation enhancement component according to the first training error to obtain an implicit representation enhancement component.
[0058] In the embodiment of the present application, the training of the implicit representation enhancement component is a key link, which is directly related to the enhancement effect of the implicit representation of the subsequent text data, and thus affects the quality of the entire report generation. The following will be combined with specific application scenarios to explain in detail the various steps of the implicit representation enhancement component training process.
[0059] In step S201, a second text template library and a basic implicit representation enhancement component are obtained. In order to train the implicit representation enhancement component, a second text template library is constructed. This library contains a wealth of text templates and their corresponding enhanced versions, which are used to guide the component to learn how to perform effective implicit representation enhancement. The second text template implicit representation is a representative paragraph or sentence selected from various types of texts, and is obtained in the form of a vector or matrix after implicit representation mining. The template-enhanced implicit representation is an enhanced version of the second text template implicit representation, which is usually obtained through manual editing or specific algorithm processing. The enhancement method may include increasing the weight of key information, supplementing missing contextual information, adjusting the distribution of vectors, etc. Taking the above example, the template-enhanced implicit representation may be enhanced by emphasizing keywords such as "Internet of Things", "Big Data", "Cloud Computing", or adding more features related to "intelligence" and "customization" to the vector.
[0060] The basic implicit representation enhancement component is an inadequately trained machine learning model. It can be a neural network-based structure, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), a Transformer, etc. The input of this component is the text implicit representation, and the output is the enhanced implicit representation. Before training begins, this component is initialized, including setting the network structure, initializing parameters, and defining the loss function.
[0061] In step S202, the computer system loads the data in the second text template library into the basic implicit representation enhancement component, and generates a second implicit representation through the reasoning process of the component.
[0062] Specifically, the computer system reads the second text template implicit representation and the template enhanced implicit representation from the second text template library. These representations exist in the form of vectors or matrices and can be directly used as inputs of the component.
[0063] After receiving the input, the basic implicit representation enhancement component will perform forward propagation according to the network structure and parameters defined internally. During this process, the component will try to capture the key features in the input implicit representation and generate an enhanced implicit representation based on these features. Since the component has not been fully trained, this initially generated enhanced implicit representation (i.e., the second implicit representation) may be significantly different from the template enhanced implicit representation.
[0064] For example, assume that the base implicit representation enhancement component is an LSTM-based network. When the second text template implicit representation (such as the vector represented by "[0.1, 0.2, ...]") is passed into the LSTM network as input, the network processes the input sequence through the forget gate, input gate, and output gate, and generates a hidden state at each time step. Finally, the network generates an enhanced implicit representation (i.e., the second implicit representation) based on the hidden states of all time steps, such as "[0.15, 0.3,...]".
[0065] In step S203, the computer system evaluates the difference between the second implicit representation generated by the base implicit representation enhancement component and the desired template enhanced implicit representation to determine the error in the training process. However, since unlabeled training (pseudo-label calibration) is used here, the template enhanced implicit representation cannot be directly obtained as a supervisory signal. Instead, the first implicit representation is used to indirectly evaluate the quality of the second implicit representation.
[0066] Specifically, although the first implicit representation is not directly equivalent to the template-enhanced implicit representation, they both come from similar text data and reflect the semantic content of the text to a certain extent. Therefore, it can be assumed that if the second implicit representation (i.e., the first implicit representation after enhancement) is semantically consistent with or improved from the first implicit representation, it may be an effective enhancement result. In order to quantify the difference or similarity between the second implicit representation and the first implicit representation, a variety of metrics can be used, such as cosine similarity, Euclidean distance, Manhattan distance, etc. However, since the goal is to optimize the enhancement effect rather than simply maintain similarity, it may be more appropriate to define an error function related to the enhancement goal. In practice, a contrastive learning-based method can be used to calculate the error. Specifically, an auxiliary discriminator (although it does not directly participate in the training of the enhancement component) can be constructed to distinguish the second implicit representation from the first implicit representation. If the discriminator has difficulty distinguishing the two representations (i.e., it thinks they are similar enough), it means that the enhancement component may not effectively enhance the first implicit representation; conversely, if the discriminator can easily distinguish them, it means that the enhancement component may have produced a meaningful enhancement effect. However, due to the additional discriminator model of this method and the complex training process, a more direct error calculation method is preferred in practical applications. To simplify the problem, it can be assumed that the template-enhanced implicit representation is more obvious or prominent than the first implicit representation in some key features. Therefore, a feature difference error function can be defined to measure the difference between the second implicit representation and the first implicit representation in these key features. For example, if it is believed that keywords such as "Internet of Things" and "Big Data" should have higher weights or more significant representations in the enhanced implicit representation, then the relative weights or representation strength differences of these keywords in the two implicit representations can be calculated as part of the error. However, since the implicit representation is usually in the form of a high-dimensional vector or matrix, it may not be realistic to directly compare the weights of specific keywords. Therefore, a more practical approach is to use an error function that can capture the overall difference, such as mean square error (MSE) or cosine embedding loss. These functions can measure the overall closeness or difference between two vectors.
[0067] In step S204, the computer system adjusts the parameters of the basic implicit representation enhancement component according to the first training error calculated in step S203, thereby gradually optimizing its enhancement effect. For example, after obtaining the first training error, the computer system uses a back propagation algorithm to transmit the error signal from the output layer back to the input layer layer by layer for gradient optimization to complete the parameter adjustment.
[0068] As an implementation manner, in step S201, the process of obtaining the second text template library may specifically include:
[0069] Step S2011: obtaining a first industry text template, a reinforced text template and a first industry text, wherein the first industry text is obtained by splicing the first industry text template and the reinforced text template;
[0070] Step S2012: Perform implicit representation mining on the first industry text template to obtain the implicit representation of the second text template, perform implicit representation mining on the enhanced text template to obtain the template enhanced implicit representation, and perform implicit representation mining on the first industry text to obtain the first implicit representation.
[0071] In the embodiment of the present application, step S201 is a key step in constructing the second text template library, which provides the necessary data basis for the subsequent training of the implicit representation enhancement component. This step specifically involves obtaining the first industry text template, the enhanced text template, and the first industry text composed of them, and performing implicit representation mining on these texts to generate corresponding implicit representations.
[0072] In step S2011, the primary task of the computer system is to collect and process industry-related text data to build a template library required for training the implicit representation enhancement component.
[0073] The first industry text template can be derived from authoritative industry publications, professional websites, technical guidelines issued by government agencies, etc. These templates should be representative and universal, covering the core concepts and key technical points of green energy technology. The design of the enhanced text template aims to highlight or change certain aspects of the original template through specific text operations in order to produce differences in implicit representation, thereby providing rich comparative samples for the training of the implicit representation enhancement component. The enhanced text template can be constructed in a variety of ways, including but not limited to adding additional information, modifying sentence structure, replacing keywords, etc. These operations are intended to simulate the text variation that may occur in actual applications. The first industry text is obtained by splicing the first industry text template with the enhanced text template. This splicing can be a simple head-to-tail connection or a more complex text fusion, depending on the design purpose of the enhanced text template. The first industry text not only contains the original industry knowledge framework, but also incorporates the enhanced specific information points, providing a diverse sample for the training of the implicit representation enhancement component.
[0074] In step S2012, the computer system will perform implicit representation mining on the collected text data, that is, convert the text into a numerical form (such as a vector or matrix) that can be understood and processed by the computer. Implicit representation mining usually involves word embedding and sentence embedding technologies in natural language processing (NLP). These technologies can convert words or sentences in the text into vectors in a high-dimensional space, thereby capturing the semantic information of the text. In the implicit representation mining of the first industry text template, the first industry text template can be processed using a pre-trained word embedding model (such as Word2Vec, GloVe) or a sentence embedding model (such as BERT, RoBERTa).
[0075] The implicit representation mining of the enhanced text template is the same as that of the first industry text template, and the same embedding model is used to process the enhanced text template. Through implicit representation mining, the key information points in the enhanced text template will be more prominently represented in the vector space, thereby providing a strong supervisory signal for the training of the implicit representation enhancement component. The implicit representation mining of the first industry text also uses the pre-trained embedding model to process the first industry text. Since the first industry text is the result of the splicing of the template and the enhanced text, its implicit representation will comprehensively reflect the information of both. The implicit representation of the first industry text will be used as one of the input samples of the implicit representation enhancement component to train the component to learn how to effectively extract the enhanced key information from the original implicit representation.
[0076] In order to more intuitively understand the results of implicit representation mining, we can assume that the implicit representation vector output by the BERT model is in the following form (only some dimensions are shown here to simplify the explanation):
[0077] The first industry text template implicit representation vector: v1=[0.1,−0.2,0.3,…,−0.05];
[0078] Strengthen the implicit representation vector of the text template: v2=[0.2,0.1,0.5,…,0.02];
[0079] The first industry text implicit representation vector: v3=[0.15,−0.1,0.4,…,−0.03];
[0080] Each element in these vectors represents the semantic feature of the text in a certain dimension. By comparing these vectors, we can find their relative positions and relationships in the semantic space, thus providing guidance for the subsequent training process.
[0081] Through the above steps, the computer system constructs a second text template library, which contains the first industry text template, the enhanced text template, the first industry text and its corresponding implicit representation. These data and implicit representations will provide strong data support and supervision signals for the subsequent training of the implicit representation enhancement component. During the training process, the component will learn how to extract and enhance key information points from the original implicit representation, thereby generating a richer and more discriminative implicit representation result.
[0082] As an implementation manner, the step S2011, obtaining the first industry text template, strengthening the text template and the first industry text, may specifically include the following four methods:
[0083] Method 1 includes: step S20111: obtaining the first industry text template, and arbitrarily constructing a disturbed text, and determining the disturbed text as the enhanced text template; step S20112: splicing the disturbed text with the first industry text template to obtain the first industry text;
[0084] Method 2 includes: step S2011A: obtaining the first industry text template, and arranging characters of the first industry text template in random order to obtain a character random text of the first industry text template, and determining the character random text as the enhanced text template; step S2011B: splicing the character random text with the first industry text template to obtain the first industry text;
[0085] Method three includes: step S2011I: obtaining the first industry text template, and performing paragraph truncation on the first industry text template to generate paragraph truncation text of the first industry text template, and determining the paragraph truncation text as the enhanced text template; step S2011II: splicing the paragraph truncation text with the first industry text template to obtain the first industry text;
[0086] Method four includes: step S2011a: obtaining the first industry text template, and arbitrarily replacing the text characters of the first industry text template to obtain the character replacement text of the first industry text template, and determining the character replacement text as the enhanced text template; step S2011b: splicing the character replacement text with the first industry text template to obtain the first industry text.
[0087] In the embodiment of the present application, step S2011 involves obtaining the first industry text template, the enhanced text template, and the first industry text spliced in a specific way. In order to enrich the diversity of the second text template library, the computer system can use a variety of methods to generate the enhanced text template and splice it with the first industry text template. The following will explain the four implementation methods proposed in step S2011 in detail, and illustrate them with examples in combination with specific application scenarios.
[0088] Method 1: Construct an enhanced text template by perturbing the text.
[0089] In step S20111, the computer system obtains the first industry text template from various sources (such as industry reports, professional websites, academic papers, etc.). These templates should be representative and universal, and can accurately reflect the core concepts and key technologies of the industry. Then, the computer system constructs a perturbed text in an arbitrary manner. The purpose of the perturbed text is to introduce certain variations or noise without changing the main meaning of the original text, so as to simulate the text diversity that may occur in actual applications. The perturbation method can include adding irrelevant words, changing sentence structures, replacing synonyms, etc.
[0090] In step S20112, the computer system splices the disturbed text (ie, the enhanced text template) with the first industry text template to generate the first industry text. The splicing method can be a simple end-to-end connection or a more complex text fusion strategy.
[0091] Method 2: Construct an enhanced text template by arranging characters in random order.
[0092] In step S2011A, after the computer system obtains the first industry text template, it shuffles the characters in the template using a specific algorithm to generate a shuffled text. This shuffle does not change the overall length of the text, but destroys the original vocabulary structure and semantic coherence, thereby generating a "similar-looking but actually different" enhanced text template.
[0093] For example, the first industry text template is: "Blockchain is a decentralized distributed ledger technology." After the computer system shuffles the characters of this template, the resulting shuffled text (i.e., enhanced text template) may be: "Block technology shuffles the technology chain original heart one decentralized distributed ledger technology." Although these characters are the same as the original template, their order is disrupted, making the generated text difficult to understand while keeping the vocabulary unchanged.
[0094] In step S2011B, the computer system splices the character disordered text with the first industry text template. Since the character disordered text is similar to the original template in form but very different in semantics, this splicing method can generate a contrasting first industry text.
[0095] The first industry text after splicing may be as follows: "Blockchain is a decentralized distributed ledger technology. The technology is a decentralized blockchain technology." Obviously, such a text is semantically incoherent, but it provides diverse samples for the training of implicit representation reinforcement components.
[0096] Method 3: Build an enhanced text template through paragraph segmentation.
[0097] In step S2011I, the computer system performs a paragraph interception operation on the first industry text template. The paragraph interception can be continuous or jumpy, depending on the design requirements of the enhanced text template. The intercepted text segment is used as the enhanced text template to form a comparison with the original template.
[0098] In step S2011II, the computer system splices the paragraph intercepted text (ie, the enhanced text template) with the first industry text template. Since the intercepted text is usually a part of the original template, the spliced text is highly related to the original template in content, but may be different in structure.
[0099] Method 4: Build enhanced text templates through character replacement.
[0100] In step S2011a, the computer system arbitrarily replaces characters in the first industry text template. The replacement operation can be local (for a specific word or phrase) or global (for multiple characters in the entire template). The purpose of the replacement is to generate an enhanced text template that is similar in form to the original template but different in content.
[0101] In step S2011b, the computer system splices the character replacement text (i.e., enhanced text template) with the first industry text template. Since the replacement operation usually retains most of the content of the original template and makes partial adjustments, the spliced text generally retains the theme and structure of the original template, but changes in details.
[0102] Through the above four methods, the computer system can flexibly construct a variety of enhanced text templates and splice them with the first industry text template to generate the first industry text. These methods not only enrich the diversity of the second text template library, but also provide valuable sample resources for the training of implicit representation enhancement components. In practical applications, these methods can be selected and adjusted according to specific needs and scenarios to achieve the best training effect. At the same time, with the continuous advancement of technology and the continuous increase in data volume, these methods can be further optimized and expanded to meet the needs of more complex industry report generation.
[0103] As an implementation mode, the method further includes a training process of a natural language processing network, specifically including:
[0104] Step S100: obtaining a first text template library and a basic natural language processing network, wherein the second text template library includes an implicit representation of the first text template and a priori marks of the implicit representation of the first text template, the basic natural language processing network includes a basic component, a basic text quality classification component and one or more basic reasoning components, the priori marks represent the quality of the industry text implicitly represented by the first text template, the implicit representation of the first text template is an implicit representation of the text after the implicit representation enhancement operation is performed, the execution results of the one or more basic reasoning components are used to adjust the basic components and the basic text quality classification component, the execution result of the basic text quality classification component is the execution result of the basic natural language processing network, and the implicit representation of the first text template represents an implicit representation of a paragraph set of text paragraphs;
[0105] Step S200: Load the first text template library into the basic natural language processing network, and perform labeled calibration based on the text quality reasoning learning and the implicit representation reasoning learning to obtain the natural language processing network.
[0106] In the field of natural language processing (NLP), building a natural language processing network that can effectively evaluate the quality of industry texts and generate high-quality industry reports is a complex but crucial task. This process requires not only that the model can accurately understand the semantic content of the text, but also that it can learn the complex relationship between text quality and features from a large amount of data.
[0107] In step S100, the computer system prepares two key elements: a first text template library and a basic natural language processing network. The first text template library is the basic data resource for training the natural language processing network. It contains a large number of text templates and their corresponding implicit representations and prior tags (i.e., labels of text quality). The text templates should come from multiple reliable industry data sources, such as industry research reports, authoritative news websites, professional forums, etc. These templates should cover all aspects of the industry to ensure that the trained model has a wide range of applicability. For example, in the scenario of generating a report for the fintech industry, the text templates may include information about blockchain technology and the application of artificial intelligence in the financial field.
[0108] For each text template, the computer system uses a pre-trained word embedding or sentence embedding model (such as BERT, RoBERTa, etc.) to convert it into an implicit representation (in vector or matrix form). These implicit representations capture the semantic features of the text template and provide a basis for subsequent processing. Prior tags are the result of manual evaluation of the quality of the text template, and a multi-level scoring system (such as 1-5 points) is usually used to indicate the quality of the text. These tags are supervisory signals for model learning and are used to guide the model to learn how to evaluate text quality.
[0109] The basic natural language processing network is a complex system consisting of multiple components, which aims to improve the accuracy of text quality assessment through supervised learning. This component is responsible for preliminary processing of the implicit representation of the input, such as filtering and noise reduction, to improve the robustness of subsequent processing steps. For example, convolutional neural networks (CNN) or recurrent neural networks (RNN) can be used to extract and filter features of implicit representations.
[0110] The basic text quality classification component is a key part of the network, responsible for outputting a text quality score based on the implicit representation of the input. It is usually a multi-layer perceptron (MLP) or a deep learning classifier that optimizes the model parameters by minimizing the error between the predicted score and the true score. The basic reasoning component is used to learn the intrinsic relationship between implicit representations and assist the text quality classification component in making more accurate evaluations. They can be attention mechanisms, graph neural networks (GNNs), etc., to capture dependencies and contextual information between text paragraphs.
[0111] In step S200, the computer system loads the data in the first text template library into the basic natural language processing network, and optimizes the model parameters through labeled tuning.
[0112] First, the computer system loads the implicit representation of the text template and the corresponding prior mark in the first text template library into the memory. Then, the implicit representation is subjected to necessary preprocessing operations, such as standardization and normalization, to ensure the stability and efficiency of model training. Model training is a key link in the construction of natural language processing networks. It involves multiple iterative steps, each of which aims to optimize the model parameters by minimizing the loss function. In each iterative step, the model first performs forward propagation. During the forward propagation process, the input text template implicit representation is processed by the basic component and then passed to the basic text quality classification component and the basic reasoning component. These components calculate the predicted score of text quality and the reasoning result of the implicit representation based on the current model parameters. Then, the computer system calculates the loss value based on the difference between the predicted score and the true score (prior mark). Commonly used loss functions include mean square error (MSE), cross entropy loss, etc. After calculating the loss value, the model performs back propagation. During the back propagation process, the loss value is back propagated back to each layer in the network through gradient descent (or more advanced optimization algorithms, such as Adam, RMSprop, etc.) to update the parameters of the layer. The goal of parameter updating is to minimize the loss function so that the model's predicted score is closer to the true score. In addition to text quality reasoning learning, the natural language processing network also performs implicit representation reasoning learning through basic reasoning components. These components assist the text quality classification component in making more accurate evaluations by capturing dependencies and contextual information between implicit representations. During training, the output of the basic reasoning component is also used to calculate the loss value and optimize its parameters through backpropagation.
[0113] During the training process, the computer system regularly evaluates the performance of the model and tunes the training process based on the evaluation results. The evaluation usually includes calculating the accuracy, recall, F1 score and other indicators of the model on the validation set, and adjusting the learning rate, batch size, number of iterations and other hyperparameters based on these indicators. In addition, the early stopping strategy can be used to prevent overfitting.
[0114] When the performance of the model on the validation set reaches the predetermined standard, the training process ends. At this point, the computer system can deploy the trained natural language processing network to actual application scenarios to evaluate the quality of industry texts and generate high-quality industry reports.
[0115] Next, a natural language processing network was designed, which includes a basic component, a basic text quality classification component, and an attention mechanism basic reasoning component. The data in the first text template library was loaded into the network, and the model parameters were optimized through supervised learning. During the training process, hyperparameters such as learning rate and batch size were continuously adjusted, and the performance of the model was regularly evaluated on the validation set. Finally, a natural language processing network that can accurately evaluate the quality of blockchain technology-related texts was trained. The network was deployed to actual application scenarios, and the latest blockchain technology-related text data was regularly collected from major news websites, industry research reports and other channels. Then, the trained network was used to evaluate the quality of these data, and high-quality texts were selected as reference data for industry reports based on the evaluation results. Finally, a detailed and accurate market analysis report was generated for reference by fintech companies by combining professional knowledge and data analysis results.
[0116] As a first implementation method of step S200, the step S200, loading the first text template library into the basic natural language processing network, performing labeled calibration based on the text quality reasoning learning and the implicit representation reasoning learning to obtain the natural language processing network, may specifically include: step S210: loading the first text template implicit representation into the basic component and the basic text quality classification component to obtain the inferred industry text quality.
[0117] In an embodiment of the present application, as a first implementation of step S200, the process gradually optimizes the basic natural language processing network by combining text quality reasoning learning and implicit representation reasoning learning, and finally obtains a model that can accurately evaluate the quality of industry texts. In step S210, the computer system inputs the implicit representation in the first text template library (i.e., the text vector or matrix obtained through implicit representation mining) into the basic components and basic text quality classification components of the basic natural language processing network. The basic component is responsible for preliminary processing of the input implicit representation, such as filtering, noise reduction, etc., to extract features useful for text quality assessment. The basic text quality classification component performs preliminary reasoning on the text quality based on these features and outputs a predicted industry text quality score.
[0118] Step S220: Determine a second training error based on the inferred industry text quality and the prior label.
[0119] In step S210, the computer system has loaded the implicit representation of the first text template into the basic component and the basic text quality classification component of the basic natural language processing network, and obtained the inference industry text quality (i.e., the model's predicted score for text quality). Next, in step S220, the computer system compares these predicted scores with the priori marks (i.e., the true scores of the manual annotations) to determine the second training error. In order to calculate the second training error, the computer system can use a certain form of loss function. In the text quality assessment task, commonly used loss functions include mean square error (MSE), mean absolute error (MAE), etc. The second training error reflects the deviation between the current prediction ability of the model and the actual annotation. The smaller the error, the closer the prediction result of the model is to the actual situation, and the better the performance of the model. By minimizing the second training error, the computer system can continuously adjust the parameters of the basic natural language processing network to optimize the prediction ability of the model. During the training process, the computer system periodically calculates the second training error and adjusts the parameters of the model (such as weights and biases) according to the error value. This process is usually implemented through a back-propagation algorithm, which updates the weights and biases of the model according to the error gradient in the hope of reducing the error value in the next iteration. Through continuous iterative training, when the second training error is reduced to a certain extent and tends to be stable, it can be considered that the model has converged to a better state. At this point, the computer system can use the trained model for actual industry text quality assessment tasks to provide high-quality data support for the generation of industry reports. Step S220 provides important feedback information for the training and adjustment of the natural language processing network by calculating the difference between the inferred industry text quality and the prior mark (i.e., the second training error).
[0120] Step S230: cyclically calibrating the basic component and the basic text quality classification component according to the second training error to obtain a first component and a first text quality classification component.
[0121] In step S220, the second training error between the inference industry text quality and the prior label has been calculated. This error reflects the gap between the current model prediction performance and the actual situation. The goal of step S230 is to optimize the model based on this error. The specific steps are as follows:
[0122] 1. Parameter initialization and adjustment strategy. First, the computer system will initialize the parameters of the model before starting training. These parameters include weights and biases in the network. The initialization method may use random initialization, Xavier initialization or He initialization. At the same time, the system will also set some hyperparameters, such as learning rate, batch size, number of iterations, etc. These hyperparameters will guide the subsequent training process;
[0123] 2. Backpropagation algorithm. Next, the computer system uses the backpropagation algorithm to optimize the model parameters. The backpropagation algorithm is an effective neural network training algorithm that minimizes the loss function by calculating the gradient of the loss function with respect to each parameter and updating the parameters in the opposite direction of the gradient. In step S230, the system first calculates the gradient of the loss function with respect to each parameter based on the second training error. Here, the loss function usually selects the mean square error (MSE) or other loss functions suitable for regression tasks;
[0124] 3. Parameter update. After obtaining the gradient, the computer system uses an optimization algorithm (such as gradient descent, Adam, RMSprop, etc.) to update the parameters of the model. These algorithms calculate new parameter values based on the gradient and learning rate, thereby gradually reducing the loss function;
[0125] 4. Loop iteration and convergence check. The parameter update process in step S230 will be repeated in one or more epochs (iteration cycles). In each epoch, the system will traverse the entire training set (or batch process a portion of the samples in the training set), and perform forward propagation (calculating the predicted value), calculating the loss function, back propagation (calculating the gradient) and parameter update steps for each sample. As the iterations proceed, the performance of the model on the training set will usually gradually improve, and the second training error will gradually decrease. In order to determine whether the model has converged (that is, the performance is no longer significantly improved), the system will regularly check the performance of the model on the validation set (a data set independent of the training set). If the performance of the model on the validation set does not change significantly over multiple epochs, or the change is very small, it can be considered that the model has converged and the training process can be ended.
[0126] By continuously repeating the parameter updating process in step S230, the computer system can gradually optimize the basic components and basic text quality classification components in the basic natural language processing network, thereby improving the accuracy and robustness of the model in the task of evaluating industry text quality. This is crucial for generating high-quality industry reports.
[0127] Step S240: arbitrarily determine N paragraph implicit representations in the first text template implicit representation, and combine the N paragraph implicit representations according to the order of the paragraphs to obtain a first implicit representation to be loaded, N≥1.
[0128] In step S240, the specific operations of the computer system may be as follows:
[0129] 1. Selecting implicit representations of paragraphs. The computer system arbitrarily selects N implicit representations of paragraphs from the implicit representation of the first text template. These implicit representations of paragraphs are extracted from text paragraphs through implicit representation mining techniques (such as word embedding, sentence embedding, etc.). They capture the semantic features of paragraphs and are represented in the form of vectors.
[0130] 2. Combine the implicit representations of the paragraphs. Next, the computer system combines the selected implicit representations of the paragraphs according to the natural order of the paragraphs in the original text. The combination can be a simple vector concatenation or a more complex fusion strategy, depending on the design of the model. For example, if the vector concatenation method is adopted, and it is assumed that each paragraph implicit representation is a vector of length D, then the first implicit representation to be loaded after concatenating v1 and v2 will be a vector of length 2D, expressed as [v1;v2];
[0131] 3. Generate the first implicit representation to be loaded. By combining the implicit representations of the paragraphs, the computer system generates the first implicit representation to be loaded. This representation not only contains the semantic information of a single paragraph, but also implies the dependencies and contextual information between paragraphs. This is crucial for the subsequent implicit representation reasoning learning and text quality assessment;
[0132] 4. Simulate actual application scenarios. Step S240 helps the model learn richer text representation capabilities by simulating possible combinations of text segments that may occur in actual applications. In the scenario of generating industry reports on electric vehicle technology, this combination may correspond to the splicing together of related paragraphs extracted from different sources (such as technical documents, news reports, and academic papers). By training the model to process this combined text representation, it can be expected that the model can more accurately evaluate the quality of text segments composed of multiple paragraphs in actual applications.
[0133] Step S250: Load the first implicit representation to be loaded into the first component and the first basic reasoning component among the one or more basic reasoning components to obtain a first reasoning implicit representation.
[0134] In step S250, the specific operations of the computer system are as follows:
[0135] 1. Load the first implicit representation to be loaded. The computer system loads the first implicit representation to be loaded (i.e., the implicit representation of the combined text segment) generated in step S240 into the basic natural language processing network. This implicit representation contains information of multiple paragraphs and may be combined by vector concatenation or fusion;
[0136] 2. Preliminary processing by the first component. The first implicit representation to be loaded will first be processed by the first component in the basic natural language processing network (which may be the feature extraction layer, encoding layer, etc.). This step aims to extract feature information that is useful for subsequent reasoning and evaluation, and may also include some filtering, noise reduction and other operations to improve the quality of the data;
[0137] 3. Perform reasoning using the first basic reasoning component. The data after preliminary processing is then passed to the first basic reasoning component. The first basic reasoning component may be a complex neural network structure, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), a Transformer, etc. It is responsible for capturing the deep semantic information in the implicit representation and performing reasoning analysis;
[0138] 4. Generate the first reasoning implicit representation. The output of the first basic reasoning component is the first reasoning implicit representation. This representation not only contains the semantic information of the original combined text fragment, but also becomes richer and more discriminative through the processing and refinement of the reasoning component. It will become an important basis for text quality evaluation and model optimization in subsequent steps.
[0139] Step S260: Determine a third training error based on the first inference implicit representation and the Mth paragraph implicit representation in the first text template implicit representation, where M=N+1.
[0140] In step S260, the specific operations of the computer system may be as follows:
[0141] 1. Determine the comparison object. In step S250, the first inference implicit representation has been obtained, which is obtained by reasoning and analyzing the first implicit representation to be loaded (i.e., the combined text segment implicit representation). In step S260, this inference result is compared with a specific paragraph implicit representation in the original first text template implicit representation. This specific paragraph is usually the paragraph immediately following the paragraph included in the first implicit representation to be loaded, that is, the paragraph M=N+1, where N is the number of paragraphs included in the first implicit representation to be loaded;
[0142] 2. Calculate the difference. In order to measure the difference between the first inference implicit representation and the implicit representation of a specific paragraph, the computer system uses a suitable metric to calculate the distance or similarity between them. Commonly used metrics include Euclidean distance, cosine similarity, Manhattan distance, etc. These metrics can help understand the relative position relationship between the two implicit representations in the vector space, thereby evaluating the accuracy of the model in implicit representation reasoning;
[0143] 3. Evaluate the accuracy of reasoning. By calculating the difference value (or loss value), the computer system can evaluate the accuracy of the model in implicit representation reasoning. If the difference value is small, it means that the reasoning result of the model is closer to the corresponding paragraph in the original text, and the reasoning accuracy of the model is high; otherwise, it means that the reasoning result of the model may deviate greatly from the original text, and the model should be further optimized.
[0144] Step S270: calibrating the first component and the first text quality classification component according to the third training error to obtain a second component and a second text quality classification component.
[0145] In step S270, the specific operations of the computer system may be as follows:
[0146] 1. Analyze the third training error. In step S260, the difference between the first inference implicit representation and the implicit representation of a specific paragraph in the first text template implicit representation is calculated, i.e., the third training error. This error reflects the inaccuracy of the model in the implicit representation inference learning process and is the goal of model optimization;
[0147] 2. Back propagation and parameter update. Based on the third training error, the computer system will execute the back propagation algorithm to guide the update of parameters by calculating the gradient of the error with respect to the model parameters. In deep learning models, this usually involves the weights and bias terms of multi-layer neural networks;
[0148] 3. Adjust the first component and the first text quality classification component. Through back propagation and parameter update, the computer system adjusts the first component and the first text quality classification component in the basic natural language processing network. The first component may include a feature extraction layer, an encoding layer, etc., which are responsible for extracting useful feature representations from the input text; the first text quality classification component evaluates the quality of the text based on these feature representations;
[0149] 4. Evaluate the tuning effect. After each tuning, the computer system will evaluate the tuning effect of the model. This usually involves testing the performance of the model on the validation set to check whether the model is overfitting or underfitting. If the performance of the model is improved and there is no sign of overfitting, then the tuning is successful; otherwise, hyperparameters (such as learning rate, batch size, etc.) may be adjusted or different network structures may be tried.
[0150] Step S270 adjusts the first component and the first text quality classification component in the basic natural language processing network by back propagation and parameter update based on the third training error. This process is one of the key iterative optimization steps in model training, which helps to improve the accuracy of the model in implicit representation reasoning learning, thereby improving the model's overall assessment ability of text quality.
[0151] Step S280: arbitrarily determine H first implicit representation elements in the first text template implicit representation (for example, select H vector constituent elements in the feature vector) and perform a masking operation to obtain a second implicit representation to be loaded, where H≥1.
[0152] In step S280, the specific operations of the computer system may be as follows:
[0153] 1. Determine the masking elements. The computer system randomly selects H first implicit representation elements from the implicit representation of the first text template for masking operations. These elements can be specific dimensions in a vector, specific rows or columns in a feature matrix, etc., depending on the specific form of the implicit representation. The masking operation usually sets the values of these elements to 0 or a specific padding value to simulate the situation where text information is missing. For example, assuming that the implicit representation of the first text template is a vector v=[v1,v2,…,vD] of length D, the computer system randomly selects the 3rd and 7th elements in the vector for masking, that is, sets v3=0 and v7=0 (or a specific padding value), and obtains the masked vector v′=[v1,v2,0,v4,v5,v6,0,…,vD];
[0154] 2. Generate the second implicit representation to be loaded. The implicit representation of the first text template obtained after the masking operation (some elements are set to 0 or filled with values) is the second implicit representation to be loaded. This representation simulates the situation where part of the text information is missing in actual applications, which is crucial for the training model to make reasonable inferences when the information is incomplete;
[0155] 3. Enhance the robustness of the model. By shielding some implicit representation elements and inputting them into the model for training, the computer system can force the model to learn to effectively recover implicit representations and evaluate text quality even when the information is incomplete. This training method helps to enhance the robustness of the model, enabling it to cope with various complex situations in practical applications;
[0156] 4. Connection of subsequent training steps. The second implicit representation to be loaded generated in step S280 will be passed as input to the second component and the second basic reasoning component in step S290. In these components, the model will try to restore the masked element values and perform further reasoning and learning based on the restored implicit representation. This process not only helps to improve the implicit representation recovery capability of the model, but also optimizes the parameter configuration of the entire model through the feedback mechanism.
[0157] Step S280 generates a second implicit representation to be loaded by masking some elements in the implicit representation of the first text template. This process simulates the situation where part of the text information is missing, which helps to enhance the robustness and inference ability of the model under incomplete information.
[0158] Step S290: Load the second implicit representation to be loaded into the second component and the second basic reasoning component in the one or more basic reasoning components to obtain a second reasoning implicit representation.
[0159] In step S290, the specific operations of the computer system are as follows:
[0160] 1. Load the second implicit representation to be loaded. The computer system loads the second implicit representation to be loaded generated in step S280 into the second component and the second basic reasoning component that have been preliminarily adjusted. Some elements of this implicit representation are shielded, simulating the situation where text information is missing that may occur in actual applications. For example, assuming that the implicit representation of the first text template is a vector containing 100 elements, after the shielding operation of step S280, 20 elements are set to 0 (or a specific filling value), and the remaining 80 elements remain unchanged. This partially shielded vector is the second implicit representation to be loaded, which is now loaded into the second component and the second basic reasoning component;
[0161] 2. Perform implicit representation recovery. The second component and the second basic reasoning component work together to try to recover the masked element values. This process may involve complex neural network operations and reasoning algorithms, such as the decoding part of an autoencoder, the generator part of a generative adversarial network (GAN), or other model structures that can learn data distribution. For example, if the second basic reasoning component is a sequence-to-sequence (Seq2Seq) model based on a recurrent neural network (RNN) or Transformer, it will try to generate 20 reasonable element values to fill the masked positions based on the remaining 80 elements and the language patterns and contextual information learned by the model;
[0162] 3. Further reasoning analysis. While restoring the masked elements, the second component and the second basic reasoning component may also perform further reasoning analysis to extract deeper semantic features and text quality assessment indicators. The results of these reasoning analyses will serve as the basis for model optimization and evaluation in subsequent steps;
[0163] 4. Calculate the recovery error. To evaluate the model's performance in recovering the implicit representation, the computer system calculates the difference between the recovered implicit representation and the original implicit representation before masking (i.e., the recovery error). This error will be used for model optimization and tuning in subsequent steps.
[0164] Step S290 performs recovery of the implicit representation and further reasoning analysis by loading the second implicit representation to be loaded into the second component and the second basic reasoning component. This process not only helps to improve the robustness of the model under incomplete information, but also provides an important basis for subsequent optimization of the model by calculating the recovery error.
[0165] Step S2100: Determine a fourth training error according to the actual values of the second inference implicit representation and the first implicit representation elements.
[0166] In step S2100, the specific operations of the computer system are as follows:
[0167] 1. Obtain the second inference implicit representation. In step S290, the computer system has processed the second implicit representation to be loaded (i.e., the implicit representation of the first text template with some elements blocked) through the second component and the second basic inference component, and generated a second inference implicit representation. This representation is the result of the model recovering the missing information, and it attempts to reproduce the actual value of the blocked element;
[0168] 2. Compare the restored results with the original values. Next, the computer system compares the predicted values of the masked element positions in the second inferred implicit representation with the actual values of these elements in the original first implicit representation. This comparison process is intended to quantify the accuracy of the model in implicit representation recovery. For example, assume that the first implicit representation is a vector containing 100 elements, 20 of which are masked in step S280. In step S290, the model attempts to restore the values of these masked elements and generates a second inferred implicit representation. Now, the computer system will compare the predicted values of the corresponding positions in the second inferred implicit representation with the actual values of these elements in the first implicit representation;
[0169] 3. Calculate the recovery error. In order to quantify the difference between the recovery result and the original value, the computer system calculates a recovery error. This error is a key indicator to measure the performance of the model in implicit representation recovery. Common error calculation methods include mean square error (MSE), mean absolute error (MAE), etc.
[0170] 4. Evaluate model performance. By calculating the recovery error, the computer system can evaluate the performance of the model in implicit representation recovery. The smaller the error, the stronger the model's recovery ability and the smaller the difference between the predicted value and the original value. This evaluation result will serve as an important basis for subsequent model optimization;
[0171] 5. Feedback and optimization. Finally, the computer system uses the recovery error as a feedback signal to guide the subsequent model optimization process. By adjusting the model's parameters, structure, or training strategy, the computer system can gradually reduce the recovery error and improve the model's accuracy in implicit representation recovery.
[0172] Step S2100 evaluates the model's performance in implicit representation recovery by calculating the difference between the second inferred implicit representation and the actual value of the masked first implicit representation element. This process not only helps quantify the model's recovery ability, but also provides key feedback for subsequent model optimization.
[0173] Step S2110: calibrate the second component and the second text quality classification component according to the fourth training error to obtain the natural language processing network.
[0174] In step S2110, the specific operations of the computer system may be as follows:
[0175] 1. Analyze the recovery error. In step S2100, the computer system has calculated the difference between the second inferred implicit representation and the actual value of the masked first implicit representation element, i.e., the recovery error. This error reflects the accuracy of the model in implicit representation recovery and is one of the important indicators for model performance evaluation;
[0176] 2. Backpropagation and parameter update. Based on the recovered error, the computer system will execute the backpropagation algorithm to guide the parameter update by calculating the gradient of the error with respect to the model parameters. In deep learning models, this usually involves the weights and bias terms of multi-layer neural networks. Through backpropagation, the error signal propagates from the output layer to the input layer layer by layer, and each layer updates its parameters according to the error gradient in order to reduce the error in the next iteration;
[0177] 3. Tune the second component and the second text quality classification component. Through back propagation and parameter update, the computer system further tunes the second component and the second text quality classification component. The second component may include a neural network layer for implicit representation recovery (such as the decoding part of an autoencoder), while the second text quality classification component is responsible for evaluating the quality of the text based on the restored implicit representation. The goal of tuning is to reduce the recovery error and improve the accuracy of the model in implicit representation recovery, while maintaining or improving the model's performance in text quality assessment. This usually involves a trade-off between the recovery error and the text quality assessment error to ensure that the model achieves good performance in both aspects;
[0178] 4. Verify model performance. After each adjustment, the computer system will use the validation set to evaluate the performance of the model. The validation set is a data set independent of the training set and is used to monitor the generalization ability of the model during the training process. By comparing the performance indicators of the model on the validation set (such as accuracy, recall rate, F1 score, etc.), the computer system can determine whether the model is overfitting or underfitting, and adjust the training strategy accordingly (such as stopping training early, adjusting the learning rate, adding regularization terms, etc.);
[0179] 5. Iterative optimization. The calibration process in step S2110 is an iterative process. The computer will repeatedly perform steps such as back propagation, parameter update, and performance verification until the stopping condition is met (such as reaching the preset number of iterations, the performance of the verification set is no longer significantly improved, etc.). Through this iterative optimization process, the computer system can gradually improve the performance of the model, so that it can more accurately evaluate the quality of text in practical applications and make reasonable inferences when information is missing.
[0180] Step S2110 is the final tuning step in the model training process, which further optimizes the second component and the second text quality classification component based on the recovery error. Through mechanisms such as back propagation and parameter update, the computer system can reduce the recovery error and improve the comprehensive performance of the model in terms of implicit representation recovery and text quality assessment.
[0181] As a second implementation of step S200, the step S200, loading the first text template library into the basic natural language processing network, and performing labeled calibration according to the text quality reasoning learning and the implicit representation reasoning learning to obtain the natural language processing network, specifically includes:
[0182] Step S200A: loading the first text template implicit representation into the basic component and the basic text quality classification component to obtain the inferred industry text quality;
[0183] Step S200B: determining a second training error according to the inference industry text quality and the priori label;
[0184] Step S200C: arbitrarily determining N paragraph implicit representations in the first text template implicit representation, and combining the N paragraph implicit representations according to the order of the paragraphs to obtain a first implicit representation to be loaded, N≥1;
[0185] Step S200D: Loading the first implicit representation to be loaded into the first component and the first basic reasoning component among the one or more basic reasoning components to obtain a first reasoning implicit representation;
[0186] Step S200E: determining a third training error according to the first inference implicit representation and the Mth paragraph implicit representation in the first text template implicit representation, where M=N+1;
[0187] Step S200F: arbitrarily determine H first implicit representation elements in the first text template implicit representation and perform a shielding operation to obtain a second implicit representation to be loaded;
[0188] Step S200G: Loading the second implicit representation to be loaded into the second component and the second basic reasoning component in the one or more basic reasoning components to obtain a second reasoning implicit representation;
[0189] Step S200H: determining a fourth training error according to the actual values of the second inference implicit representation and the first implicit representation element;
[0190] Step S200I: adjusting the basic component and the basic text quality classification component according to the second training error, the third training error and the fourth training error to obtain a transition network in the first round of adjustment;
[0191] Step S200J: cyclically adjust until convergence requirements are met to obtain the natural language processing network.
[0192] The first implementation of step S200 is to independently adjust different components of the model in turn after calculating each training error. The second implementation adopts a more integrated approach, that is, multiple training errors are considered simultaneously in a single adjustment process, and the basic components and basic text quality classification components are optimized as a whole. This approach helps the model achieve a better balance and synergy in both text quality assessment and implicit representation reasoning.
[0193] In step S200A, the implicit representation of the first text template is loaded into the basic component and the basic text quality classification component to obtain the inferred industry text quality. This step is similar to step S210 in the first embodiment, both of which load the implicit representation into the network for preliminary reasoning. The difference is that the second embodiment will pay more attention to the comprehensive consideration and overall optimization of multiple training errors in subsequent steps.
[0194] In step S200B, the computer system compares the difference between the inferred industry text quality and the prior mark (i.e., the true score of the manual annotation) to calculate the second training error. Common error calculation methods include mean square error (MSE), cross entropy loss, etc. Compared with the first implementation, although both implementations calculate the second training error, the second implementation will be considered together with other training errors in subsequent steps for overall optimization.
[0195] In step S200C, the task of the computer system is to arbitrarily select N paragraph implicit representations from the first text template implicit representation and combine them according to their natural order in the original text to generate a first implicit representation to be loaded. This step simulates the text segment splicing scenario that may occur in actual applications, which helps to improve the model's ability to understand and process complex text structures.
[0196] Specifically, the computer system first traverses the implicit representation of the first text template, which may be a set or sequence of multiple paragraph implicit representations. N paragraph implicit representations are selected randomly or according to a certain strategy (such as sorting based on paragraph importance). The value of N can be set according to specific task requirements, and usually N is greater than or equal to 1. The selected N paragraph implicit representations are spliced or combined according to their natural order in the original text. The combination method may vary depending on the specific form of the implicit representation. For example, if the implicit representation is in vector form, the combination may be achieved by vector splicing; if the implicit representation is in matrix or tensor form, a more complex combination strategy may be designed.
[0197] The combined set of implicit representations of the paragraphs is the first implicit representation to be loaded. This representation will be used as the input of the subsequent reasoning step to evaluate the model's ability in implicit representation reasoning.
[0198] In step S200D, the computer system loads the first implicit representation to be loaded generated in step S200C into the first component in the preliminarily tuned basic natural language processing network and the first basic reasoning component in one or more basic reasoning components to perform reasoning analysis of the implicit representation.
[0199] Specifically, the first implicit representation to be loaded is loaded into the network as input data. The first component may include some feature extraction layers, encoding layers, etc., which are used to perform preliminary processing on the input first implicit representation to be loaded and extract feature information that is useful for subsequent reasoning. The first basic reasoning component performs deeper reasoning analysis based on these feature information. It may be a complex neural network structure, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), or a Transformer, which can capture the semantic relationship and contextual information in the implicit representation. After reasoning analysis, the first basic reasoning component outputs a first reasoning implicit representation. This representation not only contains the basic information of the input data, but also incorporates the model's deep understanding of the data and the reasoning results.
[0200] In step S200E, the computer system aims to evaluate the accuracy of the model in implicit representation inference by comparing the difference between the first inferred implicit representation and the paragraph implicit representation immediately following the first implicit representation to be loaded in the first text template implicit representation (i.e., the Mth paragraph implicit representation, M=N+1) to calculate the third training error.
[0201] Determine the implicit representation of the paragraph immediately following the first implicit representation to be loaded in the implicit representation of the first text template as a comparison object. Since the first implicit representation to be loaded is composed of the first N implicit representations of paragraphs, the implicit representation of the paragraph immediately following it is the N+1th implicit representation of paragraphs (i.e., M=N+1). Use a suitable metric (such as Euclidean distance, cosine similarity, etc.) to calculate the difference between the first inferred implicit representation and the Mth implicit representation of paragraphs. This difference reflects the accuracy of the model in implicit representation reasoning. Generate a third training error based on the calculated difference value. This error will serve as one of the bases for subsequent model calibration.
[0202] In step S200F, the task of the computer system is to perform a masking operation on some elements in the implicit representation of the first text template to generate a second implicit representation to be loaded. This step is intended to simulate the situation where partial text information is missing in actual applications, so as to train the model to be able to perform effective reasoning and representation recovery under incomplete information. Specifically, the computer system randomly selects H first implicit representation elements from the implicit representation of the first text template for masking. These elements can be specific dimensions in a vector, specific rows or columns in a matrix, etc., depending on the specific form of the implicit representation. The masking operation usually sets the value of the selected element to 0 or a specific fill value (such as -1, a minimum value, etc.) to simulate the situation of missing information. The implicit representation of the first text template after the masking operation is the second implicit representation to be loaded. This representation will be used as input for subsequent reasoning and recovery steps.
[0203] In step S200G, the computer system loads the second implicit representation to be loaded generated in step S200F into the preliminarily calibrated second component and a second basic reasoning component in one or more basic reasoning components to try to recover the masked element value and perform further reasoning analysis.
[0204] Specifically, the second implicit representation to be loaded is loaded into the network as input data. The second component contains some specific network layers (such as the decoding part of the autoencoder, the generator of the generative adversarial network, etc.) to try to recover the masked element values. The second basic reasoning component performs further reasoning analysis based on the recovered implicit representation. It may be similar to the first basic reasoning component, but may be optimized for specific recovery tasks. After reasoning recovery, the second basic reasoning component outputs a second reasoning implicit representation. This representation not only contains the restored masked element values, but may also incorporate the model's deep understanding of the data and reasoning results.
[0205] In step S200H, the computer system aims to evaluate the accuracy of the model in implicit representation recovery. It calculates a fourth training error by comparing the difference between the value of the recovered element in the second inferred implicit representation and the actual value of the corresponding element in the original first implicit representation.
[0206] Specifically, determine the position and value of the restored element in the second inference implicit representation, as well as the actual value of the corresponding element in the original first implicit representation. Use a suitable metric (such as mean square error MSE, mean absolute error MAE, etc.) to calculate the difference between the restored value and the actual value. Generate a fourth training error based on the calculated difference value. This error will serve as one of the bases for subsequent model calibration to optimize the model's performance in implicit representation recovery.
[0207] In step S200I, the computer system adjusts the basic component and the basic text quality classification component as a whole based on the comprehensive consideration of the second, third and fourth training errors. The computer system can use a weighted sum method to integrate multiple training errors, and then perform back propagation and parameter update based on the comprehensive error.
[0208] The first implementation is a step-by-step process, where only one training error is considered at a time, while the second implementation considers multiple training errors at the same time for overall optimization. This approach helps the model find a better balance between multiple objectives and improves overall performance.
[0209] In step S200J, the computer system repeatedly performs the cyclic adjustment process of steps S200A to S200I until the model performance reaches the convergence requirement. The convergence requirement may include conditions such as the training error is reduced to a certain level and the performance of the validation set is no longer significantly improved. Through multiple iterations, the model parameters will gradually stabilize and the model performance will gradually improve.
[0210] Compared with the first implementation, although both implementations perform cyclic adjustments, the second implementation considers multiple training errors simultaneously for overall optimization, and thus may find the optimal solution or a more stable parameter configuration faster during the iteration process.
[0211] Through the detailed explanation of the second implementation of step S200, it can be seen that it has significant differences in the adjustment strategy from the first implementation. The first implementation adopts a step-by-step adjustment method, optimizing only one training error at a time; while the second implementation adopts the idea of multi-objective optimization, considering multiple training errors at the same time for overall adjustment.
[0212] This difference is mainly reflected in the following aspects: Tuning efficiency: The second implementation method may find the optimal solution or a more stable parameter configuration faster during the tuning process by considering multiple training errors at the same time for overall optimization, thereby improving the tuning efficiency. Model performance: Since the second implementation method focuses on the balance and coordination of multiple objectives during the tuning process, the trained model may show better performance in both text quality assessment and implicit representation reasoning. Although the first implementation method can also achieve a certain level of performance, it may have deficiencies or deviations in some aspects. Applicable scenarios: For complex tasks that consider multiple optimization objectives at the same time (such as industry report generation based on deep learning), the second implementation method may be more applicable. It can adjust the weight coefficients of different training errors according to specific task requirements, thereby achieving a more flexible and personalized optimization process. The first implementation method is more suitable for optimization tasks with relatively single or simple objectives.
[0213] As a third implementation of step S200, the step S200, loading the first text template library into the basic natural language processing network, and performing labeled calibration according to the text quality reasoning learning and the implicit representation reasoning learning to obtain the natural language processing network, specifically includes:
[0214] Step S200a: arbitrarily determining N paragraph implicit representations in the first text template implicit representation, and combining the N paragraph implicit representations according to the order of the paragraphs to obtain a first implicit representation to be loaded, N≥1;
[0215] Step S200b: Loading the first implicit representation to be loaded into the basic component and the first basic reasoning component among the one or more basic reasoning components to obtain a first reasoning implicit representation;
[0216] Step S200c: determining a third training error according to the first inference implicit representation and the Mth paragraph implicit representation in the first text template implicit representation, where M=N+1;
[0217] Step S200d: randomly determining H first implicit representation elements in the first text template implicit representation and performing a shielding operation to obtain a second implicit representation to be loaded;
[0218] Step S200e: loading the second implicit representation to be loaded into the second basic reasoning component in the basic component and the one or more basic reasoning components to obtain a second reasoning implicit representation;
[0219] Step S200f: determining a fourth training error according to the actual values of the second inference implicit representation and the first implicit representation element;
[0220] Step S200g: adjusting the basic component, the basic text quality classification component, the first basic reasoning component, and the second basic reasoning component according to the third training error and the fourth training error to obtain a first component, a first text quality classification component, the first reasoning component, and the second reasoning component;
[0221] Step S200h: loading the first text template implicit representation into the first component and the first text quality classification component to obtain the inferred industry text quality;
[0222] Step S200i: determining a second training error according to the inference industry text quality and the priori mark;
[0223] Step S200j: arbitrarily determining N paragraph implicit representations in the first text template implicit representation, and combining the N paragraph implicit representations according to the order of the paragraphs to obtain a third implicit representation to be loaded;
[0224] Step S200k: loading the third implicit representation to be loaded into the first component and the first reasoning component to obtain a third reasoning implicit representation;
[0225] Step S2001: determining a fifth training error according to the third inference implicit representation and the Mth paragraph implicit representation in the first text template implicit representation;
[0226] Step S200m: arbitrarily determine H second implicit representation elements in the first text template implicit representation and perform a shielding operation to obtain a fourth implicit representation to be loaded;
[0227] Step S200n: loading the fourth implicit representation to be loaded into the first component and the second reasoning component to obtain a fourth reasoning implicit representation;
[0228] Step S200o: determining a sixth training error according to the fourth inference implicit representation and the actual value of the second implicit representation element;
[0229] Step S200p: adjusting the first component and the first text quality classification component according to the second training error, the fifth training error and the sixth training error to obtain a transition network in the first round of adjustment;
[0230] Step S200q: cyclically adjust until convergence requirements are met to obtain the natural language processing network.
[0231] Compared with the first and second implementations, the third implementation adopts a more flexible and iterative strategy in the training process, through multiple combination and masking operations, combined with multi-stage error calculation and adjustment, in order to achieve better model performance.
[0232] In step S200a, the computer system arbitrarily selects N paragraph implicit representations from the first text template implicit representation, and combines them according to their natural order in the original text to generate a first implicit representation to be loaded. This step is similar to step S200C, but here it is the starting point of the entire training process and provides initial input data for subsequent steps.
[0233] In step S200b, the computer system loads the first implicit representation to be loaded generated in step S200a into a basic component of a basic natural language processing network and a first basic reasoning component among one or more basic reasoning components to perform preliminary reasoning analysis.
[0234] The computer system loads the first implicit representation to be loaded into the network as input data. This representation is composed of N paragraph implicit representations and contains part or all of the content of the text. The input data is first processed by the basic components. The basic components may include some convolutional layers, pooling layers, activation functions, etc., which are used to perform feature extraction, dimensionality reduction, nonlinear transformation and other operations on the input data so that subsequent reasoning components can better understand and process the data. The data processed by the basic components is passed to the first basic reasoning component for reasoning analysis. The first basic reasoning component may be a complex neural network structure, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), a Transformer, etc., which can capture semantic information, contextual relationships, etc. in the text, and generate a first reasoning implicit representation containing the reasoning results.
[0235] The output of the first basic reasoning component is the first reasoning implicit representation. This representation not only contains the basic information of the input data, but also incorporates the model's deep understanding of the data and the reasoning results. It will be used in subsequent steps to compare with the implicit representation of the paragraph that follows it to evaluate the accuracy of the model in implicit representation reasoning.
[0236] In step S200c, the computer system calculates a third training error based on the difference between the first inferred implicit representation generated in step S200b and the Mth paragraph implicit representation (where M=N+1) in the first text template implicit representation to evaluate the accuracy of the model in implicit representation reasoning.
[0237] Determine the paragraph implicit representation that follows the first implicit representation to be loaded in the first inference implicit representation and the first text template implicit representation (i.e., the Mth paragraph implicit representation) as a comparison object. Since the first implicit representation to be loaded is composed of the first N paragraph implicit representations, the paragraph implicit representation that follows it is the N+1th paragraph implicit representation. Use a suitable metric (such as Euclidean distance, cosine similarity, mean square error MSE, etc.) to calculate the difference between the first inference implicit representation and the Mth paragraph implicit representation. This difference reflects the accuracy of the model in implicit representation reasoning. Generate a third training error based on the calculated difference value. This error will serve as one of the bases for subsequent model calibration to optimize the model's performance in implicit representation reasoning.
[0238] Through the above steps, the computer system can evaluate the accuracy of the model in implicit representation reasoning and provide important basis for subsequent model tuning. This helps to improve the model's understanding and reasoning ability when processing complex text data, thereby improving the quality and accuracy of generated industry reports.
[0239] In step S200d, the task of the computer system is to perform a masking operation on the implicit representation of the first text template to simulate the situation where part of the text information is missing in actual applications. Specifically, determine the masking elements: the computer system randomly selects H first implicit representation elements from the implicit representation of the first text template for masking. These elements can be specific dimensions in a vector, specific rows or columns in a matrix, etc., depending on the specific form of the implicit representation. Perform a masking operation: set the value of the selected element to 0 or a specific fill value (such as -1, a minimum value, etc.) to generate a second implicit representation to be loaded. This representation will serve as input for the subsequent reasoning recovery step.
[0240] In step S200e, the computer system loads the second implicit representation to be loaded into the basic component in the basic natural language processing network and the second basic reasoning component in one or more basic reasoning components to try to restore the masked element values. Specifically, the second implicit representation to be loaded is loaded into the network as input data. The second basic reasoning component performs reasoning analysis based on the input data and tries to restore the masked element values. This step may involve complex neural network operations, such as the decoding process of the autoencoder, the generation process of the generative adversarial network, etc. After reasoning recovery, the second basic reasoning component outputs a second reasoning implicit representation containing the restored value. Based on the previous example, the computer system loads the second implicit representation to be loaded with 10 elements masked into the network. Through the reasoning recovery process of the second basic reasoning component, the system attempts to restore the 10 masked element values and generates a second reasoning implicit representation containing the restored value.
[0241] In step S200f, the goal of the computer system is to evaluate the accuracy of the model in implicit representation recovery. It calculates the fourth training error by comparing the difference between the value of the restored element in the second inference implicit representation and the actual value of the corresponding element in the original first implicit representation. Specifically, the position and value of the restored element in the second inference implicit representation and the actual value of the corresponding element in the original first implicit representation are determined. A suitable metric (such as mean square error MSE, mean absolute error MAE, etc.) is used to calculate the difference between the restored value and the actual value. The fourth training error is generated based on the calculated difference value. This error will be used as one of the bases for subsequent model calibration to optimize the performance of the model in implicit representation recovery.
[0242] Through the operation and example description of the above three steps, the specific role and operation flow of steps S200d to S200f in the third implementation of step S200 can be clearly understood. These steps not only help to simulate the text information missing situation that may occur in actual applications, but also provide an important basis for the subsequent adjustment of the model through reasoning recovery and error calculation.
[0243] In step S200g, the computer system adjusts the basic component, the basic text quality classification component, the first basic reasoning component, and the second basic reasoning component according to the third and fourth training errors. This step is the key to model optimization, which combines the error information of implicit representation reasoning and recovery to comprehensively adjust different parts of the model.
[0244] In the first implementation, the tuning of components is performed in steps, optimizing only one training error at a time. Although the second implementation considers multiple training errors at the same time, it does not closely combine the inference and recovery errors during the tuning process like the third implementation. The third implementation helps the model find a better balance between inference and recovery capabilities through a one-time comprehensive tuning.
[0245] In step S200h, the main task of the computer system is to load the complete implicit representation of the first text template into the first component and the first text quality classification component that have been preliminarily adjusted (optimized based on the inference and recovery errors in the previous step) to infer the quality of the industry text.
[0246] Specifically, the implicit representation of the first text template (i.e., the implicit representation of the original text without any masking or combination processing) is loaded into the network as input data. The input data is first subjected to preliminary processing such as feature extraction and encoding by the first component, and then the processed data is passed to the first text quality classification component. The first text quality classification component performs classification reasoning based on these features and outputs a score or label representing the quality of the text. The output of the first text quality classification component is the industry text quality score or label obtained by reasoning, which reflects the model's evaluation result of the overall quality of the input text. Through this step, the computer system can evaluate the model's text quality evaluation capability under complete text input, providing a benchmark for subsequent performance tuning.
[0247] In step S200i, the goal of the computer system is to evaluate the accuracy of the model in text quality assessment, that is, to compare the difference between the inferred industry text quality and the prior label (the quality of the real text annotated by humans), and calculate the second training error.
[0248] Specifically, the priori mark corresponding to each text template is obtained from the first text template library, that is, the manually annotated text quality score or label. The industry text quality inferred in step S200h is compared with the corresponding priori mark. A suitable error calculation method (such as mean square error MSE, cross entropy loss, etc.) is used to calculate the difference between the inference result and the priori mark to obtain the second training error.
[0249] The second training error reflects the accuracy of the model in text quality assessment. By minimizing this error, the computer system can continuously optimize the model parameters and improve the performance of the model in text quality assessment tasks.
[0250] In the third implementation of step S200, steps S200h and S200i are important steps in evaluating model performance. They complement the previous reasoning and recovery error calculation steps (S200a to S200g) and together constitute the complete process of model training. By comprehensively considering the reasoning error, recovery error and text quality assessment error, the computer system can more comprehensively evaluate the model performance and perform targeted optimization in the subsequent training process.
[0251] Steps S200h to S200i are responsible for evaluating the performance of the model in text quality assessment in the third implementation of step S200. By loading the complete first text template implicit representation into the model for reasoning analysis, and comparing with the prior mark to calculate the error, the computer system can accurately evaluate the performance of the model in the text quality assessment task and provide strong support for subsequent performance tuning.
[0252] In step S200j, the computer system repeats the operation of step S200a, but this time after the model has been preliminarily calibrated (based on previous reasoning and recovery errors), with the goal of further evaluating and optimizing the performance of the model by generating new implicit representations to be loaded.
[0253] Specifically, N paragraph implicit representations are randomly selected again from the first text template implicit representation, and combined according to their natural order in the original text to generate a third implicit representation to be loaded. Note that although this process is similar to step S200a, since the model has been preliminarily adjusted, the implicit representation to be loaded generated this time can produce different reasoning results in subsequent steps.
[0254] In step S200k, the computer system loads the third implicit representation to be loaded generated in step S200j into the calibrated first component and the first reasoning component for further reasoning analysis.
[0255] Similar to step S200b, the third implicit representation to be loaded is first preliminarily processed by the first component and then passed to the first reasoning component for reasoning analysis. The first reasoning component generates a third reasoning implicit representation based on the processed features, which reflects the model's deep understanding and reasoning results of the third implicit representation to be loaded. In step S200l, the computer system calculates the fifth training error based on the difference between the third reasoning implicit representation and the implicit representation of the paragraph immediately following the third implicit representation to be loaded in the implicit representation of the first text template (i.e., the Mth paragraph implicit representation, where M=N+1).
[0256] Specifically, a suitable metric (such as MSE, cosine similarity, etc.) is used to calculate the difference between the third inference implicit representation and the Mth paragraph implicit representation to generate the fifth training error. This error reflects the implicit representation reasoning ability of the model after further adjustment.
[0257] In step S200m, the computer system again performs a masking operation on the first text template implicit representation, but this time selects H implicit representation elements different from those in step S200d to be masked, thereby generating a fourth implicit representation to be loaded.
[0258] Specifically, another group of H elements is randomly selected from the first text template implicit representation for masking operation to generate a fourth implicit representation to be loaded, which will be used for subsequent implicit representation recovery evaluation.
[0259] In step S200n, the computer system loads the fourth implicit representation to be loaded into the adjusted first component and the second inference component, and attempts to restore the masked element value.
[0260] Specifically, similar to step S200e, the fourth implicit representation to be loaded is first processed by the first component and then passed to the second reasoning component for recovery reasoning. The second reasoning component attempts to restore the masked element value based on the processed features and generates a fourth reasoned implicit representation.
[0261] In step S200o, the computer system calculates a sixth training error according to the difference between the value of the restored element in the fourth inference implicit representation and the actual value of the corresponding element in the original first implicit representation.
[0262] Specifically, the difference between the restored value and the actual value is calculated using the same metric as step S200f to generate a sixth training error, which reflects the implicit representation recovery capability of the model after further calibration.
[0263] Steps S200j to S200o form part of an iterative optimization process. By repeatedly generating different implicit representations to be loaded, performing reasoning and recovery, and calculating training errors, the computer system can continuously evaluate and optimize the performance of the model. Repeated execution of these steps helps the model find a better balance between implicit representation reasoning and recovery capabilities, thereby improving overall performance. Compared with the previous steps, these steps place greater emphasis on the importance of iteration and optimization, and promote continuous improvement of model performance through continuous feedback and adjustment.
[0264] In step S200p, the computer system will comprehensively adjust the first component and the first text quality classification component according to the second training error (text quality assessment error), the fifth training error (further reasoning error) and the sixth training error (recovery error) calculated in the previous steps.
[0265] By comprehensively considering multiple sources of errors, a set of model parameters is found to minimize the sum of these errors. This helps the model perform well in three aspects: text quality assessment, implicit representation reasoning, and implicit representation recovery. Backpropagation and gradient descent (or other optimization algorithms, such as Adam, RMSprop, etc.) are usually used to update model parameters. During the backpropagation process, the system guides the update direction of the parameters based on the gradient of each error term to the model parameters, so that the error gradually decreases during the iteration process. After comprehensive adjustment, the transition network in the first round of adjustment is obtained. This network should be better than the network before adjustment in performance, but it may still not be the optimal solution.
[0266] In step S200q, the computer will repeatedly execute the iterative process of steps S200j to S200p, that is, continuously generate new implicit representations to be loaded, perform reasoning and recovery, calculate errors and adjust model parameters, and stop iteration when the convergence requirements are met.
[0267] Convergence requirements usually include conditions such as the training error is reduced to a certain level and the performance of the validation set is no longer significantly improved. In practical applications, appropriate convergence conditions can be set according to specific task requirements and resource conditions.
[0268] In each iteration, the system generates new training samples (implicit representations to be loaded) based on the current model parameters, and trains and evaluates the model through these samples. Based on the evaluation results (i.e., multiple training errors), the system updates the model parameters. This process is repeated multiple times until the convergence requirements are met. When the iterative process meets the convergence requirements, the final natural language processing network model is output. This model has been fully trained and optimized and can perform well in practical applications.
[0269] Steps S200p to S200q comprehensively adjust the model by considering multiple sources of training errors, and continuously optimize the model parameters in the iterative process, and finally obtain a natural language processing network model with excellent performance. This implementation is more flexible and efficient than the previous two implementations, and can better adapt to complex and changeable actual application scenarios.
[0270] Figure 2 A hardware entity diagram of a computer system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.
Claims
1. A method for generating industry reports based on deep learning, characterized in that: include: Obtain implicit representations of paragraph sets of original industry text data; perform implicit representation enhancement operations on the implicit representations of the paragraph sets to obtain implicit representations of the paragraph sets to be loaded; load the implicit representations of the paragraph sets to be loaded into a natural language processing network to obtain the industry text quality of the original industry text data, wherein the natural language processing network is obtained by label adjustment based on implicit representation reasoning learning and text quality reasoning learning, and the input of the natural language processing network is a first text template library, the first text template library includes an implicit representation of a first text template and a priori mark of the implicit representation of the first text template, the priori mark represents the industry text quality of the implicit representation of the first text template, and the implicit representation of the first text template is an implicit representation of the text after the implicit representation enhancement operation is performed; the original industry text data that meets the preset industry text quality conditions is used as reference data for the industry report, so as to generate the industry report according to the reference data; wherein, performing implicit representation enhancement operations on the implicit representation of the paragraph sets to obtain the implicit representation of the paragraph sets to be loaded includes: loading the implicit representation of the paragraph sets into an implicit representation enhancement component to obtain the industry text quality of the implicit representation of the paragraph sets to be loaded; The implicit representation of the paragraph set is loaded, and the implicit representation enhancement component is generated by pseudo-label adjustment of the second text template implicit representation, the template enhanced implicit representation and the first implicit representation; or; the implicit representation of the paragraph set is shielded to obtain the implicit representation of the paragraph set to be loaded; the implicit representation of the paragraph set of the original industry text data is obtained by: dividing the original industry text data into paragraphs to obtain multiple text paragraphs; implicit representation mining of the multiple text paragraphs to obtain the implicit representation of the paragraph set; the method also includes: obtaining a second text template library and a basic implicit representation enhancement component, the second text template library includes the second text template implicit representation, the template enhanced implicit representation and the first implicit representation; loading the second text template library into the basic implicit representation enhancement component, inferring to obtain the second implicit representation, the second implicit representation is simulated according to the second text template implicit representation and the template enhanced implicit representation; determining a first training error according to the second implicit representation and the first implicit representation; adjusting the basic implicit representation enhancement component according to the first training error to obtain the implicit representation enhancement component.
2. The method according to claim 1, characterized in that The method of obtaining the second text template library includes: obtaining a first industry text template, an enhanced text template and a first industry text, wherein the first industry text is obtained by concatenating the first industry text template and the enhanced text template; performing implicit representation mining on the first industry text template to obtain an implicit representation of the second text template, and performing implicit representation mining on the enhanced text template to obtain an enhanced implicit representation of the template, and performing implicit representation mining on the first industry text to obtain the first implicit representation.
3. The method according to claim 2, characterized in that The obtaining of the first industry text template, the enhanced text template and the first industry text includes: obtaining the first industry text template, and arbitrarily constructing a disturbed text, determining the disturbed text as the enhanced text template; splicing the disturbed text with the first industry text template to obtain the first industry text; or; obtaining the first industry text template, and arranging characters of the first industry text template in a random order to obtain a character-random text of the first industry text template, determining the character-random text as the enhanced text template; splicing the character-random text with the first industry text template to obtain the first industry text; or ; Obtain the first industry text template, and perform paragraph truncation on the first industry text template to generate a paragraph truncation text of the first industry text template, and determine the paragraph truncation text as the enhanced text template; splice the paragraph truncation text with the first industry text template to obtain the first industry text; or; Obtain the first industry text template, and perform arbitrary replacement of text characters of the first industry text template to obtain a character replacement text of the first industry text template, and determine the character replacement text as the enhanced text template; splice the character replacement text with the first industry text template to obtain the first industry text.
4. The method according to any one of claims 1 to 3, characterized in that The method also includes: obtaining a first text template library and a basic natural language processing network, wherein the second text template library includes an implicit representation of the first text template and a priori marks of the implicit representation of the first text template, the basic natural language processing network includes a basic component, a basic text quality classification component and one or more basic reasoning components, the priori mark represents the quality of the industry text implicitly represented by the first text template, the implicit representation of the first text template is an implicit representation of the text after the implicit representation enhancement operation is performed, the execution results of the one or more basic reasoning components are used to adjust the basic components and the basic text quality classification component, the execution results of the basic text quality classification component are the execution results of the basic natural language processing network, the first text template implicit representation represents the implicit representation of a paragraph set of text paragraphs; the first text template library is loaded into the basic natural language processing network, and the natural language processing network is obtained by label adjustment based on the text quality reasoning learning and the implicit representation reasoning learning.
5. The method according to claim 4, characterized in that The step of loading the first text template library into the basic natural language processing network and performing labeled calibration according to the text quality reasoning learning and the implicit representation reasoning learning to obtain the natural language processing network includes: loading the first text template implicit representation into the basic component and the basic text quality classification component to obtain the inferred industry text quality; determining a second training error according to the inferred industry text quality and the priori label; cyclically calibrating the basic component and the basic text quality classification component according to the second training error to obtain a first component and a first text quality classification component; arbitrarily determining N paragraph implicit representations in the first text template implicit representation, and combining the N paragraph implicit representations according to the order of the paragraphs to obtain a first implicit representation to be loaded, N≥1; loading the first implicit representation to be loaded into the first component and the one or more basic reasoning components. The first basic reasoning component obtains a first reasoning implicit representation; a third training error is determined based on the first reasoning implicit representation and the Mth paragraph implicit representation in the first text template implicit representation, M=N+1; the first component and the first text quality classification component are adjusted based on the third training error to obtain a second component and a second text quality classification component; H first implicit representation elements are arbitrarily determined in the first text template implicit representation for shielding operation to obtain a second implicit representation to be loaded, H≥1; the second implicit representation to be loaded is loaded into the second component and the second basic reasoning component in the one or more basic reasoning components to obtain a second reasoning implicit representation; a fourth training error is determined based on the actual values of the second reasoning implicit representation and the first implicit representation elements; the second component and the second text quality classification component are adjusted based on the fourth training error to obtain the natural language processing network.
6. The method according to claim 4, characterized in that The step of loading the first text template library into the basic natural language processing network and performing labeled calibration according to the text quality inference learning and the implicit representation inference learning to obtain the natural language processing network includes: arbitrarily determining N paragraph implicit representations in the first text template implicit representation, and combining the N paragraph implicit representations according to the order of paragraphs to obtain a first implicit representation to be loaded, where N≥1; loading the first implicit representation to be loaded into the first basic inference component of the basic component and the one or more basic inference components to obtain a first inference implicit representation; combining the first inference implicit representation with the Mth paragraph in the first text template implicit representation; The third training error is determined by using the implicit representation, M=N+1; H first implicit representation elements are arbitrarily determined in the first text template implicit representation to perform a shielding operation to obtain a second implicit representation to be loaded; the second implicit representation to be loaded is loaded into the second basic reasoning component in the basic component and the one or more basic reasoning components to obtain a second reasoning implicit representation; a fourth training error is determined based on the actual values of the second reasoning implicit representation and the first implicit representation element; the basic component, the basic text quality classification component, the first basic reasoning component, and the second basic reasoning component are adjusted based on the third training error and the fourth training error to obtain the first component, the first text template A quality classification component, a first reasoning component and a second reasoning component; loading the first text template implicit representation into the first component and the first text quality classification component to obtain the reasoned industry text quality; determining a second training error based on the reasoned industry text quality and the priori label; arbitrarily determining N paragraph implicit representations in the first text template implicit representation, and combining the N paragraph implicit representations according to the order of paragraphs to obtain a third implicit representation to be loaded; loading the third implicit representation to be loaded into the first component and the first reasoning component to obtain a third reasoned implicit representation; combining the third reasoned implicit representation with the first text template implicit representation according to the order of paragraphs; The fifth training error is determined by using M paragraph implicit representations; H second implicit representation elements are arbitrarily determined in the first text template implicit representation and shielded to obtain a fourth implicit representation to be loaded; the fourth implicit representation to be loaded is loaded into the first component and the second reasoning component to obtain a fourth reasoning implicit representation; the sixth training error is determined according to the actual values of the fourth reasoning implicit representation and the second implicit representation element; the first component and the first text quality classification component are adjusted according to the second training error, the fifth training error and the sixth training error to obtain a transition network in the first round of adjustment; the natural language processing network is obtained by cyclically adjusting until the convergence requirement is met.
7. A computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 6 are implemented.
