Data scheduling processing method and device, and electronic device

By analyzing the target application's runtime environment and status information, network scheduling strategies are obtained, processing priorities are determined, and target network resources are acquired. This solves the problem of network communication priority limitations for background applications, improving user experience and network communication capabilities.

CN117527906BActive Publication Date: 2026-08-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311511824.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2026-08-25
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

In existing technologies, network communication priority restrictions for background applications lead to a decline in user experience and fail to effectively guarantee the network access needs of foreground applications.

Method used

By analyzing the current running scenario of the target application and the state information of the client object, the corresponding network scheduling strategy is obtained, the processing priority of network packets is determined, and the target network resources are obtained through interaction with the operating system to perform network packet scheduling and processing.

Benefits of technology

While reducing system resource consumption, it ensures that the network communication capabilities of background applications and user experience are not compromised, and achieves reasonable hierarchical scheduling of network data packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117527906B_ABST
    Figure CN117527906B_ABST
Patent Text Reader

Abstract

The application provides a data scheduling processing method and device and electronic equipment, which are applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation and auxiliary driving. The method comprises the following steps: in response to a switching instruction, switching a target application program from foreground to background running; performing scene type analysis on the identification information of the current running scene and the state information of the client object to obtain current scene type information; obtaining a current network scheduling strategy corresponding to the current scene type information; in the case that the current network scheduling strategy is a scheduling strategy for maintaining network communication, determining the processing priority of a network data packet in the target application program, and obtaining a target network resource for the background running of the target application program from an operating system; and scheduling and processing the network data packet according to the processing priority of the network data packet and the target network resource. The application embodiment can reduce system resource occupation and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and specifically relates to a data scheduling and processing method, apparatus and electronic device. Background Technology

[0002] A smart terminal can run multiple applications (APPs). By switching between applications, the application that needs to perform the current operation can be brought to the foreground, while the application that does not need to perform the current operation can be brought to the background.

[0003] To ensure a good user experience for foreground applications, network communication priority for background applications is often restricted, or even background applications are not allowed to access the network. This affects the functionality of background applications and reduces the user experience. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a data scheduling and processing method, apparatus, and electronic device.

[0005] On the one hand, this application proposes a data scheduling and processing method, the method comprising:

[0006] In response to a switching command, switch the target application from the foreground to the background.

[0007] Obtain the identification information of the current running scenario and the state information of the client object corresponding to the target application, and perform scenario type analysis on the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information;

[0008] Obtain the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy;

[0009] When the current network scheduling policy is a network communication maintenance policy, the processing priority of network data packets in the target application is determined, and a network resource request is sent to the operating system, so that the operating system responds to the network resource request, analyzes the current network status of the operating system, and obtains the target network resources for the background operation of the target application.

[0010] Receive the target network resources sent by the operating system;

[0011] The network data packets are scheduled and processed according to their processing priority and the target network resources.

[0012] On the other hand, this application proposes a data scheduling processing method, the method comprising:

[0013] When the current network scheduling strategy is to maintain network communication, the system receives network resource requests sent by the client. The current network scheduling strategy is the network scheduling strategy obtained by the client from the preset network scheduling strategy and corresponds to the current scenario type information. The current scenario type information is obtained by analyzing the current running scenario identification information and the client object status information when the client responds to the switching instruction and switches the target application from the foreground to the background.

[0014] In response to the network resource request, the current network status of the local operating system is analyzed to obtain the target network resources for the background operation of the target application;

[0015] The target network resource is sent to the client so that the client can schedule and process the network data packets according to the processing priority of the network data packets in the target application and the target network resource; the processing priority of the network data packets is determined by the client.

[0016] On the other hand, this application proposes a data scheduling and processing apparatus, the apparatus comprising:

[0017] The switching response module is used to switch the target application from the foreground to the background in response to a switching command;

[0018] The scenario type analysis module is used to obtain the identification information of the current running scenario and the state information of the client object corresponding to the target application, and to perform scenario type analysis on the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information.

[0019] The current network scheduling strategy acquisition module is used to acquire the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy;

[0020] The priority processing and request sending module is used to determine the processing priority of network data packets in the target application when the current network scheduling policy is a network communication maintenance scheduling policy, and send a network resource request to the operating system so that the operating system can respond to the network resource request, analyze the current network status of the operating system, and obtain the target network resources for the background operation of the target application.

[0021] A network resource receiving module is used to receive the target network resource sent by the operating system;

[0022] The scheduling module is used to schedule the network data packets according to the processing priority of the network data packets and the target network resources.

[0023] On the other hand, this application proposes a data scheduling and processing apparatus, the apparatus comprising:

[0024] The request receiving module is used to receive network resource requests sent by the client when the current network scheduling strategy is a network communication maintenance strategy. The current network scheduling strategy is a network scheduling strategy obtained by the client from a preset network scheduling strategy that corresponds to the current scenario type information. The current scenario type information is obtained by analyzing the current running scenario's identifier information and the client object's state information when the client responds to a switching instruction and switches the target application from the foreground to the background.

[0025] The network resource generation module is used to analyze the current network status of the local operating system in response to the network resource request, and obtain the target network resources for the background operation of the target application.

[0026] A network resource sending module is used to send the target network resource to the client, so that the client can schedule and process the network data packets according to the processing priority of network data packets in the target application and the target network resource; the processing priority of the network data packets is determined by the client.

[0027] On the other hand, this application proposes an electronic device for data scheduling processing, the electronic device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement the data scheduling processing method as described above.

[0028] On the other hand, this application proposes a computer-readable storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement the data scheduling processing method as described above.

[0029] On the other hand, this application proposes a computer program product, including a computer program that, when executed by a processor, implements the data scheduling and processing method as described above.

[0030] The data scheduling processing method, apparatus, and electronic device proposed in this application analyze the current scenario type information by analyzing the identification information of the current running scenario and the state information of the client object when switching the target application from the foreground to the background. The method obtains the current scenario type information and retrieves the current network scheduling strategy corresponding to the current scenario type information from a preset network scheduling strategy. If the current network scheduling strategy is a strategy to maintain network communication, the method obtains target network resources available for the background operation of the target application from the operating system. Based on the processing priority of network data packets and the target network resources, the method schedules and processes the network data packets. This allows the method to determine the current scenario type information and the corresponding network scheduling strategy based on the current scenario type information and the state information of the client object when switching the target application to the background. For scenario types that require maintaining network access, due to limited operating system resources and the need to prioritize foreground applications, the method prioritizes the processing of network data packets and interacts with the operating system to determine the target network resources available for the background operation of the target application. Finally, based on the processing priority of network data packets and the target network resources, the method schedules and processes the network data packets. This reduces system resource consumption while ensuring that the network communication capabilities of the background application and the user experience are not compromised. Attached Figure Description

[0031] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram illustrating the implementation environment of a data scheduling and processing method according to an exemplary embodiment.

[0033] Figure 2 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 1 .

[0034] Figure 3 This is a schematic diagram illustrating a process for obtaining a corresponding preset network scheduling policy from a server, according to an exemplary embodiment.

[0035] Figure 4 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 2 .

[0036] Figure 5This is a schematic diagram illustrating a process for updating a preset network scheduling policy according to an exemplary embodiment.

[0037] Figure 6 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 3 .

[0038] Figure 7 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 4 .

[0039] Figure 8 This is a block diagram of a data scheduling processing apparatus according to an exemplary embodiment. Figure 1 .

[0040] Figure 9 This is a block diagram of a data scheduling processing apparatus according to an exemplary embodiment. Figure 2 .

[0041] Figure 10 This is a hardware structure block diagram of a terminal provided according to an exemplary embodiment. Detailed Implementation

[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the present application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0044] Figure 1 This is a schematic diagram illustrating the implementation environment of a data scheduling and processing method according to an exemplary embodiment. For example... Figure 1As shown, the implementation environment may include at least an operating system 01, a client 02, and a server 03. The operating system 01, client 02, and server 03 may be directly or indirectly connected via wired or wireless communication. This application embodiment does not impose any limitations on this.

[0045] Optionally, the operating system 01 may include:

[0046] The real-time monitoring module monitors the operation of the system network module in real time during system operation to determine how much network resources are available for background running apps.

[0047] The APP interaction module receives connection requests from the APP and returns the network resources currently available for the APP to run in the background based on the APP's request.

[0048] The network resource scheduling module determines which network resources can be allocated to the background running app based on the real-time network resource status returned by the real-time monitoring module and the network resource requirements of the foreground app.

[0049] Optionally, the client 02 may include:

[0050] The network communication module processes network requests according to the scheduling scheme determined by the policy control module, and adopts different processing strategies such as terminating network connection or maintaining normal network communication.

[0051] The system interaction module periodically interacts with the operating system when the APP switches to the background to confirm the amount of network resources that the operating system can currently allocate to the APP.

[0052] The network policy control module downloads the corresponding control policy from the server. When the APP switches to the background, it determines whether the network packets of the APP can be sent and received normally or should be stopped, based on the scenario type, the processing priority of the corresponding network data packets, and the amount of available network resources allocated by the operating system.

[0053] Optionally, server 03 may include:

[0054] The network communication module receives network requests from clients, issues network scheduling policies, and handles normal logical communication.

[0055] The priority management module processes the priority information of various network data packets preset by the developer and stores it for scheduling by the policy management module.

[0056] The scene classification module processes and stores various game scene classification information preset by developers for scheduling by the strategy management module.

[0057] The strategy management module determines the network scheduling strategy based on the corresponding data stored in the priority management module and the scenario classification module, and sends it to the client through the network communication module according to the client's request.

[0058] It should be noted that the APP in this application embodiment can be of various types, and there is no specific limitation. For example, the APP can be a game APP, a short video APP, a shopping APP, a news APP, etc.

[0059] Taking a game app as an example, client 02 can be a game client with the game app installed. Correspondingly, the network policy control module in client 02 is used to download the corresponding control policy from the game server. When the game app switches to the background, it determines whether the game app can send and receive network packets normally or suspends sending and receiving based on the game scene type, the priority of the corresponding data packets, and the amount of available network resources allocated by the system. For example, this game client can be a smartphone, tablet, laptop, desktop computer, smart speaker, smart voice interaction device, smart home appliance, smartwatch, in-vehicle terminal, aircraft, etc., but is not limited to these.

[0060] Taking game apps as an example, the operating system can be the operating system corresponding to the game client.

[0061] Taking a game app as an example, server 03 can be a game server. Accordingly, the game server includes a network communication module for receiving network requests from game clients, issuing network scheduling strategies, and handling normal game logic communication; a priority management module for processing and storing priority information for various network data packets preset by the game developer for scheduling by the strategy management module; a scene classification module for processing and storing various game scene classification information preset by the game developer for scheduling by the strategy management module; and a strategy management module for determining network scheduling strategies based on the corresponding data stored in the priority management module and scene classification module, and issuing these strategies to the game client via the network communication module according to the game client's requests.

[0062] For example, the game server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0063] It should be noted that, Figure 1This is just one example. Other implementation environments may also be included in other scenarios.

[0064] It is understood that in the specific implementation of this application, user information, such as the status information of client objects, is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0065] Figure 2 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 1 This method can be used for Figure 1 In the implementation environment described in this specification, the method operation steps are as illustrated in the embodiments or flowcharts. However, based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown in the embodiments or drawings... Figure 2 As shown, the method may include:

[0066] S101. The client responds to the switching command and switches the target application from the foreground to the background.

[0067] In this application, the switching instruction can be triggered by a client object or automatically by the system under certain circumstances. Taking client object triggering as an example, when a client object needs to switch the target application from the foreground to the background while using the target application, it can trigger a switching instruction. The client responds to the switching instruction and switches the target application from the foreground to the background.

[0068] S103. The client obtains the identification information of the current running scene and the state information of the client object, performs scene type analysis on the identification information of the current running scene and the state information of the client object, and obtains the current scene type information.

[0069] After the client switches the target application from the foreground to the background, the client can obtain the identification information of the current running scene and the state information of the client object.

[0070] The current running scenario refers to the current environment in which the target application is located. Taking a game app as an example, the current running scenario could be a download scenario, an idle scenario, a spectator scenario, etc. This identification information is used to uniquely identify the current running scenario. For example, the identification information of the current running scenario can be the identity document (id) of the current scenario.

[0071] This state information refers to the state of the client object in the current runtime scenario. It's important to note that this state information is set based on the current runtime scenario. For example, if the current runtime scenario is a background download scenario, the client object's state information could be "client object is downloading normally" or "client object is downloading paused," etc. The client object can refer to the user using the target application.

[0072] After obtaining the identifier information of the current running scenario and the state information of the client object, the client performs scenario type analysis on both to obtain the current scenario type information. For example, if the current running scenario is a download scenario and the client object's state information indicates that the client object is downloading normally, then the current scenario type information can be background download.

[0073] S105. The client obtains the current network scheduling policy corresponding to the current scenario type information from the preset network scheduling policy.

[0074] In this embodiment of the application, the client can pre-cache preset network scheduling strategies corresponding to different current type information. After the client determines that it has obtained the current scene type information, it can obtain the current network scheduling strategy corresponding to the current scene type information from the cached preset network scheduling strategies.

[0075] S107. Given that the current network scheduling policy is to maintain network communication, the client determines the processing priority of network packets in the target application and sends a network resource request to the operating system.

[0076] S109. In response to a network resource request, the operating system analyzes the current network status of the operating system to obtain the target network resources for the background operation of the target application.

[0077] S1011. The operating system sends the target network resources to the client.

[0078] S1013. The client schedules and processes network packets according to their processing priority and target network resources.

[0079] In this embodiment, when the current network scheduling strategy is to maintain network communication, due to limited operating system resources and the need to prioritize foreground applications, the client can prioritize network data packets and interact with the operating system to determine target network resources available for the background operation of the target application. Specifically, the client sends a network resource request to the operating system, which responds by analyzing its current network status to obtain the target network resources for the background operation of the target application and sends these resources to the client. Finally, the client schedules and processes network data packets according to their processing priorities and the target network resources.

[0080] Therefore, when switching the target application to run in the background, the current scenario type information can be determined based on the identification information of the current running scenario and the state information of the client object. The corresponding network scheduling strategy is then determined. For scenario types that require maintaining network access, due to the limited operating system resources and the need to prioritize foreground applications, the processing priority of network packets can be graded. The system can also interact with the operating system to determine the target network resources available for the background operation of the target application. Finally, based on the processing priority of network packets and the target network resources, network packets are scheduled and processed. This reduces system resource consumption while ensuring that the network communication capabilities of the background application and the user experience are not compromised.

[0081] In an optional embodiment, before step S101 above, that is, before the client responds to the switching command and switches the target application from the foreground to the background, the client can also obtain the corresponding preset network scheduling policy from the server in advance. Figure 3 This is a schematic diagram illustrating a process for obtaining a corresponding preset network scheduling policy from a server, according to an exemplary embodiment. Figure 3 As shown, the pre-obtaining of the corresponding preset network scheduling strategy from the server may include:

[0082] S001. In response to the service startup command, the client sends a scheduling policy retrieval request to the server.

[0083] S003. In response to the scheduling policy retrieval request, the server retrieves the preset network scheduling policy from the storage module; the preset network scheduling policy includes network scheduling policies corresponding to different scenario type information.

[0084] S005. The server sends a preset network scheduling policy to the client.

[0085] S007. Client cache preset network scheduling strategy.

[0086] Optionally, the APP development client can pre-set a preset network scheduling strategy, which may include network scheduling strategies corresponding to different scenario types, and store the preset network scheduling strategy in the server's storage module.

[0087] Taking game apps as an example, different scenario types of information may include, but are not limited to: background download, idle, spectator, temporary passive background switching, game exit, and other types.

[0088] Background downloads: In certain scenarios, client objects need to download large amounts of resource packages from the CDN before they can proceed to the next scene. Typical scenarios include version updates before the client object enters the game or resource package downloads before entering a dungeon. Because the waiting time is relatively long, the client object may switch the game app to the background to handle other tasks. In this case, network communication is crucial, especially ensuring the timely download of relevant resource packages.

[0089] AFK (Away From Keyboard) type: When performing certain tasks, no client-side operation is required, but the system needs to remain online. In this case, the relevant game logic data packets and the relevant network connection heartbeat packets can be set to a higher priority.

[0090] Spectator mode: In the spectator scenario, the client object simply watches the game process of teammates or other client objects. When switching to the background, since the interface is not visible, most data packets can be interrupted, but the corresponding network connection needs to be maintained. Therefore, heartbeat packets need to be kept with high priority.

[0091] Temporarily passively switched to background: When the client object is interrupted by SMS, phone call, or notification message from another app, the game app is temporarily switched to run in the background. Generally, the client object will switch back quickly. At this time, normal network communication should be maintained as much as possible.

[0092] Exiting the game: In specific scenarios, the client object switches to the background with the actual intention of exiting the game. At this time, all related network communications can be directly interrupted. A typical scenario is that the client object actively switches the game app to the background after the game is over.

[0093] Other categories: Scenarios that are not among the above categories or cannot be specifically categorized. In these cases, the priority of game network data packets is set according to the preset impact on user experience.

[0094] Network scheduling strategies can be pre-set for the above-mentioned scenario types. These network scheduling strategies may include, but are not limited to: suspending network communication, partially maintaining network communication, and maintaining normal network communication.

[0095] Stop network communication. For example, in the "Exit Game" category, there's no need to maintain normal network communication in the background; you can directly stop all network communication.

[0096] Some network communications are maintained. For example, for "spectator," "AFK," and "other" categories, you can set which levels of network data packets need to be sent and received normally and which can be stopped directly, based on the actual scenario. This ensures that the user experience is not affected when switching client objects to the foreground, while also not consuming too much additional system network resources.

[0097] Maintain normal network communication. For example, in scenarios like "background download" and "temporary passive background switching," all logic needs to function normally when the game switches to the background, and the client object may return to the game at any time. Therefore, all data packets should be sent and received normally. Of course, scheduling can be done according to priority based on the scarcity of network resources.

[0098] Optionally, in step S001 above, before switching, the client object can normally start the game, thereby triggering a business start command. In response to this command, the client sends a scheduling strategy retrieval request to the server. In step S003 above, the server can respond to the scheduling strategy retrieval request and retrieve a pre-selected, stored preset network scheduling strategy from the storage module. In steps S005-S007 above, the server can send the preset network scheduling strategy to the client, which caches it for use when the application switches to the background, and loads other game logic for the client object. Thus, when the client object starts the game, it can retrieve and cache a preset network scheduling strategy, including network scheduling strategies corresponding to different scene types, from the server for use when the application switches to the background. This allows the target application to directly retrieve the current network scheduling strategy corresponding to the current scene type from the cache after switching to the background, improving the efficiency and accuracy of obtaining the current network scheduling strategy, thereby further ensuring that the network communication capabilities of the background application and the user experience are not compromised.

[0099] After the client completes the caching of the preset network scheduling strategy, the client object can perform normal business logic.

[0100] It should be noted that in step S103 above, the analysis of the current scene type information by the identification information of the current running scene and the state information of the client object can be achieved in various ways, and no specific limitation is made here.

[0101] Figure 4 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 2 ,like Figure 4As shown, in one implementation, the above-described scene type analysis of the current running scene's identifier information and the client object's state information to obtain the current scene type information may include:

[0102] S1031. The client obtains preset mapping information; the preset mapping information represents the mapping relationship between the identification information of the running scenario, the state information of the client object, and the type identification information of the scenario type information.

[0103] S1033. The client determines the target type identifier information corresponding to the identifier information of the current running scene and the state information of the client object according to the preset mapping information, and determines the scene type information corresponding to the target type identifier information as the current scene type information.

[0104] In this embodiment, a preset mapping information can be established in advance, representing the mapping relationship between the identification information of the running scenario, the state information of the client object, and the type identification information of the scenario type information. After the client obtains the identification information of the current running scenario and the state information of the client object, it can determine the target type identification information that has a mapping relationship with the identification information of the current running scenario and the state information of the client object based on the preset mapping information, and determine the scenario type information corresponding to the target type identification information as the current scenario type information. Since the preset mapping information can accurately represent the mapping relationship between the identification information of the running scenario, the state information of the client object, and the type identification information of the scenario type information, determining the current scenario type information based on the preset mapping information can improve the accuracy of the confirmation of the current scenario type information, thereby improving the accuracy of scheduling and processing network data packets.

[0105] For example, the preset mapping information can be a preset list that records the mapping relationships between the identifier information of the running scenario, the state information of the client object, and the type identifier information of the scenario type. Therefore, after switching the target application from the foreground to the background, the client can use this preset list to query the identifier information of the currently running scenario and the scenario type to which the client object's state information belongs.

[0106] Taking game apps as an example, Table 1 is a preset list illustrated according to an exemplary embodiment, such as... Figure 1 As shown, this preset list not only records the mapping relationship between the identification information of the running scenario, the status information of the client object, and the type identification information of the scenario type, but also records the field name, field type, resource description, and remarks corresponding to the identification information of the running scenario, the status information of the client object, and the type identification information of the scenario type.

[0107] Table 1 Preset List

[0108]

[0109]

[0110] In other embodiments, the above-mentioned analysis of the current running scenario identification information and the client object status information to obtain the current scenario type information may further include: obtaining the historical data scheduling process, obtaining the historical running scenario identification information and the historical status information of the client object used in the historical data scheduling process, and determining the historical scenario type information corresponding to the historical running scenario identification information and the historical status information of the client object as the current scenario type information.

[0111] It should be noted that in step S105 above, the client obtains the current network scheduling policy corresponding to the current scenario type information from the preset network scheduling policy, which can be achieved in various ways, and no specific limitation is made here.

[0112] In one implementation, in step S105 above, the client obtains the current network scheduling policy corresponding to the current scene type information from the preset network scheduling policy, which may include: the client obtaining the current network scheduling policy corresponding to the current scene type information from the cached preset network scheduling policy.

[0113] In this embodiment, since the client obtains a preset network scheduling policy from the server in advance and caches the preset network scheduling policy, which includes network scheduling policies corresponding to different scenario type information, after switching the target application to the background, the client can directly obtain the current network scheduling policy corresponding to the current scenario type information from the cached preset network scheduling policy. Therefore, it is not necessary to request the preset network scheduling policy from the server again after switching the target application. The client can directly obtain the current network scheduling policy corresponding to the current scenario type information from the cache, which improves the efficiency and accuracy of obtaining the current network scheduling policy, thereby further ensuring that the network communication capabilities of the background application and the user experience are not compromised.

[0114] In another implementation, the client may not need to obtain a preset network scheduling policy from the server beforehand and store the preset network scheduling policy. In step S105 above, the process of the client obtaining the current network scheduling policy corresponding to the current scene type information from the preset network scheduling policies may further include: after the target application switches to the background, the client sends a scheduling policy retrieval request to the server; the server responds to the scheduling policy retrieval request and retrieves the preset network scheduling policy from the storage module; the server sends the preset network scheduling policy to the client, and the client retrieves the current network scheduling policy corresponding to the current scene type information from the preset network scheduling policies.

[0115] It should be noted that in step S107 above, the client determines the processing priority of network data packets in the target application in various ways, and no specific limitation is made here.

[0116] In one implementation, continue as follows Figure 4 As shown, in step S107 above, the number of network data packets is multiple, and the client determines the processing priority of network data packets in the target application, which may include:

[0117] S1071. The client obtains priority-related data; the priority-related data includes at least one of the following: the impact of interruptions of each network packet on the client object, the link information of each network packet, and the network resource requirement information of the operating system.

[0118] S1073. The client analyzes the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet.

[0119] In this embodiment, after the target application switches from the foreground to the background, the network data packets in the target application do not have the highest priority on the operating system side. In order to prevent the target application from being forcibly restricted by the system and thus affecting the user experience, the client can classify the processing priority of network data packets in the target application, minimize unnecessary and low-priority network communication, and ensure that the most critical data packets that have the greatest impact on the user experience can be sent and received normally.

[0120] In one implementation, the client can analyze the priority of each network packet using priority association data to obtain the processing priority of each network packet. Optionally, the priority association data includes at least one of the following: the impact of interruption of each network packet on the client object, the link information of each network packet, and the network resource requirement information of the operating system.

[0121] The "impact data of network packet interruptions on client objects" refers to the impact of network packet interruptions on the user experience of client objects. The "link information of each network packet" refers to the network links that transmit each network packet. These links can include long links and short links. A long link means that multiple data packets can be sent continuously over a single link. During the link's maintenance, if no data packets are being sent, both parties need to send link detection packets. A short link means that a connection is established only when the communicating parties need to exchange data, and the link is closed after the data transmission is complete; that is, each link only completes the transmission of one service.

[0122] Among them, "operating system network resource requirement information" refers to the amount of network resources required by the operating system during normal operation.

[0123] In another implementation, the client can also obtain the historical processing priority of each network packet after the target application switched from the foreground to the background at a historical time, and generate the processing priority of each network packet based on the historical processing priority of each network packet.

[0124] In an optional embodiment, in the above S1073, the client analyzes the priority of each network data packet according to the priority association data to obtain the processing priority of each network data packet. This may include: when the priority association data includes the link information of each network data packet, the client sets the processing priority of network data packets with long link information to the first priority and sets the processing priority of network data packets with short link information to the second priority; wherein, the first priority is greater than the second priority.

[0125] In this embodiment, since the recovery cost after a short connection is relatively low, while the recovery cost after a long connection is relatively high due to the need for authentication, state data, and other preconditions, all other things being equal, long connections have a higher priority based on the cost of restoring communication. The client can set the processing priority of network packets with long connection information as the first priority and the processing priority of network packets with short connection information as the second priority, with the first priority being higher than the second priority. This allows for setting the priority of network packets based on the recovery cost after an interruption, thereby further reducing the consumption of system resources and improving the user experience.

[0126] This application does not specifically limit the first priority and the second priority in the embodiments. In Example 4, the first priority can be a high priority and the second priority can be a low priority.

[0127] It should be noted that different types of long-lived connection network packets may have different processing priorities. For example, heartbeat packets for long-lived connections have a higher priority than ordinary packets.

[0128] In another optional embodiment, in the above-described S1073, the client analyzes the priority of each network data packet according to the priority association data to obtain the processing priority of each network data packet. This may include: if the priority association data includes network resource demand information of the operating system and the network resource demand information is greater than a preset resource demand threshold, the client sets the processing priority of network data packets that meet the first preset condition as the first priority and sets the processing priority of network data packets that meet the second preset condition as the second priority; wherein, the first preset condition is at least one of packet volume less than or equal to a preset packet volume threshold and transmission frequency less than or equal to a preset transmission threshold, the second preset condition is at least one of packet volume greater than a preset packet volume threshold and transmission frequency greater than a preset transmission threshold, and the first priority is greater than the second priority.

[0129] In this embodiment, when the system network is congested, under the same conditions, the more numerous and frequently transmitted network data packets there are, the lower their priority will be; conversely, the fewer the number of network data packets and the lower their transmission frequency, the higher their priority will be. Therefore, network data packets with a packet size less than or equal to a preset packet size threshold and a transmission frequency less than or equal to a preset transmission threshold can be assigned a first priority, while network data packets with a packet size greater than a preset packet size threshold and a transmission frequency greater than a preset transmission threshold can be assigned a second priority, with the first priority being higher than the second priority. Thus, the processing priority of network data packets can be set according to their packet size and transmission frequency, giving higher priority to network data packets with smaller packet sizes and lower transmission frequencies, and lower priority to network data packets with larger packet sizes and higher transmission frequencies. This allows for the reasonable scheduling of different types of network data packets, further reducing the consumption of system resources and improving the user experience.

[0130] This embodiment does not specifically limit the first priority and the second priority. For example, the first priority can be a high priority and the second priority can be a low priority.

[0131] In another optional embodiment, in S1073 above, the client analyzes the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet, which may include:

[0132] When the priority-related data includes the impact data of the interruption of each network packet on the client object, the client sets the processing priority of network packets whose impact data is greater than the preset impact threshold as the first priority, and sets the processing priority of network packets whose impact data is less than or equal to the preset impact threshold as the second priority.

[0133] In this embodiment, when the target application switches from the foreground to the background, the impact of interruptions on different types of network data packets on the user experience exceeds a preset impact threshold. The client object needs to wait for the network data packet transmission to complete before proceeding to the next step. Therefore, the processing priority of this type of network data packet can be set as the first priority. Conversely, the impact of interruptions on the user experience of some network data packets is less than or equal to the preset impact threshold. When switching to the background, since the interface is invisible, the user cannot perceive the change in this type of data. Therefore, the corresponding network data packets can be interrupted, and their processing priority can be set as the second priority. Thus, the priority of network data packets can be set based on the impact of interruptions on the client object, thereby further reducing the consumption of system resources and improving the user experience.

[0134] This embodiment does not specifically limit the first priority and the second priority. For example, the first priority can be a high priority and the second priority can be a low priority.

[0135] In other implementations, when the priority association data includes data on the impact of interruptions to each network packet on the client object, link information of each network packet, and network resource requirement information of the operating system, the client determining the processing priority of network packets in the target application may include:

[0136] If a network packet is a long-lived connection packet (e.g., a heartbeat packet for a long-lived connection) or if the interruption has a significant impact on the client object (e.g., a resource download request packet in a download scenario), then the processing priority of this network packet should be set to the highest priority. If the interruption of a network packet has a relatively large impact on the client object, but the cost of reconnection is low, then the processing priority can be set to high priority. If the interruption of a network packet has a moderate impact on the client object, or the cost of reconnection is relatively low, then the processing priority can be set to medium priority. If the interruption of a network packet has a certain impact on the client object, then the processing priority can be normal priority. If the interruption of a network packet has a very small impact on the client object, then the processing priority should be the lowest priority.

[0137] The following explanation, using a game app as an example, illustrates the process priority for determining network data packets within the target application:

[0138] When a game app is switched to the background, the following factors affect the priority allocation:

[0139] I. Impact on user experience (i.e., the impact of interruptions in various network data packets on client objects).

[0140] When an application switches from the foreground to the background, the interruption of different types of network packets has a very different impact on the user experience. Some network packets have almost no impact on the user experience after being interrupted (i.e., the impact is less than that of the data). For example, interactive information and leaderboard information displayed in the game cannot be perceived by the user when switching to the background because the interface is not visible. Therefore, the corresponding network packets can be interrupted and set to a lower priority (i.e., second priority).

[0141] In some scenarios, users need to wait for the network transmission to complete before they can proceed with the next operation. At this time, users may switch to background operations. In this case, the processing priority of the network data packets blocking the user can be set to high priority (i.e., first priority). For example, if the user is waiting for the game app to complete the download of the resource package, the processing priority of the corresponding download data packets can be set to high priority.

[0142] 2. The cost of rebuilding long links (i.e., the link information of each network data packet).

[0143] The game features various network connections, some short links with low recovery costs after interruption, and others long links that may involve authentication, status data, and other prerequisites, making recovery more costly. Therefore, all other things being equal, considering the cost of resuming communication, long-link network packets have a higher processing priority (i.e., first priority), especially heartbeat packets from long links, which also have a higher priority than regular packets.

[0144] III. Network resource demand (i.e., network resource demand information of the operating system).

[0145] When the system network is congested, under the same conditions, the more background network data packets there are and the more frequently they are sent and received, the lower the corresponding processing priority will be.

[0146] Therefore, the frequency and volume of background network data packets can be reduced, and different processing priorities can be given to different packet volumes so that more network data packets from more modules can be processed, thereby improving the user experience.

[0147] Based on the above factors, network data packets for game apps can be divided into five levels, with L5 being the highest priority and L1 the lowest priority. It should be noted that the five-level division is primarily for controlling implementation complexity; in practice, fewer or more levels can be used.

[0148] In practice, a processing priority can be preset for each network data packet based on the above-mentioned influencing factors, and continuously optimized during the actual operation of the game.

[0149] L1, the lowest priority, has the least impact on user experience, such as various stateless short-link data and auxiliary data in the game.

[0150] L2, normal priority, has some impact on user experience. For example, various leaderboard data displayed in the game cannot be seen by users when switching to the background. Therefore, it is only necessary to re-request when switching back to the foreground, and the impact on the experience is relatively controllable.

[0151] L3, medium priority, consists of data packets that have a relatively minor impact on the user returning to the game or have a relatively low cost for reconnecting, such as network data packets that report the current running status of the game.

[0152] L4, high priority, has a significant impact on users returning to the game. For example, various short links for transmitting core data within the game are also very important, but the cost of reconnecting is low, so the processing priority is set lower than L5.

[0153] L5, the highest priority, includes heartbeat packets from major long-lived connections within the game and resource download request packets in download scenarios. Interruptions to these packets can severely impact the user experience when returning to the game, such as requiring the user to log in again or re-downloading resources.

[0154] It should be noted that in step S109 above, the operating system analyzes the current network status of the operating system in response to the network resource request to obtain the target network resources for the background operation of the target application. This can be achieved in various ways, and no specific limitation is made.

[0155] In one implementation, the current network state is associated with the amount of network packets. Therefore, in step S109, the operating system analyzes its current network state in response to a network resource request to obtain target network resources for the background operation of the target application. This may include:

[0156] The operating system responds to network resource requests by determining the first number of network data packets it can process per unit of time.

[0157] The operating system determines the second amount of network packets required by the foreground application currently running in the foreground and the third amount of network packets required by the operating system itself.

[0158] The operating system determines the number of candidate network packets that can be used by the background application currently running in the background, based on the first network packet volume, the second network packet volume, and the third network packet volume; the background application includes the target application.

[0159] The operating system obtains the historical network data packet volume used by background applications at historical times.

[0160] The operating system allocates network data packet volume to background applications based on historical network data packet volume, thereby obtaining target network resources for the background operation of the target application.

[0161] In this embodiment, when the operating system receives a network resource request sent by the client, the operating system can first determine the current network status of the system and dynamically evaluate the target network resources that the background APP can use. The current network status is associated with the amount of network data packets.

[0162] Optionally, the operating system can respond to network resource requests by determining the first number of network data packets it can process per unit of time. This unit of time can be set according to actual business needs, such as per minute, per second, etc.

[0163] Optionally, the operating system determines the second amount of network data packets required by the foreground application currently running in the foreground and the third amount of network data packets required by the operating system itself to run normally. The foreground application refers to the app that is not currently switched to the background, and the third amount of network data packets required by the operating system refers to the amount of data packets needed for the operating system itself to function properly.

[0164] Optionally, the operating system can calculate the sum of the second and third network packet volumes to obtain a total network packet volume. The operating system then calculates the difference between the first network packet volume and the total network packet volume to obtain a candidate network packet volume that can be used by the currently running background application. In other embodiments, the operating system can also evaluate the influence weights of the first, second, and third network packet volumes on the network state. For example, if the influence weights of the first, second, and third network packet volumes on the network state are weight 1, weight 2, and weight 3, respectively, the operating system can calculate the product of the second network packet volume and weight 2 to obtain a first product, calculate the product of the third network packet volume and weight 3 to obtain a second product, sum the first and second products to obtain a total network packet volume, calculate the product of the first network packet volume and weight 1 to obtain a third product, and calculate the difference between the third product and the total network packet volume to obtain a candidate network packet volume that can be used by the currently running background application. The currently running background application includes the target application.

[0165] Optionally, the operating system can obtain the number of historical network packets used by each background application and the historical network packet volume used by each background application in a historical time period. The operating system can calculate the ratio of the historical network packet volume used by each background application in a historical time period to all network packets, obtaining the percentage of historical network packet volume used by each background application in a historical time period. Then, it can calculate the product of the percentage of historical network packet volume used by each background application in a historical time period and the candidate network packet volume to obtain the number of network packets required for each background application to run in the background. Since the background application includes the target application, it is possible to obtain the number of network packets required for the target application to run in the background.

[0166] For example, if the background applications are application 1, application 2, and application 3, and the historical network packet volume of application 1 is network packet volume 1, the historical network packet volume of application 2 is network packet volume 2, and the historical network packet volume of application 3 is network packet volume 3, then the sum of network packet volume 1, network packet volume 2, and network packet volume 3 can be calculated to obtain the total historical network packet volume. The ratio of network packet volume 1 to the total historical network packet volume is calculated to obtain the first proportion of network packet volume 1. The ratio of network packet volume 2 to the total historical network packet volume is calculated to obtain the second proportion of network packet volume 2. The ratio of network packet volume 3 to the total historical network packet volume is calculated to obtain the third proportion of network packet volume 3. The product of the first proportion and the candidate network packet volume is calculated to obtain the network packet volume required for the background operation of application 1. The product of the second proportion and the candidate network packet volume is calculated to obtain the network packet volume required for the background operation of application 2. The product of the third proportion and the candidate network packet volume is calculated to obtain the network packet volume required for the background operation of application 3.

[0167] Since the candidate network data packet volume used by the background application currently running in the background can be accurately determined based on the first network data packet volume, the second network data packet volume, and the third network data packet volume, and the historical network data packet volume can reflect the historical actual needs of the background application, allocating candidate network data packet volume to the background application based on the historical network data packet volume can improve the accuracy of candidate network data packet volume allocation, thereby improving the accuracy and efficiency of network data packet scheduling.

[0168] In another implementation, if the current network status is associated with bandwidth information, then in step S109 above, the operating system analyzes its current network status in response to a network resource request to obtain target network resources for the background operation of the target application, which may include:

[0169] The operating system responds to network resource requests and determines the initial bandwidth information corresponding to the client.

[0170] The operating system determines the client's second bandwidth information at the current time.

[0171] The operating system determines candidate bandwidth information that can be used by background applications currently running in the background, based on the first bandwidth information and the second bandwidth information; the background applications include the target application.

[0172] The operating system obtains historical bandwidth information used by background applications at historical times.

[0173] The operating system allocates bandwidth information to background applications based on historical bandwidth information, thereby obtaining the target network resources for the background operation of the target application.

[0174] In this embodiment, when the operating system receives a network resource request sent by the client, the operating system can first determine the current network status of the system and dynamically evaluate the target network resources that the background APP can use. This current network status can be associated with bandwidth information.

[0175] Optionally, the operating system may determine the first bandwidth information corresponding to the client in response to a network resource request. This first bandwidth information may be the client's total bandwidth.

[0176] Optionally, the operating system can determine a second bandwidth information for the client at the current time. This second bandwidth information can be used to identify the amount of data passing through the link at the current time.

[0177] Optionally, the operating system can calculate the difference between the first bandwidth information and the second bandwidth information to obtain candidate bandwidth information that can be used by the background application currently running in the background. In other embodiments, the operating system can also evaluate the influence weights of the first bandwidth information and the second bandwidth information on the network state, for example, if the influence weights of the first bandwidth information and the second bandwidth information on the network state are weight 4 and weight 5 respectively, the operating system can calculate the product of the first bandwidth information and weight 4 to obtain a third product, calculate the product of the second bandwidth information and weight 5 to obtain a fourth product, and calculate the difference between the third product and the fourth product to obtain the candidate bandwidth information. The background application currently running in the background includes the target application.

[0178] Optionally, the operating system can obtain the historical bandwidth information used by each background application and the historical bandwidth information used by each background application over a historical period. The operating system can calculate the ratio of the historical bandwidth information used by each background application over a historical period to the total bandwidth information, thus obtaining the proportion of historical bandwidth information used by each background application over a historical period. Then, it can calculate the product of the proportion of historical bandwidth information used by each background application over a historical period and the candidate bandwidth information to obtain the candidate bandwidth information required for each background application to run in the background. Since the background applications include the target application, the bandwidth information required for the target application to run in the background can be obtained.

[0179] For example, if the background applications are application 1, application 2, and application 3, and the historical bandwidth information of application 1 is historical bandwidth information 1, the historical bandwidth information of application 2 is historical bandwidth information 2, and the historical bandwidth information of application 3 is historical bandwidth information 3, then we can calculate the sum of historical bandwidth information 1, historical bandwidth information 2, and historical bandwidth information 3 to obtain the total historical bandwidth information. We can then calculate the ratio of historical bandwidth information 1 to the total historical bandwidth information to obtain the fourth proportion of historical bandwidth information 1. Similarly, we can calculate the ratio of historical bandwidth information 2 to the total historical bandwidth information to obtain the fifth proportion of network data packets 2. Finally, we can calculate the ratio of network data packets 3 to the total historical bandwidth information to obtain the sixth proportion of network data packets 3. Finally, we can calculate the product of the fourth proportion and the total historical bandwidth information to obtain the bandwidth information required for the background operation of application 1.

[0180] Since the candidate bandwidth information used by the background application currently running in the background can be accurately determined based on the first bandwidth information and the second bandwidth information, and the historical bandwidth information can reflect the historical actual needs of the background application, allocating bandwidth information to the background application based on the historical bandwidth information can improve the accuracy of bandwidth allocation, thereby improving the accuracy and efficiency of network packet scheduling.

[0181] It should be noted that when the operating system analyzes the current network status to obtain target network resources, it can consider network packet volume alone, bandwidth information alone, or both simultaneously. When considering both network packet volume and bandwidth information, the packet volume processing and bandwidth processing procedures described above can be executed concurrently.

[0182] Taking game apps as an example, apart from resource download scenarios, most of the time the packet volume is large and the bandwidth is small. Therefore, the bottleneck is usually the packet volume. So for game apps, the target network resources can be determined based on the packet volume.

[0183] In an optional embodiment, the APP development client can also update the preset network scheduling policy stored in the storage module of the server. Figure 5 This is a schematic diagram illustrating a process for updating a preset network scheduling policy according to an exemplary embodiment, such as... Figure 5 As shown, the updated preset network scheduling policy may include:

[0184] S201. The server receives a policy update request; the policy update request carries an updated preset network scheduling policy, which is determined based on the updated scenario type information. The updated scenario type information is obtained by updating the scenario type information represented by the preset mapping information based on the background operation of the target application.

[0185] S203. In response to the policy update request, the server updates the preset network scheduling policy stored in the storage module based on the updated preset network scheduling policy.

[0186] In this embodiment, the APP development client can periodically or irregularly update the preset network scheduling policy in the server's storage module. The APP development client can obtain the background running status of the target application and update the existing scene type information and the processing priority of each network data packet based on this running status, thus obtaining the updated scene type information. The APP development client can send a policy update request to the server, which carries the updated preset network scheduling policy. In response to the policy update request, the server updates the preset network scheduling policy stored in the storage module based on the updated preset network scheduling policy. The updated preset network scheduling policy in the storage module is then distributed to the client for use. Therefore, the scene type information can be updated according to the actual background running status of the target application, allowing the client to use the updated scene type information for network data packet scheduling, thereby improving the scheduling accuracy of network data packets and the user experience.

[0187] It should be noted that in step S1013 above, the client schedules and processes network data packets according to the processing priority of network data packets and the target network resources, which can be achieved in various ways.

[0188] In one implementation, continue as follows Figure 4 As shown, if there are multiple network data packets, then in step S1013 above, the client schedules and processes the network data packets according to their processing priority and target network resources. This may include:

[0189] S10131. If the client determines that the target network resource does not meet the preset network resource conditions, the client schedules network data packets with a processing priority greater than the preset priority threshold, and stops the scheduling operation of network data packets with a processing priority less than or equal to the preset priority threshold or discards network data packets with a processing priority less than or equal to the preset priority threshold.

[0190] S10133. When the client determines that the network resources meet the preset network resource conditions, schedule and process each network data packet.

[0191] In this embodiment, if the client determines that the target network resource meets the preset network resource conditions, the scheduling of each network data packet is carried out normally. If the client determines that the target network resource does not meet the preset network resource conditions, network data packets with a priority greater than the preset priority threshold are prioritized for scheduling and processing. At the same time, the scheduling operation of network data packets with a priority less than or equal to the preset priority threshold is stopped or the network data packets with a priority less than or equal to the preset priority threshold are discarded.

[0192] The preset network resource conditions and preset priority thresholds can be set according to actual business needs, and no specific restrictions are imposed on them.

[0193] Therefore, network data packets can be scheduled according to the priority of the client's network data packets and the amount of target network resources available to the operating system. While ensuring the network usage experience of the front-end APP, it can also maximize the network communication capabilities of the back-end APP, allowing the user experience of the back-end APP to be appropriately improved according to different scenarios.

[0194] In other implementations, the client can also obtain the scheduling status of each network data packet in historical time, and schedule and process each network data packet in the current time according to the historical processing priority and historical network resources in the historical scheduling status of each network data packet.

[0195] In an optional embodiment, the above method may further include:

[0196] When the current network scheduling policy is to suspend network communication, the client suspends the scheduling operation of network data packets.

[0197] In this embodiment, for scheduling strategies that can stop network communication, all network communication in the terminal APP can be directly terminated, thereby ensuring the user experience of the front-end APP.

[0198] The following explanation uses a game app as an example, with the client being the game client and the server being the game server, to illustrate the above data scheduling and processing method:

[0199] 1. When a user launches the game, the corresponding preset network scheduling strategy is obtained from the game server in advance:

[0200] 1. The user starts the game normally.

[0201] 2. Game client requests network scheduling policy. In response to the service startup command, the game client sends a request to the game server to obtain the scheduling policy.

[0202] 3. The game server issues a preset network scheduling policy. In response to the scheduling policy retrieval request, the game server retrieves the preset network scheduling policy from the storage module; the preset network scheduling policy includes network scheduling policies corresponding to different scene type information; the game server sends the preset network scheduling policy to the game client.

[0203] 4. The game client caches the preset network scheduling policy locally. After receiving the preset network scheduling policy from the game server, the game client caches it locally for use when the game app is switched to the background, and also for loading other game logic normally for the user.

[0204] 5. Normal game operation. After the strategy caching is completed in the game client, the user continues with normal game logic.

[0205] Second, on the game server, the game development client can also update the corresponding preset network scheduling strategy:

[0206] 1. The APP client should pre-set network scheduling strategies periodically or irregularly. Based on the actual situation of the game APP running in the background, update the scene type information and the priority of each network data packet, and update the pre-set network scheduling strategy according to the updated scene type information to better improve the user experience.

[0207] 2. The game server stores the updated preset network scheduling policy. The game server receives a policy update request; the policy update request carries the updated preset network scheduling policy, and the game server responds to the policy update request by updating the preset network scheduling policy stored in the storage module based on the updated preset network scheduling policy.

[0208] 3. When the user switches the game app to the background, the game app schedules network data packets within the game app according to the caching strategy mentioned above:

[0209] 1. The user switches the game app from the foreground to the background. In response to the switch command, the game client switches the game app from the foreground to the background and initiates the background network scheduling strategy.

[0210] 2. The game client determines the current scene type information. The game client obtains the identifier information of the current running scene corresponding to the target application and the state information of the client object, and performs scene type analysis on the identifier information of the current running scene and the state information of the client object to obtain the current scene type information.

[0211] 3. The game client determines whether to interrupt network communication based on the current scene type information. The game client retrieves the current network scheduling policy corresponding to the current scene type information from the preset network scheduling policies.

[0212] 4. For scenarios where network communication can be interrupted, the scheduling module directly interrupts all network communication of the game app.

[0213] 5. For scenarios where network communication cannot be interrupted, the game client determines the processing priority of network data packets in the target application.

[0214] 6. The game client obtains target network resources for the background operation of the game app. The game client sends a network resource request to the operating system. In response to the network resource request, the operating system analyzes its current network status to obtain the target network resources (packet volume and bandwidth) for the background operation of the target application. The operating system then sends the target network resources to the client. To improve processing efficiency, this call is made periodically by the game client during background operation (e.g., every 5 seconds). Of course, in some implementations, it can also be called in real time.

[0215] 7. Processing corresponding network data packets. The game client schedules and processes network data packets according to their processing priority and the target network resources: If the game client determines that the target network resources do not meet the preset network resource conditions, it schedules and processes network data packets with a processing priority greater than the preset priority threshold, and stops or discards network data packets with a processing priority less than or equal to the preset priority threshold; if the game client determines that the network resources meet the preset network resource conditions, it schedules and processes each network data packet.

[0216] 8. Determine whether to terminate background processes. Check if the process has been switched to the foreground. If it remains in the background, continue processing the corresponding background network data packets.

[0217] 9. If you switch to running in the foreground, the normal network communication logic will be restored.

[0218] The following explanation uses the client as the execution subject to illustrate the above data scheduling and processing method:

[0219] Figure 6 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 3 ,like Figure 6 As shown, the data scheduling and processing method may include:

[0220] S301. In response to a switching command, switch the target application from the foreground to the background.

[0221] S303. Obtain the identification information of the current running scenario and the state information of the client object corresponding to the target application, and perform scenario type analysis on the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information.

[0222] S305. Obtain the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy.

[0223] S307. If the current network scheduling policy is a network communication maintenance policy, determine the processing priority of network data packets in the target application, and send a network resource request to the operating system so that the operating system can respond to the network resource request by analyzing the current network status of the operating system and obtaining target network resources for the background operation of the target application.

[0224] S309. Receive the target network resources sent by the operating system.

[0225] S3011. The network data packets are scheduled and processed according to the processing priority of the network data packets and the target network resources.

[0226] In an optional embodiment, the step of performing scene type analysis on the identifier information of the current running scene and the state information of the client object to obtain the current scene type information includes:

[0227] Obtain preset mapping information; the preset mapping information represents the mapping relationship between the identification information of the running scenario, the status information of the client object, and the type identification information of the scenario type information.

[0228] Based on the preset mapping information, target type identification information corresponding to the identification information of the current running scenario and the status information of the client object is determined, and the scene type information corresponding to the target type identification information is determined as the current scene type information.

[0229] In an optional embodiment, before switching the target application from foreground to background operation in response to a switching instruction, the method further includes:

[0230] In response to a service startup command, a scheduling policy retrieval request is sent to the server, so that the server responds to the scheduling policy retrieval request and retrieves the preset network scheduling policy from the storage module; the preset network scheduling policy includes network scheduling policies corresponding to different scenario type information;

[0231] Receive the preset network scheduling strategy sent by the server;

[0232] The preset network scheduling strategy is cached;

[0233] The step of obtaining the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy includes:

[0234] Obtain the current network scheduling strategy corresponding to the current scenario type information from the cached preset network scheduling strategy.

[0235] In an optional embodiment, the number of network packets is multiple, and determining the processing priority of network packets in the target application includes:

[0236] Obtain priority-related data; the priority-related data includes at least one of the following: the impact of interruptions of each network data packet on the client object, the link information of each network data packet, and the network resource requirement information of the operating system.

[0237] The priority of each network data packet is analyzed based on the priority association data to obtain the processing priority of each network data packet.

[0238] In an optional embodiment, the step of analyzing the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet includes:

[0239] When the priority association data includes the link information of each network data packet, the processing priority of network data packets with long link information is set to the first priority, and the processing priority of network data packets with short link information is set to the second priority.

[0240] The first priority is greater than the second priority.

[0241] In an optional embodiment, the step of analyzing the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet includes:

[0242] When the priority-related data includes network resource requirement information of the operating system and the network resource requirement information is greater than a preset resource requirement threshold, the processing priority of network data packets that meet the first preset condition is set to the first priority, and the processing priority of network data packets that meet the second preset condition is set to the second priority.

[0243] The first preset condition is at least one of packet volume being less than or equal to a preset packet volume threshold and transmission frequency being less than or equal to a preset transmission threshold. The second preset condition is at least one of packet volume being greater than the preset packet volume threshold and transmission frequency being greater than the preset transmission threshold. The first priority is greater than the second priority.

[0244] In an optional embodiment, the step of analyzing the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet includes:

[0245] When the priority-related data includes the impact data of the interruption of each network data packet on the client object, the processing priority of network data packets whose impact data is greater than a preset impact threshold is set to the first priority, and the processing priority of network data packets whose impact data is less than or equal to the preset impact threshold is set to the second priority.

[0246] The first priority is greater than the second priority.

[0247] In an optional embodiment, the number of network data packets is multiple, and the scheduling processing of the network data packets according to the processing priority of the network data packets and the target network resources includes:

[0248] If it is determined that the target network resource does not meet the preset network resource conditions, network data packets with a processing priority greater than the preset priority threshold are scheduled for processing, and the scheduling operation of network data packets with a processing priority less than or equal to the preset priority threshold is stopped, or network data packets with a processing priority less than or equal to the preset priority threshold are discarded.

[0249] If the network resources meet the preset network resource conditions, the network data packets are scheduled and processed.

[0250] In an optional embodiment, the method may further include:

[0251] If the current network scheduling policy is to suspend network communication, the scheduling operation for the network data packets shall be suspended.

[0252] The following explanation uses the operating system as the execution entity to illustrate the above data scheduling and processing method:

[0253] Figure 7 This is a flowchart illustrating a data scheduling and processing method according to an exemplary embodiment. Figure 4 ,like Figure 7 As shown, the data scheduling and processing method may include:

[0254] S401. When the current network scheduling strategy is to maintain network communication, receive a network resource request sent by the client; the current network scheduling strategy is the network scheduling strategy obtained by the client from the preset network scheduling strategy and corresponding to the current scene type information; the current scene type information is obtained by analyzing the identification information of the current running scene and the state information of the client object when the client responds to the switching instruction and switches the target application from the foreground to the background.

[0255] S403. In response to the network resource request, analyze the current network status of the local operating system to obtain the target network resources for the background operation of the target application.

[0256] S405. The target network resource is sent to the client so that the client schedules the network data packets according to the processing priority of the network data packets in the target application and the target network resource; the processing priority of the network data packets is determined by the client.

[0257] In an optional embodiment, the current network state is associated with network packet volume, and the analysis of the current network state of the local operating system in response to the network resource request to obtain target network resources for the background operation of the target application includes:

[0258] In response to the network resource request, determine the first number of network data packets that can be processed per unit time;

[0259] Determine the second amount of network packets required by the foreground application currently running in the foreground and the third amount of network packets required by the operating system at runtime;

[0260] Based on the first network data packet volume, the second network data packet volume, and the third network data packet volume, a candidate network data packet volume that can be used by a background application currently running in the background is determined; the background application includes the target application.

[0261] Obtain the historical network data packet volume used by the background application over a historical period;

[0262] Based on the historical network data packet volume, the candidate network data packet volume is allocated to the background application to obtain the target network resources for the background operation of the target application.

[0263] In an optional embodiment, the current network state is associated with bandwidth information, and the analysis of the current network state of the local operating system in response to the network resource request to obtain the target network resources for the background operation of the target application includes:

[0264] In response to the network resource request, the first bandwidth information corresponding to the client is determined;

[0265] Determine the client's second bandwidth information at the current time;

[0266] Candidate bandwidth information that can be used by a background application currently running in the background is determined based on the first bandwidth information and the second bandwidth information; the background application includes the target application;

[0267] Obtain the historical bandwidth information used by the background application at historical times;

[0268] Based on the historical bandwidth information, bandwidth information is allocated to the background application to obtain the target network resources for the background operation of the target application.

[0269] Figure 8 This is a block diagram of a data scheduling processing apparatus according to an exemplary embodiment. Figure 1 ,like Figure 8 As shown, the data scheduling and processing device may include:

[0270] The switching response module 501 is used to switch the target application from the foreground to the background in response to a switching command;

[0271] The scenario type analysis module 503 is used to obtain the identification information of the current running scenario and the state information of the client object corresponding to the target application, and to perform scenario type analysis on the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information;

[0272] The current network scheduling strategy acquisition module 505 is used to acquire the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy;

[0273] The priority processing and request sending module 507 is used to determine the processing priority of network data packets in the target application when the current network scheduling policy is a network communication maintenance scheduling policy, and send a network resource request to the operating system so that the operating system can respond to the network resource request, analyze the current network status of the operating system, and obtain the target network resources for the background operation of the target application.

[0274] The network resource receiving module 509 is used to receive the target network resource sent by the operating system;

[0275] The scheduling module 5011 is used to schedule the network data packets according to the processing priority of the network data packets and the target network resources.

[0276] In an optional embodiment, the scene type analysis module includes:

[0277] The mapping information acquisition unit is used to acquire preset mapping information; the preset mapping information represents the mapping relationship between the identification information of the running scenario, the status information of the client object, and the type identification information of the scenario type information.

[0278] The scene type information generation unit is used to determine, based on the preset mapping information, the target type identifier information corresponding to the identifier information of the current running scene and the state information of the client object, and determine the scene type information corresponding to the target type identifier information as the current scene type information.

[0279] In an optional embodiment, the apparatus further includes:

[0280] The startup command response module is used to send a scheduling policy retrieval request to the server in response to a service startup command, so that the server responds to the scheduling policy retrieval request and retrieves the preset network scheduling policy from the storage module; the preset network scheduling policy includes network scheduling policies corresponding to different scenario type information.

[0281] A preset network scheduling policy receiving module is used to receive the preset network scheduling policy sent by the server.

[0282] The caching module is used to cache the preset network scheduling strategy.

[0283] Accordingly, the current network scheduling policy acquisition module is further configured to acquire the current network scheduling policy corresponding to the current scenario type information from the cached preset network scheduling policies.

[0284] In an optional embodiment, the number of network data packets is multiple, and the priority processing and request sending module includes:

[0285] The associated data acquisition unit is used to acquire priority associated data; the priority associated data includes at least one of the following: the impact data of the interruption of each network data packet on the client object, the link information of each network data packet, and the network resource requirement information of the operating system.

[0286] The priority analysis unit is used to analyze the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet.

[0287] In an optional embodiment, the priority analysis unit includes:

[0288] The first analysis subunit is configured to, when the priority association data includes the link information of each network data packet, set the processing priority of network data packets with long link information to the first priority and the processing priority of network data packets with short link information to the second priority.

[0289] The first priority is greater than the second priority.

[0290] In an optional embodiment, the priority analysis unit includes:

[0291] The second analysis subunit is used to set the processing priority of network data packets that meet the first preset condition as the first priority and the processing priority of network data packets that meet the second preset condition as the second priority when the priority association data includes network resource demand information of the operating system and the network resource demand information is greater than a preset resource demand threshold.

[0292] The first preset condition is at least one of packet volume being less than or equal to a preset packet volume threshold and transmission frequency being less than or equal to a preset transmission threshold. The second preset condition is at least one of packet volume being greater than the preset packet volume threshold and transmission frequency being greater than the preset transmission threshold. The first priority is greater than the second priority.

[0293] In an optional embodiment, the priority analysis unit includes:

[0294] The third analysis subunit is used to, when the priority association data includes the impact data of the interruption of each network data packet on the client object, set the processing priority of network data packets whose impact data is greater than a preset impact threshold as the first priority, and set the processing priority of network data packets whose impact data is less than or equal to the preset impact threshold as the second priority.

[0295] The first priority is greater than the second priority.

[0296] In an optional embodiment, the number of network data packets is multiple, and the scheduling module includes:

[0297] The first scheduling unit is used to schedule network data packets with a processing priority greater than a preset priority threshold when it is determined that the target network resources do not meet the preset network resource conditions, and to stop the scheduling operation of network data packets with a processing priority less than or equal to the preset priority threshold, or to discard network data packets with a processing priority less than or equal to the preset priority threshold.

[0298] The second scheduling unit is used to schedule and process each network data packet when it is determined that the network resources meet the preset network resource conditions.

[0299] In an optional embodiment, the apparatus further includes:

[0300] The abort module is used to abort the scheduling operation of the network data packets when the current network scheduling policy is a scheduling policy that aborts network communication.

[0301] Figure 9 This is a block diagram of a data scheduling processing apparatus according to an exemplary embodiment. Figure 2 ,like Figure 9 As shown, the data scheduling and processing device may include:

[0302] The request receiving module 601 is used to receive network resource requests sent by the client when the current network scheduling strategy is a scheduling strategy to maintain network communication; the current network scheduling strategy is a network scheduling strategy obtained by the client from a preset network scheduling strategy that corresponds to the current scenario type information; the current scenario type information is obtained by analyzing the identification information of the current running scenario and the state information of the client object when the client responds to the switching instruction and switches the target application from the foreground to the background.

[0303] The network resource generation module 603 is used to analyze the current network status of the local operating system in response to the network resource request, and obtain the target network resources for the background operation of the target application.

[0304] The network resource sending module 605 is used to send the target network resource to the client, so that the client can schedule the network data packet according to the processing priority of the network data packet in the target application and the target network resource; the processing priority of the network data packet is determined by the client.

[0305] In an optional embodiment, the current network state is associated with the network data packet volume, and the network resource generation module includes:

[0306] The first network data packet volume determination unit is used to determine the first network data packet volume that can be processed per unit time in response to the network resource request.

[0307] The second and third network data volume determination units are used to determine the second network data packet volume required by the foreground application currently running in the foreground and the third network data packet volume required by the operating system during runtime.

[0308] The candidate network data packet volume determination unit is used to determine, based on the first network data packet volume, the second network data packet volume, and the third network data packet volume, a candidate network data packet volume that can be used by a background application currently running in the background; the background application includes the target application.

[0309] The historical network data packet volume acquisition unit is used to acquire the historical network data packet volume used by the background application in historical time periods.

[0310] The target network resource generation unit is used to allocate the candidate network data packet volume to the background application based on the historical network data packet volume, so as to obtain the target network resources for the background operation of the target application.

[0311] In an optional embodiment, the current network state is associated with bandwidth information, and the network resource generation module includes:

[0312] The first bandwidth information determination unit is used to determine the first bandwidth information corresponding to the client in response to the network resource request.

[0313] The second bandwidth information determination unit is used to determine the second bandwidth information of the client at the current time.

[0314] A candidate bandwidth information determination unit is used to determine candidate bandwidth information that can be used by a background application currently running in the background, based on the first bandwidth information and the second bandwidth information; the background application includes the target application.

[0315] The historical bandwidth information acquisition unit is used to acquire historical bandwidth information used by the background application in historical time periods.

[0316] The target network resource generation unit is used to allocate bandwidth information to the background application based on the historical bandwidth information, thereby obtaining target network resources for the background operation of the target application.

[0317] It should be noted that the device embodiments provided in this application are based on the same inventive concept as the method embodiments described above.

[0318] This application also provides an electronic device for data scheduling and processing, which includes a processor and a memory. The memory stores at least one instruction or at least one program. The processor loads and executes the at least one instruction or at least one program to implement the data scheduling and processing method provided in any of the above embodiments.

[0319] Embodiments of this application also provide a computer-readable storage medium that can be disposed in a terminal to store at least one instruction or at least one program for implementing a data scheduling processing method in the method embodiments. The at least one instruction or at least one program is loaded and executed by a processor to implement the data scheduling processing method provided in the above method embodiments.

[0320] Optionally, in the embodiments of this specification, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0321] The memory described in this specification can be used to store software programs and modules. The processor executes various functional applications and data scheduling processes by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.

[0322] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data scheduling processing method provided in the above-described method embodiments.

[0323] The data scheduling and processing method provided in this application can be executed in a terminal, computer terminal, server, or similar computing device. Taking running on a terminal as an example, Figure 10 This is a hardware structure block diagram of a terminal provided according to an exemplary embodiment. For example... Figure 10As shown, the server 700 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 710 (CPUs 710 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 730 for storing data, and one or more storage media 720 (e.g., one or more mass storage devices) for storing application programs 723 or data 722. The memory 730 and storage media 720 may be temporary or persistent storage. The program stored in the storage media 720 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 710 may be configured to communicate with the storage media 720 and execute the series of instruction operations stored in the storage media 720 on the server 700. Server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input / output interfaces 740, and / or one or more operating systems 721, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0324] The input / output interface 740 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 700. In one example, the input / output interface 740 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 740 may be a radio frequency (RF) module for wireless communication with the Internet.

[0325] Those skilled in the art will understand that Figure 10 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 700 may also include... Figure 10 The more or fewer components shown, or having the same Figure 10 The different configurations shown.

[0326] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0327] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and server embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0328] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0329] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data scheduling and processing method, characterized in that, The method includes: In response to a switching command, switch the target application from the foreground to the background. Obtain the identification information of the current running scenario and the state information of the client object corresponding to the target application, and perform scenario type analysis on the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information; Obtain the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy; When the current network scheduling strategy is to maintain network communication, priority-related data is obtained. This priority-related data includes at least one of the following: the impact of interruptions on client objects of various network data packets in the target application, link information of various network data packets, and network resource requirements of the operating system. The priority of each network data packet is analyzed based on the priority-related data to obtain its processing priority. This analysis includes: when the priority-related data includes link information of various network data packets, setting the processing priority of network data packets with long links as the first priority and setting the processing priority of network data packets with short links as the second priority. The first priority is greater than the second priority, and a network resource request is sent to the operating system, causing the operating system to analyze its current network status in response to the request and obtain target network resources for the background operation of the target application. Receive the target network resources sent by the operating system; Each network data packet is scheduled and processed according to its processing priority and the target network resources.

2. The method according to claim 1, characterized in that, The process of analyzing the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information includes: Obtain preset mapping information; the preset mapping information represents the mapping relationship between the identification information of the running scenario, the state information of the client object, and the type identification information of the scenario type information; Based on the preset mapping information, target type identification information corresponding to the identification information of the current running scenario and the state information of the client object is determined, and the scene type information corresponding to the target type identification information is determined as the current scene type information.

3. The method according to claim 1, characterized in that, Prior to switching the target application from foreground to background operation in response to a switching instruction, the method further includes: In response to a service startup command, a scheduling policy retrieval request is sent to the server, so that the server responds to the scheduling policy retrieval request and retrieves the preset network scheduling policy from the storage module; the preset network scheduling policy includes network scheduling policies corresponding to different scenario type information; Receive the preset network scheduling strategy sent by the server; The preset network scheduling strategy is cached; The step of obtaining the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy includes: Obtain the current network scheduling strategy corresponding to the current scenario type information from the cached preset network scheduling strategy.

4. The method according to claim 1, characterized in that, The step of analyzing the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet also includes: When the priority-related data includes network resource requirement information of the operating system and the network resource requirement information is greater than a preset resource requirement threshold, the processing priority of network data packets that meet the first preset condition is set to the first priority, and the processing priority of network data packets that meet the second preset condition is set to the second priority. The first preset condition is at least one of packet volume being less than or equal to a preset packet volume threshold and transmission frequency being less than or equal to a preset transmission threshold. The second preset condition is at least one of packet volume being greater than the preset packet volume threshold and transmission frequency being greater than the preset transmission threshold. The first priority is greater than the second priority.

5. The method according to claim 1, characterized in that, The step of analyzing the priority of each network data packet based on the priority association data to obtain the processing priority of each network data packet also includes: When the priority-related data includes the impact data of the interruption of each network data packet on the client object, the processing priority of network data packets whose impact data is greater than a preset impact threshold is set to the first priority, and the processing priority of network data packets whose impact data is less than or equal to the preset impact threshold is set to the second priority. The first priority is greater than the second priority.

6. The method according to any one of claims 1 to 5, characterized in that, The step of scheduling and processing each network data packet according to its processing priority and the target network resources includes: If it is determined that the target network resource does not meet the preset network resource conditions, network data packets with a processing priority greater than the preset priority threshold are scheduled for processing, and the scheduling operation of network data packets with a processing priority less than or equal to the preset priority threshold is stopped, or network data packets with a processing priority less than or equal to the preset priority threshold are discarded. If the network resources meet the preset network resource conditions, the network data packets are scheduled and processed.

7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: If the current network scheduling policy is to suspend network communication, the scheduling operation for each network data packet is suspended.

8. A data scheduling and processing method, characterized in that, The method includes: When the current network scheduling strategy is to maintain network communication, the system receives network resource requests sent by the client. The current network scheduling strategy is the network scheduling strategy obtained by the client from the preset network scheduling strategy and corresponds to the current scenario type information. The current scenario type information is obtained by analyzing the current running scenario identification information and the client object status information when the client responds to the switching instruction and switches the target application from the foreground to the background. In response to the network resource request, the current network status of the local operating system is analyzed to obtain the target network resources for the background operation of the target application; The target network resource is sent to the client so that the client can schedule and process the network data packets according to the processing priority of each network data packet in the target application and the target network resource. The processing priority of each network data packet is determined by the client by analyzing the priority of each network data packet in the target application based on priority association data. The priority association data includes at least one of the following: the impact data of each network data packet interruption on the client object, the link information of each network data packet, and the network resource requirement information of the operating system. When the priority association data includes the link information of each network data packet, the processing priority of network data packets with long link information is the first priority, and the processing priority of network data packets with short link information is the second priority, wherein the first priority is greater than the second priority.

9. The method according to claim 8, characterized in that, The current network state is associated with the network data packet volume. The analysis of the current network state of the local operating system in response to the network resource request to obtain the target network resources for the background operation of the target application includes: In response to the network resource request, determine the first number of network data packets that can be processed per unit time; Determine the second amount of network packets required by the foreground application currently running in the foreground and the third amount of network packets required by the operating system at runtime; Based on the first network data packet volume, the second network data packet volume, and the third network data packet volume, a candidate network data packet volume that can be used by a background application currently running in the background is determined; the background application includes the target application. Obtain the historical network data packet volume used by the background application over a historical period; Based on the historical network data packet volume, the candidate network data packet volume is allocated to the background application to obtain the target network resources for the background operation of the target application.

10. The method according to claim 8, characterized in that, The current network status is associated with bandwidth information. The analysis of the current network status of the local operating system in response to the network resource request to obtain the target network resources for the background operation of the target application includes: In response to the network resource request, the first bandwidth information corresponding to the client is determined; Determine the client's second bandwidth information at the current time; Candidate bandwidth information that can be used by a background application currently running in the background is determined based on the first bandwidth information and the second bandwidth information; the background application includes the target application; Obtain the historical bandwidth information used by the background application at historical times; Based on the historical bandwidth information, bandwidth information is allocated to the background application to obtain the target network resources for the background operation of the target application.

11. A data scheduling and processing apparatus, characterized in that, The device includes: The switching response module is used to switch the target application from the foreground to the background in response to a switching command; The scenario type analysis module is used to obtain the identification information of the current running scenario and the state information of the client object corresponding to the target application, and to perform scenario type analysis on the identification information of the current running scenario and the state information of the client object to obtain the current scenario type information. The current network scheduling strategy acquisition module is used to acquire the current network scheduling strategy corresponding to the current scenario type information from the preset network scheduling strategy; A priority processing and request sending module is configured to determine the processing priority of network packets in the target application when the current network scheduling policy is a network communication maintenance policy, and send a network resource request to the operating system so that the operating system analyzes the current network status of the operating system in response to the network resource request to obtain target network resources for the background operation of the target application; the number of network packets is multiple, and the priority processing and request sending module includes: a correlation data acquisition unit, configured to acquire priority correlation data; the priority correlation data includes at least one of the following: the impact data of interruption of each network packet on the client object, the link information of each network packet, and the network resource demand information of the operating system; a priority analysis unit, configured to analyze the priority of each network packet according to the priority correlation data to obtain the processing priority of each network packet; the priority analysis unit includes: a first analysis subunit, configured to, when the priority correlation data includes the link information of each network packet, set the processing priority of network packets with long link information as the first priority and set the processing priority of network packets with short link information as the second priority; the first priority is greater than the second priority; A network resource receiving module is used to receive the target network resource sent by the operating system; The scheduling module is used to schedule and process each network data packet according to its processing priority and the target network resources.

12. The apparatus according to claim 11, characterized in that, The scenario type analysis module includes: A mapping information acquisition unit is used to acquire preset mapping information; the preset mapping information represents the mapping relationship between the identification information of the running scenario, the state information of the client object, and the type identification information of the scenario type information. The scene type information generation unit is used to determine, based on the preset mapping information, the target type identifier information corresponding to the identifier information of the current running scene and the state information of the client object, and determine the scene type information corresponding to the target type identifier information as the current scene type information.

13. The apparatus according to claim 11, characterized in that, The device further includes: A startup command response module is used to send a scheduling policy retrieval request to the server in response to a service startup command, so that the server responds to the scheduling policy retrieval request and retrieves the preset network scheduling policy from the storage module; the preset network scheduling policy includes network scheduling policies corresponding to different scenario type information; A preset network scheduling policy receiving module is used to receive the preset network scheduling policy sent by the server; A caching module is used to cache the preset network scheduling strategy; The current network scheduling policy acquisition module is also used for: Obtain the current network scheduling strategy corresponding to the current scenario type information from the cached preset network scheduling strategy.

14. The apparatus according to claim 11, characterized in that, The priority analysis unit further includes: The second analysis subunit is used to set the processing priority of network data packets that meet the first preset condition as the first priority and the processing priority of network data packets that meet the second preset condition as the second priority when the priority association data includes network resource demand information of the operating system and the network resource demand information is greater than a preset resource demand threshold. The first preset condition is at least one of packet volume being less than or equal to a preset packet volume threshold and transmission frequency being less than or equal to a preset transmission threshold. The second preset condition is at least one of packet volume being greater than the preset packet volume threshold and transmission frequency being greater than the preset transmission threshold. The first priority is greater than the second priority.

15. The apparatus according to claim 11, characterized in that, The priority analysis unit further includes: The third analysis subunit is used to, when the priority association data includes the impact data of the interruption of each network data packet on the client object, set the processing priority of network data packets whose impact data is greater than a preset impact threshold as the first priority, and set the processing priority of network data packets whose impact data is less than or equal to the preset impact threshold as the second priority. The first priority is greater than the second priority.

16. The apparatus according to any one of claims 11 to 15, characterized in that, The number of network data packets is multiple, and the scheduling module includes: The first scheduling unit is used to schedule network data packets with a processing priority greater than a preset priority threshold when it is determined that the target network resources do not meet the preset network resource conditions, and to stop the scheduling operation of network data packets with a processing priority less than or equal to the preset priority threshold, or to discard network data packets with a processing priority less than or equal to the preset priority threshold. The second scheduling unit is used to schedule and process each network data packet when it is determined that the network resources meet the preset network resource conditions.

17. The apparatus according to any one of claims 11 to 15, characterized in that, The device further includes: The abort module is used to abort the scheduling operation of each network data packet when the current network scheduling policy is a scheduling policy that aborts network communication.

18. A data scheduling and processing apparatus, characterized in that, The device includes: The request receiving module is used to receive network resource requests sent by the client when the current network scheduling strategy is a network communication maintenance strategy. The current network scheduling strategy is a network scheduling strategy obtained by the client from a preset network scheduling strategy that corresponds to the current scenario type information. The current scenario type information is obtained by analyzing the current running scenario's identifier information and the client object's state information when the client responds to a switching instruction and switches the target application from the foreground to the background. The network resource generation module is used to analyze the current network status of the local operating system in response to the network resource request, and obtain the target network resources for the background operation of the target application. A network resource sending module is used to send the target network resource to the client, so that the client can schedule and process the network data packets according to the processing priority of each network data packet in the target application and the target network resource. The processing priority of each network data packet is determined by the client by analyzing the priority of each network data packet in the target application based on priority association data. The priority association data includes at least one of the following: the impact data of each network data packet interruption on the client object, the link information of each network data packet, and the network resource requirement information of the operating system. When the priority association data includes the link information of each network data packet, the processing priority of network data packets with long link information is the first priority, and the processing priority of network data packets with short link information is the second priority, wherein the first priority is greater than the second priority.

19. The apparatus according to claim 18, characterized in that, The network resource generation module includes: The first network data packet volume determination unit is used to determine the first network data packet volume that can be processed per unit time in response to the network resource request. The second and third network data volume determination units are used to determine the second network data packet volume required by the foreground application currently running in the foreground and the third network data packet volume required by the operating system during runtime. The candidate network packet volume determination unit is configured to determine, based on the first network packet volume, the second network packet volume, and the third network packet volume, a candidate network packet volume that can be used by a background application currently running in the background; the background application includes the target application; The historical network data packet volume acquisition unit is used to acquire the historical network data packet volume used by the background application in a historical time period; The target network resource generation unit is used to allocate the candidate network data packet volume to the background application based on the historical network data packet volume, so as to obtain the target network resources for the background operation of the target application.

20. The apparatus according to claim 18, characterized in that, The current network status is associated with bandwidth information, and the network resource generation module includes: The first bandwidth information determining unit is used to determine the first bandwidth information corresponding to the client in response to the network resource request; The second bandwidth information determination unit is used to determine the second bandwidth information of the client at the current time. A candidate bandwidth information determination unit is configured to determine candidate bandwidth information that can be used by a background application currently running in the background, based on the first bandwidth information and the second bandwidth information; the background application includes the target application; The historical bandwidth information acquisition unit is used to acquire historical bandwidth information used by the background application in historical time. The target network resource generation unit is used to allocate bandwidth information to the background application based on the historical bandwidth information, thereby obtaining target network resources for the background operation of the target application.

21. An electronic device for data scheduling and processing, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executed as described in any one of claims 1 to 7 or 8 to 10.

22. A computer-readable storage medium, characterized in that, The computer-readable storage medium may be disposed in a terminal to store at least one instruction or at least one program for implementing a data scheduling processing method in the method embodiment, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the data scheduling processing method as described in any one of claims 1 to 7 or 8 to 10.

Citation Information

Patent Citations

  • Resource allocation method and related products

    CN107483725A

  • Application program safe switching method and device, equipment and storage medium

    CN113806026A