Structured dynamic semantic reconstruction method and device and storage medium

By adopting a structured dynamic semantic reconstruction method in human-computer dynamic interaction, combining Transformer encoder and decoder for syntax dependency analysis and semantic reconstruction, the problem of semantic understanding deviation in human-computer interaction is solved, the dependence on manual annotation and hardware materials is reduced, and the efficiency and scalability of the system are improved.

CN119669395AActive Publication Date: 2025-03-21CHONGQING JUEXIAO TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411477828.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-03-21
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

In the dynamic interaction of human-computer, the semantic understanding deviation of the algorithm model is caused by the existence of reference and omission. The prior art relies on high-quality manual annotation and hardware materials, which is cost-effective and poorly scalable.

Method used

The structured dynamic semantic reconstruction method is adopted, and the semantic structure encoding module, encoding enhancement representation module and semantic content decoder are combined with the pre-trained Transformer encoder and decoder to perform syntax dependency analysis and semantic reconstruction to reduce dependence on manual annotation and hardware materials.

Benefits of technology

It effectively solves the problem of semantic understanding deviation in human-computer interaction, improves the ability to understand complex syntactic structures, and reduces the cost and complexity of algorithm model training and deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669395A_ABST
    Figure CN119669395A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a structured dynamic semantic reconstruction method and device and a medium. The method comprises the steps of obtaining to-be-processed data in a dynamic dialogue reconstruction process; and inputting the speech information into a pre-trained dynamic semantic reconstruction model, and outputting a semantic reconstruction result of the speech information of the current last person. According to the method, syntactic dependency analysis is carried out on the sentences, and the sentences are fused into the word coding module, the position coding module and the like of the model, so that the understanding ability of the model on the sentences with complex syntactic structures is enhanced, and the sentences can be correctly and smoothly reconstructed; the problem of semantic understanding deviation of an algorithm model caused by anaphora and omission phenomena in man-machine dynamic interaction is solved; meanwhile, a large amount of manual annotation work is not needed, training can be achieved only through dialogue data, dependence on high-quality manual annotation data in the algorithm model training process is reduced, and dependence on hardware materials needed by algorithm model deployment is also reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence question answering technology, and in particular to a structured dynamic semantic reconstruction method, device and storage medium. Background Art

[0002] Dynamic dialogue semantic reconstruction is a method designed to solve the semantic understanding bias problem in actual human-computer interaction using artificial intelligence methods. The semantic understanding bias problem in human-computer interaction usually occurs in the dialogue process between humans and algorithm models. In daily conversations, since the human brain records the historical information of the conversation, in order to reduce redundant content, human speech usually involves reference and omission. Reference refers to the use of demonstrative pronouns to refer to a fixed or abstract concept, such as A: I like to watch "Chinese Paladin III". B: I also like to watch this. The "this" here refers to "Chinese Paladin III" that appeared above. Omission refers to simplifying the content of the reply without affecting understanding. It is a special reference phenomenon, also known as zero reference, for example, A: I like to watch "Chinese Paladin III". B: Me too. Obviously, what B means is that I also like "Chinese Paladin III".

[0003] The human brain has memory and can reconstruct important information in the conversation history very well. However, in the algorithm model, in order to accurately understand the user's semantics, the user is usually required to provide complete and detailed information, which is very different from human behavior. Therefore, it is particularly important to achieve semantic reconstruction of dynamic conversations through artificial intelligence algorithm models.

[0004] The existing technology and its characteristics are as follows:

[0005] Prior art 1: Intelligent customer service technology based on conversation status tracking.

[0006] This technology is commonly used in various applications, such as ordering meals, booking tickets, checking the weather, logistics inquiries, and product consultations. First, the user's true intention is detected based on the intent recognition algorithm, such as booking a ticket. Secondly, the key information of the service process is improved through the slot filling method. For example, booking a ticket requires knowing the departure point, destination, and departure time. Finally, using the dialogue state tracking management, the slots are filled in multiple cycles to provide semantically clear user needs for subsequent tasks. However, this method has a complex process and poor flexibility. It requires a large number of slot templates to be prefabricated in advance. When the application scenario becomes complex, the number of slot templates increases accordingly, and it gradually becomes redundant and complex, making it difficult to maintain.

[0007] Prior art 2: Sequence labeling algorithm based on deep learning.

[0008] In the field of natural language processing, there is a task called sequence labeling, which extracts key information by labeling text with fixed labels. In the example of "A: I like "Chinese Paladin III". B: I like it too", "Chinese Paladin III" will be labeled as a specific label. By splicing multiple similar key specific fragments, semantics is perfected. The disadvantages of this method are that first, a large amount of manual labeling is required to train the algorithm model. Secondly, it lacks flexibility. When the application scenario changes, the manual labeling task needs to be repeated, which has poor scalability and high cost. Finally, through the splicing strategy, the semantics obtained are prone to incoherence.

[0009] Prior art three: Methods based on modern large models.

[0010] With the improvement of the capabilities of large models such as Tongyi Qianwen and Zhipu Qingyan, a large number of research works use large models to improve semantics. This type of method has good results, is easy to expand, and can dynamically understand the semantic information of the context. However, the disadvantages are also obvious: first, the method based on large models relies on high-quality prompt word templates. Secondly, the reasoning speed of large models is slow. Semantic improvement is usually a link in the dialogue process. Frequent dialogues lead to multiple calls to large models. Finally, the effect of large models is closely related to their own huge number of parameters. High-quality hardware materials are also a major problem that needs to be solved when deploying large models.

[0011] The above methods have their own advantages and disadvantages in solving practical problems. In reality, high-quality manual annotation and high-quality hardware materials are difficult to obtain and costly. Summary of the invention

[0012] The purpose of the embodiments of the present invention is to provide a structured dynamic semantic reconstruction method, device and storage medium to solve the problem of semantic understanding deviation of the algorithm model caused by reference and omission in dynamic human-computer interaction; at the same time, the present invention can also reduce the high-quality manually labeled data for algorithm model training, and reduce the dependence on hardware materials required for algorithm model deployment.

[0013] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a structured dynamic semantic reconstruction method, comprising:

[0014] In the process of dynamic dialogue reconstruction, data to be processed is obtained; the data to be processed includes historical dialogue information and the speech information of the last person at present;

[0015] Input the data to be processed into a pre-trained dynamic semantic reconstruction model for processing, and output the result of semantic reconstruction of the speech information of the last person at the moment;

[0016] Wherein, the dynamic semantic reconstruction model includes:

[0017] The semantic structure encoding module is used to perform syntactic dependency analysis on the input text, identify the dependency relationship between the components within the sentence, and convert the dependency relationship into a vector representation;

[0018] The Encoding Enhanced Representation Module, based on a pre-trained Transformer encoder structure, is used to:

[0019] Encode the semantic results processed by the semantic structure encoding module through the attention mechanism and the improved position information encoding technology, and use syntactic clues to help the dynamic semantic structure model interpret the user's intention; and

[0020] The semantic content decoder is based on a pre-trained Transformer decoder structure and is used to decode the encoding result processed by the encoding enhancement representation module.

[0021] Furthermore, as a preferred implementation of the present application, before obtaining the data to be processed, the method also includes constructing a dynamic semantic reconstruction model.

[0022] As a specific implementation of the present application, the data to be processed is input into a pre-trained dynamic semantic reconstruction model for processing, specifically:

[0023] Performing syntactic dependency analysis on the data to be processed, identifying the dependency relationship between the components within the sentence, obtaining a syntactic dependency embedding result, and converting the dependency relationship into a vector representation to obtain a semantic embedding result;

[0024] Fusing the semantic embedding result and the syntactic dependency embedding result to obtain a word representation;

[0025] Input the word representation into the Transformer encoder to generate a context-aware representation;

[0026] Performing vector conversion on the word representation and the context-aware representation to obtain a sentence encoding vector with syntactic distance;

[0027] The sentence encoding vector is input into the Transformer decoder to output a semantically fluent sentence.

[0028] In a second aspect, the embodiment of the present application further provides a structured dynamic semantic reconstruction device, including:

[0029] A data acquisition unit, used to acquire data to be processed during the dynamic dialogue reconstruction process; the data to be processed includes historical dialogue information and the speech information of the last person at present;

[0030] A semantic reconstruction unit, used for inputting the data to be processed into a pre-trained dynamic semantic reconstruction model for processing, and outputting a result of semantic reconstruction of the speech information of the last person at the moment;

[0031] The dynamic semantic reconstruction model includes a semantic structure encoding module, an encoding enhancement representation module and a semantic content decoder.

[0032] In the third aspect, an embodiment of the present invention also provides a structured dynamic semantic reconstruction device, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect above.

[0033] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method of the first aspect.

[0034] By implementing the embodiments of the present invention, syntactic dependency analysis is performed on sentences and integrated into the word encoding, position encoding and other modules of the model, thereby enhancing the model's ability to understand sentences with complex syntactic structures, thereby ensuring correct and smooth reconstruction of sentences, and solving the problem of semantic understanding deviation of the algorithm model due to reference and omission phenomena in dynamic human-computer interaction; at the same time, the present invention does not require a large amount of manual labeling work, and only needs to use dialogue data for training, which reduces the dependence on high-quality manually labeled data during the algorithm model training process, and also reduces the dependence on hardware materials required for the deployment of the algorithm model. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the specific implementation of the present invention or the technical solution in the prior art, the drawings required for use in the specific implementation or the description of the prior art are briefly introduced below.

[0036] Figure 1 is a flow chart of a structured dynamic semantic reconstruction method provided by an embodiment of the present invention;

[0037] Figure 2 It is the module diagram of the dynamic semantic reconstruction model;

[0038] Figure 3 It is another structural diagram of the dynamic semantic reconstruction model;

[0039] Figure 4 is a structural diagram of a structured dynamic semantic reconstruction device provided by an embodiment of the present invention;

[0040] Figure 5 yes Figure 4 Another structural diagram of the device shown. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0043] Please refer to Figure 1 , is a structured dynamic semantic reconstruction method provided by an embodiment of the present invention, which may include the following steps:

[0044] S1, build a dynamic semantic reconstruction model.

[0045] Please refer to Figure 2 and Figure 3 ,The dynamic semantic reconstruction model includes a semantic structure encoding module, an ,encoding enhancement representation module and a semantic content decoder.

[0046] The semantic structure encoding module is used to perform syntactic dependency analysis on the input text, identify the dependency relationship between the components within the sentence, and convert the dependency relationship into a vector representation. Through this module, the structural information of the text is explicitly injected into the model.

[0047] The encoding enhancement representation module is based on the pre-trained Transformer encoder structure, adopts a bidirectional encoding method, and combines an autoregressive generation strategy; this module is used to:

[0048] Encode the semantic results processed by the semantic structure encoding module through the attention mechanism and the improved position information encoding technology, and use syntactic clues to help the dynamic semantic structure model interpret the user's intention; and

[0049] The semantic content decoder, based on the pre-trained Transformer decoder structure, is used to decode the encoding result obtained by the encoding enhancement representation module. That is, this module mainly generates the final output from the semantic representation passed by the encoder. The target sequence is gradually generated using the previously acquired structural information and semantic information.

[0050] The following is a detailed description of the multiple modules in the model:

[0051] 1. Semantic structure encoding module

[0052] In the process of dynamic dialogue reconstruction, capturing the complex relationship between dialogues is crucial to obtaining coherent semantic information. Dependency analysis technology can capture the grammatical relationship between words in a sentence and provide a structured representation. The semantic structure encoding module vectorizes the results of the dependency analysis tree so that it can be flexibly combined with the semantic content module. Next, we will take the above "A: I like Chinese Paladin III, B: I like it too" as an example to elaborate on the modeling method of this module:

[0053] a) First, the mathematical representation of the module is stated.

[0054] For input consisting of multiple sentences, each sentence will be segmented and syntactic dependency analysis will be used to obtain the syntactic structure. For a sentence U = [w i , w 2 , ..., w n ], the dependency parser generates a set of dependency arcs:

[0055]

[0056] in, It is the central word. is a dependent word, r i is the relation type (e.g. subject, predicate, object).

[0057] For each word w i , we will construct a syntactic embedding S that includes its dependencies i :

[0058]

[0059] in Represents the dependency arc and word w i The set of connected neighboring words, f dep is a function that aggregates syntactic information. We define f dep for:

[0060]

[0061] where e j and e k They are respectively i Connected dependency and center word embeddings, W r is a relation-specific weight matrix, and the summation operation traverses all i Related outgoing and incoming arcs.

[0062] b) Next, an explanatory description of the above process is given.

[0063] First, build a syntactic dependency tree

[0064] I like The Legend of Sword and Fairy III Me too Root Node like like Leaf node 1 I [subject] I [subject] Leaf node 2 Chinese Paladin III [direct object] also [adverbial]

[0065] Table 1: Syntactic dependency tree

[0066] Next, we construct syntactic embeddings. For each word in each sentence, we construct syntactic embeddings based on their dependencies. Sentence 1: word: I (w 1 ), like (w 2 ), Chinese Paladin III (w 3 ). The dependency relationship is (w 2 , w 1 , subject)(w 2 , w 3 , direct object) for each word w i , syntactic embeddings i The calculation formula of is as described in formula (3). 1 (i), passing in its dependencies (w 2 , w 1 , subject), then s 1 =W nsubj e 2 , where nsubj represents the "subject". Similarly, the calculation method for other words and sentences is the same. So far, the syntactic dependency embedding of each sentence has been constructed.

[0067] 2. Encoding Enhanced Representation Module

[0068] In the process of dynamic dialogue reconstruction, the model must not only understand the semantic information of each dialogue, but also capture the syntactic structure to ensure that the output content is grammatically correct and coherent. To this end, the present invention proposes to fuse semantic content embedding and syntactic dependency embedding, and process the dependency relationship through a weight matrix. The specific method is described as follows:

[0069] The first step is to integrate semantic content embedding with syntactic dependency embedding. Semantic content embedding is usually used to express the semantic information of words. A common approach is to encode each word into a high-dimensional dense vector using pre-trained language models such as Word2Vector and BERT. We embed each semantically encoded word w 1 The semantic embedding of 1 , embed the syntactic dependencies mentioned above into s 1 Fusion is performed through a linear transformation, and the model automatically optimizes the fusion parameters during training:

[0070] h i =tanh(Wc [e i ;s i ]+b c ) (4)

[0071] Where [·;·] represents the concatenation operation of vectors, W c and b c is a trainable parameter, and tanh is a nonlinear activation function. This mechanism combines semantic information with syntactic information to generate a word representation h that contains richer information. i .

[0072] The second step is to express the word h i is input into the encoder part of the Transformer to generate the context-aware representation Z i The encoder is usually composed of multiple layers, each of which includes a self-attention mechanism and a feedforward neural network. By stacking multiple layers, the model can capture the long-distance dependencies between words. The Transformer-based encoder model has become a general structure in the field of natural language processing. It does not belong to the core work of this invention, and its principle will not be elaborated here. i The calculation process is as follows:

[0073] z i = TransformerEncoderLayer(h i ) (5)

[0074] Wherein TransformeEncodeLayer represents the above encoder.

[0075] In the third step, when constructing syntactic dependency embedding, a syntactic dependency tree is usually generated, such as Table 1. On the one hand, the dependency tree reflects the grammatical hierarchy between words in a sentence. The shallower the depth (that is, the closer to the root node), the more core the role of the words in the sentence. For example, components such as subjects and predicates are usually located at a shallower level. The deeper the words, the more likely they are to be modifiers or clause components, which serve to supplement and modify. On the other hand, the depth of the tree also reflects the complexity of the sentence. The greater the depth, the more complex the structure of the sentence, the more dependencies there are on modifiers and clauses, and such sentences can often express richer information.

[0076] We combine the depth information of the dependency tree with the position information encoding of the model to form a position information encoding with syntactic distance. Since the Transformer model itself does not have the ability to process sequence order, a position information encoding module is usually added to it. The common practice is to use sine and cosine functions to generate the encoding PE (w i). The specific principle of position encoding does not belong to the scope of this invention and will not be elaborated here.

[0077] de i =PE(w i )+λ·SD(w i ) (6)

[0078] Where λ is an adjustable scaling factor used to control the influence of syntactic distance on the final position encoding. By adjusting λ, the influence of position and syntactic structure on position encoding can be balanced. i ) represents the word w i The depth in the syntactic dependency tree reflects its level in the syntactic structure. The final position information encoding de with syntactic distance is obtained through formula (6): i .

[0079] At this point, we will i With s i , e i They are added together respectively, and after calculation using formulas (4) and (5), the final sentence encoding vector is obtained.

[0080] 3. Semantic Content Decoder

[0081] The semantic content decoding module is composed of the decoder part of the Transformers model, which receives the above encoding vector as input and outputs a semantically fluent sentence. In terms of architecture, it includes self-attention mechanism, cross-attention mechanism, feedforward neural network

[0082]

[0083] in is the output of the l-th layer decoder, is the initial input embedding vector, usually a randomly initialized vector, and H is the comprehensive semantic representation of the encoder output.

[0084] S2, during the dynamic dialogue reconstruction process, obtain the data to be processed.

[0085] The data to be processed includes historical conversation information and the speech information of the last person at present.

[0086] S3, inputting the data to be processed into a pre-trained dynamic semantic reconstruction model for processing, and outputting the result of semantic reconstruction of the speech information of the last person at the moment.

[0087] In the specific implementation, the data to be processed is input into a pre-trained dynamic semantic reconstruction model for processing, specifically:

[0088] Performing syntactic dependency analysis on the data to be processed, identifying the dependency relationship between the components within the sentence, obtaining a syntactic dependency embedding result, and converting the dependency relationship into a vector representation to obtain a semantic embedding result;

[0089] Fusing the semantic embedding result and the syntactic dependency embedding result to obtain a word representation;

[0090] Input the word representation into the Transformer encoder to generate a context-aware representation;

[0091] Performing vector conversion on the word representation and the context-aware representation to obtain a sentence encoding vector with syntactic distance;

[0092] The sentence encoding vector is input into the Transformer decoder to output a semantically fluent sentence.

[0093] It should be noted that for a more specific description of step S3, reference may be made to the aforementioned specific description of each module in the model.

[0094] The structured dynamic semantic reconstruction method provided in the embodiment of the present invention is implemented. By performing syntactic dependency analysis on sentences and integrating it into the word encoding, position encoding and other modules of the model, the model's ability to understand sentences with complex syntactic structures is enhanced, thereby ensuring correct and smooth reconstruction of sentences, and solving the problem of semantic understanding deviation of the algorithm model caused by reference and omission in dynamic human-computer interaction. At the same time, the present invention does not require a large amount of manual labeling work, and only needs to use dialogue data for training, which reduces the dependence on high-quality manually labeled data during the algorithm model training process, and also reduces the dependence on hardware materials required for the deployment of the algorithm model.

[0095] Based on the same inventive concept, Figure 4 As shown, the embodiment of the present invention further provides a structured dynamic semantic reconstruction device, including:

[0096] A model building unit, used to build a dynamic semantic reconstruction model; wherein the dynamic semantic reconstruction model includes a semantic structure encoding module, an encoding enhancement representation module and a semantic content decoder;

[0097] A data acquisition unit, used to acquire data to be processed during the dynamic dialogue reconstruction process; the data to be processed includes historical dialogue information and the speech information of the last person at present;

[0098] The semantic reconstruction unit is used to input the data to be processed into a pre-trained dynamic semantic reconstruction model for processing, and output the result of semantic reconstruction of the speech information of the last person at present.

[0099] The semantic structure encoding module is used to perform syntactic dependency analysis on the input text, identify the dependency relationship between the components within the sentence, and convert the dependency relationship into a vector representation;

[0100] The encoding enhancement representation module is based on a pre-trained Transformer encoder structure and is used to encode the semantic results processed by the semantic structure encoding module through an attention mechanism and an improved position information encoding technology, and uses syntactic clues to help the dynamic semantic structure model interpret user intentions;

[0101] The semantic content decoder is based on a pre-trained Transformer decoder structure and is used to decode the encoding result obtained by processing the encoding enhancement representation module.

[0102] Furthermore, the semantic reconstruction unit is specifically used for:

[0103] Performing syntactic dependency analysis on the data to be processed, identifying the dependency relationship between the components within the sentence, obtaining a syntactic dependency embedding result, and converting the dependency relationship into a vector representation to obtain a semantic embedding result;

[0104] Fusing the semantic embedding result and the syntactic dependency embedding result to obtain a word representation;

[0105] Input the word representation into the Transformer encoder to generate a context-aware representation;

[0106] Performing vector conversion on the word representation and the context-aware representation to obtain a sentence encoding vector with syntactic distance;

[0107] The sentence encoding vector is input into the Transformer decoder to output a semantically fluent sentence.

[0108] It should be noted that the specific working process of this embodiment can be found in the aforementioned method embodiment part, which will not be described in detail here.

[0109] Furthermore, another embodiment of the present invention provides a structured dynamic semantic reconstruction device. Figure 5 As shown, the apparatus may include: one or more processors 101, one or more input devices 102, one or more output devices 103 and a memory 104, wherein the processors 101, the input devices 102, the output devices 103 and the memory 104 are interconnected via a bus 105. The memory 104 is used to store a computer program, wherein the computer program includes program instructions, and the processor 101 is configured to call the program instructions to execute the method of the above method embodiment.

[0110] It should be understood that in the embodiment of the present invention, the processor 101 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0111] The input device 102 may include a keyboard, etc., and the output device 103 may include a display (LCD, etc.), a speaker, etc.

[0112] The memory 104 may include a read-only memory and a random access memory, and provides instructions and data to the processor 101. A portion of the memory 104 may also include a non-volatile random access memory. For example, the memory 104 may also store information on the device type.

[0113] In a specific implementation, the processor 101, input device 102, and output device 103 described in the embodiment of the present invention can execute the implementation method described in the embodiment of the structured dynamic semantic reconstruction method provided by the embodiment of the present invention, which will not be repeated here.

[0114] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned structured dynamic semantic reconstruction method is implemented.

[0115] The computer-readable storage medium may be an internal storage unit of the system described in any of the foregoing embodiments, such as a hard disk or memory of the system. The computer-readable storage medium may also be an external storage device of the system, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the system. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the system and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the system. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0116] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0119] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0121] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A structured dynamic semantic reconstruction method, characterized in that: include: In the process of dynamic dialogue reconstruction, the data to be processed is obtained; The data to be processed includes historical conversation information and the current last person's speech information; Input the data to be processed into a pre-trained dynamic semantic reconstruction model for processing, and output the result of semantic reconstruction of the speech information of the last person at the moment; The dynamic semantic reconstruction model includes a semantic structure encoding module, an encoding enhancement representation module and a semantic content decoder.

2. The structured dynamic semantic reconstruction method according to claim 1, characterized in that: The semantic structure encoding module is used for: Perform syntactic dependency analysis on the input text, identify the dependency relationship between the components within the sentence, and convert the dependency relationship into a vector representation.

3. The structured dynamic semantic reconstruction method according to claim 2, characterized in that: The encoding enhancement representation module is based on a pre-trained Transformer encoder structure and is used to: The semantic results processed by the semantic structure encoding module are encoded through the attention mechanism and the improved position information encoding technology, and syntactic clues are used to help the dynamic semantic structure model interpret the user's intention.

4. The structured dynamic semantic reconstruction method according to claim 3, characterized in that: The semantic content decoder is based on a pre-trained Transformer decoder structure and is used to: The encoding result obtained by the encoding enhancement representation module is decoded.

5. The structured dynamic semantic reconstruction method according to claim 1, characterized in that: Before acquiring the data to be processed, the method further includes constructing a dynamic semantic reconstruction model.

6. The structured dynamic semantic reconstruction method according to claim 5, characterized in that: The data to be processed is input into a pre-trained dynamic semantic reconstruction model for processing, specifically: Performing syntactic dependency analysis on the data to be processed, identifying the dependency relationship between the components within the sentence, obtaining a syntactic dependency embedding result, and converting the dependency relationship into a vector representation to obtain a semantic embedding result; Fusing the semantic embedding result and the syntactic dependency embedding result to obtain a word representation; Input the word representation into the Transformer encoder to generate a context-aware representation; Performing vector conversion on the word representation and the context-aware representation to obtain a sentence encoding vector with syntactic distance; The sentence encoding vector is input into the Transformer decoder to output a semantically fluent sentence.

7. A structured dynamic semantic reconstruction device, characterized in that: include: A data acquisition unit, used to acquire data to be processed during the dynamic dialogue reconstruction process; The data to be processed includes historical conversation information and the current last person's speech information; A semantic reconstruction unit, used for inputting the data to be processed into a pre-trained dynamic semantic reconstruction model for processing, and outputting a result of semantic reconstruction of the speech information of the last person at the moment; The dynamic semantic reconstruction model includes a semantic structure encoding module, an encoding enhancement representation module and a semantic content decoder.

8. The structured dynamic semantic reconstruction device according to claim 7, characterized in that: The semantic structure encoding module is used to perform syntactic dependency analysis on the input text, identify the dependency relationship between the components within the sentence, and convert the dependency relationship into a vector representation; The encoding enhancement representation module is based on a pre-trained Transformer encoder structure and is used to encode the semantic results processed by the semantic structure encoding module through an attention mechanism and an improved position information encoding technology, and uses syntactic clues to help the dynamic semantic structure model interpret user intentions; The semantic content decoder is based on a pre-trained Transformer decoder structure and is used to decode the encoding result obtained by processing the encoding enhancement representation module.

9. A structured dynamic semantic reconstruction device, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Semantic extraction method and device, computer equipment and storage medium

    CN112364665A

  • Aspect-level sentiment classification method and device, electronic equipment and storage medium

    CN116167366A

  • Semantic error recognition method and device, terminal and medium

    CN116956936A

  • Aspect-level sentiment analysis method fusing local information and graph attention network

    CN118504581A

  • Generative abstract method and system based on BERT vectorization and dependency syntax

    CN118673133A