Freeswitch call abnormal disconnection detailed cause tracking method, system, electronic device and storage medium
By building a real-time on-site data recording system and iterative training, the problem of missing call abnormal disconnection in the freeswitch automatic outbound call system is solved, and the rapid and accurate detailed code acquisition is achieved, reducing the cost of manual analysis and Time improves efficiency.
Patent Information
- Application Number
- CN202211657838.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-12-22
AI Technical Summary
In complex network environments, the freeswitch automatic outgoing call system is prone to cause call abnormal interruption, and the storage fields of the code are easily lost, resulting in high cost, time-consuming and low efficiency of manual analysis.
By building a real-time on-site data recording system and iterative training, the model parameters are updated regularly using the off-line training system and pushing it to the on-line inference system to quickly predict and obtain the detailed factor code for call abnormal disconnection.
The cost of manual analysis is reduced, efficiency is improved, and the detailed code of call abnormal disconnection is quickly and accurately obtained, solving the problems of high labor costs, long time and low efficiency in the prior art.
Smart Images

Figure CN115987768B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data processing, and in particular relates to a method, system, electronic device and storage medium for tracking detailed causes of abnormal disconnection of a FreeSwitch call. Background Art
[0002] As an open source, free and easy-to-use telephone soft switching solution, freeswitch has been widely used in various actual business scenarios suitable for automatic outbound calls, such as notifications of COVID-19 vaccination to help fight the epidemic, and notifications of overdue payments from telecom operators. The normal process of an automatic outbound call from initiation to termination can be roughly divided into three stages: In the first stage, the business control and scheduling system establishes a stable long connection with the freeswitch server through the event socket and subscribes to relevant channel events, and then sends a command to initiate an outbound call to freeswitch, which carries parameters such as the number to be called; In the second stage, freeswitch internally parses the command string text and sends an invitation message (INVITE) in the session initiation protocol to the corresponding relay server. The message will eventually be routed to the hardware terminal where the number is located through the remote network. After a series of session initiation protocol message interactions, the hardware terminal where the number is located will receive a ringing reminder for the incoming call; In the third stage, the user picks up the phone and starts normal interaction until hanging up. At the same time, the business control and scheduling system will receive the corresponding channel events and perform a series of predetermined operations such as broadcasting and recording. The automatic speech recognition engine, intent understanding engine and text-to-speech engine will be called as needed.
[0003] Generally, Freeswitch will store the digital code (XXX_YYY, such as 480_19) representing the detailed reason for call disconnection in fixed fields of certain channel events. In the second or third stage of the above call process, the service control and dispatching system can directly obtain the detailed cause code of call disconnection from the relevant fields of the corresponding channel event. In the actual outbound call application process, automatic outbound calls are carried out in batches with high concurrency, which is affected by real-time network factors, real-time status factors of software and hardware in each link of the call link, etc.; some numbers have abnormal disconnection during the call process, and the corresponding field of the corresponding channel event storing the detailed digital code is lost and empty.
[0004] In view of the technical problems that the automatic outbound call system of Freeswitch is prone to abnormal call interruption in the actual complex network hardware and software environment and high concurrent outbound calls, and the field storing the detailed code value is prone to loss and empty, for business needs, system optimization and other motivations, it is often necessary to quickly and accurately obtain the detailed reasons for abnormal call disconnection corresponding to these numbers. In order to obtain the detailed reasons, the following methods are usually used: Figure 1 The manual analysis method shown in Figure 2 can be divided into the following categories: Figure 2 The steps shown are as follows: S1, it is necessary to export the runtime field data from each link of the call link (such as the freeswitch server, etc.); S2, negotiate and discuss, analyze and compare, and troubleshoot the abnormal problems that exist; S3, organize tests based on the suspected reasons, and if it is not the current reason, iterate the suspected reasons for further testing and verification; S4, verify the detailed reasons for the abnormal disconnection of the real call. It can be seen that this manual analysis method can only rely on the professional ability, collaboration ability, rigorous thinking and mental willpower of each technical expert in each link of the call link to conduct troubleshooting, detection and analysis. The whole process has high labor costs, long time consumption and low efficiency.
[0005] Therefore, no effective solution has been proposed so far to address the problems of high labor costs, long time consumption, and low efficiency in the above-mentioned manual analysis methods. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a FreeSwitch call abnormal disconnection detailed cause tracking method, system, electronic device and storage medium. Through an iterative strategy, the off-line training system regularly supplements and updates data to perform incremental training and fine-tuning on its cause tracking model so that it can be updated to the on-line reasoning system. When there is a call with missing detailed cause code, the corresponding data can be quickly retrieved from the on-site real-time recording system according to the UUID value, and the data can be sent to the on-line reasoning system to predict the detailed cause code.
[0007] In a first aspect, the present invention provides a method for tracking the detailed cause of abnormal disconnection of a FreeSwitch call, comprising:
[0008] Build a real-time recording system for field data;
[0009] Select a matching causal model according to the on-site real-time recording system, and write an off-line training system and an on-line reasoning system based on the causal model;
[0010] Extracting quantitative data from the on-site real-time recording system and the manual quality inspection history database according to a preset ratio as training data;
[0011] Iteratively training the causal model in the off-line training system through the training data to adjust its model parameters to obtain an optimal causal model;
[0012] Using the optimal causal model to update the on-line reasoning system to obtain a target on-line reasoning system;
[0013] The corresponding target field data is obtained according to the uuid of the abnormally disconnected freeswitch call, and the target detailed cause code of the abnormal disconnection of the freeswitch call is predicted by the target on-line reasoning system based on the target field data.
[0014] Preferably, the steps of constructing a real-time recording system for on-site data specifically include:
[0015] Determine each link to be collected and field information to be collected in each link according to the call link;
[0016] By adding IP addresses to the whitelists of the collection server and the servers of each link, the interconnection of the network channels of each link can be achieved;
[0017] Write a python listening program script for the server of each link, collect the field information regularly and save it as a new file;
[0018] The new file is stored in the source folder directory configured on the server of each link, so that the Flume system can realize real-time monitoring and automatically collect the monitoring results to the Kafka system;
[0019] A real-time recording system for field data is constructed through the Flume system and the Kafka system.
[0020] Preferably, the steps of selecting a matching causal model according to the on-site real-time recording system and writing an off-line training system and an on-line reasoning system based on the causal model specifically include:
[0021] Selecting a matching tracing model according to the consideration factors required by the on-site real-time recording system for the pre-trained model, and downloading an initial parameter file of the tracing model;
[0022] Based on the initial parameter file, an off-line training system and an on-line reasoning system are written for the tracing model.
[0023] Preferably, the step of iteratively training the causal model in the off-line training system through the training data to adjust its model parameters to obtain the optimal causal model specifically includes:
[0024] Cleaning and converting the training data so that the key value format of the training data is converted into a text expression format;
[0025] The training data after the format conversion is segmented by the concatenator to obtain the final data, wherein the final data specifically includes a long text string separated by SEP as input and an id of the corresponding detailed code as output;
[0026] According to the final data, an adaptive loss function is selected to perform hyperparameter combination to iteratively train the tracing model in the off-line training system; wherein the loss function is a cross entropy loss function or a focal loss function;
[0027] After the iterative training is completed, the evaluation formula is used to select the optimal model as the optimal tracing module.
[0028] Preferably, the evaluation formula is:
[0029]
[0030] In the formula, F1 represents the evaluation value, r represents the recall rate, and p represents the precision rate.
[0031] Preferably, the step of obtaining the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predicting the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data specifically includes:
[0032] When a disconnection detail loss signal of a freeswitch call is obtained, corresponding target field data is intercepted from the field data real-time recording system according to the uuid of the freeswitch call;
[0033] Preprocessing the target field data to obtain preprocessed field data;
[0034] The pre-processed field data is input into the target on-line reasoning system for prediction to obtain the target detailed cause code of the abnormal disconnection of the freeswitch call.
[0035] Preferably, based on the adoption of all historical data extracted from the manual quality inspection history database, data in the on-site real-time recording system is extracted according to the preset ratio.
[0036] In a second aspect, the present invention provides a FreeSwitch call abnormal disconnection detailed cause tracking system, comprising:
[0037] Building modules for constructing a real-time recording system for field data;
[0038] A writing module, used for selecting a matching tracing model according to the on-site real-time recording system, and writing an off-line training system and an on-line reasoning system based on the tracing model;
[0039] An extraction module is used to extract quantitative data from the on-site real-time recording system and the manual quality inspection history database according to a preset ratio as training data;
[0040] A training module, configured to iteratively train the causal model in the off-line training system through the training data to adjust its model parameters and obtain an optimal causal model;
[0041] An updating module, configured to update the on-line reasoning system using the optimal tracing model to obtain a target on-line reasoning system;
[0042] The prediction module is used to obtain the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predict the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data.
[0043] Preferably, the building blocks include:
[0044] A determination unit, used to determine each link to be collected and field information to be collected in each link according to the call link;
[0045] An intercommunication unit, used to add IP addresses to each other through the whitelists of the collection server and the servers of each link, so as to realize the interconnection and intercommunication of the network channels of each link;
[0046] A collection unit, used for writing a python listening program script for the servers in each link, collecting the field information at regular intervals and saving it as a new file;
[0047] A real-time unit is used to store the new file in the source folder directory configured on the server of each link, so that the Flume system can realize real-time monitoring and automatically collect the monitoring results to the Kafka system;
[0048] A construction unit is used to construct a real-time recording system for field data through the Flume system and the Kafka system.
[0049] Preferably, the writing module includes:
[0050] A matching unit, used for selecting a matching causal model according to the consideration factors required by the on-site real-time recording system for the pre-trained model, and downloading an initial parameter file of the causal model;
[0051] A writing unit is used to write an off-line training system and an on-line reasoning system for the tracing model based on the initial parameter file.
[0052] Preferably, the training module includes:
[0053] A conversion unit, used for cleaning and converting the training data so as to convert the key-value format of the training data into a text expression format;
[0054] A splicing unit, used for performing splicing segmentation on the training data after the format conversion to obtain final data, wherein the final data specifically includes a long text string separated by SEP as input and an ID corresponding to the detailed factor code as output;
[0055] An iterative unit, configured to select an adaptive loss function according to the final data to perform hyperparameter combination to iteratively train a causal model in the off-line training system; wherein the loss function is a cross entropy loss function or a focal loss function;
[0056] The selection unit is used to select the optimal model as the optimal tracing module using the evaluation formula after the iterative training is completed.
[0057] Preferably, the prediction module comprises:
[0058] An interception unit, used for intercepting corresponding target field data from the field data real-time recording system according to the uuid of the freeswitch call when obtaining a disconnection detail loss signal of the freeswitch call;
[0059] A preprocessing unit, used for preprocessing the target field data to obtain preprocessed field data;
[0060] The prediction unit is used to input the pre-processed field data into the target on-line reasoning system for prediction to obtain the target detailed cause code of the abnormal disconnection of the freeswitch call.
[0061] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for tracking detailed causes of abnormal disconnection of a FreeSwitch call as described in the first aspect is implemented.
[0062] In a fourth aspect, this embodiment provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for tracking the detailed cause of abnormal disconnection of a FreeSwitch call as described in the first aspect is implemented.
[0063] Compared with the prior art, the present invention provides a method, system, device and storage medium for tracking the detailed cause of abnormal disconnection of FreeSwitch calls. By using an iterative strategy, supplementary and updated data can be regularly used in the off-line training system to incrementally train and fine-tune the tracing model, and push it to the on-line reasoning system for production use; each time the business control and dispatching system finds a call with a missing detailed cause code, it can quickly retrieve data related to a certain number from the current status data real-time recording system based on the uuid value that uniquely identifies a call, and send it to the on-line reasoning system to obtain the detailed cause code predicted by the automatic tracing model. Compared with the problems of high labor cost, long time consumption and low efficiency when using manual technical experts to conduct investigation and analysis each time, the present invention has the advantages of more accurate, lower cost, faster speed and higher efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0065] Figure 1 This is a schematic diagram of the prior art using manual analysis of detailed reasons for abnormal call disconnection;
[0066] Figure 2 A flowchart of the steps of manually analyzing the detailed reasons for abnormal call disconnection in the prior art;
[0067] Figure 3 This is an architecture diagram of the present invention for automatically tracing the detailed reasons for abnormal call disconnection based on a pre-trained language model;
[0068] Figure 4 A flowchart of a method for tracking the detailed causes of abnormal disconnection of a FreeSwitch call provided in Example 1 of the present invention;
[0069] Figure 5 This is an example of the first part of the channel event CHANNEL_HANGUP_COMPLETE provided in Example 1 of the present invention;
[0070] Figure 6 This is an example of the latter part of the channel event CHANNEL_HANGUP_COMPLETE provided in Example 1 of the present invention;
[0071] Figure 7 An example of some detailed codes provided in Embodiment 1 of the present invention;
[0072] Figure 8 An example of a situation where the detailed reasons for disconnection of certain calls are lost in the service control and scheduling system provided in Embodiment 1 of the present invention;
[0073] Fig. 9 It is a structural block diagram of a FreeSwitch call abnormal disconnection detailed cause tracking system corresponding to the method of Embodiment 1 and provided in Embodiment 2 of the present invention;
[0074] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in Example 3 of the present invention.
[0075] Description of reference numerals:
[0076] 10-construction module, 11-determination unit, 12-intercommunication unit, 13-collection unit, 14-real-time unit, 15-construction unit;
[0077] 20-writing module, 21-matching unit, 22-writing unit;
[0078] 30-extraction module;
[0079] 40-training module, 41-conversion unit, 42-splicing unit, 43-iteration unit, 44-selection unit;
[0080] 50-Update module;
[0081] 60-prediction module, 61-interception unit, 62-preprocessing unit, 63-prediction unit;
[0082] 70 - bus, 71 - processor, 72 - memory, 73 - communication interface. DETAILED DESCRIPTION
[0083] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.
[0084] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0085] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0086] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0087] In view of the problems of high labor cost, long time consumption and low efficiency in obtaining the detailed cause of abnormal call disconnection in the prior art, the present invention proposes a method for automatically tracking the detailed cause of abnormal call disconnection based on pre-trained language model technology. The specific architecture diagram is as follows: Figure 3 As shown in the figure. On the one hand, from the technical theory perspective of natural language processing, the process of manual technical experts troubleshooting and solving the detailed causes of abnormal call disconnection is analyzed, and it is concluded that the detailed causes can be traced from the runtime scene when the call is disconnected, and the solution process and rules can be modeled through pre-trained language model training and learning. When the manual experts in each link of the call link cooperate with each other and troubleshoot and analyze, they need to obtain the software and hardware runtime data of each part of the call disconnection scene, such as the operation pressure index on the relay side, the message sending and receiving records and corresponding time series of the corresponding number, the message sending and receiving records and time series on the freeswitch server side, the content of various channel events and the production and receipt time series, etc. These analysis objects all exist in the form of text, and the detailed causes of call disconnection and their logical characteristics are contained in them. The bidirectional encoder pre-trained language model based on the self-attention model has achieved Sota (State of the Arts) effects on many open evaluation tasks in the field of natural language processing with its excellent text representation ability and feature learning ability. Therefore, the problem of analyzing the detailed reasons for call disconnection can be classified as a text classification task in the field of natural language processing. By using the powerful learning ability of the pre-trained language model and learning the rules through training and fine-tuning, the detailed reasons for call disconnection can be automatically tracked.
[0088] Example 1
[0089] Specifically, Figure 4 The figure is a flow chart of a method for tracing the detailed cause of abnormal disconnection of a FreeSwitch call provided in this embodiment.
[0090] like Figure 4As shown, the FreeSwitch call abnormal disconnection detailed cause tracking method of this embodiment includes the following steps:
[0091] S101, construct a real-time recording system for field data.
[0092] Specifically, the real-time recording system for on-site data is used to record on-site data of each link of the call link during each automatic outbound call.
[0093] Furthermore, the specific steps of S101 in this embodiment include:
[0094] S1011, determining each link to be collected and field information to be collected in each link according to the call link.
[0095] Specifically, for the sake of simplicity, this embodiment only collects data from two modules, the freeswitch server module and the relay server module. Among them, in the freeswitch server module, the necessary field information collected is the interactive record text of the session initiation protocol and its sending and receiving time sequence, the channel event and its sending and receiving time sequence, etc.
[0096] It should be noted that some of the collected field information may contain a large amount of irrelevant sub-data. Based on actual conditions such as usage requirements and specific hardware storage pressure, you can consider whether to delete or retain them. Figure 5 and Figure 6 Taking the channel event CHANNEL_HANGUP_COMPLETE as an example, the complete event has hundreds of subfields. Optionally, the subfield contents are deduplicated and irrelevant subfields are deleted.
[0097] S1012, adding IP addresses to each other's whitelists of the collection server and the servers of each link to achieve interconnection and intercommunication of network channels of each link.
[0098] Specifically, to build a real-time recording system for field data, it is necessary to add the IP of the freeswitch server module and the relay server module to the whitelist of the collection server, and vice versa, that is, to add the IP of the collection server to the whitelist of the freeswitch server module, the relay server module, etc., so that the freeswitch server module, the relay server module and the collection server module can be interconnected at the network level.
[0099] S1013, writing a python listening program script for the server of each link, regularly collecting the field information and saving it as a new file;
[0100] Specifically, listener.py is written for the freeswitch server module and the relay server module to collect field information after deduplication and deletion of irrelevant subfields every 10 seconds, and the collected field information is temporarily saved as a new file in a file format.
[0101] S1014, storing the new file in the source folder directory configured on the server of each link, so that the Flume system can realize real-time monitoring and automatically collect the monitoring results to the Kafka system.
[0102] Specifically, the source folder directory is SrcPath, and the temporarily stored new files are stored in SrcPath. The configuration is debugged until the Flume system can monitor in real time when new files are generated under SrcPath, and automatically collect them into the Kafka system.
[0103] S1015, construct a real-time recording system for field data through the Flume system and the Kafka system.
[0104] S102, selecting a matching tracing model according to the on-site real-time recording system, and compiling an off-line training system and an on-line reasoning system based on the tracing model.
[0105] Specifically, the tracing model of this embodiment adopts the RoBERTa model in the pre-trained language model. Of course, for other embodiments, any suitable pre-trained language model can be selected, and is not limited to the RoBERTa model.
[0106] Furthermore, the specific steps of S102 in this embodiment include:
[0107] S1021, selecting a matching tracing model according to the consideration factors required by the on-site real-time recording system for the pre-training model, and downloading an initial parameter file of the tracing model.
[0108] Specifically, the factors that need to be considered in this embodiment include the magnitude of model parameters, the dataset used for pre-training, the hardware requirements for fine-tuning, etc. If the hardware configuration is low, try to choose the base version, and try to use a dataset that is close to your downstream task. Since most of the module information collected in this task is stored in English, it is not recommended to use the model parameter version fine-tuned by a cross-language dataset.
[0109] S1022: Writing an off-line training system and an on-line reasoning system for the tracing model based on the initial parameter file.
[0110] Specifically, both the off-line training system and the on-line reasoning system include a data cleaning module and a data conversion module. The off-line training system supports convenient data update, parameter update, and incremental training, etc. The on-line reasoning system supports convenient model update and replacement, and supports extension of call request interface parameters, etc. The interface request protocol can be http and other protocols.
[0111] S103, extracting quantitative data from the on-site real-time recording system and the manual quality inspection history database according to a preset ratio as training data.
[0112] Wherein, based on the adoption of all historical data extracted from the manual quality inspection history database, data in the on-site real-time recording system is extracted according to the preset ratio.
[0113] Specifically, extract an appropriate amount of data from the real-time recording system of field data. The specific number is determined by the actual situation and is not specifically limited. In this embodiment, 5000 data are taken. Extract an appropriate amount of new data from a small proportion (such as 1 / 10000, determined by actual needs and manpower conditions, without specific restrictions) of the historically accumulated manual quality inspection data. Since it is manual quality inspection data, the quality is high, and it is recommended to use all of it. The preset ratio of this embodiment adopts a parameter of 10:1.
[0114] S104, iteratively training the causal model in the off-line training system through the training data to adjust its model parameters and obtain an optimal causal model.
[0115] Specifically, this embodiment optimizes the selected RoBERTa model by iteratively training the cause tracing model and fine-tuning its model parameters, thereby improving the accuracy of tracing the detailed causes of abnormal freeswitch call disconnection.
[0116] Furthermore, the specific step S104 of this embodiment includes:
[0117] S1041, cleaning and converting the training data so that the key-value format of the training data is converted into a text expression format.
[0118] Specifically, the purpose of data cleaning is to remove unnecessary garbled symbols, uppercase and lowercase conversion, etc. Figure 5 There are many uppercase and lowercase words in the text. In this embodiment, it is agreed that all lowercase words are used. The cleaned data is sent to the data conversion system. Because the data collected is the full amount of data in each link, it is usually in the form of key-value pairs. In order to facilitate the convergence of model learning during fine-tuning, the data in the form of k:v needs to be converted into text expression "kis v.".
[0119] S1042, performing concatenation segmentation on the format-converted training data to obtain final data, wherein the final data specifically includes a long text string separated by SEP as input and an id of a corresponding detailed factor code as output.
[0120] Specifically, in practice, various formats of time expressions need to be unified and standardized, and variable names with multiple words need to be separated by concatenation characters. Because there are processing solutions, no unique restrictions are made here, as long as they are reasonable. The final processed data, the input is a long text string separated by [SEP], and the output is the id of the corresponding detailed code (with a value of 0 to N-1), where N is the total number of detailed code categories. In this embodiment, some detailed codes are as follows Figure 7 , assuming that the total number of time codes N = 80.
[0121] This embodiment uses Figure 6 For example, assuming that the subfield variable_rtp_audio_in_mos is the required field information, the processing steps and results are input as follows:
[0122] Original expression: variable_rtp_audio_in_mos:4.50;
[0123] Convert key-value pairs to text expressions: "variable_rtp_audio_in_mos is 4.50";
[0124] Splice character segmentation (word prefix can be removed): "rtp audio in mos is 4.50";
[0125] Final data:
[0126] Input: "....[SEP]rtp audio in mos is 4.50.[SEP]";
[0127] Output: 79;
[0128] Here 79 may represent 510_29, or it may be something else, depending on how the code is implemented.
[0129] S1043, selecting an adaptive loss function according to the final data to perform hyperparameter combination to iteratively train the tracing model in the off-line training system; wherein the loss function is a cross entropy loss function or a focal loss function.
[0130] Specifically, the setting of hyperparameters focuses on the actual capacity of the server hardware configuration and the model learning convergence strategy. For example, if the training environment hardware configuration is high, you can consider multi-card multi-machine distributed training; in terms of model learning strategy and convergence speed, you can choose different loss functions according to the data distribution. Common loss functions that can be selected for this task include the cross entropy loss function (CrossEntropy Loss) and the focal loss function (Focal Loss). If the data sample categories are unbalanced, the focal loss function is preferred.
[0131] S1044, after the iterative training is completed, the optimal model is selected using the evaluation formula as the optimal tracing module.
[0132] Specifically, the optimal model and the optimal evaluation result are automatically saved after the training is completed. The evaluation standard of the optimal model is represented by the F1 value, and the specific formula is as follows: The evaluation formula is:
[0133]
[0134] In the formula, F1 represents the evaluation value, r represents the recall rate, and p represents the precision rate.
[0135] S105: Use the optimal tracing model to update the on-line reasoning system to obtain a target on-line reasoning system.
[0136] Specifically, this embodiment selects the best evaluated RoBERTa model from the optimized RoBERTa models, and inputs the best RoBERTa model into the on-line reasoning system to obtain the target on-line reasoning system, which further improves the accuracy of tracing the cause of abnormal disconnection of FreeSwitch calls.
[0137] S106, acquiring the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predicting the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data.
[0138] Furthermore, the specific steps of S106 in this embodiment include:
[0139] S1061, when a disconnection detail loss signal of a freeswitch call is obtained, corresponding target field data is intercepted from the field data real-time recording system according to the uuid of the freeswitch call.
[0140] Specifically, when the service control and dispatching system finds that the disconnection details of a call are lost, Figure 8As shown, the on-site data can be retrieved from the on-site system recording system according to the uuid; the specific reason is that uuid is a variable that uniquely identifies a call, and all on-site data of the corresponding number can be retrieved through uuid, such as the interaction record and sending and receiving time of the session initialization protocol message of the number.
[0141] S1062, preprocessing the target field data to obtain preprocessed field data.
[0142] Specifically, the purpose of preprocessing is that the acquired target field data needs to be processed accordingly before it can be input into the system model to obtain the predicted detailed factor code results.
[0143] S1063, inputting the pre-processed field data into the target on-line reasoning system for prediction to obtain the target detailed cause code of the abnormal disconnection of the freeswitch call.
[0144] In summary, this embodiment uses an iterative strategy. In the off-line training system, supplementary and updated data can be regularly used to incrementally train and fine-tune the causation model, and the data can be pushed to the on-line reasoning system for production use. Each time the service control and scheduling system finds a call with a missing detailed cause code, it can quickly retrieve data related to a certain number from the current status data real-time recording system based on the uuid value that uniquely identifies a call, and send it to the on-line reasoning system to obtain the detailed cause code predicted by the automatic causation model.
[0145] Example 2
[0146] This embodiment provides a structural block diagram of a system corresponding to the method described in Embodiment 1. Fig. 9 is a structural block diagram of a FreeSwitch call abnormal disconnection detailed cause tracking system according to this embodiment, such as Fig. 9 As shown, the system includes:
[0147] Building module 10, used to build a real-time recording system for field data;
[0148] A writing module 20, for selecting a matching tracing model according to the on-site real-time recording system, and writing an off-line training system and an on-line reasoning system based on the tracing model;
[0149] An extraction module 30 is used to extract quantitative data from the on-site real-time recording system and the manual quality inspection history database according to a preset ratio as training data;
[0150] A training module 40, configured to iteratively train the causal model in the off-line training system through the training data to adjust its model parameters and obtain an optimal causal model;
[0151] An updating module 50, configured to update the on-line reasoning system using the optimal tracing model to obtain a target on-line reasoning system;
[0152] The prediction module 60 is used to obtain the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predict the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data.
[0153] Preferably, the building module 10 includes:
[0154] A determination unit 11, configured to determine each link to be collected and field information to be collected in each link according to the call link;
[0155] The intercommunication unit 12 is used to add IP addresses to each other through the whitelist of the collection server and the servers of each link, so as to realize the interconnection and intercommunication of the network channels of each link;
[0156] A collection unit 13 is used to write a python listening program script for the servers of each link, collect the field information regularly and save it as a new file;
[0157] The real-time unit 14 is used to store the new file in the source folder directory configured on the server of each link, so that the Flume system can realize real-time monitoring and automatically collect the monitoring results to the Kafka system;
[0158] The construction unit 15 is used to construct a real-time recording system for field data through the Flume system and the Kafka system.
[0159] Furthermore, the writing module 20 includes:
[0160] A matching unit 21, configured to select a matching causal model according to the consideration factors required by the on-site real-time recording system for the pre-trained model, and download an initial parameter file of the causal model;
[0161] The writing unit 22 is used to write an off-line training system and an on-line reasoning system for the tracing model based on the initial parameter file.
[0162] Furthermore, the training module 40 includes:
[0163] A conversion unit 41 is used to clean and convert the training data so as to convert the key value format of the training data into a text expression format;
[0164] A splicing unit 42, used for performing splicing segmentation on the training data after the format conversion to obtain final data, wherein the final data specifically includes a long text string separated by SEP as input and an ID corresponding to the detailed factor code as output;
[0165] An iterative unit 43 is used for selecting an adaptive loss function according to the final data to perform hyperparameter combination to iteratively train the tracing model in the off-line training system; wherein the loss function is a cross entropy loss function or a focal loss function;
[0166] The selection unit 44 is used to select the optimal model as the optimal tracing module by using an evaluation formula after the iterative training is completed; wherein the evaluation formula is:
[0167]
[0168] In the formula, F1 represents the evaluation value, r represents the recall rate, and p represents the precision rate.
[0169] Furthermore, the prediction module 60 includes:
[0170] An interception unit 61 is used for intercepting corresponding target field data from the field data real-time recording system according to the uuid of the freeswitch call when obtaining a disconnection detail loss signal of the freeswitch call;
[0171] A preprocessing unit 62, configured to preprocess the target field data to obtain preprocessed field data;
[0172] The prediction unit 63 is used to input the pre-processed field data into the target on-line reasoning system for prediction to obtain the target detailed cause code of the abnormal disconnection of the freeswitch call.
[0173] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0174] Example 3
[0175] Combination Figure 4 The described method for tracking the detailed cause of abnormal disconnection of a FreeSwitch call can be implemented by an electronic device. Fig.10 FIG. 4 is a schematic diagram of the hardware structure of the electronic device according to the present embodiment.
[0176] The electronic device may include a processor 71 and a memory 72 storing computer program instructions.
[0177] Specifically, the processor 71 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the present embodiment.
[0178] Among them, the memory 72 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 72 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 72 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 72 may be inside or outside the data processing device. In a specific embodiment, the memory 72 is a non-volatile memory. In a specific embodiment, the memory 72 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0179] The memory 72 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 71 .
[0180] The processor 71 implements the FreeSwitch call abnormal disconnection detailed cause tracking method of the above-mentioned embodiment 1 by reading and executing the computer program instructions stored in the memory 72 .
[0181] In some embodiments, the electronic device may further include a communication interface 73 and a bus 70. Fig.10 As shown, the processor 71, the memory 72, and the communication interface 73 are connected via a bus 70 and communicate with each other.
[0182] The communication interface 73 is used to realize the communication between the modules, devices, units and / or equipment in this embodiment. The communication interface 73 can also realize data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage and image / data processing workstations.
[0183] The bus 70 includes hardware, software or both, and couples the components of the device to each other. The bus 70 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 70 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 70 may include one or more buses. Although this embodiment describes and illustrates a particular bus, this application contemplates any suitable bus or interconnect.
[0184] The device can execute the Freeswitch call abnormal disconnection detailed cause tracking method of this embodiment 1 based on obtaining the Freeswitch call abnormal disconnection detailed cause tracking system.
[0185] In addition, in combination with the Freeswitch call abnormal disconnection detailed cause tracking method of the above embodiment 1, this embodiment can provide a storage medium for implementation. The storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the Freeswitch call abnormal disconnection detailed cause tracking method of the above embodiment 1 is implemented.
[0186] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0187] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for tracking the cause of abnormal disconnection of a FreeSwitch call, characterized in that: include: Build a real-time recording system for field data; Select a matching tracing model according to the real-time recording system of field data, and write an off-line training system and an on-line reasoning system based on the tracing model; Extracting quantitative data from the on-site data real-time recording system and the manual quality inspection history database according to a preset ratio as training data; Iteratively training the causal model in the off-line training system through the training data to adjust its model parameters to obtain an optimal causal model; Using the optimal causal model to update the on-line reasoning system to obtain a target on-line reasoning system; Obtain the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predict the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data; The step of iteratively training the causal model in the off-line training system by using the training data to adjust its model parameters to obtain the optimal causal model specifically includes: Cleaning and converting the training data so that the key value format of the training data is converted into a text expression format; The training data after the format conversion is segmented by the concatenator to obtain the final data, wherein the final data specifically includes a long text string separated by SEP as input and an id of the corresponding detailed factor code as output; According to the final data, an adaptive loss function is selected to perform hyperparameter combination to iteratively train the tracing model in the off-line training system; wherein the loss function is a cross entropy loss function or a focal loss function; After the iterative training is completed, the evaluation formula is used to select the optimal model as the optimal tracing module.
2. The method for tracking the cause of abnormal disconnection of a FreeSwitch call according to claim 1, characterized in that: The steps of constructing the real-time recording system for on-site data specifically include: Determine each link to be collected and field information to be collected in each link according to the call link; By adding IP addresses to the whitelists of the collection server and the servers of each link, the network channels of each link can be interconnected; Write a python listening program script for the server of each link, collect the field information regularly and save it as a new file; The new file is stored in the source folder directory configured on the server of each link, so that the Flume system can realize real-time monitoring and automatically collect the monitoring results to the Kafka system; A real-time recording system for field data is constructed through the Flume system and the Kafka system.
3. The method for tracking the cause of abnormal disconnection of a FreeSwitch call according to claim 1, characterized in that: The steps of selecting a matching causal model according to the real-time recording system of field data, and writing an off-line training system and an on-line reasoning system based on the causal model specifically include: Selecting a matching causal model according to the consideration factors required by the pre-trained model in the real-time recording system for on-site data, and downloading an initial parameter file of the causal model; Based on the initial parameter file, an off-line training system and an on-line reasoning system are written for the tracing model.
4. The method for tracking the cause of abnormal disconnection of a FreeSwitch call according to claim 1, characterized in that: The evaluation formula is: , In the formula, F 1 represents the evaluation value, r represents the recall rate, p Indicates accuracy.
5. The method for tracking the cause of abnormal disconnection of a FreeSwitch call according to claim 1, characterized in that: The step of obtaining the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predicting the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data specifically includes: When a disconnection detail loss signal of a freeswitch call is obtained, corresponding target field data is intercepted from the field data real-time recording system according to the uuid of the freeswitch call; Preprocessing the target field data to obtain preprocessed field data; The pre-processed field data is input into the target on-line reasoning system for prediction to obtain the target detailed cause code of the abnormal disconnection of the freeswitch call.
6. The method for tracking the cause of abnormal disconnection of a FreeSwitch call according to claim 1, characterized in that: Based on the full adoption of historical data extracted from the manual quality inspection history database, data in the field data real-time recording system is extracted according to the preset ratio.
7. A Freeswitch call abnormal disconnection detailed cause tracking system, characterized in that: include: Building modules for constructing a real-time recording system for field data; A writing module, used for selecting a matching tracing model according to the real-time recording system of field data, and writing an off-line training system and an on-line reasoning system based on the tracing model; An extraction module is used to extract quantitative data as training data from the real-time recording system of field data and the manual quality inspection history database according to a preset ratio; A training module, configured to iteratively train the causal model in the off-line training system through the training data to adjust its model parameters and obtain an optimal causal model; An updating module, configured to update the on-line reasoning system using the optimal tracing model to obtain a target on-line reasoning system; A prediction module, used for obtaining the corresponding target field data according to the uuid of the abnormally disconnected freeswitch call, and predicting the target detailed cause code of the abnormal disconnection of the freeswitch call through the target on-line reasoning system based on the target field data; The training module includes: A conversion unit, used for cleaning and converting the training data so as to convert the key value format of the training data into a text expression format; A splicing unit, used for performing splicing segmentation on the training data after the format conversion to obtain final data, wherein the final data specifically includes a long text string separated by SEP as input and an ID corresponding to the detailed factor code as output; An iterative unit, configured to select an adaptive loss function according to the final data to perform hyperparameter combination to iteratively train a causal model in the off-line training system; wherein the loss function is a cross entropy loss function or a focal loss function; The selection unit is used to select the optimal model as the optimal tracing module using the evaluation formula after the iterative training is completed.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for tracking the detailed cause of abnormal disconnection of a FreeSwitch call according to any one of claims 1 to 6 is implemented.
9. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for tracking the detailed cause of abnormal disconnection of a FreeSwitch call according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Sequence labeling method and system, computer readable storage medium and computer equipment
CN112270181A
Strategy model training method and device, electronic equipment and storage medium
CN113759709A
Log anomaly detection model training method, device and equipment
CN115269304A
Incoming call routing method, device and system for call center
WO2020010719A1
