Request frequency optimization method and device of front-end application and terminal equipment

By dynamically adjusting the request frequency using the trained input behavior prediction model in front-end applications, the problem of excessive load on the back-end server due to lack of dynamic adjustment of the request frequency of front-end applications is solved, and the effect of reducing the load on the back-end server and improving network resource utilization is achieved.

CN119917272APending Publication Date: 2025-05-02SHENZHEN QIANHAI EVOC ASIA-PACIFIC ELECTRONIC EQUIP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411993784.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The request frequency of front-end applications when input by users lacks dynamic adjustment, resulting in excessive load on the back-end server, increasing network latency and data transmission.

Method used

By obtaining the target input data collected by the front-end application, inputting the trained input behavior prediction model, predicting the target request frequency in the future time period, and sending it to the front-end application to dynamically adjust the request frequency.

Benefits of technology

Reduces unnecessary requests sent by front-end applications to the back-end server, avoids sending too many requests under high load conditions, thereby reducing the load of the back-end server and improving network resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917272A_ABST
    Figure CN119917272A_ABST
Patent Text Reader

Abstract

The invention relates to a request frequency optimization method and device for a front-end application and terminal equipment. The method comprises the steps of obtaining target input data collected by the front-end application in a first time period; inputting the target input data into the trained input behavior prediction model to obtain a target request frequency output by the trained input behavior prediction model in a second time period, the start time of the second time period being after the end time of the first time period; and sending the target request frequency to a front-end application, so that the front-end application sends a request to a back-end server according to the target request frequency in a second time period. Through application of the method and the device, the problem that the load of the back-end server is relatively large because the request frequency of the front-end application lacks dynamic adjustment in the related technology is solved, and the technical effect of reducing the load of the back-end server so as to improve the utilization rate of network resources is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of Internet technology, and in particular, relates to a method, device and terminal device for optimizing request frequency of a front-end application. Background Art

[0002] In modern Web applications, the front-end and back-end separation architecture has become the mainstream. In this architecture, the front-end application usually communicates with the back-end server through the API (Application Programming Interface) interface to obtain or submit data. In order to ensure the real-time and interactivity of the data, the front-end application usually sends requests to the back-end server frequently when the user inputs.

[0003] Web applications in related technologies usually send requests to backend servers based on a fixed request frequency when users input. However, this approach lacks dynamic adjustment of the request frequency during user input. For example, when users input, the front-end application usually sends a request to the back-end server immediately, which increases the load on the back-end server and may also cause unnecessary network delays and data transmission.

[0004] Currently, no effective solution has been proposed for the problem in related technologies that the request frequency of front-end applications lacks dynamic adjustment, which leads to a heavy load on the back-end server. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus and terminal device for optimizing the request frequency of a front-end application, so as to at least solve the problem in the related art that the request frequency of the front-end application lacks dynamic adjustment, thereby causing a heavy load on the back-end server.

[0006] In a first aspect, an embodiment of the present application provides a method for optimizing the request frequency of a front-end application, comprising: obtaining target input data collected by the front-end application within a first time period; inputting the target input data into a trained input behavior prediction model to obtain a target request frequency within a second time period output by the trained input behavior prediction model, wherein the start time of the second time period is after the end time of the first time period; sending the target request frequency to the front-end application, so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period.

[0007] In some embodiments, before obtaining the target input data collected by the front-end application within the first time period, the method also includes: obtaining the input data of multiple users collected by the front-end application, and constructing an event database based on the input data of the multiple users; dividing the event database into a training data set, a verification data set and a test data set; inputting the training data set into the input behavior prediction model to be trained, and updating each model parameter in the input behavior prediction model to be trained with the goal of minimizing a preset loss function to obtain an updated input behavior prediction model; inputting the verification data set into the updated input behavior prediction model, and optimizing the hyperparameters in the updated input behavior prediction model using the mean square error between the predicted value and the true value of the updated input behavior prediction model as an evaluation index to obtain an optimized input behavior prediction model; using the test data set to evaluate the prediction effect of the optimized input behavior prediction model; and when the prediction effect of the optimized input behavior prediction model meets the preset index, determining that the input behavior prediction model to be trained has been trained to obtain the trained input behavior prediction model.

[0008] In some embodiments, constructing the event database based on the input data of the multiple users includes: normalizing the input data of the multiple users to obtain normalized data; performing outlier processing on the normalized data to obtain cleaned data; labeling the cleaned data to obtain labels corresponding to each of the cleaned data; and constructing the event database based on the cleaned data and the labels corresponding to each of the cleaned data.

[0009] In some embodiments, the outlier processing includes at least one of the following: missing value processing, excessively large value and excessively small value processing, and repeated value processing.

[0010] In some embodiments, the target input data includes a target input type, a target input occurrence timestamp, a target input content, a target input frequency, and a target user ID.

[0011] In some embodiments, the target input type includes at least one of the following: keyboard input, mouse click, touch behavior; the acquisition of the target input data collected by the front-end application within the first time period includes: when the target input type is the keyboard input, collecting the input characters, input frequency and input time within the first time period through the event listener in the front-end application; and generating the target input data based on the input characters, input frequency and input time within the first time period; when the target input type is the mouse click, collecting the click position, click frequency and click time within the first time period through the event listener; and generating the target input data based on the click position, click frequency and click time within the first time period; when the target input type is the touch behavior, collecting the touch position, touch frequency and touch time within the first time period through the event listener; and generating the target input data based on the touch position, touch frequency and touch time within the first time period.

[0012] In some embodiments, after sending the target request frequency to the front-end application so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period, the method further includes: obtaining target feedback data collected by the front-end application within the second time period; preprocessing the target feedback data; and using the preprocessed target feedback data to update various model parameters in the trained input behavior prediction model based on incremental learning.

[0013] In the second aspect, an embodiment of the present application provides a request frequency optimization device for a front-end application, including: an acquisition module, used to acquire target input data collected by the front-end application within a first time period; a prediction module, used to input the target input data into a trained input behavior prediction model, and obtain a target request frequency within a second time period output by the trained input behavior prediction model, wherein the start time of the second time period is after the end time of the first time period; a sending module, used to send the target request frequency to the front-end application, so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period.

[0014] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the request frequency optimization method of the front-end application of any one of the above-mentioned first aspects is implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is run, the request frequency optimization method of the front-end application described in any one of the first aspects above is executed.

[0016] Compared with the related art, the request frequency optimization method, device and terminal device of the front-end application provided in the embodiment of the present application, by inputting the target input data collected by the front-end application in the current time period into the trained input behavior prediction model, the target request frequency in the future time period output by the trained input behavior prediction model is obtained; then, the target request frequency can be sent to the front-end application, and the front-end application can send requests to the back-end server according to the target request frequency in the future time period; in this way, the request frequency of the front-end application is dynamically adjusted through the trained input behavior prediction model, which can reduce unnecessary requests sent by the front-end application to the back-end server, avoid sending too many requests under high load conditions, and thus reduce the load of the back-end server. Through this application, the problem of the lack of dynamic adjustment of the request frequency of the front-end application in the related art, which leads to a large load on the back-end server, is solved, and the technical effect of reducing the load of the back-end server and improving the utilization of network resources is achieved.

[0017] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 It is a structural diagram of a request frequency optimization system for a front-end application according to an embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for optimizing request frequency of a front-end application according to an embodiment of the present application;

[0021] Figure 3 It is a structural diagram of a request frequency optimization device for a front-end application according to an embodiment of the present application;

[0022] Figure 4 It is a structural diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0024] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0025] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0027] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0028] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0029] In modern web applications, the front-end and back-end separation architecture has become the mainstream. In this architecture, the front-end application usually communicates with the back-end server through the API interface to obtain or submit data. In order to ensure the real-time and interactivity of the data, the front-end application usually sends requests to the back-end server frequently when the user inputs.

[0030] Web applications in related technologies usually send requests to backend servers based on a fixed request frequency when users input. However, this approach lacks dynamic adjustment of the request frequency during user input. For example, when users input, the front-end application usually sends a request to the back-end server immediately, which increases the load on the back-end server and may also cause unnecessary network delays and data transmission.

[0031] In addition, most existing request frequency optimization methods rely on static rules or simple heuristic algorithms, which cannot dynamically adjust the request frequency according to the user's real-time input behavior, and thus cannot make full use of network resources.

[0032] For example, the request frequency optimization method relying on static rules can set a fixed request sending interval for the front-end application, or limit the maximum number of requests sent per minute. This method can reduce the frequency of the front-end application sending requests to the back-end server to a certain extent. However, the above static rules cannot adapt to the different input behaviors of different users and different application scenarios. The preset request sending interval or the maximum number of requests sent may be too strict in some cases, and not flexible enough in other cases. For example, since the request frequency is fixed, regardless of the speed of user input, the back-end server needs to process requests frequently, which will cause the back-end server to be overloaded and the network delay to increase, affecting the response speed of the system. In addition, once the static rules are set, they cannot be dynamically adjusted according to the user's real-time input behavior, resulting in too high or too low request frequency in some cases. This may cause the system to fail to respond to the user's input and input delay in a timely manner, causing the user to feel obvious freezes and affect the user experience.

[0033] The request frequency optimization method that relies on heuristic algorithms can determine whether to send a request by detecting the user's input speed. However, since different users have different input habits and input speeds, simple heuristic algorithms are usually too simple and cannot accurately predict the user's next input behavior, which is prone to misjudgment and leads to poor user experience. In addition, although the above heuristic algorithm can perform preliminary optimization based on the user's input speed, it cannot be dynamically adjusted according to the user's real-time input behavior, which will result in limited optimization effect and cannot meet the personalized needs of different users.

[0034] Currently, no effective solution has been proposed for the problem in related technologies that the request frequency of front-end applications lacks dynamic adjustment, which leads to a heavy load on the back-end server.

[0035] Machine Learning (ML) is an artificial intelligence technology that enables computers to learn and improve from data without explicit programming. Machine learning extracts features and patterns from large amounts of data by building models, thereby enabling predictions and decisions about unknown data. This is suitable for optimizing the request frequency of front-end applications. By analyzing the user's real-time input behavior and historical input data, the request frequency can be dynamically adjusted, thereby effectively reducing unnecessary requests, reducing the back-end server load, improving network resource utilization, and improving user experience while ensuring data real-time.

[0036] In view of this, an embodiment of the present application provides a method for optimizing the request frequency of a front-end application, by inputting the target input data collected by the front-end application in the current time period into the trained input behavior prediction model, and obtaining the target request frequency in the future time period output by the trained input behavior prediction model; then, the target request frequency can be sent to the front-end application, and the front-end application can send requests to the back-end server according to the target request frequency in the future time period; in this way, by dynamically adjusting the request frequency of the front-end application through the trained input behavior prediction model, unnecessary requests sent by the front-end application to the back-end server can be reduced, and excessive requests can be avoided under high load conditions, thereby reducing the load on the back-end server. Through this application, the problem of the lack of dynamic adjustment of the request frequency of the front-end application in the related art, which leads to a large load on the back-end server, is solved, and the technical effect of reducing the load on the back-end server and improving the utilization rate of network resources is achieved.

[0037] The following describes an exemplary application architecture of the request frequency optimization system for the front-end application provided in the embodiment of the present application. Figure 1 , Figure 1 It is a structural diagram of a request frequency optimization system for front-end applications according to an embodiment of the present application, including: a back-end server 120 and multiple clients 110. Each client 110 can establish a connection with the back-end server 120 via a wired network or a wireless network.

[0038] The backend server 120 may be a single server, or may be a server cluster composed of multiple servers (or micro servers). The server cluster may also be a distributed cluster. The embodiment of the present application does not limit the specific implementation of the backend server 120.

[0039] The client 110 can be installed in the terminal device in the form of a software application. In some embodiments, the terminal device can be a mobile phone, tablet computer, desktop, laptop, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR)\virtual reality (VR) device and other devices that can install and use content community applications. This application does not limit the specific implementation of the terminal device. It can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device.

[0040] In this embodiment, the client 110 can collect target input data of the user using the client 110 within a first time period through the front-end application. The first time period can be set to 5 seconds, 10 seconds, 15 seconds, 20 seconds, etc. The first time period can be set based on the computing power of the back-end server 120 and the expected prediction accuracy, and this application does not limit this.

[0041] After the client 110 collects the target input data of the user within the first time period through the front-end application, the target input data may be sent to the back-end server 120 .

[0042] The back-end server 120 calls the trained input behavior prediction model to predict the user's target request frequency in the second time period based on the target input data. The start time of the second time period is after the end time of the first time period. The above-mentioned trained input behavior prediction model can be installed in the back-end server 120 to predict the request frequency required by the front-end application in the next period of time based on the input target input data; in addition, the trained input behavior prediction model can also predict the user's predicted input data in the next period of time based on the input target input data, and generate the target request frequency based on the predicted input data.

[0043] After obtaining the target request frequency, the backend server 120 may send the target request frequency to the client 110, so that the frontend application of the client 110 adjusts the frequency of sending requests to the backend server 120 based on the target request frequency. For example, if the frequency of the frontend application sending requests to the backend server 120 is higher than the target request frequency, the frontend application may increase the time interval for sending requests, so that the frontend application sends requests to the backend server 120 according to the target request frequency within the second time period; if the frequency of the frontend application sending requests to the backend server 120 is lower than the target request frequency, the frontend application may reduce the time interval for sending requests.

[0044] In specific implementation, both the backend server 120 and the terminal device can adopt Figure 4 The composition results shown or include Figure 4 Parts shown. Figure 4 It is a structural diagram of a terminal device according to an embodiment of the present application. When the terminal device 4 has the function of the back-end server 120 described in the embodiment of the present application, the terminal device 4 can be the back-end server 120 or a chip or system on chip in the back-end server 120.

[0045] In some embodiments, the backend server 120 and the client 110 provided in the embodiments of the present application can be implemented in software. For example, they can be installed on Figure 4 In the memory 41 of the terminal device 4 shown, the backend server 120 can be software in the form of programs and plug-ins, including: an acquisition module 30, a prediction module 31 and a sending module 32. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented.

[0046] The functions of each module will be described below.

[0047] The request frequency optimization method for the front-end application provided in the embodiment of the present application will be explained in combination with the exemplary application architecture of the request frequency optimization system for the front-end application provided in the embodiment of the present application.

[0048] The following will be combined Figure 2 For an explanation of the method for optimizing the request frequency of a front-end application provided by an embodiment of the present application, see Figure 1 , Figure 2 is a flow chart of a method for optimizing the request frequency of a front-end application according to an embodiment of the present application. Figure 2 As shown, the method includes:

[0049] Step S201, obtaining target input data collected by a front-end application within a first time period.

[0050] In this embodiment, a JavaScript script can be embedded in an HTML (Hyper Text Markup Language) page of a front-end application (e.g., a Web front-end application), and an event listener (e.g., addEventListener (a function that listens to and processes events)) in the JavaScript script can be used to collect the user's target input data within the first time period.

[0051] The target input data may include a target input type, a target input occurrence timestamp, a target input content, a target input frequency, and a target user ID. The target input type may include at least one of the following: keyboard input, mouse click, and touch behavior.

[0052] As an example, the data structure of the target input data may include the following fields: eventType: target input type (for example, keydown (corresponding to keyboard input), click (corresponding to mouse click), touchstart (corresponding to touch behavior)), etc.), timestamp: timestamp of target input occurrence, inputContent: target input content (for example, text entered by the user, element ID clicked / or touched by the user with the mouse, etc.), inputFrequency: target input frequency (for example, the time difference between two inputs), userId: target user ID, used to distinguish input data of different users.

[0053] In one embodiment, obtaining target input data collected by the front-end application within the first time period may include the following steps:

[0054] Step 1, when the target input type is keyboard input, collect input characters, input frequency and input time within a first time period through an event listener in a front-end application; and generate target input data based on the input characters, input frequency and input time within the first time period.

[0055] In this embodiment, the event listener can monitor keydown, keyup, keypress and other events to record the user's keyboard input behavior, including the input characters, input frequency and input time entered by the user through the keyboard within the first time period.

[0056] As an example, the user's input frequency can be recorded by calculating the time difference between two input events of the user (the time interval between the two keyboard input events is greater than a preset threshold (for example, it can be set to 0.5 seconds, 1 second, etc.)). The user's input characters in the first time period can be collected by recording the specific content input by the user through the keyboard, such as the text in the text input box, the data in the form, etc.; the occurrence time of each input event can be recorded, accurate to milliseconds.

[0057] Step 2, when the target input type is a mouse click, collect the click position, click frequency and click time within the first time period through an event listener; and generate target input data based on the click position, click frequency and click time within the first time period.

[0058] In this embodiment, the event listener can monitor click, mousedown, mouseup and other events to record the user's mouse click behavior, including the user's click position, click frequency and click time in the first time period.

[0059] As an example, the user's input frequency can be recorded by calculating the time difference between two user input events (the time interval between two mouse click events is greater than a preset threshold). The user's click position in the first time period can be collected by recording the specific elements clicked by the user with the mouse, such as various options in the front-end application (each option can correspond to an element ID), etc.; the occurrence time of each input event can be recorded, accurate to milliseconds.

[0060] Step 3, when the target input type is touch behavior, collect the touch position, touch frequency and touch time in the first time period through the event listener; and generate target input data based on the touch position, touch frequency and touch time in the first time period.

[0061] In this embodiment, events such as touchstart, touchend, and touchmove may be monitored by an event listener, so as to record the user's touch behavior, including the user's touch position, touch frequency, and touch time within the first time period.

[0062] As an example, the user's input frequency can be recorded by calculating the time difference between two input events of the user (the time interval between two touch behavior events is greater than a preset threshold). The user's touch position in the first time period can be collected by recording the specific elements selected by the user through the touchpad or stylus, such as various options in the front-end application (each option can correspond to an element ID); the occurrence time of each input event can be recorded, accurate to milliseconds.

[0063] After the front-end application collects the target input data of the user in the first time period, the front-end application can format the collected target input data into JSON format for subsequent processing and storage. Subsequently, the front-end application can use JavaScript's XMLHttpRequest (a set of API functions that sends and receives XML (Extensible Markup Language) or other data between the front-end application and the back-end server through HTTP) or fetchAPI (an API for making network requests in the front-end application) to send the formatted target input data to the back-end server.

[0064] If there is a need to transmit data in real time, a WebSocket connection (a protocol for full-duplex communication between the front-end application and the back-end server) can be used to send the formatted target input data input to the back-end server in real time.

[0065] After receiving the formatted target input data, the backend server can store the data in the database for subsequent model prediction or model training. Specifically, the backend server can use the INSERT statement in SQL or the insert method in NoSQL to insert the formatted target input data into the corresponding data table.

[0066] In addition, the back-end server can also regularly back up the input data in the database to prevent data loss. In the event of data loss or damage, the backup data can be used for recovery.

[0067] Step S202, inputting the target input data into the trained input behavior prediction model to obtain the target request frequency in the second time period output by the trained input behavior prediction model, wherein the start time of the second time period is after the end time of the first time period.

[0068] In this embodiment, the trained input behavior prediction model can be constructed based on a neural network, a support vector machine, and a decision tree. The following takes the trained input behavior prediction model constructed based on a neural network as an example to introduce an exemplary process of an input behavior prediction model training method. The input behavior prediction model training method includes the following steps:

[0069] Step 1: obtain input data of multiple users collected by the front-end application, and build an event database based on the input data of the multiple users.

[0070] In this embodiment, constructing an event database based on input data of multiple users may include: normalizing the input data of multiple users to obtain normalized data; performing outlier processing on the normalized data to obtain cleaned data; marking the cleaned data to obtain labels corresponding to each cleaned data; and constructing an event database based on the cleaned data and the labels corresponding to each cleaned data.

[0071] In this embodiment, the input data has the same data structure as the target input data described above. Normalization can ensure that various input data are within the same dimensional range, so that the feature weights will not be unbalanced due to data scale differences during subsequent model training; at the same time, normalization can also accelerate the convergence speed of the optimization algorithm, improve numerical stability, and reduce the risk of numerical overflow. In the example implementation, various input data can be scaled to the range of [0, 1] or [-1, 1], and the formula used is:

[0072]

[0073] Among them, x normalized is the normalized data value, x is the original data value, and x min is the minimum value in the original data, x max is the maximum value in the original data.

[0074] In addition, since some machine learning algorithms (e.g., linear regression, support vector machines, and neural networks) can only process numerical data, it is necessary to convert the input type in the input data into numerical form so that the input behavior prediction model can process these data. One-Hot Encoding (a coding method for converting categorical variables into binary vectors) can be used to convert categorical variables into binary vectors. For example, keyboard input, mouse clicks, and touch behaviors can be converted into [1, 0, 0], [0, 1, 0], and [0, 0, 1], respectively.

[0075] In this embodiment, outlier processing includes at least one of the following: missing value processing, excessively large value and excessively small value processing, and duplicate value processing.

[0076] Missing value processing refers to interpolating missing values ​​or discontinuous data that appear during front-end application collection and transmission:

[0077]

[0078] Among them, x missing is the data value to be interpolated, x i is the original data value collected at the i-th moment.

[0079] The processing of excessively large and small values ​​can be done by detecting and processing outliers through Z-score (standard score):

[0080]

[0081] Among them, Z is the Z-score of the original data, x is the original data value, μ is the mean of the original data, and σ is the standard deviation of the original data. The original data with a Z-score greater than 3 or less than -3 can be regarded as outliers. By removing these outliers, the quality of the data used for subsequent model training can be improved.

[0082] Duplicate value handling can include removing duplicate data records to ensure data uniqueness.

[0083] In this embodiment, after data cleaning is completed, all cleaned data can be labeled to obtain labels corresponding to each cleaned data. The label can be the user ID, input type, timestamp data, etc. of each input data.

[0084] Step 2: Divide the event database into a training data set, a validation data set, and a test data set.

[0085] In this embodiment, corresponding input data can be extracted from the event database, and then the extracted input data can be divided into a training data set, a verification data set, and a test data set by randomly extracting the data in proportion to each other, for example, the data can be divided in a ratio of 70:15:15 or 80:1:1.

[0086] Step 3: Input the training data set into the input behavior prediction model to be trained, and update the model parameters in the input behavior prediction model to be trained with the goal of minimizing the preset loss function to obtain an updated input behavior prediction model.

[0087] After the training data set, validation data set, and test data set are prepared, a neural network can be selected to build an input behavior prediction model. The neural network can be expressed as:

[0088] y = f(W × x + b);

[0089] Among them, y is the output, W is the weight matrix, x is the input, b is the bias term, and f is the activation function. In order to ensure that the complexity of the input behavior prediction model is moderate and avoid overfitting or underfitting, it is necessary to define a loss function to measure the gap between the predicted value and the true value of the input behavior prediction model. The loss function can use the mean-square error (MSE) loss function or the cross entropy loss function.

[0090] In machine learning, optimizing the model parameters in the input behavior prediction model to be trained is a key step to improve model performance and generalization ability. First, by optimizing the model parameters, the accuracy of the model can be significantly improved, the model's performance on the training data set and the test data set can be improved, the prediction error can be reduced, and the predicted value output by the model (i.e., the predicted request frequency) can be closer to the true value (i.e., the actual request frequency). Secondly, optimizing the model parameters helps prevent overfitting and underfitting. Optimize the model parameters by minimizing the loss function. The optimization algorithm can choose Mini-batch Gradient Descent:

[0091]

[0092] Among them, θ is the model parameter, η is the learning rate, J is the loss function, and x i :i+m and y i :i+m is a small batch of data. In addition, Adam can be selected as the optimization algorithm. Adam combines the momentum and RMSprop algorithms, is suitable for large-scale data sets, adaptively adjusts the learning rate, and converges quickly.

[0093] Step 4: Input the verification data set into the updated input behavior prediction model, use the mean square error between the predicted value and the true value of the updated input behavior prediction model as an evaluation indicator, optimize the hyperparameters in the updated input behavior prediction model, and obtain the optimized input behavior prediction model.

[0094] In terms of hyperparameter selection, it is necessary to determine the number of layers and nodes of the neural network. Since predicting request frequency involves multiple input features and complex input behaviors, a neural network with a certain depth is required to collect these complex relationships, but at the same time, overfitting must be avoided. Too many layers and nodes may make the model too complex and increase the risk of overfitting.

[0095] Therefore, the neural network of the optimized input behavior prediction model can be set to 5 layers, including 1 input layer, 3 hidden layers, and 1 output layer. The input layer is set to 5 nodes, corresponding to the 5 fields of the input data; the number of nodes in the three hidden layers is 100, 50, and 25 respectively; the last output layer has 1 node, which outputs the request frequency. In this design, 3 hidden layers can effectively handle these complexities, improve the prediction accuracy of the model, and avoid overfitting. In addition, 3 hidden layers and the gradually reduced number of nodes can balance the complexity and computing resources of the model, ensuring that the model can run efficiently in practical applications.

[0096] In this embodiment, the method for optimizing the hyperparameters may include Bayesian Optimization. In order to prevent overfitting, a regularization term may be added to the loss function through regularization techniques (such as L1 regularization, L2 regularization, Dropout, etc.) to penalize the absolute value of the model parameters, or a portion of neurons may be randomly selected during each forward propagation and back propagation process, and their outputs may be set to zero, while the outputs of other neurons may be amplified to keep the expected value of the overall output unchanged to control the complexity of the model, ensuring that the model performs well on the training data set and also performs well on the test data set.

[0097] The validation dataset can be used to evaluate the performance of the updated input behavior prediction model and adjust the hyperparameters as needed. As an example, the mean square error (MSE) can be selected as the evaluation metric because it can effectively measure the difference between the predicted value and the true value. Use the training dataset to train the input behavior prediction model to be trained, record the loss and MSE during the training process, and update the various model parameters in the input behavior prediction model to be trained to obtain the updated input behavior prediction model. Then, the validation dataset can be used to evaluate the performance of the updated input behavior prediction model, and the MSE generated using the validation dataset can be recorded. Next, the model performance can be optimized by adjusting the hyperparameters. Common hyperparameters include learning rate (e.g. 0.001, 0.01, 0.1), batch size (e.g. 32, 64, 128), number of layers and nodes (e.g. 1 layer with 100 nodes, 2 layers with 50 nodes, 3 layers with 25 nodes), regularization parameters (e.g. L1 regularization coefficient 0.0001, 0.001, 0.01; L2 regularization coefficient 0.0001, 0.001, 0.01), and Dropout rate (e.g. 0.2, 0.5, 0.8).

[0098] Methods such as Bayesian optimization can be used to find the best hyperparameter combination. After inputting the validation data set into the updated input behavior prediction model, the hyperparameter settings and corresponding MSE of each iteration update can be recorded, and then the hyperparameter combination with the lowest MSE can be selected and used as the hyperparameter in the updated input behavior prediction model to obtain the optimized input behavior prediction model.

[0099] Step 5: Use the test data set to evaluate the prediction effect of the optimized input behavior prediction model.

[0100] Step 6: When the prediction effect of the optimized input behavior prediction model meets the preset index, it is determined that the input behavior prediction model to be trained has been trained, and the trained input behavior prediction model is obtained.

[0101] Finally, the prediction results of the optimized input behavior prediction model can be evaluated using the test data set. The MSE generated by the model after the test data set is input can be recorded to ensure the generalization ability of the model on new data. At the same time, cross-validation (for example, K-fold cross-validation) can be used to more accurately evaluate the generalization ability of the model. The choice of preset indicators can be determined according to the specific task. Commonly used indicators include accuracy, precision, recall, F1 score, ROC curve (Receiver Operating Characteristic curve), AUC (Area Under Curve, the area under the ROC curve and the coordinate axis), etc. For example, when the accuracy is greater than 0.95, it can be determined that the input behavior prediction model to be trained has been trained.

[0102] After the input behavior prediction model has been trained, it can be saved as a corresponding file for subsequent use. The trained input behavior prediction model can be deployed to the production environment for actual prediction or classification. After the model is deployed, the performance of the model can be continuously monitored to ensure that it performs stably in actual applications. Based on new input data or performance degradation, the training data set is regularly updated and the model is retrained to maintain its effectiveness. Through these steps, it can be ensured that the model can run efficiently and stably throughout its life cycle.

[0103] In this embodiment, during the training process of the input behavior prediction model, the input data of different time resolutions can be uniformly converted into a standard format through data preprocessing technology, and interpolation algorithms and smoothing filtering technologies are applied to ensure data consistency. In the construction process of the input behavior prediction model, a multi-layer neural network or an integrated learning algorithm can be used, combined with a variety of feature extraction technologies, to enhance the adaptability of the input behavior prediction model to diversified input data. At the same time, transfer learning can be used to accelerate the training process and improve the generalization ability of the model. In addition, during training, cross-validation can be implemented to evaluate the performance of the input behavior prediction model at multiple time resolutions, and data enhancement technology can be used to generate synthetic data to further enhance adaptability. The evaluation mechanism measures model performance through a variety of indicators (for example, accuracy, recall, and F1 value), and provides visualization tools to help analyze the performance differences of the model under various types of data.

[0104] Step S203: Send the target request frequency to the front-end application, so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period.

[0105] In this embodiment, when the user inputs in the front-end application, the front-end application can send requests to the back-end server in real time. These requests contain target input data, which may include target input type, target input occurrence timestamp, target input content, target input frequency, and target user ID. These data can help the back-end server better understand the user's input behavior. The user ID is used to identify the user so that the trained input behavior prediction model in the back-end server can make predictions based on the user's historical input behavior. The front-end application can send these data to the back-end server via HTTP / HTTPS requests to ensure real-time transmission and processing of data.

[0106] After receiving the request, the back-end server can use the trained input behavior prediction model to predict the user's input behavior in the future period (i.e., the second time period) and generate a target request frequency; or, the trained input behavior prediction model can be directly used to predict the target request frequency required by the front-end application to meet the user's input behavior in the future period.

[0107] The back-end server can pre-process the received target input data, such as data cleaning and normalization, to ensure the quality and consistency of the data. Then, the trained input behavior prediction model is used to predict the target request frequency required by the front-end application to meet the user's input behavior in the future. The trained input behavior prediction model can predict the target request frequency required by the front-end application to meet the user's input behavior in the second time period based on the user's historical input behavior (i.e., the input data corresponding to the target user ID in the target input data among the input data of multiple users collected by the front-end application) and the current target input data.

[0108] Alternatively, the trained input behavior prediction model can predict the user's input behavior in the second time period, and based on this, generate a target request frequency. For example, if the model predicts that the user will input a large amount of content in the second time period, the request frequency can be increased to respond to the user input in real time; if the model predicts that the user's input speed in the second time period is slow, the request frequency can be reduced to reduce the load on the backend server.

[0109] The backend server can generate a target request frequency to send to the frontend application.

[0110] As an example, the back-end server can encapsulate the generated target request frequency into JSON or other formats for easy parsing by the front-end application. The back-end server can send the target request frequency to the front-end application via HTTP / HTTPS response. After receiving the target request frequency, the front-end application can send a request to the back-end server according to the target request frequency within the second time period. For example, if the frequency at which the front-end application sends requests to the back-end server is higher than the target request frequency, the front-end application can increase the time interval for sending requests so that the front-end application sends requests to the back-end server according to the target request frequency within the second time period; if the frequency at which the front-end application sends requests to the back-end server is lower than the target request frequency, the front-end application can reduce the time interval for sending requests. In this way, the user's input behavior can be responded to in real time, while reducing unnecessary requests and improving network resource utilization. In addition, such a dynamic adjustment mechanism for request frequency also ensures the efficient operation of the back-end server under high load and low load conditions, providing users with a smooth experience.

[0111] In one embodiment, after sending the target request frequency to the front-end application so that the front-end application sends requests to the back-end server according to the target request frequency within the second time period, the method further includes the following steps:

[0112] Step 1: Obtain target feedback data collected by the front-end application within a second time period.

[0113] Step 2: preprocess the target feedback data.

[0114] Step 3: Use the preprocessed target feedback data to update the model parameters in the trained input behavior prediction model based on incremental learning.

[0115] In this embodiment, target feedback data (eg, mouse clicks, dwell time, etc.) of the user's response to the backend server may be collected so as to subsequently update various model parameters in the trained input behavior prediction model.

[0116] The front-end application can monitor various user feedback input behaviors, such as mouse clicks, wheel scrolling, dwell time, etc. These behavior data can reflect the user's satisfaction with the response of the back-end server. Then, the front-end application can collect these feedback input behaviors as target feedback data and send them to the back-end server.

[0117] After the backend server receives the target feedback data, it can perform data preprocessing on the target feedback data, such as data cleaning and normalization, to ensure the quality and consistency of the data. Then, the preprocessed target feedback data is used to train the trained input behavior prediction model. Instead of training from scratch, the model can be updated step by step using an incremental learning method. After training, the performance of the updated model can be evaluated using a validation dataset to ensure that its prediction accuracy has improved. Finally, the updated model can be deployed to the production environment to replace the old model to improve the overall performance of the system. By regularly collecting user feedback and updating the model, the system can be continuously optimized to provide users with more accurate and efficient responses.

[0118] Through the above steps S101 to S103, by inputting the target input data collected by the front-end application in the current time period into the trained input behavior prediction model, the target request frequency in the future time period output by the trained input behavior prediction model is obtained; then, the target request frequency can be sent to the front-end application, and the front-end application can send requests to the back-end server according to the target request frequency in the future time period; in this way, by dynamically adjusting the request frequency of the front-end application through the trained input behavior prediction model, it is possible to reduce unnecessary requests sent by the front-end application to the back-end server, avoid sending too many requests under high load conditions, and thus reduce the load on the back-end server. Through this application, the problem of the lack of dynamic adjustment of the request frequency of the front-end application in the related art, which leads to a large load on the back-end server, is solved, and the technical effect of reducing the load on the back-end server and improving the utilization of network resources is achieved.

[0119] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0120] Corresponding to the request frequency optimization method of the front-end application described in the above embodiment, Figure 3 A structural schematic diagram of a request frequency optimization device for a front-end application according to an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0121] See also Figure 3The request frequency optimization device 3 of the front-end application includes: an acquisition module 30, which is used to acquire the target input data collected by the front-end application within the first time period; a prediction module 31, which is used to input the target input data into the trained input behavior prediction model to obtain the target request frequency within the second time period output by the trained input behavior prediction model, wherein the start time of the second time period is after the end time of the first time period; a sending module 32, which is used to send the target request frequency to the front-end application, so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period.

[0122] In one embodiment, the request frequency optimization device 3 of the front-end application also includes a training module, which is used to obtain input data of multiple users collected by the front-end application, and build an event database based on the input data of multiple users; divide the event database into a training data set, a verification data set and a test data set; input the training data set into the input behavior prediction model to be trained, and update the various model parameters in the input behavior prediction model to be trained with the goal of minimizing a preset loss function to obtain an updated input behavior prediction model; input the verification data set into the updated input behavior prediction model, and use the mean square error between the predicted value and the true value of the updated input behavior prediction model as an evaluation index to optimize the hyperparameters in the updated input behavior prediction model to obtain an optimized input behavior prediction model; use the test data set to evaluate the prediction effect of the optimized input behavior prediction model; when the prediction effect of the optimized input behavior prediction model meets the preset index, it is determined that the input behavior prediction model to be trained has been trained to obtain a trained input behavior prediction model.

[0123] In one embodiment, the training module is also used to normalize the input data of multiple users to obtain normalized data; perform outlier processing on the normalized data to obtain cleaned data; perform data labeling on the cleaned data to obtain labels corresponding to each cleaned data; and construct an event database based on the cleaned data and the labels corresponding to each cleaned data.

[0124] In one embodiment, outlier processing includes at least one of the following: missing value processing, excessively large value and excessively small value processing, and repeated value processing.

[0125] In one embodiment, the target input data includes a target input type, a target input occurrence timestamp, a target input content, a target input frequency, and a target user ID.

[0126] In one embodiment, the target input type includes at least one of the following: keyboard input, mouse click, touch behavior; the acquisition module 30 is also used to collect input characters, input frequency and input time within a first time period through an event listener in the front-end application when the target input type is keyboard input; and generate target input data based on the input characters, input frequency and input time within the first time period; when the target input type is mouse click, collect the click position, click frequency and click time within the first time period through the event listener; and generate target input data based on the click position, click frequency and click time within the first time period; when the target input type is touch behavior, collect the touch position, touch frequency and touch time within the first time period through the event listener; and generate target input data based on the touch position, touch frequency and touch time within the first time period.

[0127] In one embodiment, the request frequency optimization device 3 of the front-end application also includes an update module, which is used to obtain target feedback data collected by the front-end application within a second time period; preprocess the target feedback data; and use the preprocessed target feedback data to update various model parameters in the trained input behavior prediction model based on incremental learning.

[0128] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0129] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0130] Figure 4 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application. Figure 4 As shown, the terminal device 4 includes: at least one processor 40 ( Figure 4 Only one is shown in the figure) a processor, a memory 41, and a computer program 42 stored in the memory 41 and executable on at least one processor 40. When the processor 40 executes the computer program 42, the steps in the request frequency optimization method embodiment of any of the above-mentioned front-end applications are implemented.

[0131] The terminal device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 4 may include but is not limited to a processor 40 and a memory 41. It is understood by those skilled in the art that Figure 4 It is only an example of the terminal device 4 and does not constitute a limitation on the terminal device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0132] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0133] In some embodiments, the memory 41 may be an internal storage unit of the terminal device 4, such as a hard disk or memory of the terminal device 4. In other embodiments, the memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 4. In other embodiments, the memory 41 may also include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program 42. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0134] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the request frequency optimization method embodiment of the above-mentioned various front-end applications.

[0135] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal implements the steps in the request frequency optimization method embodiment of the above-mentioned various front-end applications when executing the computer program product.

[0136] The present application implements all or part of the processes in the above-mentioned embodiment method, and can instruct the relevant hardware to complete through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

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

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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 application, and should all be included in the protection scope of the present application.

Claims

1. A method for optimizing the request frequency of a front-end application, characterized in that: include: Acquire target input data collected by the front-end application within a first time period; Inputting the target input data into a trained input behavior prediction model to obtain a target request frequency in a second time period output by the trained input behavior prediction model, wherein the start time of the second time period is after the end time of the first time period; The target request frequency is sent to the front-end application, so that the front-end application sends a request to the back-end server according to the target request frequency during the second time period.

2. The method according to claim 1, characterized in that Before acquiring the target input data collected by the front-end application within the first time period, the method further includes: Acquire input data of multiple users collected by the front-end application, and build an event database based on the input data of the multiple users; Dividing the event database into a training data set, a validation data set, and a test data set; Inputting the training data set into the input behavior prediction model to be trained, and updating various model parameters in the input behavior prediction model to be trained with the goal of minimizing a preset loss function to obtain an updated input behavior prediction model; Inputting the verification data set into the updated input behavior prediction model, taking the mean square error between the predicted value and the true value of the updated input behavior prediction model as an evaluation index, optimizing the hyperparameters in the updated input behavior prediction model, and obtaining an optimized input behavior prediction model; Using the test data set to evaluate the prediction effect of the optimized input behavior prediction model; When the prediction effect of the optimized input behavior prediction model meets the preset index, it is determined that the input behavior prediction model to be trained has been trained, and the trained input behavior prediction model is obtained.

3. The method according to claim 2, characterized in that The constructing an event database based on the input data of the plurality of users comprises: Normalizing the input data of the multiple users to obtain normalized data; Performing outlier processing on the normalized data to obtain cleaned data; Marking the cleaned data to obtain labels corresponding to the cleaned data; The event database is constructed based on the cleaned data and the labels corresponding to each of the cleaned data.

4. The method according to claim 3, characterized in that: The outlier processing includes at least one of the following: missing value processing, excessively large value and excessively small value processing, and repeated value processing.

5. The method according to any one of claims 1 to 4, characterized in that The target input data includes a target input type, a target input occurrence timestamp, a target input content, a target input frequency, and a target user ID.

6. The method according to claim 5, characterized in that The target input type includes at least one of the following: keyboard input, mouse click, touch behavior; The obtaining of target input data collected by the front-end application within the first time period includes: In the case where the target input type is the keyboard input, collecting input characters, input frequency and input time within the first time period through the event listener in the front-end application; and generating the target input data based on the input characters, input frequency and input time within the first time period; In the case where the target input type is the mouse click, collecting the click position, click frequency and click time within the first time period through the event listener; and generating the target input data based on the click position, click frequency and click time within the first time period; When the target input type is the touch behavior, the touch position, touch frequency and touch time within the first time period are collected through the event listener; and based on the touch position, the touch frequency and the touch time within the first time period, the target input data is generated.

7. The method according to any one of claims 1 to 4, characterized in that After sending the target request frequency to the front-end application so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period, the method further includes: Acquire target feedback data collected by the front-end application within the second time period; Preprocessing the target feedback data; Using the preprocessed target feedback data, various model parameters in the trained input behavior prediction model are updated based on incremental learning.

8. A request frequency optimization device for a front-end application, characterized in that: include: An acquisition module, used to acquire target input data collected by the front-end application within a first time period; A prediction module, configured to input the target input data into a trained input behavior prediction model to obtain a target request frequency in a second time period output by the trained input behavior prediction model, wherein the start time of the second time period is after the end time of the first time period; A sending module is used to send the target request frequency to the front-end application, so that the front-end application sends a request to the back-end server according to the target request frequency within the second time period.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the request frequency optimization method of the front-end application as described in any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that It comprises a computer program, which, when executed, enables the request frequency optimization method of the front-end application as claimed in any one of claims 1 to 7 to be executed.