A traffic classification method, device, electronic device, medium and product

By obtaining the business attributes and cost consumption data of the target traffic and using the traffic value model for detailed classification, the problem of insufficient traffic classification in the existing technology is solved, and more efficient resource utilization and intelligent computing power allocation are achieved.

CN114490817BActive Publication Date: 2025-07-11BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210070532.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2025-07-11
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

In the prior art, traffic classification is mainly based on the service dimension, and it is impossible to refine and distinguish traffic of the same service type, resulting in low resource utilization, especially under the characteristics of tidal flows, and serious resource waste.

Method used

By obtaining the business attribute data and cost consumption data of the target traffic, using pre-trained traffic value models, combined with algorithms such as neural networks, predicting the value types of traffic to achieve more detailed traffic classification.

Benefits of technology

It improves the accuracy and resource utilization of traffic division, can intelligent computing power allocation based on traffic value, and improves the system's processing effect at high and low loads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490817B_ABST
    Figure CN114490817B_ABST
Patent Text Reader

Abstract

The present disclosure provides a traffic classification method, apparatus, electronic device, medium and product, which relates to the technical field of data processing, and particularly to the technical field of big data. It can classify traffic according to the value of traffic. The specific implementation solution is as follows: obtain the target traffic, and then obtain the service attribute data of the target traffic. Then, according to the preset correspondence between the traffic type and the cost consumption data, determine the cost consumption data corresponding to the type of the target traffic, where the cost consumption data represents the amount of resources required to process the traffic. After that, input the service attribute data and the cost consumption data into a pre-trained traffic value model, and obtain the value type of the target traffic output by the traffic value model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technologies, and in particular to the field of big data technologies. Background Art

[0002] Classifying traffic is beneficial for performing different processing on different types of traffic. Currently, traffic is generally classified and marked from the business dimension through traffic coloring, and different processing is performed based on different marks of the traffic. For example, a part of the traffic is colored based on the business dimension, and different processing is performed on the colored traffic and the uncolored traffic, so as to obtain experimental effects from the processing results. Another example is in the gray release mechanism, a part of the traffic is circled based on the business dimension to release a new version, and the effect of the new version is observed, and then the new version is gradually promoted. Summary of the Invention

[0003] The present disclosure provides a traffic classification method, apparatus, electronic device, medium, and product.

[0004] In a first aspect of an embodiment of the present disclosure, a traffic classification method is provided, including:

[0005] Obtain target traffic;

[0006] Obtain business attribute data of the target traffic;

[0007] According to a preset correspondence between traffic types and cost consumption data, determine the cost consumption data corresponding to the type of the target traffic, where the cost consumption data represents the amount of resources required to process the traffic;

[0008] Input the business attribute data and the cost consumption data into a pre-trained traffic value model, and obtain the value type of the target traffic output by the traffic value model.

[0009] Optionally, the traffic value model is trained in the following manner:

[0010] Obtain a sample training set, where the sample training set includes business attribute data and cost consumption data of multiple sample traffic, and training labels of each sample traffic;

[0011] Input the business attribute data and the cost consumption data of the sample traffic into the traffic value model, and obtain the value type of the sample traffic output by the traffic value model;

[0012] Based on the value type of the sample traffic output by the traffic value model and the training labels of the sample traffic, determine whether the traffic value model converges;

[0013] If the traffic value model does not converge, adjust the model parameters of the traffic value model, and return to the step of inputting the service attribute data and cost consumption data of the sample traffic into the traffic value model;

[0014] If the traffic value model converges, it is determined that the training of the traffic value model is completed.

[0015] Optionally, the obtaining of the sample training set includes:

[0016] For each sample traffic, obtain the service attribute data, cost consumption data, and service value data of the sample traffic, where the service value data represents the revenue that can be brought by processing the traffic;

[0017] Generate a training label for the sample traffic according to the service value data of the sample traffic.

[0018] Optionally, the obtaining of the service attribute data, cost consumption data, and service value data of each sample traffic includes:

[0019] Receive the relevant data of the sample traffic sent by the Agent, where the relevant data includes service attribute data, cost consumption data, and / or service value data; the Agent is used to pull the relevant data of the sample traffic from the service module that processes the sample traffic; and / or,

[0020] Receive the relevant data of the sample traffic sent by the polling server, where the polling server is used to request the relevant data of the sample traffic from the service module in a polling manner.

[0021] Optionally, the value type includes high value and low value; after obtaining the value type of the target traffic output by the traffic value model, the method further includes:

[0022] Associate the target traffic with the value type of the target traffic, and send the target traffic and the value type of the target traffic to the service module, so that the service module increases the amount of resources allocated to the high-value traffic when the load is low, or increases the amount of resources allocated to the high-value traffic when the load is high, and reduces the amount of resources allocated to the low-value traffic.

[0023] In a second aspect of the embodiments of the present disclosure, a traffic classification device is provided, including:

[0024] An obtaining module, configured to obtain target traffic;

[0025] The obtaining module is further configured to obtain the service attribute data of the target traffic;

[0026] A determination module, configured to determine the cost consumption data corresponding to the type of the target traffic according to a preset correspondence between the traffic type and the cost consumption data, where the cost consumption data represents the amount of resources required to process the traffic;

[0027] A prediction module, configured to input the service attribute data and the cost consumption data into a pre-trained traffic value model, and obtain the value type of the target traffic output by the traffic value model.

[0028] Optionally, the device further includes a training module, and the training module is configured to:

[0029] Obtain a sample training set, where the sample training set includes the service attribute data and cost consumption data of multiple sample traffic, and the training label of each sample traffic;

[0030] Input the service attribute data and cost consumption data of the sample traffic into the traffic value model, and obtain the value type of the sample traffic output by the traffic value model;

[0031] Based on the value type of the sample traffic output by the traffic value model and the training label of the sample traffic, determine whether the traffic value model converges;

[0032] If the traffic value model does not converge, adjust the model parameters of the traffic value model, and return to the step of inputting the service attribute data and cost consumption data of the sample traffic into the traffic value model;

[0033] If the traffic value model converges, determine that the training of the traffic value model is completed.

[0034] Optionally, the training module is specifically configured to:

[0035] For each sample traffic, obtain the service attribute data, cost consumption data, and business value data of the sample traffic, where the business value data represents the revenue that can be brought by processing the traffic;

[0036] Generate the training label of the sample traffic according to the business value data of the sample traffic.

[0037] Optionally, the training module is specifically configured to:

[0038] Receive the relevant data of the sample traffic sent by an Agent, where the relevant data includes service attribute data, cost consumption data, and / or business value data; the Agent is used to pull the relevant data of the sample traffic from the business module that processes the sample traffic; and / or,

[0039] Receive relevant data of the sample traffic sent by the polling server, where the polling server is used to request relevant data of the sample traffic from the service module in a polling manner.

[0040] Optionally, the value type includes high value and low value; the apparatus further includes: a sending module, and the sending module is configured to:

[0041] After obtaining the value type of the target traffic output by the traffic value model, associate the target traffic with the value type of the target traffic, and send the target traffic and the value type of the target traffic to the service module, so that when the service module is under low load, increase the amount of resources allocated to high-value traffic, or when under high load, increase the amount of resources allocated to high-value traffic and reduce the amount of resources allocated to low-value traffic.

[0042] In a third aspect of the embodiments of the present disclosure, an electronic device is provided, including:

[0043] At least one processor; and

[0044] A memory communicatively connected to the at least one processor; wherein,

[0045] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the traffic classification method described in any one of the above.

[0046] In a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the traffic classification method described in any one of the above.

[0047] In a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program, and the computer program realizes the traffic classification method described in any one of the above when executed by a processor.

[0048] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0050] Figure 1 is a flowchart of a traffic classification method provided by an embodiment of the present disclosure;

[0051] Figure 2 It is a flowchart of a method for training a traffic value model provided by an embodiment of the present disclosure;

[0052] Figure 3 It is a flowchart of a method for obtaining a sample training set provided by an embodiment of the present disclosure;

[0053] Figure 4 It is a schematic structural diagram of a traffic classification device provided by an embodiment of the present disclosure;

[0054] Figure 5 It is a block diagram of an electronic device for implementing the traffic classification method of an embodiment of the present disclosure. Detailed implementation manners

[0055] The following makes an explanation of exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to help understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted below.

[0056] Currently, large computer service systems usually have a huge number of accessing users and receive a huge amount of traffic. To process the huge traffic and ensure a sufficiently low online processing delay, a large amount of computing and storage resources usually need to be invested.

[0057] Due to the tidal traffic characteristics of the business, more traffic is received during peak periods, and the resource utilization rate is also higher; less traffic is received during non-peak periods, resulting in a waste of computing power resources. Therefore, how to use resources more reasonably and efficiently and maximize the use of computing power to obtain benefits is a very valuable research direction.

[0058] To adapt to the tidal traffic characteristics, it is necessary to classify the traffic, so as to reasonably allocate different resources to different types of traffic and effectively improve the resource utilization rate.

[0059] Currently, traffic classification exists in the small traffic observation scenario when the service goes online and the gray release scenario when a new version is released. However, the current traffic classification is based on the business dimension. For example, the traffic for requesting to open a web page is classified into one category, and the traffic for requesting to watch a video is classified into one category.

[0060] In the small - traffic observation scenario during business launch, traffic coloring is performed on a portion of traffic based on the business dimension, and different processing is carried out on the colored traffic and the uncolored traffic, so as to obtain the experimental effect from the processing results. In the gray - scale release scenario when a new version is released, a portion of traffic is defined based on the business dimension to release the new version of the software, and the running effect of the new version is observed, so as to gradually promote the new version later.

[0061] This way of classifying traffic based on the business dimension can distinguish traffic of different business types, but it cannot distinguish traffic of the same business type. For example, it cannot distinguish traffic for requesting to open a web page from different users. Therefore, the conventional traffic division method has a relatively coarse traffic division granularity.

[0062] To refine the classification of traffic, the embodiments of the present disclosure provide a traffic classification method, which can be applied to electronic devices with data - processing capabilities such as servers or desktop computers. As Figure 1 shown, the method includes the following steps:

[0063] S101. Obtain target traffic.

[0064] In the embodiments of the present disclosure, the target traffic is a service request sent by a terminal. For example, the service request is used to request to obtain the content of a specified web page, request to add a specified item to the shopping cart, or request to purchase a specified item, etc.

[0065] S102. Obtain the service - attribute data of the target traffic.

[0066] Among them, the service - attribute data is used to characterize the characteristics of the traffic in the business dimension. The service - attribute data includes multiple traffic attributes. Specifically, the service - attribute data includes but is not limited to: traffic - trigger time attribute, user attribute, and population attribute, etc. Among them, the traffic - trigger time attribute may include the time when the terminal sends traffic or the time when the electronic device receives traffic; the user attribute represents the age, gender, and / or location of the user who sends the traffic, etc. The population attribute includes the age - range attribute, location - region attribute, income attribute, and / or occupation attribute of the user who sends the traffic, etc. Among them, the population attribute is determined based on the user attribute. For example, the age - range attribute in the population attribute is the age range where the user's age is located, and the location - region attribute is the region where the user's location belongs.

[0067] In one implementation, some attributes in the service - attribute data can be extracted from the target traffic, and some attributes in the service - attribute data can be obtained from the database. Among them, the database can be configured locally on the electronic device or configured in other devices other than the electronic device. The database stores the user attributes and population attributes corresponding to each user ID. The user attributes and population attributes can also be referred to as user - portrait information.

[0068] For example, extract the Internet Protocol (IP) address of the terminal that sends the target traffic from the target traffic, so as to obtain the location where the sender of the target traffic is located according to the extracted IP address, and then obtain the regional attribute to which this location belongs. Also, extract the user identity document (ID) of the user who sends the target traffic from the target traffic, and then obtain the user age, gender, occupation attribute, etc. corresponding to this user ID from the database.

[0069] S103. Determine the cost consumption data corresponding to the type of the target traffic according to the preset correspondence between the traffic type and the cost consumption data.

[0070] Among them, the cost consumption data represents the amount of resources required to process the traffic. Specifically, the cost consumption data represents the amount of resources consumed in the overall transfer process of the traffic in the processing system from reception to completion of processing. Specifically, the cost consumption data includes, but is not limited to: central processing unit (CPU) quota, CPU usage duration, memory occupancy, disk input / output (I / O) occupancy and usage duration, and bandwidth occupancy, etc.

[0071] The traffic type can also be called the service type, which represents the service to which the traffic belongs. For example, the service type includes web page display type, product adding to shopping cart type, or product ordering type, etc. It can be understood that the processing logics of traffic of the same service type are similar, so the consumed resources are also similar. Therefore, the corresponding cost consumption data can be set in advance for each service type. For example, set the cost consumption data corresponding to the web page display type to include: CPU usage duration is a, memory occupancy is b, and disk usage duration is c. Set the cost consumption data corresponding to the product ordering type to include: CPU usage duration is d, memory occupancy is e, and disk usage duration is f.

[0072] S104. Input the service attribute data and the cost consumption data into a pre-trained traffic value model to obtain the value type of the target traffic output by the traffic value model.

[0073] Among them, the traffic value model can be set according to business requirements. For example, the traffic value model is a model constructed based on algorithms such as decision tree, Bayesian classification, random forest, or neural network model.

[0074] Or, the traffic value model can be a linear equation. For example, the traffic value model can calculate the weighted sum of the service attribute data and the cost consumption data, and when the calculation result is greater than the threshold, determine that the value type of the target traffic is high value; when the calculation result is less than or equal to the threshold, determine that the value type of the target traffic is low value.

[0075] The traffic classification method provided by the embodiments of the present disclosure can obtain the value type of the target traffic through a traffic value model based on the service attribute data and cost consumption data of the target traffic. It can be seen that the embodiments of the present disclosure combine the service attributes and cost consumption of the traffic to determine the value type of the traffic, that is, the traffic is classified according to the value of the traffic.

[0076] Since the embodiments of the present disclosure classify traffic according to traffic value, and the value type of traffic is determined based on the service attributes and cost consumption of the traffic, that is, the value types of traffic with different service attributes and different cost consumptions are different, the embodiments of the present disclosure can distinguish traffic of different users, different times, different regions, etc. Compared with the method of dividing traffic only by the service dimension, the embodiments of the present disclosure improve the division accuracy of traffic and make the division granularity of traffic finer.

[0077] In addition, the embodiments of the present disclosure classify traffic more carefully based on the value of the traffic, which is convenient for subsequent more reasonable computing power allocation based on the type of traffic and improves resource utilization.

[0078] In one embodiment of the present disclosure, referring to Figure 2 taking the traffic value model constructed based on the neural network model as an example, the traffic value model in S104 above can be obtained through the following training:

[0079] S201. Obtain a sample training set.

[0080] Among them, the sample training set includes the service attribute data and cost consumption data of multiple sample traffic, as well as the training labels of each sample traffic. The training label of the sample traffic is determined based on the business value data of the sample traffic, where the business value data represents the revenue that can be brought by processing the traffic.

[0081] Optionally, the business value data may include multiple product metrics representing revenue. Specifically, the business value data includes but is not limited to: revenue, click-through rate, and user dwell time, etc. Among them, revenue may include the amount of Gross Merchandise Volume (GMV), sales volume, and / or order amount, etc.

[0082] The training label of the sample traffic represents the value type of the sample traffic. For example, the training label of 1 represents high value, and the training label of 0 represents low value.

[0083] S202. Input the service attribute data and cost consumption data of the sample traffic into the traffic value model to obtain the value type of the sample traffic output by the traffic value model.

[0084] Among them, the traffic value model can be a neural network model such as K-Nearest Neighbor (KNN), Linear Discriminant Analysis (LDA), or Quadratic Discriminant Analysis (QDA).

[0085] In the embodiments of the present disclosure, the traffic value model can predict the value score of the sample traffic, and when the score is greater than the preset score, determine that the value type is high value; when the score is less than or equal to the preset score, determine that the value type is low value. The prediction result of the traffic value model is negatively correlated with the cost consumption data of the sample traffic, such as inversely proportional; and the prediction result of the traffic value model is positively correlated with the business value data, such as directly proportional.

[0086] Optionally, before S202, the traffic attributes of the business attribute data and cost consumption data of the sample traffic can also be used as features to construct a multi-dimensional traffic classification. For example, the traffic classification can be constructed by multi-dimensional cross of age attribute, geographical attribute, income attribute, occupation attribute, and traffic trigger time period, and then a classification label is marked for each sample traffic. Marking the classification label for the sample traffic is beneficial for the traffic value model to learn the relationship between the classification label and the value type.

[0087] S203. Determine whether the traffic value model converges based on the value type of the sample traffic output by the traffic value model and the training label of the sample traffic. If the traffic value model does not converge, execute S204; if the traffic value model converges, execute S205.

[0088] In one implementation, the loss function value can be calculated based on the value type of the sample traffic output by the traffic value model and the training label of the sample traffic. Then, it is determined whether the traffic value model converges based on the loss function value.

[0089] Optionally, when the loss function value is less than the preset threshold, it is determined that the traffic value model converges; when the loss function value is greater than or equal to the preset threshold, it is determined that the traffic value model does not converge.

[0090] Or, when the difference between the loss function value calculated this time and the loss function value calculated last time is less than the preset difference, it is determined that the traffic value model converges; when the difference between the loss function value calculated this time and the loss function value calculated last time is greater than or equal to the preset difference, it is determined that the traffic value model does not converge.

[0091] S204. Adjust the model parameters of the traffic value model and return to S202.

[0092] In one implementation, the gradient descent method can be adopted to adjust the model parameters of the traffic value model, and based on the adjusted traffic value model, return to execute S202 to continue training.

[0093] S205. Determine that the training of the traffic value model is completed.

[0094] It can be understood that when the traffic value model converges, it indicates that the prediction accuracy of the current traffic value model is relatively high, and at this time, the training of the traffic value model is completed.

[0095] Adopt Figure 2 Using the method shown, the embodiments of the present disclosure can train the traffic value model based on the training labels of the sample traffic, so that the prediction results of the traffic value model are getting closer and closer to the training labels, thereby improving the prediction accuracy of the traffic value model.

[0096] Similarly, when the traffic value model is a model constructed based on other algorithms, the training labels of the sample traffic can also be determined through the business value data of the sample traffic, and the traffic value model can be trained by using the business attribute data, cost consumption data and training labels of the sample traffic through conventional training methods. The embodiments of the present disclosure will not elaborate herein.

[0097] In the technical solution of the present disclosure, the processing of collection, storage, use, processing, transmission, provision and disclosure of the involved traffic all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0098] It should be noted that the traffic in this embodiment is not the traffic of a specific user, and the business attribute data of the traffic cannot reflect the personal information of a specific user.

[0099] It should be noted that the sample traffic in this embodiment can come from a public data set.

[0100] In an embodiment of the present disclosure, referring to Figure 3 , the above-mentioned manner of obtaining the sample training set in S201 includes the following steps:

[0101] S301. For each sample traffic, obtain the business attribute data, cost consumption data and business value data of the sample traffic.

[0102] The business attribute data, cost consumption data and business value data of the sample traffic can be obtained through the following two methods.

[0103] Method 1: Receive the relevant data of the sample traffic sent by an Agent. Among them, the relevant data includes business attribute data, cost consumption data and / or business value data. The Agent is used to pull the relevant data of the sample traffic from the business module that processes the sample traffic.

[0104] In one implementation, the Agent can read the logs of the traffic processed by the business module from the local disk of the business module and obtain the relevant data of the sample traffic from the logs. The data collection method through the Agent is suitable for collecting basic information and sampling of data. For example, collecting the business attribute data of the sample traffic through the Agent.

[0105] Optionally, after the Agent collects the relevant data of the sample traffic, it can also perform local merging and rough processing on the collected data. For example, merging the business attribute data of the sample traffic from the same user, adding the business value data, and adding the cost consumption data. Another example is to merge the business attribute data of the sample traffic from the same administrative region, taking the average value of the business value data, and taking the average value of the cost consumption data, etc.

[0106] Method 2: Receive the relevant data of the sample traffic sent by the polling server. Among them, the polling server is used to request and obtain the relevant data of the sample traffic from the business module in a polling manner. Among them, the relevant data includes business attribute data, cost consumption data, and / or business value data.

[0107] In one implementation, the business module can include multiple business sub-modules. The polling server can periodically initiate asynchronous requests to each business sub-module centrally and obtain the relevant data of the sample traffic asynchronously returned by each business sub-module. The data collection method through the polling server is suitable for collecting data with frequent control changes and data with long calculation overheads. For example, collecting cost consumption data and business value data through the polling server.

[0108] Optionally, after the polling server collects the relevant data of the sample traffic, it can also perform local merging and rough processing on the collected data.

[0109] Optionally, the business attribute data, cost consumption data, and business value data of the sample traffic can be obtained through Method 1 or Method 2.

[0110] Alternatively, Method 1 and Method 2 can also be combined to obtain the business attribute data, cost consumption data, and business value data of the sample traffic. For example, using Method 1 to obtain the business attribute data and using Method 2 to obtain the cost consumption data and business value data.

[0111] Obtaining data from the logs of the business module through the Agent, this data collection method is non-invasive and does not affect the normal operation of the business module during data collection. Collecting data through the polling server can obtain the relevant data of the sample traffic more quickly, thus ensuring the timeliness of the obtained data.

[0112] S302. Generate a training label for the sample traffic according to the business value data of the sample traffic.

[0113] Optionally, the business value data includes multiple product metrics representing revenue. Specifically, the business value data includes, but is not limited to, revenue, click-through rate, and user dwell time, etc.

[0114] In one implementation, the weighted sum of the data included in the business value data of the sample traffic can be calculated, and when the calculation result is greater than a predetermined value, the training label of the sample traffic is determined to be of high value; when the calculation result is less than or equal to the predetermined value, the training label of the sample traffic is determined to be of low value.

[0115] In another implementation, it can be determined whether each data included in the business value data of the sample traffic is greater than its corresponding threshold. If so, the training label of the sample traffic is determined to be of high value; if not, the training label of the sample traffic is determined to be of low value.

[0116] Or other methods can also be used to generate a training label based on the business value data of the sample traffic, and the embodiments of the present disclosure do not make specific limitations on this.

[0117] Adopt Figure 3 The method shown can be used by the embodiments of the present disclosure to construct a training label based on the business value data of the sample traffic, so that the training label can better reflect the true revenue brought by the traffic. Furthermore, the prediction result of the traffic value model trained by the training label is closer to the true revenue that the traffic can bring.

[0118] In an embodiment of the present application, after obtaining the value type of the target traffic output by the traffic value model in S104 above, the embodiments of the present disclosure can also perform more reasonable resource allocation based on the value type of the traffic.

[0119] That is, the electronic device can also perform: associate the target traffic with the value type of the target traffic, and send the target traffic and the value type of the target traffic to the service module. Wherein, the value type of the traffic includes high value and low value. So that when the service module is under low load, it increases the amount of resources allocated to the high-value traffic, or when it is under high load, it increases the amount of resources allocated to the high-value traffic and reduces the amount of resources allocated to the low-value traffic.

[0120] In a large-scale computing service system, a business module usually includes multiple business sub-modules. Different business sub-modules have different responsibilities, can handle different types of traffic, and also have different computing powers and costs. In the embodiments of the present disclosure, an electronic device can set the value type of the target traffic as the label of the target traffic, and send the target traffic and the value type of the target traffic to the business sub-module that processes the type of the target traffic.

[0121] Each business sub-module can, through an elastic mechanism, based on different processing logics according to different value types of traffic, and thus allocate different computing powers. The elastic mechanism includes the following two aspects:

[0122] In the first aspect, when the overall system composed of each business sub-module is under low load, when each business sub-module processes high-value traffic, it tilts the computing power towards the high-value traffic, that is, increases the load resources allocated to the high-value traffic, so as to improve the processing effect of the high-value traffic, utilizes the redundant load resources, and improves the utilization rate of the load resources.

[0123] For example, by expanding resources, the calculation candidate set of the high-value traffic can be increased, so as to screen out more high-quality results. Or, by expanding resources, the calculation accuracy of the high-value traffic can be increased, so that the calculation result is more accurate, thus achieving a better effect.

[0124] In the second aspect, when the overall system composed of each business sub-module is under high load, each business sub-module can reduce the load resources allocated to the low-value traffic, and provide the saved load resources for the high-value traffic to be processed, so as to improve the processing effect of the high-value traffic.

[0125] For example, by reducing resources, the calculation candidate set of the low-value traffic can be reduced, and the reduced load resources can be provided for the high-value traffic, so as to increase the calculation candidate set of the high-value traffic. Or, by reducing resources, the calculation accuracy of the low-value traffic or the calculation logic can be simplified, and the reduced load resources can be provided for the high-value traffic to improve the calculation accuracy of the high-value traffic, thus improving the processing effect of the high-value traffic.

[0126] By adopting the above method, the embodiments of the present disclosure can divide the traffic from the dimension of traffic value, so as to obtain the value portrait of the traffic, that is, the value type of the traffic. Then, intelligent computing power allocation is performed according to the value portrait of the traffic, so as to achieve better business effects and higher benefits. Since the traffic classification method can also be applied to the field of computing power allocation after the traffic is more finely divided in the embodiments of the present disclosure, the application scope of the embodiments of the present disclosure is wider.

[0127] It can be seen from the above solution that the core part of the embodiments of the present disclosure includes: traffic value data collection service and traffic value model evaluation service;

[0128] The traffic value data collection service is configured in the electronic device and is used to collect data through the above Figure 3 The method shown collects the business attribute data, cost consumption data and business value data of the sample traffic, and reports the collected data to the traffic value model evaluation service through a unified interface.

[0129] The traffic value model evaluation service is configured in the electronic device for Figure 2 The method shown in the figure classifies the value of traffic and predicts the value type of traffic based on the data collected by the traffic value data collection service, and then builds a traffic value model based on the classification results and prediction results. Figure 1 The value type of target traffic is predicted in the manner shown.

[0130] The disclosed embodiment also includes: intelligent computing power allocation service.

[0131] Among them, the intelligent computing power allocation service is configured in the business submodule, and is used to dispatch computing power resources according to different value types of traffic through the first and second aspects of the above-mentioned elastic mechanism. Specifically, through the elastic allocation strategy, greater computing power support is given to high-value traffic to expand the profit effect; for low-value traffic, the computing strategy is tailored according to the actual situation to release computing power resources.

[0132] Based on the same inventive concept, corresponding to the above method embodiment, the embodiment of the present disclosure provides a device for determining the value of traffic, such as Figure 4 As shown, the device includes: an acquisition module 401, a determination module 402 and a prediction module 403;

[0133] An acquisition module 401 is used to acquire target traffic;

[0134] The acquisition module 401 is also used to acquire the service attribute data of the target traffic;

[0135] A determination module 402 is used to determine the cost consumption data corresponding to the type of target traffic according to a preset correspondence between the traffic type and the cost consumption data, where the cost consumption data indicates the amount of resources consumed to process the traffic;

[0136] The prediction module 403 is used to input the business attribute data and the cost consumption data into the pre-trained traffic value model to obtain the value type of the target traffic output by the traffic value model.

[0137] The traffic classification device provided by the embodiments of the present disclosure can obtain the value type of the target traffic through a traffic value model according to the service attribute data and cost consumption data of the target traffic. It can be seen that the embodiments of the present disclosure combine the service attributes and cost consumption of the traffic to determine the value type of the traffic, that is, realize traffic classification according to the value of the traffic.

[0138] Optionally, the device may further include a training module, and the training module is used for:

[0139] Obtain a sample training set, where the sample training set includes the service attribute data and cost consumption data of multiple sample traffic, and the training label of each sample traffic;

[0140] Input the service attribute data and cost consumption data of the sample traffic into the traffic value model to obtain the value type of the sample traffic output by the traffic value model;

[0141] Based on the value type of the sample traffic output by the traffic value model and the training label of the sample traffic, determine whether the traffic value model converges;

[0142] If the traffic value model does not converge, adjust the model parameters of the traffic value model and return to the step of inputting the service attribute data and cost consumption data of the sample traffic into the traffic value model;

[0143] If the traffic value model converges, determine that the training of the traffic value model is completed.

[0144] Optionally, the training module is specifically used for:

[0145] For each sample traffic, obtain the service attribute data, cost consumption data and business value data of the sample traffic, where the business value data represents the revenue that can be brought by processing the traffic;

[0146] Generate the training label of the sample traffic according to the business value data of the sample traffic.

[0147] Optionally, the training module is specifically used for:

[0148] Receive the relevant data of the sample traffic sent by the Agent. The relevant data includes service attribute data, cost consumption data and / or business value data; the Agent is used to pull the relevant data of the sample traffic from the business module that processes the sample traffic; and / or,

[0149] Receive the relevant data of the sample traffic sent by the polling server. The polling server is used to request and obtain the relevant data of the sample traffic from the business module in a polling manner.

[0150] Optionally, the value types include high value and low value; the apparatus may further include: a sending module, configured to:

[0151] After obtaining the value type of the target traffic output by the traffic value model, associate the target traffic with the value type of the target traffic, and send the target traffic and the value type of the target traffic to the service module, so that the service module increases the amount of resources allocated to the high-value traffic when the load is low, or increases the amount of resources allocated to the high-value traffic when the load is high, and reduces the amount of resources allocated to the low-value traffic.

[0152] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0153] Figure 5 FIG. shows a schematic block diagram of an exemplary electronic device 500 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0154] As Figure 5 shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0155] A plurality of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disc, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0156] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above, such as the traffic classification method. For example, in some embodiments, the traffic classification method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the traffic classification method described above can be executed. Alternatively, in other embodiments, the computing unit 501 can be configured to execute the traffic classification method by any other suitable means (e.g., by means of firmware).

[0157] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-a-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0159] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0160] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0161] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0162] A computer system can include a client and a server. The client and the server are generally far apart from each other and typically interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, can also be a server of a distributed system, or a server incorporating a blockchain.

[0163] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and no limitation is imposed herein.

[0164] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A traffic classification method, comprising: Obtaining target traffic; Obtaining service attribute data of the target traffic; Determining cost consumption data corresponding to the type of the target traffic according to a preset correspondence between traffic types and cost consumption data, where the cost consumption data represents the amount of resources required to process the traffic, and the cost consumption data includes at least one of the following: central processing unit (CPU) quota, CPU usage duration, memory occupancy, disk input / output occupancy and usage duration, and bandwidth occupancy; Inputting the service attribute data and the cost consumption data into a pre-trained traffic value model to obtain the value type of the target traffic output by the traffic value model, where the value type includes high value and low value.

2. The method according to claim 1, wherein the traffic value model is obtained by training in the following manner: Obtaining a sample training set, where the sample training set includes service attribute data and cost consumption data of multiple sample traffics, and training labels of each sample traffic; Inputting the service attribute data and the cost consumption data of the sample traffic into the traffic value model to obtain the value type of the sample traffic output by the traffic value model; Determining whether the traffic value model converges based on the value type of the sample traffic output by the traffic value model and the training labels of the sample traffic; If the traffic value model does not converge, adjusting the model parameters of the traffic value model and returning to the step of inputting the service attribute data and the cost consumption data of the sample traffic into the traffic value model; If the traffic value model converges, determining that the training of the traffic value model is completed.

3. The method according to claim 2, wherein, The obtaining of the sample training set includes: For each sample traffic, obtaining the service attribute data, cost consumption data, and service value data of the sample traffic, where the service value data represents the benefits that can be brought by processing the traffic; Generating a training label for the sample traffic according to the service value data of the sample traffic.

4. The method according to claim 3, wherein The for each sample traffic, obtaining the service attribute data, cost consumption data, and service value data of the sample traffic includes: Receiving relevant data of the sample traffic sent by an Agent, where the relevant data includes service attribute data, cost consumption data, and / or service value data; the Agent is used to pull relevant data of the sample traffic from the service module that processes the sample traffic; and / or, Receiving relevant data of the sample traffic sent by a polling server, where the polling server is used to request relevant data of the sample traffic from the service module in a polling manner.

5. The method according to any one of claims 1-4, after obtaining the value type of the target traffic output by the traffic value model, the method further includes: Associate the target traffic with the value type of the target traffic, and send the target traffic and the value type of the target traffic to the service module, so that when the service module is under low load, it increases the amount of resources allocated to high-value traffic, or when it is under high load, it increases the amount of resources allocated to high-value traffic and reduces the amount of resources allocated to low-value traffic.

6. A traffic classification device, comprising: An acquisition module, configured to acquire target traffic; The acquisition module is further configured to acquire service attribute data of the target traffic; A determination module, configured to determine, according to a preset correspondence relationship between a traffic type and cost consumption data, the cost consumption data corresponding to the type of the target traffic, where the cost consumption data represents the amount of resources required to process the traffic, and the cost consumption data includes at least one of the following: central processing unit (CPU) quota, CPU usage duration, memory occupancy, disk input / output occupancy and usage duration, and bandwidth occupancy; A prediction module, configured to input the service attribute data and the cost consumption data into a pre-trained traffic value model, and obtain the value type of the target traffic output by the traffic value model, where the value type includes high value and low value.

7. The device according to claim 6, further comprising a training module, where the training module is configured to: Acquire a sample training set, where the sample training set includes service attribute data and cost consumption data of multiple sample traffic, and a training label for each sample traffic; Input the service attribute data and the cost consumption data of the sample traffic into the traffic value model, and obtain the value type of the sample traffic output by the traffic value model; Based on the value type of the sample traffic output by the traffic value model and the training label of the sample traffic, determine whether the traffic value model converges; If the traffic value model does not converge, adjust the model parameters of the traffic value model, and return to the step of inputting the service attribute data and the cost consumption data of the sample traffic into the traffic value model; If the traffic value model converges, it is determined that the training of the traffic value model is completed.

8. The apparatus according to claim 7, wherein, The training module is specifically configured to: For each sample traffic, acquire the service attribute data, cost consumption data, and service value data of the sample traffic, where the service value data represents the revenue that can be brought by processing the traffic; Generate a training label for the sample traffic according to the service value data of the sample traffic.

9. The apparatus according to claim 8, wherein, The training module is specifically configured to: Receive relevant data of the sample traffic sent by an Agent, where the relevant data includes service attribute data, cost consumption data, and / or service value data; the Agent is configured to pull relevant data of the sample traffic from the service module that processes the sample traffic; And / or Receive relevant data of the sample traffic sent by a polling server, where the polling server is configured to request and obtain relevant data of the sample traffic from the service module in a polling manner.

10. The device according to any one of claims 6-9, further comprising: A sending module, where the sending module is configured to: After obtaining the value type of the target traffic output by the traffic value model, associate the target traffic with the value type of the target traffic, and send the target traffic and the value type of the target traffic to the service module, so that when the service module is under low load, increase the amount of resources allocated to high-value traffic, or when the service module is under high load, increase the amount of resources allocated to high-value traffic and reduce the amount of resources allocated to low-value traffic.

11. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

13. A computer program product, comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Traffic quota allocation method and device, electronic equipment and storage medium

    CN111314869A

  • Recommendation model training method and device, electronic equipment and storage medium

    CN113393299A