Detailed Description
Hereinafter, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present application and not all embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.
FIG. 1 is a flow chart of an artificial intelligence based project document generation method according to an embodiment of the application. As shown in fig. 1, an artificial intelligence based project document generating method according to an embodiment of the present application includes: s110, acquiring an original project document and a newly received project document; s120, performing OCR text recognition on the newly received project document to obtain a newly received project text description; s130, extracting and encoding the characteristics of the text description of the new received project to obtain a multi-scale project characteristic vector; s140, processing the project original document to obtain a multi-scale original project feature vector; s150, calculating the difference between the multi-scale project feature vector and the multi-scale original project feature vector to obtain a project difference feature vector; s160, performing implicit group optimization of spatial sparsity constraint on the project differential feature vectors to obtain optimized project differential feature vectors; and S170, enabling the optimized project difference feature vector to pass through a generator to generate a project document marking the document modification part.
In step S110, the project original document and the newly received project document are acquired. As described in the background art, in particular, the project implementation process often needs cooperation between different functional departments, and the information communication between the different departments is particularly important, so that if information is missed during communication, the progress and quality of project completion are likely to be affected. For example, if some parts of the project are adjusted without communication between departments being clear. Accordingly, an artificial intelligence based project document generation scheme is desired.
In view of the above technical problems, an artificial intelligence-based project document generation method is provided, which uses an artificial intelligence technology based on the deep learning field to perform feature encoding and extraction on an original project document and a newly received project document so as to generate a project document marking a document modification part. Therefore, by prompting the document updating part, information omission caused by improper communication of different departments can be effectively avoided, and negative influence on project progress and quality is avoided.
Specifically, first, an original project document and a newly received project document are acquired. The project original document is a document created when a project is started and contains basic information, targets, plans and the like of the project. The project original document can be acquired by the following ways: 1. project management tool: the original document is uploaded and stored in the project management tool. 2. Version control system: if the project document is managed by the version control system, the original document of the history version can be obtained therefrom. 3. Team sharing folders: if the team uses the shared folder for document management, the original document can be obtained from it. A newly received project document refers to an updated document received during the progress of the project or during the delivery of the project, and may contain new information, modifications or alterations. Acquiring a newly received project document may be by the following approach: 1. e-mail: team members send document updates via email. 2. Project management tool: the new document version is uploaded and shared in the project management tool. 3. Real-time collaboration tool: document editing and sharing is performed using real-time collaboration tools (e.g., google Docs).
In step S120, OCR text recognition is performed on the newly received project document to obtain a newly received project text description. Many times, project documents may exist in the form of images, such as scanned files, screenshots, or photo documents. Through OCR text recognition, characters in the images can be extracted and converted into text data which can be processed by a computer, so that subsequent text processing and analysis are facilitated. After converting the image text into an editable text format, the searchability of the document can be improved. Thus, specific information can be searched more conveniently, and the information retrieval speed is increased. OCR technology can help enable automated processing and analysis of documents. Once the text is extracted, the text may be further processed using a computer program, such as word segmentation, semantic analysis, and the like.
In step S130, feature extraction and encoding are performed on the new received item text description to obtain a multi-scale item feature vector.
Specifically, in the artificial intelligence-based project document generation method, feature extraction and encoding are performed on the newly received project text description to obtain a multi-scale project feature vector, which includes: after word segmentation processing is carried out on the new catcher project text description, a plurality of project word meaning feature vectors are obtained through a new receiving project semantic encoder comprising an embedding layer; and extracting multi-scale features of the project word meaning feature vectors to obtain multi-scale project feature vectors.
More specifically, in order to convert text information into a computer understandable and processed form, the new catcher project text description is word segmented and multiple project word sense feature vectors are obtained by a new received project semantic encoder comprising an embedded layer, thereby performing deeper and efficient text analysis and mining. The new received item semantic encoder is a context encoder that includes an embedded layer. Word segmentation of a text description may divide a continuous sequence of text into words or phrases, which may help a computer better understand the structure and meaning of the text. The text after word segmentation is easier to carry out subsequent semantic analysis and processing. Each word can be converted into a high-dimensional semantic feature vector by a context encoder (e.g., a pre-trained language model or neural network) that includes an embedded layer. These feature vectors capture the meaning and relevance of the words in the context and help better represent the semantic information of the words. By obtaining the semantic feature vector for each word, the text description can be converted into a vector representation for further text analysis and mining. These vectorized representations facilitate the computer's understanding of the meaning and semantic relationships of text. A semantic feature vector is generated for each word so that semantic information for each word can be captured throughout the text description. Doing so helps to more accurately express the semantic content of the text in subsequent text processing tasks.
Specifically, in the above-mentioned artificial intelligence-based project document generation method, the new received project semantic encoder is a converter-based context encoder model including an embedded layer.
Specifically, in the above method for generating a project document based on artificial intelligence, after word segmentation processing is performed on the new catcher project text description, a plurality of project word sense feature vectors are obtained through a new receiving project semantic encoder including an embedding layer, including: word segmentation processing is carried out on the new catcher project text description so as to convert the text description into a project word sequence composed of a plurality of project words; mapping each word in the sequence of item words to a word vector using the embedding layer of the newly received item semantic encoder comprising an embedding layer to obtain a sequence of item word vectors; and performing global-based context semantic coding on the sequence of item word vectors by using the converter of the newly received item semantic encoder comprising the embedded layer to obtain the plurality of item word semantic feature vectors.
Specifically, in the above artificial intelligence based project document generating method, the step of performing global context semantic coding on the sequence of project word vectors using the converter of the newly received project semantic encoder including the embedded layer to obtain the plurality of project word semantic feature vectors includes: one-dimensional arrangement is carried out on the sequence of the project word vectors so as to obtain global project word feature vectors; calculating the product between the global project word feature vector and the transpose vector of each project word vector in the sequence of the project word vectors to obtain a plurality of self-attention association matrixes; respectively carrying out standardization processing on each self-attention correlation matrix in the plurality of self-attention correlation matrices to obtain a plurality of standardized self-attention correlation matrices; obtaining a plurality of probability values by using a Softmax classification function through each normalized self-attention correlation matrix in the normalized self-attention correlation matrices; and weighting each item word vector in the sequence of item word vectors by taking each probability value in the plurality of probability values as a weight to obtain the plurality of item word sense feature vectors.
FIG. 2 is a flow chart of multi-scale feature extraction of the term meaning feature vectors to obtain multi-scale term feature vectors in an artificial intelligence based term document generation method according to an embodiment of the present application. As shown in fig. 2, performing multi-scale feature extraction on the term-sense feature vectors to obtain multi-scale term feature vectors, including: s11, arranging the project word meaning feature vectors into one-dimensional feature vectors, and then obtaining first-scale project context feature vectors by using a first project text convolution neural network with a one-dimensional convolution kernel of a first scale; s12, arranging the project word meaning feature vectors into one-dimensional project feature vectors, and then obtaining second-scale project context feature vectors by using a second-scale text convolution neural network with a one-dimensional convolution kernel of a second scale; and S13, fusing the first scale item context feature vector and the second scale item context feature vector to obtain a multi-scale item feature vector.
More specifically, to capture local features and context information in text using a Convolutional Neural Network (CNN), a plurality of project word sense feature vectors are arranged as one-dimensional feature vectors and semantic information of the entire text is better represented by using a first-project text convolutional neural network having a one-dimensional convolution kernel of a first scale to obtain a first-scale project context feature vector. Arranging the semantic feature vectors of the plurality of words into one-dimensional feature vectors can integrate the text information into one continuous vector representation so that the semantic information of the entire text can be better expressed and processed. A convolution operation may be performed on the one-dimensional feature vector using a one-dimensional convolution kernel having a first scale to capture local patterns and features in the text. This facilitates the web learning of associations between words and contextual information, enhancing the expressive power of the text representation. The convolutional neural network has good feature extraction capability when processing text data, and can effectively capture local features and context information in the text. Through convolution operation and pooling operation, the CNN can gradually extract important features in the text, so that the whole semantic information of the text is learned.
Specifically, in the above method for generating a project document based on artificial intelligence, the steps of arranging the plurality of project word sense feature vectors into one-dimensional feature vectors, and then obtaining a first-scale project context feature vector by using a first project text convolution neural network with a one-dimensional convolution kernel of a first scale include: each layer of the first item text convolutional neural network using a one-dimensional convolutional kernel having a first scale performs a one-dimensional convolutional kernel-based convolutional process, a mean pooling process of a local feature matrix along a channel dimension, and an activation process on input data in forward transfer of the layers, respectively, to take an output of a last layer of the first item text convolutional neural network using the one-dimensional convolutional kernel having the first scale as the first-scale item context feature vector, wherein an input of the first layer of the first item text convolutional neural network using the one-dimensional convolutional kernel having the first scale is the one-dimensional feature vector.
More specifically, the object of arranging a plurality of item word sense feature vectors into one-dimensional item feature vectors and obtaining a second-scale item context feature vector by using a second item text convolution neural network having a one-dimensional convolution kernel of a second scale is to further capture feature information of different scales in a text by using a Convolution Neural Network (CNN), thereby more comprehensively representing the semantic content of the text. By using convolution kernels with different scales, different ranges of local features and context information in the text can be captured. The convolution kernel of the second scale can help the model to better understand semantic information of different scales in the text, so that accuracy of text understanding is improved. The convolution kernel of the second scale may help the model understand the semantic content of the text at different levels and scales, thereby generating a richer and comprehensive text representation. This helps to improve the abstract and expressive power of the model on text semantics. By introducing feature representations of different scales, the model can be better adapted to texts of different lengths and structures, and the generalization capability and adaptability of the model are improved, so that the model is more robust in processing various types of text data.
Specifically, in the above method for generating a project document based on artificial intelligence, the steps of arranging the plurality of project word meaning feature vectors into one-dimensional project feature vectors, and then obtaining a second-scale project context feature vector by using a second project text convolution neural network with a one-dimensional convolution kernel of a second scale include: each layer of the second-item text convolutional neural network using a one-dimensional convolutional kernel having a second scale performs a one-dimensional convolutional kernel-based convolutional process, a mean pooling process of a local feature matrix along a channel dimension, and an activation process on input data in forward transfer of layers, respectively, to take an output of a last layer of the second-item text convolutional neural network using the one-dimensional convolutional kernel having the second scale as the second-scale item context feature vector, wherein an input of a first layer of the second-item text convolutional neural network using the one-dimensional convolutional kernel having the second scale is the one-dimensional feature vector.
More specifically, in order to comprehensively utilize information of different scales, the context feature vector of the first scale item and the context feature vector of the second scale item are fused to obtain a multi-scale item feature vector, so that semantic information and context association in a text are more comprehensively captured. The convolution kernels of the first scale and the second scale capture text features and context information of different scales, respectively. Fusing the feature vectors of the two scales can enable the model to comprehensively consider information of different scales, so that semantic features of the text can be expressed more comprehensively. By fusing project feature vectors with different scales, context information with different ranges can be comprehensively considered, association and semantic information among words in the text can be better captured, and accuracy and richness of text representation can be improved. The fusion of the multi-scale project feature vectors is beneficial to comprehensively utilizing information of different scales in a text processing task, and improves the understanding and expression capability of a model to text data, so that the performance of various text related tasks is better supported.
Specifically, in the above method for generating an artificial intelligence-based project document, fusing the first scale project context feature vector and the second scale project context feature vector to obtain a multi-scale project feature vector includes: fusing the first scale item context feature vector and the second scale item context feature vector with a cascading formula to obtain a multi-scale item feature vector; wherein, the cascade formula is: ; wherein,Representing the first scale item context feature vector,/>Representing the context feature vector of the second scale item,/>Representing the multi-scale item feature vector,/>Representing a cascading function.
In step S140, the project original document is processed to obtain a multi-scale original project feature vector. The project original document is processed to obtain the multi-scale original project feature vector, so that comprehensive utilization of information of different scales is facilitated, semantic content and structural features of the document are more comprehensively captured, and therefore the expression effect of the model in a document processing task is improved. Specifically, the processing method for the project original document may refer to the processing procedure for the newly received project document.
In step S150, a difference between the multi-scale item feature vector and the multi-scale original item feature vector is calculated to obtain an item difference feature vector. By calculating the difference between the project feature vector and the original project feature vector, the features of the project itself, namely the difference between the project and the original document, can be highlighted. This helps to focus attention on the unique information of the items, thereby better distinguishing features between different items. Meanwhile, the project differential feature vector can capture personalized information and features of the project relative to the original document, and is helpful for better understanding content and semantic features of the project. This helps to improve the understanding and expressive power of the model on the project.
Specifically, in the above method for generating an artificial intelligence-based project document, calculating a difference between the multi-scale project feature vector and the multi-scale original project feature vector to obtain a project difference feature vector includes: calculating the difference between the multi-scale project feature vector and the multi-scale original project feature vector by using the following difference formula to obtain a project difference feature vector; wherein, the difference formula is: ; wherein/>Representing the multi-scale item feature vector,/>Representing difference by location,/>Representing the multi-scale original project feature vector, and/>Representing the item differential feature vector.
In step S160, the project differential feature vector is subjected to implicit group optimization with spatial sparsity constraint to obtain an optimized project differential feature vector. In particular, in the technical scheme of the application, project context feature vectors of a first scale and a second scale are considered to be fused together to obtain a multi-scale project feature vector. Information may be lost in this process because features at different scales may not always be fully compatible or there may be information redundancy. Meanwhile, the multi-scale original project feature vector may not contain enough information or features of various aspects to completely express the content of the original document, which may result in that the generated project differential feature vector cannot sufficiently capture the complex information in the original document. Further, when generating project differential feature vectors, calculating the difference between the multi-scale project feature vectors and the multi-scale original project feature vectors. This approach may be more focused on capturing local variations or subtle differences, but is relatively weak in overall information expression, thus resulting in a low degree of information aggregation of the resulting item differential feature vectors. And the information aggregation degree is not high, and the generated differential feature vector may not fully express the whole content or meaning of the original document. This may result in a lack of accurate understanding of the entire document in generating the project document annotating the modified portion of the document, thereby affecting the quality of the final result. Therefore, in the technical scheme of the application, the project differential feature vector is subjected to implicit group optimization with space sparsity limitation.
Specifically, in the method for generating the project document based on artificial intelligence, performing implicit group optimization of spatial sparsity constraint on the project difference feature vector to obtain an optimized project difference feature vector, the method includes: calculating a implicit group optimization factor of the spatial sparsity constraint of the project differential feature vector; and weighting the project difference feature vector by taking the implicit group optimization factor limited by the space sparsity as a weight to obtain the optimized project difference feature vector.
Specifically, in the artificial intelligence-based project document generation method, calculating a implicit group optimization factor of spatial sparsity constraint of the project differential feature vector includes: calculating a hidden group optimization factor of the spatial sparsity constraint of the project differential feature vector according to the following hidden group optimization factor calculation formula; the implicit group optimization factor calculation formula is as follows: ; wherein/>The term differential feature vector is represented as such,Representing the variance of the feature value set of the item differential feature vector,/>Is the eigenvalue of each position in the project differential eigenvector, and/>Is the length of the item differential feature vector, and/>Representing a norm of the item differential feature vector,/>Is a implicit group optimization factor of the spatial sparsity constraint of the item differential feature vector.
The method comprises the steps of carrying out implicit group optimization of spatial sparsity limitation on the project difference feature vectors, evaluating the adaptability of each particle in the project difference feature vectors in a high-dimensional feature space, updating the project difference feature vectors according to the optimal solution and the group optimal solution of each particle in the project difference feature vectors so as to meet the limitation of spatial sparsity of the updated project difference feature vectors, and enhancing the aggregation degree of feature manifold of the project difference feature vectors in a mode of recovering basic information in a full-precision information representation space, thereby improving the expression effect of the project difference feature vectors.
In step S170, the optimized project differential feature vector is passed through a generator to generate a project document that annotates the document modification portion. Modeling the difference characteristics of the project by using a generator model, and generating a project document marked with a document modification part by using the optimized project difference characteristic vector through a generator so as to generate the modification part, so that the modification content of the project document can be better understood and displayed. The modification process of the project document can be simulated through the generator model, and the modification part of the annotation document is generated according to the optimized project difference feature vector, so that the change and modification content of the project document are displayed. This helps to understand the modification details and variations of the project document.
Specifically, in the above-described artificial intelligence-based project document generation method, the model of the generator may be a countermeasure generation network model or a variational self-encoder model, by training the optimized project differential feature vector to map the optimized project differential feature vector to a representation of the project document of the annotation document modification section.
In summary, an artificial intelligence based project document generation method according to an embodiment of the present application has been elucidated that uses artificial intelligence techniques based on the field of deep learning to perform feature encoding and extraction of an original project document and a newly received project document to generate a project document that annotates a document modification portion. Therefore, by prompting the document updating part, information omission caused by improper communication of different departments can be effectively avoided, and negative influence on project progress and quality is avoided.
FIG. 3 is a block diagram of an artificial intelligence based project document generating apparatus according to an embodiment of the application. As shown in fig. 3, the artificial intelligence based project document generating apparatus 100 according to an embodiment of the present application includes: a project document acquisition module 110 for acquiring an original project document and a newly received project document; a project text recognition module 120, configured to perform OCR text recognition on the newly received project document to obtain a newly received project text description; a new received project text feature extraction module 130, configured to perform feature extraction and encoding on the new received project text description to obtain a multi-scale project feature vector; the project original document feature extraction module 140 is configured to process the project original document to obtain a multi-scale original project feature vector; the project differentiating module 150 is configured to calculate a difference between the multi-scale project feature vector and the multi-scale original project feature vector to obtain a project differentiating feature vector; the optimizing module 160 is configured to perform implicit group optimization with spatial sparsity constraint on the project differential feature vector to obtain an optimized project differential feature vector; and a modification annotation generation module 170 for passing the optimized project differential feature vector through a generator to generate a project document of the annotation document modification section.
Here, it will be understood by those skilled in the art that the specific functions and operations of the respective units and modules in the above-described artificial intelligence-based project document generating apparatus 100 have been described in detail in the above description of the artificial intelligence-based project document generating method with reference to fig. 1 to 3, and thus, repetitive descriptions thereof will be omitted.
In summary, an artificial intelligence based project document generation apparatus according to an embodiment of the present application has been elucidated that uses artificial intelligence technology based on the field of deep learning to perform feature encoding and extraction of an original project document and a newly received project document to generate a project document that annotates a document modification portion. Therefore, by prompting the document updating part, information omission caused by improper communication of different departments can be effectively avoided, and negative influence on project progress and quality is avoided.
As described above, the artificial intelligence based project document generating apparatus 100 according to the embodiment of the application may be implemented in various terminal devices, such as an artificial intelligence based project document generating server or the like. In one example, the artificial intelligence based project document generation apparatus 100 according to an embodiment of the present application may be integrated into a terminal device as one software module and/or hardware module. For example, the artificial intelligence based project document generating apparatus 100 may be a software module in the operating apparatus of the terminal device, or may be an application developed for the terminal device; of course, the artificial intelligence based project document generating apparatus 100 may also be one of a plurality of hardware modules of the terminal device.
Alternatively, in another example, the artificial intelligence based project document generating apparatus 100 and the terminal device may be separate devices, and the artificial intelligence based project document generating apparatus 100 may be connected to the terminal device through a wired and/or wireless network and transmit the interactive information in a contracted data format.
The embodiment of the application also provides electronic equipment, the structural schematic diagram of which is shown in fig. 4, and fig. 4 is a block diagram of the electronic equipment according to the embodiment of the application. As shown in fig. 4, the electronic device includes: a processor; a memory having stored therein computer program instructions that, when executed by the processor, cause the processor to perform the artificial intelligence based project document generation method. The processor may take the form of, for example, a microprocessor or processor, as well as computer-readable media, logic gates, switches, application SPECIFIC INTEGRATED Circuits (ASIC), programmable logic controllers, and embedded microcontrollers, etc., which store computer-readable program code (e.g., software or firmware) executable by the (micro) processor. The Memory includes, but is not limited to, random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), cache (Cache), hard disk (HARD DISK DRIVE, HDD), or Memory Card (Memory Card). The electronic device may be, for example, a server or the like of the method according to the above embodiment. Of course, the electronic device may also include a module structure such as an input device, a transmission module, and the like. In this embodiment, the specific functions and effects of the electronic device may be explained in comparison with other embodiments, which are not described herein.
In addition to the methods and apparatus described above, embodiments of the application may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in the functions of the method for real-time monitoring of waste treatment processes according to various embodiments of the application described in the "exemplary methods" section of this specification.
The computer program product may write program code for performing operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
In addition to the methods and apparatus described above, embodiments of the application may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in the functions of the artificial intelligence based project document generation method according to the various embodiments of the application described in the "exemplary methods" section of this specification.
The computer program product may write program code for performing operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium, having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform steps in the functions of the artificial intelligence based project document generation method according to various embodiments of the present application described in the above "exemplary method" section of the specification.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description of the method for generating the project document based on the artificial intelligence provided by the embodiment of the application applies specific examples to illustrate the principle and implementation of the application, and the description of the above examples is only used for helping to understand the method of the application. Also, as will be apparent to one of ordinary skill in the art, there are variations in the embodiments and the scope of the application of the method according to the present application.
In view of the foregoing, the disclosure should not be construed as limiting the application, and any changes or substitutions that would be easily recognized by those skilled in the art within the scope of the present disclosure are intended to be included in the scope of the present disclosure. Further combinations of the present application may be made to provide further implementations based on the implementations provided in the above aspects.