Virtual network bandwidth dynamic regulation and control method and system based on user portrait, electronic equipment and storage medium

Through the dynamic control method of virtual network bandwidth based on user profile, the problem of traditional bandwidth fixed limitations is solved, more efficient resource utilization and user experience is achieved, cost reduction and business flexibility is enhanced.

CN119652763APending Publication Date: 2025-03-18ZHENLEER TECH SERVICE (SHANGHAI) CO LTD

Patent Information

Application Number
CN202411785602.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The bandwidth fixed limitations of traditional virtual networks lead to poor user experience, high server costs and poor business flexibility, and cannot effectively meet the bandwidth requirements under different user behavior patterns.

Method used

By collecting user acceleration logs, building user behavior data sets, obtaining user characteristics and bandwidth prediction models, dynamic regulation of virtual network bandwidth is realized, and bandwidth is intelligently allocated according to user portraits.

Benefits of technology

It improves network resource utilization efficiency and user experience, reduces server costs, enhances business flexibility, and ensures a smooth experience under different behavioral modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652763A_ABST
    Figure CN119652763A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual network bandwidth dynamic regulation and control method and system based on a user portrait, electronic equipment and a storage medium, and belongs to the technical field of computers. In order to solve the problem of poor user experience caused by acceleration of a virtual private network due to fixed bandwidth of the virtual network, the invention provides a dynamic regulation and control method for bandwidth of the virtual network based on a user portrait, which comprises the following steps of: collecting a user acceleration log, and constructing a behavior data set of a corresponding user; according to the behavior data set, user characteristics of the user in a recent first preset period are obtained, and the user characteristics comprise a user peak use time period and a corresponding bandwidth, a low peak use time period and a corresponding bandwidth, and a bandwidth connection duration; determining a user bandwidth prediction value of the next first preset period of the corresponding user according to the user characteristics; and / or, according to the behavior data set of all users of the same edge node and based on a random forest algorithm, constructing a bandwidth prediction model of the corresponding edge node; taking behavior data in the latest second preset period in the behavior data set of all users corresponding to the edge node as input, and obtaining output of the corresponding bandwidth prediction model as a node bandwidth prediction value of the next second preset period of the corresponding edge node; the first preset period is smaller than the second preset period. According to the invention, through deep analysis of user behaviors and demands, user portraits are constructed, bandwidth is intelligently allocated and adjusted, and the utilization efficiency of network resources and user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, system, electronic device and storage medium for dynamically regulating virtual network bandwidth based on user profiles. Background Art

[0002] With the popularization of the Internet, virtual private networks (VPNs) have gradually become an indispensable tool for users in online activities. The main purpose of users using VPNs is to speed up access to services such as video streaming, online games, and corporate office software. Through VPNs, users can connect to servers in other countries to enjoy global film and television resources. For online gamers, VPNs can help them connect to faster game servers, reduce latency, and improve the fluency of games. In the use of office software, especially tools like Microsoft Teams and Outlook, VPNs can ensure that users maintain stable connections in unstable network environments, improve the quality of video conferencing, and ensure smooth communication between teams. In short, more and more users cannot do without VPNs.

[0003] As virtual private network technology is increasingly used, users have higher and higher requirements for VPN, especially the bandwidth speed of the line. Therefore, users pay special attention to bandwidth quality when using network acceleration.

[0004] At present, there are two main aspects for choosing virtual networks: one is to accelerate by traffic size, and the other is to accelerate by bandwidth rate. In both cases, users establish a connection with a VPN server through a VPN client. In this process, the client will initiate a virtual tun network card to intercept local traffic and send a request to the VPN server. Encryption protocols are usually used for data transmission, which is forwarded to the target website or service. The target website sends the response data back to the VPN server, which then encrypts the data and sends it back to the user's device. After receiving the data, the user's VPN client will decrypt it and present it to the user.

[0005] However, traditional implementation technologies have the following disadvantages:

[0006] 1. Bandwidth limitation leads to user loss. When using VPN, the bandwidth of traditional solutions has fixed limitations. When users use large traffic to download files or watch 4K movies, the network becomes unstable and eventually users are lost.

[0007] 2. The server cost is high. Traditional fixed bandwidth has the problem that the number of users on the node is small. The number of users in different regions is too small, resulting in the peak usage being less than half of the bandwidth itself, leading to the high cost of the server's own bandwidth, and the company is in a long-term loss-making state.

[0008] 3. Poor business flexibility. Different users have different usage scenarios. For example, some users focus on chatting and reading documents, while some users mostly watch video streaming and play games. Video streaming and online games have higher bandwidth requirements, while chatting and browsing the web have lower bandwidth requirements. Users have different bandwidth requirements under different behavior patterns. If a user chooses low bandwidth, the video will be stuck when watching. If a user chooses high bandwidth, there will be a lot of waste when chatting and browsing the web, and the high bandwidth fee is also high. Summary of the invention

[0009] In order to solve the problem that the fixed bandwidth of related virtual networks leads to poor user experience when using virtual private networks to accelerate users, the present invention provides a method for dynamically regulating virtual network bandwidth based on user profiles, and briefly describes the effect.

[0010] The present application provides a method for dynamically controlling virtual network bandwidth based on user profiles, including:

[0011] Collect user acceleration logs and build the corresponding user behavior dataset;

[0012] According to the behavior data set, user characteristics of the user in the most recent first preset period are obtained, wherein the user characteristics include the user's peak usage period and corresponding bandwidth, the off-peak usage period and corresponding bandwidth, and the bandwidth connection duration;

[0013] Determine, according to the user characteristics, a user bandwidth prediction value of the next first preset period corresponding to the user; and / or,

[0014] According to the behavior data set of all users of the same edge node and based on the random forest algorithm, a bandwidth prediction model corresponding to the edge node is constructed;

[0015] Taking the behavior data in the most recent second preset period in the behavior data set of all users corresponding to the edge node as input, obtaining the output of the corresponding bandwidth prediction model as the node bandwidth prediction value of the next second preset period corresponding to the edge node; and

[0016] The first preset period is shorter than the second preset period.

[0017] In some embodiments, collecting user acceleration logs and constructing a behavior data set of the corresponding user includes:

[0018] Collect user acceleration logs collected by multiple terminal devices bound to the same user ID at preset time intervals, wherein the fields of the user acceleration logs include user ID, acceleration time, node ID, uplink traffic, downlink traffic, and acceleration mark, wherein the acceleration mark is the number of collection times within the first preset period;

[0019] Aggregating the multiple fields of the multiple user acceleration logs into behavior data in a preset format according to the acceleration time and the first preset period;

[0020] The plurality of behavior data are formatted according to a preset time format to form the behavior data set.

[0021] In some embodiments, obtaining user characteristics of the user in the most recent first preset period according to the behavior data set includes:

[0022] Acquire the behavior data within the most recent first preset period in the behavior data set;

[0023] Preprocessing the behavior data to obtain standard behavior data, wherein the preprocessing includes missing value processing, outlier and noise value processing, and timestamp format processing;

[0024] Clean the standard behavior data to obtain related fields, where the related fields include user ID, acceleration time, node ID, uplink traffic, downlink traffic, acceleration dot mark, time period, and date;

[0025] A user feature is determined according to the associated field.

[0026] In some embodiments, the acceleration time in the standard behavior data is divided into time periods according to preset intervals to obtain the corresponding time periods;

[0027] The acceleration time in the standard behavior data is converted into the corresponding date on a daily basis.

[0028] In some embodiments, determining the user characteristics according to the associated fields includes:

[0029] The standard behavior data is grouped according to the user unique identifier and the time period and the bandwidth usage is summed to calculate the bandwidth usage of each user and each time period, and obtain the peak usage period and the corresponding bandwidth, and the low peak usage period and the corresponding bandwidth;

[0030] The standard behavior data is grouped according to the user unique identifier and the connection dot marks are summed to calculate the bandwidth connection duration of each user.

[0031] In some embodiments, determining the user bandwidth prediction value of the next first preset period corresponding to the user according to the user characteristics includes:

[0032]

[0033] Among them, B total is the user bandwidth prediction value, B peakis the bandwidth during the peak usage period, B low is the bandwidth during the off-peak usage period, P peak is the time proportion of the peak period, P low is the time proportion of the off-peak period, T boost is the bandwidth connection duration, T total is the duration of the first preset period.

[0034] In some embodiments, according to the behavior data set of all users of the same edge node, a bandwidth prediction model corresponding to the edge node is constructed based on a random forest algorithm, including:

[0035] Divide the behavior data set of all users of the same edge node into a validation set, a training set, and a test set;

[0036] Using the training set to train through a random forest algorithm to generate an original bandwidth prediction model;

[0037] Using the test set to optimize the original bandwidth prediction model to obtain an optimized bandwidth prediction model;

[0038] The optimized bandwidth prediction model is verified using the verification set. If the accuracy threshold is exceeded, it is used as the bandwidth prediction model. Otherwise, the optimization is continued.

[0039] The embodiment of the present application also provides a virtual network bandwidth dynamic control system based on user portrait, wherein the virtual network adopts a distributed architecture, and the system includes a communication connection terminal, a virtual network acceleration server, a user portrait server, and a platform operation and maintenance server;

[0040] The terminal is used to collect user acceleration logs and transmit them to the corresponding edge node; the edge node constructs a behavior data set of the corresponding user and transmits it to the virtual network acceleration server;

[0041] The user portrait server is used to obtain user characteristics of the user in the most recent first preset period based on the behavior data set, and the user characteristics include the user's peak usage period and the corresponding bandwidth, the off-peak usage period and the corresponding bandwidth, and the bandwidth connection duration; determine the user bandwidth prediction value of the next first preset period of the corresponding user based on the user characteristics; and / or, based on the behavior data set of all users of the same edge node and based on the random forest algorithm, build a bandwidth prediction model corresponding to the edge node; use the behavior data in the most recent second preset period in the behavior data set of all users corresponding to the edge node as input, and obtain the output of the corresponding bandwidth prediction model as the node bandwidth prediction value of the next second preset period of the corresponding edge node; and the first preset period is less than the second preset period;

[0042] The platform operation and maintenance server is used to dynamically adjust the corresponding bandwidth according to the user bandwidth prediction value and / or the node bandwidth prediction value.

[0043] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the program.

[0044] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing any of the above methods.

[0045] The embodiments of the present application can improve network resource utilization efficiency and user experience by deeply analyzing user behavior and needs, building user portraits, and intelligently allocating and adjusting bandwidth. In particular, based on the user acceleration log of the previous first preset period, personalized bandwidth is generated for different users and distributed to the server to ensure a smooth experience under different behavior modes; further, by using the bandwidth prediction model, the control strategy can be optimized according to historical data, the network flexibility and response speed can be improved, and the server cost can be saved.

[0046] Other features and corresponding beneficial effects of the present application are described in the latter part of the specification, and it should be understood that at least some of the beneficial effects become obvious from the records in the specification of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0048] Figure 2 It is a schematic diagram of the principle structure of the system of the present invention;

[0049] Figure 3 It is a schematic diagram of the process of the system of the present invention. DETAILED DESCRIPTION

[0050] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0051] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0052] Embodiment 1:

[0053] See also Figure 1 , Figure 1 It is a schematic diagram of the method flow of the present invention.

[0054] A method for dynamically controlling virtual network bandwidth based on user profiles, comprising:

[0055] S100 collects user acceleration logs and builds the corresponding user behavior data set. That is, through in-depth analysis of user behavior and needs, it builds user portraits, intelligently allocates and adjusts bandwidth, and can improve network resource utilization efficiency and user experience.

[0056] It should be noted that this method is applied to terminal devices, that is, the terminal devices turn on acceleration to trigger, wherein the terminal devices may include mobile phones, tablet computers, personal computers, and servers. Specifically, it is an acceleration application installed on the terminal device, such as an acceleration client on a mobile phone. The user installs a virtual acceleration application APP on the terminal device, and then logs in on the client to authorize and turn on acceleration.

[0057] At the same time, this method is particularly suitable for networks composed of multiple edge nodes and central nodes, such as CDN, which stands for Content Delivery Network or Content Distribution Network. It is a distributed network whose mission is to increase user access speed by deploying node servers throughout the network. These node servers cache website content, such as web pages, pictures, videos, etc., so that users can get the required content from the server closest to them geographically, thereby reducing latency and increasing response speed.

[0058] In one embodiment, S100 collects user acceleration logs and constructs a behavior data set of the corresponding user, preferably including:

[0059] S101 collects user acceleration logs collected by multiple terminal devices bound to the same user ID at preset time intervals, for example, once every 10 minutes.

[0060] The fields of the user acceleration log include user ID, acceleration time, node ID, upstream traffic, downstream traffic, and acceleration mark.

[0061] The user identifier may be, but is not limited to, a user email address, a user mobile phone number, a user name, etc., so as to distinguish specific users.

[0062] Ramp-up time is a time measurement of computational bandwidth.

[0063] The node ID is the unique identifier of the internal service room of the edge node.

[0064] The upstream and downstream traffic respectively represent the traffic generated when users visit the website, which is used for subsequent aggregation statistics of total bandwidth usage.

[0065] The acceleration dot mark is the number of collections within the first preset cycle, that is, the number of accelerations at the business level. There are multiple dot marks in each acceleration link, and one acceleration dot mark can represent 10 minutes.

[0066] S102 aggregates multiple fields of multiple user acceleration logs into behavior data in a preset format according to the acceleration time in a first preset period. The first preset period may be a day, that is, the user acceleration logs within a day.

[0067] S103 formats the plurality of behavior data according to a preset time format and forms a behavior data set.

[0068] In a specific implementation, the client collects logs and uploads them to the edge node. The edge node aggregates the received logs by day according to the acceleration time to obtain standard JSON data, and then transmits the data in batches to the central node. The central node writes the received data to the specified directory according to the RFC3339 time format to obtain a behavior data set that meets the standard.

[0069] In one embodiment, the method implements dynamic adjustment of user bandwidth, including:

[0070] S200 obtains user characteristics of the user in the most recent first preset period according to the behavior data set. The user characteristics include the user's peak usage period and corresponding bandwidth, off-peak usage period and corresponding bandwidth, and bandwidth connection duration.

[0071] S210 determines a user bandwidth prediction value of the next first preset period corresponding to the user according to the user characteristics.

[0072] In one embodiment, S200 obtains user characteristics of the user in the most recent first preset period according to the behavior data set, including:

[0073] S201 obtains behavior data within a most recent first preset period in a behavior data set.

[0074] The most recent first preset period preferably refers to the complete most recent first preset period.

[0075] For example, you can schedule the acquisition of the previous day's behavior data at 11:30 p.m. every day.

[0076] Specifically, the behavior data of the previous day (referring to the period from 00:00 to 23:59 of the previous day) is automatically captured at 11:30 PM every day, and the data of the previous day refers to all the behavior data within the previous complete calendar date.

[0077] Acquiring data at 11:30 pm every day ensures the accuracy of data collection and guarantees that the complete data from the previous day has been fully recorded and processed.

[0078] S202 preprocesses the behavior data to obtain standard behavior data, where the preprocessing includes missing value processing, outlier and noise value processing, and timestamp format processing.

[0079] Among them, missing value processing includes deleting records containing missing values ​​according to the type of data and the distribution of missing values ​​to ensure the cleanliness of the data set.

[0080] Outlier and noise value handling includes:

[0081] S11: According to the IQR (interquartile range) statistical method, the fields to be processed are first extracted from the behavior data set, namely, the upstream traffic and the downstream traffic;

[0082] S12: Sort the data of the extracted fields, and use quick sort to arrange them from small to large, with an average time complexity of O(n log n);

[0083] S13: Calculate the first quartile (Q1) and the third quartile (Q3) for each target field, where Q1 is the value in the lower quarter of the sorted data, i.e., the 25% quantile. Q3 is the value in the third quarter of the sorted data, i.e., the 75% quantile.

[0084] S14: Calculate the IQR using the formula IQR=Q3-Q1; where IQR is the interquartile range, which reflects the middle 50% of the data range in the data set and is used for outlier and noise detection;

[0085] S15: Set the upper and lower boundaries of outlier detection based on IQR. Any data point below the lower boundary or above the upper boundary will be considered an outlier or noise value. The specific calculation formula is as follows:

[0086] LB=Q1-1.5*IQR

[0087] LB stands for Lower Bound, which means the lower boundary. Points below this value are considered "abnormally small" outliers.

[0088] UB=Q3+1.5*IQR

[0089] UB stands for Upper Bound, which means the upper boundary. Points above this value are considered "abnormally large" outliers.

[0090] The choice of 1.5 times the IQR as the threshold is based on the empirical rule in statistics, which can effectively identify outliers in most cases without mislabeling normal data points as outliers;

[0091] S16: Process the detected outliers and noise values, and directly delete the records marked as outliers or noise values ​​from the data set to ensure the cleanliness of the data set.

[0092] Timestamp format processing is to convert the format of acceleration time to ensure the consistency and operability of time data.

[0093] Timestamp format conversion steps:

[0094] The acceleration time in the data source is a Unix timestamp (the number of seconds since January 1, 1970 in seconds or milliseconds). Convert the Unix timestamp to a standard date and time format (datetime type) and ensure that the timestamp field has no null or invalid values.

[0095] The purpose of timestamp format conversion is to ensure the consistency and operability of time data. After the timestamp field is converted to the datetime type, subsequent operations can support time addition and subtraction, grouping, and sorting operations.

[0096] S203 cleans the standard behavior data, improves the robustness of the user portrait data, and obtains related fields.

[0097] The associated fields include user ID, acceleration time, node ID, upstream traffic, downstream traffic, acceleration mark, time period, and date.

[0098] The corresponding time period is obtained by dividing the time period according to the preset interval according to the acceleration timestamp in the standard behavior data. For example, the time period is divided into 0 to 23 hours, that is, the acceleration timestamp is converted, and the hour part of each timestamp is extracted, ranging from 0 to 23, representing each hour of the day.

[0099] The acceleration timestamps in the standard behavior data were converted into corresponding dates by day.

[0100] S204 determines user characteristics according to the associated fields, namely, the user's peak usage period and corresponding bandwidth, off-peak usage period and corresponding bandwidth, and bandwidth connection duration, including:

[0101] For standard behavior data, group them according to user unique ID and time period and sum the bandwidth usage to calculate the bandwidth usage of each user and each time period, and obtain the peak usage period and corresponding bandwidth, and the off-peak usage period and corresponding bandwidth.

[0102] For standard behavior data, the data is grouped according to the user's unique ID and the connection dot marks are summed to calculate the bandwidth connection duration of each user.

[0103] In a specific implementation, S204 determines the user characteristics according to the associated fields, including:

[0104] S2041: Add uplink traffic and downlink traffic to obtain total bandwidth usage, which represents the total traffic consumed by the user through a specific node in a certain period of time;

[0105] The total bandwidth usage indicates the object that needs to be aggregated in subsequent steps. Because the data source log only contains upstream and downstream traffic, the upstream and downstream traffic are added together at the business level as the bandwidth value, field bandwidth_usage. For example, if the upstream traffic is 5Mbps and the downstream traffic is 15Mbps within a period of time, the bandwidth is calculated as 5+15=20Mbps.

[0106] S2042: grouping by groupby according to user ID, node ID, and time period, and aggregating bandwidth usage, so as to calculate bandwidth usage of the user in a certain node and a certain time period;

[0107] S2043: According to the data of S20242, if the bandwidth is greater than a first preset threshold, for example, 500 Mbps, it is determined as a peak time period, and if the bandwidth is less than a second preset threshold, for example, 50 Mbps, it is determined as a low-peak time period, thereby obtaining the peak bandwidth value and the low-peak bandwidth value of the user in a day;

[0108] S2044: Group by using groupby according to user ID, node ID, and date, aggregate acceleration dot marks, each acceleration dot mark represents a 10-minute acceleration session of the user on the node, and then calculate the acceleration time of the user on a certain node and within a certain day according to the formula T=N*10min, where T refers to the total acceleration time, N refers to the acceleration dot mark, and 10min refers to the dot interval number of 10, in minutes;

[0109] In one embodiment, S210 determines the user bandwidth prediction value of the next first preset period corresponding to the user according to the user characteristics, including:

[0110] The user bandwidth prediction value is calculated using the following formula:

[0111]

[0112] Among them, B total is the user bandwidth prediction value, B peak is the bandwidth during peak usage hours, B low is the bandwidth during the off-peak usage period, P peak is the time proportion of peak hours, P iow is the time proportion of the off-peak period, T noostis the bandwidth connection duration, T total The duration of the first preset cycle, for example, 24 hours.

[0113] Specifically, B peak *P peak The peak bandwidth is multiplied by the time ratio to get the bandwidth usage during the peak period. low *P low The bandwidth usage during the trough period is obtained by multiplying the trough bandwidth by the time ratio. peak *P peak +B low *P low Represents the sum of bandwidth usage during peak and off-peak hours. It represents the additional bandwidth consumption caused by the dynamic change of bandwidth (the difference between the peak bandwidth and the low-peak bandwidth), and the fluctuation (rate of change) of the bandwidth during the boost period is obtained, and then multiplied by the duration of the boost to obtain the total amount of boosted bandwidth.

[0114] Example: According to the above steps S2042 and S2043, the total peak bandwidth usage, the total low-peak bandwidth usage and the proportion of a certain day are calculated respectively;

[0115] User characteristics:

[0116] 1. Email: user1@example.com

[0117] 2. Node id: KHI2B_27531

[0118] 3. Date: 2024-11-27

[0119] 4. Timestamp: 1732661919

[0120] Bandwidth usage data:

[0121] Timestamp_period Bandwidth_usage(Mbps) 08:00-09:00 45 09:00-10:00 30 14:00-15:00 520 15:00-16:00 300 21:00-22:00 600

[0122] Calculation process:

[0123] Bandwidth usage during peak hours:

[0124]

[0125] Bandwidth usage during off-peak hours:

[0126]

[0127] Acceleration time:

[0128] T boost =5h;

[0129] The next day's recommended bandwidth is calculated by using numerical rounding methods, such as rounding to the nearest integer or rounding to the nearest integer, as required:

[0130]

[0131] Preferably, the user bandwidth prediction value calculated in the previous step is optimized to a bandwidth value that is consistent with daily life, such as the nearest hundredth digit, and the optimized user bandwidth prediction value is used as the final bandwidth.

[0132] In a specific implementation, the user bandwidth prediction value is optimized according to a linear interpolation method, wherein the bandwidth interpolation formula is:

[0133]

[0134] Among them: B recommend represents the optimized user bandwidth prediction value, x represents the user bandwidth prediction value, B1 represents the lower bandwidth integer value, B2 represents the upper bandwidth integer value. If the ratio is less than 0.5, it is optimized to the lower value; if the ratio is greater than or equal to 0.5, it is optimized to the upper value.

[0135] Substitute into the calculation:

[0136]

[0137] Therefore, the node bandwidth of this user is dynamically adjusted to 700Mbps the next day.

[0138] In one implementation, the user bandwidth prediction value is transmitted to topicA through Kafka for consumption by the platform operation and maintenance server, thereby achieving dynamic adjustment of user bandwidth.

[0139] In one embodiment, the method implements dynamic adjustment of node bandwidth, including:

[0140] S300 builds a bandwidth prediction model for the corresponding edge node based on the behavior data set of all users of the same edge node and the random forest algorithm.

[0141] S310 uses the behavior data in the most recent second preset period in the behavior data set of all users of the corresponding edge node as input, obtains the output of the corresponding bandwidth prediction model as the node bandwidth prediction value of the next second preset period of the corresponding edge node.

[0142] The second preset period may be monthly, and the edge node bandwidth is adjusted once a month.

[0143] In one embodiment, the first preset period is smaller than the second preset period, for example, the first preset period is a day, and the second preset period is a month.

[0144] Daily means dynamically adjusting the recommended bandwidth for the next day based on the acceleration log of the previous day. Monthly means counting the overall export bandwidth of the server each month, and dynamically adjusting the recommended bandwidth of the server for the next month based on actual usage to prevent the waste of bandwidth resources of unpopular node servers.

[0145] In one embodiment, S300 constructs a bandwidth prediction model of the corresponding edge node based on the behavior data set of all users of the same edge node and the random forest algorithm, including:

[0146] S301 divides the behavior data set of all users of the same edge node into a training set and a test set, preferably using KFold (K-fold cross validation method) for division, with K being 5.

[0147] S302 uses the training set to train through a random forest algorithm to generate an original bandwidth prediction model.

[0148] S303 uses the test set to optimize the original bandwidth prediction model to obtain an optimized bandwidth prediction model. Specifically:

[0149] S3031: Use the test set to test the original bandwidth prediction model, obtain the probability predicted by the original bandwidth prediction model, and then calculate the AUC index of each decision tree;

[0150] S3032: Use GridSearchCV to perform hyperparameter tuning to maximize the AUC value and train the model using the selected hyperparameters;

[0151] S3033: retain the decision trees whose AUC index is greater than the index threshold, and delete the remaining decision trees;

[0152] S3034: Compare the splitting features and thresholds of the nodes on different decision trees to calculate the similarity between the decision trees;

[0153] S3035: Cluster the decision trees whose similarity is greater than the similarity threshold, retain the diversity of the model and ensure that different trees have sufficient differences in features and sample selection;

[0154] S3036: Based on clustering, in order to further improve the robustness and generalization ability of the model, a similar tree pruning strategy is proposed. If the similarity between decision trees exceeds 0.8, one tree is selectively retained and similar trees are removed, and finally an optimized bandwidth prediction model is obtained;

[0155] Among them, the similarity between decision trees in the random forest is calculated. The specific operation is:

[0156] S21: The similarity between two decision trees is calculated as Where m is the total number of prediction results of the decision tree, n is the number of identical prediction results between the two decision trees, and the value of the formula n / m is between 0 and 1, where 1 means that the two trees make exactly the same predictions for all samples, and 0 means that the two trees make completely different predictions for all samples.

[0157] S22: Utilize similarity to compare and evaluate the decision trees, and set a similarity range of 0.4 to 0.6 according to the business scenario of node bandwidth prediction to maintain appropriate diversity and stability.

[0158] In other alternative implementations, S300 constructs a bandwidth prediction model for the corresponding edge node based on the behavior data set of all users of the same edge node and the random forest algorithm, including:

[0159] S301 divides the behavior data set of all users of the same edge node into a verification set, a training set and a test set.

[0160] Preferably, part of the behavior data is first extracted from the behavior data set as a validation set; and then the remaining behavior data is divided into a training set and a test set using a K-fold cross-validation method.

[0161] S302 uses the training set to train through a random forest algorithm to generate an original bandwidth prediction model.

[0162] S303 uses the test set to optimize the original bandwidth prediction model to obtain an optimized bandwidth prediction model.

[0163] The generation of the original bandwidth prediction model and the optimized bandwidth prediction model may refer to the previous implementation method.

[0164] S304 uses the validation set to validate the optimized bandwidth prediction model. If the accuracy exceeds a threshold, such as 80%, it is used as the bandwidth prediction model. Otherwise, the optimization continues.

[0165] Preferably, before extracting part of the behavior data from the behavior data set as the validation set, time series analysis is performed to stratify the behavior data set according to the acceleration time, and the validation set data extracted from each layer are merged to form a complete validation set. The specific operations are:

[0166] S31: Determine the time range of the behavior data set. In this experiment, the data set is stratified by month.

[0167] S32: Each layer is divided according to a ratio of 10% to 20%;

[0168] S33: Randomly select the above proportion of data in each layer as the verification set to ensure the randomness of sampling;

[0169] S34: Merge the validation set data extracted from each layer to form a complete validation set;

[0170] S35: Perform a data balance check in the merged validation set to prevent data from being too concentrated in one layer;

[0171] S36: Save the extracted user acceleration data verification set;

[0172] In one implementation, the bandwidth prediction model is used to predict data, and the specific operations are as follows:

[0173] S41: For each batch of data, use the loaded model to make predictions. The data needs to be converted into a feature vector accepted by the model. For example, if the user turns on acceleration, it means [1,0], and if the user does not turn on acceleration, it means [0,1];

[0174] S42: Use the predict() method of the bandwidth prediction model to make predictions and generate prediction results;

[0175] S43: Perform a basic check on the generated prediction results to ensure that the prediction value is within a reasonable range, such as the bandwidth usage cannot be a negative number or an abnormal value.

[0176] In one implementation, the node bandwidth prediction value is transmitted to topic B through Kafka for consumption by the platform operation and maintenance server, thereby achieving dynamic adjustment of the node bandwidth.

[0177] Embodiment 2:

[0178] See also Figure 2-3 , Figure 2 It is a schematic diagram of the principle structure of the system of the present invention; Figure 3 It is a schematic diagram of the process of the system of the present invention.

[0179] Based on Example 1, this example provides a virtual network bandwidth dynamic control system based on user profiles, and the virtual network adopts a distributed architecture, that is, it has edge nodes and central nodes.

[0180] The system includes a communication connection terminal, a virtual network acceleration server, a user portrait server and a platform operation and maintenance server.

[0181] The terminal is used to collect user acceleration logs and transmit them to the corresponding edge nodes; the edge nodes build the corresponding user behavior data set and transmit it to the virtual network acceleration server, which can specifically adopt a virtual network acceleration service cluster.

[0182] The user portrait server may specifically adopt a user portrait computing cluster, which is used to obtain user characteristics of the user in the most recent first preset period based on the behavior data set, the user characteristics including the user's peak usage period and the corresponding bandwidth, the off-peak usage period and the corresponding bandwidth, and the bandwidth connection duration; determine the user bandwidth prediction value of the next first preset period of the corresponding user based on the user characteristics; and / or, construct a bandwidth prediction model of the corresponding edge node based on the behavior data set of all users of the same edge node and based on the random forest algorithm; use the behavior data in the most recent second preset period in the behavior data set of all users of the corresponding edge node as input, obtain the output of the corresponding bandwidth prediction model, and use it as the node bandwidth prediction value of the next second preset period of the corresponding edge node; and the first preset period is less than the second preset period.

[0183] The platform operation and maintenance service end may specifically adopt a platform operation and maintenance service cluster, which is used to dynamically adjust the corresponding bandwidth according to the user bandwidth prediction value and / or the node bandwidth prediction value.

[0184] In one implementation, a storage end is used, specifically a storage cluster, such as a joblib library to load the bandwidth prediction model into the memory of the user portrait server.

[0185] In one implementation, the behavior data is loaded in batches to avoid memory overflow.

[0186] Embodiment 3:

[0187] Based on Example 1, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, any method of Example 1 is implemented.

[0188] Embodiment 4:

[0189] Based on Example 1, this embodiment provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing any method of Example 1.

[0190] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0191] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0192] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0193] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0194] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0195] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for dynamically controlling virtual network bandwidth based on user profile, characterized in that: include: Collect user acceleration logs and build the corresponding user behavior dataset; According to the behavior data set, user characteristics of the user in the most recent first preset period are obtained, wherein the user characteristics include the user's peak usage period and corresponding bandwidth, the off-peak usage period and corresponding bandwidth, and the bandwidth connection duration; Determine, according to the user characteristics, a user bandwidth prediction value of the next first preset period corresponding to the user; and / or, According to the behavior data set of all users of the same edge node and based on a random forest algorithm, a bandwidth prediction model corresponding to the edge node is constructed; Taking the behavior data in the most recent second preset period in the behavior data set of all users corresponding to the edge node as input, obtaining the output of the corresponding bandwidth prediction model as the node bandwidth prediction value of the next second preset period corresponding to the edge node; and The first preset period is shorter than the second preset period.

2. The method for dynamically controlling virtual network bandwidth based on user profile according to claim 1 is characterized in that: Collect user acceleration logs and build the corresponding user behavior data set, including: Collect user acceleration logs collected by multiple terminal devices bound to the same user ID at preset time intervals, wherein the fields of the user acceleration logs include user ID, acceleration time, node ID, uplink traffic, downlink traffic, and acceleration mark, wherein the acceleration mark is the number of collection times within the first preset period; Aggregating the multiple fields of the multiple user acceleration logs into behavior data in a preset format according to the acceleration time and the first preset period; The plurality of behavior data are formatted according to a preset time format to form the behavior data set.

3. The method for dynamically controlling virtual network bandwidth based on user profile according to claim 2 is characterized in that: Obtaining user characteristics of the user in the most recent first preset period according to the behavior data set includes: Acquire the behavior data within the most recent first preset period in the behavior data set; Preprocessing the behavior data to obtain standard behavior data, wherein the preprocessing includes missing value processing, outlier and noise value processing, and timestamp format processing; Clean the standard behavior data to obtain related fields, where the related fields include user ID, acceleration time, node ID, uplink traffic, downlink traffic, acceleration dot mark, time period, and date; A user feature is determined according to the associated field.

4. The method for dynamically controlling virtual network bandwidth based on user profile according to claim 3 is characterized in that: Divide the acceleration time in the standard behavior data into time periods according to preset intervals to obtain the corresponding time periods; The acceleration time in the standard behavior data is converted into the corresponding date on a daily basis.

5. The method for dynamically controlling virtual network bandwidth based on user profile according to claim 3 is characterized in that: Determining user characteristics according to the associated fields includes: The standard behavior data is grouped according to the user unique identifier and the time period and the bandwidth usage is summed to calculate the bandwidth usage of each user and each time period, and obtain the peak usage period and the corresponding bandwidth, and the low peak usage period and the corresponding bandwidth; The standard behavior data is grouped according to the user unique identifier and the connection dot marks are summed to calculate the bandwidth connection duration of each user.

6. The method for dynamically controlling virtual network bandwidth based on user profile according to claim 3 is characterized in that: Determining a user bandwidth prediction value of the next first preset period corresponding to the user according to the user characteristics includes: Among them, B total is the user bandwidth prediction value, B peak is the bandwidth during the peak usage period, B low is the bandwidth during the low-peak usage period, P peak is the time proportion of the peak period, P low is the time proportion of the off-peak period, T boost is the bandwidth connection duration, T total is the duration of the first preset period.

7. The method for dynamically controlling virtual network bandwidth based on user profile according to claim 2 is characterized in that: According to the behavior data set of all users of the same edge node, a bandwidth prediction model corresponding to the edge node is constructed based on a random forest algorithm, including: Divide the behavior data set of all users of the same edge node into a validation set, a training set, and a test set; Using the training set to train through a random forest algorithm to generate an original bandwidth prediction model; Using the test set to optimize the original bandwidth prediction model to obtain an optimized bandwidth prediction model; The optimized bandwidth prediction model is verified using the verification set. If the accuracy threshold is exceeded, it is used as the bandwidth prediction model. Otherwise, the optimization is continued.

8. A virtual network bandwidth dynamic control system based on user profile, wherein the virtual network adopts a distributed architecture, characterized in that: The system includes a communication connection terminal, a virtual network acceleration server, a user portrait server and a platform operation and maintenance server; The terminal is used to collect user acceleration logs and transmit them to the corresponding edge nodes; The edge node constructs a behavior data set corresponding to the user and transmits it to the virtual network acceleration server; The user portrait server is used to obtain user characteristics of the user in the most recent first preset period based on the behavior data set, and the user characteristics include the user's peak usage period and the corresponding bandwidth, the off-peak usage period and the corresponding bandwidth, and the bandwidth connection duration; determine the user bandwidth prediction value of the next first preset period of the corresponding user based on the user characteristics; and / or, based on the behavior data set of all users of the same edge node and based on the random forest algorithm, build a bandwidth prediction model corresponding to the edge node; use the behavior data in the most recent second preset period in the behavior data set of all users corresponding to the edge node as input, and obtain the output of the corresponding bandwidth prediction model as the node bandwidth prediction value of the next second preset period of the corresponding edge node; and the first preset period is less than the second preset period; The platform operation and maintenance server is used to dynamically adjust the corresponding bandwidth according to the user bandwidth prediction value and / or the node bandwidth prediction value.

9. 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 program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Bandwidth adjustment method and device, equipment and storage medium

    CN114513423A

  • Bandwidth allocation method and device, computer equipment and storage medium

    CN115086244A

  • Bandwidth dynamic adjustment method and device and electronic equipment

    CN117938670A

  • Managing bandwidth based on user behavior

    US20200314019A1

Cited By

  • User portrait construction method and system based on user habit analysis

    CN120317918A

  • CPE bandwidth dynamic allocation method and system based on user behavior prediction

    CN121530854A

  • A method and system for dynamic allocation of bandwidth of CPE based on user behavior prediction

    CN121530854B