Method and system for resolving divergence between training and inference of unbalanced service perception in the communication field

By collecting the communication packet signals of the service APP and using category prior information to train cross-entropy loss, the problem of unbalanced categories of service APPs in the communication field is solved, and the identification accuracy and generalization ability of the service perception model are improved.

CN114626442BActive Publication Date: 2025-07-25NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210172383.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2025-07-25
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

In the field of communication, due to the uneven frequency of service APP usage, the machine learning model has poor accuracy for low-frequency APP categories, and it is difficult for the prior art to train a business perception model with high accuracy for all APP categories.

Method used

By deploying a prototype to collect the communication packet signals transmitted by the service APP, analyzing the data distribution to obtain the service APP category prior, and using cross-entropy loss with the service APP category prior to training the service perception model to improve the generalization performance of the model.

Benefits of technology

By introducing the business APP category prior information correction model training process, the ability to identify APP categories with low frequency is enhanced, overfitting is avoided, and the generalization performance of the model on the unbalanced data set is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114626442B_ABST
    Figure CN114626442B_ABST
Patent Text Reader

Abstract

The present invention discloses a training and inference divergence resolution method and system for unbalanced service awareness in the communication field. First, communication packet signals transmitted by service APPs are collected through a deployed prototype machine; then, a comprehensive measure of data imbalance is obtained by analyzing the data distribution of service APP categories to determine the prior of service APP categories; secondly, a service awareness model is trained using cross-entropy loss with the prior of service APP categories; finally, the service awareness model is deployed for inference use. The present invention proposes an effective method for solving the problem of data category imbalance in the field of service awareness, introduces prior information of service APP categories to correct the model training process, and can greatly improve the generalization performance of the service awareness model. The present invention is easy to implement and deploy and has strong applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to using a special machine learning model training method to solve the problem of unbalanced training data in business perception tasks, specifically a training and inference divergence resolution method and system for unbalanced business perception in the communication field. Background Art

[0002] With the emergence of portable devices such as mobile phones, various application software (APPs) have emerged in an endless stream. Due to the different functions and forms of different APPs, the required memory, computing resources, and network transmission bandwidth vary greatly. In order to save network transmission bandwidth and optimize the allocation of network transmission resources, it is often necessary to customize corresponding communication solutions for specific APPs. For example, entertainment applications such as short videos have relatively low requirements for network latency and can tolerate a certain degree of lag. However, applications such as news and sports broadcasts require relatively low network latency. Therefore, in the communication field, the server where the communication base station is located needs to identify and detect the traffic packets on the network to determine which APP they come from. Using a machine learning algorithm to train a business perception model to identify the APP type in the traffic is a possible solution.

[0003] Machine learning models often require that the training data be balanced, that is, the number of training for each APP category is relatively consistent. However, in actual situations, the usage frequencies of APPs vary greatly. For example, with the rise of short video entertainment, the usage frequencies of APPs such as Douyin and Kuaishou are much higher than those of some reading software. The imbalance of training data will directly cause the machine learning model to over-classify the APP categories with high frequencies, and it is difficult for the recognition accuracy of APP categories with low frequencies to reach the practical standard. Therefore, it is crucial to train a business perception model with high recognition accuracy for all business APPs in the case of unbalanced distribution of business APP categories. Summary of the Invention

[0004] Object of the Invention: The business perception field often faces the situation of unbalanced training data of business APPs. Ordinary machine learning model training will result in very poor recognition performance of APPs with relatively low frequencies. Therefore, the present invention corrects the training process of the business perception model by introducing the prior of APP category distribution to align it with the feature distribution of the inference process, thereby improving the overall performance of business perception.

[0005] Technical solution: A method for resolving the divergence between training and inference of unbalanced service perception in the communication field, including steps of prototype signal collection, data analysis, service perception model training, and service perception model inference; in the prototype signal collection step, deploy prototypes to collect communication packet signals transmitted by service APPs; in the data analysis step, obtain a comprehensive measure of data imbalance by analyzing the data distribution of service APP categories, and determine the prior of service APP categories; in the service perception model training step, train the service perception model using cross-entropy loss with the prior of service APP categories; in the service perception model inference step, deploy the service perception model for inference use.

[0006] The prototype signal collection step is specifically as follows:

[0007] Step 100, select diverse intelligent portable devices as prototypes;

[0008] Step 101, download different APPs on different prototypes;

[0009] Step 102, connect the prototypes to a server by wired or wireless means;

[0010] Step 103, establish a protocol between the prototypes and the server to allow the server to obtain the communication packets sent by the prototype APPs;

[0011] Step 104, use the APPs on the prototypes;

[0012] Step 105, collect the communication packet signals and their corresponding APP names used by each prototype when using the APPs on the server.

[0013] The data analysis step is specifically as follows:

[0014] Step 200, organize the collected signals on the server into a sample format of "(communication packet, APP name)";

[0015] Step 201, count the number N of all samples and the number C of all APP types;

[0016] Step 202, count the number of occurrences N1, N2,..., N C ;

[0017] Step 203, calculate the prior information P c =N c / N, c = 1, 2,..., C;

[0018] Step 204, plot the occurrence frequency of the APPs as a bar chart and save it.

[0019] The specific steps for training the service awareness model are as follows:

[0020] Step 300: Decode the "communication packets" in the samples in binary form;

[0021] Steps 301 - 302: Truncate or pad the communication packets to the maximum length L;

[0022] Step 303: Map the "APP name" in the samples to its subscript among all different service APPs;

[0023] Step 304: Organize all training samples into the form of (X i , y i ), i = 1, 2,..., N. Here, X i represents the communication packet signal, and y i ∈{1, 2,..., C} represents the APP category;

[0024] Step 305: Encode X i through the convolutional neural network E responsible for feature extraction in the service awareness model to obtain H i = E(X i );

[0025] Step 306: Calculate the imbalance correction coefficient according to the prior probability P c of the service APP category

[0026] Step 307: Calculate the corrected category scores through the classifier part W c , c = 1, 2,..., C, of the service awareness model and the category prior P c

[0027] Step 308: Calculate the predicted category distribution according to the Softmax function

[0028] Step 309: Calculate the corrected cross - entropy loss L = -∑ i=1,2,...,N ∑ c=1,2,...,C I{y i = c}log e Q i,c ; I is the indicator function, which returns 1 if the judgment condition in the parentheses is true, otherwise returns 0. That is, if y i = c, then return 1; otherwise, return 0.

[0029] Step 310: Calculate the parameter gradients of the service awareness model according to the cross - entropy loss;

[0030] Step 311: Use the gradient descent method to update the parameters of the service awareness model;​

[0031] Step 312, repeat steps 305 to 311 until the maximum number of iteration rounds is reached;

[0032] Step 313, save the final business awareness model (E, W c , c = 1, 2,..., C) on the server hard disk.

[0033] The inference steps of the business awareness model are specifically as follows:

[0034] Step 400, load the trained business awareness model (E, W c , c = 1, 2,..., C);

[0035] Step 401, extract the feature H = E(X) of the communication packet signal X to be tested through the convolutional neural network of the business awareness model;

[0036] Step 402, calculate the inner product of the feature and the classifier parameters of the business awareness model

[0037] Step 403, output the predicted APP type j = argmax c S c , this formula represents taking the subscript i of the maximum value in {S1, S2,..., S C}}.

[0038] The present invention is applicable to the training of a business awareness model in the case of unbalanced business APP categories, uses a convolutional neural network to extract features, and trains a business awareness classification model using cross-entropy loss.

[0039] A training and inference divergence resolution system for unbalanced business awareness in the communication field includes a prototype signal collection module, a data analysis module, a business awareness model training module, and a business awareness model inference module; the prototype signal collection module deploys prototypes to collect communication packet signals transmitted by business APPs; the data analysis module obtains a comprehensive measure of data imbalance by analyzing the data distribution of business APP categories and determines the prior of business APP categories; the business awareness model training module trains a business awareness model using cross-entropy loss with the prior of business APP categories; the business awareness model inference module deploys the business awareness model for inference use.

[0040] Among them, the implementation processes of the prototype signal collection module, the data analysis module, the business awareness model training module, and the business awareness model inference module are the same as the implementation processes of the prototype signal collection step, the data analysis step, the business awareness model training step, and the business awareness model inference step in the method, respectively.

[0041] A computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the above computer program, it implements the method for resolving the training and inference divergence of unbalanced service perception in the communication field as described above.

[0042] A computer-readable storage medium stores a computer program for executing the method for resolving the training and inference divergence of unbalanced service perception in the communication field as described above.

[0043] Beneficial effects: By introducing the prior information of the service APP category, the present invention corrects the training process of the service perception model, increases the output score of the service APP category with a lower occurrence frequency, avoids the overfitting phenomenon of the service perception model due to fewer samples, and at the same time aligns the feature distributions of the samples in the training and inference processes, thereby improving the generalization performance of the service perception model on the unbalanced training data set. Description of the Drawings

[0044] Figure 1 It is a flowchart of the prototype signal collection steps in the embodiment of the present invention;

[0045] Figure 2 It is a flowchart of the data analysis steps in the embodiment of the present invention;

[0046] Figure 3 It is a flowchart of the service perception model training steps in the embodiment of the present invention;

[0047] Figure 4 It is a flowchart of the service perception model inference steps in the embodiment of the present invention. Detailed Embodiments

[0048] The following further clarifies the present invention in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. After reading the present invention, those skilled in the art's various equivalent modifications of the present invention all fall within the scope defined by the appended claims of this application.

[0049] The following embodiments take the service APP perception on the mobile phone side as a specific example to elaborate on the method for resolving the training and inference divergence of unbalanced service perception in the communication field.

[0050] Such as Figure 1As shown, the sample signal collection steps are as follows: select a mobile phone that supports Android and IOS operating systems, and download various types of (video, music, learning, etc.) APPs (steps 100, 101), connect the mobile phone to the Linux server via wired or wireless means, and establish a data transmission protocol with the server, establish a data transmission protocol between the mobile phone and the Linux server, allow the server to obtain the communication package sent by the mobile phone APP (steps 102, 103), use the APP on the mobile phone (step 104), and collect and save the signal and name of the APP on the Linux server (step 105).

[0051] like Figure 2 As shown, the data analysis steps are as follows: the server organizes the collected signals into a sample format in the form of (communication packet, APP name) (step 200), counts the number of all samples N and the number of all APP types C (step 201), and counts the number of times each APP appears N1, N2, ..., N C (Step 202), calculate the frequency of occurrence of each APP type to obtain prior information P c =N c / N, c=1, 2, ..., C (step 203), the APP appearance frequency is plotted as a bar chart and saved (step 204) for data visualization analysis.

[0052] like Figure 3 As shown, the steps of training the business perception model are as follows: decoding the communication packets in the sample in binary form (step 300), truncating the "communication packets" whose length exceeds the longest sequence length L to a length of L (step 301), filling the "communication packets" whose length is less than the longest sequence length L with 0 values until the length is L (step 302), mapping the APP name to its index in all different business APPs (step 303), and organizing all training samples into (X i ,y i ), i = 1, 2, ..., N (step 304), X i Through the convolutional neural network E, features are extracted to obtain H i =E(X i )(Step 305), calculate the unbalance correction coefficient (Step 306), through the business-aware model classifier part W c , c = 1, 2, ..., C, and category prior P c Calculate the corrected category scores (Step 307), calculate the predicted category distribution according to the Softmax function (Step 308), calculate the corrected cross entropy loss L = -∑ i=1,2,...,N ∑c=1,2,...,C I{y i = c} log Q i,c (Step 309), calculate the parameter gradient of the service awareness model according to the cross-entropy loss (Step 310), use the gradient descent method to update the parameters of the service awareness model (Step 311), repeat Steps 305 to 311 until the maximum number of iterations is reached (Step 312), and save the final service awareness model (E, W c , c = 1, 2,..., C) on the server hard disk (Step 313).

[0053] As Figure 4 shown, the inference steps of the service awareness model are as follows: load the service awareness model (E, W c , c = 1, 2,..., C) (Step 400), extract the feature H = E(X) from the communication packet signal X through the convolutional neural network (Step 401), calculate the inner product of the feature and the classifier parameters of the service awareness model (Step 402), and output the predicted APP type j = argmax c S c (Step 403).

[0054] A training and inference divergence resolution system for unbalanced service awareness in the communication field includes a prototype signal collection module, a data analysis module, a service awareness model training module, and a service awareness model inference module; the prototype signal collection module deploys a prototype to collect communication packet signals transmitted by business APPs; the data analysis module obtains a comprehensive measure of data imbalance by analyzing the data distribution of business APP categories and determines the prior of business APP categories; the service awareness model training module trains the service awareness model using the cross-entropy loss with the prior of business APP categories; the service awareness model inference module deploys the service awareness model for inference use.

[0055] Obviously, those skilled in the art should understand that each step of the above training and inference divergence resolution method for unbalanced service awareness in the communication field of the embodiments of the present invention or each module of the training and inference divergence resolution system for unbalanced service awareness in the communication field can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

Claims

1. A training and inference divergence resolution method for unbalanced service perception in the communication field, characterized in that It includes a prototype signal collection step, a data analysis step, a business perception model training step, and a business perception model inference step; in the prototype signal collection step, a prototype is deployed to collect communication packet signals transmitted by business APPs; in the data analysis step, a comprehensive measure of data imbalance is obtained by analyzing the data distribution of business APP categories, and the prior of business APP categories is determined; in the business perception model training step, the business perception model is trained using cross-entropy loss with the prior of business APP categories; in the business perception model inference step, the business perception model is deployed for inference use; The specific implementation steps of the business perception model training step are as follows: Step 300, decode the "communication packet" in the sample in binary form; Steps 301-302, truncate or pad the communication packet to the maximum length L; Step 303, map the "APP name" in the sample to its subscript among all different business APPs; Step 304, organize all training samples into the form of (X i , y i ), where i = 1, 2,..., N, X i represents the i-th communication packet signal, and y i ∈ {1, 2,..., C} represents the i-th APP category; Step 305, encode the i-th communication packet signal X i through the convolutional neural network E responsible for feature extraction in the service awareness model to obtain the i-th feature H i = E(X i ); Step 306, calculate the c-th imbalance correction coefficient according to the prior probability P of the c-th business APP category c ​ Step 307, through the c-th service perception model classifier part W c , where c = 1, 2, …, C, and the c-th service APP category prior P c calculate the corrected category score Step 308, calculate the predicted class distribution according to the Softmax function Step 309, calculate the corrected cross-entropy loss L = -∑ i=1,2,…,N ∑ c=1,2,…,C I{y i = c} log e Q i,c ; Step 310, calculate the parameter gradient of the business perception model according to the cross-entropy loss; Step 311, use the gradient descent method to update the parameters of the business perception model; Step 312, repeat steps 305 to 311 until the maximum number of iteration rounds is reached; Step 313, save the final business perception model (E, W c , c = 1, 2, …, C) in the server hard disk.

2. The training and inference divergence resolution method for unbalanced service awareness in the communication field according to claim 1, wherein The specific implementation steps of the prototype signal collection step are as follows: Step 100, select an intelligent portable device as the prototype; Step 101, download different APPs on different prototypes; Step 102, connect the prototype to a server in a wired or wireless manner; Step 103, establish a protocol between the prototype and the server to allow the server to obtain the communication packets sent by the prototype APP; Step 104, use the APP on the prototype; Step 105, collect the communication packet signals used by each prototype when using the APP and their corresponding APP names on the server.

3. The training and inference divergence resolution method for unbalanced service awareness in the communication field according to claim 1, characterized in that The specific implementation steps of the data analysis step are as follows: Step 200, organize the collected signals into a sample format of "(communication packet, APP name)" on the server; Step 201, count the number N of all samples and the number C of all APP types; Step 202, count the occurrence times N1, N2, …, N of each APP C ; Step 203, calculate the prior information P of the occurrence frequency of each APP type c = N c / N, where c = 1, 2, …, C; Step 204, draw a bar chart of the APP occurrence frequency and save it.

4. The training and inference divergence resolution method for unbalanced service awareness in the communication field according to claim 1, wherein The specific implementation steps of the business perception model inference step are as follows: Step 400, load the trained business perception model (E, W c , c = 1, 2, …, C); Step 401, extract the feature H = E(X) of the communication packet signal X to be tested through the convolutional neural network of the business perception model; Step 402, calculate the inner product of the features and the classifier parameters of the business perception model Step 403, output the predicted APP type j = argmax c S c .

5. A training and inference divergence resolution system for unbalanced service awareness in the communication field, characterized in that, It includes a prototype signal collection module, a data analysis module, a business perception model training module, and a business perception model inference module; the prototype signal collection module deploys a prototype to collect communication packet signals transmitted by business APPs; the data analysis module obtains a comprehensive measure of data imbalance by analyzing the data distribution of business APP categories and determines the prior of business APP categories; the business perception model training module trains the business perception model using cross-entropy loss with the prior of business APP categories; the business perception model inference module deploys the business perception model for inference use; The implementation steps of the business perception model training module are as follows: Step 300, decode the "communication packet" in the sample in binary form; Steps 301 - 302, truncate or pad the communication packet to the maximum length L; Step 303, map the "APP name" in the sample to its subscript among all different business APPs; Step 304, organize all training samples into the form of (X i , y i ), where i = 1, 2,..., N, X i represents the i-th communication packet signal, and y i ∈ {1, 2,..., C} represents the i-th APP category; Step 305: Encode the i-th communication packet signal X i through the convolutional neural network E responsible for feature extraction in the service awareness model to obtain the i-th feature H i = E(X i ); Step 306, calculate the c-th imbalance correction coefficient according to the prior probability P of the c-th business APP category c ​ Step 307, through the c-th service perception model classifier part W c , where c = 1, 2, …, C, and the c-th service APP category prior P c Calculate the corrected category score Step 308, calculate the predicted class distribution according to the Softmax function Step 309, calculate the corrected cross-entropy loss L = ∑ i=1,2,…,N ∑ c=1,2,…,C I{y i = c} log e Q i,c ; Step 310, calculate the parameter gradients of the service awareness model according to the cross - entropy loss; Step 311, use the gradient descent method to update the parameters of the service awareness model; Step 312, repeat steps 305 to 311 until the maximum number of iterations is reached; Step 313, save the final business perception model (E, W c , c = 1, 2, …, C) in the server hard disk.

6. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the training - inference divergence resolution method for unbalanced services in the communication field as described in any one of claims 1 - 4.

7. A computer-readable storage medium, characterized in that: The computer - readable storage medium stores a computer program for executing the training - inference divergence resolution method for unbalanced services in the communication field as described in any one of claims 1 - 4.