Method and system for compact optimization using encode-decode architectural jargon
By optimizing the encoding and decoding architecture, the speech word sequence is segmented, and the connection weights are calculated using a graph attention network to generate a semantic constraint weight graph. Candidate words are expanded bit by bit, which solves the problem of inaccurate speech generation in the existing technology and achieves concise and complete text generation.
Patent Information
- Application Number
- CN202611047105.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies, when generating concise scripts, can easily lead to unclear connections between business intent, core objects, key actions, constraints, and risk warnings. This can result in misleading text, incomplete business rules, reversed order, or missing information.
The system employs an encoding-decoding architecture, segments the word sequence of the speech, records the list of semantic constraints, uses a graph attention network to calculate the connection weights, generates a semantic constraint weight graph, expands candidate words one by one, deletes unqualified paths, retains high-priority paths, and generates a concise speech.
While reducing the number of characters, the generated concise scripts retain the business intent, service actions, constraints, and risk warnings, avoiding the loss of key information and semantic deviations, thus improving the accuracy and completeness of the scripts.
Smart Images

Figure CN123140002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of language processing technology, and in particular to a method and system for simplification and optimization of speech using an encoding and decoding architecture. Background Technology
[0002] The field of language processing technology aims to enable computing devices to perform structured representation, semantic understanding, intent recognition, content conversion, text generation, and quality assessment on natural language text. It transforms unstructured language content into computable, searchable, rewriteable, and generative information. Through methods such as word segmentation and encoding, word vector representation, syntactic analysis, semantic role labeling, sequence modeling, attention mechanisms, encoding and decoding generation, language model reasoning, and text similarity assessment, it improves the efficiency of human-computer interaction, business text processing, knowledge retrieval, and information generation.
[0003] The purpose of using an encoding-decoding architecture to simplify and optimize scripts is to use an encoder to semantically represent the business intent, core objects, key actions, constraints, and result information in the original script, and then use a decoder to generate simplified scripts under length constraints, keyword retention constraints, and sentence structure constraints. This reduces repetitive expressions, colloquial elements, weak information modifiers, and unnecessary explanatory content in the original script. When the number of characters in the generated script is reduced to a preset ratio, it still retains the core semantics, business rules, and interactive purpose of the original script, and forms a compact, meaningful script text suitable for customer service responses, sales communication, notification reminders, or intelligent Q&A scenarios.
[0004] Existing technologies typically rely on encoders to generate semantic representations, which are then output as short texts by decoders according to length constraints, keyword retention constraints, and sentence structure constraints. In practice, semantic representations often focus on the probability distribution of the entire sentence context. There is a lack of calculable connection directions and weighted relationships between business intent, core objects, key actions, constraints, result information, and risk warnings. Furthermore, deletion boundaries are easily influenced by high-frequency words, colloquial phrases, and sentence templates. For customer service refund scripts, if the original text contains application conditions, operational actions, arrival time, and risk warnings simultaneously, ordinary compression may retain the refund action and arrival time but delete restrictive expressions such as "cannot process if conditions are not met," leading to misleading business practices in the simplified script. For marketing outreach scripts, length compression pressure may break down amounts, times, and negative conditions into fragmented keywords. While the generated text may be shorter, the business rules are incomplete. For notification and reminder scripts, repetitive expressions can be deleted, but when risk warnings and operational sequences lack node coverage verification, the output text is prone to issues such as reversed order, semantic additions, and missing prompts. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method and system for simplifying and optimizing language using an encoding and decoding architecture.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for simplifying and optimizing phrasing using an encoding / decoding architecture, comprising the following steps: S1: Based on the encoding and decoding architecture, the speech to be simplified is segmented into the input word sequence, and the word sequence number, character position, and sentence sequence number are recorded. The intention words, action words, condition words, result words, and risk words are marked, and a list of speech semantic constraints is generated. S2: Based on the list of semantic constraints of the discourse, compare the word position and sentence sequence number, use a graph attention network to calculate the connection weights of object to action, condition to action, action to result, and risk to action, filter out low-value connections, and establish a semantic constraint weight graph. S3: Based on the semantic constraint weight graph, read the node vector and encoder hidden state, calculate the dot product of the node vector and the segment vector, and concatenate the decoder input vector according to the gating ratio to generate the gating generation semantic matrix. S4: Based on the gating, generate a semantic matrix and semantic constraint weight graph, use the prefix tree algorithm to expand the candidate word units bit by bit, delete the disabled word group path, the reversed order path, and the low coverage path, and retain the candidate path of the bundle width range to obtain the restricted utterance candidate path set; S5: Based on the restricted speech candidate path set and semantic constraint weight graph, compare node coverage, semantic similarity, compression ratio, and number of repeated segments, delete unqualified text, select the first-ranked text, and obtain the simplified speech text.
[0007] As a further aspect of the present invention, the discourse semantic constraint list includes intent retention items, action retention items, condition retention items, result retention items, and risk retention items; the semantic constraint weight graph includes object action connection items, condition action connection items, action result connection items, and risk action connection items; the gating generated semantic matrix includes retention node representation items, sentence segment semantic representation items, gating proportion items, and decoding input representation items; the restricted discourse candidate path set includes candidate lexical paths, retention phrase coverage items, prohibited phrase exclusion items, and business order constraint items; and the concise discourse text includes business intent text, service action text, condition limitation text, result expression text, and risk warning text.
[0008] As a further aspect of the present invention, the specific steps for generating the discourse semantic constraint list are as follows: Based on the encoding and decoding architecture, the speech to be simplified is segmented according to punctuation boundaries and word boundaries, and word sequence number, character start and end position, sentence sequence number is recorded to locate intent phrases, action phrases, condition phrases, result phrases, and risk phrases, and generate a phrase location tag table; Based on the phrase location tag table, the start and end positions of phrases, sentence sequence numbers, and category tags are compared. Consecutive phrases of the same type are merged, phrases with overlapping character intervals are deleted, and five types of phrases—intent, action, condition, result, and risk—are retained to generate a list of semantic constraints for discourse.
[0009] As a further aspect of the present invention, the specific steps for generating the semantic constraint weight graph are as follows: Based on the aforementioned list of semantic constraints, object phrases, action phrases, condition phrases, result phrases, and risk phrases are read. The start and end character positions of the phrases, sentence sequence numbers, and adjacent distances are compared. Pairing items for object actions, condition actions, action results, and risk actions are filtered to obtain a candidate table of phrase connections. Based on the phrase connection candidate table, a graph attention network is used to assign category weights according to the pairing item category, calculate the inverse of character distance, the proximity value of the sentence segment, and the retention level difference, and summarize them into connection weights. The connection weights are compared with the connection threshold, and low-value pairing items are deleted to obtain a semantic connection weight table. Based on the semantic connection weight table, the word phrase nodes, node categories, node numbers, connection directions, connection weights, and retention priorities are collected. The connection edges are arranged according to object to action, condition to action, action to result, and risk to action to establish a semantic constraint weight graph.
[0010] As a further aspect of the present invention, the graph attention network first maps object phrases, action phrases, condition phrases, result phrases, and risk phrases to node vectors, respectively. It then maps object-action pairs, condition-action pairs, action-result pairs, and risk-action pairs to directed edge vectors. The pair category weights, reciprocal character distances, segment proximity values, and retention level differences are written into the edge weight input. For each node, the incoming and outgoing edge vectors are read, and the inner product of the current node vector and its neighboring node vectors is calculated. The inner product, edge weight input, and node category weights are multiplied and normalized to obtain the neighboring node attention coefficients. The neighboring node vectors are weighted and summed according to the attention coefficients to generate a node semantic influence representation. This representation is multiplied by the retention level difference to obtain the node retention priority. The retention priority is added to the pair category weights to generate connection weights. The connection weights are compared with connection thresholds, and low-value pairs are deleted to obtain a semantic connection weight table.
[0011] As a further aspect of the present invention, the specific steps for generating the gated semantic matrix are as follows: Based on the semantic constraint weight graph, the node number, node vector, connection direction, connection weight, and encoder hidden state are read, the node number, sentence segment number, and word position interval are matched, the correspondence between nodes and sentences is arranged, and a node-sentence segment matching table is generated. Based on the node segment matching table, the dot product of the node vector and the segment vector is calculated. The dot product, connection weight, and gating ratio are compared. The high-value node representation and segment representation are selected and concatenated into the decoder input vector to generate the gating generated semantic matrix.
[0012] As a further aspect of the present invention, the specific steps for generating the restricted speech candidate path set are as follows: Based on the gating, a semantic matrix and semantic constraint weight graph are generated. The decoder input vector, node retention priority, must-retain phrases, disabled phrases, and business expression order are read. Optional lexical units are arranged according to their generation positions to generate a candidate lexical unit expansion table. Based on the candidate word expansion table, the prefix tree algorithm is used to expand the candidate words one by one, compare the candidate paths with the prohibited words, the order of business expression, and the coverage status of the words that must be retained, delete the prohibited hit paths, the reversed order paths, and the paths with low coverage values, and obtain the compliant candidate path table. Based on the compliant candidate path table, the path score, number of characters, number of sentence segments, number of repeated fragments, and node coverage are calculated. The bundle width value and path score are compared and sorted. Candidate paths within the sorted range are retained to obtain the restricted speech candidate path set.
[0013] As a further aspect of the present invention, the prefix tree algorithm first splits the phrases that must be retained into root nodes, character nodes, and phrase end markers in character order, establishes a phrase character path table, reads the word element at the current position of the candidate path, compares the word element at the current position with the character node below the root node, records the matching depth and node coverage marker along the corresponding branch when a character node is hit, retains the normal extended path when a character node is not hit, writes the retained phrase coverage status when the matching depth reaches the phrase end marker, deletes the interrupted branch path when a character interruption occurs during the matching process, and deletes the disabled phrase hit status, business expression order status, and required retained phrase coverage status by deleting disabled hit paths, reversed order paths, and low coverage path to obtain a compliant candidate path table.
[0014] As a further aspect of the present invention, the specific steps for generating the simplified text of the script are as follows: Based on the restricted speech candidate path set and semantic constraint weight graph, candidate sequences, path scores, node coverage, semantic similarity values, compression ratios, and number of repeated segments are read, and retained nodes and candidate word groups are matched to generate a candidate speech index table. Based on the candidate speech index table, the node coverage threshold, semantic similarity threshold, compression ratio threshold, and repeated segment threshold are compared. Out-of-bounds text and newly added semantic text are deleted. The text is sorted by path score, and the first text in the sorted list is selected to obtain the simplified speech text.
[0015] A speech simplification and optimization system using an encoding / decoding architecture, wherein the system is used to execute the aforementioned speech simplification and optimization method using an encoding / decoding architecture, the system comprising: Lexical characterization module: Based on the encoding and decoding architecture, the slang to be simplified is segmented into lexical sequences, and lexical numbers, character positions, and sentence segment numbers are recorded. Intent phrases, action phrases, condition phrases, result phrases, and risk phrases are identified, and a list of semantic constraints is generated. Weighted graph module: Based on the semantic constraint list, compare the word group character positions and sentence segment sequence numbers, use graph attention network to calculate the connection weights from object to action, condition to action, action to result, and risk to action, delete low-value connections, and establish a semantic weighted graph; Gated splicing module: Based on the semantic weight graph, read the node vector and encoder hidden state, calculate the dot product of the node vector and the segment vector, splice the decoder input vector according to the gating ratio, and generate a gated semantic matrix; Path constraint module: Based on the gated semantic matrix and semantic weight graph, the prefix tree algorithm is used to expand the candidate word units bit by bit, delete the disabled word group path, the reversed sequence path, and the low coverage path, and retain the candidate with the bundle width range to obtain the restricted candidate path set; Text selection module: Based on the restricted candidate path set and semantic weight graph, compare node coverage, semantic similarity, compression ratio, and number of repeated segments, delete out-of-bounds text, select the first-ranked text, and obtain the concise text.
[0016] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, the speech to be simplified is split into a sequence of input words, and the word sequence number, character position, and sentence sequence number are recorded simultaneously, so that the intention words, action words, condition words, result words, and risk words form referenceable constraint objects; Based on the semantic constraint list, this invention transforms object-to-action, condition-to-action, action-to-result, and risk-to-action into directional connection relationships, and introduces a graph attention network to calculate connection weights, so that the dependence strength between phrases participates in the determination of the utterance deletion boundary. In this invention, the node vector and the encoder hidden state are concatenated with the dot product and the gating ratio to retain the priority in the semantic constraint weight graph before entering the decoder input vector. In the candidate word expansion stage, the prefix tree algorithm is used to verify that the complete path of the word group must be retained, and the path is screened by combining the prohibited word groups, the order of business expression, the node coverage rate, and the bundle width value. In this invention, during the candidate text selection stage, node coverage, semantic similarity, compression ratio, and number of repeated segments are compared simultaneously. This ensures that the output text retains business intent, service actions, constraints, result expression, and risk warnings while reducing the number of characters, thereby reducing problems such as incomplete keyword segments, deleted conditions, missing risk warnings, and generation paths deviating from business semantics. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the workflow of the present invention; Figure 2 This is a system flowchart of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] Example 1 Please see Figure 1 This invention provides a technical solution: a method for simplifying and optimizing phrasing using an encoding / decoding architecture, comprising the following steps: S1: Based on the encoding and decoding architecture, the speech to be simplified is segmented into the input word sequence, and the word sequence number, character position, and sentence sequence number are recorded. The intention words, action words, condition words, result words, and risk words are marked, and a list of speech semantic constraints is generated. S2: Based on the list of semantic constraints in discourse, compare the word positions and sentence sequence numbers, use a graph attention network to calculate the connection weights from object to action, condition to action, action to result, and risk to action, filter out low-value connections, and establish a semantic constraint weight graph. S3: Based on the semantic constraint weight graph, read the node vector and encoder hidden state, calculate the dot product of the node vector and the segment vector, and concatenate the decoder input vector according to the gating ratio to generate the gating generation semantic matrix. S4: Based on gating, generate semantic matrix and semantic constraint weight graph, use prefix tree algorithm to expand candidate word units bit by bit, delete prohibited word group paths, reversed order paths, and low coverage paths, retain candidates with bundle width range, and obtain restricted speech candidate path set; S5: Based on the restricted speech candidate path set and semantic constraint weight graph, compare node coverage, semantic similarity value, compression ratio, and number of repeated segments, delete unqualified text, select the first ranked text, and obtain the concise speech text.
[0020] The list of semantic constraints includes intent retention items, action retention items, condition retention items, result retention items, and risk retention items. The semantic constraint weight graph includes object action connection items, condition action connection items, action result connection items, and risk action connection items. The gating generated semantic matrix includes retention node representation items, sentence segment semantic representation items, gating percentage items, and decoding input representation items. The restricted speech candidate path set includes candidate lexical paths, retention phrase coverage items, prohibited phrase exclusion items, and business order constraint items. The concise speech text includes business intent text, service action text, condition limitation text, result expression text, and risk warning text.
[0021] The specific steps for generating a list of semantic constraints for discourse are as follows: Based on the encoding and decoding architecture, a bidirectional maximum matching word segmentation algorithm is adopted. Segmentation separators are set according to commas, semicolons, periods, question marks, and exclamation marks. The dictionary hit length limit is set to 12 characters. The word boundary is output by forward scanning and backward scanning. The number of forward words, backward words, and single words are compared. The sequence with fewer words and fewer single words is selected. The word sequence number, character start and end position, and segment number are recorded. The BERT-CRF sequence labeling algorithm is adopted. The label items are set as B-intent, I-intent, B-action, I-action, B-condition, I-condition, B-result, I-result, B-risk, I-risk, and O. Each word is written into the label item. Continuous B labels and I labels are merged to locate intent words, action words, condition words, result words, and risk words, and generate a word group location tag table. Based on the phrase location tag table, the interval merging method is adopted to read the phrase start position, phrase end position, sentence segment number, and category label. Adjacent phrase category labels are compared. When the category labels are the same and the character interval is less than 2, they are merged into consecutive phrases of the same type. The priority overlay method is adopted, setting the priority of intent to 5, action to 4, condition to 4, result to 3, and risk to 5. The ratio of the number of overlapping characters to the number of characters in the shorter phrase is calculated. When the ratio is greater than 0.6, the phrase with higher priority is retained. When the ratio is not greater than 0.6, two phrases are retained. Phrase with category label O is deleted. Five types of phrases, namely intent, action, condition, result, and risk, are retained, and a list of semantic constraints for discourse is generated.
[0022] The specific steps for generating a semantic constraint weight graph are as follows: Based on the discourse semantic constraint list, the Eisner dependency parsing algorithm is used to read object phrases, action phrases, condition phrases, result phrases, risk phrases, phrase start character position, phrase end character position, and sentence segment number. The arc direction set is set as object to action, condition to action, action to result, and risk to action. The upper limit of the span is set to 80 characters, and the upper limit of the sentence segment is set to 1. The span initialization command init_span is executed. The nodes are sorted in ascending order by the phrase start character position. The arc scoring command score_arc is executed. The arc scoring item is taken as the phrase category matching value, the reciprocal of the character distance, and the reciprocal of the sentence segment difference. The arc scoring item is compared with the arc candidate threshold of 0.45. Arc candidates with a value higher than the threshold are retained. Pairs with a direction that does not belong to the arc direction set are deleted. Pairs with a sentence segment difference greater than 1 are deleted. Pairs with object action, condition action, action result, and risk action are filtered to obtain the phrase connection candidate table. Based on the phrase connection candidate table, a graph attention network is used. The system reads the pair category, starting phrase vector, ending phrase vector, character distance value, segment difference, and retention level value. The weights for object action categories are set to 0.85, conditional action categories to 0.95, action result categories to 0.90, and risk action categories to 1.00. The number of attention heads is set to 4, the node vector dimension to 128, and the dropout rate to 0.10. The linear mapping command `linear_project` maps the starting and ending phrase vectors to node representations. The attention scoring command `attention_score` multiplies and normalizes the starting node representation, ending node representation, category weight, inverse character distance, segment proximity value, and retention level difference to obtain the edge attention value. The edge aggregation command `edge_aggregate` adds the edge attention value, category weight, and retention level difference to obtain the connection weight. The connection weights are compared with the connection threshold of 0.50, and low-value pairs are deleted to obtain the semantic connection weight table. Based on a semantic connection weight table, an adjacency list construction method and a topological sorting algorithm are used. The algorithm reads phrase nodes, node categories, node numbers, connection directions, connection weights, and retention priorities. Adjacency list fields are set as start node number, end node number, edge direction number, connection weight, and retention priority. The `assign_node_id` command is executed to write node numbers in ascending order of the phrase's starting character position. The `append_edge` command is executed to write edges according to object-to-action, condition-to-action, action-to-result, and risk-to-action relationships. The `count_indegree` command is executed to sort nodes by in-degree value and character position. The `topo_order` command is executed to output node and edge sequences. Finally, phrase nodes, node categories, node numbers, connection directions, connection weights, and retention priorities are aggregated to establish a semantic constraint weight graph.
[0023] The graph attention network first maps object phrases, action phrases, condition phrases, result phrases, and risk phrases to node vectors. It then maps object-action pairs, condition-action pairs, action-result pairs, and risk-action pairs to directed edge vectors. The pair category weights, reciprocal character distances, segment proximity values, and retention level differences are written into the edge weight input. For each node, the incoming and outgoing edge vectors are read, and the dot product between the current node vector and its neighboring node vectors is calculated. The dot product, edge weight input, and node category weights are multiplied and normalized to obtain the neighboring node attention coefficients. The neighboring node vectors are then weighted and summed according to these attention coefficients to generate a node semantic influence representation. This semantic influence representation is multiplied by the retention level difference to obtain the node retention priority. The node retention priority is then added to the pair category weights to generate connection weights. Finally, the connection weights are compared with connection thresholds, and low-value pairs are deleted to obtain a semantic connection weight table.
[0024] The specific steps for generating the gating semantic matrix are as follows: Based on a semantically constrained weighted graph, a two-pointer interval matching algorithm is employed. This algorithm reads node numbers, node vectors, connection directions, connection weights, encoder hidden states, sentence / segment numbers, and word position intervals. Initial values for node pointers and sentence / segment pointers are set to 0, with an interval overlap threshold of 0.50, a word position distance threshold of 20, and a connection weight threshold of 0.40. The `sort_node` command is executed to sort the node sequence in ascending order based on the starting word position, and the `sort_segment` command is executed to sort the sentence / segment sequence in ascending order based on the starting word position. Comparisons are then performed. The system calculates the ratio of overlapping word positions to the total number of word positions in a node, including the starting word position, ending word position, starting word position, and ending word position. It then compares this ratio with the interval overlap threshold, compares the distance between the node center word position and the sentence center word position, compares the distance with the word position distance threshold, reads the connection weights and compares them with the connection weight threshold, selects matching terms with an overlap ratio of not less than 0.50, a word position distance of not more than 20, and a connection weight of not less than 0.40, and writes the node number, sentence sequence number, word position interval, node vector, and sentence vector to generate a node-sentence matching table. Based on the node-segment matching table, a Sigmoid gated fusion algorithm is used. The algorithm reads node vectors, segment vectors, connection weights, node retention priorities, and encoder hidden states. The vector dimension is set to 128, the lower gate limit to 0.30, the upper gate limit to 0.85, the dot product threshold to 0.45, the connection weight scaling factor to 0.60, and the retention priority scaling factor to 0.40. The `dot_score` command is executed to calculate the dot product between the node vector and the segment vector, and the `norm_score` command is executed to normalize the dot product value. First, the `gate_value` command is executed to sum the normalized dot product value, connection weights, and node retention priority, and map them to the gated percentage. Then, the gated percentage, lower gate limit, and upper gate limit are compared. If the value is lower than 0.30, the value is set to 0.30; if it is higher than 0.85, the value is set to 0.85. The dot product value and the dot product threshold are compared. The node representation and the segment representation with a dot product value not lower than 0.45 are selected. The gated percentage is multiplied by the node representation, and the gated percentage is subtracted from the segment representation. The products of the two are concatenated to form the decoder input vector, generating the gated semantic matrix.
[0025] The specific steps for generating a restricted speech candidate path set are as follows: Based on the gating-generated semantic matrix and semantic constraint weight graph, the decoder input vector, node retention priority, required words, disabled words, and business expression order are read. The beam width is set to 8, the upper limit of generation steps is 80, the upper limit of candidate words is 50, the start symbol number is 1, the end symbol number is 2, and the lower limit of word probability is 0.001. The init_beam command is executed to create an empty candidate path, and the topk_token command is executed to extract candidate words in descending order of word probability. The node retention priority is multiplied by the word belonging tag to obtain the retention bias value. The word probability value, retention bias value, and connection weight are added to obtain the extended score. The selectable words are arranged according to the generation position to generate the candidate word extended table. Based on the candidate lexical expansion table, a prefix tree algorithm is used to expand candidate lexical elements position by position. This involves reading the required phrases, prohibited phrases, business expression order, and candidate path lexical sequences. The root node number is set to 0, the phrase end marker to 1, the maximum phrase length to 16, and the coverage threshold to 0.85. The `build_trie` command is executed to write the required phrases into the character nodes in character order. The `match_node` command is executed to compare the current position lexical element with the lower-level character nodes. When a character node is matched, the matching depth and coverage marker are written. When the phrase end marker is matched, the complete coverage status is written. The `bad_path` command is executed to compare candidate paths and prohibited phrases. The `order_check` command is executed to compare the intent, condition, action, result, and risk first occurrence position. Disabled hit paths, reversed order paths, and paths with low coverage are deleted to obtain a compliant candidate path table. Based on the compliant candidate path table, the candidate path, path score, number of characters, number of sentence segments, number of repeated fragments, and node coverage are read. The N value is set to 3, the maximum number of characters to 120, the maximum number of sentence segments to 3, the maximum number of repeated fragments to 1, the node coverage threshold to 0.85, and the bundle width to 8. The `ngram_count` command is executed to count the number of occurrences of three consecutive word segments. Paths with excessive repeated fragments are deleted. The `risk_score` command is executed to calculate the risk score by weighted summation of semantic difference value, compression ratio deviation value, node missing value, and repeated fragment count. The `rank_path` command is executed to sort the candidate paths in descending order by path score minus risk score. The bundle width and path score are compared for sorting, and candidate paths within the sorted range are retained, resulting in a restricted speech candidate path set.
[0026] The prefix tree algorithm first splits the phrases that must be retained into root nodes, character nodes, and phrase end markers in character order, and establishes a phrase character path table. It reads the word at the current position of the candidate path, compares the word at the current position with the character nodes below the root node, and records the matching depth and node coverage marker along the corresponding branch when a character node is hit. When a character node is not hit, the normal extended path is retained. When the matching depth reaches the phrase end marker, the retained phrase coverage status is written. When a character interruption occurs during the matching process, the interrupted branch path is deleted. Combining the disabled phrase hit status, the business expression order status, and the required retained phrase coverage status, the disabled hit path, the reversed order path, and the path with low coverage value are deleted to obtain the compliant candidate path table.
[0027] The specific steps for generating a concise script are as follows: Based on a restricted speech candidate path set and a semantic constraint weight graph, the longest common subsequence algorithm, cosine similarity calculation method, and node coverage matching method are used. The algorithm reads candidate sequences, path scores, node coverage, semantic similarity, compression ratio, number of repeated fragments, retained nodes, and candidate word groups. The coverage threshold is set to 0.85, the semantic similarity threshold to 0.78, the maximum compression ratio to 0.60, the maximum number of repeated fragments to 1, and the maximum character difference to 40. The `cover_match` command is executed to compare retained node word groups and candidate word groups, counting the number of hit nodes and the total number of retained nodes, calculating the node coverage, executing the `lcs_score` command to calculate the length of the longest common subsequence between the candidate sequence and the original speech sequence, executing the `cosine_score` command to calculate the cosine of the angle between the candidate sequence vector and the original speech vector, executing the `compress_ratio` command to calculate the ratio of the number of candidate characters to the number of original characters, and executing the `repeat_count` command to count the number of consecutive three-word repetitions. The results are then written into the candidate sequence, path score, node coverage, semantic similarity, compression ratio, and number of repeated fragments to generate a candidate speech index table. Based on the candidate speech index table, a natural language inference algorithm and a multi-index ranking method are used to read candidate sequences, path scores, node coverage, semantic similarity, compression ratio, number of repeated fragments, and implied label values. Thresholds are set at 0.85 for node coverage, 0.78 for semantic similarity, 0.60 for compression ratio, 1 for repeated fragments, and the implied label value is set to "implied". The `threshold_filter` command is executed to compare the node coverage threshold, semantic similarity threshold, compression ratio threshold, and repeated fragment threshold, deleting text with low node coverage, low semantic similarity, excessive compression ratio, and excessive repeated fragments. The `entail_check` command is executed to compare the implied label values, deleting non-implied text. The `rank_score` command is executed to perform a weighted sum of path score, node coverage, semantic similarity, the reciprocal of compression ratio, and the reciprocal of repeated fragments, sorting by path score and selecting the first-ranked text to obtain the simplified speech text.
[0028] Please see Figure 2 A speech simplification and optimization system using an encoding / decoding architecture is used to execute the aforementioned speech simplification and optimization method using an encoding / decoding architecture. The system includes: Lexical characterization module: Based on the encoding and decoding architecture, the slang to be simplified is segmented into lexical sequences, and lexical numbers, character positions, and sentence segment numbers are recorded. Intent phrases, action phrases, condition phrases, result phrases, and risk phrases are identified, and a list of semantic constraints is generated. Weighted graph module: Based on the list of semantic constraints, it compares the character positions of word groups and the sequence number of sentence segments, and uses graph attention network to calculate the connection weights from object to action, condition to action, action to result, and risk to action, deletes low-value connections, and establishes a semantic weighted graph; Gated splicing module: Based on semantic weight graph, read node vectors and encoder hidden states, calculate the dot product of node vectors and segment vectors, splice decoder input vectors according to gating ratio, and generate gated semantic matrix; Path constraint module: Based on the gated semantic matrix and semantic weight graph, the prefix tree algorithm is used to expand the candidate word units one by one, delete the disabled word group path, the reversed order path, and the low coverage path, and retain the candidate with the bundle width range to obtain the restricted candidate path set; Text selection module: Based on the restricted candidate path set and semantic weight graph, it compares node coverage, semantic similarity, compression ratio, and number of repeated segments, deletes out-of-bounds text, selects the first-ranked text, and obtains the concise text.
[0029] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for simplifying and optimizing verbal communication using an encoding / decoding architecture, characterized by: Includes the following steps: S1: Based on the encoding and decoding architecture, the speech to be simplified is segmented into the input word sequence, and the word sequence number, character position, and sentence sequence number are recorded. The intention words, action words, condition words, result words, and risk words are marked, and a list of speech semantic constraints is generated. S2: Based on the list of semantic constraints of the discourse, compare the word position and sentence sequence number, use a graph attention network to calculate the connection weights of object to action, condition to action, action to result, and risk to action, filter out low-value connections, and establish a semantic constraint weight graph. S3: Based on the semantic constraint weight graph, read the node vector and encoder hidden state, calculate the dot product of the node vector and the segment vector, and concatenate the decoder input vector according to the gating ratio to generate the gating generation semantic matrix. S4: Based on the gating, generate a semantic matrix and semantic constraint weight graph, use the prefix tree algorithm to expand the candidate word units bit by bit, delete the disabled word group path, the reversed order path, and the low coverage path, and retain the candidate path of the bundle width range to obtain the restricted utterance candidate path set; S5: Based on the restricted speech candidate path set and semantic constraint weight graph, compare node coverage, semantic similarity, compression ratio, and number of repeated segments, delete unqualified text, select the first-ranked text, and obtain the simplified speech text.
2. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 1, characterized in that, The semantic constraint list includes intent retention items, action retention items, condition retention items, result retention items, and risk retention items. The semantic constraint weight graph includes object action connection items, condition action connection items, action result connection items, and risk action connection items. The gating generated semantic matrix includes retention node representation items, sentence segment semantic representation items, gating percentage items, and decoding input representation items. The restricted speech candidate path set includes candidate lexical paths, retention phrase coverage items, prohibited phrase exclusion items, and business order constraint items. The concise speech text includes business intent text, service action text, condition limitation text, result expression text, and risk warning text.
3. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 1, characterized in that, The specific steps for generating the discourse semantic constraint list are as follows: Based on the encoding and decoding architecture, the speech to be simplified is segmented according to punctuation boundaries and word boundaries, and word sequence number, character start and end position, sentence sequence number is recorded to locate intent phrases, action phrases, condition phrases, result phrases, and risk phrases, and generate a phrase location tag table; Based on the phrase location tag table, the start and end positions of phrases, sentence sequence numbers, and category tags are compared. Consecutive phrases of the same type are merged, phrases with overlapping character intervals are deleted, and five types of phrases—intent, action, condition, result, and risk—are retained to generate a list of semantic constraints for discourse.
4. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 1, characterized in that, The specific steps for generating the semantic constraint weight graph are as follows: Based on the aforementioned list of semantic constraints, object phrases, action phrases, condition phrases, result phrases, and risk phrases are read. The start and end character positions of the phrases, sentence sequence numbers, and adjacent distances are compared. Pairing items for object actions, condition actions, action results, and risk actions are filtered to obtain a candidate table of phrase connections. Based on the phrase connection candidate table, a graph attention network is used to assign category weights according to the pairing item category, calculate the inverse of character distance, the proximity value of the sentence segment, and the retention level difference, and summarize them into connection weights. The connection weights are compared with the connection threshold, and low-value pairing items are deleted to obtain a semantic connection weight table. Based on the semantic connection weight table, the word phrase nodes, node categories, node numbers, connection directions, connection weights, and retention priorities are collected. The connection edges are arranged according to object to action, condition to action, action to result, and risk to action to establish a semantic constraint weight graph.
5. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 4, characterized in that, The graph attention network first maps object phrases, action phrases, condition phrases, result phrases, and risk phrases to node vectors. It then maps object-action pairs, condition-action pairs, action-result pairs, and risk-action pairs to directed edge vectors. The pair category weights, reciprocal character distances, segment proximity values, and retention level differences are written into the edge weight input. For each node, the incoming and outgoing edge vectors are read, and the dot product between the current node vector and its neighboring node vectors is calculated. The dot product, edge weight input, and node category weights are multiplied and normalized to obtain the neighboring node attention coefficients. The neighboring node vectors are then weighted and summed according to these attention coefficients to generate a node semantic influence representation. This representation is multiplied by the retention level difference to obtain the node retention priority. The retention priority is then added to the pair category weights to generate connection weights. Finally, the connection weights are compared with connection thresholds, and low-value pairs are deleted to obtain a semantic connection weight table.
6. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 1, characterized in that, The specific steps for generating the gated semantic matrix are as follows: Based on the semantic constraint weight graph, the node number, node vector, connection direction, connection weight, and encoder hidden state are read, the node number, sentence segment number, and word position interval are matched, the correspondence between nodes and sentences is arranged, and a node-sentence segment matching table is generated. Based on the node segment matching table, the dot product of the node vector and the segment vector is calculated. The dot product, connection weight, and gating ratio are compared. The high-value node representation and segment representation are selected and concatenated into the decoder input vector to generate the gating generated semantic matrix.
7. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 1, characterized in that, The specific steps for generating the restricted speech candidate path set are as follows: Based on the gating, a semantic matrix and semantic constraint weight graph are generated. The decoder input vector, node retention priority, must-retain phrases, disabled phrases, and business expression order are read. Optional lexical units are arranged according to their generation positions to generate a candidate lexical unit expansion table. Based on the candidate word expansion table, the prefix tree algorithm is used to expand the candidate words one by one, compare the candidate paths with the prohibited words, the order of business expression, and the coverage status of the words that must be retained, delete the prohibited hit paths, the reversed order paths, and the paths with low coverage values, and obtain the compliant candidate path table. Based on the compliant candidate path table, the path score, number of characters, number of sentence segments, number of repeated fragments, and node coverage are calculated. The bundle width value and path score are compared and sorted. Candidate paths within the sorted range are retained to obtain the restricted speech candidate path set.
8. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 7, characterized in that, The prefix tree algorithm first splits the phrases that must be retained into root nodes, character nodes, and phrase end markers in character order, and establishes a phrase character path table. It reads the word at the current position of the candidate path, compares the word at the current position with the character nodes below the root node, and records the matching depth and node coverage marker along the corresponding branch when a character node is hit. When a character node is not hit, the normal extended path is retained. When the matching depth reaches the phrase end marker, the retained phrase coverage status is written. When a character interruption occurs during the matching process, the interrupted branch path is deleted. Combining the disabled phrase hit status, the business expression order status, and the required retained phrase coverage status, the disabled hit path, the reversed order path, and the low coverage path are deleted to obtain the compliant candidate path table.
9. The method for simplifying and optimizing speech using an encoding / decoding architecture as described in claim 1, characterized in that, The specific steps for generating the simplified text of the script are as follows: Based on the restricted speech candidate path set and semantic constraint weight graph, candidate sequences, path scores, node coverage, semantic similarity values, compression ratios, and number of repeated segments are read, and retained nodes and candidate word groups are matched to generate a candidate speech index table. Based on the candidate speech index table, the node coverage threshold, semantic similarity threshold, compression ratio threshold, and repeated segment threshold are compared. Out-of-bounds text and newly added semantic text are deleted. The text is sorted by path score, and the first text in the sorted list is selected to obtain the simplified speech text.
10. A system for streamlining and optimizing dialogue using an encoding / decoding architecture, characterized in that: The method for simplifying and optimizing speech using an encoding / decoding architecture according to any one of claims 1-9, wherein the system comprises: Lexical characterization module: Based on the encoding and decoding architecture, the slang to be simplified is segmented into lexical sequences, and lexical numbers, character positions, and sentence segment numbers are recorded. Intent phrases, action phrases, condition phrases, result phrases, and risk phrases are identified, and a list of semantic constraints is generated. Weighted graph module: Based on the semantic constraint list, compare the word group character positions and sentence segment sequence numbers, use graph attention network to calculate the connection weights from object to action, condition to action, action to result, and risk to action, delete low-value connections, and establish a semantic weighted graph; Gated splicing module: Based on the semantic weight graph, read the node vector and encoder hidden state, calculate the dot product of the node vector and the segment vector, splice the decoder input vector according to the gating ratio, and generate a gated semantic matrix; Path constraint module: Based on the gated semantic matrix and semantic weight graph, the prefix tree algorithm is used to expand the candidate word units bit by bit, delete the disabled word group path, the reversed sequence path, and the low coverage path, and retain the candidate with the bundle width range to obtain the restricted candidate path set; Text selection module: Based on the restricted candidate path set and semantic weight graph, compare node coverage, semantic similarity, compression ratio, and number of repeated segments, delete out-of-bounds text, select the first-ranked text, and obtain the concise text.
