Edge cloud server churn prediction method and device
By combining the combined algorithm of PCA, Light MLP and Transformer models, static and dynamic features are integrated, and the problems of low recall and insensitive state of edge cloud device churn prediction in the existing technology are solved, and more accurate churn prediction and multiple Scenario applicability.
Patent Information
- Application Number
- CN202211638858.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-12-20
AI Technical Summary
The existing cloud/edge cloud operation and maintenance management lacks effective device churn prediction technology, which is unable to cope with complex edge cloud environments and changing business scenarios, resulting in low recall of churn prediction and insensitive device churn status.
The PCA algorithm and Light MLP algorithm are used to filter and encode static features, combine the Transformer model to process time series features, and churn prediction is performed through MLP classifiers and softmax functions, and static and dynamic features are integrated to improve prediction accuracy.
It improves the accuracy and recall of edge cloud server churn prediction, and can sensitively predict the active and passive churn status of the device. It is suitable for multiple scenarios, including edge cloud, central cloud, IDC, CDN and terminal devices.
Smart Images

Figure CN116016219B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cloud servers, and in particular, relates to a method, device, computer equipment and storage medium for predicting edge cloud server churn. Background Art
[0002] With the advent of the Internet of Everything era and the popularization of 5G communication networks, the scale of Internet data is growing exponentially. In this context, the centralized architecture of traditional cloud computing can no longer meet the needs of end users for timeliness, capacity, and computing power. The ultra-low latency, massive data, and edge intelligence of edge cloud have prompted more companies to choose edge cloud technology solutions, making edge cloud computing an important component between the central cloud and the terminal in the market.
[0003] Compared with the mature central cloud, the commercial edge cloud platform needs to integrate a large number of heterogeneous edge devices as edge cloud resources to provide cloud services. The main suppliers of edge devices are often independent equipment suppliers. As independent interest individuals, equipment suppliers will make a judgment on whether the equipment will continue to provide services after comprehensively considering the service indicators of the equipment provided. If the equipment is passively offline or actively removed by the supplier (equipment loss), the platform will violate the service agreement (SLA) and cause huge SLA penalties, which will have a huge impact on the platform's service stability, revenue, user experience, etc. Therefore, the optimization and integration of the edge cloud platform needs to consider the problem of equipment loss.
[0004] Existing research on faults in cloud / edge cloud operation and maintenance management focuses on resource (software and hardware) fault prediction, and there is little research on cloud / edge cloud resource loss prediction. Fault prediction technology is generally based on classification or time series prediction and other related prediction technologies, which cannot solve the actual scenarios of complex edge cloud environments and changing services, and has the following disadvantages:
[0005] 1. The scenarios that can be predicted by existing work are relatively simple and cannot cope with various complex and changeable scenarios such as the region where edge cloud devices are deployed, the deployed services, the active / passive loss of resources, etc.
[0006] 2. The recall rate of lost equipment in the model is not high. The reason is that in most scenarios, the probability of resource loss is often low, so there is a very obvious positive and negative imbalance in the actual collected data. This also leads to the fact that most models cannot really solve the real prediction of equipment loss.
[0007] 3. It is not sensitive to the loss status of equipment. Existing fault prediction research only focuses on the status performance of resource hardware, that is, it determines which hardware of the resource has problems, but cannot answer under what circumstances resource loss will occur. Summary of the invention
[0008] To solve the above problems, the purpose of the present invention is to provide an edge cloud server churn prediction method, device, computer equipment and storage medium, which can not only predict the churn probability of different servers, but also perform different types of churn predictions for each device in non-hardware scenarios in different regions and businesses, such as active churn, passive churn, etc.
[0009] To achieve the above-mentioned purpose, the technical solution of the present invention is: a method for predicting the churn of an edge cloud server, characterized in that it includes the following steps: Step 1: Obtain feature data of an edge cloud server, wherein the feature data includes static portrait features and time series features; Step 2: Based on the PCA algorithm and the Light MLP algorithm, the static portrait features are respectively screened and encoded to obtain static learnable adjustment parameters; wherein the static portrait features include at least: the hardware attributes of the edge cloud server, billing rules, business deployment status, and past churn status; Step 3: Based on the Transformer model, the time series features and the dynamic time-invariant features obtained in real time are processed and encoded to obtain dynamic learnable adjustment parameters; Step 4: The output of step 2 and the output of step 3 are obtained and merged, and the merged parameters are processed based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server.
[0010] Preferably, step 1 further includes: collecting data from a data platform running on the edge cloud through SQL instructions and the PyODPS function library; dividing the data into two categories: static portrait features and time series features, and presetting special feature encoding rules; after collecting and classifying the collected static portrait features and time series feature data, the preset time period data of each edge cloud server is used as the minimum sample unit to construct an input sample.
[0011] Preferably, the step 2 further comprises: transposing the static portrait feature S to obtain X: X = S T ; X is taken as zero mean: X = X-mean(X); find the covariance matrix C of X, where M represents the number of static features: Find the eigenvector matrix P corresponding to the largest K eigenvalues of C: P = TOP K Eigenvector(C); calculate the reduced-dimensional static portrait feature Y according to the following formula PCA : Y PCA =P T X.
[0012] Preferably, the step 2 further comprises: amplifying the static portrait feature after dimensionality reduction: Y static =Sigmoid(Ws (Norm(Y PCA ))+b s ); where Norm represents standardization based on normal distribution, subtracting the mean of the population from the data and then dividing it by the overall standard deviation: W s and b s Represents the learnable weights and offsets of the linear hidden layer in Light MLP. Sigmoid represents the activation function, which maps the value of each hidden vector to the range of 0-1 to reduce the impact of negative values and excessive mapping results on the final prediction probability. The calculation formula is:
[0013] Preferably, the step 3 further comprises: calculating the time series features through the Encoder of the Transformer model: transforming the matrix Input to a linear embedding layer for dimension conversion, converting the feature dimension of Τ from D to The position information is embedded into the input X through the position encoding layer: After that, X is concatenated with the position information P and then input into the multi-head self-attention mechanism layer, the normalization layer, and the feedforward layer in sequence. The corresponding function calculation is as follows: Among them, Z0 is the concatenation of X and P, and is also the input of Encoder. l ′ It is the residual connection of the output of the previous Encoder layer and the result after the self-attention mechanism layer and the normalization layer operation of this layer, and Z is Z l ′ The residual connection is obtained after the feed-forward layer and the normalization layer operation.
[0014] Preferably, the multi-head attention operation is as follows: In the encoder input, Q, K, and V are all LN(Z l-1 ), MSA(Q,K,V)=Concat(head1,h...,head h )W o , i=1,2,…,h; the MLP operation is the same as the lightweight Light MLP in step 2. Its main function is to transform the feature dimension and further extract features. LN is the same as the Norm in step 2.
[0015] Preferably, the step 4 further includes: the classifier composed of data merging, Linear, Dropout, ReLU, and Batch Norm can be expressed as the following calculation process: The comprehensive code output by the classifier is
[0016]
[0017] Quantity Y final Input the multi-classification probability function Softmax to calculate the probability of continued retention, active loss, and passive offline of the input server sample, and give the classification result with the highest probability; calculate the difference between the predicted server sample status and the actual situation based on the cross entropy loss function, and quantify the error: is the probability that the predicted server belongs to this type of churn, y i Indicates the real status category to which this server belongs.
[0018] Based on the same concept, the present invention also provides an edge cloud server churn prediction device, comprising: a data acquisition module, used to obtain feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features; a static portrait feature processing module, used to screen and encode the static portrait features based on the PCA algorithm and the Light MLP algorithm respectively to obtain static learnable adjustment parameters; wherein the static portrait features include at least: the hardware attributes of the edge cloud server, billing rules, business deployment status, and past churn status; a time series feature processing module, used to process and encode the time series features and the dynamic time-invariant features acquired in real time based on the Transformer model to obtain dynamic learnable adjustment parameters; a prediction module, used to obtain the output of the static portrait feature processing module and the output of the time series feature processing module and merge them, and process the merged parameters based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server.
[0019] Based on the same concept, the present invention also provides a computer device, comprising: a memory, the memory is used to store a processing program; a processor, the processor implements the edge cloud server churn prediction method when executing the processing program.
[0020] Based on the same concept, the present invention also provides a readable storage medium, on which a processing program is stored, and when the processing program is executed by a processor, the edge cloud server churn prediction method is implemented.
[0021] After adopting the above technical solution, compared with the prior art, the present invention has the following advantages:
[0022] 1. The present invention improves the traditional classification problem of churn prediction based on static attributes into a combined model that uses both static features and dynamic features for learning and prediction.
[0023] 2. The present invention designs a static feature PCA screening and embedding model for the encoding of static features. This method solves the problem of complex features and less effective information in a large amount of server data, and greatly improves the accuracy of device loss prediction.
[0024] 3. The present invention introduces the Transformer algorithm, a time series prediction model, to the problem of churn prediction based on static server attributes. It uses the self-attention mechanism to capture future time series change trend information from historical time-varying features such as cost, revenue, and hardware utilization, increases the time trend changes of multiple factors, and better solves the impact of time-varying uncertainties in churn prediction.
[0025] 4. This method realizes the combination of static / dynamic hybrid features through the combination and unified training of hybrid deep learning models, and finally improves the classification accuracy of server churn prediction based on hybrid feature encoding.
[0026] 5. The method of the present invention can not only be applied to edge cloud scenarios, but can also be reused in multiple scenarios such as central cloud, IDC, CDN, terminal devices, etc. for churn prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The specific embodiments of the present invention are further described in detail below with reference to the accompanying drawings, wherein:
[0028] Figure 1 This is a flow chart of the edge cloud server churn prediction method of the present invention;
[0029] Figure 2 This is the static feature PCA screening and embedding process of step 2 of the embodiment of the present invention;
[0030] Figure 3 This is a schematic diagram of an embodiment of the edge cloud server churn prediction method of the present invention;
[0031] Figure 4 This is the specific process of step 4 of the embodiment of the present invention. DETAILED DESCRIPTION
[0032] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims. It should be noted that the drawings are all in a very simplified form and use non-precise ratios, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0033] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0034] Embodiment 1
[0035] Specifically, Figure 1 As shown, the flow chart of the edge cloud server churn prediction method includes the following steps:
[0036] Step 1: Acquire feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features;
[0037] Step 2: Based on the PCA algorithm and the Light MLP algorithm, the static portrait features are respectively screened and encoded to obtain static learnable adjustment parameters; wherein the static portrait features include at least: hardware attributes of the edge cloud server, billing rules, business deployment, and past churn;
[0038] Step 3: Based on the Transformer model, the time series features and the dynamic time-invariant features obtained in real time are processed and encoded to obtain dynamic learnable adjustment parameters;
[0039] Step 4: Get the output of step 2 and the output of step 3 and merge them, and process the merged parameters based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server.
[0040] The present invention fully exploits the business characteristics of edge cloud and fully considers the impact of various scenario factors when predicting resource loss, thereby improving the accuracy of prediction. The combination of multiple algorithms, such as PCA, Light-MLP, Transformer, etc., can not only solve problems such as cascading effects caused by risk outbreaks, but also better solve uncertainties caused by spatiotemporal changes.
[0041] In the solution of the present invention, all machines, including those that are operating normally and not lost, are used as samples for model learning, and a large number of static and dynamic features of each machine are used to ensure that the model has enough data for training. This can solve the problem of low recall rate of lost equipment and many redundant features.
[0042] For more information, see Figure 3 , step 1 specifically includes step 1.1, step 1.2, and step 1.3:
[0043] Step 1.1: Data collection: Use SQL commands and the PyODPS function library to collect the following data from the data platform running on the edge cloud: hardware attributes of the edge cloud server, such as CPU configuration, bandwidth type, NAT type, memory configuration, device location, device operator, bandwidth stress test satisfaction, packet loss stress test satisfaction, etc.; basic information of the services running on the server, such as service category, number of service deployment nodes, billing rules, etc.; device operation statistics, such as historical CPU usage, memory usage, and bandwidth usage of the device; statistics related to device loss, such as device online time, device offline times, whether the operator actively lost the device, the last offline interval, income, cost, etc.;
[0044] Step 1.2: Distinguish feature categories and divide the server feature data collected in step 1.1 into two categories: static portrait features and time series features, and give encoding rules for special features.
[0045] Specifically, we use the following features as static portrait features: cpu configuration (number of CPUs), bandwidth type (aggregation / dedicated line), nat type (0 / 1), memory configuration (memory size), device location, device operator, bandwidth stress test satisfaction, packet loss stress test satisfaction, service category, number of service deployment nodes, billing rules, device online time, device offline times, and last offline interval. Among them, we use one-hot encoding technology to encode high-semantic data (such as device location, operator, service category, etc.) into low-semantic data that the model can understand. For example, the following table shows the one-hot encoding of the device operator:
[0046]
[0047]
[0048] In addition to static portrait features, we use the following features as dynamic time series features and encode them in time series: device historical CPU usage, memory usage, bandwidth usage, income records, and cost records.
[0049] Step 1.3: Sample construction. After data collection and classification coding in steps 1.1 and 1.2, one week of data from each edge cloud server is used as the minimum sample unit to construct the input sample of the model.
[0050] The sample data is:
[0051] (cpu_num=12, bandwidth_type=0, nat_type=0, memory=32, location=24, isp_type=1, band_satisfy=0.98, loss_satisfy=0.99, task_type=5, task_dev_num=24, billin g_rule=1,dev_online_time='20220816',dev_offline_num=2,offline_interval=50,cpu_usertate=[0.86,0.87,0.85,0.94,0.87,0.90 ,0.81],memory_usertate=[0.86,0.87,0.85,0.94,0.87,0.90,0.81],bandwidth_usertate=[0.86,0.87,0.85,0.94,0.87,0.90,0.81],in come=[156,158,147,135,154,170,169], cost=[110,125,117,108,112,120,149], offline_type=0).
[0052] The meanings are as follows: Number of CPUs = 12, Bandwidth type = 'aggregation', NAT type = NAT0, Memory size = 32 GB, Device location = 'Shanghai', Device operator = 'China Unicom', Bandwidth stress test satisfaction = 0.98, Packet loss stress test satisfaction = 0.99, Service category = 'Quick Hand', Number of service deployment nodes = 24, Billing rule = '95 billing', Device online time = '20220816', Device offline times = 2, Last offline interval = 50 (h), 7-day CPU usage, 7-day memory usage, 7-day bandwidth usage, 7-day revenue, 7-day cost (supplier revenue), Churn category = 'No churn' (0 means no churn, 1 means passive offline due to fault, and 2 means active churn by supplier).
[0053] For both types of feature data, we use represents the static portrait feature data, where N is the number of all samples (number of machines * total time length / 7), and M = 14 is the number of static features; in addition, we use Represents dynamic time series feature data, where Q=7 is the time series length and D=5 is the number of dynamic time series features.
[0054] The present invention aims at predicting the loss of equipment and proposes a classification of passive / active loss. At the same time, the equipment failure category and probability, benefit, etc. are used as secondary input features of the model to strengthen the model's prediction of equipment loss. Sensitive to equipment loss.
[0055] See also Figure 2 , for step 2, further including:
[0056] For static features, since they imply whether the hardware properties of the edge cloud server can meet the needs of application tasks, its billing rules, business deployment, past churn and other data also affect the active / passive churn behavior of the business.
[0057] Due to the complexity and diversity of static features, we first need to find the most effective prediction features and exclude negative impact features, and encode the effective features into learnable adjustment parameters and feed them into the classifier. To this end, we use a combination of PCA+LightMLP to process static portrait features. The PCA algorithm is introduced to exclude redundant or negative feature information (noise) and reduce the data dimension of training.
[0058] Specifically, the static feature PCA algorithm can be expressed as the following calculation process. First, the portrait feature S is transposed to obtain X:
[0059]
[0060] X is taken to zero mean:
[0061] X=X-mean(X)
[0062] Find the covariance matrix C of X, where M represents the number of static features:
[0063]
[0064] Find the eigenvector matrix P corresponding to the largest K eigenvalues of C:
[0065] P=TOP K Eigenvector(C)
[0066] Find the PCA dimension reduction result Y of the static feature matrix PCA :
[0067]
[0068] After obtaining the static feature output Y PCA Finally, we encode the feature data through a lightweight MultilayerPerceptron (Light-MLP) to amplify the static features of the sample to a larger dimension:
[0069] Y static =Sigmoid(W s (Norm(Y PCA ))+b s )
[0070] Norm represents standardization based on normal distribution, which is to subtract the mean of the population from the data and then divide it by the overall standard deviation:
[0071] W s and b s Represents the learnable weights and offsets of the linear hidden layer in the MLP. Sigmoid represents the activation function, which maps the value of each hidden vector to the range of 0-1 to reduce the impact of negative values and excessive mapping results on the final prediction probability. The calculation process is as follows:
[0072] For step 3, in order to capture dynamic time series features, we introduced the Transformer model, using its attention mechanism and Encoder-Decoder architecture to learn the change patterns of attributes related to machine churn, such as hardware utilization, revenue, and cost, from historical time series features, thereby providing estimates of future features in the form of latent vectors to support subsequent predictions of server churn categories. In addition to the collected dynamic time series features, the features input to the model also include dynamic time-invariant features such as date and month, that is, variables that can be inferred through time and applied in model training. The Transformer designed for multi-dimensional dynamic time series feature capture is mainly composed of an encoder and a decoder. The Encoder is mainly composed of a linear embedding layer, a position encoding layer, and an encoder layer, which is used to encode historical time series inputs into latent vectors that can be queried and evaluated.
[0073] Further includes: Encoder calculation of time series input:
[0074] matrix It is first input into a linear embedding layer (Light MLP) for dimension conversion, which converts the feature dimension of Τ from D to H:
[0075]
[0076] Afterwards, the position information is embedded into the input X through the position encoding layer:
[0077]
[0078]
[0079] After that, X is concatenated with the position information P and then input into the Multi-Head Self-Attention (MSA), Layer Normalization (LN), and Feed Forward (MLP) layers in sequence. The corresponding functions are calculated as follows:
[0080]
[0081] Among them, Z0 is the concatenation of X and P, and is also the input of the Encoder.
[0082] Z l ′ It is the residual connection of the output of the previous Encoder layer and the result after the MSA and Layer Normal operations of this layer; for The residual connection is obtained after MLP and Layer Normal operations.
[0083] The multi-head attention operation (MSA) is shown below. Since Transformer uses the self-attention mechanism, in the Encoder input, Q, K, and V are all LN (Z l-1 ),
[0084] MSA(Q,K,V)=Concat(head1,…,head h )W 0 ,
[0085]
[0086] The operation of MLP is the same as the lightweight MLP in step 2. Its main function is to transform the feature dimension and further extract features. The operation of LN is the same as the Norm in step 2.
[0087] For step 4, in order to classify and predict whether a server will churn, whether it is active or passive, this application represents the final output of the model as a traditional multi-classification problem. First, the output of the static feature PCA filter embedding and the output of the dynamic time series feature capture are combined through the concat operation, and used together as the basis for the judgment of the churn classification prediction. In the final part of the model, we designed an MLP-based classifier, including Batch Norm, ReLU, Dropout and Linear operations, where the BatchNorm operation is the same as the Norm in step 2.
[0088] See also Figure 4 , shows the specific process of step 4 of this embodiment, and further explains:
[0089] The classifier composed of data merging, Linear, Dropout, ReLU, and Batch Norm can be expressed as the following calculation process:
[0090]
[0091] Finally, the comprehensive encoding vector Y output by the classifier final Input the multi-classification probability function Softmax to calculate the probability of continued retention (0), active loss (1), and passive offline (2) of the input server sample, and give the classification result with the highest probability. Assume Represents Y final The prediction result of a server sample in , then the calculation output of softmax is as follows: where i is the label of the server churn category, and the rightmost equation Represents Y final middle The original value of .
[0092] In order to achieve the overall optimization training of the model, this application uses the cross entropy loss function to calculate the difference between the predicted server sample status and the actual situation, and quantify the error: is the probability that the predicted server belongs to this type of churn, e.g. They respectively indicate that the predicted server has a 30% probability of not being lost, a 60% probability of actively losing, and a 10% probability of being passively offline. i Indicates the real status category to which this server belongs.
[0093] Here, the Transformer model and PCA model are explained:
[0094] Transformer model: is a deep learning model that uses a self-attention mechanism to weight the importance of each part of the input data differently to predict the future composition and state of a sequence.
[0095] PCA (Principal component analysis): is a popular technique for analyzing large datasets where each sample value contains a large number of dimensions / features, improving the interpretability of the data while retaining the maximum amount of information, and enabling visualization of multidimensional data. Formally, PCA is a statistical technique for reducing the dimensionality of a dataset. This is done by linearly transforming the data into a new coordinate system where (most of) the variation in the data can be described using fewer dimensions than the initial data.
[0096] Embodiment 2
[0097] Based on the same concept, the present invention also provides an edge cloud server churn prediction device, which includes: a data acquisition module, used to obtain feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features; a static portrait feature processing module, used to screen and encode the static portrait features based on the PCA algorithm and the Light MLP algorithm respectively to obtain static learnable adjustment parameters; wherein the static portrait features include at least: the hardware attributes of the edge cloud server, billing rules, business deployment status, and past churn status; a time series feature processing module, used to process and encode the time series features and the dynamic time-invariant features acquired in real time based on the Transformer model to obtain dynamic learnable adjustment parameters; a prediction module, used to obtain the output of the static portrait feature processing module and the output of the time series feature processing module and merge them, and process the merged parameters based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server.
[0098] The present invention fully exploits the business characteristics of edge cloud and fully considers the impact of various scenario factors when predicting resource loss, thereby improving the accuracy of prediction.
[0099] Solve the problem of low recall rate of lost devices and many redundant features.
[0100] Aiming at the problem of predicting equipment loss, the present invention proposes a passive / active loss classification problem, and takes equipment failure category and probability, benefit, etc. as secondary input features of the model to strengthen the model's prediction of equipment loss and equipment loss sensitivity.
[0101] The combination of multiple algorithms, through PCA, Light-MLP, Transformer and other combined algorithms, can not only solve problems such as the cascading effect caused by risk outbreaks, but also better solve the uncertainties brought about by temporal and spatial changes.
[0102] Embodiment 3
[0103] Based on the same concept, the present invention also provides a computer device, which may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memory and the storage medium can be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device. Furthermore, the processor can be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the computer device.
[0104] The computer device may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the computer device structure shown above does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0105] When the computer-readable instructions are executed by the processor, the processor implements the following steps when executing the computer-readable instructions: Step 1: Obtain feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features; Step 1: Obtain feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features; Step 2: Based on the PCA algorithm and the Light MLP algorithm, the static portrait features are respectively screened and encoded to obtain static learnable adjustment parameters; wherein the static portrait features include at least: the hardware attributes, billing rules, business deployment, and past churn of the edge cloud server; Step 3: Based on the Transformer model, the time series features and the dynamic time-invariant features obtained in real time are processed and encoded to obtain dynamic learnable adjustment parameters; Step 4: The output of step 2 and the output of step 3 are obtained and merged, and the merged parameters are processed based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server.
[0106] In one embodiment, a computer-readable storage medium is provided, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the above-mentioned edge cloud server churn prediction method.
[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0109] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting edge cloud server churn, characterized in that: The following steps are involved: Step 1: Acquire feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features; Step 2: Based on the PCA algorithm and the Light MLP algorithm, the static portrait features are respectively screened and encoded to obtain static learnable adjustment parameters; wherein the static portrait features include at least: hardware attributes of the edge cloud server, billing rules, business deployment, and past churn; The step 2 further comprises: Transpose the static portrait feature S to obtain X: X=S T ; X is zero-meaned: X = X-mean(X); Find the covariance matrix C of X, where M represents the number of static features: Find the eigenvector matrix P corresponding to the largest K eigenvalues of C: P=TOP K Eigenvector(C); The static portrait feature Y after dimensionality reduction is calculated according to the following formula PCA : Y PCA =P T X; The step 2 further comprises: Amplify the static portrait features after dimensionality reduction: Y static =Sigmoid(W s (Norm(Y PCA ))+b s ); Norm represents standardization based on normal distribution, which subtracts the mean of the population from the data and divides it by the overall standard deviation: W s and b s Represents the learnable weights and offsets of the linear hidden layer in Light MLP. Sigmoid represents the activation function, which maps the value of each hidden vector to the range of 0-1 to reduce the impact of negative values and excessive mapping results on the final prediction probability. The calculation formula is: Step 3: Based on the Transformer model, the time series features and the dynamic time-invariant features obtained in real time are processed and encoded to obtain dynamic learnable adjustment parameters; The step 3 further comprises: The time series features are calculated through the Encoder of the Transformer model: The matrix Input to a linear embedding layer for dimension conversion, converting the feature dimension of Τ from D to H: The position information is embedded into the input X through the position encoding layer: After that, X is concatenated with the position information P and then input into the multi-head self-attention mechanism layer, the normalization layer, and the feedforward layer in sequence. The corresponding function calculation is as follows: Z0=concat(X,P), Z′ l =MSA(LN(z l-1 ))+z l-1 ,l=1…L With l =MLP(LN(z′ l ))+z′ l ,l=1…L Among them, Z0 is the concatenation of X and P, and is also the input of the Encoder, Z′ l It is the residual connection of the output of the previous Encoder layer and the result after the self-attention mechanism layer and the normalization layer operation of this layer, and Z is Z l ′ After the feed-forward layer and the normalization layer, the residual connection is obtained; Step 4: Obtain the output of step 2 and the output of step 3 and merge them, and process the merged parameters based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server; The step 4 further comprises: The classifier composed of data merging, Linear, Dropout, ReLU, and Batch Norm can be expressed as the following calculation process: final =concat(Y static ,Y temporal ); Y final =W o Y final + B o Y final =Dropout(final) The comprehensive encoding vector Y output by the classifier final Input the multi-classification probability function Softmax to calculate the probability of continued retention, active loss, and passive offline of the input server samples, and give the classification result with the highest probability; The difference between the predicted server sample status and the actual situation is calculated based on the cross entropy loss function, and the error is quantified: is the probability that the predicted server belongs to this type of churn, y i Indicates the real status category to which this server belongs.
2. The edge cloud server churn prediction method according to claim 1, characterized in that: The step 1 further comprises: Collect data from the data platform running on the edge cloud through SQL instructions and PyODPS function library; The data are divided into two categories: static portrait features and time series features, and special feature encoding rules are preset; After the collected static portrait feature and time series feature data are collected and classified and encoded, the input sample is constructed with the preset time period data of each edge cloud server as the minimum sample unit.
3. The edge cloud server churn prediction method according to claim 1, characterized in that: The multi-head attention operation is as follows: In the Encoder input, Q, K, and V are all LN (Z l-1 ), MSA(Q,K,V)=Concat(head1,…,head h )W o , The MLP operation is the same as the lightweight Light MLP in step 2. Its main function is to transform the feature dimension and further extract features. LN is the same as Norm in step 2.
4. An edge cloud server churn prediction device, characterized in that: include: A data acquisition module, used to acquire feature data of the edge cloud server, wherein the feature data includes static portrait features and time series features; A static portrait feature processing module, used to screen and encode the static portrait features based on the PCA algorithm and the Light MLP algorithm to obtain static learnable adjustment parameters; wherein the static portrait features include at least: hardware attributes of the edge cloud server, billing rules, business deployment, and past churn; The static portrait feature processing module further performs: Transpose the static portrait feature S to obtain X: X=S T ; X is zero-meaned: X = X-mean(X); Find the covariance matrix C of X, where M represents the number of static features: Find the eigenvector matrix P corresponding to the largest K eigenvalues of C: P=TOP K Eigenvector(C); The static portrait feature Y after dimensionality reduction is calculated according to the following formula PCA : Y PCA =P T X; The static portrait feature processing module further performs: Amplify the static portrait features after dimensionality reduction: Y static =Sigmoid(W s (Norm(Y PCA ))+b s ); Norm represents standardization based on normal distribution, which subtracts the mean of the population from the data and divides it by the overall standard deviation: W s and b s Represents the learnable weights and offsets of the linear hidden layer in Light MLP. Sigmoid represents the activation function, which maps the value of each hidden vector to the range of 0-1 to reduce the impact of negative values and excessive mapping results on the final prediction probability. The calculation formula is: A time series feature processing module, used for processing and encoding the time series features and the dynamic time-invariant features acquired in real time based on a Transformer model to obtain dynamic learnable adjustment parameters; The time series feature processing module further performs: The time series features are calculated through the Encoder of the Transformer model: The matrix Input to a linear embedding layer for dimension conversion, converting the feature dimension of Τ from D to H: The position information is embedded into the input X through the position encoding layer: After that, X is concatenated with the position information P and then input into the multi-head self-attention mechanism layer, the normalization layer, and the feedforward layer in sequence. The corresponding function calculation is as follows: Z0=concat(X,P), Z′ l =MSA(LN(z l-1 ))+z l-1 ,l=1…L With l =MLP(LN(z′ l ))+z′ l ,l=1…L Among them, Z0 is the concatenation of X and P, and is also the input of the Encoder, Z′ l It is the residual connection of the output of the previous Encoder layer and the result after the self-attention mechanism layer and the normalization layer operation of this layer, and Z is Z l ′ After the feed-forward layer and the normalization layer, the residual connection is obtained; A prediction module is used to obtain the output of the static portrait feature processing module and the output of the time series feature processing module, and merge them, and process the merged parameters based on the MLP classifier and the softmax function to obtain the churn prediction of the edge cloud server; the prediction module further performs: The classifier composed of data merging, Linear, Dropout, ReLU, and Batch Norm can be expressed as the following calculation process: final =concat(Y static ,Y temporal ); Y final =W o Y final + B o Y final =Dropout(final) The comprehensive encoding vector Y output by the classifier final Input the multi-classification probability function Softmax to calculate the probability of continued retention, active loss, and passive offline of the input server samples, and give the classification result with the highest probability; The difference between the predicted server sample status and the actual situation is calculated based on the cross entropy loss function, and the error is quantified: is the probability that the predicted server belongs to this type of churn, y i Indicates the real status category to which this server belongs.
5. A computer device, characterized in that: include: A memory, the memory being used to store a processing program; A processor, wherein when executing the processing program, the processor implements the edge cloud server churn prediction method as described in any one of claims 1 to 3.
6. A readable storage medium, characterized in that: The readable storage medium stores a processing program, and when the processing program is executed by the processor, the edge cloud server churn prediction method as described in any one of claims 1 to 3 is implemented.
