Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects of the prior art, and provide an aviation data revising system based on artificial intelligence.
The technical scheme for solving the technical problems is that the aviation data revising system based on the artificial intelligence is characterized by comprising the following components:
The text acquisition unit is used for acquiring a target aviation data text, performing clause operation on the target aviation data text to obtain a first clause sequence of the target aviation data text, acquiring a standard aviation data text, and performing clause operation on the standard aviation data text to obtain a second clause sequence of the target aviation data;
The sentence matching unit is used for carrying out semantic matching on each first clause in the first clause sequence and the second clause sequence to obtain a second clause matched with the first clause, namely obtaining a second clause set corresponding to the first clause sequence;
the sentence interpretation unit is used for performing clause interpretation on each second clause in the second clause set according to a pre-trained large language model so as to obtain the clause interpretation corresponding to the second clause, namely obtaining a clause interpretation set corresponding to the second clause set;
The data revising unit is used for performing context sensing generation on the clause paraphrasing set to obtain a data revising text corresponding to the clause paraphrasing set;
And the data generation unit is used for performing image-text matching on the second clause set and the standard aviation image set to obtain a standard aviation image corresponding to the second clause, and adding the standard aviation image to a corresponding position in the data revision text to obtain aviation image-text revision data.
Preferably, performing semantic matching on each first clause in the first clause sequence and the second clause sequence to obtain a second clause matched with the first clause, including:
word segmentation is carried out on the first clause and the second clause to obtain a first word sequence corresponding to the first clause and a second word sequence corresponding to the second clause;
Performing character segmentation operation on the first clause and the second clause to obtain a first character sequence corresponding to the first clause and a second character sequence corresponding to the second clause;
Mapping the first Word and the first character corresponding to the first Word into a first Word vector according to the weight of the pre-trained Word2vec model, and mapping the second Word and the second character corresponding to the second Word into a second Word vector according to the weight of the pre-trained Word2vec model;
Regularizing the first word vector and the second word vector to obtain a first standard word vector corresponding to the first word vector and a second standard word vector corresponding to the second word vector.
Preferably, performing semantic matching on each first clause in the first clause sequence and the second clause sequence to obtain a second clause matched with the first clause, including:
Performing difference coding on the first standard word vector and the second standard word vector to obtain a difference vector between the first standard word vector and the second standard word vector;
Performing interactive coding on the first standard word vector and the second standard word vector to obtain an interactive vector between the first standard word vector and the second standard word vector;
And fusing the difference vector and the interaction vector to obtain a fusion vector, and classifying the fusion vector to obtain the matching degree between the first clause and the second clause.
Preferably, performing differential encoding on the first standard word vector and the second standard word vector to obtain a differential vector between the first standard word vector and the second standard word vector, including:
Performing context coding on the first standard word vector and the second standard word vector according to the bidirectional GRU to obtain a first context vector corresponding to the first standard word vector and a second context vector corresponding to the second standard word vector;
And determining the distance between the first context vector and the second context vector according to the Manhattan distance, and performing differential coding on the first context vector and the second context vector according to the distance to obtain a differential vector between the first standard word vector and the second standard word vector.
Preferably, the interactive coding of the first standard word vector and the second standard word vector to obtain an interactive vector between the first standard word vector and the second standard word vector includes:
Performing interactive coding on the first standard word vector and the second standard word vector according to a multi-head attention mechanism to obtain an interactive vector between the first standard word vector and the second standard word vector, wherein the expression of the interactive vector is as follows:
;
Wherein,The interaction vector is represented as a function of the interaction vector,、AndRepresent the firstThe query of the header, the key and the value projection matrix,AndRepresenting a first standard word vector and a second standard word vector,Representing the multi-headed attentiveness mechanism,Representing a stitching operation.
Preferably, performing context awareness generation on the clause paraphrasing set to obtain a data revision text corresponding to the clause paraphrasing set, including:
Performing dependency syntactic analysis on the clause paraphrasing set to generate a weighted directed graph, wherein the weighted directed graph has the following expression:
;
Wherein,A weighted directed graph is represented and a weighted directed graph is represented,A set of nodes is represented and,Representing a set of dependent edges,Representing a syntactic weight set, wherein nodes in the node set correspond to vocabulary units in the paraphrasing of the clauses in the clause paraphrasing set, dependency edges in the dependency edge set correspond to dependency relationship types between the vocabulary units, and the syntactic weight in the syntactic weight set corresponds to syntactic association strength;
Semantic role labeling is conducted on the clause definition set to obtain a semantic role labeling result, and a superside set is constructed based on the semantic role labeling result, wherein the expression of the superside in the superside set is as follows:
;
Wherein,Indicating that the edge of the object is over-edge,Representing the 0th predicate-argument structure in clause definitions;
And constructing a hypergraph corresponding to the weighted directed graph based on the hyperedge set, wherein the expression of the hypergraph is as follows:
;
Wherein,A hypergraph is represented and the graph is displayed,Representing a supersound set.
Preferably, the context awareness generating is performed on the clause paraphrasing set to obtain a data revision text corresponding to the clause paraphrasing set, and the method further includes:
performing feature coding on the hypergraph based on a graph attention network to obtain a context sensing feature vector corresponding to the hypergraph;
constructing a prototype vector based on the context-aware feature vector, wherein the expression of the prototype vector is as follows:
;
Wherein,The prototype vector is represented as such,Representing an average pooling operation,Representing a context-aware feature vector;
calculating the semantic deviation degree of each clause definition in the clause definition set based on the prototype vector, wherein the calculation formula of the semantic deviation degree is as follows:
;
Wherein,Representing prototype vector and candidate clause paraphrasingThe degree of semantic deviation between them,Representing candidate clause definitionsIs a vector of outputs of (a);
Dynamically modulating the candidate paraphrasing representation based on a gating mechanism, wherein the expression of the dynamic modulating candidate paraphrasing representation is as follows:
;
Wherein,A dynamic modulation candidate paraphrasing representation is represented,The activation function is represented as a function of the activation,The term of the bias is indicated,Representing hyperedge connection initialization in the hypergraph;
And when the semantic deviation degree is smaller than a preset deviation degree threshold value, taking the candidate paraphrasing corresponding to the semantic deviation degree as a clause of the data revision text.
Preferably, performing image-text matching on the second clause set and the standard aerial image set to obtain a standard aerial image corresponding to the second clause, including:
Extracting features of the standard aerial image according to the bottom-up attention to generate regional feature vectors, dividing the standard aerial image into a plurality of blocks to obtain position feature vectors, and extracting features of the second clause according to Bi-GRU to obtain text feature vectors;
Transforming the position feature vector through a linear layer to serve as a query vector, and taking the region feature vector as a key and value vector to perform cross attention so as to obtain a visual feature vector;
and performing similarity sampling on the text feature vector and the visual feature vector to obtain overall similarity, and if the overall similarity is higher than a preset similarity threshold, matching the second clause with the standard aerial image.
Preferably, the similarity sampling is performed on the text feature vector and the visual feature vector to obtain overall similarity, including:
calculating the similarity between the text feature vector and the visual feature vector, wherein the similarity uses cosine similarity;
determining a semantic relationship between the text feature vector and the visual feature vector according to the similarity;
Determining weighted similarity of the block in the standard aerial image according to semantic relation between the text feature vector and the visual feature vector;
and determining the overall similarity between the text feature vector and the visual feature vector according to the weighted similarity of the block in the standard aerial image.
Preferably, the calculation formula of the semantic relation is as follows:
;
Wherein,Representing the semantic relationship between the second clause corresponding to the text feature vector and the standard aerial image corresponding to the visual feature vector,A mask indicating that when the input is positive, equal to the input, otherwise 0,Representing the similarity between the text feature vector and the visual feature vector,Indicating a preset parameter threshold value of the parameter,Representing the number of blocks in a standard aerial image,Representing an activation function;
The calculation formula of the weighted similarity is as follows:
;
Wherein,Representing the weighted similarity of the blocks in the standard aerial image,A visual feature vector representing a block;
The calculation formula of the overall similarity is as follows:
;
Wherein,Representing the overall similarity between the text feature vector and the visual feature vector,Representing the text feature vector.
The invention has the advantages that (1) the invention can rapidly identify the part needing revising from the target aviation data text through an automatic text processing flow (such as text sentence, semantic matching, clause definition and the like), and compare and revise the part with the standard aviation data, which can greatly reduce the time and cost of manual revising, improve the accuracy of revising, avoid human errors, and by introducing a pre-trained large language model, the system can better understand the semantics in the text, especially in complex aviation data, the use of the large language model can ensure deep understanding of the aviation data text, and can provide accurate definition according to the context, ensure that the obtained revised text is more accurate and professional in terms of the meaning, and (2) the invention can automatically select and insert the standard aviation image related to the revised text by matching the text with a standard aviation image set, the automatic matching function avoids the manual searching and image inserting process, ensures that the post-revision aviation data has accurate text, can correspond to corresponding image information, improve the consistency, and can generate the text with no more consistent text after revising, namely, can generate the text with no consistent or inconsistent text according to the context, and can not meet the standards, and can ensure that the revised text is more accurate after revising the text is generated according to the context, and the revised text is more than the standard-revised by the detail, and can not meet the rule, and the revised text is generated by the rule, and the revising information is more consistent, this is particularly important for the aviation field, because accurate and standardized aviation data are critical to flight safety and operation, and the generated aviation graphic revision data not only provides revision of texts, but also improves the visual effect of the data through graphic matching, so that aviation personnel can understand the aviation data more clearly and intuitively, especially specific images and data possibly related in flight operation, and the usability and practical application value of the data are increased.
Detailed Description
In a first embodiment, as shown in fig. 1, the aviation data revising system based on artificial intelligence provided by the invention includes:
The text acquisition unit 1 is used for acquiring a target aviation data text, performing clause operation on the target aviation data text to obtain a first clause sequence of the target aviation data text, acquiring a standard aviation data text, and performing clause operation on the standard aviation data text to obtain a second clause sequence of the target aviation data;
the sentence matching unit 2 is used for carrying out semantic matching on each first clause in the first clause sequence and the second clause sequence to obtain a second clause matched with the first clause, namely obtaining a second clause set corresponding to the first clause sequence;
Sentence interpretation unit 3, the sentence interpretation unit 3 is used for performing clause interpretation on each second clause in the second clause set according to the pre-trained large language model so as to obtain the clause interpretation corresponding to the second clause, namely obtaining the clause interpretation set corresponding to the second clause set;
the data revising unit 4 is used for performing context sensing generation on the clause definition set to obtain a data revising text corresponding to the clause definition set;
The data generating unit 5 is used for performing image-text matching on the second clause set and the standard aerial image set to obtain a standard aerial image corresponding to the second clause, and adding the standard aerial image to a corresponding position in the data revision text to obtain the aerial image-text revision data.
In the invention, the target aviation data text may contain specific information in the aviation field, while the standard aviation data text is a standard version for comparison and standardization, semantic matching refers to judging the similarity or equivalence of two sentences in terms of meaning through natural language processing technology instead of just through literal similarity, a pre-trained large language model is used for interpreting the matched second clause (clause from the standard aviation data text), namely generating easy-to-understand interpretation or conversion, which is helpful for ensuring that the extracted content is more clearly and accurately conveyed to a user, the large language model refers to a language processing model with strong semantic understanding and generating capability, which is trained through deep learning technology (such as GPT, BERT and the like), context awareness generation refers to adjusting and perfecting paraphrasing content according to context information, ensuring that the paraphrasing is more suitable for a practical application scene, and graphic matching refers to combining text content with related image content, so that the information is more visible and easy-to-understand, which is particularly important in aviation data, because visual information generally helps users better understand technology.
In a second embodiment, compared with the first embodiment, the aviation data revision system based on artificial intelligence further includes performing semantic matching on each first clause in the first clause sequence and the second clause sequence to obtain a second clause matched with the first clause, where the second clause comprises:
Word segmentation operation is carried out on the first clause and the second clause to obtain a first word sequence corresponding to the first clause and a second word sequence corresponding to the second clause;
performing character segmentation operation on the first clause and the second clause to obtain a first character sequence corresponding to the first clause and a second character sequence corresponding to the second clause;
Mapping a first Word and a first character corresponding to the first Word into a first Word vector according to the weight of the pre-trained Word2vec model;
Regularizing the first word vector and the second word vector to obtain a first standard word vector corresponding to the first word vector and a second standard word vector corresponding to the second word vector.
In this embodiment, word segmentation is to divide a continuous text into meaningful basic units (such as words or phrases), in chinese text processing, since there is no space to separate words, the text needs to be divided into separate words by a word segmentation algorithm, in which the first clause and the second clause are respectively divided into respective word sequences for subsequent processing, and character segmentation is to divide the text into characters, and divide each word into separate characters, such as "computer" into "computer", and so on. This step is typically used for further text processing, especially for some models that require character-level based, word2Vec is a Word-vectorization model that maps each Word into a vector (a point in high-dimensional space) that can express the semantic relationship of the Word, word2Vec model is trained on a large amount of text data, generating a vector representation of each Word by which the similarity between different words can be quantified and compared, regularization is a common mathematical and statistical method used to adjust the model output or data to fit a specification or standard, regularization operation typically refers to adjusting the Word vectors to a uniform scale or range, including L2 regularization, i.e., adjusting the vectors to unit length.
In an alternative embodiment, performing semantic matching on each first clause in the first clause sequence and the second clause sequence to obtain a second clause matched with the first clause, including:
Performing difference coding on the first standard word vector and the second standard word vector to obtain a difference vector between the first standard word vector and the second standard word vector;
performing interactive coding on the first standard word vector and the second standard word vector to obtain an interactive vector between the first standard word vector and the second standard word vector;
and fusing the difference vector and the interaction vector to obtain a fusion vector, and classifying the fusion vector to obtain the matching degree between the first clause and the second clause.
In an alternative embodiment, differentially encoding the first standard word vector and the second standard word vector to obtain a difference vector between the first standard word vector and the second standard word vector includes:
performing context coding on the first standard word vector and the second standard word vector according to the bidirectional GRU to obtain a first context vector corresponding to the first standard word vector and a second context vector corresponding to the second standard word vector;
and determining the distance between the first context vector and the second context vector according to the Manhattan distance, and performing differential coding on the first context vector and the second context vector according to the distance to obtain a differential vector between the first standard word vector and the second standard word vector.
It should be noted that bidirectional GRU is extended on the basis of GRU, and it encodes in two directions (front to back and back to front) of sequential data respectively, so that the model can not only utilize the context information of the current word, but also combine with the future context information to more fully understand the input data, context encoding refers to processing words or characters by a model (such as GRU, LSTM, transformer, etc.) to capture the semantic information in its context, the object of context encoding is to convert the representation (such as word vector) of each word or symbol into a new representation containing its context information, manhattan distance is also called city block distance, which is a method of calculating the distance between two points, in an n-dimensional space, in which the Manhattan distance is calculated as the sum of the absolute values of the differences between two points in each dimension, and the core of the context encoding refers to the encoding of the difference between two vectors, which is to calculate the difference between two vectors and convert them into a new representation (such as word vector) and the new representation of the difference between two vectors is usually obtained by calculating the difference between two vectors.
In an alternative embodiment, the interactive encoding of the first standard word vector and the second standard word vector to obtain an interaction vector between the first standard word vector and the second standard word vector includes:
Performing interactive coding on the first standard word vector and the second standard word vector according to a multi-head attention mechanism to obtain an interactive vector between the first standard word vector and the second standard word vector, wherein the expression of the interactive vector is as follows:
;
Wherein,The interaction vector is represented as a function of the interaction vector,、AndRepresent the firstThe query of the header, the key and the value projection matrix,AndRepresenting a first standard word vector and a second standard word vector,Representing the multi-headed attentiveness mechanism,Representing a stitching operation.
Note that the attention mechanism is a technique used in neural networks to let models pay attention to different parts of the input (e.g. different words in a sequence), which decides which parts should be paid more attention to by calculating the weights of the different parts of the input (i.e. the attention weights).
In an alternative embodiment, performing context-aware generation on the clause paraphrasing set to obtain a material revision text corresponding to the clause paraphrasing set, including:
performing dependency syntax analysis on the parasentence paraphrasing set to generate a weighted directed graph, wherein the weighted directed graph has the following expression:
;
Wherein,A weighted directed graph is represented and a weighted directed graph is represented,A set of nodes is represented and,Representing a set of dependent edges,Representing a syntactic weight set, wherein nodes in the node set correspond to vocabulary units in the paraphrasing of the clauses in the clause paraphrasing set, dependency edges in the dependency edge set correspond to dependency relationship types between the vocabulary units, and the syntactic weight in the syntactic weight set corresponds to syntactic association strength;
Semantic role labeling is carried out on the sub-sentence interpretation set to obtain a semantic role labeling result, and a superside set is constructed based on the semantic role labeling result, wherein the expression of the superside in the superside set is as follows:
;
Wherein,Indicating that the edge of the object is over-edge,Representing the 0th predicate-argument structure in clause definitions;
and constructing a hypergraph corresponding to the weighted directed graph based on the hyperedge set, wherein the expression of the hypergraph is as follows:
;
Wherein,A hypergraph is represented and the graph is displayed,Representing a supersound set.
It should be noted that dependency syntax analysis is a syntax analysis method, which regards vocabulary units in sentences as nodes, relationships between the nodes (such as master-predicate relationships, guest-running relationships, etc.) as directed edges, analyzes the dependency relationships between the vocabulary units, and generates a result which is usually a directed graph, wherein the nodes represent words or vocabularies, the edges represent the syntactic relationships between them, weighted directed graphs are concepts in a graph, each edge corresponds to a weight value, the weights represent a certain characteristic or importance of the edges, in syntax analysis, the weights of the edges usually represent the strength, the degree of association or some other characteristic of the dependency relationships, edge sets are sets of all edges in weighted directed graphs, each edge represents a dependency relationship, usually represents the syntactic association between the vocabularies (such as master-predicate relationships, guest-running relationships, etc.), each edge is connected with two vocabulary units, semantic role labels are used for labeling vocabulary units in sentences, marks are used for marking the vocabularies in sentences, and are used for identifying predicate units in sentences (such as receivers) and predicate elements in the graph, the predicate elements are recognized by a superstructures, such as a superstructures can be more than one predicate element is a superstructural graph, and a superstructural graph is formed by a superstructural graph, such as a superstructural graph is composed of a superstructural graph is formed by a superstructural graph, for example, the supersecom is a superstructural, a supersecom of a supersecom is formed by a supersecom of a graph is formed, it is not just connected to two nodes, but is usually connected to multiple nodes, in semantic analysis, a superside can represent some complex semantic relationship in a sentence, such as a relationship between a predicate and multiple arguments, a predicate-argument structure refers to a semantic structure of one predicate and its related arguments, and a supergraph is an extension of graph theory, in which an edge (superside) can connect multiple nodes instead of just two nodes.
In an alternative embodiment, the context-aware generation is performed on the clause paraphrasing set to obtain the data revision text corresponding to the clause paraphrasing set, and the method further includes:
performing feature coding on the hypergraph based on the graph attention network to obtain a context sensing feature vector corresponding to the hypergraph;
Constructing a prototype vector based on the context-aware feature vector, wherein the expression of the prototype vector is as follows:
;
Wherein,The prototype vector is represented as such,Representing an average pooling operation,Representing a context-aware feature vector;
calculating the semantic deviation degree of each clause definition in the clause definition set based on the prototype vector, wherein the calculation formula of the semantic deviation degree is as follows:
;
Wherein,Representing prototype vector and candidate clause paraphrasingThe degree of semantic deviation between them,Representing candidate clause definitionsIs a vector of outputs of (a);
Dynamically modulating the candidate paraphrasing representation based on a gating mechanism, wherein the expression of the dynamic modulating candidate paraphrasing representation is as follows:
;
Wherein,A dynamic modulation candidate paraphrasing representation is represented,The activation function is represented as a function of the activation,The term of the bias is indicated,Representing hyperedge connection initialization in the hypergraph;
and when the semantic deviation degree is smaller than a preset deviation degree threshold value, taking the candidate paraphrasing corresponding to the semantic deviation degree as a clause of the data revision text.
It should be noted that the graph attention network is a deep learning model, and is specially used for learning graph structure data, and is characterized by that it utilizes attention mechanism to implement weighted aggregation of every node in the graph so as to automatically allocate different importance weights for neighbor nodes in the learning process, and can more effectively capture the relationship between different nodes in the graph structure, and is specially applicable to nodes with different patterns and multiple features, and the context-aware feature vector is the feature representation obtained when the hypergraph is coded by means of graph attention network, and can be used for sensing context information between nodes, prototype vector is the vector used for representing a certain specific category or semantic, and is usually obtained by means of pooling operation (such as averaging) on the basis of several vectors, and the semantic deviation is used for measuring the difference degree of two vectors (such as output vector between prototype vector and candidate clause) in terms on the meaning of semantics, and the smaller semantic deviation is more approximate to the semantic release between prototype vector and candidate clause, and the larger semantic deviation is represented by means that the difference degree between prototype vector and candidate clause is greater, and the semantic release is more approximate to the candidate clause, and the semantic release is more accurate than the initial candidate is represented by means of increasing the meaning of the initial motion of the candidate release relation, and the candidate release is more accurate, and the candidate release is better than the initial candidate is better than the threshold, and can be used for adjusting the initial motion of candidate release graph, and is better to be used for capturing and more accurate, and is better than the candidate to be represented by means to be better by means to be used to the candidate to be better by means and candidate release and to the candidate release mechanism, these connections define which nodes are associated by hyperedges.
In an optional embodiment, performing image-text matching on the second clause set and the standard aerial image set to obtain a standard aerial image corresponding to the second clause, where the method includes:
Extracting features of the standard aerial image according to the bottom-up attention to generate regional feature vectors, segmenting the standard aerial image into a plurality of blocks to obtain position feature vectors, and extracting features of the second clause according to the Bi-GRU to obtain text feature vectors;
Transforming the position feature vector through a linear layer to serve as a query vector, and taking the region feature vector as a key and value vector to perform cross attention so as to obtain a visual feature vector;
And performing similarity sampling on the text feature vector and the visual feature vector to obtain overall similarity, and if the overall similarity is higher than a preset similarity threshold, matching the second clause with the standard aerial image.
It should be noted that from bottom to top attention is an attention mechanism based on image features, which performs layer-by-layer attention from low-level features (such as edges, colors, textures, etc.) to higher-level semantic information of an image, in image processing, it is common to extract features through a Convolutional Neural Network (CNN) and use these features to perform weighted calculation in the image to determine which areas should be considered by a model, an area feature vector is a feature representation extracted from the image and used for describing a specific area (such as an image block), which is usually extracted through a Convolutional Neural Network (CNN) or similar deep learning model, reflects visual information of the area, such as colors, shapes, textures, etc., a Bi-GRU is a variant of a Bi-gating cyclic unit (GRU), which, when performing sequential data processing, simultaneously considers forward and backward information of an input sequence, thereby capturing better context relation, bi-GRU can provide more context information than one-way RNN, and thus is used for processing a critical vector in a NLP task, such as a key-crossing, an attention vector, an attention-crossing, and the like.
In an alternative embodiment, similarity sampling is performed on the text feature vector and the visual feature vector to obtain overall similarity, including:
calculating the similarity between the text feature vector and the visual feature vector, wherein cosine similarity is used for the similarity;
determining semantic relations between the text feature vectors and the visual feature vectors according to the similarity;
determining the weighted similarity of the blocks in the standard aerial image according to the semantic relation between the text feature vector and the visual feature vector;
the overall similarity between the text feature vector and the visual feature vector is determined based on the weighted similarity of the blocks in the standard aerial image.
In an alternative embodiment, the semantic relationship is calculated as follows:
;
Wherein,Representing the semantic relationship between the second clause corresponding to the text feature vector and the standard aerial image corresponding to the visual feature vector,A mask indicating that when the input is positive, equal to the input, otherwise 0,Representing the similarity between the text feature vector and the visual feature vector,Indicating a preset parameter threshold value of the parameter,Representing the number of blocks in a standard aerial image,Representing an activation function;
the calculation formula of the weighted similarity is as follows:
;
Wherein,Representing the weighted similarity of the blocks in the standard aerial image,A visual feature vector representing a block;
the overall similarity is calculated as follows:
;
Wherein,Representing the overall similarity between the text feature vector and the visual feature vector,Representing the text feature vector.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited thereto, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present invention.