A method and device for predicting website access volume, an electronic device and a storage medium

By acquiring visitor volume sample sequences and grayscale prediction models, and combining them with expert control sequences, a visitor volume prediction model is established, which solves the problems of inaccurate prediction results and narrow applicability in existing technologies, and achieves fast and accurate visitor volume prediction.

CN115238215BActive Publication Date: 2025-11-11CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies rely heavily on personal experience and produce inaccurate predictions when forecasting website traffic. Expert estimates have a narrow scope of application and cannot meet businesses' needs for fast and accurate traffic forecasting.

Method used

By acquiring visitor volume sample sequences, determining the visitor volume grayscale sequence and grayscale parameters, and using grayscale prediction equations and expert control sequences, a visitor volume prediction model is established to achieve rapid and accurate prediction of future visitor volume.

Benefits of technology

Even with a small sample size, it can quickly and accurately predict future website traffic, reducing the errors of manual prediction and the cost of expert estimation. It has a wider range of applications and can predict sudden surges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115238215B_ABST
    Figure CN115238215B_ABST
Patent Text Reader

Abstract

The application discloses a kind of method, device, electronic equipment and storage medium for predicting website access volume, related to artificial intelligence technical field.The method comprises: obtaining access volume sample sequence, determining the access volume gray sequence corresponding to access volume sample sequence;According to the gray parameter of access volume prediction determined according to access volume gray sequence;According to access volume sample sequence, gray parameter, preset prediction parameter vector and gray prediction equation, determine initial access volume prediction sequence;According to preset adjustment sequence and initial access volume prediction sequence, determine access volume prediction sequence, and access volume prediction sequence includes future date and the website access volume of the future date.The technical scheme of the application can quickly and accurately predict future access volume even if the sample number is small, and the prediction result can achieve high accuracy, avoiding the problem of inaccurate manual prediction, and solving the problem of narrow application range of the scheme of hiring experts to estimate access volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device and storage medium for predicting website traffic. Background Technology

[0002] Most enterprise-level internet systems currently require forecasting future website traffic to determine whether existing system resources need to be expanded to support future business access.

[0003] When forecasting website traffic, it is usually done based on personal experience or by hiring experts.

[0004] The prediction results obtained by the first method are highly dependent on the richness of personal experience, and the predicted results often deviate from the actual system traffic. The second method has a narrower scope of application and is not suitable for enterprises or projects with tight budgets or those that need to make frequent predictions. Summary of the Invention

[0005] This invention provides a method, apparatus, electronic device, and storage medium for predicting website traffic, which can accurately predict future website traffic and expand the scope of application of the prediction scheme.

[0006] In a first aspect, embodiments of the present invention provide a method for predicting website traffic, comprising:

[0007] Obtain the access volume sample sequence and determine the access volume grayscale sequence corresponding to the access volume sample sequence;

[0008] The grayscale parameters for predicting the number of visits are determined based on the grayscale sequence of the visit volume.

[0009] The initial visit volume prediction sequence is determined based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector, and grayscale prediction equation.

[0010] A traffic prediction sequence is determined based on a preset adjustment sequence and the initial traffic prediction sequence, wherein the traffic prediction sequence includes a future date and the website traffic on that future date.

[0011] Secondly, embodiments of the present invention also provide an apparatus for predicting website traffic, the apparatus comprising:

[0012] The access volume grayscale sequence determination module is used to acquire an access volume sample sequence and determine the access volume grayscale sequence corresponding to the access volume sample sequence.

[0013] The grayscale parameter determination module is used to determine the grayscale parameters for visit volume prediction based on the visit volume grayscale sequence.

[0014] The initial visit volume prediction sequence determination module is used to determine the initial visit volume prediction sequence based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector, and grayscale prediction equation.

[0015] The traffic prediction sequence determination module is used to determine a traffic prediction sequence based on a preset adjustment sequence and the initial traffic prediction sequence, wherein the traffic prediction sequence includes a future date and the website traffic on the future date.

[0016] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for predicting website traffic as described in any of the embodiments of the present invention.

[0017] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting website traffic as described in any of the embodiments of the present invention.

[0018] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the method for predicting website traffic as described in any of the embodiments of the present invention.

[0019] In this embodiment of the invention, by acquiring a traffic sample sequence, a corresponding traffic grayscale sequence is determined. Grayscale parameters for traffic prediction are determined based on the grayscale sequence. An initial traffic prediction sequence is determined based on the traffic sample sequence, grayscale parameters, a preset prediction parameter vector, and a grayscale prediction equation. A further traffic prediction sequence is determined based on a preset adjustment sequence and the initial traffic prediction sequence. Since the traffic prediction sequence includes future dates and website traffic on those dates, future website traffic can be obtained from the prediction sequence. This allows for rapid and accurate prediction of future web server traffic even with a very small sample size, achieving high accuracy and maintaining a small error compared to actual traffic. This avoids the problem of inaccurate manual prediction and solves the problem of the narrow applicability of hiring experts to estimate traffic. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart illustrating a method for predicting website traffic provided in an embodiment of the present invention;

[0022] Figure 2 This is a flowchart illustrating the process of proceeding to the next step based on whether the grade ratio verification has passed, as provided in an embodiment of the present invention.

[0023] Figure 3 This is a schematic diagram of a process for performing level ratio verification on a sequence of access volume samples, provided by an embodiment of the present invention.

[0024] Figure 4 This is a schematic diagram illustrating the overall process of traffic prediction according to an embodiment of the present invention;

[0025] Figure 5 A structural block diagram of a device for predicting website traffic provided in an embodiment of the present invention;

[0026] Figure 6 This is a structural block diagram of a visit volume prediction device provided in an embodiment of the present invention;

[0027] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0028] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0029] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0030] Figure 1 This is a flowchart illustrating a method for predicting website traffic according to an embodiment of the present invention. This embodiment is applicable to scenarios involving predicting website traffic. The method can be executed by a device for predicting website traffic, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0031] Step 101: Obtain the access volume sample sequence and determine the access volume grayscale sequence corresponding to the access volume sample sequence.

[0032] In some embodiments, the visit volume sample sequence is a sample of the original visit volume sequence. The visit volume sample sequence can be obtained from the original visit volume sequence. For example, the visit volume sample sequence is selected from the original visit volume sequence according to a preset prediction parameter vector. The visit volume grayscale sequence includes a first-order cumulative sequence and a sequence of the nearest neighbor means of the first-order cumulative sequence.

[0033] In some embodiments, obtaining the visit volume sample sequence may specifically include obtaining the visit volume sample sequence from the original visit volume sequence based on the sample time range information in the preset prediction parameter vector.

[0034] Specifically, the web server access logs can be collected and analyzed through the raw access sequence generation and input module to statistically analyze the daily access volume of the web server and generate a raw access sequence based on the daily access volume. The sample time range information is based on the date closest to the current time, and the time range is in days.

[0035] For example, the raw sequence of visits can be represented in the following format:

[0036] Serial Number, Date, Number of Visits

[0037] 1,20220221,2856424

[0038] 2,20220222,3121786

[0039] 3,20220323,2756424

[0040] 4,20220324,3021786

[0041] 5,20220324,3880176

[0042] 6,20220325,5809794

[0043] 7,20220326,3271368

[0044] 8,20220327,3105906

[0045] 9,20220328,3783300

[0046] 10,20220329,3843696

[0047] 11,20220330,6390372

[0048] As shown above, the visit sample sequence can contain three columns: the first column is the sequence number, the second column is the visit date, and the third column is the number of visits on that date.

[0049] Assuming we use the raw visit volume of the most recent 9 days as a sample to predict the visit volume of the next 7 days, the prediction parameter vector is (9, 7). Taking March 30, 2022 as the baseline, looking back 9 days, using the above raw visit volume sequence as an example, the visit volume sample sequence at this time is:

[0050] Serial number, date, number of visits

[0051] 1, 20220323, 2756424

[0052] 2, 20220324, 3021786

[0053] 3, 20220324, 3880176

[0054] 4, 20220325, 5809794

[0055] 5, 20220326, 3271368

[0056] 6, 20220327, 3105906

[0057] 7, 20220328, 3783300

[0058] 8, 20220329, 3843696

[0059] 9, 20220330, 6390372

[0060] After obtaining the visit sample sequence from the original visit sequence based on the sample time range information in the preset prediction parameter vector, a corresponding first-order cumulative sequence and the nearest neighbor mean sequence of the first-order cumulative sequence are generated based on the visit sample sequence. In some embodiments of the present invention, X can be used. (0) (n) represents each group of visit samples, where n is the index of that group of visit samples. For example, X (0) (1) represents 1, 20220323, 2756424, X (0) (2) represents 2, 20220324, 3021786, X (0) (3) represents 3, 20220324, 3880176.

[0061] Furthermore, x can be used (0) =(X (0) (1), X (0) (2), ..., X (0) (n) represents the sequence of visitor samples. Let X be the sample number of visits.(1) (k) represents the first-order cumulative sequence of visit volume samples. Let Z... (1) (k) represents the nearest neighbor mean sequence of the first-order cumulative sequence of the visit sample. Where k = 1, ..., n.

[0062] Step 102: Determine the grayscale parameters for predicting the number of visits based on the grayscale sequence of the number of visits.

[0063] In some embodiments, the grayscale parameters for visit volume prediction can be determined based on the first-order cumulative sequence and the nearest mean sequence of the first-order cumulative sequence.

[0064] Specifically, the first coefficient matrix can be determined based on the nearest mean sequence of the first-order cumulative sequence, and the second coefficient matrix can be determined based on the first-order cumulative sequence.

[0065] In some embodiments of the present invention, the first coefficient matrix can be represented as:

[0066] The second coefficient matrix can be represented as:

[0067] The grayscale parameter vector for predicting website visits is then:

[0068] By solving the grayscale parameter vector, the grayscale parameters can be obtained.

[0069] Step 103: Determine the initial visit volume prediction sequence based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector, and grayscale prediction equation.

[0070] In some embodiments, the gray-level differential equation is determined based on the first-order cumulative sequence and the nearest neighbor mean sequence of the first-order cumulative sequence. A whitening equation is constructed based on the gray-level parameters, and the gray-level differential equation is solved using the whitening equation to obtain the gray-level prediction equation.

[0071] In some embodiments of the present invention, an initial visitor prediction sequence can be obtained by solving a grayscale prediction equation based on a visitor volume sample sequence, grayscale parameters, and a preset prediction parameter vector. Let the visitor volume sample sequence be: x (0) =(X (0) (1), X (0) (2), ..., X (0) (n)), then the initial visit volume prediction sequence is: Where nof represents the number of days to be predicted, and the gray-scale prediction equation is: Where a and b are the calculated grayscale parameters. Substituting the visit volume sample sequence and the grayscale parameters into the grayscale prediction equation, we obtain the initial visit volume prediction sequence.

[0072] In some embodiments, after determining the initial visit volume prediction sequence, if the visit volume sample sequence has undergone a translation transformation, an inverse translation transformation can be performed on the initial visit volume prediction sequence. In some embodiments, performing an inverse translation transformation on the initial visit volume prediction sequence includes first obtaining the number of translation transformations of the visit volume sample sequence; then determining a visit volume offset value based on the number of translation transformations and a set step size; and adjusting each visit volume in the initial visit volume prediction sequence based on the visit volume offset value.

[0073] The initial visit volume prediction sequence after inverse translation transformation is:

[0074]

[0075]

[0076] k = 1, ..., nof

[0077] Here, self.shiftVal is the access offset value, which is equal to the number of translations multiplied by the total step size, and the total step size is the sum of the step sizes of each translation.

[0078] Step 104: Determine the access volume prediction sequence based on the preset adjustment sequence and the initial access volume prediction sequence.

[0079] In some embodiments, the prediction adjustment sequence can be an expert-controlled sequence. The expert-controlled sequence input module generates the expert-controlled sequence based on the predicted increase in website traffic over the foreseeable future dates. The expert-controlled sequence is a one-dimensional vector. For example, assuming the number of days to be predicted is 7, and the predicted sudden increases in website traffic due to events or other events over the next 7 days are 3000, 5000, 0, 0, 2000, 0, 0, then the preset adjustment sequence can be (3000, 5000, 0, 0, 2000, 0, 0). The expert-controlled sequence can then be represented as:

[0080] In some embodiments, each visit volume in the prediction adjustment sequence can be accumulated to each visit volume in the initial visit volume prediction sequence to obtain the visit volume prediction sequence.

[0081] If the visitor prediction sequence before expert-controlled sequence gain is:

[0082]

[0083] The predicted visit volume sequence after expert-controlled sequence gain is as follows:

[0084]

[0085] in,

[0086] After the visit volume sample sequence has undergone a translation transformation, the initial visit volume prediction sequence is then subjected to an inverse translation transformation. Each visit volume in the prediction adjustment sequence is then added to the corresponding visit volume in the initial visit volume prediction sequence after the inverse translation transformation, thus obtaining the visit volume prediction sequence.

[0087] In this embodiment, by acquiring a traffic sample sequence, a corresponding traffic grayscale sequence is determined. Grayscale parameters for traffic prediction are then determined based on this grayscale sequence. An initial traffic prediction sequence is determined based on the traffic sample sequence, grayscale parameters, a preset prediction parameter vector, and a grayscale prediction equation. Finally, a final traffic prediction sequence is determined based on a preset adjustment sequence and the initial prediction sequence. This allows for rapid and accurate prediction of future web server traffic even with a very small sample size, achieving high accuracy and maintaining a small error compared to actual traffic. This avoids the inaccuracies of manual prediction and solves the problem of high costs associated with hiring experts for traffic prediction. Furthermore, by optimizing the traffic grayscale prediction model and adding an expert control sequence, an expert grayscale prediction model for traffic is established, enabling the algorithm to predict website traffic growth caused by sudden surges in website traffic within a foreseeable future date.

[0088] Figure 2 This is a flowchart of another method for predicting website traffic provided in this application embodiment. Based on the above embodiment, this embodiment adds a feature of performing level ratio verification on the traffic sample sequence before generating the corresponding first-order cumulative sequence and the nearest neighbor mean sequence of the first-order cumulative sequence according to the traffic sample sequence.

[0089] like Figure 2 As shown, the method may further include:

[0090] Step 201: Perform level ratio verification on the access volume sample sequence.

[0091] The process of performing level ratio verification on the access volume sample sequence in this step can be found in [reference needed]. Figure 3 , Figure 3 This is a schematic diagram of a process for performing level ratio verification on a sequence of access volume samples provided in an embodiment of this application.

[0092] like Figure 3 As shown, the process of performing level ratio verification on the access volume sample sequence in this embodiment may include:

[0093] Step 301: Determine the sequence level ratio based on the ratio of every two adjacent visits in the visit sample sequence.

[0094] It should be noted that the original sequence of visits is x. (0) =(X (0) (1), X (0) (2), ..., X (0) (n)), then the sequence order ratio is: Among them, X (0) (k-1) represents the next element, X (0) (k) represents the previous element.

[0095] Step 302: If all sequence ratios corresponding to the access volume sample sequence fall within the set acceptable coverage range, then the ratio verification is confirmed to be successful.

[0096] In some embodiments, the accommodative coverage range is defined as Θ = (e -2 / (n+1) e 2 / (n+2) If all sequence ratios fall within the acceptable coverage range, the ratio check passes.

[0097] Step 303: If at least one sequence ratio corresponding to the access volume sample sequence does not fall within the set allowable coverage range, then the ratio verification is determined to have failed.

[0098] In some embodiments of the present invention, if more than one sequence ratio does not fall within the acceptable coverage range, the ratio verification fails.

[0099] Step 202: If the level ratio verification passes, then execute the step of generating the corresponding first-order cumulative sequence and the nearest mean sequence of the first-order cumulative sequence based on the access volume sample sequence.

[0100] In some embodiments of the present invention, a corresponding first-order cumulative sequence and a nearest neighbor mean sequence of the first-order cumulative sequence are generated based on the access volume sample sequence. The access volume sample sequence can be accumulated once to obtain the first-order cumulative sequence.

[0101] In some embodiments of the present invention, the access volume sample sequence obtained based on the prediction parameters is as follows:

[0102] x (0) =(X (0) (1), X (0) (2), ..., X (0) (n)).

[0103] Then its first-order cumulative sequence is: x (1) =(X (1) (1), X (1) (2), ..., X (1) (n)).

[0104] in,

[0105] Generate the nearest mean sequence of the first-order accumulated sequence based on the first-order accumulated sequence.

[0106] In some embodiments of the present invention, the nearest neighbor mean sequence of the first-order cumulative sequence is:

[0107] Z (1) =(z (1) (2), z (1) (3), ..., z (1) (n)).

[0108] Among them, z (1) (k)=0.5x (1) (k)+0.5x (1) (k-1).

[0109] Step 203: If the level ratio verification fails, the access volume sample sequence is shifted and transformed, and the level ratio verification is performed on the transformed access volume sample sequence until the level ratio verification passes.

[0110] In some embodiments of the present invention, a transformed access volume sample sequence can be obtained by adjusting each access volume in the access volume sample sequence based on a set step size.

[0111] Specifically, if the level ratio check fails, the access volume sample sequence can be shifted by one step each time until the access volume sample sequence meets the level ratio check.

[0112] For example, the visitor sample sequence is:

[0113] 1, 20220221, 2856424

[0114] 2, 20220222, 3121786

[0115] 3, 20220323, 2756424

[0116] 4, 20220324, 3021786

[0117] 5, 20220324, 3880176

[0118] 6, 20220325, 5809794

[0119] 7, 20220326, 3271368

[0120] 8, 20220327, 3105906

[0121] 9, 20220328, 3783300

[0122] 10, 20220329, 3843696

[0123] 11, 20220330, 6390372

[0124] ...

[0125] After increasing the daily visit count by one step, the visit count sample sequence is as follows:

[0126] 1,20220221,2856424+s

[0127] 2,20220222,3121786+s

[0128] 3,20220323,2756424+s

[0129] 4,20220324,3021786+s

[0130] 5,20220324,3880176+s

[0131] 6,20220325,5809794+s

[0132] 7,20220326,3271368+s

[0133] 8,20220327,3105906+s

[0134] 9,20220328,3783300+s

[0135] 10,20220329,3843696+s

[0136] 11,20220330,6390372+s

[0137] ...

[0138] The step size 's' can be set according to requirements.

[0139] In this embodiment of the invention, by performing a level ratio verification on the access volume sample sequence, if the level ratio verification passes, the step of generating a corresponding first-order cumulative sequence and the nearest mean sequence of the first-order cumulative sequence is executed. If the level ratio verification fails, the access volume sample sequence is shifted and transformed, and the level ratio verification is performed on the transformed access volume sample sequence until the level ratio verification passes. This completes the level ratio verification of the access volume sample sequence, ensuring that the level ratios of the access volume sample sequence all fall within a set acceptable coverage range, which is beneficial for achieving the goal of quickly and accurately predicting the access volume of future web servers.

[0140] In one specific embodiment, an overall process for predicting website traffic is provided. Figure 4 This is a schematic diagram of the overall process for predicting website traffic, provided by an embodiment of the present invention. Figure 4 As shown, the overall process for predicting website traffic includes:

[0141] Step 401: Input the original sequence of access volume, the prediction parameter vector, and the expert control sequence.

[0142] Step 402: Obtain the visit sample sequence.

[0143] The visitor sample sequence is determined based on the original visitor sequence and the prediction parameter vector. The method for determining the visitor sample sequence is the same as in the above embodiment, and will not be repeated here.

[0144] Step 403: Perform level ratio verification on the access volume sample sequence.

[0145] Step 404: Determine whether the level ratio verification passes. If yes, proceed to step 406; otherwise, proceed to step 405.

[0146] Step 405: Perform a translation transformation on the visit sample sequence, and proceed to step 403.

[0147] For example, if the level ratio verification fails, the access volume sample sequence is shifted and transformed, and then proceeds to step 403.

[0148] Step 406: Generate a first-order cumulative sequence of the visit volume sample sequence.

[0149] Step 407: Generate the nearest neighbor mean sequence of the first-order cumulative sequence of the visit volume sample sequence.

[0150] Step 408: Calculate the grayscale parameters of the grayscale prediction equation for visit volume.

[0151] Step 409: Solve the grayscale prediction equation for visit volume.

[0152] Step 410: Obtain the initial visit volume prediction sequence.

[0153] Step 411: Determine whether the access volume sample sequence has undergone a translation transformation. If yes, proceed to step 412; otherwise, proceed to step 413.

[0154] Step 412: Perform a translation and inverse transformation on the initial visit volume prediction sequence.

[0155] Step 413: Adjust the gain of the initial visit volume prediction sequence based on the expert control sequence.

[0156] Step 414: Obtain the final visit volume prediction result.

[0157] In this embodiment, the original access volume sequence, prediction parameter vector, and expert control sequence are input to obtain the access volume sample sequence. A level ratio verification is performed on the access volume sample sequence. If the level ratio verification passes, proceed to step 406. If the level ratio verification fails, a translation transformation is performed on the access volume sample sequence, proceeding to step 403. A first-order cumulative sequence of the access volume sample sequence is generated. The nearest neighbor mean sequence of the first-order cumulative sequence of the access volume sample sequence is generated. The grayscale parameters of the access volume grayscale prediction equation are calculated. The access volume grayscale prediction equation is solved, resulting in an initial access volume prediction sequence. It is determined whether the access volume sample sequence has undergone a translation transformation. If yes, an inverse translation transformation is performed on the initial access volume prediction sequence. If not, an expert control sequence gain is applied to the initial access volume prediction sequence, resulting in the final access volume prediction result. This allows for fast and accurate prediction of future web server access volume even with a very small sample number of days, achieving high accuracy and maintaining a small error compared to actual access volume. This avoids the problem of inaccurate manual prediction and solves the problem of the narrow applicability of hiring experts to estimate access volume for enterprises. In addition, by adding preset adjustment sequences, it is possible to predict the increase in website traffic caused by a sudden surge in website traffic within a foreseeable future date.

[0158] Figure 5 This is a structural block diagram of a device for predicting website traffic according to an embodiment of the present invention. The device for predicting website traffic can be implemented in hardware and / or software, and can be configured in an electronic device. Figure 5 As shown, the device for predicting website traffic specifically includes: a traffic grayscale sequence determination module 501, a grayscale parameter determination module 502, an initial traffic prediction sequence determination module 503, and a traffic prediction sequence determination module 504.

[0159] The access volume grayscale sequence determination module 501 is used to obtain an access volume sample sequence and determine the access volume grayscale sequence corresponding to the access volume sample sequence.

[0160] The grayscale parameter determination module 502 is used to determine the grayscale parameters for the visit volume prediction based on the visit volume grayscale sequence.

[0161] The initial visit volume prediction sequence determination module 503 is used to determine the initial visit volume prediction sequence based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector and grayscale prediction equation.

[0162] The access volume prediction sequence determination module 504 is used to determine the access volume prediction sequence based on the preset adjustment sequence and the initial access volume prediction sequence.

[0163] In this embodiment, by acquiring a traffic sample sequence, a corresponding traffic grayscale sequence is determined. Grayscale parameters for traffic prediction are then determined based on this grayscale sequence. An initial traffic prediction sequence is determined based on the traffic sample sequence, grayscale parameters, a preset prediction parameter vector, and a grayscale prediction equation. Finally, a final traffic prediction sequence is determined based on a preset adjustment sequence and the initial prediction sequence. This allows for rapid and accurate prediction of future web server traffic even with a very small sample size, achieving high accuracy and maintaining a small error compared to actual traffic. This avoids the inaccuracies of manual prediction and solves the problem of high costs associated with hiring experts for traffic prediction. Furthermore, by optimizing the traffic grayscale prediction model and adding an expert control sequence, an expert grayscale prediction model for traffic is established, enabling the algorithm to predict website traffic growth caused by sudden surges in website traffic within a foreseeable future date.

[0164] Optionally, the access volume grayscale sequence determination module 501 is specifically used for:

[0165] Based on the sample time range information in the preset prediction parameter vector, obtain the visit sample sequence in the original visit sequence;

[0166] Generate a corresponding first-order cumulative sequence and a nearest neighbor mean sequence of the first-order cumulative sequence based on the visit sample sequence.

[0167] Optionally, the device further includes:

[0168] The level ratio verification module is used to perform level ratio verification on the access volume sample sequence before generating the corresponding first-order cumulative sequence and the nearest mean sequence of the first-order cumulative sequence based on the access volume sample sequence. If the level ratio verification passes, the step of generating the corresponding first-order cumulative sequence and the nearest mean sequence of the first-order cumulative sequence based on the access volume sample sequence is executed. If the level ratio verification fails, the access volume sample sequence is shifted and transformed, and the level ratio verification is performed on the transformed access volume sample sequence until the level ratio verification passes.

[0169] Optionally, performing a level ratio check on the access volume sample sequence includes:

[0170] The sequence level ratio is determined based on the ratio of every two adjacent visits in the visit sample sequence;

[0171] If all sequence ratios corresponding to the access volume sample sequence fall within the set acceptable coverage range, then the ratio verification is deemed successful.

[0172] If at least one sequence ratio corresponding to the access volume sample sequence does not fall within the set allowable coverage range, then the ratio verification is determined to have failed.

[0173] Optionally, the translation transformation of the access volume sample sequence includes:

[0174] The transformed access volume sample sequence is obtained by adjusting each access volume in the access volume sample sequence based on a set step size.

[0175] Optionally, the access volume grayscale sequence determination module 501 is also specifically used for:

[0176] The access volume sample sequence is accumulated once to obtain a first-order accumulated sequence;

[0177] Generate the nearest mean sequence of the first-order accumulated sequence based on the first-order accumulated sequence.

[0178] Optionally, determining the grayscale parameters for visit volume prediction based on the visit volume grayscale sequence includes:

[0179] The first coefficient matrix is ​​determined based on the nearest mean sequence of the first-order cumulative sequence, and the second coefficient matrix is ​​determined based on the first-order cumulative sequence.

[0180] The grayscale parameters for predicting visit volume are determined based on the first coefficient matrix and the second coefficient matrix.

[0181] Optionally, the initial visit volume prediction sequence determination module 503 is specifically used for:

[0182] The grayscale prediction equation is solved based on the visit volume sample sequence, grayscale parameters, and preset prediction parameter vector to obtain the initial visit volume prediction sequence.

[0183] Optionally, the device further includes:

[0184] The inverse translation transformation module is used to perform an inverse translation transformation on the initial visit volume prediction sequence after determining the initial visit volume prediction sequence, if the visit volume sample sequence has undergone a translation transformation.

[0185] Optionally, the translation inverse transformation module is specifically used for:

[0186] Obtain the number of translation transformations of the access volume sample sequence;

[0187] The access volume offset value is determined based on the number of translation transformations and the set step size, and each access volume in the initial access volume prediction sequence is adjusted based on the access volume offset value.

[0188] Optionally, the visitor volume prediction sequence determination module 504 is specifically used for:

[0189] Each visit volume in the predicted adjustment sequence is added to each visit volume in the initial visit volume prediction sequence to obtain the visit volume prediction sequence.

[0190] In one specific embodiment, a traffic prediction device is provided. Figure 6 This is a structural block diagram of a visitor volume prediction device provided in an embodiment of the present invention. Figure 6 As shown, the device for predicting website traffic specifically includes: an expert control sequence input module 610, a traffic raw sequence generation and input module 620, an expert grayscale prediction calculation module 630, a prediction parameter input module 640, and a prediction result output module 650.

[0191] The expert control sequence input module 610 is used to generate an expert control sequence based on the prediction results of the website traffic increment on a foreseeable future date. This sequence is a one-dimensional vector.

[0192] The raw access sequence generation and input module 620 is used to collect and analyze web server access logs, calculate the daily access volume of the web server, and generate a raw access sequence based on the daily access volume. For example, the web server access logs can be nginx logs.

[0193] The expert grayscale prediction calculation module 630 is used to perform expert grayscale modeling on the original visit volume sample sequence based on the inputs from the three modules: the original visit volume sequence generation and input module, the prediction parameter input module, and the expert control sequence input module, and to calculate the prediction result.

[0194] The prediction parameter input module 640 is used to determine the original access sample sequence and the number of prediction days used by the expert grayscale prediction calculation module 630. The prediction parameter vector is a one-dimensional vector with two elements, where the first element represents the number of days using the most recent original access data, and the second element represents the number of prediction days. The prediction result output module 650 is used to output the access volume prediction sequence.

[0195] Figure 7 This is a structural block diagram of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0196] like Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0197] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0198] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as methods for predicting network traffic.

[0199] In some embodiments, the method for predicting network traffic can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for predicting network traffic described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the method for predicting network traffic by any other suitable means (e.g., by means of firmware).

[0200] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

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

[0202] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0203] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0204] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0205] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for predicting network traffic as provided in any embodiment of this application.

[0206] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0207] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for predicting website traffic, characterized in that, include: Obtain a sample sequence of access volume, and determine the grayscale sequence of access volume corresponding to the sample sequence of access volume, wherein the sample sequence of access volume is determined based on the sample time range information in the preset prediction parameter vector and the original sequence of access volume, and the original sequence of access volume is determined based on the daily access volume of the web server. The grayscale parameters for predicting the number of visits are determined based on the grayscale sequence of the visit volume. The initial visit volume prediction sequence is determined based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector, and grayscale prediction equation. A traffic prediction sequence is determined based on a preset adjustment sequence and the initial traffic prediction sequence, wherein the traffic prediction sequence includes a future date and the website traffic on that future date.

2. The method according to claim 1, characterized in that, The step of obtaining the access volume sample sequence and determining the access volume grayscale sequence corresponding to the access volume sample sequence includes: Based on the sample time range information in the preset prediction parameter vector, obtain the visit sample sequence in the original visit sequence; Generate a corresponding first-order cumulative sequence and a nearest neighbor mean sequence of the first-order cumulative sequence based on the visit sample sequence.

3. The method according to claim 2, characterized in that, Before generating the corresponding first-order cumulative sequence and the nearest neighbor mean sequence of the first-order cumulative sequence based on the access volume sample sequence, the method further includes: Perform level ratio verification on the access volume sample sequence; If the level ratio verification passes, then the steps of generating the corresponding first-order cumulative sequence and the nearest neighbor mean sequence of the first-order cumulative sequence are executed based on the access volume sample sequence. If the level ratio check fails, the access volume sample sequence is shifted and transformed, and the level ratio check is performed on the transformed access volume sample sequence until the level ratio check passes.

4. The method according to claim 3, characterized in that, The step of performing a level ratio check on the access volume sample sequence includes: The sequence level ratio is determined based on the ratio of every two adjacent visits in the visit sample sequence; If all sequence ratios corresponding to the access volume sample sequence fall within the set acceptable coverage range, then the ratio verification is deemed successful. If at least one sequence ratio corresponding to the access volume sample sequence does not fall within the set allowable coverage range, then the ratio verification is determined to have failed.

5. The method according to claim 3, characterized in that, The translation transformation of the access volume sample sequence includes: The transformed access volume sample sequence is obtained by adjusting each access volume in the access volume sample sequence based on a set step size.

6. The method according to claim 2, characterized in that, The step of generating a corresponding first-order cumulative sequence and a nearest neighbor mean sequence of the first-order cumulative sequence based on the access volume sample sequence includes: The access volume sample sequence is accumulated once to obtain a first-order accumulated sequence; Generate the nearest mean sequence of the first-order accumulated sequence based on the first-order accumulated sequence.

7. The method according to claim 1, characterized in that, The step of determining the grayscale parameters for visit volume prediction based on the grayscale sequence of visit volume includes: The first coefficient matrix is ​​determined based on the nearest mean sequence of the first-order cumulative sequence, and the second coefficient matrix is ​​determined based on the first-order cumulative sequence. The grayscale parameters for predicting visit volume are determined based on the first coefficient matrix and the second coefficient matrix.

8. The method according to any one of claims 1-7, characterized in that, The step of determining the initial visit volume prediction sequence based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector, and grayscale prediction equation includes: The grayscale prediction equation is solved based on the visit volume sample sequence, grayscale parameters, and preset prediction parameter vector to obtain the initial visit volume prediction sequence.

9. The method according to claim 8, characterized in that, After determining the initial traffic prediction sequence, the following is also included: If the visit volume sample sequence has undergone a translation transformation, then the initial visit volume prediction sequence is subjected to an inverse translation transformation.

10. The method according to claim 9, characterized in that, The step of performing a translation and inverse transformation on the initial visit volume prediction sequence includes: Obtain the number of translation transformations of the access volume sample sequence; The access volume offset value is determined based on the number of translation transformations and the set step size, and each access volume in the initial access volume prediction sequence is adjusted based on the access volume offset value.

11. The method according to claim 1 or 10, characterized in that, The step of determining the traffic prediction sequence based on the preset adjustment sequence and the initial traffic prediction sequence includes: Each visit volume in the predicted adjustment sequence is added to each visit volume in the initial visit volume prediction sequence to obtain the visit volume prediction sequence.

12. An apparatus for predicting website traffic, characterized in that, include: The access volume grayscale sequence determination module is used to obtain an access volume sample sequence and determine the access volume grayscale sequence corresponding to the access volume sample sequence. The access volume sample sequence is determined based on the sample time range information in the preset prediction parameter vector and the original access volume sequence. The original access volume sequence is determined based on the daily access volume of the web server. The grayscale parameter determination module is used to determine the grayscale parameters for visit volume prediction based on the visit volume grayscale sequence. The initial visit volume prediction sequence determination module is used to determine the initial visit volume prediction sequence based on the visit volume sample sequence, grayscale parameters, preset prediction parameter vector, and grayscale prediction equation. The traffic prediction sequence determination module is used to determine a traffic prediction sequence based on a preset adjustment sequence and the initial traffic prediction sequence, wherein the traffic prediction sequence includes a future date and the website traffic on the future date.

13. An electronic device, characterized in that, The invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the method for predicting website traffic as described in any one of claims 1-11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method for predicting website traffic as described in any one of claims 1-11.

15. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method for predicting website traffic as described in any one of claims 1-11.