Intelligent customer service response method for power business and electronic equipment
By using feature dimensionality reduction and extension reconstruction technologies in the power business intelligent customer service system, combining feature fusion variables to generate response text that conforms to style characteristics, the problem of difficulty in taking into account the accuracy and style of response text in the existing system is solved, and the user experience and neural network training efficiency is improved.
Patent Information
- Application Number
- CN202510354200.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-19
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-11
AI Technical Summary
The existing intelligent customer service system for power services is difficult to ensure accuracy and meet specific style requirements when responding to text generation, and lacks the ability to understand and process the deep semantic characteristics of the text.
By obtaining the original power service response text and text response style guidance information, feature dimension reduction extraction and expansion reconstruction are performed in the target service response neural network, feature fusion and reconstruction are used to generate response text that conforms to style characteristics.
It improves the accuracy and style compliance of the response text, improves the user experience, simplifies the training process of neural networks, and reduces computing power consumption.
Smart Images

Figure CN120296123A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to an intelligent customer service response method for power services and an electronic device. Background Art
[0002] In the field of intelligent customer service for power services, with the diversification and personalization of user needs, the traditional response methods based on rules or templates are difficult to meet the service requirements of high quality and high efficiency. Therefore, it has become a trend to use machine learning technologies, especially deep learning technologies, to build intelligent customer service systems. However, there are still many challenges in the generation of response texts in existing intelligent customer service systems for power services.
[0003] How to ensure the accuracy of the response text while meeting specific style requirements is a major problem faced by existing systems. Secondly, traditional machine learning models often lack the ability to understand and process the deep semantic features of texts during the generation of response texts. This results in the generated response texts being semantically inaccurate or difficult to exhibit specific style features. Therefore, how to improve the model's ability to capture and process the deep semantic features of texts has become the key to improving the quality of response texts. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide an intelligent customer service response method for power services and an electronic device that can overcome or at least partially solve the above problems. The technical solution of this application is implemented as follows: On the one hand, this application provides an intelligent customer service response method for power services. The method includes: obtaining an original power service response text and obtaining text response style guidance information; in a target service response neural network, performing feature dimensionality reduction extraction on the original power service response text through the text response style guidance information to obtain a text dimensionality reduction implicit representation; in the target service response neural network, performing feature expansion and reconstruction on the text dimensionality reduction implicit representation through the text response style guidance information to obtain an expanded reconstruction implicit representation, and performing feature fusion and feature reconstruction on the text dimensionality reduction implicit representation and the expanded reconstruction implicit representation through a feature fusion variable to obtain a reconstructed implicit representation; the feature fusion variable is obtained by querying in a variable optimization space generated for power service training texts; the variable optimization space represents a relationship space generated by an initial fusion variable and text effect parameters obtained by reasoning on the power service training texts based on the initial fusion variable; based on the target service response neural network, performing reduction mapping on the reconstructed implicit representation to obtain a target power service response text, and the target power service response text has the text style features included in the text response style guidance information.
[0005] On the other hand, the present application provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor executes the program, the steps in the above-mentioned method are implemented.
[0006] The present application obtains power service training texts and response style guidance training information; in the neural network for training service responses, the power service training texts are subjected to feature dimensionality reduction extraction through the response style guidance training information to obtain a reduced-dimensional implicit representation of the training texts; in the neural network for training service responses, the reduced-dimensional implicit representation of the training texts is subjected to feature expansion and reconstruction through the response style guidance training information to obtain an expanded and reconstructed training implicit representation. The reduced-dimensional implicit representation of the training texts and the expanded and reconstructed training implicit representation are subjected to feature fusion and feature reconstruction through an initial fusion variable to obtain a trained and reconstructed implicit representation; based on the neural network for training service responses, a reduced mapping is performed on the trained and reconstructed implicit representation to obtain a trained response text, and a text effect parameter of the trained response text is obtained; a variable optimization space is generated based on the initial fusion variable and the text effect parameter, a feature fusion variable is queried in the variable optimization space, and the neural network for training service responses including the feature fusion variable is determined as the target neural network for service responses; the target neural network for service responses is used to generate power service response texts according to the text response style guidance information. The present application is based on adding a fusion variable to the neural network for service responses, converting the fusion variable for dimensionality reduction and expansion into a hyperparameter, enabling high-precision fine-tuning of the implicit representation constructed in the neural network for service responses, making the reconstructed text more accurate and of higher quality, and improving the user experience. In addition, based on generating a variable optimization space, the text effect parameter of the fusion variable is evaluated to adjust the fusion variable, and once again, the network effect and performance of the target neural network for service responses are improved. At the same time, because only the fusion variable is adjusted, the neural network does not consume a large amount of computing power during training, and the adjustment process of the neural network for service responses becomes simple, making it have higher variability and performance.
[0007] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the technical solution of the present application.
[0008] According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more clear about the above and other purposes, advantages and features of the present invention. Description of the Drawings
[0010] Some specific embodiments of the present invention will be described in detail hereinafter with reference to the accompanying drawings in an exemplary but non-limiting manner. The same reference numerals in the drawings denote the same or similar components or parts. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings: Figure 1 Schematic diagram of the implementation process of an intelligent customer service response method for power services provided by an embodiment of the present application; Figure 2 Flowchart of the acquisition process of the target service response neural network provided by an embodiment of the present application; Figure 3 Schematic diagram of the hardware entity of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0012] Next, with reference to Figures 1 to 3 An intelligent customer service response method for power services in an embodiment of the present invention will be described. This method can be executed by a processor of an electronic device. Herein, the electronic device may refer to a device with data processing capabilities such as a server, a laptop computer, a tablet computer, a desktop computer, etc. In the description of this embodiment, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of such features, that is, include one or more of such features. In the description of the present invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically and clearly defined. When a certain feature "includes or contains" a certain or certain features it covers, unless otherwise specifically described, this indicates that other features are not excluded and other features may be further included.
[0013] Unless otherwise clearly specified and defined, terms such as "set", "installed", "connected", "coupled", "fixed", etc. should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal connection of two components or the interaction relationship between two components, unless otherwise clearly defined. Those of ordinary skill in the art should be able to understand the specific meanings of the above terms in the present invention according to specific circumstances.
[0014] In addition, in the description of this embodiment, the first feature being "above" or "below" the second feature may include direct contact between the first and second features, or may include the situation where the first and second features are not in direct contact but are in contact through other features between them. That is, in the description of this embodiment, the first feature being "above", "above", and "on top of" the second feature includes the first feature being directly above and obliquely above the second feature, or merely indicating that the first feature has a higher horizontal height than the second feature. The first feature being "below", "beneath", or "under" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature.
[0015] In the description of this embodiment, the descriptions referring to terms such as "one embodiment", "some embodiments", "schematic embodiments", "examples", "specific examples", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0016] Figure 1 The following is a schematic implementation flowchart of a method for intelligent customer service response of power services provided for the embodiments of this application. As Figure 1 shown, the method includes: Step S100: Obtain the original power service response text and obtain the text response style guidance information.
[0017] In step S100, the electronic device obtains the original power service response text. The original power service response text can be any text information related to power services, such as inquiries from users about electricity bill inquiries, power outage notifications, power failure repairs, etc., or preset answers from the system to these inquiries. Secondly, the electronic device obtains the text response style guidance information. The purpose of this step is to provide style guidance for the generation of the response text to ensure that the generated text is not only accurate in content but also appropriate in style. The text response style guidance information can include various factors, such as formality, friendliness, professionalism, conciseness, etc. These guidance information usually exist in the form of text tags, numerical scores, or vector representations. By parsing these guidance information, the electronic device can understand the response style expected by the user.
[0018] For example, for the response to an electricity bill inquiry, if the style expected by the user is friendly and professional, then the text response style guidance information may include tags such as "Friendliness: High" and "Professionalism: High", or a vector containing the scores of these two dimensions, such as [0.9, 0.8] (assuming the score range is from 0 to 1). After obtaining this guidance information, the electronic device will apply it to the subsequent text processing process to generate a response text that is both professional and friendly.
[0019] In actual operation, the ways for an electronic device to obtain the original power service response text and the text response style guidance information may vary depending on different application scenarios and system architectures. For example, in some cases, the original text may be directly input by the user, while the style guidance information is provided by the user selecting preset options or adjusting a slider. In other cases, both the original text and the style guidance information may be stored in a database, and the electronic device obtains this information by querying the database.
[0020] Step S200: In the target service response neural network, perform feature dimensionality reduction extraction on the original power service response text through the text response style guidance information to obtain a text dimensionality reduction implicit representation.
[0021] Feature dimensionality reduction aims to map high-dimensional data to a low-dimensional space while retaining as much of the key information of the original data as possible. For text data, feature dimensionality reduction can help extract the key semantic information in the text, remove redundancy and noise, and thus obtain a more compact and effective text representation. In Step S200, the electronic device uses the target service response neural network to achieve feature dimensionality reduction. This neural network is specifically trained to process power service response text. It contains multiple levels of network structures and complex non-linear transformations, and can capture the deep semantic features and style information in the text. When the original power service response text is input into the neural network, it will go through a series of transformations and processes, and finally be mapped to a low-dimensional implicit representation space.
[0022] In this process, the text response style guidance information plays a crucial role. These guidance information usually exist in the form of text labels, numerical scores, or vector representations, and they provide clear guidance for the feature dimensionality reduction process of the neural network. For example, if the text response style guidance information indicates that the response text has a "friendly and professional" style, then the neural network will tend to retain those features related to friendliness and professionalism during feature dimensionality reduction, while ignoring those features unrelated to these styles.
[0023] To achieve feature dimensionality reduction, the electronic device employs a series of complex computational and processing steps in the target business response neural network. For example, it includes convolutional operations, pooling operations, attention mechanisms, fully connected layers, etc. They jointly act on the original text data and gradually extract the key features in the text. During the process of feature dimensionality reduction, the electronic device also uses hyperparameters to adjust the behavior of the neural network. Hyperparameters are a set of parameters that are set before training the neural network. They do not participate in the acquisition process of the neural network but have an important impact on the performance of the neural network. For example, the learning rate, batch size, number of hidden layer units, etc. are all common hyperparameters. In step S200, the electronic device optimizes the effect of feature dimensionality reduction by adjusting these hyperparameters to ensure that the extracted text dimensionality reduction implicit representation can both retain the key information of the original text and meet the requirements of the text response style guidance information.
[0024] Step S300: In the target business response neural network, perform feature expansion and reconstruction on the text dimensionality reduction implicit representation through the text response style guidance information to obtain an expanded and reconstructed implicit representation. Perform feature fusion and feature reconstruction on the text dimensionality reduction implicit representation and the expanded and reconstructed implicit representation through a feature fusion variable to obtain a reconstructed implicit representation; the feature fusion variable is obtained by querying in the variable optimization space generated for the power business training text; the variable optimization space represents the relationship space generated by the initial fusion variable and the text effect parameters obtained by reasoning on the power business training text based on the initial fusion variable.
[0025] Feature expansion and reconstruction generally refers to, based on feature dimensionality reduction, mapping low-dimensional features back to a high-dimensional space in a certain way while performing feature reconstruction and optimization. The purpose of this step is to introduce new feature information while retaining the key information of the original text to enrich the semantic content and style features of the text. In step S300, the electronic device uses the target business response neural network to perform feature expansion and reconstruction on the text dimensionality reduction implicit representation to obtain an expanded and reconstructed implicit representation. During this process, the neural network maps the low-dimensional text dimensionality reduction implicit representation back to a higher-dimensional space through complex non-linear transformations and parameter adjustments, and introduces feature information related to the text response style guidance information during the mapping process.
[0026] The parameters used for feature expansion and reconstruction are hyperparameters, which are set before training the neural network and remain unchanged during the training process. The selection of hyperparameters has an important impact on the performance of the neural network. They determine key attributes such as the structure of the neural network, learning rate, regularization strength, etc. In step S300, the electronic device optimizes the effect of feature expansion and reconstruction by adjusting these hyperparameters to ensure that the expanded and reconstructed implicit representation can both retain the key information of the original text and meet the requirements of the text response style guidance information.
[0027] Next, the electronic device performs feature fusion and feature reconstruction on the text dimensionality reduction implicit representation and the extended reconstruction implicit representation through the feature fusion variable. The feature fusion variable is obtained by querying in the variable optimization space generated for the power service training text. This variable optimization space is a complex relationship space, which represents the relationship between the initial fusion variables and the text effect parameters obtained by reasoning (i.e., predicting) the power service training text based on these variables. During the training process, the electronic device gradually constructs this variable optimization space by continuously adjusting the values of the initial fusion variables and observing the impact of these variables on the text effect parameters. Once the variable optimization space is constructed, the electronic device can query the optimal feature fusion variable in this space for feature fusion and feature reconstruction.
[0028] The process of feature fusion and feature reconstruction is a complex non-linear transformation process. In this process, the electronic device uses the feature fusion variable to perform weighted summation or other forms of combination on the text dimensionality reduction implicit representation and the extended reconstruction implicit representation to obtain a new implicit representation. This new implicit representation contains both the key information of the original text, integrates the new feature information introduced in the extended reconstruction process, and also meets the requirements of the text response style guidance information. Subsequently, the electronic device performs further non-linear transformation and optimization on this new implicit representation to obtain the final reconstructed implicit representation.
[0029] Step S400: Based on the target service response neural network, perform inverse mapping on the reconstructed implicit representation to obtain the target power service response text, and the target power service response text has the text style features included in the text response style guidance information.
[0030] In step S400, the electronic device performs inverse mapping on the reconstructed implicit representation based on the target service response neural network, thereby generating the target power service response text. Inverse mapping refers to the process of converting the low-dimensional implicit representation after encoding processing back to the original data space. For text data, it is to convert the implicit representation (such as a vector or matrix) back to a human-readable text sequence. In step S400, the electronic device uses the decoder part in the target service response neural network to complete this task. The decoder is a complex neural network structure, which contains multiple layers of network units and connections, and can perform non-linear transformation and combination on the input low-dimensional implicit representation, and finally output a high-dimensional text sequence.
[0031] The electronic device uses the learned parameters and weights in the target service response neural network to perform a series of calculations and transformations on the reconstructed implicit representation. These calculations and transformations usually include steps such as linear transformation, application of non-linear activation functions, and application of attention mechanisms. Through these steps, the electronic device can gradually decode the information in the reconstructed implicit representation and combine it into a complete text sequence. After obtaining the target power service response text, it is fed back to the client logged in by the user to achieve intelligent customer service response.
[0032] Optionally, the decoding process also takes into account various constraints and requirements of text generation. For example, the generated text meets requirements such as grammatical rules, semantic coherence, and clear expression. In addition, since the goal of step S400 is to generate a response text with specific text style characteristics, the decoding process also takes into account the requirements of text style. In the target service response neural network, these requirements are usually achieved by introducing a style loss function during the training process. The style loss function calculates the difference between the generated text and the expected style, and continuously optimizes the neural network parameters during the training process to reduce this difference. During this process, the electronic device also uses advanced techniques such as attention mechanisms to improve the quality of the generated text. The attention mechanism is a neural network structure that can simulate human attention behavior. It can dynamically focus on different parts of the input implicit representation during the decoding process and adjust the attention weights according to the current decoding state. In this way, the electronic device can generate more accurate, coherent, and style-compliant response texts.
[0033] Please refer to Figure 2 , which is the acquisition process of the target service response neural network, including: Step S10: Obtain power service training texts and response style guidance training information.
[0034] In step S10, the electronic device obtains power service training texts and response style guidance training information. These two pieces of data are the basis for subsequent training of the target service response neural network to achieve high-quality power service intelligent customer service response. The power service training texts refer to a series of text data related to power services, which usually come from channels such as historical conversation records, customer service manuals, and official websites. When obtaining these texts, the electronic device performs a series of data cleaning and preprocessing tasks to ensure the accuracy and consistency of the text data. For example, the electronic device removes irrelevant information (such as advertisements, links, etc.) from the text, corrects spelling and grammar errors, and unifies the text format.
[0035] Response style guidance training information refers to a series of information used to guide a neural network to generate response texts that conform to a specific style. This information usually exists in the form of text tags, numerical scores, or vector representations, providing clear style guidance for the acquisition process of the neural network. For example, if the expected response text is to have a "friendly and professional" style, then the response style guidance training information may include text tags such as "Friendliness: High" and "Professionalism: High", or a vector containing the scores for these two dimensions, such as [0.9, 0.8] (assuming the score range is from 0 to 1).
[0036] When acquiring response style guidance training information, electronic devices usually adopt various methods. For example, manual annotation or automatic learning based on user feedback.
[0037] After obtaining the power business training text and response style guidance training information, the electronic device inputs this data into the acquisition process of the target business response neural network. The neural network will gradually master the relevant knowledge of the power business and the requirements of the response style through learning and understanding of this data. During the training process, the electronic device continuously adjusts the parameters and structure of the neural network to optimize its performance. For example, the electronic device can adopt the backpropagation algorithm to update the weights of the neural network so that it can better fit the training data; or adopt regularization techniques to prevent overfitting and improve the generalization ability of the neural network.
[0038] Step S20: In the neural network for training business responses, perform feature dimensionality reduction extraction on the power business training text through the response style guidance training information to obtain a reduced-dimensional implicit representation of the training text.
[0039] In step S20, the electronic device performs feature dimensionality reduction extraction on the power business training text in the neural network for training business responses through the response style guidance training information, thereby obtaining a reduced-dimensional implicit representation of the training text, aiming to extract the key features closely related to the response style and map these features to a low-dimensional implicit representation space. This processing not only helps reduce the dimensionality of the data and the computational complexity but also better captures the style information in the text, laying a foundation for subsequent feature expansion and reconstruction and response text generation.
[0040] Specifically, the electronic device inputs the power business training text into the neural network for training business responses, and the neurons in each layer of the network will process the input text layer by layer. During the processing, the network will use structures such as convolutional layers, pooling layers, and attention mechanisms to capture the local and global features in the text. At the same time, the network will also adjust the feature extraction process according to the response style guidance training information to ensure that the extracted features conform to the specified response style.
[0041] Taking the electricity bill query response as an example, assume that the power service training text is "May I ask how much my electricity bill is this month?", and the response style guide training information requires the generated response text to have a "friendly and professional" style. In this case, the electronic device inputs this text into the neural network, and the network will first use the convolutional layer to extract local features in the text, such as keywords like "electricity bill" and "how much". Then, the network will use the pooling layer to reduce the dimensionality of the features and remove redundant information. Next, the network will use the attention mechanism to weight the features and highlight those related to friendliness and professionalism. Finally, the network will output a low-dimensional implicit representation vector, which contains the key semantic information and response style features in the text.
[0042] Step S30: In the neural network for training business responses to be trained, the response style guide training information is used to perform feature expansion and reconstruction on the reduced-dimensional implicit representation of the training text, obtaining an extended and reconstructed training implicit representation. Through the initial fusion variable, feature fusion and feature reconstruction are performed on the reduced-dimensional implicit representation of the training text and the extended and reconstructed training implicit representation, obtaining a training reconstructed implicit representation.
[0043] In step S30, the electronic device performs feature expansion and reconstruction on the reduced-dimensional implicit representation of the training text through the response style guide training information, and realizes feature fusion and feature reconstruction through the initial fusion variable, finally obtaining a training reconstructed implicit representation. This step is an important link in the training process of the power service intelligent customer service response method. It involves in-depth processing and style conversion of text data, aiming to map the low-dimensional reduced-dimensional implicit representation of the text back to the high-dimensional space through the non-linear transformation ability of the neural network, and introduce new feature information during the mapping process to enrich the semantic content and style features of the text.
[0044] During the process of feature expansion and reconstruction, the response style guide training information provides clear guidance for the feature expansion and reconstruction process of the neural network, ensuring that the text after expansion and reconstruction can conform to the specified response style. For example, if the response style guide training information requires the generated response text to have a "friendly and professional" style, then the neural network will tend to introduce feature information related to friendliness and professionalism, such as polite expressions and professional terms, during feature expansion and reconstruction to enhance the style expressiveness of the text.
[0045] Specifically, the electronic device inputs the reduced - dimensional implicit representation of the training text into the up - dimensional layer of the neural network for business response to be trained. The up - dimensional layer uses a series of non - linear transformations (such as fully - connected layers, convolutional layers, etc.) to map the low - dimensional implicit representation back to the high - dimensional space, obtaining a preliminary extended reconstructed implicit representation. Then, this preliminary extended reconstructed implicit representation is fed into the reconstruction layer, and the reconstruction layer further reconstructs and optimizes the features according to the training information guided by the response style. During the reconstruction process, the reconstruction layer uses techniques such as the attention mechanism and gating mechanism to dynamically adjust the weights of the features, highlighting those features closely related to the response style and suppressing those unrelated to the style, thereby obtaining an extended reconstructed training implicit representation that better conforms to the specified style.
[0046] Next, the electronic device performs feature fusion on the reduced - dimensional implicit representation of the training text and the extended reconstructed training implicit representation using the initial fusion variables. The initial fusion variables are a set of parameters gradually optimized during the training process, which can balance the weights between the original text features and the extended reconstructed features, achieving effective feature fusion. During the feature fusion process, the electronic device performs weighted summation or other forms of combination on the reduced - dimensional implicit representation of the training text and the extended reconstructed training implicit representation, obtaining a fused implicit representation. This fused implicit representation contains both the key information of the original text and the new feature information introduced during the extended reconstruction process, providing richer and more diverse text materials for the subsequent generation of response texts.
[0047] Finally, the electronic device performs feature reconstruction on the fused implicit representation to obtain the final training reconstructed implicit representation. Feature reconstruction is a complex non - linear transformation process, which involves the recombining and optimizing of the fused features. During the feature reconstruction process, the electronic device uses the reconstruction layer in the neural network to perform further non - linear transformation and combination on the fused implicit representation, obtaining a more compact and effective text representation. This training reconstructed implicit representation will serve as the basis for the subsequent generation of response texts, helping the electronic device generate response texts that better meet the user's expectations.
[0048] Taking the electricity bill query response as an example, assume that the training text is dimensionally reduced and implicitly represented as a low-dimensional vector, which contains key information such as "electricity bill" and "query", and the response style guiding training information requires the generated response text to have a "friendly and professional" style. In this case, the electronic device first inputs this low-dimensional vector into the dimensionality-increasing layer of the neural network for training business responses to obtain a preliminary extended reconstruction implicit representation. Then, this preliminary extended reconstruction implicit representation is fed into the reconstruction layer, and the reconstruction layer further reconstructs and optimizes the features according to the response style guiding training information, introducing feature information related to friendliness and professionalism, such as polite expressions and professional terms like "Dear user" and "Please check your electricity bill". Next, the electronic device uses the initial fusion variable to perform feature fusion on the dimensionally reduced implicit representation of the training text and the extended reconstruction training implicit representation to obtain a fused implicit representation. Finally, the electronic device performs feature reconstruction on this fused implicit representation to obtain a final training reconstruction implicit representation, such as "[Dear user], Hello! Please check your electricity bill to obtain the electricity bill information for this month." This training reconstruction implicit representation contains both the key information in the original text and meets the specified response style requirements.
[0049] Step S40: Based on the neural network for training business responses, perform inverse mapping on the training reconstruction implicit representation to obtain the training response text, and obtain the text effect parameters of the training response text.
[0050] In step S40, the electronic device performs inverse mapping on the training reconstruction implicit representation based on the neural network for training business responses, thereby obtaining the training response text, and further obtaining the text effect parameters of these texts. This step is an important link in the training process of the intelligent customer service response method for the power business. It involves converting the implicit representation after dimensionality reduction, extended reconstruction, and feature fusion processing back into a human-readable text form and evaluating the quality and style compliance of these texts.
[0051] During the inverse mapping process, the electronic device uses the parameters and weights already learned in the neural network for training business responses to perform a series of calculations and transformations on the training reconstruction implicit representation. These calculations and transformations usually include steps such as linear transformation, application of non-linear activation functions, and application of attention mechanisms. Through these steps, the electronic device can gradually decode the information in the training reconstruction implicit representation and combine it into a complete text sequence. This text sequence is the training response text, which contains the key information of the original power business training text and has undergone style conversion and optimization processing.
[0052] After obtaining the training response texts, the electronic device further obtains the text effect parameters of these texts. The text effect parameters are a set of metrics used to evaluate text quality and style compliance, which can help the electronic device understand whether the generated text meets user expectations and training requirements. In the intelligent customer service response method for power services, the text effect parameters may include aspects such as the feature commonality metric value between the text and the response style guidance training information, the fluency of the text, and the semantic accuracy of the text.
[0053] Taking the feature commonality metric value as an example, it is usually used to evaluate the similarity between the generated text and the specified response style. The electronic device calculates a certain distance or similarity metric (such as cosine similarity, Euclidean distance, etc.) between the training response text and the response style guidance training information to obtain a feature commonality metric value. The larger this value, the more similar the generated text is to the specified response style, and the higher the style compliance.
[0054] The fluency of the text is another important text effect parameter, which is used to evaluate whether the generated text is smooth, natural, and easy to understand. The electronic device can use natural language processing techniques to evaluate the fluency of the training response text, such as evaluating the fluency of the text by calculating metrics such as the rationality of word collocations and the grammatical correctness of sentences in the text.
[0055] The semantic accuracy of the text is also one of the important metrics for evaluating text quality. It is used to evaluate whether the generated text accurately conveys the key information in the original power service training text. The electronic device can evaluate the semantic accuracy of the text by comparing the semantic similarity or key information matching degree between the training response text and the original text.
[0056] After obtaining the text effect parameters, the electronic device uses these parameters to evaluate the quality and style compliance of the training response text, and further optimizes and adjusts the neural network for the business response to be trained according to the evaluation results. For example, if the evaluation results show that there are deficiencies in the style compliance of the generated text, the electronic device can adjust the parameters and structure of the neural network to enhance its learning ability for style features; if the evaluation results show that there are problems in the semantic accuracy of the generated text, the electronic device can strengthen the ability to extract and retain the key information of the original text.
[0057] Step S50: Generate a variable optimization space based on the initial fusion variable and the text effect parameters, query the feature fusion variable in the variable optimization space, and determine the neural network for the business response to be trained including the feature fusion variable as the target neural network for the business response; the target neural network for the business response is used to generate power service response texts according to the text response style guidance information.
[0058] In step S50, the electronic device generates a variable optimization space based on the initial fusion variable and the text effect parameter, and queries for the feature fusion variable in this space to determine the final target service response neural network. This step is a key link in the training process of the power service intelligent customer service response method, which involves the optimization selection of the fusion variable in the neural network to ensure that the generated response text can accurately reflect the expected style of the user and have high-quality text effects.
[0059] The variable optimization space refers to a set composed of a group of possible variable values, and these variable values are associated with a specific objective function in a certain way (such as mathematical formulas, algorithms, etc.). In step S50, the variable optimization space is jointly composed of the initial fusion variable and the text effect parameter. The initial fusion variable is a parameter preset during the training process and is used to balance the weights between the original text features and the extended reconstruction features; while the text effect parameter is obtained by evaluating the training response text and is an index used to reflect the text quality and style compliance.
[0060] The electronic device generates a preliminary variable optimization space according to the relationship between the initial fusion variable and the text effect parameter. Each point in this space represents a group of possible fusion variable values and the corresponding text effect parameters. Then, the electronic device uses a certain optimization algorithm (such as the gradient descent method, genetic algorithm, etc.) to search for the optimal feature fusion variable in this space. This optimal feature fusion variable should be able to achieve the best balance in terms of style compliance and text quality of the generated response text.
[0061] During the search process, the electronic device continuously evaluates the text effect parameters corresponding to different fusion variable values and adjusts the search direction according to the evaluation results. Specifically, the electronic device can calculate a certain measure (such as mean, variance, etc.) of the text effect parameters corresponding to each fusion variable value and update the search strategy based on these measure values. For example, if the mean of the text effect parameters corresponding to a certain fusion variable value is high and the variance is small, it means that this variable value performs stably and excellently in generating high-quality response texts, and the electronic device can tend to select this variable value as the feature fusion variable.
[0062] Once the optimal feature fusion variable is found, the electronic device fixes this variable value and includes it in the neural network of the service response to be trained. At this time, this neural network is determined as the target service response neural network. The target service response neural network has learned how to generate power service response texts that meet the expected style of the user according to the text response style guidance information and has high text quality and style compliance.
[0063] As an implementation method, step S10, obtaining the power service training text and the response style guidance training information, includes: Step S11: Obtain the business response neural network to be trained, obtain the historical dialogue text, and the training sample library corresponding to the business response neural network to be trained; the business response neural network to be trained is a pre-trained neural network. Step S12: Obtain the power business training text with the text style features contained in the historical dialogue text in the training sample library, and generate the response style guidance training information according to the historical dialogue text.
[0064] In step S11, the electronic device obtains the business response neural network to be trained, as well as the historical dialogue text and the corresponding training sample library.
[0065] For the acquisition of the business response neural network to be trained, the electronic device selects a pre-trained neural network from a pre-prepared model library as the starting point. This neural network has usually been preliminarily trained on a large amount of general text data and has certain text processing and understanding capabilities. Selecting a pre-trained neural network as the starting point can accelerate the convergence speed of the subsequent training process and improve the generalization ability of the model. For example, this pre-trained neural network may be a large language model based on the Transformer architecture, which has been trained on millions or even billions of text data and can capture rich semantic information and grammatical structures.
[0066] Next, the electronic device collects the historical dialogue text and obtains the training sample library corresponding to the business response neural network to be trained. The historical dialogue text refers to the real dialogue records that occurred in the power business scenario in the past, which contain the user's questions, the system's answers, and the relevant context information. These dialogue texts provide valuable materials for the training of the neural network and help the model learn how to understand and generate response texts that conform to the power business scenario. The training sample library is a collection containing a large amount of power business-related text data, and these data are used to train the neural network to identify and understand specific concepts and patterns in the power business. When obtaining the training sample library, the electronic device can consider factors such as data diversity, coverage, and quality to ensure that the trained model can handle various complex power business scenarios.
[0067] In step S12, the electronic device uses the training sample library and the historical dialogue text to generate the power business training text and the response style guidance training information. This step is a crucial part of the training process, which determines which text features and style patterns the neural network will learn.
[0068] First, the electronic device searches in the training sample library for power service training texts with text style features similar to those of the historical dialogue text. This process involves the recognition and matching of text styles. Text style is a complex and multi-dimensional concept, which may include aspects such as the form of language (such as word choice, sentence structure, etc.), the theme of the content (such as power failure repair reports, electricity bill inquiries, etc.), and the expression of emotions (such as friendly, professional, serious, etc.). To accurately recognize and match text styles, the electronic device can adopt style classification algorithms or models in natural language processing technology. For example, it can use a pre-trained style classifier to label the styles of the texts in the training sample library, and screen out texts with styles similar to those of the historical dialogue text as power service training texts according to the labeling results.
[0069] After screening out the power service training texts, the electronic device generates response style guidance training information based on the historical dialogue text. The response style guidance training information is a set of information used to guide the neural network to generate response texts that conform to a specific style. This information usually exists in the form of text tags, numerical scores, or vector representations, providing clear style guidance for the acquisition process of the neural network. When generating the response style guidance training information, the electronic device can adopt various methods. One way is manual annotation. The electronic device invites a group of experts or customer service staff with relevant experience to annotate the styles of the historical dialogue texts. These experts will, based on their experience and judgment, assign one or more style tags to each text, or give a style score. Another method is automatic learning based on user feedback. The electronic device collects the evaluations and feedback of users on the generated response texts during actual use, and automatically extracts the style features expected by users through natural language processing technology and machine learning algorithms, and uses them as response style guidance training information.
[0070] In summary, steps S11 and S12 are the key steps executed by the electronic device in the process of obtaining power service training texts and response style guidance training information. By obtaining the pre-trained neural network, collecting historical dialogue texts and the training sample library, and generating response style guidance training information based on the historical dialogue text, the electronic device provides rich learning materials and clear style guidance for the subsequent neural network training. The implementation of these steps not only helps to improve the training efficiency and performance of the neural network, but also helps to generate response texts that better meet the expectations of users, thereby enhancing the overall service quality and user experience of the power service intelligent customer service system.
[0071] As an implementation method, step S12, obtaining the power service training text with the text style features included in the historical dialogue text in the training sample library, includes: Step S121: Identify the training dialogue texts of the training business texts included in the training sample library, obtain the commonality metric value between the training dialogue texts of the training business texts and the historical dialogue texts, and determine the training business texts corresponding to the training dialogue texts with a commonality metric value not less than the commonality threshold as the power business training texts.
[0072] Step S121 identifies the training dialogue texts of the training business texts in the training sample library and calculates the commonality metric values between these training dialogue texts and the historical dialogue texts. The commonality metric value is a quantitative indicator used to measure the similarity degree between two texts in terms of style, theme, sentiment, etc. In the context of the power business intelligent customer service response method, the commonality metric value can help the electronic device find the training business texts that are closest in style to the historical dialogue texts, thus providing high-quality learning materials for subsequent neural network training.
[0073] First, the electronic device traverses each training business text in the training sample library and extracts its corresponding training dialogue text. These training dialogue texts usually contain the user's questions, the system's answers, and relevant context information, which are the real dialogue records in the power business scenario. By extracting the training dialogue texts, the electronic device can provide the basic data for subsequent calculation of the commonality metric value.
[0074] Next, the electronic device uses a certain algorithm or model to calculate the commonality metric value between the training dialogue text and the historical dialogue text. This calculation process may involve multiple steps such as text vectorization and similarity calculation. Text vectorization is the process of converting text into numerical vectors, which can convert the information such as words and sentences in the text into a numerical form that can be processed by the computer. Similarity calculation is to evaluate the similarity degree between two texts based on these numerical vectors. In the context of the power business intelligent customer service response method, the electronic device can use common similarity calculation methods such as cosine similarity and Euclidean distance to evaluate the commonality metric value between the training dialogue text and the historical dialogue text.
[0075] When calculating the commonality metric value, the electronic device also sets a commonality threshold. The commonality threshold is a threshold value used to screen the power business training texts, which determines which training business texts will be selected as the power business training texts. Usually, the commonality threshold will be set according to actual needs to ensure that the selected power business training texts are close enough in style to the historical dialogue texts.
[0076] Once the commonality metric values between all the training dialogue texts and the historical dialogue texts are calculated, the electronic device compares these values with a commonality threshold. For the training dialogue texts whose commonality metric values are not less than the commonality threshold, the electronic device determines the corresponding training service texts as power service training texts. These power service training texts will be used in the subsequent neural network training process to guide the neural network to learn how to generate response texts that conform to a specific style.
[0077] Taking the electricity bill query response as an example, assume the historical dialogue text is "May I ask how much my electricity bill is this month?". In step S121, the electronic device traverses each training service text in the training sample library and extracts the corresponding training dialogue text. Then, the electronic device uses algorithms such as cosine similarity to calculate the commonality metric values between these training dialogue texts and the historical dialogue text. Assume the commonality threshold is set to 0.8 (i.e., the cosine similarity between two texts reaching or exceeding 0.8 is considered close enough), then the electronic device screens out the training service texts corresponding to the training dialogue texts whose commonality metric values are not less than 0.8 as power service training texts. These power service training texts may include sentences such as "Please provide the electricity bill for this month." and "Your electricity bill for this month is XX yuan. Please pay it in time.", which are all similar in style to the historical dialogue text and are suitable for subsequent neural network training.
[0078] By calculating the commonality metric values between the training dialogue texts and the historical dialogue texts and setting a commonality threshold for screening, the electronic device can find the training service texts that are closest in style to the historical dialogue text as power service training texts. This process not only helps improve the efficiency and performance of neural network training but also helps generate response texts that better meet user expectations, thus enhancing the overall service quality and user experience of the power service intelligent customer service system.
[0079] Alternatively, as another implementation manner, step S12 of obtaining power service training texts with the text style features included in the historical dialogue text in the training sample library includes: Step S12A: Obtain initial training service texts with the text style features included in the historical dialogue text in the training sample library, and determine the initial training service texts as power service training texts.
[0080] Alternatively, step S12B: Obtain initial training service texts with the text style features included in the historical dialogue text in the training sample library, and perform text adjustment on the initial training service texts to obtain power service training texts.
[0081] In step S12A, the electronic device directly searches the training sample library for initial training business texts whose historical dialogue texts contain text style features and determines them as power business training texts. This method is relatively simple and direct, relying on the diversity and richness of the training sample library to ensure that texts meeting the requirements can be found.
[0082] Specifically, the electronic device searches the training sample library according to the style features of the historical dialogue text (such as friendliness, professionalism, formality, etc.). The search process may involve the application of text style classification algorithms or models that can automatically identify the style features of the text and match them with the style features of the historical dialogue text. Once an initial training business text with similar style features is found, the electronic device determines it as the power business training text for subsequent neural network training.
[0083] However, the method in step S12A also has certain limitations. Due to the limited diversity and richness of the training sample library, the electronic device may not always be able to find initial training business texts that fully meet the requirements. In addition, even if similar texts are found, there may be subtle differences in language expression, sentence structure, etc., which can affect the effect of neural network training.
[0084] To overcome these limitations, the electronic device can also adopt the method in step S12B. In step S12B, the electronic device also searches the training sample library for initial training business texts whose historical dialogue texts contain text style features, but then performs text adjustment processing on these texts to obtain more compliant power business training texts.
[0085] Text adjustment is a complex process involving natural language processing techniques, aiming to optimize the quality and style of the text by modifying aspects such as language expression, sentence structure, and vocabulary selection. In step S12B, the electronic device can adopt various text adjustment techniques, such as grammar checking, semantic optimization, style conversion, etc. These techniques can help the electronic device adjust the initial training business text into a more smooth, grammar-free and specific-style power business training text.
[0086] Taking the electricity bill query response as an example, assume that the electronic device finds an initial training business text in the training sample library: "Your electricity bill for this month is XX yuan. Please pay it as soon as possible." Although this text is similar to the historical dialogue text in content, its language expression is a bit rigid and lacks friendliness. In step S12B, the electronic device adjusts this text, such as adding polite expressions and adjusting the sentence structure, to obtain a power business training text that is more in line with the "friendly and professional" style: "Dear user, hello! Your electricity bill for this month is XX yuan. Please pay it in time. Thank you for your cooperation." Through the text adjustment process in step S12B, the electronic device can generate a power service training text that better meets the requirements, thereby improving the effect of neural network training and the quality of the response text. At the same time, this method also increases the flexibility of the electronic device in selecting the training sample library. Even if the initial training service text has slight differences in style, it can be made to meet the requirements through text adjustment.
[0087] As an implementation, the training text dimensionality reduction implicit representation includes an initial retained implicit representation, an internal semantic enhanced implicit representation, and a combined semantic association implicit representation. In step S20, in the service response neural network to be trained, the power service training text is subjected to feature dimensionality reduction extraction through the response style guiding training information, obtaining the training text dimensionality reduction implicit representation, including: Step S21: In the service response neural network to be trained, residual analysis is performed on the training text features corresponding to the power service training text to obtain the initial retained implicit representation; Step S22: Internal weight focusing is performed on the initial retained implicit representation to obtain the internal semantic enhanced implicit representation; Step S23: Obtain the training guiding implicit representation corresponding to the response style guiding training information, and combine the internal semantic enhanced implicit representation with the training guiding implicit representation to obtain the combined semantic association implicit representation.
[0088] In step S21, the electronic device performs residual analysis on the training text features corresponding to the power service training text, thereby obtaining the initial retained implicit representation. Residual analysis is a commonly used technique in deep learning. It aims to retain the key information in the original data while reducing information loss during the transformation or conversion process. In the feature dimensionality reduction extraction of the power service training text, the electronic device uses the residual analysis technique to deeply process the training text features.
[0089] Specifically, the electronic device converts the power service training text into a numerical representation form suitable for neural network processing, such as a word embedding vector. Then, it uses structures such as convolutional layers and pooling layers in the neural network to extract features from the word embedding vector, obtaining a series of high-dimensional feature vectors. Next, the electronic device uses the residual connection technique to perform weighted summation on the original word embedding vector and the feature vectors after feature extraction, thereby obtaining the initial retained implicit representation. This representation not only contains the key information in the original text but also reduces information loss during the transformation process through the residual connection.
[0090] In step S22, the electronic device performs internal weight focusing on the initial retained implicit representation, thereby obtaining an internally semantically enhanced implicit representation. Internal weight focusing is a technique based on the attention mechanism that can dynamically adjust the weights of different parts when processing text data, thereby highlighting key information and suppressing redundant information. In feature dimensionality reduction extraction, the electronic device uses the internal weight focusing technique to further optimize the initial retained implicit representation.
[0091] Specifically, the electronic device uses the self-attention mechanism in the attention mechanism to perform weighted summation on each element in the initial retained implicit representation. In the self-attention mechanism, each element is compared with other elements, and weights are assigned according to their similarity. In this way, the electronic device can dynamically adjust the weights of different parts in the initial retained implicit representation, thereby highlighting the key information related to electricity bill query and suppressing other irrelevant information. Finally, the initial retained implicit representation after internal weight focusing processing is converted into an internally semantically enhanced implicit representation, which is semantically more focused on the core topic of electricity bill query.
[0092] Finally, in step S23, the electronic device obtains the training guidance implicit representation corresponding to the response style guidance training information and combines it with the internally semantically enhanced implicit representation, thereby obtaining a combined semantic association implicit representation. Combining is a technique for fusing information from different sources that can generate new and more meaningful information while retaining their respective information. In feature dimensionality reduction extraction, the electronic device uses the combining technique to fuse the internally semantically enhanced implicit representation with the training guidance implicit representation.
[0093] Specifically, the electronic device converts the response style guidance training information into a numerical representation form suitable for neural network processing, such as a style vector. Then, it uses the Cross Attention Mechanism to combine the internally semantically enhanced implicit representation with the style vector. In the cross-attention mechanism, each element in the internally semantically enhanced implicit representation is compared with each element in the style vector, and weights are assigned according to their similarity. In this way, the electronic device can effectively fuse the internally semantically enhanced implicit representation with the style vector, thereby obtaining a combined semantic association implicit representation that contains both the semantic information of electricity bill query and conforms to a specific response style.
[0094] Taking the electricity bill query response as an example, assume that the response style guidance training information requires the generated response text to have a "friendly and professional" style. The electronic device converts it into a style vector and uses the cross-attention mechanism to combine and process the internal semantic enhancement implicit representation with the style vector. The final combined semantic association implicit representation will contain both the semantic information of the electricity bill query (such as "electricity bill", "query") and conform to the "friendly and professional" response style (such as using polite terms, professional terms, etc.).
[0095] As an implementation manner, the process of obtaining the training text features includes: Step S201: Perform text embedding on the power business training text to obtain a training text embedding representation; Step S202: Generate training perturbation data according to the embedding dimension of the training text embedding representation; Step S203: Integrate the training text embedding representation and the training perturbation data to obtain training text features.
[0096] In step S201, the electronic device performs text embedding processing on the power business training text, thereby obtaining a training text embedding representation. Text embedding is a technology that converts text data into numerical vectors, which can convert information such as words and sentences in the text into a numerical form that can be processed by a computer. In the text embedding process of the power business training text, the electronic device adopts the word embedding technology, which is a commonly used text embedding method.
[0097] Specifically, the electronic device constructs a word embedding matrix, and each row of this matrix represents the embedding vector of a vocabulary. Then, it traverses each vocabulary in the power business training text, finds the corresponding embedding vector in the word embedding matrix, and splices these vectors in the order of the vocabulary in the text, thereby obtaining a high-dimensional training text embedding representation. This representation not only contains the vocabulary information in the text but also captures the semantic relationship between the vocabularies through the embedding vector. Taking the electricity bill query response as an example, assume that the power business training text is "May I ask how much my electricity bill is this month?". The electronic device constructs a word embedding matrix, then traverses each vocabulary in the text (such as "May I ask", "I", "this month", "electricity bill", "is", "how much", "?"), finds the corresponding embedding vector in the word embedding matrix, and splices these vectors to obtain a high-dimensional training text embedding representation. This representation may be a vector of several hundred dimensions or even several thousand dimensions, which contains the embedding vectors of each vocabulary in the text and the semantic relationship between them.
[0098] In step S202, the electronic device generates training perturbation data based on the embedding dimension of the training text embedding representation. Training perturbation data is a technique for enhancing the generalization ability of neural networks. It simulates the noise and variations in the real world by adding tiny perturbations to the original data. During the acquisition of training text features, the electronic device uses the training perturbation data to enrich the diversity of training samples and improve the robustness of the neural network.
[0099] Specifically, the electronic device randomly generates a series of small perturbation vectors with the same dimension as the embedding dimension of the training text embedding representation. Each element of these small perturbation vectors is randomly drawn from a pre-set perturbation range, such as [-0.1, 0.1]. Then, the electronic device adds these small perturbation vectors to each element of the training text embedding representation respectively, thus obtaining a series of training text embedding representations with perturbations. These training text embedding representations with perturbations are the training perturbation data, and together with the original training text embedding representations, they form a more abundant training sample set. Still taking the electricity bill query response as an example, assume that the embedding dimension of the training text embedding representation is 500. The electronic device randomly generates 500 small perturbation vectors within the range of [-0.1, 0.1] and adds them to each element of the training text embedding representation respectively, thus obtaining a series of training text embedding representations with perturbations. These training text embedding representations with perturbations are the training perturbation data, and together with the original training text embedding representations, they form a more abundant training sample set.
[0100] In step S203, the electronic device performs an integration process on the training text embedding representation and the training perturbation data, thereby obtaining the training text features. The integration process is a technique for fusing information from different sources. It can generate new and more meaningful information while retaining their respective information. During the acquisition of training text features, the electronic device uses the integration process technique to effectively fuse the original training text embedding representation and the training perturbation data.
[0101] Specifically, the electronic device uses concatenation to concatenate the training text embedding representation and the training perturbation data according to the element positions. The result after concatenation is a new high-dimensional vector that contains both the information of the original training text embedding representation and the diversity brought by the training perturbation data. This new high-dimensional vector is the training text feature, which will be used as the input data for subsequent neural network training.
[0102] Still taking the electricity bill query response as an example, assume that the embedding dimension of the training text embedding representation is 500, and N training perturbation data are generated (the embedding dimension of each perturbation data is also 500). The electronic device splices the original training text embedding representation and these N training perturbation data according to the element positions to obtain a new high-dimensional vector (its dimension is 500*(N + 1)). This new high-dimensional vector is the training text feature, which contains the information of the original training text embedding representation and the diversity brought by the training perturbation data.
[0103] Through this process, the electronic device can convert the original power service training text into a numerical representation form suitable for neural network processing and extract the key features therein. These features not only contain the lexical information and semantic relationships in the text, but also enrich the diversity of training samples through the introduction of training perturbation data, improving the generalization ability and robustness of the neural network. It provides strong support for subsequent feature expansion reconstruction and response text generation.
[0104] As an implementation manner, in step S30, in the service response neural network to be trained, the feature expansion reconstruction is performed on the dimensionality-reduced implicit representation of the training text through the response style guiding training information to obtain the expanded and reconstructed training implicit representation, and the feature fusion and feature reconstruction are performed on the dimensionality-reduced implicit representation of the training text and the expanded and reconstructed training implicit representation through the initial fusion variable to obtain the training reconstructed implicit representation, including: Step S31: If x ∈ (1, k], then in the x-th expansion and reconstruction component of the service response neural network to be trained, the feature expansion reconstruction is performed on the (x - 1)-th training reconstructed implicit representation through the response style guiding training information to obtain the x-th expanded and reconstructed training implicit representation, obtain the (k - x + 1)-th dimensionality-reduced implicit representation of the training text output by the (k - x + 1)-th dimensionality reduction extraction component, and perform feature fusion on the (k - x + 1)-th dimensionality-reduced implicit representation of the training text and the x-th expanded and reconstructed training implicit representation through the x-th initial fusion variable in the x-th expansion and reconstruction component to obtain the x-th training inference implicit representation. If x = k, then perform feature reconstruction on the k-th training inference implicit representation to obtain the training reconstructed implicit representation; k is the number of expansion and reconstruction components included in the service response neural network to be trained; Step S32: If x = 1, then in the first expansion and reconstruction component of the service response neural network to be trained, the feature expansion reconstruction is performed on the k-th dimensionality-reduced implicit representation of the training text through the response style guiding training information to obtain the first expanded and reconstructed training implicit representation, and perform feature fusion on the k-th dimensionality-reduced implicit representation of the training text and the first expanded and reconstructed training implicit representation through the first initial fusion variable to obtain the first training inference implicit representation.
[0105] In step S31, the electronic device performs operations of feature expansion and reconstruction, feature fusion, and feature reconstruction in different extended reconstruction components of the neural network for business response to be trained. The value range of variable x is from 1 to k, where k is the number of extended reconstruction components included in the neural network for business response to be trained.
[0106] When the value of x is within the range (1, k], the electronic device performs the following operations in the x-th extended reconstruction component: First, it performs feature expansion and reconstruction on the (x - 1)-th training reconstruction implicit representation using the response style guidance training information. Feature expansion and reconstruction is a complex process that involves non-linear transformation and expansion of the input implicit representation to introduce new feature information and enhance the expressive power of the implicit representation. In this process, the response style guidance training information plays a key guiding role, which helps the neural network understand and simulate response texts in a specific style.
[0107] After completing the feature expansion and reconstruction, the electronic device obtains the (k - x + 1)-th training text dimensionality-reduced implicit representation output by the (k - x + 1)-th dimensionality reduction and extraction component. This dimensionality-reduced implicit representation is obtained through the previous feature dimensionality reduction and extraction process, and it contains the key information of the original text but with a lower dimension. Next, the electronic device uses the x-th initial fusion variable in the x-th extended reconstruction component to perform feature fusion on the (k - x + 1)-th training text dimensionality-reduced implicit representation and the x-th extended reconstruction training implicit representation. Feature fusion is a process of effectively integrating feature information from different sources, which can help the neural network better understand and process complex text data. In this process, the initial fusion variable plays a role in adjusting and balancing different feature information.
[0108] After completing the feature fusion, the electronic device obtains the x-th training inference implicit representation. This inference implicit representation contains both the new feature information introduced in the expansion and reconstruction process and the key information in the dimensionality-reduced implicit representation. If the value of x is equal to k, that is, this is the processing process of the last extended reconstruction component, then the electronic device performs feature reconstruction on the k-th training inference implicit representation to obtain the final training reconstruction implicit representation. Feature reconstruction is a process of converting the inference implicit representation back to a higher-dimensional space, which aims to retain the key information in the inference implicit representation and generate response texts that conform to a specific style.
[0109] Next, look at step S32. When the value of x is equal to 1, the electronic device performs operations of feature expansion and reconstruction, feature fusion, and feature inference in the first extended reconstruction component of the neural network for business response to be trained. This step is similar to step S31 but with some subtle differences.
[0110] First, the electronic device uses the response style guidance training information to perform feature expansion and reconstruction on the dimensionality-reduced implicit representation of the k-th training text. Different from step S31, the input here is the dimensionality-reduced implicit representation output by the last dimensionality reduction extraction component, rather than the inference implicit representation output by the previous expansion and reconstruction component. After completing the feature expansion and reconstruction, the electronic device uses the first initial fusion variable to perform feature fusion on the dimensionality-reduced implicit representation of the k-th training text and the first expanded and reconstructed training implicit representation. This process is the same as the feature fusion process in step S31, aiming to effectively integrate the key information in the dimensionality-reduced implicit representation and the new feature information introduced in the expansion and reconstruction process.
[0111] After completing the feature fusion, the electronic device obtains the first training inference implicit representation. This inference implicit representation is the basis for the subsequent processing of the expansion and reconstruction component and an important part of the final training reconstruction implicit representation. Note that in step S32, the feature reconstruction operation will not be directly performed because the processing of all expansion and reconstruction components has not been completed at this time. The feature reconstruction operation will be performed after the processing of the last expansion and reconstruction component in step S31.
[0112] Taking the electricity bill query response as an example, assume that the neural network for training business responses to be trained contains 3 expansion and reconstruction components (i.e., k = 3). In step S31, when x = 2, the electronic device performs feature expansion and reconstruction on the first training reconstruction implicit representation in the second expansion and reconstruction component to obtain the second expanded and reconstructed training implicit representation. Then, it obtains the dimensionality-reduced implicit representation of the first training text output by the first dimensionality reduction extraction component and uses the second initial fusion variable to perform feature fusion on these two implicit representations to obtain the second training inference implicit representation. When x = 3, the electronic device performs feature expansion and reconstruction on the second training inference implicit representation in the third expansion and reconstruction component to obtain the third expanded and reconstructed training implicit representation. Then, it uses the third initial fusion variable to perform feature fusion on the third expanded and reconstructed training implicit representation and the dimensionality-reduced implicit representation of the first training text (note that this is actually a re-fusion of the fusion result of the second training inference implicit representation and the dimensionality-reduced implicit representation of the first training text) to obtain the third training inference implicit representation. Finally, the electronic device performs feature reconstruction on the third training inference implicit representation to obtain the final training reconstruction implicit representation.
[0113] In step S32, when x = 1, the electronic device performs feature expansion and reconstruction on the dimensionality-reduced implicit representation of the third training text in the first expansion and reconstruction component to obtain the first expanded and reconstructed training implicit representation. Then, it uses the first initial fusion variable to perform feature fusion on the first expanded and reconstructed training implicit representation and the dimensionality-reduced implicit representation of the third training text to obtain the first training inference implicit representation. This inference implicit representation will serve as the basis for the subsequent processing of the expansion and reconstruction component.
[0114] As an implementation manner, in step S40, obtaining the text effect parameter of the training response text includes: Step S41: Obtaining the feature commonality metric value between the training response text and the response style guideline training information, and obtaining the text goodness of the training response text; Step S42: Identifying the fluency of the training response text through a text fluency recognition network to obtain the text fluency of the training response text; Step S43: Fusing the feature commonality metric value, the text goodness, and the text fluency to obtain the text effect parameter of the training response text.
[0115] In step S41, the electronic device obtains the feature commonality metric value between the training response text and the response style guideline training information, and obtains the text goodness of the training response text.
[0116] The feature commonality metric value is a quantitative index used to measure the similarity degree between the training response text and the response style guideline training information at the feature level. In the intelligent customer service response method for power business, features may include multiple aspects such as word selection, sentence structure, and emotional expression. To calculate the feature commonality metric value, the electronic device first converts the training response text and the response style guideline training information into a numerical representation form suitable for comparison, such as word embedding vectors or feature vectors. Then, it uses a certain similarity calculation method (such as cosine similarity, Euclidean distance, etc.) to evaluate the similarity degree between these two numerical representations. The higher the feature commonality metric value, the more similar the training response text is to the response style guideline training information at the feature level and the more it conforms to the expected response style.
[0117] Taking the electricity bill query response as an example, assume that the response style guideline training information requires the generated response text to have a "friendly and professional" style. The electronic device converts the training response text (such as "Your electricity bill for this month is XX yuan. Please pay it in time.") and the response style guideline training information into word embedding vectors or feature vectors, and calculates the cosine similarity between them as the feature commonality metric value. If the cosine similarity is high, it means that the training response text is relatively close to the "friendly and professional" style in terms of word selection, sentence structure, etc.
[0118] In addition to the feature commonality metric value, the electronic device also obtains the text goodness of the training response text. The text goodness is an index for comprehensively evaluating the text quality, and it may include multiple aspects such as semantic accuracy, information integrity, and logical coherence. To obtain the text goodness, the electronic device can adopt the text quality evaluation models or algorithms in the existing natural language processing technologies. These models or algorithms can automatically analyze the text content and give corresponding quality scores. The higher the text goodness, the better the training response text performs in terms of semantics, information, logic, etc.
[0119] In step S42, the electronic device uses a text fluency recognition network to recognize the fluency of the training response text to obtain the text fluency. Text fluency is one of the important indicators for evaluating text quality. It reflects the smoothness and naturalness of the text in language expression. A text with high fluency is usually easier to be understood and accepted by readers.
[0120] The text fluency recognition network is a neural network model specifically used to evaluate text fluency. It may include multiple levels of network structures and complex non-linear transformations, and can capture the language features and fluency information in the text. During the training process, the electronic device collects a large amount of text data with labeled fluency as training samples and uses these data to train the text fluency recognition network. Once the training is completed, the electronic device can use this network to recognize the fluency of new training response texts. Taking the electricity bill query response as an example, assume the training response text is "Your electricity bill for this month is XX yuan. Please pay it in time." The electronic device inputs it into the text fluency recognition network, and the network will analyze and evaluate the vocabulary, sentence patterns, grammar, etc. in the text and give a fluency score. This score reflects the smoothness and naturalness of the text in language expression.
[0121] In step S43, the electronic device performs a fusion process on the feature commonality metric value, text goodness, and text fluency to obtain the text effect parameter of the training response text. The text effect parameter is an indicator for comprehensively evaluating the performance of the training response text. It comprehensively considers the matching degree between the text and the training information of the response style guide, the quality of the text, and the fluency of the text.
[0122] To perform the fusion process, the electronic device can adopt the method of weighted summation. Specifically, it assigns a weight coefficient to each parameter, and these weight coefficients reflect the importance of the parameters in the text effect evaluation. Then, it multiplies the value of each parameter by its corresponding weight coefficient and sums up the obtained results to get the final text effect parameter. The assignment of the weight coefficients may be based on experience, experiments, or the results of optimization algorithms.
[0123] Taking the electricity bill query response as an example, assume that the weight coefficients of the feature commonality metric value, text goodness, and text fluency are 0.4, 0.3, and 0.3 respectively (these coefficients are assumed and may be determined by an optimization algorithm in actual applications). The electronic device multiplies these weight coefficients by the corresponding parameter values and sums them up to obtain the final text effect parameter. For example, if the feature commonality metric value is 0.85 (indicating that the text is highly similar to the response style guide training information), the text goodness is 0.9 (indicating high text quality), and the text fluency is 0.8 (indicating relatively high text fluency), then the final text effect parameter will be 0.4 * 0.85 + 0.3 * 0.9 + 0.3 * 0.8 = 0.86. This parameter value reflects the comprehensive performance of the training response text in multiple aspects.
[0124] As an implementation manner, the method further includes: Step S401: Obtain the numerical interval of the commonality metric influence coefficient, and obtain the network training target information. Obtain the commonality metric influence coefficient in the numerical interval of the commonality metric influence coefficient according to the network training target information; Step S402: Determine the supplementary influence coefficient according to the commonality metric influence coefficient, and divide the supplementary influence coefficient into the goodness influence coefficient and the fluency influence coefficient.
[0125] Based on this, in step S43, fuse the feature commonality metric value, text goodness, and text fluency to obtain the text effect parameter of the training response text, including: Step S431: Fuse the feature commonality metric value, text goodness, and text fluency through the commonality metric influence coefficient, goodness influence coefficient, and fluency influence coefficient to obtain the text effect parameter of the training response text.
[0126] In step S401, the electronic device performs three key tasks: obtaining the numerical interval of the commonality metric influence coefficient, obtaining the network training target information, and obtaining the commonality metric influence coefficient in the numerical interval of the commonality metric influence coefficient according to the network training target information.
[0127] The commonality metric influence coefficient is a coefficient used to adjust the weight of the feature commonality metric value in the text effect parameter. It reflects the importance degree of the feature commonality metric value in the overall evaluation. The numerical interval of the commonality metric influence coefficient is a preset range that limits the upper and lower limits of the possible values of the commonality metric influence coefficient. This interval is usually determined based on experience, experiments, or domain knowledge to ensure the rationality of the commonality metric influence coefficient.
[0128] The network training target information refers to the goals or requirements that an electronic device expects to achieve when training a neural network. These goals or requirements may include improving the accuracy of the response text, enhancing the stylistic expressiveness of the text, improving the fluency of the text, etc. The network training target information is preset.
[0129] Once the numerical range of the commonality metric influence coefficient and the network training target information are obtained, the electronic device selects a suitable commonality metric influence coefficient from the numerical range of the commonality metric influence coefficient according to the network training target information. The selection of this coefficient may be based on a certain optimization algorithm or strategy to ensure that it can best reflect the requirements of the network training target information for the feature commonality metric value.
[0130] Taking the electricity bill query response as an example, assume that the numerical range of the commonality metric influence coefficient is [0.1, 0.9], and the network training target information is "to improve the matching degree between the response text and the response style guidance training information". The electronic device can select a relatively high commonality metric influence coefficient, such as 0.7, from the numerical range of the commonality metric influence coefficient according to this target information. This coefficient indicates that when evaluating the training response text, the feature commonality metric value will occupy a larger weight to emphasize the matching degree between the text and the response style guidance training information.
[0131] In step S402, the electronic device determines the supplementary influence coefficient according to the commonality metric influence coefficient, and divides the supplementary influence coefficient into the goodness influence coefficient and the fluency influence coefficient.
[0132] The supplementary influence coefficient is a coefficient used to adjust the weights of text goodness and text fluency in the text effect parameters. Since the commonality metric influence coefficient already occupies part of the weight, the remaining weight is distributed by text goodness and text fluency. The supplementary influence coefficient is the sum of this part of the remaining weight.
[0133] To determine the supplementary influence coefficient, the electronic device subtracts the commonality metric influence coefficient from 1 to obtain the sum of the remaining weights. Then, it divides this sum into the goodness influence coefficient and the fluency influence coefficient. The division of these two coefficients may be based on a certain ratio or strategy to ensure that they can reasonably reflect the importance degrees of text goodness and text fluency in the overall evaluation.
[0134] Taking the electricity bill query response as an example, assume that the commonality metric influence coefficient is 0.7, then the supplementary influence coefficient is 1 - 0.7 = 0.3. The electronic device can divide the supplementary influence coefficient according to a certain ratio (such as 1:1) into the goodness influence coefficient and the fluency influence coefficient, that is, each coefficient accounts for 0.15. This indicates that when evaluating the training response text, text goodness and text fluency will each occupy 15% of the weight.
[0135] Finally, let's look at step S431. In this step, the electronic device uses the commonality metric influence coefficient, the goodness influence coefficient, and the fluency influence coefficient to perform a fusion process on the feature commonality metric value, the text goodness, and the text fluency to obtain the text effect parameter for training the response text.
[0136] The fusion process usually involves the method of weighted summation. Specifically, the electronic device first calculates the product of each parameter and its corresponding influence coefficient, and then sums these products to obtain the final text effect parameter. This parameter comprehensively reflects the performance of the training response text in multiple aspects such as feature commonality, text goodness, and text fluency.
[0137] Taking the electricity bill query response as an example, assume that the feature commonality metric value is 0.85, the text goodness is 0.9, the text fluency is 0.8, the commonality metric influence coefficient is 0.7, the goodness influence coefficient is 0.15, and the fluency influence coefficient is 0.15. The electronic device first calculates the product of each parameter and its corresponding influence coefficient: 0.85 * 0.7 = 0.595 (the contribution of the feature commonality metric value), 0.9 * 0.15 = 0.135 (the contribution of the text goodness), 0.8 * 0.15 = 0.12 (the contribution of the text fluency). Then, it sums these products: 0.595 + 0.135 + 0.12 = 0.85. This value is the text effect parameter of the training response text, which comprehensively reflects the performance of the text in multiple aspects.
[0138] This process not only considers the matching degree between the text and the response style guidance training information, but also comprehensively considers the quality and fluency of the text, providing a more comprehensive evaluation index for the subsequent neural network optimization. By continuously optimizing the neural network parameters and structure, the electronic device can generate response texts that better meet the user's expectations and training requirements, improving the overall performance and service quality of the power business intelligent customer service system.
[0139] As an implementation method, the process of determining the initial fusion variable includes: Step S1: Obtain the first variable value range and the second variable value range. Arbitrarily construct S first initial variables in the first variable value range and S second initial variables in the second variable value range, where S ≥ 1. The first initial variables are used to adjust the weights of the dimensionality-reduced implicit representation of the training text, and the second initial variables are used to adjust the weights of the extended reconstruction training implicit representation; Step S2: Merge the S first initial variables and the S second initial variables to obtain S initial fusion variables, and each initial fusion variable includes a first initial variable and a second initial variable.
[0140] In step S1, the electronic device performs two key tasks: obtaining the numerical ranges of the first variable and the second variable, and arbitrarily constructing S first initial variables and second initial variables within these ranges.
[0141] The numerical ranges of the variables are preset ranges that limit the upper and lower bounds of the possible values of the initial variables. These ranges are usually determined based on experience, experiments, or domain knowledge to ensure the rationality and effectiveness of the initial variables. Within the numerical range of the first variable, the electronic device constructs S first initial variables, which will be used to adjust the weights of the dimensionality-reduced implicit representation of the training text. Weight adjustment is a common technique that allows the electronic device to dynamically adjust the weights of feature information from different sources during the feature fusion process to optimize the final fusion result. Similarly, within the numerical range of the second variable, the electronic device constructs S second initial variables, which will be used to adjust the weights of the extended reconstruction training implicit representation.
[0142] Taking the electricity bill query response as an example, assume that the numerical range of the first variable is [0.1, 0.9], the numerical range of the second variable is also [0.1, 0.9], and S = 3. The electronic device randomly selects three values within the range [0.1, 0.9] as the first initial variables, such as 0.3, 0.6, and 0.8. Similarly, it also randomly selects three values within the range [0.1, 0.9] as the second initial variables, such as 0.2, 0.5, and 0.7. These initial variables will be used in the subsequent feature fusion and weight adjustment processes.
[0143] In step S2, the electronic device combines the S first initial variables and the S second initial variables to obtain S initial fusion variables. Each initial fusion variable includes a first initial variable and a second initial variable, which are used to adjust the weights of the dimensionality-reduced implicit representation of the training text and the extended reconstruction training implicit representation, respectively.
[0144] The combination process is relatively simple. The electronic device only needs to combine the first initial variable and the second initial variable at the corresponding positions. Taking the electricity bill query response as an example, assume that the electronic device has obtained three first initial variables (0.3, 0.6, 0.8) and three second initial variables (0.2, 0.5, 0.7). Then, through combination, it will obtain three initial fusion variables: (0.3, 0.2), (0.6, 0.5), and (0.8, 0.7). These initial fusion variables will play a key role in the subsequent feature fusion process.
[0145] It should be noted that the process of determining the initial fusion variables is a random and repeatable process. Since the electronic device constructs the initial variables arbitrarily within the preset variable value range, different initial fusion variables can be obtained each time this process is executed. This randomness helps the electronic device explore different feature fusion schemes during the training process, thereby finding the optimal solution.
[0146] In addition, the value of S is also an important parameter. It determines the number of initial fusion variables, and thus affects the complexity and computational amount of the feature fusion process. In practical applications, the electronic device can select an appropriate value of S according to specific task requirements and computing resources. Generally speaking, a larger value of S means more initial fusion variables and a more complex feature fusion process, but it may also bring better performance and effects. On the contrary, a smaller value of S means fewer initial fusion variables and a simpler feature fusion process, but it may sacrifice certain performance and effects.
[0147] Finally, it is emphasized that the process of determining the initial fusion variables is only a part of the entire feature fusion and weight adjustment process. In the subsequent acquisition process, the electronic device will also continuously optimize the values of these variables according to the text effect parameters of the training response text to find the optimal feature fusion scheme. This optimization process may involve complex calculations and optimization algorithms, but the ultimate goal is to improve the quality and style compliance of the response text.
[0148] In summary, the process of determining the initial fusion variables is a carefully designed step, which involves the selection of the variable value range, the construction of the initial variables, and the combination of the initial fusion variables. Through this process, the electronic device can generate a series of initial fusion variables for feature fusion and weight adjustment, providing strong support for the subsequent training and optimization processes.
[0149] As an implementation method, the number of initial fusion variables is S, the number of training information for response style guidance is R, and both S and R are integers greater than 1; the number of training response texts is S×R. Based on this, in step S50, generating a variable optimization space based on the initial fusion variables and the text effect parameters, and querying for feature fusion variables in the variable optimization space includes: Step S51: According to the statistical values of the text effect parameters corresponding to the R training information for response style guidance under each initial fusion variable, obtain the initial variable scores corresponding to the S initial fusion variables respectively; Step S52: Combine the S initial fusion variables and the initial variable scores corresponding to the S initial fusion variables to form S binary group data; each binary group data includes an initial fusion variable and the initial variable score corresponding to the initial fusion variable; Step S53: Generate a variable optimization space according to the S binary group data; Step S54: If the maximum variable score in the variable optimization space is stable, then determine the fusion variable corresponding to the maximum variable score in the variable optimization space as the feature fusion variable; Step S55: If the maximum variable score in the variable optimization space is unstable, then obtain the updated fusion variable related to the maximum variable score in the variable optimization space, and obtain the text effect parameters of the R response style guidance training messages under the updated fusion variable.
[0150] In step S51, the electronic device calculates the initial variable scores corresponding to the S initial fusion variables respectively according to the statistical values of the text effect parameters corresponding to the R response style guidance training messages under each initial fusion variable. The initial variable score is a quantitative index, which reflects the ability of the initial fusion variable to generate high-quality response texts.
[0151] Specifically, the electronic device traverses all the initial fusion variables (the number is S). For each initial fusion variable, it further traverses all the response style guidance training messages (the number is R). For each combination of an initial fusion variable and a response style guidance training message, the electronic device generates a training response text and calculates the text effect parameter of this text. The text effect parameter is a comprehensive index for evaluating text quality, which may include multiple aspects such as feature commonality metric, text goodness, text fluency, etc.
[0152] After completing the processing of all combinations, the electronic device performs statistical processing on the R text effect parameters under each initial fusion variable to obtain an initial variable score. This score may be an average value, a median or other statistic, which reflects the overall performance of the initial fusion variable in generating high-quality response texts.
[0153] Taking the electricity bill query response as an example, assume that the number of initial fusion variables is 3 (S = 3) and the number of response style guidance training messages is 4 (R = 4). Then, the electronic device will generate 12 (3 * 4) training response texts and calculate the text effect parameter of each text. Then, for each initial fusion variable (such as initial fusion variable 1), the electronic device calculates the average value of its corresponding 4 text effect parameters as the initial variable score. In this way, the electronic device will obtain 3 initial variable scores, corresponding to 3 initial fusion variables respectively.
[0154] In step S52, the electronic device combines the S initial fusion variables with their corresponding initial variable scores into S binary group data. Each binary group data includes an initial fusion variable and the initial variable score corresponding to this variable. These binary group data will be used for the construction of the subsequent variable optimization space.
[0155] Taking the electricity bill query response as an example, assume that the electronic device has obtained 3 initial fusion variables (initial fusion variable 1, initial fusion variable 2, initial fusion variable 3) and their corresponding initial variable scores (such as 0.85, 0.90, 0.88). Then, the electronic device will generate 3 binary tuple data: (initial fusion variable 1, 0.85), (initial fusion variable 2, 0.90), (initial fusion variable 3, 0.88).
[0156] In step S53, the electronic device generates a variable optimization space based on the S binary tuple data. The variable optimization space is an abstract concept that represents the relationship between the initial fusion variables and the initial variable scores. In the electronic device, this space may exist in the form of a certain data structure (such as a two-dimensional array, hash table, etc.) for storing and querying binary tuple data.
[0157] The generation process of the variable optimization space may involve some complex calculations and optimization algorithms. For example, the electronic device can adopt a certain clustering algorithm to identify the dense regions and sparse regions in the variable optimization space so as to find the optimal solution more quickly in the subsequent query process. In addition, the electronic device can also adopt a certain search algorithm (such as a greedy algorithm, genetic algorithm, etc.) to search for the optimal feature fusion variable in the variable optimization space.
[0158] Taking the electricity bill query response as an example, assume that the electronic device has generated 3 binary tuple data. Then, these data will form a discrete point set in the variable optimization space. The electronic device can adopt a certain algorithm to sort or group these points so as to find the optimal feature fusion variable more quickly in the subsequent query process.
[0159] In step S54, the electronic device checks whether the maximum variable score in the variable optimization space is stable. The maximum variable score refers to the maximum value among all the initial variable scores in the variable optimization space, which corresponds to the optimal initial fusion variable. If the maximum variable score is stable (that is, the query results are the same or change very little for several consecutive times), then the electronic device determines the fusion variable corresponding to the maximum variable score as the feature fusion variable.
[0160] The stability check is an important step, which helps to ensure that the feature fusion variable found by the electronic device is reliable. If the maximum variable score is unstable (that is, the query results vary greatly for several consecutive times), then the electronic device cannot determine that the currently found feature fusion variable is optimal. In this case, the electronic device continues to execute step S55 to find a better feature fusion variable.
[0161] Taking the electricity bill query response as an example, assume that the electronic device has found the maximum variable score (e.g., 0.90) in the variable optimization space, and after multiple queries, it is found that this score is stable. Then, the electronic device determines the initial fusion variable corresponding to the maximum variable score (e.g., initial fusion variable 2) as the feature fusion variable.
[0162] In step S55, if the maximum variable score is unstable, then the electronic device executes step S55 to find a better feature fusion variable. In this step, the electronic device obtains updated fusion variables related to the maximum variable score in the variable optimization space. The updated fusion variables may be some new fusion variables found near the maximum variable score, and they may have better performance.
[0163] Then, the electronic device recalculates the text effect parameters of these updated fusion variables under R response style guidance training information. This process is similar to step S51, but at this time, the electronic device focuses on the updated fusion variables rather than the initial fusion variables. By recalculating the text effect parameters, the electronic device can evaluate the performance of the updated fusion variables and find a better feature fusion variable.
[0164] Taking the electricity bill query response as an example, assume that the electronic device finds that the maximum variable score is unstable. Then, it can find some new fusion variables (e.g., minor variants of the initial fusion variable 2) in the variable optimization space as the updated fusion variables. Then, the electronic device recalculates the text effect parameters of these updated fusion variables under 4 response style guidance training information and finds the one with the best performance as the new feature fusion variable.
[0165] As an implementation manner, in step S100, obtaining the original power service response text includes: Step S110: Obtain an initialization factor, generate text mutation information according to the initialization factor, and determine the text mutation information as the original power service response text; or, obtain an initialization factor, generate text mutation information according to the initialization factor, obtain the input power service response text, and fuse the text mutation information with the input power service response text to obtain the original power service response text.
[0166] The first case of step S110: Directly generate text mutation information using the initialization factor and determine it as the original power service response text.
[0167] In this case, the electronic device obtains an initialization factor. The initialization factor is usually a random number, a noise vector, or other forms of random data, which is used to introduce randomness and diversity into the text generation process. By changing the value of the initialization factor, the electronic device can generate different text mutation information, thereby achieving text diversity.
[0168] Once the initialization factor is obtained, the electronic device generates text variation information based on this factor. Text variation information is information that simulates real text data but contains random variation or noise. It may be a randomly generated text sequence, a sentence containing random words, or a text representation that has undergone some transformation (such as adding noise, perturbation, etc.). By generating text variation information, the electronic device can provide rich materials for subsequent text processing and analysis.
[0169] After generating the text variation information, the electronic device determines it as the original power business response text. This means that in the next step, the electronic device will use this text variation information as input data to perform operations such as feature dimension reduction extraction, feature expansion reconstruction, feature fusion, and response text generation. Since the text variation information contains a certain degree of randomness and diversity, the generated response text may also have a certain degree of diversity and innovation.
[0170] Taking the electricity bill inquiry response as an example, suppose the electronic device generates a text variation message: "Your monthly fee is [random number] yuan." In this example, "[random number]" is a placeholder, indicating that the electronic device inserts a randomly generated number at this position. After this text variation message is determined to be the original power service response text, the electronic device can convert it into a specific response text in subsequent steps, such as "Your monthly fee is 120 yuan." The second situation of step S110: using the initialization factor to generate text variation information, and merging it with the input power business response text to obtain the original power business response text.
[0171] In this case, the electronic device will also first obtain an initialization factor and generate text variation information based on this factor. However, unlike the first case, the electronic device will also obtain an input power business response text. The input power business response text is an existing text data related to the power business, which may be a preset response template, a historical response record, or a query request entered by a user.
[0172] Once the text variation information and the input power business response text are obtained, the electronic device performs fusion processing on them. Fusion processing is a process of merging and integrating information from different sources. In text fusion, the electronic device can use various technologies to achieve this, such as text splicing, semantic merging, feature fusion, etc. Through fusion processing, the electronic device can combine the randomness and diversity in the text variation information with the specific content and structure in the input power business response text, thereby generating an original power business response text that contains both random variations and meets the requirements of the power business.
[0173] Taking the electricity bill query response as an example, assume that the input power service response text is: "Your electricity bill for this month is XX yuan." At the same time, the electronic device generates a text mutation information: "[random number] yuan." In this example, the electronic device can replace the "[random number]" in the text mutation information with the "XX" in the input power service response text, so as to obtain a fused original power service response text: "Your electricity bill for this month is [random number] yuan." Then, the electronic device can convert this fused text into a specific response text in subsequent steps, such as "Your electricity bill for this month is 120 yuan." Figure 3 It is a schematic diagram of the hardware entity of an electronic device provided by an embodiment of the present application, as Figure 3 shown. The hardware entity of the electronic device 1000 includes: a processor 1001 and a memory 1002. Among them, the memory 1002 stores a computer program that can run on the processor 1001, and when the processor 1001 executes the program, it implements the steps in the method of any one of the above embodiments.
[0174] As described above, only the implementation manners of the present application are provided, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, and all of them should be covered by the protection scope of the present application.
[0175] At this point, those skilled in the art should recognize that although multiple exemplary embodiments of the present invention have been shown and described in detail herein, still, without departing from the spirit and scope of the present invention, many other variations or modifications that conform to the principles of the present invention can be directly determined or derived based on the content disclosed by the present invention. Therefore, the scope of the present invention should be understood and determined to cover all these other variations or modifications.
Claims
1. An intelligent customer service response method for power services, characterized in that, The method includes: Obtaining an original power service response text and obtaining text response style guidance information; In the target service response neural network, performing feature dimensionality reduction extraction on the original power service response text through the text response style guidance information to obtain a text dimensionality reduction implicit representation; In the target service response neural network, performing feature expansion reconstruction on the text dimensionality reduction implicit representation through the text response style guidance information to obtain an expanded reconstruction implicit representation, and performing feature fusion and feature reconstruction on the text dimensionality reduction implicit representation and the expanded reconstruction implicit representation through a feature fusion variable to obtain a reconstructed implicit representation; the feature fusion variable is obtained by querying in a variable optimization space generated for power service training texts; the variable optimization space represents a relationship space generated by an initial fusion variable and text effect parameters obtained by reasoning on the power service training texts based on the initial fusion variable; Based on the target service response neural network, performing reduction mapping on the reconstructed implicit representation to obtain a target power service response text, and the target power service response text has text style features included in the text response style guidance information.
2. The method according to claim 1, wherein The obtaining process of the target service response neural network includes: Obtaining power service training texts and response style guidance training information; In the neural network to be trained for service response, performing feature dimensionality reduction extraction on the power service training texts through the response style guidance training information to obtain a training text dimensionality reduction implicit representation; In the neural network to be trained for service response, performing feature expansion reconstruction on the training text dimensionality reduction implicit representation through the response style guidance training information to obtain an expanded reconstruction training implicit representation, and performing feature fusion and feature reconstruction on the training text dimensionality reduction implicit representation and the expanded reconstruction training implicit representation through an initial fusion variable to obtain a training reconstructed implicit representation; Based on the neural network to be trained for service response, performing reduction mapping on the training reconstructed implicit representation to obtain a training response text, and obtaining text effect parameters of the training response text; Generating a variable optimization space based on the initial fusion variable and the text effect parameters, querying for a feature fusion variable in the variable optimization space, and determining the neural network to be trained for service response including the feature fusion variable as the target service response neural network; the target service response neural network is used to generate power service response texts according to text response style guidance information.
3. The method according to claim 2, wherein The obtaining of the power service training texts and the response style guidance training information includes: Obtaining a neural network to be trained for service response, obtaining historical dialogue texts and a training sample library corresponding to the neural network to be trained for service response; the neural network to be trained for service response is a pre-trained neural network; Obtaining power service training texts having text style features included in the historical dialogue texts in the training sample library, and generating response style guidance training information based on the historical dialogue texts.
4. The method according to claim 3, characterized in that, The obtaining of the power service training texts having text style features included in the historical dialogue texts in the training sample library includes: Identify the training dialogue text of the training business text included in the training sample library, obtain the commonality metric value between the training dialogue text of the training business text and the historical dialogue text, and determine the training business text corresponding to the training dialogue text whose commonality metric value is not less than the commonality threshold as the power business training text; Alternatively, obtaining the power business training text with the text style features included in the historical dialogue text in the training sample library includes: Obtain the initial training business text with the text style features included in the historical dialogue text in the training sample library, and determine the initial training business text as the power business training text; or, obtain the initial training business text with the text style features included in the historical dialogue text in the training sample library, and perform text adjustment on the initial training business text to obtain the power business training text.
5. The method according to claim 2, wherein The reduced-dimension implicit representation of the training text includes an initial retained implicit representation, an internal semantic enhancement implicit representation, and a combined semantic association implicit representation; In the neural network for training business responses to be trained, performing feature reduction extraction on the power business training text through the response style guiding training information to obtain a reduced-dimension implicit representation of the training text, including: In the neural network for training business responses to be trained, perform residual analysis on the training text features corresponding to the power business training text to obtain the initial retained implicit representation; Perform internal weight focusing on the initial retained implicit representation to obtain the internal semantic enhancement implicit representation; Obtain the training guiding implicit representation corresponding to the response style guiding training information, and combine the internal semantic enhancement implicit representation with the training guiding implicit representation to obtain the combined semantic association implicit representation; Among them, the process of obtaining the training text features includes: Perform text embedding on the power business training text to obtain a training text embedding representation; Generate training perturbation data according to the embedding dimension of the training text embedding representation; Integrate the training text embedding representation and the training perturbation data to obtain the training text features.
6. The method according to claim 2, wherein In the neural network for training business responses to be trained, perform feature expansion and reconstruction on the reduced-dimension implicit representation of the training text through the response style guiding training information to obtain an expanded and reconstructed training implicit representation, and perform feature fusion and feature reconstruction on the reduced-dimension implicit representation of the training text and the expanded and reconstructed training implicit representation through an initial fusion variable to obtain a training reconstructed implicit representation, including: If \(x\in(1,k]\), in the \(x\)-th extended reconstruction component of the neural network for training business responses to be trained, the \(x - 1\)-th training reconstruction implicit representation is subjected to feature extended reconstruction through the training information of the response style guidance to obtain the \(x\)-th extended reconstruction training implicit representation. The \((k - x + 1)\)-th training text dimensionality reduction implicit representation output by the \((k - x + 1)\)-th dimensionality reduction extraction component is obtained, and through the \(x\)-th initial fusion variable in the \(x\)-th extended reconstruction component, the \((k - x + 1)\)-th training text dimensionality reduction implicit representation and the \(x\)-th extended reconstruction training implicit representation are subjected to feature fusion to obtain the \(x\)-th training inference implicit representation. If \(x = k\), feature reconstruction is performed on the \(k\)-th training inference implicit representation to obtain the training reconstruction implicit representation; \(k\) is the number of extended reconstruction components included in the neural network for training business responses to be trained; If \(x = 1\), in the first extended reconstruction component of the neural network for training business responses to be trained, the \(k\)-th training text dimensionality reduction implicit representation is subjected to feature extended reconstruction through the training information of the response style guidance to obtain the first extended reconstruction training implicit representation, and through the first initial fusion variable, the \(k\)-th training text dimensionality reduction implicit representation and the first extended reconstruction training implicit representation are subjected to feature fusion to obtain the first training inference implicit representation; The obtaining of the text effect parameter of the training response text includes: Obtaining the feature commonality metric value between the training response text and the training information of the response style guidance, and obtaining the text goodness of the training response text; Performing fluency recognition on the training response text through a text fluency recognition network to obtain the text fluency of the training response text; Fusing the feature commonality metric value, the text goodness, and the text fluency to obtain the text effect parameter of the training response text.
7. The method according to claim 6, characterized in that The method further includes: Obtaining the numerical interval of the commonality metric influence coefficient and obtaining the network training target information, and obtaining the commonality metric influence coefficient in the numerical interval of the commonality metric influence coefficient according to the network training target information; Determining a supplementary influence coefficient according to the commonality metric influence coefficient, and dividing the supplementary influence coefficient into a goodness influence coefficient and a fluency influence coefficient; The fusing of the feature commonality metric value, the text goodness, and the text fluency to obtain the text effect parameter of the training response text includes: Fusing the feature commonality metric value, the text goodness, and the text fluency through the commonality metric influence coefficient, the goodness influence coefficient, and the fluency influence coefficient to obtain the text effect parameter of the training response text.
8. The method according to claim 2, wherein The determination process of the initial fusion variable includes: Obtain the numerical range of the first variable and the numerical range of the second variable. Arbitrarily construct S first initial variables within the numerical range of the first variable, and arbitrarily construct S second initial variables within the numerical range of the second variable, where S ≥ 1. The first initial variable is used to adjust the weight of the dimensionality-reduced implicit representation of the training text, and the second initial variable is used to adjust the weight of the extended reconstruction training implicit representation; Merge the S first initial variables and the S second initial variables to obtain S initial fusion variables, and each initial fusion variable includes a first initial variable and a second initial variable; The number of the initial fusion variables is S, and the number of the response style guidance training information is R. Both S and R are integers greater than 1; the number of the training response texts is S × R; generating a variable optimization space based on the initial fusion variable and the text effect parameter, and querying for a feature fusion variable in the variable optimization space includes: According to the statistical values of the text effect parameters respectively corresponding to the R response style guidance training information under each initial fusion variable, obtain the initial variable scores respectively corresponding to the S initial fusion variables; Form S binary data with the S initial fusion variables and the initial variable scores corresponding to the S initial fusion variables; each binary data includes an initial fusion variable and the initial variable score corresponding to the initial fusion variable; Generate a variable optimization space according to the S binary data; If the maximum variable score in the variable optimization space is stable, determine the fusion variable corresponding to the maximum variable score in the variable optimization space as the feature fusion variable; If the maximum variable score in the variable optimization space is unstable, obtain an updated fusion variable related to the maximum variable score in the variable optimization space, and obtain the text effect parameters of the R response style guidance training information under the updated fusion variable.
9. The method according to claim 8, characterized in that, The obtaining of the original power service response text includes: Obtain an initialization factor, generate text mutation information according to the initialization factor, and determine the text mutation information as the original power service response text; or, obtain an initialization factor, generate text mutation information according to the initialization factor, obtain an input power service response text, and fuse the text mutation information and the input power service response text to obtain the original power service response text.
10. An electronic device, comprising a memory and a processor, the memory storing a computer program that can run on the processor, characterized in that, When the processor executes the program, it implements the steps in the method according to any one of claims 1 to 9.