Network optimization method and device, and storage medium
By predicting the network quality of the mini program running equipment and formulating optimization strategies, the problem of mini program lag when the network quality of the mini program becomes worse and improving the user experience.
Patent Information
- Application Number
- CN202311425909.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
When using mini programs, network quality deteriorates, causing mini programs to stutter, affecting users' user experience. The prior art lacks effective network optimization methods and user prompts, and cannot effectively measure network quality.
By determining the network status characteristics of the target device, using the preset network quality prediction model to predict network quality information within the future time, and formulating and executing network optimization strategies for the target applet, including switching network types, resource advance requests and loading.
Effectively predict network optimization in advance when network quality deteriorates, ensuring that mini programs can still run normally and smoothly when network quality deteriorates, and improving user experience.
Smart Images

Figure CN119922096A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and in particular, to a network optimization method, device, and storage medium. Background Art
[0002] With the development of Internet technology, mini programs, as a convenient tool that can be used without downloading and installation, have received widespread attention from all walks of life.
[0003] However, when using the mini program, when the network quality deteriorates, the mini program may become stuck and other problems may occur, affecting the user experience. Summary of the invention
[0004] The embodiments of the present disclosure provide a network optimization method, device, and storage medium, which ensure a stable user experience of the target applet.
[0005] In a first aspect, an embodiment of the present disclosure provides a network optimization method, including:
[0006] Determining a network status characteristic of a target device, wherein the target device is a device used to run a target applet;
[0007] Determining predicted network quality information within a preset time period in the future according to the network status characteristics and a preset network quality prediction model;
[0008] Based on the predicted network quality information, a network optimization strategy for the target applet is determined, and the network optimization strategy is executed.
[0009] In a second aspect, an embodiment of the present disclosure provides a network optimization device, including:
[0010] A determination unit, configured to determine a network status feature of a target device, wherein the target device is a device for running a target applet;
[0011] A prediction unit, configured to determine predicted network quality information within a preset time period in the future according to the network state characteristics and a preset network quality prediction model;
[0012] The network optimization unit is used to determine a network optimization strategy for a target applet according to the predicted network quality information, and execute the network optimization strategy.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the network optimization method described in the first aspect and various possible designs of the first aspect.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the network optimization method described in the first aspect and various possible designs of the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions. When a processor executes the computer execution instructions, it implements the network optimization method described in the first aspect and various possible designs of the first aspect.
[0018] The network optimization method, device, and storage medium provided by the embodiments of the present disclosure determine the network status characteristics of the target device, which is a device used to run the target applet; determine the predicted network quality information within a preset time period in the future according to the network status characteristics and a preset network quality prediction model; determine the network optimization strategy for the target applet according to the predicted network quality information, and execute the network optimization strategy. Thus, a stable user experience of the target applet is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, 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 some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A schematic diagram of a network optimization method provided by an embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of a flow chart of a network optimization method provided by an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of the general process of launching a mini program;
[0023] Figure 4 A schematic diagram of a flow chart of a network optimization method provided by another embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of predicting network quality level using a preset network quality prediction model provided in an embodiment of the present disclosure;
[0025] Figure 6 A structural block diagram of a network optimization device provided in an embodiment of the present disclosure;
[0026] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0028] When using mini programs, when the network quality deteriorates, the resource request and loading process of the mini program is slow, and the mini program may freeze, affecting the user experience. In the prior art, when the network quality deteriorates, there is no prompt to guide users to switch network types to improve the network, nor is there any network optimization operation for mini programs; moreover, there is no good method to measure network quality in the prior art. Weak network judgment means low reach rate and insensitivity to network fluctuations.
[0029] In order to solve the above technical problems, the disclosed embodiment provides a network optimization method, which determines the network status characteristics of the target device for a target applet to be run or already run on the target device; determines the predicted network quality information within a preset time period in the future based on the network status characteristics and a preset network quality prediction model; determines the network optimization strategy for the target applet based on the predicted network quality information, and executes the network optimization strategy. By predicting the predicted network quality information within a preset time period in the future, when the predicted network quality deteriorates, the network optimization can be performed in advance for the target applet, ensuring that the target applet can still run normally and smoothly when the predicted network quality deteriorates, thereby ensuring a stable user experience for the target applet.
[0030] The network optimization method provided by the embodiment of the present disclosure is applied to a target device, such as Figure 1As shown, the processing unit of the target device (which may be called the business network layer) may collect the network status characteristics of the target device, and input them into the preset network quality prediction model deployed on the target device to determine the predicted network quality information within a preset time period in the future; according to the predicted network quality level, determine the network optimization strategy for the target applet, and execute the network optimization strategy, wherein the network optimization strategy includes but is not limited to one or more of switching network types, requesting resources in advance, loading resources in advance, etc., wherein when switching the network type, a request may be made to the user to switch the network type, and the switching of the network type may be executed after confirmation by the user.
[0031] It should be noted that the user information and data involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portals for users to choose to authorize or refuse. In addition, whether the network optimization method of this disclosure is executed can also be set by the user on the target device, and the user can choose to turn on or off the network optimization method of this disclosure.
[0032] The network optimization method disclosed in the present invention will be described in detail below in conjunction with specific embodiments.
[0033] refer to Figure 2 , Figure 2 A schematic diagram of a flow chart of a network optimization method provided by an embodiment of the present disclosure. The method of this embodiment can be applied in a target device, and the network optimization method includes:
[0034] S201. Determine a network status feature of a target device, where the target device is a device used to run a target applet.
[0035] In this embodiment, the network status characteristics of the target device may be data related to the network status of the target device in a recent period of time, and the network status characteristics include but are not limited to round-trip time (rtt), network type, downlink throughput, number of retries (retry attempts), number of received bytes (received_bytes), download rate, download time, download size, timestamp of data module triggering, whether the socket is reused, etc., and of course, may also include historical network quality level, current network quality level, current scene information, etc.
[0036] Optionally, when determining the network status characteristics of the target device, any one or more of the following triggering methods may be used:
[0037] The network status characteristics of the target device can be collected at preset time intervals, for example, the collection of the network status characteristics of the target device can be triggered once every m seconds; the network status characteristics of the target device can also be collected when a preset trigger condition is triggered, wherein the preset trigger condition can be a trigger condition pre-set in a program or data, and when the preset trigger condition is triggered, it can trigger the collection of the network status characteristics of the target device once; in addition, the network status characteristics of the target device can also be collected when a network type switch is detected, so as to determine whether the network type after the switch needs to be optimized.
[0038] S202: Determine predicted network quality information within a preset time period in the future according to the network status characteristics and a preset network quality prediction model.
[0039] In this embodiment, after the network status characteristics of the target device are collected, they can be input into a preset network quality prediction model to predict the network quality level within a future preset time period, where the future preset time period can be n seconds in the future.
[0040] The preset network quality prediction model is used to predict the predicted network quality level within a preset time period in the future according to the input network status characteristics. The preset network quality prediction model can be implemented based on any known technology and is not limited in this embodiment.
[0041] S203: Determine a network optimization strategy for the target applet based on the predicted network quality information, and execute the network optimization strategy.
[0042] In this embodiment, after predicting the predicted network quality level within a preset time period in the future, a network optimization strategy for the target applet can be determined based on the predicted network quality level, where the target applet can be the applet currently used by the target device; it can also be the applet that the target device is about to use or the applet that may be used in the future. For example, when the target device enters the entrance of a certain applet (such as the introduction information page of the applet), it can be determined that the target device is about to use the applet, and the applet can be used as the target applet.
[0043] Since the predicted network quality level within a preset period of time in the future may get better or worse, and the target mini program may have certain requirements for network quality, the network optimization strategy for the target mini program can be determined based on the predicted network quality level. For example, if the predicted network quality level deteriorates, the network optimization strategy may include but is not limited to one or more of switching network types, requesting resources in advance, and loading resources in advance. Then, by executing the network optimization strategy, the normal operation of the target mini program is guaranteed, and a stable user experience of the target mini program is guaranteed.
[0044] Optionally, a preset network quality level can be set as a trigger condition for determining and executing the network optimization strategy. That is, if the predicted network quality level is lower than the preset network quality level, the network optimization strategy for the target mini program is determined and executed, where the network optimization strategy includes but is not limited to switching network types, requesting resources in advance, loading resources in advance, etc.
[0045] Among them, a preset network quality level can be uniformly set for all mini-programs, that is, for all mini-programs, as long as the predicted network quality level is lower than the preset network quality level, the determination and execution of the network optimization strategy will be triggered; or, considering that different mini-programs have different requirements for network quality, for example, the mini-program used for live broadcast not only has requirements for download speed, but also requires the delay and packet loss rate to be as low as possible, and has higher requirements for network quality, while the mini-program for browsing short drama videos or pictures only needs to be cached for smooth playback, and has lower requirements for network quality. Therefore, the preset network quality level can be determined according to the target mini-program's requirements for network quality.
[0046] For example, assuming that the network quality level is divided into 4 levels, for mini programs used for live broadcasting or browsing high-definition videos, the preset network quality level can be level 4, that is, if the predicted network quality level is lower than level 4, it will trigger the determination and execution of the network optimization strategy; for mini programs for browsing short drama videos or high-resolution pictures, the preset network quality level can be level 3, that is, if the predicted network quality level is lower than level 3, it will trigger the determination and execution of the network optimization strategy; for mini programs for browsing low-resolution pictures or text content, the preset network quality level can be level 2, that is, if the predicted network quality level is lower than level 2, it will trigger the determination and execution of the network optimization strategy, and so on.
[0047] The network optimization method provided in this embodiment determines the network status characteristics of the target device, which is a device used to run the target applet; determines the predicted network quality information within a preset time period in the future based on the network status characteristics and a preset network quality prediction model; determines the network optimization strategy for the target applet based on the predicted network quality information, and executes the network optimization strategy. By predicting the predicted network quality information within a preset time period in the future, the network optimization can be performed in advance for the target applet when the predicted network quality deteriorates, ensuring that the target applet can still run normally and smoothly when the predicted network quality deteriorates, thereby ensuring a stable user experience of the target applet.
[0048] Based on any of the above embodiments, the network optimization strategy may include but is not limited to switching network types, requesting resources in advance, loading resources in advance, etc.
[0049] In an optional embodiment, switching the network type may specifically include switching from a wifi network to a mobile network, and switching from a mobile network to a wifi network. Before switching the network type, a prompt message for switching the network type may be displayed on the target device so that the user can confirm whether to switch the network type. After the user confirms to switch the network type, the network type is switched.
[0050] In an optional embodiment, if the target applet has not yet been started, the resource advance request includes: requesting in advance the metadata required to start the target applet, and requesting in advance the code package of the target applet; and / or, the resource advance loading includes: loading in advance the web page view of the target applet, and loading in advance the operating environment of the target applet.
[0051] Among them, the usual startup process of the applet is as follows Figure 3 As shown, after clicking on the mini program, the startup of the mini program is triggered. There are two types of network requests during the startup process. One is the metadata required to request the startup of the mini program, where the metadata includes the mini program address, basic library, basic parameters and other necessary information; the other is to request the code package of the mini program (such as the ttpkg format code package). The startup of the mini program depends on the results of these two network requests. In order to reduce the time consumption of these two network requests, especially when the network quality deteriorates, the metadata required to request the startup of the target mini program and the code package of the target mini program can be requested in advance, and the metadata and code package obtained from the server can be cached. In this way, when the target mini program is started, there is no need to execute the two network requests again. Instead, the cached metadata and code package are used, which reduces the time consumption and avoids long waiting time.
[0052] In addition, during the startup of the mini program, there are two types of js environments that need to be initialized, and they take a long time. One of them is the web view (Webview), which takes a long time to create. After initialization, the page frame pageFrame.html will also be loaded; the other is the runtime environment (Runtime), which is jsc. The core is a task queue and JSContext. After creation, tma-core.js will be loaded as the necessary runtime environment. During the startup of the mini-program, the mini-program logic layer app-service.js depends on the runtime environment of Runtime. The web view (Webview) loads the js file and first needs to create the web view (Webview), and also depends on the loading of the page frame pageFrame.html. In order to reduce the time consumption of the mini-program startup process, these two loading processes can be performed in advance, that is, the web view of the target mini-program is loaded in advance (which may also include loading the page frame in advance) and the runtime environment of the target mini-program is loaded in advance. The page view and the runtime environment are prepared before the target mini-program is started. Since the loading of the page view and the runtime environment does not require additional data input and is common to all mini-programs, there is no need to load the page view and the runtime environment again when the target mini-program is started, which reduces the time consumption and avoids long waiting time.
[0053] In an optional embodiment, if the target applet has been started, the resource advance request includes: requesting the target applet's data to be accessed in advance; and / or the resource advance loading includes: loading the target applet's data to be accessed in advance.
[0054] When the target mini program has been started and the network quality is predicted to deteriorate, the target mini program's data to be accessed can be requested in advance. For example, for a mini program used to browse videos or pictures, when browsing the current video or the current picture, the server can be requested for the next video or the next picture in advance. The target mini program's data to be accessed can be loaded in advance, such as parsing and rendering the next video or the next picture.
[0055] Of course, the network optimization strategy for the target applet is not limited to the above examples, and may also include other optimization strategies, such as pre-launch, etc., which will not be described one by one here.
[0056] On the basis of any of the above embodiments, S202 determines predicted network quality information within a preset time period in the future according to the network status characteristics and the preset network quality prediction model, such as Figure 4 and Figure 5 As shown, it may specifically include:
[0057] S301. According to the network status characteristics and the preset network quality prediction model, respectively obtain a round-trip delay index value, a bandwidth index value and a jamming status index value within a future preset time period.
[0058] In this embodiment, when predicting the predicted network quality level within a future preset time period, the preset network quality prediction model can be used to respectively predict the round-trip delay index value, bandwidth index value and jamming state index value within the future preset time period, wherein the preset network quality prediction model can be a model, the input of which is the network status feature, and the output of which is the round-trip delay index value, bandwidth index value and jamming state index value within the future preset time period; or the preset network quality prediction model can also include three sub-models, the network status feature is input into each sub-model respectively, and the round-trip delay index value, bandwidth index value and jamming state index value within the future preset time period are output respectively.
[0059] S302: Perform a weighted summation of the round-trip delay index value, the bandwidth index value, and the jamming state index value within a future preset time period.
[0060] In this embodiment, after obtaining the round-trip delay index value, bandwidth index value and jamming state index value within the future preset time, the round-trip delay index value, bandwidth index value and jamming state index value can be weighted and summed according to the preset weights to obtain the weighted summation result. The preset weights can be set according to actual conditions.
[0061] S303: Map the weighted sum result to a network quality level according to a preset mapping rule to obtain a predicted network quality level within a future preset time period.
[0062] In this embodiment, since the weighted summation result is continuous and the network quality level is discrete, the weighted summation result needs to be discretized, and the weighted summation result is mapped to the network quality level according to the preset mapping rule, so as to obtain the predicted network quality level within the future preset time period, and improve the accuracy of the predicted network quality level through multi-dimensional prediction. Optionally, the preset mapping rule can be to divide the weighted summation result into different intervals, each interval corresponding to a network quality level.
[0063] In the above embodiment, obtaining the round-trip delay index value within a future preset time period according to the network status characteristics and the preset network quality prediction model includes:
[0064] According to the network status characteristics and the preset network quality prediction model, determine the current round-trip delay index value and the round-trip delay fluctuation index value; obtain the sum of the current round-trip delay index value and the round-trip delay fluctuation index value, and determine it as the round-trip delay index value within a future preset time length.
[0065] In this embodiment, when predicting the round-trip delay index value within the future preset time length, the current round-trip delay index value (rtt_level) and the round-trip delay fluctuation index value (fluct_score) can be obtained based on the network state feature analysis by the preset network quality prediction model, and then the current round-trip delay index value (rtt_level) and the round-trip delay fluctuation index value (fluct_score) are added together as the round-trip delay index value within the future preset time length. The fluctuation index value can adopt the standard deviation, coefficient of variation, etc.
[0066] In order to facilitate calculation, the current round-trip delay index value (rtt_level) can be discretized, for example, the current round-trip delay index value (rtt_level) is classified into three categories, and different categories are mapped to different values. For example, if the current round-trip delay index value (rtt_level) is in the interval [0, a), it is mapped to 2, if the current round-trip delay index value (rtt_level) is in the interval [a, b), it is mapped to 1, and if the current round-trip delay index value (rtt_level) is in the interval [b+), it is mapped to 0. Where a is less than b, and the values of a and b can be set according to actual needs.
[0067] Similarly, the round-trip delay fluctuation index value (fluct_score) can also be discretized, for example, the round-trip delay fluctuation index value (fluct_score) is classified into three categories, and different categories are mapped to different values. For example, if the round-trip delay fluctuation index value (fluct_score) is in the interval [0, c), it is mapped to 2, if the round-trip delay fluctuation index value (fluct_score) is in the interval [c, d), it is mapped to 1, and if the round-trip delay fluctuation index value (fluct_score) is in the interval [d+), it is mapped to 0. Among them, c is less than d, and the values of c and d can be set according to actual needs.
[0068] In the above embodiment, the step of obtaining a bandwidth index value within a future preset time period according to the network status characteristics and a preset network quality prediction model includes:
[0069] According to the network status characteristics and the preset network quality prediction model, a current bandwidth index value and a bandwidth fluctuation index value are determined; and a sum of the current bandwidth index value and the bandwidth fluctuation index value is obtained to determine the bandwidth index value within a preset time period in the future.
[0070] In this embodiment, when predicting the bandwidth index value within the future preset time length, the current bandwidth index value (networkspeed_level) and the bandwidth fluctuation index value (fluct_score) can be obtained by analyzing the network state characteristics through the preset network quality prediction model, and then the current bandwidth index value (networkspeed_level) and the bandwidth fluctuation index value (fluct_score) are added together as the broadband index value within the future preset time length. The fluctuation index value can adopt the standard deviation, coefficient of variation, etc.
[0071] In order to facilitate calculation, the current bandwidth index value (networkspeed_level) can be discretized, for example, the current bandwidth index value (networkspeed_level) is classified into three categories, and different categories are mapped to different values. For example, if the current bandwidth index value (networkspeed_level) is in the interval [e+), it is mapped to 2, if the current bandwidth index value (networkspeed_level) is in the interval [f,e), it is mapped to 1, and if the current bandwidth index value (networkspeed_level) is in the interval [0,f), it is mapped to 0. Among them, e is greater than f, and the values of e and f can be set according to actual needs.
[0072] Similarly, the bandwidth fluctuation index value (fluct_score) can also be discretized, for example, the bandwidth fluctuation index value (fluct_score) is classified into three categories, and different categories are mapped to different values. For example, if the bandwidth fluctuation index value (fluct_score) is in the interval [0, g), it is mapped to 2, if the bandwidth fluctuation index value (fluct_score) is in the interval [g, h), it is mapped to 1, and if the bandwidth fluctuation index value (fluct_score) is in the interval [h+), it is mapped to 0. Among them, g is less than h, and the values of g and h can be set according to actual needs.
[0073] In the above embodiment, obtaining the jamming state index value within a future preset time period according to the network state characteristics and the preset network quality prediction model includes:
[0074] According to the network status characteristics and the preset network quality prediction model, determine the current number of freezes index value and the current freeze duration index value; obtain the sum of the current number of freezes index value and the current freeze duration index value, and determine it as the freeze status index value within the future preset duration.
[0075] In this embodiment, when predicting the jamming status index value within a future preset duration, the current jamming number index value (block_cnt_level) and the current jamming duration index value (block_duration_level) can be obtained based on the network status characteristics through the preset network quality prediction model, and then the current jamming number index value (block_cnt_level) and the current jamming duration index value (block_duration_level) are added as the jamming status index value within the future preset duration.
[0076] In order to facilitate calculation, the current jamming index value (block_cnt_level) can be discretized, for example, the current jamming index value (block_cnt_level) can be classified into three categories, and different categories are mapped to different values. For example, if the current jamming index value (block_cnt_level) is 0, it is mapped to 2, if the current jamming index value (block_cnt_level) is in the interval [i, j), it is mapped to 1, and if the current jamming index value (block_cnt_level) is in the interval [j+), it is mapped to 0. Among them, i is less than j, and the values of i and j can be set according to actual needs.
[0077] Similarly, the current jam duration index value (block_duration_level) can also be discretized, for example, the current jam duration index value (block_duration_level) is classified into three categories, and different categories are mapped to different values. For example, if the current jam duration index value (block_duration_level) is 0, it is mapped to 2, if the current jam duration index value (block_duration_level) is in the interval [k, l), it is mapped to 1, and if the current jam duration index value (block_duration_level) is in the interval [l+), it is mapped to 0. Among them, k is less than l, and the values of k and l can be set according to actual needs.
[0078] After obtaining the round-trip delay index value, bandwidth index value and jamming status index value within the future preset time, a weighted sum is performed, and the weighted sum result is mapped to the network quality level according to the preset mapping rule to obtain the predicted network quality level within the future preset time.
[0079] Based on any of the above embodiments, the preset network quality prediction model can be deployed in the target device in the form of an algorithm package, and the algorithm package can be executed by a processing module. The network status characteristics of the target device can be collected at preset time intervals, and / or the network status characteristics of the target device can be collected when a preset trigger condition is triggered. The preset time interval and / or preset anchor point (trigger condition) can be set at the business layer. In addition, an intermediate layer (SDK) can be set to be responsible for the interaction between the business layer and the algorithm package. The collected network status characteristics can also be cleaned and processed logically. After the preset time interval and / or preset trigger condition are set at the business layer, they are registered with the intermediate layer, so that the intermediate layer collects network status characteristics, cleans and processes them, and interacts with the algorithm package based on the preset time interval and / or preset trigger condition.
[0080] Corresponding to the network optimization method of the above embodiment, Figure 6 This is a structural block diagram of a network optimization device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 The network optimization device 600 includes: a determination unit 601, a prediction unit 602, and a network optimization unit 603.
[0081] The determining unit 601 is used to determine the network status characteristics of the target device, where the target device is a device used to run the target applet;
[0082] A prediction unit 602 is used to determine predicted network quality information within a preset time period in the future according to the network state characteristics and a preset network quality prediction model;
[0083] The network optimization unit 603 is used to determine a network optimization strategy for the target applet according to the predicted network quality information, and execute the network optimization strategy.
[0084] In one or more embodiments of the present disclosure, the predicted network quality information includes a predicted network quality level, and the network optimization unit 603, when determining a network optimization strategy for a target applet according to the predicted network quality information, is used to:
[0085] If the predicted network quality level is lower than the preset network quality level, the network optimization strategy is determined to be at least one of the following: switching network type, requesting resources in advance, and loading resources in advance.
[0086] In one or more embodiments of the present disclosure, the network optimization unit 603 is further configured to:
[0087] The preset network quality level is determined according to the target applet's requirement for network quality.
[0088] In one or more embodiments of the present disclosure, if the target applet has not yet been started, the resource advance request includes: requesting in advance the metadata required to start the target applet, and requesting in advance the code package of the target applet; and / or
[0089] The resource preloading includes: preloading the web page view of the target applet, and preloading the operating environment of the target applet.
[0090] In one or more embodiments of the present disclosure, if the target applet has been started, the resource advance request includes: requesting in advance the to-be-accessed data of the target applet; and / or
[0091] The resource pre-loading includes: pre-loading the to-be-accessed data of the target applet.
[0092] In one or more embodiments of the present disclosure, when the prediction unit 602 determines the predicted network quality information within a preset time period in the future according to the network state characteristics and the preset network quality prediction model, it is used to:
[0093] According to the network status characteristics and the preset network quality prediction model, respectively obtaining a round-trip delay index value, a bandwidth index value, and a jamming status index value within a future preset time period;
[0094] Perform a weighted sum of the round-trip delay index value, bandwidth index value, and jamming status index value within a future preset time period;
[0095] The weighted sum result is mapped to a network quality level according to a preset mapping rule to obtain a predicted network quality level within a future preset time period.
[0096] In one or more embodiments of the present disclosure, when the prediction unit 602 obtains the round-trip delay index value within a future preset time period according to the network status characteristics and the preset network quality prediction model, it is used to:
[0097] Determine a current round-trip delay index value and a round-trip delay fluctuation index value according to the network status characteristics and the preset network quality prediction model;
[0098] The sum of the current round-trip delay index value and the round-trip delay fluctuation index value is obtained, and determined as the round-trip delay index value within a future preset time period.
[0099] In one or more embodiments of the present disclosure, when the prediction unit 602 obtains the bandwidth index value within a future preset time period according to the network status characteristics and the preset network quality prediction model, it is used to:
[0100] Determine a current bandwidth index value and a bandwidth fluctuation index value according to the network status characteristics and the preset network quality prediction model;
[0101] The sum of the current bandwidth index value and the bandwidth fluctuation index value is obtained, and determined as the bandwidth index value within a future preset time period.
[0102] In one or more embodiments of the present disclosure, when the prediction unit 602 obtains the jamming state index value within a future preset duration according to the network state characteristics and the preset network quality prediction model, it is used to:
[0103] Determine a current freeze number index value and a current freeze duration index value according to the network status characteristics and the preset network quality prediction model;
[0104] The sum of the current jamming frequency index value and the current jamming duration index value is obtained, and determined as the jamming state index value within a future preset duration.
[0105] In one or more embodiments of the present disclosure, when determining the network status feature of the target device, the determining unit 601 is used to:
[0106] Determine the network status characteristics of the target device at a preset time interval; and / or
[0107] Determining network status characteristics of the target device when a preset trigger condition is triggered; and / or
[0108] Determine the network status characteristics of the target device when a switch in network type is detected.
[0109] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0110] refer to Figure 7 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure, and the electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0111] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0112] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0113] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0114] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0115] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0116] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0117] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0119] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0120] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] In a first aspect, according to one or more embodiments of the present disclosure, a network optimization method is provided, including:
[0123] Determining a network status feature of a terminal, wherein the target device is a device for running a target applet;
[0124] Determining predicted network quality information within a preset time period in the future according to the network status characteristics and a preset network quality prediction model;
[0125] Based on the predicted network quality information, a network optimization strategy for the target applet is determined, and the network optimization strategy is executed.
[0126] According to one or more embodiments of the present disclosure, the predicted network quality information includes a predicted network quality level, and determining a network optimization strategy for a target applet according to the predicted network quality information includes:
[0127] If the predicted network quality level is lower than the preset network quality level, the network optimization strategy is determined to be at least one of the following: switching network type, requesting resources in advance, and loading resources in advance.
[0128] According to one or more embodiments of the present disclosure, the method further includes:
[0129] The preset network quality level is determined according to the target applet's requirement for network quality.
[0130] According to one or more embodiments of the present disclosure, if the target applet has not yet been started, the resource advance request includes: requesting in advance the metadata required to start the target applet, and requesting in advance the code package of the target applet; and / or
[0131] The resource preloading includes: preloading the web page view of the target applet, and preloading the operating environment of the target applet.
[0132] According to one or more embodiments of the present disclosure, if the target applet has been started, the resource advance request includes: requesting in advance the to-be-accessed data of the target applet; and / or
[0133] The resource pre-loading includes: pre-loading the to-be-accessed data of the target applet.
[0134] According to one or more embodiments of the present disclosure, determining predicted network quality information within a future preset time period according to the network state characteristics and a preset network quality prediction model includes:
[0135] According to the network status characteristics and the preset network quality prediction model, respectively obtaining a round-trip delay index value, a bandwidth index value, and a jamming status index value within a future preset time period;
[0136] Perform a weighted sum of the round-trip delay index value, bandwidth index value, and jamming status index value within a future preset time period;
[0137] The weighted sum result is mapped to a network quality level according to a preset mapping rule to obtain a predicted network quality level within a future preset time period.
[0138] According to one or more embodiments of the present disclosure, the step of obtaining a round-trip delay index value within a future preset time period according to the network status characteristics and a preset network quality prediction model includes:
[0139] Determine a current round-trip delay index value and a round-trip delay fluctuation index value according to the network status characteristics and the preset network quality prediction model;
[0140] The sum of the current round-trip delay index value and the round-trip delay fluctuation index value is obtained, and determined as the round-trip delay index value within a future preset time period.
[0141] According to one or more embodiments of the present disclosure, the obtaining of a bandwidth index value within a future preset time period according to the network status characteristics and a preset network quality prediction model includes:
[0142] Determine a current bandwidth index value and a bandwidth fluctuation index value according to the network status characteristics and the preset network quality prediction model;
[0143] The sum of the current bandwidth index value and the bandwidth fluctuation index value is obtained, and determined as the bandwidth index value within a future preset time period.
[0144] According to one or more embodiments of the present disclosure, the acquiring, according to the network status characteristics and the preset network quality prediction model, a jamming status index value within a future preset duration includes:
[0145] Determine a current freeze number index value and a current freeze duration index value according to the network status characteristics and the preset network quality prediction model;
[0146] The sum of the current jamming frequency index value and the current jamming duration index value is obtained, and determined as the jamming state index value within a future preset duration.
[0147] According to one or more embodiments of the present disclosure, determining the network status characteristics of the target device includes:
[0148] Determine the network status characteristics of the target device at a preset time interval; and / or
[0149] Determining network status characteristics of the target device when a preset trigger condition is triggered; and / or
[0150] Determine the network status characteristics of the target device when a switch in network type is detected.
[0151] In a second aspect, according to one or more embodiments of the present disclosure, a network optimization device is provided, including:
[0152] A determination unit, configured to determine a network status feature of a target device, wherein the target device is a device for running a target applet;
[0153] A prediction unit, configured to determine predicted network quality information within a preset time period in the future according to the network state characteristics and a preset network quality prediction model;
[0154] The network optimization unit is used to determine a network optimization strategy for a target applet according to the predicted network quality information, and execute the network optimization strategy.
[0155] According to one or more embodiments of the present disclosure, the predicted network quality information includes a predicted network quality level, and the network optimization unit, when determining a network optimization strategy for a target applet according to the predicted network quality information, is used to:
[0156] If the predicted network quality level is lower than the preset network quality level, the network optimization strategy is determined to be at least one of the following: switching network type, requesting resources in advance, and loading resources in advance.
[0157] According to one or more embodiments of the present disclosure, the network optimization unit is further configured to:
[0158] The preset network quality level is determined according to the target applet's requirement for network quality.
[0159] According to one or more embodiments of the present disclosure, if the target applet has not yet been started, the resource advance request includes: requesting in advance the metadata required to start the target applet, and requesting in advance the code package of the target applet; and / or
[0160] The resource preloading includes: preloading the web page view of the target applet, and preloading the operating environment of the target applet.
[0161] According to one or more embodiments of the present disclosure, if the target applet has been started, the resource advance request includes: requesting in advance the to-be-accessed data of the target applet; and / or
[0162] The resource pre-loading includes: pre-loading the to-be-accessed data of the target applet.
[0163] According to one or more embodiments of the present disclosure, when the prediction unit determines the predicted network quality information within a preset time period in the future according to the network state characteristics and the preset network quality prediction model, it is used to:
[0164] According to the network status characteristics and the preset network quality prediction model, respectively obtaining a round-trip delay index value, a bandwidth index value, and a jamming status index value within a future preset time period;
[0165] Perform a weighted sum of the round-trip delay index value, bandwidth index value, and jamming status index value within a future preset time period;
[0166] The weighted sum result is mapped to a network quality level according to a preset mapping rule to obtain a predicted network quality level within a future preset time period.
[0167] According to one or more embodiments of the present disclosure, when the prediction unit obtains the round-trip delay index value within a future preset time period according to the network state characteristics and the preset network quality prediction model, it is used to:
[0168] Determine a current round-trip delay index value and a round-trip delay fluctuation index value according to the network status characteristics and the preset network quality prediction model;
[0169] The sum of the current round-trip delay index value and the round-trip delay fluctuation index value is obtained, and determined as the round-trip delay index value within a future preset time period.
[0170] According to one or more embodiments of the present disclosure, when the prediction unit obtains the bandwidth index value within a future preset time period according to the network state characteristics and the preset network quality prediction model, it is used to:
[0171] Determine a current bandwidth index value and a bandwidth fluctuation index value according to the network status characteristics and the preset network quality prediction model;
[0172] The sum of the current bandwidth index value and the bandwidth fluctuation index value is obtained, and determined as the bandwidth index value within a future preset time period.
[0173] According to one or more embodiments of the present disclosure, when the prediction unit obtains the jamming state index value within a future preset duration according to the network state characteristics and the preset network quality prediction model, it is used to:
[0174] Determine a current freeze number index value and a current freeze duration index value according to the network status characteristics and the preset network quality prediction model;
[0175] The sum of the current jamming frequency index value and the current jamming duration index value is obtained, and determined as the jamming state index value within a future preset duration.
[0176] According to one or more embodiments of the present disclosure, when determining the network status characteristics of the target device, the determining unit is used to:
[0177] Determine the network status characteristics of the target device at a preset time interval; and / or
[0178] Determining network status characteristics of the target device when a preset trigger condition is triggered; and / or
[0179] Determine the network status characteristics of the target device when a switch in network type is detected.
[0180] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0181] The memory stores computer-executable instructions;
[0182] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the network optimization method described in the first aspect and various possible designs of the first aspect.
[0183] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the network optimization method described in the first aspect and various possible designs of the first aspect is implemented.
[0184] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising computer execution instructions. When a processor executes the computer execution instructions, the network optimization method as described in the first aspect and various possible designs of the first aspect is implemented.
[0185] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0186] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0187] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A network optimization method, characterized in that: include: Determining a network status characteristic of a target device, wherein the target device is a device used to run a target applet; Determining predicted network quality information within a preset time period in the future according to the network status characteristics and a preset network quality prediction model; Based on the predicted network quality information, a network optimization strategy for the target applet is determined, and the network optimization strategy is executed.
2. The method according to claim 1, characterized in that The predicted network quality information includes a predicted network quality level, and determining a network optimization strategy for a target applet according to the predicted network quality information includes: If the predicted network quality level is lower than the preset network quality level, the network optimization strategy is determined to be at least one of the following: switching network type, requesting resources in advance, and loading resources in advance.
3. The method according to claim 2, characterized in that The method further comprises: The preset network quality level is determined according to the target applet's requirement for network quality.
4. The method according to claim 2 or 3, characterized in that: If the target applet has not been started, the resource advance request includes: requesting in advance the metadata required to start the target applet, and requesting in advance the code package of the target applet; and / or The resource preloading includes: preloading the web page view of the target applet, and preloading the operating environment of the target applet.
5. The method according to claim 2 or 3, characterized in that: If the target applet has been started, the resource advance request includes: requesting in advance the to-be-accessed data of the target applet; and / or The resource pre-loading includes: pre-loading the to-be-accessed data of the target applet.
6. The method according to any one of claims 1 to 3, characterized in that: The determining, according to the network status characteristics and a preset network quality prediction model, predicted network quality information within a preset time period in the future includes: According to the network status characteristics and the preset network quality prediction model, respectively obtaining a round-trip delay index value, a bandwidth index value, and a jamming status index value within a future preset time period; Perform a weighted sum of the round-trip delay index value, bandwidth index value, and jamming status index value within a future preset time period; The weighted sum result is mapped to a network quality level according to a preset mapping rule to obtain a predicted network quality level within a future preset time period.
7. The method according to claim 6, characterized in that The obtaining, according to the network status characteristics and the preset network quality prediction model, a round trip delay index value within a future preset time period includes: Determine a current round-trip delay index value and a round-trip delay fluctuation index value according to the network status characteristics and the preset network quality prediction model; The sum of the current round-trip delay index value and the round-trip delay fluctuation index value is obtained, and determined as the round-trip delay index value within a future preset time period.
8. The method according to claim 6, characterized in that The obtaining, according to the network status characteristics and the preset network quality prediction model, a bandwidth index value within a preset time period in the future, comprises: Determine a current bandwidth index value and a bandwidth fluctuation index value according to the network status characteristics and the preset network quality prediction model; The sum of the current bandwidth index value and the bandwidth fluctuation index value is obtained, and determined as the bandwidth index value within a future preset time period.
9. The method according to claim 6, characterized in that The obtaining, according to the network status characteristics and the preset network quality prediction model, a jamming status indicator value within a future preset time period includes: Determine a current freeze number index value and a current freeze duration index value according to the network status characteristics and the preset network quality prediction model; The sum of the current jamming frequency index value and the current jamming duration index value is obtained, and determined as the jamming state index value within a future preset duration.
10. The method according to claim 1, characterized in that The determining of the network status characteristics of the target device includes: Determine the network status characteristics of the target device at a preset time interval; and / or Determining a network status characteristic of the target device when a preset trigger condition is triggered; and / or When a switch in the network type is detected, a network status feature of the target device is determined.
11. A network optimization device, characterized in that: include: A determination unit, configured to determine a network status feature of a target device, wherein the target device is a device for running a target applet; A prediction unit, configured to determine predicted network quality information within a preset time period in the future according to the network state characteristics and a preset network quality prediction model; The network optimization unit is used to determine a network optimization strategy for a target applet according to the predicted network quality information, and execute the network optimization strategy.
12. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 10 is implemented.
14. A computer program product, characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 10 is implemented.