Communication matrix generation method and apparatus, electronic device, and storage medium
By performing syntactic analysis and fuzzification on the communication matrix, a communication matrix generation model is constructed and trained, which solves the problems of high workload and high error rate caused by manual processing in the existing technology, and realizes the automatic generation of standardized and accurate communication matrices.
Patent Information
- Application Number
- CN202411632319.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The lack of automated communication matrix generation algorithms in existing technologies leads to a large workload, is time-consuming and labor-intensive, and is prone to oversights, affecting the integrity and accuracy of the communication matrix.
By performing syntactic analysis and fuzzification on the target communication matrix, an initial communication matrix generation model is constructed, and then optimized using training samples to generate a standardized communication matrix with the same syntax as the target communication matrix.
It achieves automated processing, reduces manual intervention, improves the standardization and accuracy of the communication matrix, enhances the flexibility and adaptability of the model, and reduces the risk of errors.
Smart Images

Figure CN119577310B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication matrix generation method, device, electronic device, and computer-readable storage medium. Background Art
[0002] With the development of technology, the communication matrix is usually defined by the original equipment manufacturer (OEM) or the vehicle manufacturer (in the automotive field) to clarify how the nodes (such as ECUs, sensors, actuators, etc.) in the vehicle network (or any network system) interact and share information.
[0003] Among related technologies, the technology for automatically generating communication matrices based on functional specifications is still blank, lacking mature algorithms or effective application of large-scale pre-trained models. Currently, this critical process mainly relies on heavy manual labor. Developers need to deeply analyze complex functional specification documents, manually disassemble and extract all necessary signal elements and their related information. This process is not only labor-intensive, time-consuming and labor-intensive, but also prone to negligence due to human factors, resulting in the omission of key signals or the introduction of erroneous signals, which in turn affects the integrity and accuracy of the communication matrix. Summary of the Invention
[0004] To solve the above technical problems, embodiments of the present application provide a communication matrix generation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of an embodiment of the present application, a communication matrix generation method is provided, comprising: obtaining a target communication matrix, and performing syntactic analysis on the target communication matrix to obtain a syntactic analysis result, wherein the syntactic analysis result includes grammatical constituent elements of the target communication matrix; performing fuzzification processing on the grammatical constituent elements in the target communication matrix based on the syntactic analysis result to obtain a fuzzy target communication matrix; constructing an initial communication matrix generation model based on the fuzzy target communication matrix, and obtaining training samples to train the initial communication matrix generation model to obtain a trained communication matrix generation model; inputting a communication document to be processed into the trained communication matrix generation model to convert the communication document to be processed into a standardized communication matrix consistent with the syntax of the target communication matrix based on the trained communication matrix generation model.
[0006] According to an aspect of the embodiment of the present application, the constructing an initial communication matrix generation model based on the fuzzed target communication matrix comprises: inputting the fuzzed target communication matrix into a preset language model, the preset language model comprising an encoder and a decoder; outputting a vector value corresponding to the fuzzed target communication matrix through the encoder; determining a language feature vector of the fuzzed target communication matrix based on the vector value through the decoder.
[0007] According to an aspect of the embodiment of the present application, the constructing an initial communication matrix generation model based on the fuzzed target communication matrix comprises: inputting the fuzzed target communication matrix into a preset graph model, to determine a graph structure corresponding to the fuzzed target communication matrix based on the graph model; determining a dependency relationship between syntactic constituent elements in the fuzzed target communication matrix based on the graph structure; determining a syntactic structure feature vector corresponding to the fuzzed target communication matrix based on the dependency relationship.
[0008] According to an aspect of the embodiment of the present application, the method further comprises: determining a feature vector corresponding to the fuzzed target communication matrix based on the language feature vector and the syntactic structure feature vector; performing feature transformation based on the feature vector to obtain an output classification result, the output classification result comprising a normative text syntactic structure corresponding to the target communication matrix; constructing an initial communication matrix generation model based on the normative text syntactic structure.
[0009] According to an aspect of the embodiment of the present application, the training sample comprises a plurality of target communication matrices, and the obtaining a training sample to train the initial communication matrix generation model to obtain a trained communication matrix generation model comprises: dividing the plurality of target communication matrices into a training sample set and a test sample set; inputting the training sample set into the initial communication matrix generation model to obtain a corresponding initial prediction result; calculating a loss value between the preset initial result and the training sample set, and optimizing the initial communication matrix generation model based on the loss value to obtain the trained communication matrix generation model.
[0010] According to an aspect of the embodiment of the present application, the optimizing the initial communication matrix generation model based on the loss value comprises: if the loss value is not less than a preset loss threshold, performing reverse optimization on the initial communication matrix generation model to obtain a model parameter gradient corresponding to the communication matrix generation model; and performing parameter optimization on the model parameter gradient until the loss value is not greater than the preset loss threshold.
[0011] According to an aspect of an embodiment of the present application, the method further includes: obtaining a standardized communication matrix corresponding to the to-be-processed communication document; if one or more of key elements, including a signal name, a signal type, a message identifier, a data type, and a signal value description, are missing or incorrect in the standardized communication matrix, generating error information, and updating the trained communication matrix generation model based on the error information and correcting the incorrect standardized communication matrix.
[0012] According to an aspect of an embodiment of the present application, a communication matrix generation device is provided. The device includes: an obtaining module that obtains a target communication matrix, and performs syntax analysis on the target communication matrix to obtain a syntax analysis result, the syntax analysis result including syntax constituent elements of the target communication matrix; a fuzzification module that performs fuzzification processing on the syntax constituent elements in the target communication matrix based on the syntax analysis result to obtain a fuzzified target communication matrix; a training module that constructs an initial communication matrix generation model based on the fuzzified target communication matrix, and obtains training samples to train the initial communication matrix generation model to obtain a trained communication matrix generation model; and a conversion module that inputs a to-be-processed communication document into the trained communication matrix generation model to convert the to-be-processed communication document into a standardized communication matrix that is consistent with the syntax of the target communication matrix based on the trained communication matrix generation model.
[0013] According to an aspect of an embodiment of the present application, an electronic device is provided. The electronic device includes: one or more processors; and a storage device storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the communication matrix generation method as described above.
[0014] According to an aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor of a computer, the computer is caused to perform the communication matrix generation method as described above.
[0015] According to an aspect of an embodiment of the present application, a computer program product is also provided, which includes a computer program that, when executed by a processor, implements the steps in the communication matrix generation method as described above.
[0016] In the technical solutions provided in the embodiments of the present application, the target communication matrix is subjected to syntax analysis in an automatic manner, manual intervention is reduced, and the normalization of the target communication matrix is improved, and the target communication matrix is subjected to fuzzification processing, the generalization of the constructed initial communication matrix generation model is increased, so that the model has stronger flexibility and adaptability when processing communication documents of different formats and contents, can cope with diversified communication requirements, and further, by constructing and training the communication matrix generation model, the communication document to be processed can be converted into a standardized communication matrix consistent with the syntax of the target communication matrix, ensuring the uniformity and normalization of the document format and content, and the automatic processing reduces the error risk caused by manual operation, improving the accuracy and reliability of document processing.
[0017] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0018] The drawings incorporated into the specification and forming part of the specification, show embodiments consistent with the present application, and together with the specification, serve to explain the principles of the present application. It is obvious that the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings from these drawings without creative labor. In the drawings:
[0019] Figure 1 is a schematic diagram of an implementation environment for communication matrix generation according to an example embodiment of the present application;
[0020] Figure 2 is a flowchart of a communication matrix generation method according to an example embodiment of the present application;
[0021] Figure 3 is a flowchart of a communication matrix generation method according to another example embodiment of the present application;
[0022] Figure 4 is a schematic diagram of the structure of an encoder and a decoder in a preset language model according to an example embodiment;
[0023] Figure 5 is a flowchart of a communication matrix generation method according to another example embodiment of the present application;
[0024] Figure 6 is a flowchart of a communication matrix generation method according to another example embodiment of the present application;
[0025] Figure 7 is a flowchart of a communication matrix generation method according to another example embodiment of the present application;
[0026] Figure 8 is a flow chart of a method for generating a communication matrix according to another example embodiment of the present application;
[0027] Figure 9 is a flow chart of a method for generating a communication matrix according to another example embodiment of the present application;
[0028] Figure 10 is a flow chart of a method for generating a communication matrix according to another example embodiment of the present application;
[0029] Figure 11 is a block diagram of a device for generating a communication matrix according to an example embodiment of the present application;
[0030] Figure 12 shows a structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0031] The example embodiments will be described in detail herein with reference to the accompanying drawings. In the following description, the same numbers refer to the same or similar elements unless otherwise represented. The implementations described in the following example embodiments do not represent all implementations consistent with the present application. Instead, they only represent examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0032] The block diagrams shown in the accompanying drawings are merely functional entities, and do not necessarily correspond to physically independent entities. That is, the functional entities can be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0033] The flow charts shown in the accompanying drawings are merely illustrative, and do not necessarily include all contents and operations / steps, nor do they necessarily have to be executed in the described order. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so that the actual execution order can be changed according to actual conditions.
[0034] In the present application, "a plurality of" means two or more. The association relationship of "and / or" between associated objects indicates that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0035] First of all, it needs to be pointed out that the communication matrix is a table or data structure used to describe the communication relationship between nodes in the network. The communication matrix is usually defined by the original equipment manufacturer (OEM) or the vehicle manufacturer (for the automotive field) to clearly define how nodes (such as ECUs, sensors, actuators, etc.) in the vehicle network (or any network system) interact and share information. And the communication matrix has a detailed definition of how each node in the network communicates through messages and signals, clearly defines the ID, type, period, length of each message, and the signals contained, provides detailed definitions of the signals, including name, length, type, start and end bits, precision, offset, etc.
[0036] The main components of the communication matrix include network nodes, such as each device or controller in the network, which can be considered as a node, where a node can send multiple frame messages, each frame message becomes a message, where the message is the basic unit of transmission in the network, message attributes: message name: the name of each message, ID: the ID number of the unique identification of the message, message type: such as periodic message, event message, periodic event message, etc., message period: the period of the message, length: the length of the message in bytes. Signal attributes: signal name: usually starts with the name of the sending node, followed by the specific signal content, signal length: the length of the signal in bits, signal type: such as Boolean (true or false) or Unsigned, start byte and start bit: the position of the least significant bit (LSB) of the signal, end bit: the position of the most significant bit (MSB) of the signal, precision and offset: describe how the signal value is converted into a physical value.
[0037] In practical applications, with the rapid development of communication technology and frequent iteration of functional specifications, once the functional specifications change, the existing communication matrix needs to go through a tedious reorganization and adjustment process to ensure that it is consistent with the new specifications.
[0038] Figure 1 is a schematic diagram of the implementation environment of the generation of the standardized communication matrix in the intelligent driving process according to an exemplary embodiment of the present application. As Figure 1As shown, the server end 120 obtains a target communication matrix meeting the requirements of the normalized communication matrix, then performs syntax analysis on the target communication matrix to obtain a corresponding syntax analysis result, wherein the syntax analysis result includes the syntactic constituent elements of the target communication matrix, and then the server end 120 performs fuzzification processing on the syntactic constituent elements in the target communication matrix according to the syntax analysis result, and further obtains a fuzzified target communication matrix. Further, the server end 120 can construct an initial communication matrix generation model based on the fuzzified target communication matrix, and obtain a training sample to train the initial communication matrix generation model to obtain a trained communication matrix generation model. Then, the server end 120 can obtain a to-be-processed communication document on the intelligent terminal 110, and input the to-be-processed communication document into the trained communication matrix generation model. Thus, the to-be-processed communication document is converted into a standardized communication matrix consistent with the syntax of the target communication matrix based on the trained communication matrix generation model.
[0039] wherein, Figure 1 The intelligent terminal 110 as shown can be any terminal device existing a communication matrix, such as a smart phone, a vehicle-mounted computer, a tablet computer, a notebook computer, or a wearable device, but is not limited thereto. Figure 1 The server end 120 as shown is a server, which can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, and is not limited herein. The intelligent terminal 110 can communicate with the server 120 through a wireless network such as 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), 5G (fifth generation mobile information technology), and the like, and the present disclosure is not limited thereto.
[0040] In related technologies, the technology of automatically generating a communication matrix for a functional specification is still in a blank state, and there is a lack of mature algorithms or effective application of large-scale pre-training models. At present, this key process mainly relies on heavy manual labor, and developers need to deeply analyze complex functional specification documents, manually disassemble and extract all necessary signal elements and their associated information. This process not only requires a huge amount of work, time and effort, but also is extremely susceptible to human factors, resulting in the omission of key signals or the introduction of incorrect signals, thereby affecting the integrity and accuracy of the communication matrix.
[0041] The above-mentioned problems are generally applicable in general communication scenarios. As can be seen, without the technology of automatically generating a communication matrix based on a functional specification, a large amount of manpower and resources are consumed, and the integrity and accuracy of the communication matrix are easily affected. In order to solve these problems, embodiments of the present application respectively propose a communication matrix generation method, a communication matrix generation device, an electronic device, a computer readable storage medium and a computer program product, which will be described in detail below.
[0042] Referring to Figure 2 , Figure 2 is a flowchart of a communication matrix generation method according to an example embodiment of the present application. The method can be applied to Figure 1 the implementation environment shown in the figure and specifically executed by the server 120 in the implementation environment. It should be understood that the method can also be applied to other example implementation environments and specifically executed by devices in other implementation environments, and the present embodiment does not limit the implementation environment to which the method is applied.
[0043] As shown in Figure 2 , in an example embodiment, the communication matrix generation method at least includes steps S210 to S240, which are described in detail as follows:
[0044] Step S210, obtaining a target communication matrix and performing syntax analysis on the target communication matrix to obtain a syntax analysis result, the syntax analysis result including the grammatical constituent elements of the target communication matrix.
[0045] In order to meet the demand of generating a standardized communication matrix, high-quality functional specifications and communication matrix data can be collected and sorted, wherein the functional specification refers to the provision of standardization and standardization of each function and performance, and the communication matrix refers to a collection of signals and data exchanged between nodes (such as sensors, controllers, actuators, etc.) in a system through a network, then the signal name, signal type and description corresponding to the standardized communication matrix are determined according to the functional specification information group, then the communication matrix information is extracted, such as signal name, signal type, message identifier: 0x123, data type: 1-bit, signal value description: 0 = off, 1 = on, then the existing functional specification is aligned with the generated communication matrix to form a labeled data set. Ensure that each functional specification text segment corresponds to a complete communication matrix instance.
[0046] Further, a communication matrix instance can be selected as a target communication matrix, and then syntax analysis is performed on the target communication matrix to determine the grammatical constituents (including subject, predicate, object, etc.) corresponding to the target communication matrix through syntax analysis, and further obtain the grammatical constituent elements of the target communication matrix.
[0047] Step S220, based on the syntax analysis results, the syntax elements in the target communication matrix are fuzzified to obtain a fuzzified target communication matrix.
[0048] First, review the previous syntax analysis of the target communication matrix to identify the syntax elements, including the subject (sender), predicate (implicit communication action), object (receiver), and complement (communication quantity). Next, the fuzzification strategy needs to be determined, i.e., how to convert these elements into a fuzzified form. The fuzzification strategy can include: generalization: replacing individuals (such as names) with more general categories; order-of-magnitude division: dividing the communication quantity into different orders of magnitude (such as "small", "medium", "large"); and probabilistic: if possible, converting certain communications into probabilities or likelihoods (although this may not be applicable in the communication matrix, it can be considered in some cases). Alternatively, according to the determined fuzzification strategy, the syntax elements in the target communication matrix are fuzzified: subject (sender) fuzzification: replace the sender's name with a generalized category or symbol; object (receiver) fuzzification: similarly, replace the receiver's name with a generalized category or symbol; complement (communication quantity) fuzzification: divide the communication quantity into different orders of magnitude and replace it with the corresponding label. Finally, according to the fuzzified syntax elements, a fuzzified target communication matrix is constructed. This matrix will no longer contain the sender, receiver, and communication quantity, but will contain the fuzzified representation of these elements.
[0049] Exemplarily, the target communication matrix can be predicted by a BERT model, and then the prediction output of the BERT model is adjusted or rearranged by applying grammar rules to ensure that the generated code snippet is more reasonable and accurate in the syntax level. In the preprocessing stage, a syntax analyzer (such as a dependency syntax analyzer) can be used to parse the syntax of the input text and extract the syntactic structure features of the sentence. These features can be used as additional input information combined with the input representation of the BERT model (such as Token embeddings, Segment embeddings and Position embeddings) to be input into the model. On the basis of the BERT model, an additional layer or module can be designed to specifically process the syntactic features. Through the fine-tuning process, the model can learn how to more effectively use these syntactic features to improve the prediction results. Then, for example, through a Garph-Based parser model, the dependency relationship between words in a sentence is analyzed, a dependency tree is generated, and the relationship between words is represented in the form of a graph. Based on a simple time sequence model called Long Short-Term Memory (LSTM), each word is labeled and classified (for example: function, signal, data type, value range, etc.), and then the syntax analysis result of the target communication matrix is obtained. Then, based on the syntax analysis result, the syntax constituent elements in the target communication matrix are fuzzed, and then the fuzzed target communication matrix is obtained.
[0050] In step S230, an initial communication matrix generation model is constructed based on the fuzzed target communication matrix, training samples are obtained, the initial communication matrix generation model is trained, and a trained communication matrix generation model is obtained.
[0051] Exemplarily, a suitable generative model is selected according to the specific nature of the problem and the characteristics of the data. Possible models include but are not limited to Markov chains, Bayesian networks, neural networks (such as generative adversarial networks GAN, variational autoencoder VAE), etc. The architecture of the model is designed, including the input layer, hidden layer and output layer, and the parameters and hyperparameters of the model are determined, such as the number of layers, the number of nodes, the activation function of the neural network, etc. Similar communication matrix data is collected from multiple sources to ensure the diversity and representativeness of the data. These data should be preprocessed to match the format of the fuzzed target communication matrix. The collected data is cleaned and formatted to meet the input requirements of the model. If the data is specific (i.e. not fuzzed), it needs to be converted into a fuzzed form to match the fuzzed target communication matrix. According to the specific nature of the problem, a suitable loss function is selected to evaluate the difference between the communication matrix generated by the model and the real (or fuzzed) communication matrix. Possible loss functions include mean square error (MSE), cross-entropy loss, etc. A suitable optimization algorithm (such as gradient descent, Adam, etc.) is selected to update the parameters of the model. The training set data is used to train the model, and the parameters of the model are updated iteratively to minimize the loss function. During the training process, the validation set can be used to monitor the performance of the model, and early stopping can be performed to avoid overfitting. After training, a model is obtained that can generate a communication matrix similar to the fuzzed target communication matrix. This model can be used to generate new communication matrices, or to analyze communication patterns, predict future communication trends, etc.
[0052] In step S240, the communication document to be processed is input into the trained communication matrix generation model to convert the communication document to be processed into a standardized communication matrix consistent with the syntax of the target communication matrix based on the trained communication matrix generation model.
[0053] The document is cleaned to remove irrelevant information. Convert the document to plain text format if they are in other formats (such as PDF, HTML). Perform natural language processing steps such as tokenization, stop word removal, etc. on the text. Use regular expressions or natural language processing techniques to identify the sender and recipient in the document. Map them to a format that the trained communication matrix generation model can understand (such as category labels or unique identifiers). Then, output the signal name, signal type, message identifier: 0x123, data type: 1-bit, signal value description, etc. in the processed document through the trained communication matrix generation model, and output them in the same format as the target communication matrix.
[0054] For example, the communication document to be processed is taken as a word document, which is input into the trained communication matrix generation model. Then, the function specification can be extracted from the word document based on the trained communication matrix generation model and converted into a format suitable for model processing. Specifically, the function board block title and chapter in the word document are first identified. Second, the content in the word document is read using a text extraction tool or library (such as the python-docx library in Python), and the table data in each function board block is extracted, including signal name, signal type, signal value range, etc. As shown in Table 1, Table 1 is an example of the communication matrix output by the model according to an example embodiment of the present application:
[0055]
[0056] Table 1
[0057] In this embodiment, the target communication matrix is analyzed in an automated manner, reducing manual intervention and improving the standardization of the target communication matrix. In addition, the target communication matrix is fuzzed to increase the generalization of the initial communication matrix generation model, making the model more flexible and adaptable when processing communication documents of different formats and contents, and being able to cope with diversified communication needs. Furthermore, by constructing and training the communication matrix generation model, the communication document to be processed can be converted into a standardized communication matrix consistent with the syntax of the target communication matrix, ensuring the uniformity and standardization of the document format and content. In addition, the automated processing reduces the error risk caused by manual operation, improves the accuracy and reliability of document processing.
[0058] Further, based on the above embodiments, please refer to Figure 3 In one of the example embodiments provided in the present application, the specific implementation process of constructing the initial communication matrix generation model based on the fuzzed target communication matrix can further include steps S310 to S330, which are described in detail as follows:
[0059] Step S310, input the fuzzed target communication matrix into a preset language model, and the preset language model includes an encoder and a decoder.
[0060] The model framework of the preset language model includes multiple sub-models. For example, features extracted by multiple models can be combined, or corresponding model output results are obtained according to different weights. For example, in this embodiment, a classical Encoder-Decoder model (the Encoder-Decoder model is composed of two main components: an encoder (Encoder) and a decoder (Decoder)) type, that is, a commonly used model of a sequence generation task model architecture (Sequence-to-Sequence Seq2Seq), is used. In the process of constructing a functional specification communication matrix, the standard input and output format is that a single functional specification use case corresponds to a single communication matrix use case. Specifically, the Encoder-Decoder type,
[0061] As Figure 4 shown, Figure 4 is a structural diagram of a preset language model according to an exemplary embodiment of the present application. For the Encoder part, there is a line connection between each block (the line connection represents that the value is transmitted through the weighting method), the input can see the whole, and then the last layer of the Decoder outputs to the Decoder. The Decoder can only see the directly connected part because of the output method, and cannot see the whole. This framework has been widely proven to be useful in the industry. Here, the input of the Decoder is the use case of the functional specification, and the output of the Decoder is the result of the communication matrix.
[0062] In step S320, the vector value corresponding to the fuzzed target communication matrix is output by the encoder.
[0063] In step S330, the language feature vector of the fuzzed target communication matrix is determined based on the vector value by the decoder.
[0064] For example, in order to extract meaningful language features from the fuzzed target communication matrix, it is input into a preset language model. This language model is composed of two main parts: an encoder and a decoder. First, through the action of the encoder, the fuzzed target communication matrix is converted into a corresponding vector value. This vector value is an intermediate representation form of the input data, which captures the key features of the input data, but presents them in a more easily processed way by the model. Then, the decoder receives this vector value as input and determines the language feature vector of the fuzzed target communication matrix based on the vector value.
[0065] For example, after receiving the fuzzed target communication matrix, the encoder converts it into a vector value. This vector value is a point in a high-dimensional space that captures the key features of the input matrix. The internal mechanism of the encoder can include multiple layers of neural networks, convolutional layers, pooling layers, etc., to extract and convert the features of the input data. Next, the decoder receives the vector value output by the encoder and determines the language feature vector of the fuzzed target communication matrix based on this vector value. The task of the decoder is to extract information from this vector that can express the language features of the input matrix. This can include the distribution of connection strengths, the similarity of communication patterns, the correlation between devices, etc. To achieve this goal, the decoder can contain some specific neural network layers, such as fully connected layers, attention mechanism layers, etc., to analyze and process the input vector and output a vector with language feature meaning.
[0066] In this embodiment, by fuzzing the communication matrix and inputting it into the language model, the data form that may be complex and difficult to handle directly can be converted into a language feature vector that is easier to understand and operate. Since the language model has strong generalization ability in processing natural language data, it can also extend this ability to the task of processing the fuzzed target communication matrix, which means that even in the face of new, unseen communication matrices, the model can output reasonable language feature vectors, thereby maintaining high performance.
[0067] Further, based on the above embodiments, please refer to Figure 5 In one of the example embodiments provided in the present application, the specific implementation process of constructing the initial communication matrix generation model based on the fuzzed target communication matrix can further include steps S510 to S530, which are described in detail as follows:
[0068] Step S510, input the fuzzed target communication matrix into a preset graph network model to determine the graph network structure corresponding to the fuzzed target communication matrix based on the graph network model;
[0069] Step S520, determine the dependency relationship between the syntactic constituent elements in the fuzzed target communication matrix based on the graph network structure;
[0070] Step S530, determine the syntactic structure feature vector corresponding to the fuzzed target communication matrix based on the dependency relationship.
[0071] In a communication network, a target communication matrix typically represents the connection relationships between nodes, such as communication devices. A fuzzified target communication matrix is the result of fuzzifying such connection relationships. The present embodiment aims to convert the fuzzified target communication matrix into a graph network structure through a pre-set graph network model, and further analyze the dependency relationships between the syntactic constituent elements in the graph network structure, to ultimately determine its syntactic structure feature vector. The pre-set graph network model is a tool for representing and analyzing complex network structures. It typically includes nodes, edges, and related attribute information. In the present embodiment, a model based on graph theory and graph neural networks (GNN) is used as the pre-set graph network model. This model can handle fuzzified connection relationships and extract useful network structure information.
[0072] As an example, the fuzzified target communication matrix is provided as input data to the pre-set graph network model. Each element in the matrix represents the fuzzified connection strength or relationship between two nodes. According to the number of rows and columns of the fuzzified target communication matrix, the number of nodes in the graph network model is determined. Each node is assigned a unique identifier and its attribute information is initialized. Each element in the fuzzified target communication matrix is traversed, and the connection relationship between nodes is determined according to its value. For each non-zero element, the corresponding two nodes are connected by an edge, and the weight of the edge is set to the value of the element. If the elements in the matrix represent fuzzified connection strengths, the weights of the edges can reflect the fuzziness of such strengths. According to the edges in the graph network structure, the direct connection relationships between nodes are determined. Further analysis of indirect connection relationships between nodes, such as through the transit connection of other nodes, etc. The relative importance between edges is determined considering the weights and directions of the edges (if any). The connection patterns between edges are analyzed, such as whether there are ring, chain, etc. structures. Statistical features such as the number of nodes, the number of edges, the average node degree, the average edge weight, etc. are extracted from the graph network structure. The connection patterns, the number of rings, the length of chains, etc. structural features in the dependency graph are analyzed. The extracted features are arranged in a certain order to form a feature vector. This feature vector can reflect the syntactic structure features of the fuzzified target communication matrix.
[0073] In the present embodiment, by converting the fuzzified target communication matrix into a graph network structure, the relationships between data elements can be intuitively displayed, making the complex communication matrix structure easy to understand and analyze. The syntactic structure feature vector based on the graph network structure can optimize the communication and data processing flow, and improve the efficiency of data transmission and processing.
[0074] Further, based on the above embodiments, please refer to Figure 6 In one of the example embodiments provided in the present application, the specific implementation process of the communication matrix generation method can further include steps S610 to S630, which are described in detail as follows:
[0075] Step S610, determine the feature vector corresponding to the fuzzification target communication matrix based on the language feature vector and the syntax structure feature vector.
[0076] In the above embodiment, the language feature vector output by the preset language model and the syntax structure feature vector output by the preset graph model can be combined, and each feature vector can be assigned a weight ratio to achieve the best generalization ability according to different scenarios.
[0077] For example, a combination mechanism is designed to combine the language feature vector and the syntax structure feature vector into a unified feature representation. This can be achieved by simple concatenation, weighted summation or more complex attention mechanisms. Assign a weight ratio to each feature vector, which can be adjusted according to task requirements, data characteristics or experimental results. The weight can be automatically optimized by learning algorithm during training process, or can be determined by manual parameter adjustment. The combined feature vector is input into the downstream task model (such as classifier, generator, etc.). Use appropriate loss function and optimization algorithm to train the whole system to ensure that the model can accurately complete the target task. During the training process, the weight ratio can be adjusted by cross-validation and other methods to find the best configuration.
[0078] Step S620, perform feature transformation based on the feature vector to obtain an output classification result, and the output classification result includes a standard text syntax structure corresponding to the target communication matrix.
[0079] Step S630, construct an initial communication matrix generation model based on the standard text syntax structure.
[0080] At this stage, the feature vectors extracted from the language model and the graph model are used. These feature vectors may contain rich semantic information, syntactic structure information, and interaction information between the two. By applying specific transformation methods (such as linear transformation, nonlinear transformation, deep learning network, etc.), these feature vectors are converted into a form more suitable for classification tasks. After feature transformation, the transformed feature vectors are classified by a classifier (such as support vector machine, random forest, neural network, etc.). The goal of classification is to determine the standard text syntax structure corresponding to the target communication matrix. This usually means predicting or identifying the structure type of sentences, phrase type, dependency relationship, etc. in the text. The classification result may be one or more labels, which represent different syntax structure types. Once the standard text syntax structure corresponding to the target communication matrix is obtained, these structure information can be used to guide the generation of the communication matrix. The standard text syntax structure provides rules about how sentences are constructed and how information is organized, which can be mapped to connection patterns and relationship strengths in the communication matrix.
[0081] Exemplarily, a relatively simple multi-layer perceptron (MLP) block can be defined, in which each layer in the MLP is a fully connected layer, i.e., each neuron in each layer is connected to all neurons in the next layer. This connection enables the MLP to capture complex features in the data. The merged embedding vectors can then be transformed and non-linearly mapped by the MLP block to output classification results. The output includes five aspects: signal name, signal type, message identifier, data type, and signal value description. These five aspects form a basic example in the communication matrix as shown in Table 2:
[0082]
[0083] Table 2
[0084] In this embodiment, since the feature vectors contain language features and syntactic structure features, the model constructed based on these features can better adapt to different communication matrices and data sets. This enhances the generalization ability of the model, enabling it to handle more diverse communication scenarios and data. By converting the fuzzified target communication matrix into feature vectors and performing feature transformation and classification based on these feature vectors, more standardized and normalized text syntax structures can be obtained, which helps to improve the accuracy and readability of the communication matrix and reduce misunderstandings and ambiguities.
[0085] Further, based on the above embodiments, please refer to Figure 7 In one of the exemplary embodiments provided in the present application, the training samples include multiple target communication matrices, and the specific implementation process of training the initial communication matrix generation model based on the training samples to obtain the trained communication matrix generation model can further include steps S710 to S730, which are described in detail as follows:
[0086] Step S710, divide the multiple target communication matrices into a training sample set and a test sample set;
[0087] Step S720, input the training sample set into the initial communication matrix generation model to obtain the corresponding initial prediction result;
[0088] Step S730, calculate the loss value between the preset initial result and the training sample set, and optimize the initial communication matrix generation model based on the loss value to obtain the trained communication matrix generation model.
[0089] For example, a plurality of target communication matrices are collected, which can represent communication data under different network topologies, communication protocols or transmission conditions. The collected communication matrices are preprocessed, such as removing noise, normalization or standardization, etc., to ensure data quality. The processed communication matrix dataset is divided into a training sample set and a test sample set. Generally, the training sample set is used to train the model, and the test sample set is used to evaluate the performance of the model. The division ratio can be determined according to the specific situation, such as 70% for training and 30% for testing. An initial communication matrix generation model is selected or constructed. This model can be based on a neural network (such as a deep neural network, a convolutional neural network, etc.), or other types of machine learning models. The model generates an initial prediction result according to the input training sample.
[0090] The loss value between the prediction result and the training sample set is calculated. The loss value is an indicator to measure the performance of the model prediction, and the commonly used loss functions include mean square error (MSE), cross entropy, etc. Based on the calculated loss value, an optimization algorithm (such as gradient descent, Adam, etc.) is used to update the parameters of the model to reduce the loss value. Repeat this process until the preset training stopping condition is reached (such as loss value convergence, maximum iteration number reached, etc.).
[0091] In this embodiment, by dividing the target communication matrix into a training sample set and a test sample set, it can be ensured that the model also performs well on unseen data. The training sample set is used for training and learning of the model, and the test sample set is used to evaluate the generalization ability of the model. By calculating the loss value between the preset initial result (which may be a prediction result based on some prior knowledge or a simple model) and the training sample set, the difference between the model prediction and the actual result can be quantified. Based on this loss value, the parameters of the model can be continuously adjusted through optimization methods such as backpropagation algorithm, so as to reduce the loss value and improve the prediction accuracy of the model.
[0092] Further, based on the above embodiment, please refer to Figure 8 In one of the example embodiments provided in the present application, the specific implementation process of optimizing the initial communication matrix generation model based on the loss value can further include steps S810 and S820, which are described in detail as follows:
[0093] Step S810, if the loss value is not less than the preset loss threshold, the initial communication matrix generation model is optimized in reverse to obtain the model parameter gradient corresponding to the communication matrix generation model;
[0094] Step S820, the model parameter gradient is optimized until the loss value is not greater than the preset loss threshold.
[0095] In the training process, the initial communication matrix generation model is used to make predictions on the training sample set, and the loss value between the predicted results and the true results is calculated. The calculated loss value is compared with the preset loss threshold. If the loss value is not less than the preset loss threshold, it means that the prediction performance of the current model has not reached the expected level, and further optimization is needed. When the loss value does not meet the condition, the backpropagation process is started. Backpropagation is a method of updating model parameters by calculating the gradient of the loss function with respect to the model parameters. In the backpropagation process, starting from the output layer, the gradient of the loss function with respect to the parameters of each layer is calculated layer by layer. According to the result of backpropagation, the gradient of each parameter of the communication matrix generation model is obtained. These gradients represent the sensitivity of the loss function with respect to the model parameters, i.e. the influence of parameter changes on the loss value. Gradient descent or its optimization algorithms such as stochastic gradient descent (SGD), Adam, etc. are used to update the model parameters. According to the calculated gradient, the model parameters are adjusted according to the preset learning rate (Learning Rate) to reduce the loss value. Repeat steps one and two, i.e. calculate the loss value, perform backpropagation and parameter update, until the loss value is less than or equal to the preset loss threshold. In the iteration process, the change of the loss value and the performance of the model on the validation set can be monitored to ensure that the model does not overfit or underfit.
[0096] In this embodiment, during the reverse optimization process, the learning rate and other hyperparameters can be adaptively adjusted according to the change of the loss value, which helps to ensure that the model always maintains stable performance improvement during the training process and improves the performance and training efficiency of the model.
[0097] Further, based on the above embodiments, please refer to Figure 9 In one of the example embodiments provided in the present application, the specific implementation process of the communication matrix generation method can further include steps S910 and S920, which are described in detail as follows:
[0098] Step S910, obtaining the standardized communication matrix corresponding to the to-be-processed communication document;
[0099] Step S920, if the key elements in the standardized communication matrix are missing or incorrect, the key elements including one or more of signal name, signal type, message identifier, data type and signal value description, generating error information, and updating the trained communication matrix generation model based on the error information and correcting the error standardized communication matrix.
[0100] A comprehensive check is performed on the generated standardized communication matrix to ensure that all key elements are complete and correct. These key elements are indispensable in the communication process, and any missing or incorrect elements can lead to communication failure or data parsing errors. If missing or incorrect key elements are found in the standardized communication matrix during the check, an error message is immediately generated. The error message should specify the specific elements that are missing or incorrect and the possible consequences. Based on the generated error message, the trained communication matrix generation model is updated. This may include adjusting model parameters, optimizing model structure, or adding additional data preprocessing steps. The purpose of updating the model is to improve the model's ability to parse communication documents and accuracy, reducing the likelihood of similar errors in the future. For the standardized communication matrix that has been found to have errors, it needs to be corrected. This can be done manually or through the development of automated correction tools. During the correction process, all missing or incorrect key elements need to be correctly supplemented or corrected to ensure the integrity and accuracy of the communication matrix.
[0101] For example, as shown in Table 3 below, the generated communication matrix can be detected and optimized to ensure data accuracy and consistency.
[0102]
[0103]
[0104] Table 3
[0105] In this embodiment, by checking the key elements in the standardized communication matrix (such as signal name, signal type, message identifier, data type, and signal value description, etc.), the completeness of the data in the communication document can be ensured, avoiding communication failure or misinterpretation due to data loss. Based on the error message, the trained communication matrix generation model is updated, which can make the model better identify and correct similar errors in subsequent processing, thereby improving the model's self-repairing ability and adaptability.
[0106] Figure 10is a brief flow diagram of the communication matrix generation in an exemplary application scenario. In the application scenario shown in 10, the target communication matrix is obtained, and the target communication matrix is subjected to syntactic analysis to obtain a syntactic analysis result, the syntactic analysis result including the grammatical constituent elements of the target communication matrix; the grammatical constituent elements in the target communication matrix are subjected to fuzzification processing based on the syntactic analysis result to obtain a fuzzified target communication matrix; the fuzzified target communication matrix is input into a preset language model, the preset language model including an encoder and a decoder; the vector value corresponding to the fuzzified target communication matrix is output by the encoder; the language feature vector of the fuzzified target communication matrix is determined by the decoder based on the vector value. The fuzzified target communication matrix is input into a preset graph network model to determine the graph network structure corresponding to the fuzzified target communication matrix based on the graph network model; the dependency relationship between the grammatical constituent elements in the fuzzified target communication matrix is determined based on the graph network structure; the grammatical structure feature vector corresponding to the fuzzified target communication matrix is determined based on the dependency relationship. The feature vector corresponding to the fuzzified target communication matrix is determined based on the language feature vector and the grammatical structure feature vector; the output classification result is obtained by feature transformation based on the feature vector, the output classification result including the normative text grammatical structure corresponding to the target communication matrix; the initial communication matrix generation model is constructed based on the normative text grammatical structure. The communication document to be processed is input into the trained communication matrix generation model to convert the communication document to be processed into the standardized communication matrix consistent with the syntax of the target communication matrix based on the trained communication matrix generation model. For detailed implementation process, please refer to the description in the foregoing embodiments, which will not be repeated here.
[0107] Figure 11 is a block diagram of a communication matrix generation device according to an exemplary embodiment of the present application. The device can be applied to the implementation environment shown in Figure 1 and is specifically configured in the server end 120. The device can also be applied to other exemplary implementation environments and is specifically configured in other devices, and the implementation environment to which the device is applied is not limited in the present embodiment.
[0108] As shown in Figure 11As shown, the example communication matrix generation apparatus includes: an acquisition module 1110, which acquires a target communication matrix and performs syntax analysis on the target communication matrix to obtain a syntax analysis result, the syntax analysis result including syntactic constituent elements of the target communication matrix; a fuzzification module 1120, which performs fuzzification processing on the syntactic constituent elements in the target communication matrix based on the syntax analysis result to obtain a fuzzified target communication matrix; a training module 1130, which constructs an initial communication matrix generation model based on the fuzzified target communication matrix, and acquires training samples to train the initial communication matrix generation model to obtain a trained communication matrix generation model; and a conversion module 1140, which inputs a to-be-processed communication document into the trained communication matrix generation model to convert the to-be-processed communication document into a standardized communication matrix consistent with the syntax of the target communication matrix based on the trained communication matrix generation model.
[0109] According to an aspect of an embodiment of the present application, the fuzzification module 1120 further includes: inputting the fuzzified target communication matrix into a preset language model, the preset language model including an encoder and a decoder; outputting a vector value corresponding to the fuzzified target communication matrix through the encoder; and determining a language feature vector of the fuzzified target communication matrix based on the vector value through the decoder.
[0110] According to an aspect of an embodiment of the present application, the fuzzification module 1120 further includes: inputting the fuzzified target communication matrix into a preset graph model to determine a graph structure corresponding to the fuzzified target communication matrix based on the graph model; determining a dependency relationship between the syntactic constituent elements in the fuzzified target communication matrix based on the graph structure; and determining a syntactic structure feature vector corresponding to the fuzzified target communication matrix based on the dependency relationship.
[0111] According to an aspect of an embodiment of the present application, the training module 1130 further includes: determining a feature vector corresponding to the fuzzified target communication matrix based on the language feature vector and the syntactic structure feature vector; performing feature transformation based on the feature vector to obtain an output classification result, the output classification result including a standard text syntax structure corresponding to the target communication matrix; and constructing the initial communication matrix generation model based on the standard text syntax structure.
[0112] According to an aspect of an embodiment of the present application, the training module 1130 further includes: dividing a plurality of target communication matrices into a training sample set and a test sample set; inputting the training sample set into the initial communication matrix generation model to obtain a corresponding initial prediction result; calculating a loss value between a preset initial result and the training sample set, and optimizing the initial communication matrix generation model based on the loss value to obtain the trained communication matrix generation model.
[0113] According to an aspect of the embodiments of the present application, the training module 1130 further includes: if the loss value is not less than the preset loss threshold, performing back optimization on the initial communication matrix generation model to obtain a model parameter gradient corresponding to the communication matrix generation model; and performing parameter optimization on the model parameter gradient until the loss value is not greater than the preset loss threshold.
[0114] According to an aspect of the embodiments of the present application, the communication matrix generation device further includes: an error reporting module configured to obtain a standardized communication matrix corresponding to the to-be-processed communication document; if one or more of key elements in the standardized communication matrix are missing or incorrect, the key elements including one or more of a signal name, a signal type, a message identifier, a data type, and a signal value description, the error reporting module is configured to generate error information, and update the trained communication matrix generation model based on the error information and correct the incorrect standardized communication matrix.
[0115] It should be noted that the communication matrix generation device provided by the above embodiments and the communication matrix generation method provided by the above embodiments belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the method embodiments, which will not be described here. The communication matrix generation device provided by the above embodiments can be used in actual applications, and the above functions can be completed by different functional modules according to needs, i.e., the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, and this is not limited herein.
[0116] The embodiments of the present application also provide an electronic device, including: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the communication matrix generation method provided in each of the above embodiments.
[0117] Figure 12 The structure of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. It should be noted that, Figure 12 The computer system 1200 of the electronic device shown is only an example, and should not limit the functions and use range of the embodiments of the present application.
[0118] As Figure 12As shown, the computer system 1200 includes a central processing unit (CPU) 1201 which can execute various appropriate actions and processes in accordance with programs stored in a read-only memory (ROM) 1202 or loaded from the storage section 1208 into a random access memory (RAM) 1203, such as executing the methods in the above-described embodiments. Various programs and data required for system operation are also stored in the RAM 1203. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0119] Connected to the I / O interface 1205 are an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as necessary. A removable recording medium 1211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1210 as necessary, so that a computer program read therefrom is installed into the storage section 1208 as necessary.
[0120] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable recording medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, various functions defined in the systems of the present application are executed.
[0121] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example, be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, in which the computer-readable computer program is carried. Such a propagated data signal can take on various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit the program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.
[0122] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present application. In the flowcharts or block diagrams, each block can represent a module, a program segment, or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than those noted in the drawings. For example, two blocks represented in succession can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0123] The units described in the embodiments of the present application can be implemented in the form of software, or can be implemented in the form of hardware, and the described units can also be arranged in a processor. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0124] Another aspect of the present application also provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the communication matrix generation method as described above. The computer readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately and not be assembled into the electronic device.
[0125] Another aspect of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the communication matrix generation method provided in each of the above embodiments.
[0126] The above description is merely preferred exemplary embodiments of the present application, and is not intended to limit the implementation of the present application. Those skilled in the art can easily make corresponding modifications or changes according to the main concept and spirit of the present application, and the protection scope of the present application should be subject to the protection scope required by the claims.
Claims
1. A communication matrix generation method, characterized in that: include: Acquire a target communication matrix, and perform syntactic analysis on the target communication matrix to obtain a syntactic analysis result, wherein the syntactic analysis result includes grammatical constituent elements of the target communication matrix; Performing fuzzification processing on the grammatical elements in the target communication matrix based on the syntactic analysis result to obtain a fuzzy target communication matrix; Inputting the fuzzy target communication matrix into a preset language model and a preset graph network model to construct an initial communication matrix generation model, determining the language feature vector of the fuzzy target communication matrix through the preset language model, and determining the grammatical structure feature vector corresponding to the fuzzy target communication matrix through the preset graph network model; Acquire training samples to train the initial communication matrix generation model to obtain a trained communication matrix generation model; The communication document to be processed is input into the trained communication matrix generation model, so as to convert the communication document to be processed into a standardized communication matrix consistent with the syntax of the target communication matrix based on the trained communication matrix generation model.
2. The method according to claim 1, wherein The preset language model includes an encoder and a decoder; and determining the language feature vector of the fuzzified target communication matrix by using the preset language model includes: Outputting the vector value corresponding to the fuzzy target communication matrix through the encoder; A linguistic feature vector of the fuzzified target communication matrix is determined by the decoder based on the vector value.
3. The method according to claim 1, wherein The determining of the grammatical structure feature vector corresponding to the fuzzy target communication matrix by the preset graph network model includes: Determine the graph network structure corresponding to the fuzzy target communication matrix based on the graph network model; Determining dependencies between grammatical elements in the fuzzified target communication matrix based on the graph network structure; A grammatical structure feature vector corresponding to the fuzzified target communication matrix is determined based on the dependency relationship.
4. The method according to any one of claims 1 to 3, wherein The method further comprises: Determining a eigenvector corresponding to the fuzzified target communication matrix based on the language eigenvector and the grammatical structure eigenvector; Performing feature transformation based on the feature vector to obtain an output classification result, wherein the output classification result includes a normative text grammatical structure corresponding to the target communication matrix; An initial communication matrix generation model is constructed based on the normative text grammatical structure.
5. The method according to claim 1, wherein The training samples include a plurality of target communication matrices, and the acquiring of the training samples to train the initial communication matrix generation model to obtain a trained communication matrix generation model includes: Dividing multiple target communication matrices into a training sample set and a test sample set; Inputting the training sample set into the initial communication matrix generation model to obtain a corresponding initial prediction result; A loss value between a preset initial result and the training sample set is calculated, and the initial communication matrix generation model is optimized based on the loss value to obtain a trained communication matrix generation model.
6. The method according to claim 5, wherein Optimizing the initial communication matrix generation model based on the loss value includes: If the loss value is not less than a preset loss threshold, reversely optimizing the initial communication matrix generation model to obtain a model parameter gradient corresponding to the communication matrix generation model; Parameter optimization is performed on the model parameter gradient until the loss value is no greater than the preset loss threshold.
7. The method according to claim 1, wherein The method further comprises: Obtaining a standardized communication matrix corresponding to the communication document to be processed; If key elements in the standardized communication matrix are missing or incorrect, and the key elements include one or more of the signal name, signal type, message identifier, data type, and signal value description, an error message is generated to update the trained communication matrix generation model based on the error message and correct the erroneous standardized communication matrix.
8. A communication matrix generating device, characterized in that: The device comprises: An acquisition module acquires a target communication matrix and performs syntactic analysis on the target communication matrix to obtain a syntactic analysis result, wherein the syntactic analysis result includes grammatical constituent elements of the target communication matrix; a fuzzification module, which performs fuzzification processing on the grammatical elements in the target communication matrix based on the syntactic analysis result to obtain a fuzzy target communication matrix; A training module, which inputs the fuzzy target communication matrix into a preset language model and a preset graph network model to construct an initial communication matrix generation model, determines the language feature vector of the fuzzy target communication matrix through the preset language model, and determines the grammatical structure feature vector corresponding to the fuzzy target communication matrix through the preset graph network model; Acquire training samples to train the initial communication matrix generation model to obtain a trained communication matrix generation model; The conversion module inputs the communication document to be processed into the trained communication matrix generation model to convert the communication document to be processed into a standardized communication matrix consistent with the target communication matrix syntax based on the trained communication matrix generation model.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the communication matrix generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the communication matrix generation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Specific target sentiment analysis method and device based on multilevel semantic coding
CN115221321A
Text fine-grained sentiment analysis system based on dependency syntax enhancement
CN118821788A