An intelligent electric selling speech generation and optimization system based on natural language processing

CN122817404APending Publication Date: 2026-09-25BEIJING ZHONGKE QIHUI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611085934.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

然而,这些系统在实际运行中存在显著的技术缺陷

Benefits of technology

[0064]通过滚动时间窗口并行提取显隐式多模态特征,并首次将因果推断注入大语言模型,利用有向无环图构建因果掩膜,强行阻断注意力机制中的统计虚假相关,实现了因果边界可控、兼具即时情绪动态与严密因果逻辑的话术精准生成;引入基于因果世界模型的离线强化学习自适应迭代机制,利用反事实数据增强攻克了离线数据分布偏移难题,并以梯度敏感度逆向修正因果边权重,形成了“实时交互-因果推理-离线进化”的动态自闭环,显著提升了人机交互的转化效益。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122817404A_ABST
    Figure CN122817404A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent electric selling dialogue generation and optimization system based on natural language processing, and particularly relates to the technical field of computer natural language processing, and comprises a cause-effect diagram construction and embedding module, a real-time interactive feature extraction module, a dynamic strategy reasoning module and an offline reinforcement learning adaptive iteration module.The cause-effect diagram construction and embedding module constructs a directed acyclic cause-effect diagram by using a cause-effect discovery algorithm, converts the directed acyclic cause-effect diagram into a cause-effect mask matrix and embeds the cause-effect mask matrix into a self-attention layer of a large language model, so as to inhibit non-cause-effect features from the bottom layer and eliminate cognitive hallucinations.The real-time interactive feature extraction module extracts user explicit semantics and implicit acoustic features in parallel and fuses the user explicit semantics and the implicit acoustic features into an interactive state vector.The dynamic strategy reasoning module abstracts a dialogue into an intervention action, calculates a conditional average treatment effect by counterfactual reasoning, and generates optimal dialogue text with maximum cause-effect net income in seconds.The offline reinforcement learning adaptive iteration module generates counterfactual samples by using a cause-effect world model to perform data enhancement, and adopts a conservative Q learning algorithm to close-loop update edge weights of the cause-effect diagram, so as to realize safe evolution and optimization of a strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer natural language processing technology, and more specifically, to an intelligent telemarketing script generation and optimization system based on natural language processing. Background Technology

[0002] With the rapid development of artificial intelligence technology, large language models and generative natural language processing techniques have been widely applied in high-frequency interaction scenarios such as telephone sales assistance and intelligent customer service. Traditional intelligent script generation systems typically rely on pre-set rigid script trees or match historical best-selling script templates through retrieval-enhanced generation techniques. However, these systems have significant technical shortcomings in actual operation.

[0003] Because traditional natural language processing models and language generation mechanisms are entirely based on probability statistics and data correlation, these systems tend to capture frequently occurring surface statistical features, failing to understand the deep causal relationships between dialogue elements and the final conversion results. This overfitting to "spurious relevance" leads to cognitive illusions in large models during real-time text generation, blindly recommending seemingly high-frequency but ultimately unhelpful sales tactics that may even trigger customer complaints. Furthermore, in the dynamic game of long dialogues, existing systems lack the ability to perform counterfactual reasoning in an offline, secure environment when faced with sudden interruptions, objections, or emotional fluctuations from users. They cannot accurately calculate and implement optimal intervention strategies within milliseconds, resulting in high latency and poor robustness in multi-turn dialogue strategy adjustments. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an intelligent telemarketing script generation and optimization system based on natural language processing to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: an intelligent telemarketing script generation and optimization system based on natural language processing, specifically comprising:

[0006] The causal graph construction and embedding module is used to acquire historical telemarketing dialogue data and corresponding transaction result tags. It constructs a directed acyclic causal graph containing user profile features, dialogue events, sales strategies, and transaction result nodes through a causal discovery algorithm. It constructs a causal mask matrix based on the topological path of the directed acyclic causal graph and embeds the causal mask matrix into the self-attention calculation layer of the large language model. The attention mechanism of the large language model is constrained by the causal chain to suppress the attention scores of non-causally related nodes.

[0007] The real-time interaction feature extraction module is used to extract explicit semantic features of users and implicit acoustic behavior features, including interruption timing, pitch change rate and silence duration, in parallel using a rolling time window during real-time calls, and fuse them to generate the current interaction state vector.

[0008] The dynamic strategy reasoning module connects the real-time interactive feature extraction module and the causal graph construction and embedding module. It is used to abstract each candidate speech strategy into different intervention actions, and use the large language model embedded in the causal chain to calculate the individual therapeutic effect or conditional average therapeutic effect of each intervention action on the transaction result node under the current interactive state vector. It selects and generates the target speech text instruction that maximizes the conditional average therapeutic effect.

[0009] The offline reinforcement learning adaptive iterative module is used to record the interaction state vector, the verbal strategy adopted, the state transition and the final result in a single call as offline experience data; to construct a causal world model using the offline experience data and the directed acyclic causal graph; to generate counterfactual samples for data augmentation in an offline environment using the causal world model; and to update the edge weight parameters in the directed acyclic causal graph using an offline reinforcement learning algorithm.

[0010] Preferably, as a preferred embodiment of the intelligent telemarketing script generation and optimization system based on natural language processing described in this invention, it includes the cause-effect graph construction and embedding module, specifically including the following:

[0011] Extract historical conversation records and corresponding binary transaction tags from the historical telemarketing database, and decouple multi-dimensional features to construct a variable set including user profile feature nodes, dialogue event feature nodes, sales strategy nodes and transaction result nodes;

[0012] A score-based greedy equivalence search algorithm is used for causal discovery. This involves accumulating directed edges and calculating the Global Bayesian Information Criterion (BIC) score in a forward greedy phase, followed by a backward elimination phase to progressively remove edges. The convergent output is a directed acyclic graph describing the internal logic mechanism of telemarketing. Where V is the set of nodes and E is the set of directed edges;

[0013] The topological dependency between any two variables in a directed acyclic graph is calculated using the reachability matrix algorithm. A dimension is initialized based on the total length L of the input context sequence of the large language model. Causal mask matrix ;

[0014] Causal mask matrix It is directly and rigidly injected into the self-attention calculation core of each Transformer decoder layer in the large language model. Through the causal chain constraint self-attention mechanism, it accurately converges to zero the final attention weight value of non-causal related positions.

[0015] The causal mask matrix The assignment rules, superposition calculation, and weight suppression formula are as follows:

[0016] For any i-th and j-th tokens in the input sequence, retrieve their corresponding causal nodes in the directed acyclic graph;

[0017] In a directed acyclic graph, if there is no direct directed edge between node i and node j and no blocking path connected by an intermediary variable, then node i and node j are determined to be non-causally related nodes.

[0018] Based on the above rules, the elements of the causal mask matrix are assigned values, and the assignment formula is as follows:

[0019] ;

[0020] Force the superposition of causal mask matrices when calculating the attention weight score matrix. The formula for calculating its attention matrix is:

[0021] ; ;

[0022] in, Let Q be the original attention score matrix, K be the query vector obtained by linearly projecting the input feature vector onto a preset query matrix, K be the key vector obtained by linearly projecting the input feature vector onto a preset key matrix, and V be the value vector obtained by linearly projecting the input feature vector onto a preset value matrix. This indicates that the transpose matrix operation is performed on the key vector K. The head dimension size is set to the preset attention mechanism. This is a scaling factor used to prevent gradient vanishing. It is a normalized exponential function;

[0023] When calculating the attention weight of the i-th token to the j-th non-causally related token, precise zeroing is achieved through the following normalized exponent operation:

[0024] ;

[0025] in, Let i be the final attention weight value assigned to j for the i-th token. This indicates that the element in the i-th row and k-th column of the attention score matrix after causal constraints is taken as the natural index.

[0026] Preferably, as a preferred embodiment of the intelligent telemarketing script generation and optimization system based on natural language processing described in this invention, it includes the real-time interactive feature extraction module, specifically comprising the following:

[0027] A rolling time window with a span of preset seconds W and a step size of preset seconds S is established for the captured real-time voice stream to segment continuous audio data stream segments, and explicit semantic feature extraction and implicit acoustic behavior feature extraction are performed in parallel.

[0028] The audio data stream is segmented and fed into an online Automatic Speech Recognition (ASR) engine for text transcription, outputting the user's text stream for the current time period. A lightweight semantic encoder is then used to perform keyword matching and intent recognition on the user's text stream, transforming it into a fixed-dimensional explicit intent encoding vector. ; used to characterize the type of objection a user expresses in a literal sense;

[0029] Extract multi-dimensional implicit acoustic behavior features from audio data stream slices, including pitch change rate. speech rate feature value Interruption timing feature vector and the feature value of silence duration between multiple rounds of dialogue interaction. Further includes:

[0030] Pitch change rate extraction: The fundamental frequency timing curve of the user's voice within the audio data stream slice is extracted using a fundamental frequency extraction algorithm; the first derivative of the fundamental frequency timing curve is calculated to obtain the pitch change rate. This is used to quantitatively characterize the intensity of a user's current emotional fluctuations;

[0031] Speech rate feature extraction: The boundary of the syllables in the audio data stream is detected by the energy thresholding method, the number of syllables swallowed per unit time is calculated, and the speech rate feature value is output. ;

[0032] Interruption timing feature extraction: Maintain a two-way audio monitoring channel. When the system-side speech synthesis TTS engine is executing the speech text output and simultaneously detects that the user's audio input level exceeds a preset threshold, a user interruption is determined. Record the difference between the user's start time and the system's start time for the current sentence of the speech text, and encode this difference into an interruption timing feature vector. If no interruption occurs, a preset baseline zero vector is assigned.

[0033] Extraction of silence duration: When both the user side and the system side are in a low-level, no-sound state, clock accumulation is initiated, and the silence duration feature value between multiple rounds of dialogue interaction is output. ;

[0034] The implicit unstructured behavioral features extracted above are temporally aligned and concatenated to construct an implicit acoustic feature vector. The calculation formula is as follows:

[0035] ;

[0036] in, The rate of change of pitch. For speech rate feature value, The feature vector for interruption timing. This is the feature value of the silence duration between current multi-turn dialogue interactions;

[0037] Encoding explicit intent vectors using a multimodal fusion network With implicit acoustic eigenvectors Perform deep fusion to generate the current interaction state vector. The calculation formula is as follows:

[0038] ;

[0039] in, The expression `||` represents concatenating the explicit and implicit feature vectors end-to-end. The expression `||` represents the concatenation operation of feature vectors. The preset learnable multimodal fusion weight matrix, For a learnable bias vector, LayerNorm represents the layer normalization function.

[0040] Preferably, as a preferred embodiment of the intelligent telemarketing script generation and optimization system based on natural language processing described in this invention, it includes the dynamic strategy reasoning module, specifically comprising the following:

[0041] The M types of sales scripts that can be executed in telemarketing are pre-mapped into digital discrete forms and abstracted into corresponding sets of intervention actions. ; and pre-define a baseline reference action as a blank control strategy. ;in, This represents the Mth candidate verbal intervention action in the set of intervention actions;

[0042] Real-time reception of the current interaction state vector output by the real-time interaction feature extraction module The data, along with the set of intervention actions, is input into a large language model embedded with a causal mask matrix. Through forward propagation logic, the final transaction result node after each intervention action is calculated. The counterfactual probability;

[0043] Calculate each candidate speech action using a large language model compared to a baseline reference action. The conditional average therapeutic effect (CATE) score is used as the causal net benefit score for each rhetorical strategy, and its calculation formula is as follows:

[0044] ;

[0045] in, This indicates that a verbal intervention action will be performed in the current interactive state. The resulting net causal benefit score and These respectively represent the forced application of verbal intervention actions in the current conversation state. and reference action The expected value of the transaction result output by the large language model. This represents the intervention quantifier in causal inference, used to simulate external forced intervention;

[0046] The entire set of intervention actions is traversed, and the optimal target verbal action that maximizes the conditionally averaged therapeutic effect (CATE) score is selected using the maximum value retrieval operator. The specific formula is as follows:

[0047] ;

[0048] in, Represents the set of intervention actions All candidate intervention actions Find the average therapeutic effect under the corresponding conditions. Index the candidate intervention action that maximizes the score and return the corresponding optimal target speech action;

[0049] Select the optimal target dialogue action Convert to conditional control labels, and associate them with the current interaction state vector. Both are fed into the decoding text generation layer of the large language model; under the self-attention mechanism constraint of the causal mask matrix, the large language model decodes and assembles the conditional control labels as hard control boundaries, and outputs the target speech text instructions.

[0050] Preferably, as a preferred embodiment of the intelligent telemarketing script generation and optimization system based on natural language processing described in this invention, it includes the offline reinforcement learning adaptive iterative module, specifically comprising the following:

[0051] After the call ends, record all interaction state vectors recorded throughout the entire call, the optimal target dialogue strategy adopted, and the next interaction state vector after the transition. And the final binary transaction result label Y, using time-series trajectories to... The data is packaged in the form of [format] and persistently stored in an offline historical database to construct an offline empirical dataset D of P groups of quaternion trajectory pairs, denoted as: Where P represents the total number of cumulative sessions;

[0052] Using the constructed directed acyclic causal graph as a structural prior, a multi-task deep neural network including a state transition prediction network layer and a transformation result reward prediction network layer is trained using an offline experience dataset as a causal world model; taking the current interaction state vector and the applied verbal intervention action as input, the output is the predicted probability distribution of the next state and the immediate reward value R.

[0053] For the real interaction states in the offline experience dataset, counterfactual intervention actions are forcibly applied to them in the offline environment. A massive amount of virtual counterfactual interaction trajectories are generated through simulation and inference using a causal world model to complete the data augmentation.

[0054] The conservative Q-learning algorithm is used to iteratively optimize the parameters of the policy network, and the specific formula is shown below:

[0055] ;

[0056] ;

[0057] in, and These represent the current interaction state vectors before and after the update, respectively. The system will then take the current script intervention action. The strategic value assessment value, The preset learning rate step size, R represents the temporal difference residual of the current action-state pair, and R is the instantaneous reward value output by the causal world model. Represents the next interaction state vector after the transition. Find the maximum value assessment value for all possible candidate verbal actions 'a'. As a preset future discount factor, As a conservative penalty coefficient, This represents the logarithmic natural base exponentiation summation penalty term over the entire speech action space A;

[0058] Once the conservative Q-learning algorithm converges, the marginal probability distribution of each action activated by the policy network on the full dataset is extracted. This serves as a reverse feedback mechanism to dynamically adjust the weight parameters of the edges connecting nodes in the directed acyclic causal graph, achieving adaptive refinement of the causal inference mechanism. The specific formula is shown below:

[0059] ;

[0060] in, This is the updated causal edge weight matrix. This is the historical causal edge weight matrix before the update; The preset smoothing update coefficient; The expected causal effect score matrix, the The partial derivative matrix is ​​obtained by performing partial derivative operations on the gradient sensitivity of each node's features during the forward propagation of the converged policy network.

[0061] On the other hand, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements the functional modules of an intelligent telemarketing script generation and optimization system based on natural language processing as described above.

[0062] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements an intelligent telemarketing script generation and optimization system based on natural language processing as described above.

[0063] The technical effects and advantages provided by the present invention in the above technical solution are as follows:

[0064] By extracting explicit and implicit multimodal features in parallel through a rolling time window, and for the first time injecting causal inference into a large language model, a causal mask is constructed using a directed acyclic graph to forcibly block statistical spurious correlations in the attention mechanism. This achieves accurate speech generation with controllable causal boundaries and both real-time emotional dynamics and rigorous causal logic. An offline reinforcement learning adaptive iterative mechanism based on a causal world model is introduced, and counterfactual data augmentation is used to overcome the problem of offline data distribution deviation. Furthermore, gradient sensitivity is used to inversely correct the causal edge weights, forming a dynamic self-closing loop of "real-time interaction - causal reasoning - offline evolution", which significantly improves the conversion efficiency of human-computer interaction. Attached Figure Description

[0065] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0066] Figure 1 This is a schematic diagram of the architecture provided for an embodiment of the present invention.

[0067] Figure 2 This is a schematic diagram illustrating the evolutionary computational principle of the hard injection self-attention mechanism of the causal mask matrix in an embodiment of the present invention. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0069] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0070] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0071] Example 1

[0072] This embodiment provides, for example Figure 1 The system shown is an intelligent telemarketing script generation and optimization system based on natural language processing, specifically including:

[0073] The causal graph construction and embedding module is used to acquire historical telemarketing dialogue data and corresponding transaction result tags. It constructs a directed acyclic causal graph containing user profile features, dialogue events, sales strategies, and transaction result nodes through a causal discovery algorithm. It constructs a causal mask matrix based on the topological path of the directed acyclic causal graph and embeds the causal mask matrix into the self-attention calculation layer of the large language model. The attention mechanism of the large language model is constrained by the causal chain to suppress the attention scores of non-causally related nodes.

[0074] The real-time interaction feature extraction module is used to extract explicit semantic features of users and implicit acoustic behavior features, including interruption timing, pitch change rate and silence duration, in parallel using a rolling time window during real-time calls, and fuse them to generate the current interaction state vector.

[0075] The dynamic strategy reasoning module connects the real-time interactive feature extraction module and the causal graph construction and embedding module. It is used to abstract each candidate speech strategy into different intervention actions, and use the large language model embedded in the causal chain to calculate the individual therapeutic effect or conditional average therapeutic effect of each intervention action on the transaction result node under the current interactive state vector. It selects and generates the target speech text instruction that maximizes the conditional average therapeutic effect.

[0076] The offline reinforcement learning adaptive iterative module is used to record the interaction state vector, the verbal strategy adopted, the state transition and the final result in a single call as offline experience data; to construct a causal world model using the offline experience data and the directed acyclic causal graph; to generate counterfactual samples for data augmentation in an offline environment using the causal world model; and to update the edge weight parameters in the directed acyclic causal graph using an offline reinforcement learning algorithm.

[0077] In this embodiment, the causal graph construction and embedding module is specifically described. This module acquires historical telemarketing dialogue data and corresponding transaction result tags, constructs a directed acyclic causal graph containing user profile features, dialogue events, sales tactics, and transaction result nodes using a causal discovery algorithm, and constructs a causal mask matrix based on the topological path of the directed acyclic causal graph. This causal mask matrix is ​​then embedded into the self-attention calculation layer of the large language model. The attention mechanism of the large language model is constrained by causal chains to suppress the attention scores of non-causally related nodes. Specifically, this includes the following:

[0078] Extract conversation records and their corresponding binary transaction tags from the historical telemarketing database, and decouple them into multi-dimensional features to construct a variable set including user profile feature nodes, dialogue event feature nodes, sales strategy nodes, and transaction result nodes.

[0079] A score-based greedy equivalence search algorithm is used for causal discovery to eliminate statistically significant spurious correlations, specifically including:

[0080] Forward Greedy Phase: Starting from an empty graph, traverse all directed edges to add operations, calculate the global score, and retain the directed edge if adding a directed edge from "dialogue event" to "transaction result" can increase the global BIC score.

[0081] Backward Removal Phase: The initial graph generated in the forward phase undergoes progressive edge removal. If deleting a directed edge that is "frequently occurring but lacks causality" does not significantly decrease the BIC score, the directed edge is completely removed. The converged output is a directed acyclic graph describing the internal logic mechanism of telemarketing. Where V is the set of nodes and E is the set of directed edges;

[0082] Construct a directed acyclic graph Then, the topological dependency between any two variables in the graph is calculated using the reachability matrix algorithm, specifically including:

[0083] The total length of the input context sequence of the large language model is set to L, which includes the encoded profile variables, historical dialogue context tokens, and policy hints to be generated.

[0084] Initialize a dimension as Causal mask matrix For any i-th and j-th tokens in the input sequence, retrieve their representation in the directed acyclic graph. The corresponding causal node in the middle;

[0085] In a directed acyclic graph In the process, if there is no direct directed edge or blocking path connected by mediator variables from node i to node j, then node i and node j are determined to be non-causally related nodes.

[0086] Based on the above rules, the elements of the causal mask matrix are assigned values, and the assignment formula is as follows:

[0087] ;

[0088] Causal mask matrix The self-attention calculation core of each Transformer decoder layer in the large language model is directly and rigidly injected. In each Transformer decoder layer, the input feature vector is linearly projected through a preset query matrix, key matrix, and value matrix to obtain the query vector Q, key vector K, and value vector V, respectively. When calculating the attention weight score matrix, the causal mask matrix is ​​forcibly superimposed. The specific method for calculating the evolution of the attention matrix is ​​as follows:

[0089] ;

[0090] in, Let Q be the original attention score matrix after superimposing causal constraints, K be the query vector obtained by linearly projecting the input feature vector onto a preset query matrix, K be the key vector obtained by linearly projecting the input feature vector onto a preset key matrix, and V be the value vector obtained by linearly projecting the input feature vector onto a preset value matrix. This indicates that the transpose matrix operation is performed on the key vector K. The head dimension size is set to the preset attention mechanism. This is a scaling factor used to prevent gradient vanishing. It is a normalized exponential function;

[0091] By superimposing the above formula matrix, when the system calculates the attention weight of the i-th token to the j-th non-causally related token, The corresponding raw score It was directly lowered to negative infinity, and after subsequent... After normalization exponent calculation, the final attention weights at non-causal locations will be precisely converged to zero. The specific formula is as follows: ;in, Let i be the final attention weight value assigned to j for the i-th token. This indicates that the element in the i-th row and k-th column of the attention score matrix after causal constraints is taken as the natural index.

[0092] In this embodiment, the real-time interaction feature extraction module is specifically described. This module is used to extract explicit semantic features of the user and implicit acoustic behavioral features, including interruption timing, pitch change rate, and silence duration, in parallel using a rolling time window during a real-time call, and then fuse them to generate a current interaction state vector. Specifically, it includes the following:

[0093] During real-time calls, dual-path parallel feature extraction and temporal alignment are performed on the captured real-time voice stream, specifically including the following:

[0094] A rolling time window with a span of a preset number of seconds W is established. During a call, the current rolling time window slides forward continuously with a step size of a preset number of seconds S, dividing the audio data stream into segments. In this embodiment, W=3.0 seconds and S=0.5 seconds are preferably set.

[0095] For audio data stream segments within the current scrolling time window, explicit semantic features are extracted. These audio data stream segments are then input into an online Automatic Speech Recognition (ASR) engine for text transcription, outputting the user's text stream for the current time period. A lightweight semantic encoder is then used to perform keyword matching and intent recognition on the user's text stream, transforming it into a fixed-dimensional explicit intent encoding vector. The explicit intent encoding vector Used to characterize the type of objection a user may have regarding the literal expression;

[0096] For each segment of the audio data stream within the current rolling time window, implicit acoustic behavior features are extracted in parallel, including:

[0097] Pitch change rate extraction: The fundamental frequency timing curve of the user's voice within the audio data stream slice is extracted using a fundamental frequency extraction algorithm; the first derivative of the fundamental frequency timing curve is calculated to obtain the pitch change rate. This is used to quantitatively characterize the intensity of a user's current emotional fluctuations;

[0098] Speech rate feature extraction: The boundary of the syllables in the audio data stream is detected by the energy thresholding method, the number of syllables swallowed per unit time is calculated, and the speech rate feature value is output. ;

[0099] Interruption timing feature extraction: Maintain a two-way audio monitoring channel. When the system-side speech synthesis TTS engine is executing the speech text output and simultaneously detects that the user's audio input level exceeds a preset threshold, a user interruption is determined. Record the difference between the user's start time and the system's start time for the current sentence of the speech text, and encode this difference into an interruption timing feature vector. If no interruption occurs, a preset baseline zero vector is assigned.

[0100] Extraction of silence duration: When both the user side and the system side are in a low-level, no-sound state, clock accumulation is initiated, and the silence duration feature value between multiple rounds of dialogue interaction is output. ;

[0101] The implicit unstructured behavioral features extracted above are temporally aligned and concatenated to construct an implicit acoustic feature vector. The calculation formula is as follows:

[0102] ;

[0103] in, The rate of change of pitch. For speech rate feature value, The feature vector for interruption timing. This is the feature value of the silence duration between current multi-turn dialogue interactions;

[0104] The explicit intent encoding vector is generated using a multimodal fusion network. With implicit acoustic eigenvectors Perform deep fusion to generate the current interaction state vector. The specific vector fusion and dimensionality reduction mapping calculation methods are as follows:

[0105] ;

[0106] in, This indicates that the explicit and implicit feature vectors are concatenated end-to-end. The preset learnable multimodal fusion weight matrix, For a learnable bias vector, LayerNorm represents the layer normalization function.

[0107] In this embodiment, the dynamic strategy reasoning module is specifically described. This module connects the real-time interaction feature extraction module and the causal graph construction and embedding module. It abstracts each candidate dialogue strategy into different intervention actions, calculates the individual therapeutic effect or conditional average therapeutic effect of each intervention action on the transaction result node under the current interaction state vector using the large language model embedded with the causal chain, and selects and generates the target dialogue text instruction that maximizes the conditional average therapeutic effect. Specifically, it includes the following:

[0108] The N possible sales scripts and strategies that can be executed in telemarketing, including direct pricing, emphasizing product scarcity, and calming customer emotions, are pre-mapped digitally and abstracted into a set of corresponding intervention actions. ; and pre-define a baseline reference action as a blank control strategy. ;in, This represents the Mth candidate verbal intervention action in the set of intervention actions;

[0109] When the dynamic strategy reasoning module receives the current interaction state vector output by the feature extraction module in real time... Then, the state vector Together with the set of intervention actions, they are input into a large language model that has an embedded causal mask matrix;

[0110] Using the forward propagation logic of the large language model, calculate the current interaction state vector respectively. After implementing various specific sales techniques, the final transaction result is reached. The counterfactual probability;

[0111] Based on the causal inference framework, a large language model is used to calculate the comparison between each candidate speech action and the baseline reference action. The conditional average therapeutic effect (CATE) score is used as the causal net benefit score for each verbal strategy in the current interaction state. The specific mathematical calculation method is as follows:

[0112] ;

[0113] in, This indicates that a verbal intervention action will be performed in the current interactive state. The resulting net causal benefit score and These respectively represent the forced application of verbal intervention actions in the current conversation state. and reference action The expected value of the transaction result output by the large language model. This represents the intervention quantifier in causal inference, used to simulate external forced intervention;

[0114] The entire set of intervention actions is traversed, and the Conditional Average Therapeutic Effect (CATE) score corresponding to all candidate verbal strategies is calculated in parallel. Then, using a maximum value retrieval operator, the optimal target verbal action that maximizes the global CATE score is selected. The specific screening formula is as follows:

[0115] ;

[0116] in, Represents the set of intervention actions All candidate intervention actions Find the average therapeutic effect under the corresponding conditions. Index the candidate intervention action that maximizes the score and return the corresponding optimal target speech action;

[0117] Select the optimal target dialogue action Convert to conditional control labels, and associate them with the current interaction state vector. Both are fed into the decoding text generation layer of the large language model; the large language model, under the constraint of a self-attention mechanism including causal masks, will... As a hard control boundary, within a preset 200-millisecond delay, it decodes, assembles, and outputs specific target text instructions that conform to the current causal benefits.

[0118] In this embodiment, the offline reinforcement learning adaptive iteration module is specifically described. This module records the interaction state vector, the adopted dialogue strategy, state transitions, and final results of a single call as offline experience data. It then uses this offline experience data and the directed acyclic causal graph to construct a causal world model. In an offline environment, it uses this causal world model to generate counterfactual samples for data augmentation and employs an offline reinforcement learning algorithm to update the edge weight parameters in the directed acyclic causal graph. Specifically, this includes the following:

[0119] After each game flow of a call ends, all interaction state vectors recorded throughout the current call will be processed. The optimal target communication strategy adopted The next interaction state vector after the transition And the final binary transaction result label Y, using time-series trajectories to... Packaged in the form of;

[0120] The current time-series trajectory pairs are persistently stored in an offline historical database, resulting in an offline empirical dataset of P sets of quaternion trajectory pairs, as shown below: ,

[0121] Where P represents the total number of cumulative sessions;

[0122] Using a constructed directed acyclic causal graph as a structural prior, a multi-task deep neural network is trained using an offline experience dataset D to serve as a causal world model simulating dynamic feedback from real users. This causal world model includes a state transition prediction network layer and a transformation result reward prediction network layer, with the current state as its input. and the verbal intervention actions applied The output is the predicted probability distribution of the next state and the immediate reward value R; where the final transaction result label Y is directly converted into an explicit technical reward: when Grant positive value rewards ;when Furthermore, hanging up midway results in a negative penalty reward. ;

[0123] For the real interaction states in the offline experience dataset, counterfactual intervention actions are forcibly applied to them in the offline environment. The virtual new state and virtual reward in the counterfactual situation are inferred through the simulation of the causal world model. The virtual counterfactual interaction trajectory is generated and incorporated into the original offline experience dataset to complete the offline data augmentation at the causal level.

[0124] The conservative Q-learning algorithm is used to iteratively optimize the parameters of the policy network; the specific formula is shown below:

[0125] ;

[0126] ;

[0127] in, and These represent the current interaction state vectors before and after the update, respectively. The system will then take the current script intervention action. The strategic value assessment value, The preset learning rate step size, R represents the temporal difference residual of the current action-state pair, and R is the instantaneous reward value output by the causal world model. Represents the next interaction state vector after the transition. Find the maximum value assessment value for all possible candidate verbal actions 'a'. As a preset future discount factor, As a conservative penalty coefficient, This represents the logarithmic natural base exponentiation summation penalty term over the entire speech action space A;

[0128] Once the conservative Q-learning algorithm converges, the marginal probability distribution of each action activated by the policy network on the full dataset is extracted. This marginal probability distribution is used as a reverse feedback mechanism to dynamically adjust the weight parameters of the edges connecting nodes in the aforementioned directed acyclic causal graph. The specific formula is shown below:

[0129] ;

[0130] in, This is the updated causal edge weight matrix. This is the historical causal edge weight matrix before the update; The preset smoothing update coefficient; The expected causal effect score matrix, the The partial derivative matrix is ​​obtained by performing partial derivative operations on the gradient sensitivity of each node's features during the forward propagation process of the converged policy network.

[0131] The gradient sensitivity of the policy network is fed back to the causal graph. By using the reverse feedback mechanism, the edge weights of nodes that induce single-node causal forces are dynamically increased, while the edge weights of nodes without substantial causal driving force are decreased, thereby achieving adaptive refinement and closed-loop evolution of the causal reasoning mechanism.

[0132] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0133] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the functional modules of the intelligent telemarketing script generation and optimization system based on natural language processing as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0134] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A smart telemarketing script generation and optimization system based on natural language processing, characterized in that: Specifically, it includes: The causal graph construction and embedding module is used to acquire historical telemarketing dialogue data and corresponding transaction result tags. It constructs a directed acyclic causal graph containing user profile features, dialogue events, sales strategies, and transaction result nodes through a causal discovery algorithm. It constructs a causal mask matrix based on the topological path of the directed acyclic causal graph and embeds the causal mask matrix into the self-attention calculation layer of the large language model. The attention mechanism of the large language model is constrained by the causal chain to suppress the attention scores of non-causally related nodes. The real-time interaction feature extraction module is used to extract explicit semantic features of users and implicit acoustic behavior features, including interruption timing, pitch change rate and silence duration, in parallel using a rolling time window during real-time calls, and fuse them to generate the current interaction state vector. The dynamic strategy reasoning module connects the real-time interactive feature extraction module and the causal graph construction and embedding module. It is used to abstract each candidate speech strategy into different intervention actions, and use the large language model embedded in the causal chain to calculate the individual therapeutic effect or conditional average therapeutic effect of each intervention action on the transaction result node under the current interactive state vector. It selects and generates the target speech text instruction that maximizes the conditional average therapeutic effect. The offline reinforcement learning adaptive iterative module is used to record the interaction state vector, the verbal strategy adopted, the state transition and the final result in a single call as offline experience data; to construct a causal world model using the offline experience data and the directed acyclic causal graph; to generate counterfactual samples for data augmentation in an offline environment using the causal world model; and to update the edge weight parameters in the directed acyclic causal graph using an offline reinforcement learning algorithm.

2. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 1, characterized in that: The cause-effect graph construction and embedding module specifically includes the following: Extract historical conversation records and corresponding binary transaction tags from the historical telemarketing database, and decouple multi-dimensional features to construct a variable set including user profile feature nodes, dialogue event feature nodes, sales strategy nodes, and transaction result nodes. A score-based greedy equivalence search algorithm is used for causal discovery. This involves accumulating directed edges and calculating the Global Bayesian Information Criterion (BIC) score in a forward greedy phase, followed by a backward elimination phase that progressively removes edges. The convergent output is a directed acyclic graph describing the internal logic mechanism of telemarketing. Where V is the set of nodes and E is the set of directed edges; The topological dependency between any two variables in a directed acyclic graph is calculated using the reachability matrix algorithm. A dimension is initialized based on the total length L of the input context sequence of the large language model. Causal mask matrix ; Causal mask matrix It is directly and rigidly injected into the self-attention calculation core of each Transformer decoder layer in the large language model. Through the causal chain constraint self-attention mechanism, it accurately converges to zero the final attention weight value of non-causal related positions.

3. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 2, characterized in that: The causal mask matrix The assignment rules, superposition calculation, and weight suppression formula specifically include: For any i-th and j-th tokens in the input sequence, retrieve their corresponding causal nodes in the directed acyclic graph; In a directed acyclic graph, if there is no direct directed edge between node i and node j and no blocking path connected by an intermediary variable, then node i and node j are determined to be non-causally related nodes. Based on the above rules, the elements of the causal mask matrix are assigned values, and the assignment formula is as follows: ; Force the superposition of causal mask matrices when calculating the attention weight score matrix. The formula for calculating its attention matrix is: ; ; in, Let Q be the original attention score matrix, K be the query vector obtained by linearly projecting the input feature vector onto a preset query matrix, K be the key vector obtained by linearly projecting the input feature vector onto a preset key matrix, and V be the value vector obtained by linearly projecting the input feature vector onto a preset value matrix. This indicates that the transpose matrix operation is performed on the key vector K. The head dimension size is set to the preset attention mechanism. This is a scaling factor used to prevent gradient vanishing. It is a normalized exponential function; When calculating the attention weight of the i-th token to the j-th non-causally related token, precise zeroing is achieved through the following normalized exponent operation: ; in, Let i be the final attention weight value assigned to j for the i-th token. This indicates that the element in the i-th row and k-th column of the attention score matrix after causal constraints is taken as the natural index.

4. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 1, characterized in that: The real-time interactive feature extraction module specifically includes the following: A rolling time window with a span of preset seconds W and a step size of preset seconds S is established for the captured real-time voice stream to segment continuous audio data stream segments, and explicit semantic feature extraction and implicit acoustic behavior feature extraction are performed in parallel. The audio data stream is segmented and fed into an online Automatic Speech Recognition (ASR) engine for text transcription, outputting the user's text stream for the current time period. A lightweight semantic encoder is then used to perform keyword matching and intent recognition on the user's text stream, transforming it into a fixed-dimensional explicit intent encoding vector. ; Used to characterize the type of objection a user may have regarding the literal expression; Extract multi-dimensional implicit acoustic behavior features from audio data stream slices, including pitch change rate. speech rate feature value Interruption timing feature vector and the feature value of silence duration between multiple rounds of dialogue interaction. ; The implicit unstructured behavioral features extracted above are temporally aligned and concatenated to construct an implicit acoustic feature vector. The calculation formula is as follows: ; in, The rate of change of pitch. For speech rate feature value, The feature vector for interruption timing. This is the feature value of the silence duration between current multi-turn dialogue interactions; Encoding explicit intent vectors using a multimodal fusion network With implicit acoustic eigenvectors Perform deep fusion to generate the current interaction state vector. The calculation formula is as follows: ; in, The expression `||` represents concatenating the explicit and implicit feature vectors end-to-end, and `||` represents the concatenation operation of feature vectors. The preset learnable multimodal fusion weight matrix, For a learnable bias vector, LayerNorm represents the layer normalization function.

5. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 4, characterized in that: The extraction of multi-dimensional implicit acoustic behavior features within audio data stream segments includes pitch change rate. speech rate feature value Interruption timing feature vector and the feature value of silence duration between multiple rounds of dialogue interaction. Specifically, it includes: Pitch change rate extraction: The fundamental frequency timing curve of the user's voice within the audio data stream slice is extracted using a fundamental frequency extraction algorithm; the first derivative of the fundamental frequency timing curve is calculated to obtain the pitch change rate. This is used to quantitatively characterize the intensity of a user's current emotional fluctuations; Speech rate feature extraction: The boundary of the syllables in the audio data stream is detected by the energy thresholding method, the number of syllables swallowed per unit time is calculated, and the speech rate feature value is output. ; Interruption timing feature extraction: Maintain a two-way audio monitoring channel. When the system-side speech synthesis TTS engine is executing the speech text output and simultaneously detects that the user's audio input level exceeds a preset threshold, a user interruption is determined. Record the difference between the user's start time and the system's start time for the current sentence of the speech text, and encode this difference into an interruption timing feature vector. If no interruption occurs, a preset baseline zero vector is assigned. Extraction of silence duration: When both the user side and the system side are in a low-level, no-sound state, clock accumulation is initiated, and the silence duration feature value between multiple rounds of dialogue interaction is output. .

6. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 1, characterized in that: The dynamic strategy reasoning module specifically includes the following: The M types of executable sales scripts in telemarketing are pre-mapped digitally and abstracted into corresponding sets of intervention actions. And a baseline reference action is preset as a blank control strategy. ;in, This represents the Mth candidate verbal intervention action in the set of intervention actions; Real-time reception of the current interaction state vector output by the real-time interaction feature extraction module The current interaction state vector and the set of intervention actions are input into a large language model that has been embedded with a causal mask matrix; Using the forward propagation logic of the large language model, calculate the current interaction state vector respectively. After implementing various specific sales techniques, the final transaction result is reached. The counterfactual probability; Based on the causal inference framework, a large language model is used to calculate the comparison between each candidate speech action and the baseline reference action. The conditional average therapeutic effect (CATE) score is used as the causal net benefit score of each verbal strategy in the current interaction state. The entire set of intervention actions is traversed, and the optimal target verbal action that maximizes the conditionally averaged therapeutic effect (CATE) score is selected using the maximum value retrieval operator. The specific formula is as follows: ; in, Represents the set of intervention actions All candidate intervention actions Find the average therapeutic effect under the corresponding conditions. Index the candidate intervention action that maximizes the score and return the corresponding optimal target speech action; Select the optimal target dialogue action Convert to conditional control labels, and associate them with the current interaction state vector. Both are fed into the decoding text generation layer of the large language model; under the self-attention mechanism constraint of the causal mask matrix, the large language model decodes and assembles the conditional control labels as hard control boundaries, and outputs specific target speech text instructions that conform to the current causal benefits.

7. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 6, characterized in that: The method utilizes a large language model to calculate the actions of each candidate speech item compared to a baseline reference action. The conditional average therapeutic effect (CATE) score is used as the causal net benefit score for each rhetorical strategy, and the calculation formula is as follows: ; in, This indicates that a verbal intervention action will be performed in the current interactive state. The resulting net causal benefit score and These respectively represent the forced application of verbal intervention actions in the current conversation state. and reference action The expected value of the transaction result output by the large language model. This represents the interference quantifier in causal inference, used to simulate external forced intervention.

8. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 1, characterized in that: The offline reinforcement learning adaptive iterative module specifically includes the following: After the call ends, record all interaction state vectors recorded throughout the entire call, the optimal target dialogue strategy adopted, and the next interaction state vector after the transition. And the final binary transaction result label Y, using time-series trajectories to... The data is packaged in the form of [format] and persistently stored in an offline historical database to construct an offline empirical dataset D of P groups of quaternion trajectory pairs, denoted as: Where P represents the total number of cumulative sessions; Using the constructed directed acyclic causal graph as a structural prior, a multi-task deep neural network including a state transition prediction network layer and a transformation result reward prediction network layer is trained using an offline experience dataset as a causal world model; taking the current interaction state vector and the applied verbal intervention action as input, the output is the predicted probability distribution of the next state and the immediate reward value R. For the real interaction states in the offline experience dataset, counterfactual intervention actions are forcibly applied to them in the offline environment. A massive amount of virtual counterfactual interaction trajectories are generated through simulation and inference using a causal world model to complete the data augmentation. The conservative Q-learning algorithm is used to iteratively optimize the parameters of the policy network. After the conservative Q-learning algorithm converges, the marginal probability distribution of each action activated in the policy network on the full dataset is extracted as a reverse feedback mechanism to dynamically adjust the weight parameters of the edges connecting nodes in the directed acyclic causal graph, thereby achieving adaptive refinement of the causal inference mechanism. The specific formula is shown below: ; in, This is the updated causal edge weight matrix. This is the historical causal edge weight matrix before the update; The preset smoothing update coefficient; The expected causal effect score matrix, the The partial derivative matrix is ​​obtained by performing partial derivative operations on the gradient sensitivity of each node's features during the forward propagation of the converged policy network.

9. The intelligent telemarketing script generation and optimization system based on natural language processing according to claim 8, characterized in that: The conservative Q-learning algorithm is used to iteratively optimize the parameters of the policy network, and the specific formula is shown below: ; ; in, and These represent the current interaction state vectors before and after the update, respectively. The system will then take the current script intervention action. The strategic value assessment value, The preset learning rate step size, R represents the temporal difference residual of the current action-state pair, and R is the instantaneous reward value output by the causal world model. Represents the next interaction state vector after the transition. Find the maximum value assessment value for all possible candidate verbal actions 'a'. As a preset future discount factor, As a conservative penalty coefficient, This represents the logarithmic natural base exponentiation summation penalty term for the entire speech action space A.