Customer service risk assessment method and system based on two-way feedback mechanism

By adopting a two-way feedback mechanism in customer service risk assessment, identifying and removing abnormal data, defining the weight calculation strategy of boundary division and individual position diffusion strategy, the model performance degradation and system convergence caused by abnormal data in the existing technology is solved, and the problem of model performance degradation and system convergence caused by abnormal data in the existing technology is realized. More efficient risk identification and service quality improvement.

CN118114985BActive Publication Date: 2024-12-31GUANGXI POWER GRID CO LTD NANNING POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410298843.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2024-12-31
Estimated Expiration
2044-03-15

AI Technical Summary

Technical Problem

The existing customer service risk identification methods have problems such as increased overfitting risk, degradation of model performance, overlapping classification boundaries and intra-class imbalance, and the system is locally converged, low risk identification accuracy and low model training efficiency.

Method used

Adopting a customer service risk assessment method based on a two-way feedback mechanism, by identifying abnormal data from a local and global perspective, defining a weight calculation strategy based on boundary division, reconstructing a generative adversarial network, initializing individual positions and dynamically adaptive positions updates, using distance similarity The degree and direction similarity strategy completes individual position diffusion, improving the training stability of the model and global search ability.

Benefits of technology

Effectively identify and remove abnormal data, reduce the adverse impact of weight calculation, improve model training stability and global search capabilities, accurately and quickly identify service risk types, improve geographical cloud maps, and improve service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118114985B_ABST
    Figure CN118114985B_ABST
Patent Text Reader

Abstract

The present invention discloses a customer service risk assessment method and system based on a two-way feedback mechanism, and the method includes: data collection, data preprocessing, adaptive weighted balancing data, building a customer service risk identification model and two-way feedback service optimization. The present invention belongs to the field of risk assessment technology, specifically refers to the comprehensive identification of abnormal data from both local and global perspectives, defining a weight calculation strategy based on boundary division, obtaining the total weights of boundary data and security data respectively, reconstructing a generative adversarial network based on a penalty loss function, adaptively synthesizing new data, and building a balanced data set; initializing individual positions based on a defined mapping function, dynamically adaptively updating positions, obtaining overall similarity based on distance similarity and direction similarity, using two strategies to complete individual position diffusion, finding the optimal model parameters, and completing model construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of risk assessment, and specifically refers to a customer service risk assessment method and system based on a two-way feedback mechanism. Background Art

[0002] The customer service risk assessment method is to collect customer feedback information, use big data and artificial intelligence technology to assess the risks in the customer service process, improve the geographic cloud map and feedback to customers, minimize service risks, and improve service quality and customer satisfaction. However, the data collected by the existing customer service risk identification method contains abnormal data, which makes the weight distribution unbalanced when balancing the data, resulting in increased overfitting risk and decreased model performance. There is an overlap between the classification boundaries between the majority class data and the minority class data, which leads to over-generalization when synthesizing new data, and there are a large number of sparse or dense subgroups in the minority class data, resulting in intra-class imbalance. The existing customer service risk identification system has problems such as local convergence, low risk identification accuracy, and low model training efficiency. Summary of the invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a customer service risk assessment method and system based on a two-way feedback mechanism. The data collected by the existing customer service risk identification method contains abnormal data, which leads to increased overfitting risk and decreased model performance, and there is overlap between the classification boundaries between the majority class data and the minority class data, as well as a large number of sparse or dense subgroups in the minority class data, which leads to intra-class imbalance. This scheme comprehensively identifies abnormal data from both local and global perspectives, accurately identifies and removes abnormal data, defines a weight calculation strategy based on boundary division, and obtains the total weights of boundary data and security data respectively, so as to solve the problems of class overlap and intra-class imbalance. Based on the penalty loss function The generative adversarial network is reconstructed to induce the model to learn a smoother distribution by constraining the gradient of the discriminator, thereby improving the training stability of the model; in view of the problems of local convergence, low risk identification accuracy and low model training efficiency in the existing customer service risk identification system, this scheme initializes individual positions based on the defined mapping function to improve the global search capability at the beginning of the iteration, dynamically adaptively updates the position, obtains the overall similarity based on distance similarity and direction similarity, uses two strategies to complete the individual position diffusion, improves the model's detection ability for different risks, completes the model construction, improves the model's global search capability and convergence accuracy, accurately and quickly identifies service risk types, improves the geographic cloud map, and improves service quality.

[0004] The technical solution adopted by the present invention is as follows: The customer service risk assessment method based on the two-way feedback mechanism provided by the present invention comprises the following steps:

[0005] Step S1: Data collection, collecting customer feedback data on geographic cloud map services and risk assessment types;

[0006] Step S2: Data preprocessing, data cleaning, data conversion, data normalization and data set division processing of the collected data;

[0007] Step S3: Adaptively weight and balance the data, comprehensively identify abnormal data from both local and global perspectives, define a weight calculation strategy based on boundary division, obtain the total weights of boundary data and safety data respectively, reconstruct the generative adversarial network based on the penalty loss function, adaptively synthesize new data, and construct a balanced data set;

[0008] Step S4: Build a customer service risk identification model, initialize individual positions based on the defined mapping function, dynamically and adaptively update positions, obtain overall similarity based on distance similarity and direction similarity, use two strategies to complete individual position diffusion, find the optimal model parameters, and complete model construction;

[0009] Step S5: Two-way feedback service optimization, collect real-time feedback data, timely understand and deal with service risks based on the service risk type output by the model, improve the geographic cloud map and feedback to customers.

[0010] Furthermore, in step S1, the data collection is to collect customer feedback data and risk assessment types on the geographic cloud map service; the customer feedback data on the geographic cloud map service includes geographic location information data of the customer service, customer service record data and customer behavior data; the customer service record data includes service type data, service content data, duration data and frequency data; the customer behavior data includes satisfaction rating data, complaint data and comment data; and the risk assessment type is used as a data label.

[0011] Furthermore, in step S2, the data preprocessing is to perform data cleaning, data conversion, data normalization and data set division on the collected data; data cleaning includes removing duplicate data, missing data and noise data; data conversion is to convert non-numeric data in the collected data into numerical form; data normalization is to scale the data using the minimum-maximum scaling method; and data set division is to construct a minority class data set and a majority class data set based on the data after data cleaning, data conversion and data normalization.

[0012] Furthermore, in step S3, the adaptive weighted balancing data specifically includes the following steps:

[0013] Step S31: removing abnormal data, identifying local abnormal data and global abnormal data in the minority class data set based on the local abnormal factor and a classification SVM respectively. When a minority class data is identified as local abnormal data and global abnormal data at the same time, the minority class data is determined to be abnormal data, and the abnormal data is deleted from the minority class data set, and the abnormal data in the majority class data set is deleted using the same method;

[0014] Step S32: define a weight calculation strategy based on boundary division, the steps are as follows:

[0015] Step S321: data partitioning, calculating the k nearest neighbor data of each minority class data in the minority class data set after removing the abnormal data. If the k nearest neighbor data of the minority class data contains the majority class data, the minority class data is divided into boundary data; otherwise, the minority class data is divided into safe data;

[0016] Step S322: Calculate the total weight of the boundary data. Calculate the density weight and distance weight of the boundary data respectively, and add them together to obtain the total weight of the boundary data. The formula used is as follows:

[0017] ;

[0018] ;

[0019] ;

[0020] In the formula, , and They are the boundary data q v The density weight, distance weight and total weight of KS (q v ) and KD(q v ) are respectively composed of the boundary data q v The set of minority class data and majority class data in the k nearest neighbor data, q v ,q a and q c They are the vth boundary data, KS (q v ) in the a-th minority class data and KD(q v ), v is the boundary data index, a and c are KS(q v ) and KD(q v ), ||·|| is the Euclidean distance between data, β is the weight balancing parameter, σ 2 (q v ) is the Gaussian kernel function at the boundary data q v The variance of the k nearest neighbor data;

[0021] Step S323: Calculate the total weight of the security data using the following formula:

[0022] ;

[0023] In the formula, It is safe data g The total weight, q g is the g-th security data, g is the security data index, K(q g ) is from the safety data g The set of k nearest neighbor data, f is K (q g ), σ 2 (q g ) is the Gaussian kernel function on the security data q g The variance of the k nearest neighbor data;

[0024] Step S33: Calculate the number of new data that need to be synthesized. Based on the total weight obtained in step S32, calculate the number of new data that need to be synthesized for each minority class data. The formula used is as follows:

[0025] ;

[0026] In the formula, L (q o ) is the minority class data q o The amount of new data that needs to be synthesized, is the minority class data q o The total weight, q o is the oth minority class data, o is the data index in the minority class data set after removing abnormal data, G1 and G2 are the number of data in the majority class data set and the minority class data set after removing abnormal data respectively;

[0027] Step S34: synthesize new data. The generative adversarial network consists of a generator F(·) and a discriminator M(·). The gradient penalty term of the discriminator is introduced into the loss function to obtain a penalty loss function. The generative adversarial network is reconstructed based on the penalty loss function, and new data is synthesized using the newly constructed generative adversarial network. The formula used is as follows:

[0028] ;

[0029] ;

[0030] Where U is the penalty loss function, m is the random noise data, q is the minority class data in the minority class data set after removing the abnormal data, z is the new data generated by the generator, and S m , S q and S z are the distributions of data m, q and z respectively, λ is the gradient penalty coefficient, is the gradient penalty term, is a random number uniformly sampled from [0, 1], E is the expected value, is the gradient of the discriminator with respect to the data z, It is the L2 paradigm;

[0031] Step S35: construct a balanced data set. A balanced data set is constructed based on the synthesized new data and the minority class data set and the majority class data set after removing abnormal data. 70% of the data is randomly selected from the balanced data set to construct a training data set, and a test data set is constructed based on the remaining 30% of the data.

[0032] Further, in step S4, the construction of the customer service risk identification model specifically includes the following steps:

[0033] Step S41: Initialize individual positions, pre-set the number of individuals to N, randomly generate the initial position A1 of the first individual based on the individual search space, define a mapping function, and generate the initial positions of the 2nd to Nth individuals based on A1 and the mapping function. The formula used is as follows:

[0034] ;

[0035] In the formula, A i+1 and A i are the initial positions of the i+1th and ith individuals, respectively, i is the individual index, ub and lb are the upper and lower limits of the individual search space, respectively, b1 and b2 are the first control value and the second control value of the mapping function, respectively, b1∈(0,1), b2∈(0,1), r1 is the first random number in the range of (0,1), mod(·) is the modulo function, is the defined mapping function;

[0036] Step S42: training the model, using model parameters to represent the position of the individual, using Python to import the sklearn library to call the SVM function based on the model parameters, training the customer service risk identification model based on the training data set, using the test data set to evaluate the performance of the model established based on the model parameters, and using the model performance as the individual fitness value;

[0037] Step S43: Dynamically adaptive position update, select the individual position with the highest fitness value and the individual position with the lowest fitness value as the optimal individual position A best and the worst individual position A worse , based on A best and A worse To update the location, the formula used is as follows:

[0038] ;

[0039] In the formula, Ai,j (h) and are the positions of the i-th individual before and after the update in the j-th dimension at the h-th iteration, j is the dimension index, D is the dimension of the individual search space, and A best,j (h) and A worse,j (h) are the optimal individual positions A at the hth iteration. best and the worst individual position in the jth dimension, r2 is the second random number in the range of (0, 1), Q is the third random number following the standard normal distribution, and h is the iteration number index;

[0040] Step S44: Perform position diffusion based on similarity, update the fitness values ​​of all individuals, and calculate the average fitness value Z of all individuals avg , when the individual fitness value is greater than or equal to the average fitness value Z avg When , the individual position remains unchanged; otherwise, the overall similarity of the individual position is calculated, and the individual position is diffused based on the overall similarity. The steps are as follows:

[0041] Step S441: Calculate the overall similarity of individual positions and pre-set the first reference position and the second reference position , ub1, ub j andub D are the upper limits of the individual search space in the 1st dimension, the jth dimension, and the Dth dimension, lb1, lb j and lb D are the lower limits of the individual search space in the 1st dimension, the jth dimension, and the Dth dimension, respectively. and Calculate the overall similarity of individual positions. The steps are as follows:

[0042] Step S4411: Calculate the distance similarity and direction similarity, using the following formula:

[0043] ;

[0044] ;

[0045] In the formula, B i (h) and C i (h) are the distance similarity and direction similarity of the i-th individual at the h-th iteration, and They are and Position in the jth dimension;

[0046] Step S4412: Calculate the overall similarity and pre-set the upper limit of the similarity threshold X u and the lower limit of similarity threshold Xp , based on X u and X P The overall similarity is calculated using the following formula:

[0047] ;

[0048] In the formula, ε i (h) is the overall similarity of the i-th individual at the h-th iteration;

[0049] Step S442: Position diffusion, calculate the average value ε of the overall similarity of all individuals undergoing position diffusion avg (h), if the overall similarity of individuals is greater than ε avg (h), then go to step S4421 and use the first strategy for position diffusion; otherwise go to step S4422 and use the second strategy for position diffusion. The strategy is as follows:

[0050] Step S4421: The first strategy, the formula used is as follows:

[0051] ;

[0052] In the formula, is the position of the i-th individual after position diffusion using the first strategy at the h-th iteration;

[0053] Step S4422: The second strategy uses the following formula:

[0054] ;

[0055] In the formula, is the position of the i-th individual after position diffusion using the second strategy at the h-th iteration, t(w) is the fourth random number that obeys the t-distribution with w degrees of freedom;

[0056] Step S45: Determine the optimal model parameters and pre-set the fitness threshold Z yz And the maximum number of iterations H, update the fitness values ​​of all individuals, get the current highest fitness value, when the highest fitness value is greater than the fitness threshold Z yz , select the model parameters corresponding to the individual position with the highest fitness value as the optimal model parameters, and complete the construction of the customer service risk assessment model based on the optimal model parameters; otherwise, if the maximum number of iterations H is reached, go to step S41; otherwise, add one to the iteration number index and go to step S43 to continue iterating.

[0057] Furthermore, in step S5, the two-way feedback service optimization is to continuously collect real-time feedback data from customers on the geographic cloud map service, timely understand and deal with the risks of the service based on the service risk type output by the model, continuously improve the geographic cloud map, and provide feedback to customers.

[0058] The customer service risk assessment system based on the two-way feedback mechanism provided by the present invention comprises a data acquisition module, a data preprocessing module, an adaptive weighted balance data module, a customer service risk identification model building module and a two-way feedback service optimization module;

[0059] The data collection module collects customer feedback data and risk assessment types on the geographic cloud map service, and sends the data to the data preprocessing module;

[0060] The data preprocessing module performs data cleaning, data conversion, data normalization and data set division processing on the collected data, and sends the data to the adaptive weighted balancing data module;

[0061] The adaptive weighted balance data module comprehensively identifies abnormal data from both local and global perspectives, defines a weight calculation strategy based on boundary division, obtains the total weights of boundary data and security data respectively, reconstructs the generative adversarial network based on the penalty loss function, adaptively synthesizes new data, constructs a balanced data set, and sends the data to the customer service risk identification model construction module;

[0062] The customer service risk identification model building module initializes individual positions based on the defined mapping function, dynamically and adaptively updates positions, obtains overall similarity based on distance similarity and direction similarity, uses two strategies to complete individual position diffusion, finds the optimal model parameters, completes model building, and sends data to the two-way feedback service optimization module;

[0063] The two-way feedback service optimization module collects real-time feedback data, timely understands and handles service risks based on the service risk type output by the model, improves the geographic cloud map and feeds back to the customer.

[0064] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0065] (1) The data collected by the existing customer service risk identification method contains abnormal data, which makes the weight distribution unbalanced when balancing the data, resulting in an increase in the risk of overfitting and a decrease in model performance. There is overlap in the classification boundary between the majority class data and the minority class data, which leads to over-generalization when synthesizing new data. There are also a large number of sparse or dense subgroups in the minority class data, which leads to the problem of intra-class imbalance. This scheme comprehensively identifies abnormal data from both local and global perspectives, accurately identifies and removes abnormal data, reduces misidentification, and mitigates the adverse effects on weight calculation. A weight calculation strategy based on boundary division is defined to obtain the total weights of boundary data and security data respectively to solve the problems of class overlap and intra-class imbalance. The generative adversarial network is reconstructed based on the penalty loss function, and the discriminator gradient is constrained to induce the model to learn a smoother distribution, thereby improving the training stability of the model.

[0066] (2) In view of the problems of local convergence, low risk identification accuracy and low model training efficiency in the existing customer service risk identification system, this scheme initializes individual positions based on the defined mapping function to improve the global search capability at the beginning of the iteration, dynamically and adaptively updates the position, obtains the overall similarity based on distance similarity and direction similarity, and uses two strategies to complete the diffusion of individual positions, improve the model's detection ability for different risks, avoid blindly searching for parameter space, quickly find the optimal model parameters, complete model construction, improve the model's global search capability and convergence accuracy, accurately and quickly identify service risk types, improve geographic cloud maps, and improve service quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A flow chart of a customer service risk assessment method based on a two-way feedback mechanism provided by the present invention;

[0068] Figure 2 A schematic diagram of a customer service risk assessment system based on a two-way feedback mechanism provided by the present invention;

[0069] Figure 3 is a schematic flow chart of step S3;

[0070] Figure 4 It is a schematic diagram of the process of step S4.

[0071] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0072] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0073] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.

[0074] Example 1, see Figure 1 The present invention provides a customer service risk assessment method based on a two-way feedback mechanism, the method comprising the following steps:

[0075] Step S1: Data collection, collecting customer feedback data on geographic cloud map services and risk assessment types;

[0076] Step S2: Data preprocessing, data cleaning, data conversion, data normalization and data set division processing of the collected data;

[0077] Step S3: Adaptively weight and balance the data, comprehensively identify abnormal data from both local and global perspectives, define a weight calculation strategy based on boundary division, obtain the total weights of boundary data and safety data respectively, reconstruct the generative adversarial network based on the penalty loss function, adaptively synthesize new data, and construct a balanced data set;

[0078] Step S4: Build a customer service risk identification model, initialize individual positions based on the defined mapping function, dynamically and adaptively update positions, obtain overall similarity based on distance similarity and direction similarity, use two strategies to complete individual position diffusion, find the optimal model parameters, and complete model construction;

[0079] Step S5: Two-way feedback service optimization, collect real-time feedback data, timely understand and deal with service risks based on the service risk type output by the model, improve the geographic cloud map and feedback to customers.

[0080] Example 2, see Figure 1This embodiment is based on the above embodiment. In step S1, data collection is to collect customer feedback data and risk assessment types on geographic cloud map services; customer feedback data on geographic cloud map services include geographic location information data of customer service, customer service record data and customer behavior data; customer service record data include service type data, service content data, duration data and frequency data; customer behavior data include satisfaction rating data, complaint data and comment data; and risk assessment type is used as a data label.

[0081] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, data preprocessing is to perform data cleaning, data conversion, data normalization and data set division processing on the collected data; data cleaning includes removing duplicate data, missing data and noise data; data conversion is to convert non-numeric data in the collected data into numerical form; data normalization is to scale the data using the minimum-maximum scaling method to eliminate the dimensional differences between different features; data set division is to construct a feedback data set based on the data after data cleaning, data conversion and data normalization, pre-set a division threshold, and take each data label as a category. If the amount of data belonging to the same category in the feedback data set is greater than or equal to the division threshold, the data of this category is divided into majority class data and a majority class data set is constructed. Otherwise, the data of this category is divided into minority class data and a minority class data set is constructed.

[0082] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, the adaptive weighted balancing data specifically includes the following steps:

[0083] Step S31: removing abnormal data, identifying local abnormal data and global abnormal data in the minority class data set based on the local abnormal factor and a classification SVM respectively. When a minority class data is identified as local abnormal data and global abnormal data at the same time, the minority class data is determined to be abnormal data, and the abnormal data is deleted from the minority class data set, and the abnormal data in the majority class data set is deleted using the same method;

[0084] Step S32: define a weight calculation strategy based on boundary division, the steps are as follows:

[0085] Step S321: data partitioning, calculating the k nearest neighbor data of each minority class data in the minority class data set after removing the abnormal data. If the k nearest neighbor data of the minority class data contains the majority class data, the minority class data is divided into boundary data; otherwise, the minority class data is divided into safe data;

[0086] Step S322: Calculate the total weight of the boundary data. Calculate the density weight and distance weight of the boundary data respectively, and add them together to obtain the total weight of the boundary data. The formula used is as follows:

[0087] ;

[0088] ;

[0089] ;

[0090] In the formula, , and They are the boundary data q v The density weight, distance weight and total weight of KS (q v ) and KD(q v ) are respectively composed of the boundary data q v The set of minority class data and majority class data in the k nearest neighbor data, q v ,q a and q c They are the vth boundary data, KS (q v ) in the a-th minority class data and KD(q v ), v is the boundary data index, a and c are KS(q v ) and KD(q v ), ||·|| is the Euclidean distance between data, β is the weight balancing parameter, σ 2 (q v ) is the Gaussian kernel function at the boundary data q v The variance of the k nearest neighbor data;

[0091] Step S323: Calculate the total weight of the security data using the following formula:

[0092] ;

[0093] In the formula, It is safe data g The total weight, q g is the g-th security data, g is the security data index, K(q g ) is from the safety data g The set of k nearest neighbor data, f is K (q g ), σ 2 (q g ) is the Gaussian kernel function on the security data q g The variance of the k nearest neighbor data;

[0094] Step S33: Calculate the number of new data that need to be synthesized. Based on the total weight obtained in step S32, calculate the number of new data that need to be synthesized for each minority class data. The formula used is as follows:

[0095] ;

[0096] In the formula, L (q o ) is the minority class data q o The amount of new data that needs to be synthesized, is the minority class data q o The total weight, q o is the oth minority class data, o is the data index in the minority class data set after removing abnormal data, G1 and G2 are the number of data in the majority class data set and the minority class data set after removing abnormal data respectively;

[0097] Step S34: synthesize new data. The generative adversarial network consists of a generator F(·) and a discriminator M(·). The gradient penalty term of the discriminator is introduced into the loss function to obtain a penalty loss function. The generative adversarial network is reconstructed based on the penalty loss function, and new data is synthesized using the newly constructed generative adversarial network. The formula used is as follows:

[0098] ;

[0099] ;

[0100] Where U is the penalty loss function, m is the random noise data, q is the minority class data in the minority class data set after removing the abnormal data, z is the new data generated by the generator, and S m , S q and S z are the distributions of data m, q and z respectively, λ is the gradient penalty coefficient, is the gradient penalty term, is a random number uniformly sampled from [0, 1], E is the expected value, is the gradient of the discriminator with respect to the data z, It is the L2 paradigm;

[0101] Step S35: construct a balanced data set. A balanced data set is constructed based on the synthesized new data and the minority class data set and the majority class data set after removing abnormal data. 70% of the data is randomly selected from the balanced data set to construct a training data set, and a test data set is constructed based on the remaining 30% of the data.

[0102] By performing the above operations, the data collected by the existing customer service risk identification method contains abnormal data, which makes the weight distribution unbalanced when balancing the data, resulting in an increase in the risk of overfitting and a decrease in model performance. There is an overlap in the classification boundary between the majority class data and the minority class data, which leads to over-generalization when synthesizing new data, and there are a large number of sparse or dense subgroups in the minority class data, resulting in the problem of intra-class imbalance. This scheme comprehensively identifies abnormal data from both local and global perspectives, accurately identifies and removes abnormal data, reduces misidentification, and mitigates the adverse effects on weight calculation. A weight calculation strategy based on boundary division is defined to obtain the total weights of boundary data and security data respectively to solve the problems of class overlap and intra-class imbalance. The generative adversarial network is reconstructed based on the penalty loss function, and the model is induced to learn a smoother distribution by constraining the gradient of the discriminator, thereby improving the training stability of the model.

[0103] Example 5, see Figure 1 and Figure 4 Based on the above embodiment, in step S4, building a customer service risk identification model specifically includes the following steps:

[0104] Step S41: Initialize individual positions, pre-set the number of individuals to N, randomly generate the initial position A1 of the first individual based on the individual search space, define a mapping function, and generate the initial positions of the 2nd to Nth individuals based on A1 and the mapping function. The formula used is as follows:

[0105] ;

[0106] In the formula, A i+1 and A i are the initial positions of the i+1th and ith individuals, respectively, i is the individual index, ub and lb are the upper and lower limits of the individual search space, respectively, b1 and b2 are the first control value and the second control value of the mapping function, respectively, b1∈(0,1), b2∈(0,1), r1 is the first random number in the range of (0,1), mod(·) is the modulo function, is the defined mapping function;

[0107] Step S42: training the model, using model parameters to represent the position of the individual, using Python to import the sklearn library to call the SVM function based on the model parameters, training the customer service risk identification model based on the training data set, using the test data set to evaluate the performance of the model established based on the model parameters, and using the model performance as the individual fitness value;

[0108] Step S43: Dynamically adaptive position update, select the individual position with the highest fitness value and the individual position with the lowest fitness value as the optimal individual position A best and the worst individual position A worse, based on A best and A worse To update the location, the formula used is as follows:

[0109] ;

[0110] In the formula, A i,j (h) and are the positions of the i-th individual before and after the update in the j-th dimension at the h-th iteration, j is the dimension index, D is the dimension of the individual search space, and A best,j (h) and A worse,j (h) are the optimal individual positions A at the hth iteration. best and the worst individual position in the jth dimension, r2 is the second random number in the range of (0, 1), Q is the third random number following the standard normal distribution, and h is the iteration number index;

[0111] Step S44: Perform position diffusion based on similarity, update the fitness values ​​of all individuals, and calculate the average fitness value Z of all individuals avg , when the individual fitness value is greater than or equal to the average fitness value Z avg When , the individual position remains unchanged; otherwise, the overall similarity of the individual position is calculated, and the individual position is diffused based on the overall similarity. The steps are as follows:

[0112] Step S441: Calculate the overall similarity of individual positions and pre-set the first reference position and the second reference position , ub1, ub j andub D are the upper limits of the individual search space in the 1st dimension, the jth dimension, and the Dth dimension, lb1, lb j and lb D are the lower limits of the individual search space in the 1st dimension, the jth dimension, and the Dth dimension, respectively. and Calculate the overall similarity of individual positions. The steps are as follows:

[0113] Step S4411: Calculate the distance similarity and direction similarity, using the following formula:

[0114] ;

[0115] ;

[0116] In the formula, B i (h) and C i (h) are the distance similarity and direction similarity of the i-th individual at the h-th iteration, and They are and Position in the jth dimension;

[0117] Step S4412: Calculate the overall similarity and pre-set the upper limit of the similarity threshold X u and the lower limit of similarity threshold X p , based on X u and X P The overall similarity is calculated using the following formula:

[0118] ;

[0119] In the formula, ε i (h) is the overall similarity of the i-th individual at the h-th iteration;

[0120] Step S442: Position diffusion, calculate the average value ε of the overall similarity of all individuals undergoing position diffusion avg (h), if the overall similarity of individuals is greater than ε avg (h), then go to step S4421 and use the first strategy for position diffusion; otherwise go to step S4422 and use the second strategy for position diffusion. The strategy is as follows:

[0121] Step S4421: The first strategy, the formula used is as follows:

[0122] ;

[0123] In the formula, is the position of the i-th individual after position diffusion using the first strategy at the h-th iteration;

[0124] Step S4422: The second strategy uses the following formula:

[0125] ;

[0126] In the formula, is the position of the i-th individual after position diffusion using the second strategy at the h-th iteration, t(w) is the fourth random number that obeys the t-distribution with w degrees of freedom;

[0127] Step S45: Determine the optimal model parameters and pre-set the fitness threshold Z yz And the maximum number of iterations H, update the fitness values ​​of all individuals, get the current highest fitness value, when the highest fitness value is greater than the fitness threshold Z yz, select the model parameters corresponding to the individual position with the highest fitness value as the optimal model parameters, and complete the construction of the customer service risk assessment model based on the optimal model parameters; otherwise, if the maximum number of iterations H is reached, go to step S41; otherwise, add one to the iteration number index and go to step S43 to continue iterating.

[0128] By performing the above operations, in view of the problems of local convergence, low risk identification accuracy and low model training efficiency in the existing customer service risk identification system, this solution initializes individual positions based on the defined mapping function to improve the global search capability at the beginning of the iteration, dynamically and adaptively updates the position, obtains the overall similarity based on distance similarity and direction similarity, and uses two strategies to complete the diffusion of individual positions, improve the model's detection ability for different risks, avoid blindly searching for parameter space, quickly find the optimal parameters of the model, complete model construction, improve the model's global search capability and convergence accuracy, accurately and quickly identify service risk types, improve geographic cloud maps, and improve service quality.

[0129] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the two-way feedback service optimization continuously collects real-time feedback data from customers on the geographic cloud map service, timely understands and handles the risks of the service based on the service risk type output by the model, continuously improves the geographic cloud map, and feeds back to the customer.

[0130] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment, the customer service risk assessment system based on the two-way feedback mechanism provided by the present invention includes a data collection module, a data preprocessing module, an adaptive weighted balance data module, a customer service risk identification model building module and a two-way feedback service optimization module;

[0131] The data collection module collects customer feedback data and risk assessment types on the geographic cloud map service, and sends the data to the data preprocessing module;

[0132] The data preprocessing module performs data cleaning, data conversion, data normalization and data set division processing on the collected data, and sends the data to the adaptive weighted balancing data module;

[0133] The adaptive weighted balance data module comprehensively identifies abnormal data from both local and global perspectives, defines a weight calculation strategy based on boundary division, obtains the total weights of boundary data and security data respectively, reconstructs the generative adversarial network based on the penalty loss function, adaptively synthesizes new data, constructs a balanced data set, and sends the data to the customer service risk identification model construction module;

[0134] The customer service risk identification model building module initializes individual positions based on the defined mapping function, dynamically and adaptively updates positions, obtains overall similarity based on distance similarity and direction similarity, uses two strategies to complete individual position diffusion, finds the optimal model parameters, completes model building, and sends data to the two-way feedback service optimization module;

[0135] The two-way feedback service optimization module collects real-time feedback data, timely understands and handles service risks based on the service risk type output by the model, improves the geographic cloud map and feeds back to the customer.

[0136] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0137] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.

[0138] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. A customer service risk assessment method based on a two-way feedback mechanism, characterized by: The method comprises the following steps: Step S1: data collection; Step S2: data preprocessing; Step S3: Adaptively weight and balance the data, comprehensively identify abnormal data from both local and global perspectives, define a weight calculation strategy based on boundary division, obtain the total weights of boundary data and safety data respectively, reconstruct the generative adversarial network based on the penalty loss function, adaptively synthesize new data, and construct a balanced data set; Step S4: Build a customer service risk identification model, initialize individual positions based on the defined mapping function, dynamically and adaptively update positions, obtain overall similarity based on distance similarity and direction similarity, use two strategies to complete individual position diffusion, find the optimal model parameters, and complete model construction; Step S5: two-way feedback service optimization; In step S3, the adaptive weighted balancing data specifically includes the following steps: Step S31: removing abnormal data, identifying local abnormal data and global abnormal data in the minority class data set based on the local abnormal factor and a classification SVM respectively. When a minority class data is identified as local abnormal data and global abnormal data at the same time, the minority class data is determined to be abnormal data, and the abnormal data is deleted from the minority class data set, and the abnormal data in the majority class data set is deleted using the same method; Step S32: define a weight calculation strategy based on boundary division, the steps are as follows: Step S321: data partitioning, calculating the k nearest neighbor data of each minority class data in the minority class data set after removing the abnormal data. If the k nearest neighbor data of the minority class data contains the majority class data, the minority class data is divided into boundary data; otherwise, the minority class data is divided into safe data; Step S322: Calculate the total weight of the boundary data. Calculate the density weight and distance weight of the boundary data respectively, and add them together to obtain the total weight of the boundary data. The formula used is as follows: ; ; ; In the formula, , and They are the boundary data q v The density weight, distance weight and total weight of KS (q v ) and KD(q v ) are respectively the boundary data q v The set of minority class data and majority class data in the k nearest neighbor data, q v ,q a and q c They are the vth boundary data, KS (q v ) in the a-th minority class data and KD(q v ), v is the boundary data index, a and c are KS(q v ) and KD(q v ), ||·|| is the Euclidean distance between data, β is the weight balancing parameter, σ 2 (q v ) is the Gaussian kernel function at the boundary data q v The variance of the k nearest neighbor data; Step S323: Calculate the total weight of the security data using the following formula: ; In the formula, It is safe data g The total weight, q g is the g-th security data, g is the security data index, K(q g ) is from the safety data g The set of k nearest neighbor data, f is K (q g ), σ 2 (q g ) is the Gaussian kernel function on the security data q g The variance of the k nearest neighbor data; Step S33: Calculate the number of new data that need to be synthesized. Based on the total weight obtained in step S32, calculate the number of new data that need to be synthesized for each minority class data. The formula used is as follows: ; In the formula, L (q o ) is the minority class data q o The amount of new data that needs to be synthesized, is the minority class data q o The total weight, q o is the oth minority class data, o is the data index in the minority class data set after removing abnormal data, G1 and G2 are the number of data in the majority class data set and the minority class data set after removing abnormal data respectively; Step S34: synthesize new data. The generative adversarial network consists of a generator F(·) and a discriminator M(·). The gradient penalty term of the discriminator is introduced into the loss function to obtain a penalty loss function. The generative adversarial network is reconstructed based on the penalty loss function, and new data is synthesized using the newly constructed generative adversarial network. The formula used is as follows: ; ; In the formula, U is the penalty loss function, m is the random noise data, q is the minority class data in the minority class data set after removing the abnormal data, z is the new data generated by the generator, and S m , S q and S z are the distributions of data m, q, and z respectively, λ is the gradient penalty coefficient, is the gradient penalty term, is a random number uniformly sampled from [0, 1], E is the expected value, is the gradient of the discriminator with respect to the data z, It is the L2 paradigm; Step S35: construct a balanced data set, construct a balanced data set based on the synthesized new data and the minority class data set and the majority class data set after removing abnormal data, randomly select 70% of the data from the balanced data set to construct a training data set, and construct a test data set based on the remaining 30% of the data; In step S4, the construction of the customer service risk identification model specifically includes the following steps: Step S41: Initialize individual positions, pre-set the number of individuals to N, randomly generate the initial position A1 of the first individual based on the individual search space, define a mapping function, and generate the initial positions of the 2nd to Nth individuals based on A1 and the mapping function. The formula used is as follows: ; In the formula, A i+1 and A i are the initial positions of the i+1th and ith individuals, respectively, i is the individual index, ub and lb are the upper and lower limits of the individual search space, respectively, b1 and b2 are the first control value and the second control value of the mapping function, respectively, b1∈(0,1), b2∈(0,1), r1 is the first random number in the range of (0,1), mod(·) is the modulo function, is the defined mapping function; Step S42: training the model, using model parameters to represent the position of the individual, using Python to import the sklearn library to call the SVM function based on the model parameters, training the customer service risk identification model based on the training data set, using the test data set to evaluate the performance of the model established based on the model parameters, and using the model performance as the individual fitness value; Step S43: Dynamically adaptive position update, select the individual position with the highest fitness value and the individual position with the lowest fitness value as the optimal individual position A best and the worst individual position A worse , based on A best and A worse To update the location, the formula used is as follows: ; In the formula, A i,j (h) and are the positions of the i-th individual before and after the update in the j-th dimension at the h-th iteration, j is the dimension index, D is the dimension of the individual search space, and A best,j (h) and A worse,j (h) are the optimal individual positions A at the hth iteration. best and the worst individual position in the jth dimension, r2 is the second random number in the range of (0, 1), Q is the third random number following the standard normal distribution, and h is the iteration number index; Step S44: Perform position diffusion based on similarity, update the fitness values ​​of all individuals, and calculate the average fitness value Z of all individuals avg , when the individual fitness value is greater than or equal to the average fitness value Z avg When , the individual position remains unchanged; otherwise, the overall similarity of the individual position is calculated, and the individual position is diffused based on the overall similarity; Step S45: Determine the optimal model parameters and pre-set the fitness threshold Z yz And the maximum number of iterations H, update the fitness values ​​of all individuals, get the current highest fitness value, when the highest fitness value is greater than the fitness threshold Z yz , select the model parameters corresponding to the individual position with the highest fitness value as the optimal model parameters, and complete the construction of the customer service risk assessment model based on the optimal model parameters; otherwise, if the maximum number of iterations H is reached, go to step S41; otherwise, add one to the iteration index and go to step S43 to continue iterating; In step S44, the position diffusion based on similarity specifically includes the following steps: Step S441: Calculate the overall similarity of individual positions and pre-set the first reference position and the second reference position , ub1, ub j andub D are the upper limits of the individual search space in the 1st dimension, the jth dimension, and the Dth dimension, lb1, lb j and lb D are the lower limits of the individual search space in the 1st dimension, the jth dimension, and the Dth dimension, respectively. and Calculate the overall similarity of individual positions. The steps are as follows: Step S4411: Calculate the distance similarity and direction similarity, using the following formula: ; ; In the formula, B i (h) and C i (h) are the distance similarity and direction similarity of the i-th individual at the h-th iteration, and They are and Position in the jth dimension; Step S4412: Calculate the overall similarity and pre-set the upper limit of the similarity threshold X u and the lower limit of similarity threshold X p , based on X u and X P The overall similarity is calculated using the following formula: ; In the formula, ε i (h) is the overall similarity of the i-th individual at the h-th iteration; Step S442: Position diffusion, calculate the average value ε of the overall similarity of all individuals undergoing position diffusion avg (h), if the overall similarity of individuals is greater than ε avg (h), then go to step S4421 and use the first strategy for position diffusion; otherwise go to step S4422 and use the second strategy for position diffusion. The strategy is as follows: Step S4421: The first strategy, the formula used is as follows: ; In the formula, is the position of the i-th individual after position diffusion using the first strategy at the h-th iteration; Step S4422: The second strategy uses the following formula: ; In the formula, is the position of the i-th individual after position diffusion using the second strategy at the h-th iteration, t(w) is the fourth random number that obeys the t-distribution with w degrees of freedom; In step S1, the data collection is to collect customer feedback data and risk assessment types on the geographic cloud map service; the customer feedback data on the geographic cloud map service includes geographical location information data of customer service, customer service record data and customer behavior data; the customer service record data includes service type data, service content data, duration data and frequency data; the customer behavior data includes satisfaction rating data, complaint data and comment data; the risk assessment type is used as a data label; In step S2, the data preprocessing is to perform data cleaning, data conversion, data normalization and data set division on the collected data; data cleaning includes removing duplicate data, missing data and noise data; data conversion is to convert non-numeric data in the collected data into numerical form; data normalization is to scale the data using the minimum-maximum scaling method; data set division is to construct a minority class data set and a majority class data set based on the data after data cleaning, data conversion and data normalization; In step S5, the two-way feedback service optimization is to continuously collect real-time feedback data from customers on the geographic cloud map service, timely understand and deal with the risks of the service based on the service risk type output by the model, continuously improve the geographic cloud map, and provide feedback to customers.

2. A customer service risk assessment system based on a two-way feedback mechanism, used to implement the customer service risk assessment method based on a two-way feedback mechanism as claimed in claim 1, characterized in that: It includes data collection module, data preprocessing module, adaptive weighted balance data module, customer service risk identification model building module and two-way feedback service optimization module.

3. The customer service risk assessment system based on a two-way feedback mechanism according to claim 2 is characterized by: The data collection module collects customer feedback data and risk assessment types on the geographic cloud map service, and sends the data to the data preprocessing module; The data preprocessing module performs data cleaning, data conversion, data normalization and data set division processing on the collected data, and sends the data to the adaptive weighted balancing data module; The adaptive weighted balance data module comprehensively identifies abnormal data from both local and global perspectives, defines a weight calculation strategy based on boundary division, obtains the total weights of boundary data and security data respectively, reconstructs the generative adversarial network based on the penalty loss function, adaptively synthesizes new data, constructs a balanced data set, and sends the data to the customer service risk identification model construction module; The customer service risk identification model building module initializes individual positions based on the defined mapping function, dynamically and adaptively updates positions, obtains overall similarity based on distance similarity and direction similarity, uses two strategies to complete individual position diffusion, finds the optimal model parameters, completes model building, and sends data to the two-way feedback service optimization module; The two-way feedback service optimization module collects real-time feedback data, timely understands and handles service risks based on the service risk type output by the model, improves the geographic cloud map and feeds back to the customer.