Data transmission scheduling method and device

By adjusting the data transmission rate and data transmission order in the electronic device system core, the problem of background applications occupying communication resources affecting the performance of front-end applications is solved, achieving a smoother user experience and normal operation of background applications.

CN119155253APending Publication Date: 2024-12-17LENOVO (BEIJING) LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411392040.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When the electronic device is running, network activities of the backend application occupy communication resources, causing the data transmission rate of the interactive application to be reduced, resulting in high latency, picture stuttering and frame drops, affecting the user experience.

Method used

By adjusting the data transmission rate in the electronic device system core, the data transmission of the foreground application is scheduled based on the delay information of the first service, and the data transmission rate of the backend application is reduced or increased, so as to ensure the response speed of the foreground application and send data The data transmission order of the network communication device is controlled based on the scheduling priority.

Benefits of technology

It effectively reduces the delay and lag of front-end applications, improves the user experience, and ensures the normal operation of back-end applications, avoiding the negative impact of data transmission scheduling on user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155253A_ABST
    Figure CN119155253A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission scheduling method and device, and the method comprises the steps: adjusting the data transmission rate for a second service in a system kernel based on the time delay information of the first service in response to a data transmission scheduling request for the first service and the second service which are operated by electronic equipment, the first service and the second service share the same network communication equipment of the electronic equipment to perform data transmission with the corresponding external equipment, and the scheduling priority of the second service is lower than the scheduling priority of the first service, so that the data transmission rate is adjusted through the system kernel based on the adjusted data transmission rate; and controlling the network communication equipment to receive respective response data for the first service and the second service, and sending the response data to the first service and the second service through the system kernel based on the respective scheduling priorities of the first service and the second service in a process of responding to respective data sending requests of the first service and the second service. And controlling the network communication equipment to sequentially send request sending data from the services belonging to the corresponding scheduling priorities so as to change the time delay information of the first service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and more specifically to a data transmission scheduling method and device. Background Art

[0002] While an interactive application such as a game is running in the foreground of an electronic device, if the application running in the background performs network activities such as uploading / downloading large amounts of data, the data transmission rate of the interactive application will be affected due to its occupation of large communication resources, resulting in high latency, screen freezes, frame losses and other problems in the interactive application, reducing the user experience. Summary of the invention

[0003] In view of the above problems, this application provides the following solutions:

[0004] A first aspect of the present application provides a data transmission scheduling method, the method comprising:

[0005] In response to a data transmission scheduling request for a first service and a second service running on an electronic device, adjusting the data transmission rate for the second service in the system kernel of the electronic device based on the latency information of the first service; wherein the second service refers to at least one type of service whose scheduling priority is lower than the scheduling priority of the first service, and the first service and the second service share the same network communication device of the electronic device to perform data transmission with the corresponding external device;

[0006] Controlling the network communication device to receive response data for the first service and the second service respectively based on the adjusted data transmission rate through the system kernel; the response data comes from the external device corresponding to the service;

[0007] In response to the data transmission requests of the first service and the second service respectively, the system kernel controls the network communication device to sequentially transmit the requested transmission data from the services corresponding to the scheduling priorities based on the scheduling priorities of the first service and the second service respectively;

[0008] The delay information of the first service can be changed based on the sending control of the request to send data of the first service and the receiving control of the corresponding response data.

[0009] In a possible implementation, the responding to the data transmission scheduling request for the first service and the second service running on the electronic device includes:

[0010] Acquire time delay information of a first service run by the electronic device;

[0011] If the delay information meets the data transmission scheduling condition for the first service, it is determined that the electronic device is running a second service with a scheduling priority lower than the scheduling priority of the first service, and a data transmission scheduling request for the first service and the second service is responded to.

[0012] In a possible implementation, adjusting the data transmission rate for the second service in the electronic device system kernel based on the delay information of the first service includes:

[0013] Querying the delay level to which the delay information of the first service belongs, and determining a target limit rate configured for the delay level; different delay levels correspond to different configured delay information ranges and limit rates;

[0014] The data transmission rate for the second service in the electronic device system kernel is adjusted to the target limit rate.

[0015] In a possible implementation, adjusting the data transmission rate for the second service in the electronic device system kernel based on the delay information of the first service includes:

[0016] If the delay information of the first service is greater than a first delay threshold, based on the delay information of the first service, the data transmission rate for the second service in the system kernel of the electronic device is reduced, and the reduced data transmission rate is greater than or equal to a minimum data transmission rate at which the network communication device can successfully receive the response data of the second service;

[0017] If the delay information of the first service is less than a second delay threshold, the data transmission rate for the second service in the electronic device system kernel is increased based on the delay information of the first service, and the second delay threshold is less than the first delay threshold.

[0018] In a possible implementation, controlling the network communication device to receive response data for each of the first service and the second service based on the adjusted data transmission rate by the system kernel includes:

[0019] Scheduling, by the system kernel based on the adjusted data transmission rate, data receiving resources of the network communication device for each of the first service and the second service;

[0020] Control the network communication device to receive response data for the first service using the first data receiving resource scheduled for the first service, and to receive response data for the second service using the second data receiving resource scheduled for the second service;

[0021] Wherein, in a case where the data transmission rate for the second service in the system kernel is reduced, the first data receiving resource is greater than the second data receiving resource.

[0022] In a possible implementation, the acquiring delay information of a first service run by the electronic device includes:

[0023] In response to a latency acquisition request for a first service running on an electronic device, receiving a communication message sent by a system kernel of the electronic device; the communication message includes latency information of the first service determined by the system kernel, the latency information being determined based on a sending time of requesting data to be sent for the first service and a receiving time of the corresponding response data;

[0024] Parse the communication message to obtain current delay information of the first service.

[0025] In a possible implementation, controlling the network communication device to sequentially send request-to-send data from services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service by the system kernel includes:

[0026] Writing the request sending data of the corresponding service into the data sending queue of the scheduling priority to which the service belongs through the system kernel; different scheduling priorities correspond to different data sending queues;

[0027] The system kernel controls the network communication device to sequentially send each of the request-to-send data in the corresponding data sending queue according to the scheduling priorities of the different data sending queues.

[0028] In a possible implementation, writing the request-sending data of the corresponding service into the data sending queue of the scheduling priority to which the service belongs through the system kernel includes:

[0029] Reading, by the system kernel, a current field value of a service type field in the request-to-send data, and determining a data sending queue to which the current field value is mapped;

[0030] If the data sending queue mapped thereto is inconsistent with the scheduling priority of the service for sending the data corresponding to the request to send the data, adjusting the current field value of the service type field for the service in the system kernel according to the field values ​​of the service type corresponding to the scheduling priority of the service, so that the adjusted field value is mapped to the data sending queue corresponding to the scheduling priority of the service;

[0031] If the data sending queue mapped thereto is consistent with the scheduling priority of the service for sending the data corresponding to the request to send the data, the request to send the data is written into the data sending queue mapped thereto by the current field value.

[0032] In a possible implementation, the method further includes at least one of the following:

[0033] In response to a scheduling priority adjustment request for any service, adjusting the original field value of the service type field for the service in the system kernel using the respective field values ​​of the service type field corresponding to the scheduling priority after adjustment requested by the service, so as to map the adjusted field value to the data processing queue corresponding to the scheduling priority after adjustment requested;

[0034] If it is determined that the data transmission resources of the network communication device meet the data transmission requests of the first service and the second service respectively, controlling the network communication device through the system kernel to simultaneously transmit the requested data from the first service and the second service respectively;

[0035] If it is determined that the data sending resources of the network communication device do not meet the data sending requests of the first service and the second service, execute the step of controlling the network communication device to sequentially send requested data from the services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service through the system kernel.

[0036] A second aspect of the present application provides a data transmission scheduling device, the device comprising:

[0037] A data transmission rate adjustment module, configured to respond to a data transmission scheduling request for a first service and a second service running on an electronic device, and adjust the data transmission rate for the second service in the system kernel of the electronic device based on the delay information of the first service; wherein the second service refers to at least one type of service whose scheduling priority is lower than the scheduling priority of the first service, and the first service and the second service share the same network communication device of the electronic device to perform data transmission with a corresponding external device;

[0038] A data receiving control module, configured to control the network communication device to receive response data for each of the first service and the second service through the system kernel based on the adjusted data transmission rate; the response data comes from the external device corresponding to the service;

[0039] a data transmission control module, configured to respond to respective data transmission requests of the first service and the second service, and control the network communication device to sequentially transmit the requested transmission data from the services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service through the system kernel;

[0040] The delay information of the first service can be changed based on the sending control of the request to send data of the first service and the receiving control of the corresponding response data.

[0041] A third aspect of the present application provides a computer program product, characterized in that it includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the data transmission scheduling method as described above.

[0042] A fourth aspect of the present application provides an electronic device, the electronic device comprising at least one processor, at least one network communication device connected to the processor, and at least one memory, wherein:

[0043] The memory is used to store a computer program, which includes a service configuration file required for running each service;

[0044] The network communication device has fixed communication resources for realizing data transmission between the electronic device and an external device;

[0045] The processor is used to load and execute multiple computer instruction codes contained in the computer program to implement the various steps of the data transmission scheduling method mentioned above in the present application.

[0046] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the data transmission scheduling method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0048] Figure 1 A flowchart of a data transmission scheduling method provided in Embodiment 1 of the present application;

[0049] Figure 2 A flowchart of a data transmission scheduling method provided in Embodiment 2 of the present application;

[0050] Figure 3 A schematic diagram of the system architecture of an electronic device applicable to the data transmission scheduling method provided in an embodiment of the present application;

[0051] Figure 4 A flowchart of a data transmission scheduling method provided in Embodiment 3 of the present application;

[0052] Figure 5 A flowchart of a data transmission scheduling method provided in Embodiment 4 of the present application;

[0053] Figure 6 A schematic diagram of the structure of a data transmission scheduling device provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application. The embodiments of the present application are described below in conjunction with the drawings. It is known to those of ordinary skill in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0056] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0057] In order to solve the above problems, an embodiment of the present application provides a data transmission scheduling method. The data transmission scheduling method of the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0058] See also Figure 1 , Figure 1A flow chart of a data transmission scheduling method provided in the first embodiment of the present application can be applied to a terminal device having at least one network communication device, such as a laptop computer, a desktop computer, a vehicle-mounted terminal, an augmented reality (AR) / virtual reality (VR) device or a robot, etc. The present application does not limit the product form of the terminal device. The network communication device may include network cards corresponding to different types of networks, and may include wireless network cards supporting mobile networks, such as GPRS network cards and CDMA network cards; wireless network cards supporting wireless local area networks (WLAN), such network cards can achieve wireless connection through the WIFI standard; and wireless network cards supporting Ethernet to meet the needs of high-speed data transmission.

[0059] Based on this, Figure 1 As shown, the data transmission scheduling method proposed in this embodiment may include but is not limited to:

[0060] Step S11, in response to a data transmission scheduling request for a first service and a second service running on the electronic device, adjusting a data transmission rate for the second service in a system kernel of the electronic device based on delay information of the first service;

[0061] In an embodiment of the present application, the second service refers to at least one type of service whose scheduling priority is lower than that of the first service, wherein a higher scheduling priority indicates a higher data transmission rate requirement for the corresponding service, and a greater need for the corresponding service to realize the transmission of corresponding data faster and more completely, thereby improving the response efficiency of the service and reducing its latency information, so as to better meet the response timeliness requirements of the corresponding service and improve the user's access experience to the service.

[0062] Based on this, the first service can be a foreground application that pays more attention to user interaction and response speed, and can be an application or command that is currently being executed by the terminal device and directly interacts with the user. The user enters a command in the terminal device, and the first service will immediately respond and display the output result, such as interactive applications such as games, video conferences, browsers, instant messaging software or other social software. It can be seen that each application included in the first service usually has a graphical user interface (GUI, which can be called a graphical user interface), which directly interacts with the user, displays data and provides an interactive experience. This application does not limit the types of applications included in the first service.

[0063] Compared with the first service described above, the second service can be a background application (Background Application) in the terminal device that does not require user interaction and can run independently, that is, a program or command running in the background of the terminal device, and the user can continue to use the terminal device to perform other operations while performing background tasks. It can be seen that the second service can include applications / services that perform tasks that require long-term operation or do not want to occupy the foreground interaction, such as background applications that perform network activities to download / upload data, etc. This application does not limit the types of applications / services included in the second service.

[0064] It can be seen that in order to improve the user experience, when the terminal device runs the first service and the second service at the same time, the present application will give priority to ensuring the response speed of the first service to avoid delays in the first service, display screen / interactive operation freezes, etc. When the first service and the second service share the same network communication device of the electronic device for data transmission with the corresponding external device, the limited communication resources of the network communication device can be scheduled to the first service first to ensure the response speed of the first service. At the same time, the present application will also schedule the communication resources required to support the operation of the second service, such as the minimum communication resources to support the normal operation of the second service, to ensure that while the communication resources are scheduled for the first service, the remaining communication resources allocated to the second service support its normal operation.

[0065] Based on this, in the process of responding to the data transmission scheduling request for the first service and the second service, in order to ensure the response speed of the first service and the normal operation of the second service, the communication resources of the same network communication device to which the first service and the second service are respectively allocated are requested to be scheduled to adjust the data transmission conditions of the two types of services. The present application proposes to achieve this by adjusting the data transmission rate. This embodiment will reasonably adjust the data transmission rate of the second service based on the delay information of the first service, trigger the electronic device system kernel to schedule the data receiving resources of the network communication device to which the first service and the second service are respectively allocated, and meet the delay information adjustment requirements for the first service. The present application does not limit the method for adjusting the data transmission rate of the second service.

[0066] In an embodiment of the present application, the delay information of the first service can be used as a performance indicator of the data network transmission of the electronic device running the first service, and can characterize the real-time and efficiency of the data transmission of the first service. Since the delay information refers to the round-trip time RTT (Round-Trip Time), it means the total time from the electronic device (which can be used as a transmitter) sending a request from the first service to the corresponding external device (which can be used as a receiver), to the external device sending data in response to the received request, feeding back the generated response data to the electronic device, and the electronic device receiving the response data. It can be seen that as the network transmission performance between the electronic device and the external device changes, the delay information of the first service can change accordingly. The present application does not limit the method for obtaining the delay information of the first service.

[0067] Step S12, controlling the same network communication device to receive response data for the first service and the second service respectively based on the adjusted data transmission rate through the system kernel; the response data comes from an external device corresponding to the service;

[0068] In combination with the above description of the delay information of the first service, for the data transmission process between the electronic device and the external device, the sending delay of the request to send data of the first service in the electronic device can be reduced, and it can be sent to the external device in a timely manner so that the external device can feedback the corresponding response data as soon as possible, thereby achieving the purpose of reducing the delay information of the first service; it is also possible to reduce the queuing delay of the first service in the network by timely receiving the response data for the first service from the external device, thereby achieving the purpose of reducing the delay information of the first service; in order to improve the adjustment efficiency of the delay information of the first service, the data transmission scheduling method proposed in the embodiment of the present application can also be implemented according to the sending delay and queuing delay of these two methods.

[0069] Based on this, in order to reduce the queuing delay of the response data for the first service and timely and reliably receive the response data required for the operation of the first service from the external device, the response data required for the first service and the second service can be scheduled according to the receiving data scheduling rules for the response data receiving process configured by the system kernel. Based on the above analysis, the receiving data scheduling rules of the embodiment of the present application can represent the adjustment rules for the data transmission rate of the second service based on the delay information of the first service, and the content of this application is not limited. It should be understood that the data transmission rate refers to the data reception rate at which the system kernel receives the response data transmitted by the network communication device for the second service.

[0070] Normally, the communication resources of the same network communication device shared by the first service and the second service are basically fixed. This application configures different data transmission channels for the network communication device to realize data transmission in different directions, that is, to receive response data from the external device through the data receiving channel, and to send request data from each service to the external device through the data sending channel. Based on this, in the actual application of this application, for the process of sharing this data receiving channel to receive response data for different services, the size of the data receiving resources allocated to each service directly affects the receiving speed and integrity of the response data of the corresponding service, thereby affecting the response speed and delay information of the corresponding service.

[0071] Among them, when the data receiving resources configured in the above-mentioned data receiving channel are basically fixed, for multiple services that share this data receiving channel to transmit the required response data, such as the above-mentioned first business and second business, the data receiving resources allocated to some services will increase, and the data receiving resources allocated to other services will be reduced accordingly, thereby affecting the response speed of each business.

[0072] Based on this, in the case where the data transmission speed and integrity of each service is achieved by adjusting the data transmission rate of the service proposed in this application to achieve data reception resource scheduling for each service sharing a network communication device, in order to adjust the delay information of the first service, improve the user experience of using the first service, and avoid the second service from stopping operation, the embodiment of this application proposes to adjust the data transmission rate of the second service. In this way, in the response data scheduling process (response data scheduling process for data receiving channel transmission) for the first service and the second service based on the receiving data scheduling rule configured by the system kernel, after adjusting the data transmission rate configured by the system kernel for the second service, the communication resources of the network communication device allocated to the second service will change accordingly, and at the same time, the communication resources of the network communication device allocated to the first service will change. The communication resources allocated to the first service and the second service after the change support the reception of the corresponding response data differently, thereby achieving the data transmission scheduling of the first service and the second service respectively.

[0073] For example, the bandwidth of a network communication device shared by the foreground application and the background application of the current terminal device is 10M (bandwidth width 10 megabytes, indicating the data transmission rate). If the background application is downloading, the current data transmission rate (network speed) is 10MB / s. Since the bandwidth is occupied by the background, the foreground application has a large delay, obvious freezes, and a poor user experience. If the data transmission rate of the background application is adjusted to 1MB / s, the communication resources allocated to the background application at the same time will be reduced, and the communication resources allocated to the foreground application will be increased, and 9MB will be reserved for the foreground application to use, which will improve the response speed of the foreground application, make the foreground application run smoothly, and improve the user experience. At the same time, the background application will not stop the business interaction and can continue to download.

[0074] In the embodiment of the present application, the external device for responding to the data required by the first service and the second service respectively run by the electronic device may include different response devices corresponding to each service, such as a communication server or a service server that provides interactive services for interactive applications, a data source that provides download data for background applications, or a database / platform that receives uploaded data, etc. For the device type of the first response device for the first service and the second response device for the second service, as well as the data response implementation method, the external device supporting the service and the service principle of the service can be determined based on factors such as the service type of the corresponding service. The present application does not elaborate on the device type of each response device and the implementation process of providing the corresponding service for the corresponding service.

[0075] Step S13, in response to the data sending requests of the first service and the second service respectively, the system kernel controls the network communication device to sequentially send the requested data from the services belonging to the corresponding scheduling priorities based on the scheduling priorities of the first service and the second service respectively.

[0076] Following the above analysis, the impact on the delay information of the first service also includes the sending time of the request to send data from the first service. The delay information of the first service can be reduced by reducing the sending delay of the request to send data. Therefore, the system kernel of the electronic device of the present application is configured with a sending data scheduling rule for the data sending process, thereby realizing the scheduling of the request to send data of each service for each service that uses the data sending channel of the same network communication device according to the sending data scheduling rule, so as to give priority to scheduling the sending of the request to send data of a class of services (such as the above-mentioned first service) with high response speed requirements, and reduce the delay information of such services.

[0077] Based on this, in order to implement the above-mentioned data transmission scheduling rules and data reception scheduling priorities, combined with the response speed, latency and other requirements of each service, after configuring the respective scheduling priorities, the scheduling priority of the first service is higher than the scheduling priority of the second service. In this way, in the process of responding to the data transmission requests of the first service and the second service respectively operated by the electronic device, in order to reduce the transmission delay of the request to send data of the first service and improve the latency of the first service, the embodiment of the present application proposes that the system kernel determines the transmission order of the request to send data from the first service and the request to send data from the second service based on the respective scheduling priorities of the first service and the second service, and controls the network communication devices shared by these two types of services to sequentially send the request to send data corresponding to the scheduling priority.

[0078] In this way, when it is necessary to reduce the latency information of the first service, if the system kernel receives a request to send data from the first service and a request to send data from the second service, according to the above-mentioned data sending scheduling rules proposed in the embodiment of the present application, the request to send data from the first service will be sent first, so that the corresponding external device can receive the request to send data of the first service as soon as possible, and the response data generated will be fed back to the electronic device as soon as possible, thereby reducing the round-trip time rtt, or the latency information, of the first service during the communication between the electronic device and the external device.

[0079] It can be seen that in the embodiment of the present application, the delay information of the first service running on the electronic device can be changed based on the sending control of the request to send data of the first service and the receiving control of the corresponding response data. When it is necessary to improve the delay information of the first service and enhance the user experience of the first service, on the one hand, based on the current delay information of the first service, the data transmission rate for the second service in the system kernel is adjusted, so that the system kernel controls the same network communication device to receive the response data for the first service and the second service respectively, so as to achieve the purpose of reducing the queuing delay of the response data for the first service; on the other hand, in the process of responding to the data sending request, the system kernel directly controls the first service and the second service respectively based on the scheduling priority of the first service and the second service. Level, controls the network communication device to send request sending data from the services belonging to the corresponding scheduling priority in sequence, so that the network communication device can be preferentially controlled to send the request sending data of the first service with a higher scheduling priority, so as to achieve the purpose of reducing the sending delay of the request sending data for the first service. In this way, by reducing the two parts of the delay information, the queuing delay of the response data required for the first service and the sending delay of the request sending data, the delay information of the first service is reliably and quickly reduced. In this way, when the available communication resources of the shared network communication device are insufficient, executing the data scheduling method proposed in the embodiment of the present application can ensure the timeliness of the first service while ensuring the basic operation of the second service.

[0080] Moreover, this application does not limit the network type supported by the network communication device shared by the first service and the second service. It can be a WIFI network, a mobile network or an Ethernet network, etc., which are all applicable to the data transmission scheduling method proposed in the embodiment of this application. The implementation process is similar and will not be described in detail in this application.

[0081] It should be noted that, when the data sending channel and the data receiving channel in the same network communication device shared by multiple services running on the electronic device respectively implement the external sending process of requesting to send data and the receiving process of receiving response data from the external device, in the data transmission scheduling process of each service, the system kernel can also flexibly choose to execute or adjust one or two of the configured sending data scheduling rules and receiving data scheduling rules based on the respective available communication resource ratios of the data sending channel and the data receiving channel, that is, choose to implement the scheduling of requesting to send data for the first service and the second service, and / or implement the scheduling of response data for the first service and the second service, which can also achieve the purpose of improving the response speed of the first service and avoiding the second service from stopping operation.

[0082] Based on this, when the data transmission resources of the data transmission channel are sufficient, the data transmission resources of the network communication device meet the data transmission requests of the first service and the second service respectively, and the network communication device can be controlled by the system kernel to simultaneously send the request transmission data from the first service and the second service respectively, and this control method does not affect the response speed of the first service. Accordingly, when the data transmission resources of the data transmission channel are insufficient, that is, it is determined that the data transmission resources of the network communication device do not meet the data transmission requests of the first service and the second service, step S13 can be executed, and the data transmission rate and transmission data integrity of the second service can be sacrificed to give priority to meeting the low-latency operation requirements of the first service, and the second service cannot be prevented from stopping operation to meet the operation requirements of the second service.

[0083] Reference Figure 2 , is a flow chart of a data transmission scheduling method provided in Embodiment 2 of the present application, which can describe an optional detailed implementation method of the data transmission scheduling method provided in the above embodiment, such as Figure 2 As shown, the refinement implementation method may include:

[0084] Step S21, obtaining delay information of a first service running on the electronic device;

[0085] Combined with the relevant description of the delay information in the above embodiment, it represents the response speed of the first service currently running on the electronic device, such as the fluency of the running online game and the response speed to the input operation, etc. The kernel mechanism supported by the operating system of the electronic device can be used to obtain the delay information of the specified first service. The present application does not limit the method for obtaining the delay information.

[0086] In one possible implementation, in response to a delay acquisition request for a first service running on an electronic device, a communication message sent by a system kernel of the electronic device is received. The communication message may include delay information of the first service determined by the system kernel. As analyzed above, the delay information is determined based on the sending time of the request to send data of the first service and the receiving time of the corresponding response data generated. Thereafter, the communication message can be parsed to obtain the current delay information of the first service.

[0087] Based on this, when the electronic device is configured with the Linux operating system, Figure 3 The system architecture diagram shown in the figure can utilize sockdiag supported by Linux, which constructs a timed request sent from the protocol stack, such as creating a netlink socket and constructing a request message, which can include the object and conditions for implementing the request. For example, in the scenario of detecting the delay information of the current first business, the system kernel can also be requested to detect the delay information of the first business, and the delay information detection method or statistical method is recorded in the constructed request message. After the system kernel detects the delay information of the current first business based on this, it fills in the corresponding field of the request message and reports it to the system service requesting to obtain the delay information of the first business through the netlink message, so that the system service can parse and obtain the delay information of the first business.

[0088] It should be noted that the method for obtaining the delay information of the first service includes but is not limited to the implementation method described above. When the electronic device is configured with other types of operating systems, the delay information of the first service detected by the system kernel can also be obtained based on the kernel mechanism supported by the operating system and the communication method between the user space program and the system kernel implemented. The implementation process is not described in detail in this application.

[0089] Step S22, if the delay information satisfies the data transmission scheduling condition for the first service, determining that the electronic device runs a second service having a scheduling priority lower than the scheduling priority of the first service, and responding to the data transmission scheduling request for the first service and the second service;

[0090] Step S23, adjusting the data transmission rate for the second service in the electronic device system kernel based on the delay information of the first service;

[0091] In an embodiment of the present application, the data transmission scheduling condition for the first service indicates that the delay information of the first service is too large / too small, and data transmission scheduling of the first service and the second service running on the electronic device is required to meet the judgment conditions of the respective operating requirements of the first service and the second service. The content of the data scheduling condition can be flexibly configured according to the actual performance requirements such as the response speed of the first service. After the user's performance requirements for the first service change, the content of the data scheduling condition for the first service can be adjusted accordingly. The implementation method is not limited in this application.

[0092] If it is determined that the delay information of the first service meets the data transmission scheduling conditions for the first service, it means that the delay information of the first service needs to be adjusted. If at this time, the electronic device, in addition to running the first service, also runs at least one type of service with a scheduling priority lower than the scheduling priority of the first service, recorded as the second service, combined with the above description of the technical concept of the present application, the embodiment of the present application proposes to achieve data transmission scheduling for the first service and the second service by adjusting the data transmission rate for the second service.

[0093] Moreover, when adjusting the data transmission rate for the second service, the adjustment granularity of the data transmission rate of the second service is different for different delay information of the first service, and the resulting adjusted data transmission rates are different. Accordingly, the data transmission scheduling amounts for the first service and the second service are different to meet different degrees of data transmission scheduling requirements.

[0094] Step S24, scheduling data receiving resources of the network communication devices for the first service and the second service respectively based on the adjusted data transmission rate through the system kernel;

[0095] Step S25, controlling the network communication device to use the first data receiving resource scheduled for the first service to receive the response data for the first service, and to use the second data receiving resource scheduled for the second service to receive the response data for the second service;

[0096] Combined with the above description of the scheduling implementation method of the communication resources of the network communication device, by adjusting the data transmission rate of the second service, the corresponding adjustment of the first data receiving resources scheduled to the second service in the data receiving resources of the network communication device can be achieved, thereby achieving the adjustment of the data receiving resources not scheduled to the second service, that is, achieving the adjustment of the second data receiving resources scheduled by the first service of the network communication device shared with the second service, and the size of the data receiving resources allocated to each service directly affects the response speed of the corresponding service. The present application does not limit how the system kernel adjusts the data transmission rate of the second service, and responds to the data transmission rate of the second service to achieve the scheduling of the data receiving resources of the first service and the second service respectively.

[0097] Reference Figure 3 As shown in the system architecture diagram, the present application can call iptables (an operating tool in the user space of the network packet processing framework in the system kernel) through the extended interface of netd (a daemon process used to manage the network in Android) to set the data transmission scheduling rules of speed limit (such as data reception limit rate) to netfilter (a network packet processing framework in the kernel, used to process data packets at different levels of the protocol stack, such as filtering, modifying, discarding and many other operations). The hashlimit module in netfilter (which is an extension module of iptables, can limit the data transmission rate of the service according to specific rules, and can use the token bucket algorithm to control the data matching rate. The present application does not elaborate on the data transmission rate adjustment principle implemented by it) adjusts the data transmission rate for the second service according to the data transmission rate adjustment rule based on the delay information of the first service.

[0098] Among them, when the data transmission rate for the second service in the system kernel decreases, after the above-mentioned scheduling, the scheduled first data receiving resources are greater than the second data receiving resources; similarly, when the data transmission rate for the second service increases, the second data receiving resources for the second service can be increased, so that the first data receiving resources for the first service are reduced. As for the relationship between the first data receiving resources and the second data receiving resources after scheduling at this time, it can be determined according to the scheduling degree, and this application does not impose any restrictions.

[0099] Step S26, in response to the data sending requests of the first service and the second service respectively, the system kernel controls the network communication device to sequentially send the requested data from the services belonging to the corresponding scheduling priorities based on the scheduling priorities of the first service and the second service respectively.

[0100] Regarding the implementation method of step S26, please refer to the description of the corresponding part of the context embodiment, and this embodiment will not be described in detail here.

[0101] To summarize, in the embodiments of the present application, when an electronic device runs multiple services such as a first service and a second service, in order to ensure a high response speed of the first service and improve user experience, the system kernel will dynamically adjust the data transmission rate of the second service based on the delay information of the current first service, and implement scheduling of data receiving resources possessed by the shared network communication device, so that the first service can use the scheduled first data receiving resources to quickly receive response data from the corresponding external device, and at the same time, the second service can also use the scheduled second data receiving resources to slowly receive response data from the corresponding external device, and the second service will not stop running due to data transmission scheduling. By reasonably and dynamically scheduling the data receiving resources of each service with different scheduling priorities, the reliability of the operation of each service is improved.

[0102] Reference Figure 4 , is a flow chart of a data transmission scheduling method provided in Embodiment 3 of the present application. This embodiment can describe a possible implementation method of how to adjust the data transmission rate of the second service in the data transmission scheduling method described above. Based on this, Figure 4 As shown, the data transmission scheduling method proposed in this embodiment may include:

[0103] Step S41, in response to a data transmission scheduling request for a first service and a second service running on an electronic device, querying a delay level to which delay information of the first service belongs, and determining a target limit rate configured for the delay level;

[0104] Step S42, adjusting the data transmission rate for the second service in the electronic device system kernel to a target limit rate;

[0105] Since the present application needs to determine how to adjust the data transmission rate of the second service based on the current delay information of the first service, in the data transmission rate adjustment rules proposed in the embodiments of the present application, the delay of the first service can be graded based on the maximum and minimum values ​​of the delay information allowed for the operation of the first service, and multiple delay levels can be obtained. The delay information range corresponding to different delay levels is configured, and the delay information under the delay level is improved, and the data transmission rate of the second service is reasonably limited, that is, the limit rate corresponding to different delay levels. The present application does not restrict the division results of each delay level of the first service and its corresponding delay information range and limit rate values, and can be flexibly configured according to actual requirements or experience.

[0106] Exemplarily, if the delay information of the first service is expressed as rtt, the maximum data transmission rate THRESH_HIGH of the second service is expressed as rate, which is usually a higher value, such as 100Mbps, etc., and this application does not limit its value; the limit rate or the adjusted data transmission rate can be expressed as limit_rate, and the delay information range and the limit rate configuration corresponding to different delay levels of the first service can be implemented according to the rules described below:

[0107] if(rtt > 1000ms)

[0108] limit_rate = rate / 16;

[0109] else if (rtt > 500ms)

[0110] limit_rate = rate / 8

[0111] else if (rtt > 200ms)

[0112] limit_rate = rate / 4

[0113] else if (rtt > 100ms)

[0114] limit_rate = rate / 2

[0115] It can be seen that the delay information of the first service can be divided into the four delay levels in the above example, which can be divided by the four hierarchical delay information thresholds of 1000ms, 500ms, 200ms, and 100ms. The delay information range corresponding to the delay level can be expressed as rtt > 1000ms, rtt > 500ms (i.e. 1000ms≥rtt > 500ms), rtt > 200ms (i.e. 500ms≥rtt > 200ms), and rtt > 100ms (i.e. 200ms≥rtt >100ms), but it is not limited to the delay level division method and its corresponding delay information range in this example, and can be flexibly configured or adjusted according to actual conditions. Based on this, when the first service has high delay, it can be quickly reduced to a suitable target limit rate according to the above adjustment logic.

[0116] For example, if the current delay information of the first service is 400ms, the delay level corresponding to the range of 500ms≥rtt > 200ms is queried, that is, else if (rtt > 200ms), the target limit rate of rate / 4 = 100 / 4 = 25Mbps can be determined as the adjusted data transmission rate of the second service.

[0117] Combined with the above analysis, in some other embodiments proposed in the present application, if the currently acquired delay information of the first service is greater than the first delay threshold (such as 100ms, etc., the present application does not limit its value), the data transmission rate for the second service in the electronic device system kernel can be reduced based on the delay information of the first service. In one possible implementation, the reduced data transmission rate can be determined according to the query method described in step S41 and step S42. In another possible implementation, the step size can also be reduced according to the preset data transmission rate, combined with the change of the delay information of the first service, and the data transmission rate of the second service can be gradually reduced. The present application does not limit the adjustment implementation method.

[0118] Among them, in the process of receiving corresponding response data through a network communication device shared by the first service and the second service, according to the receiving data scheduling rules described above in this application, the system kernel determines that the network communication device transmits the response data for the first service (which can be sent in the form of data packets or messages, etc., and this application does not limit the data format of each response data, which can be determined according to the network communication protocol supported by the network communication device), and can receive and send the response data according to the first service. Figure 3 The data receiving path shown by the arrow sends the response data to the first service running in the application layer through the protocol stack, so that the first service can perform corresponding actions based on the response data and generate new request sending data. Figure 3 The data sending path indicated by the arrow is written into the data sending queue corresponding to the scheduling priority of the first service in the system kernel.

[0119] During the data reception process, if it is determined that the network communication device transmits response data for the second service, due to its low data transmission rate, the excess response data can be lost according to the currently configured data transmission rate to reduce the occupancy of the data receiving resources of the network communication device and avoid the second service from stopping.

[0120] Therefore, in order to ensure that the second service can continue to run under lower traffic, the present application limits the reduced data transmission rate to be greater than or equal to the minimum data transmission rate at which the network communication device can successfully receive the response data of the second service. The minimum data transmission rate can be expressed as THRESH_LOW, and its value can be determined based on the consumption of data receiving resources by the operation of the second service. It can be seen that the value of THRESH_LOW may be different for different second services, and the present application does not limit the value of THRESH_LOW.

[0121] According to the above analysis, during the data transmission rate adjustment process of the second service, if it is determined that the adjusted data transmission rate is less than or equal to the minimum data transmission rate, the data transmission rate of the second service can be adjusted to the minimum data transmission rate. This can be achieved through the following adjustment logic:

[0122] if(rate <= THRESH_LOW)

[0123] limit_rate = THRESH_LOW

[0124] Similarly, when the currently acquired delay information of the first service is less than the second delay threshold, the data transmission rate for the second service in the electronic device system kernel can be increased based on the delay information of the first service, and the second delay threshold is less than the first delay threshold. The following adjustment logic can be implemented:

[0125] if (rtt < 30ms)

[0126] limit_rate = rate×2

[0127] It can be seen that the second delay threshold can be 30ms, but is not limited to this value. When the delay of the first service is low, the restrictions on the second service can be appropriately relaxed to schedule more data receiving resources for the second service, receive more response data for the second service, and the background can also send more data.

[0128] Step S43, controlling the same network communication device to receive response data for the first service and the second service respectively based on the adjusted data transmission rate through the system kernel; the response data comes from an external device corresponding to the service;

[0129] Regarding the implementation method of step S43, reference may be made to the description of the corresponding part of the above embodiment, which will not be described in detail in this embodiment.

[0130] Step S44, in response to the data transmission requests of the first service and the second service respectively, the system kernel writes the request transmission data of the corresponding service into the data transmission queue of the scheduling priority to which the service belongs;

[0131] Step S45 , controlling the network communication device to sequentially send each request to send data in the corresponding data sending queue according to the scheduling priorities of different data sending queues through the system kernel.

[0132] In a possible implementation method of the data transmission scheduling rule proposed in the present application, multiple data transmission queues with different scheduling priorities can be configured in pfifo_fast of the traffic control module TC (Traffic Control) of the system kernel, such as Figure 3 The three data transmission queues represented by b0, b1 and b2 are shown, among which the scheduling priority of the data transmission queue b0 is the highest, and the scheduling priority of the data transmission queue b2 is the lowest. The data transmission scheduling rule indicates that the system kernel will not send the request transmission data in the data transmission queue with a lower scheduling priority before the request transmission data in the data transmission queue with a higher scheduling priority is sent.

[0133] Based on this, the system kernel can give priority to sending each request to send data in the data sending queue b0. After determining that all the request to send data have been sent, it can send each request to send data written in the data sending queue b1 of the next scheduling priority. After sending, if there is no request to send data in the data sending queue b0, it can send each request to send data written in the data sending queue b2 of the next scheduling priority. It can be seen that different scheduling priorities of this application correspond to different data sending queues, and the data sending queues configured by the system kernel are not limited to Figure 3 The three data transmit queues are shown.

[0134] In the actual application of this application, Figure 3 As shown, the above data sending scheduling rules can be located in the egress rule chain of the netfiltermangle table ( Figure 3 The OUTPUT shown in the figure is the mangle table of the netfilter. The scheduling rules for receiving data can be located in the entry rule chain of the netfilter filter table ( Figure 3 In the INPUT shown in the figure, that is, the filter table of netfilter, the system kernel implements the scheduling of data sending and receiving processes according to the corresponding scheduling rules. How the system kernel implements the data transmission process with each business of the application layer through the socket interface and the Http protocol stack (OkHttp Stack) can be determined according to the communication protocol under the corresponding operating system, including but not limited to Figure 3 The data transmission path and data receiving path are shown in bold arrows. Figure 3The data transmission scheduling method based on a WIFI network card is used as an example for explanation. For scenarios where electronic devices communicate with external devices based on other types of network cards, the implementation process of the data transmission scheduling method for multiple services is similar, and this application does not give detailed examples one by one.

[0135] In summary, in the embodiment of the present application, after obtaining the delay information of the first service, by determining the delay level to which the delay information belongs, the data transmission rate of the second service is quickly and accurately adjusted to the target limit rate corresponding to the delay level, thereby realizing the rapid adjustment of the queuing delay of the response data of the first service. And in the data sending process, this embodiment uses data sending queues with different scheduling priorities to realize the queuing of request sending data from services with different scheduling priorities. In this way, the data sending order of each data sending queue can be determined according to the scheduling priority of each data sending queue, and each request sending data stored in the data sending queue with the highest scheduling priority can be sent first, so as to timely send the request data of the first service belonging to the scheduling priority, and suspend the sending of the request sending data of the second service with a lower scheduling priority, so as to reduce the queuing delay of the request sending data of the first service, quickly and reliably reduce the delay information of the first service, and improve the user experience of the first service.

[0136] Reference Figure 5 , is a flow chart of a data transmission scheduling method provided in Embodiment 4 of the present application. This embodiment can describe a possible implementation method of the response process to the data transmission request of the first service and the second service in the data transmission scheduling method described above. For other steps of the data transmission scheduling method, reference can be made to the description of the corresponding part of the context embodiment, and this embodiment will not be described in detail here. Based on this, Figure 5 As shown, the response process proposed in this embodiment may include:

[0137] Step S51, in response to the data sending requests of the first service and the second service respectively, the system kernel reads the current field value of the service type field in the request to send data, and determines the data sending queue to which the current field value is mapped;

[0138] In an embodiment of the present application, a service type field can be configured in the request data for each service, and through its field value, it can be mapped to the data sending queue of the corresponding scheduling priority to realize the queuing of the request data for each service. Among them, the service type field can be an 8-bit field such as TOS (Type of Service) in the IP header of the data packet, which is used to request the service quality and service type of the data to be sent, and the corresponding request data is given priority by adjusting the TOS value. Optionally, the service type field of the present application can also be a DSCP (Differentiated Services Code Point) field, thereby configuring the service type and scheduling priority of the corresponding service. The present application does not limit the differentiated service implementation principle of these two fields.

[0139] This application takes the TOS service type field as an example for explanation. Figure 3 In the scenario of three data receiving queues b0, b1 and b2 corresponding to different scheduling priorities shown in the figure, various TOS values ​​mapped to different data receiving queues and their corresponding service types may be as shown in Table 1:

[0140]

[0141] Table 1

[0142] Among them, md means Minimize delay, minimize delay / delay; mt means maximize throughput; mt means maximize reliability, and mmc means minimize monetary cost. After completing the mapping of each TOS value for each data transmission queue of different scheduling priorities according to the above Table 1, in the response process of the data transmission request of each service, the system kernel can read the TOS value in the request transmission data from each service, and write the request transmission data into the data transmission queue mapped by the TOS value. After that, the sequential transmission of the request transmission data stored in multiple data transmission queues can be realized according to the scheduling priority of each data transmission queue. In actual applications, for services that do not require scheduling priority, the field value of its service type field can be configured by default to the TOS value mapped by the b1 data transmission queue. Of course, if the scheduling priority of the service needs to be increased or decreased, the field value can be modified to the field value of the data transmission queue mapping corresponding to the scheduling priority that needs to be adjusted according to the field value configuration method described in this application. In this implementation process, the appropriate field value can be selected in combination with the service type to which the service belongs, and can be based on but not limited to the mapping relationship shown in Table 1 and the various service types contained therein.

[0143] like Figure 3The system structure shown can realize the switch control of the data transmission scheduling function proposed in the embodiment of the present application in the system settings Settings, and in response to the start operation of the data transmission scheduling function, the data transmission scheduling method proposed in the present application can be executed. The data queuing and data transmission rate adjustment strategy proposed in the embodiment of the present application can be implemented through the extended system service Extended SystemService.

[0144] Step S52, determining whether the mapped data transmission queue is consistent with the scheduling priority of the service that sends the corresponding request to send data, if not, proceeding to step S53; if consistent, executing step S55;

[0145] Step S53, adjusting the current field value of the service type field for the service in the system kernel according to the field values ​​of the service type corresponding to the scheduling priority of the service;

[0146] In an embodiment of the present application, in the process of implementing data sending scheduling based on the data sending queue mapped based on the TOS value, in order to improve the scheduling reliability, it is possible to first verify whether the data sending queue mapped to the current field value in the request to send data is consistent with the scheduling priority of the service that sends the corresponding request to send data. If they are inconsistent, the field value of the service type field of the service can be modified according to the mapping relationship shown in Table 1, so that the adjusted field value is mapped to the data sending queue corresponding to the scheduling priority of the service.

[0147] Therefore, when it is necessary to increase the scheduling priority of a certain foreground application, a Framework to netd API can be added to modify the TOS value corresponding to the service, so that it can modify the TOS field of the data packet IP header (i.e., request to send data) of the corresponding service application, and then set the appropriate TOS value to map it to the pfifo_fast queue b0 data sending queue, that is, the data sending queue corresponding to the highest scheduling priority, but it is not limited to this mapping adjustment method. It can be seen that this application adds sending data scheduling rules in the kernel netfilter through iptables, which can take effect on different applications (i.e., various services), and the system can uniformly control the automatic and reasonable scheduling of request to send data for each service, and meet the priority sending requirements of the first service's request to send data.

[0148] It can be seen that in response to a scheduling priority adjustment request for any business, the present application can use the various field values ​​of the service type field corresponding to the adjusted scheduling priority of the business request to adjust the original field value of the service type field for the business in the system kernel, so as to map the adjusted field value to the data processing queue corresponding to the scheduling priority after the adjustment is requested. The implementation method includes but is not limited to the implementation method described above.

[0149] Step S54, writing the request sending data of the service into the data sending queue to which the adjusted field value is mapped;

[0150] Step S55, writing the request sending data of the service into the data sending queue to which the current field value of the service is mapped;

[0151] Step S56, the system kernel controls the network communication device to sequentially send each request to send data in the corresponding data sending queue according to the scheduling priorities of different data sending queues.

[0152] As analyzed above, this application configures appropriate field values ​​for the service type fields of services with different scheduling priorities, that is, the field values ​​mapped to the data sending queues corresponding to the scheduling priority to which the service belongs, to ensure that the request sending data of each service can be reliably written into the data sending queue of the corresponding scheduling priority, thereby queuing the data sending queues of each scheduling priority and sequentially sending the request sending data in the data sending queue of the corresponding scheduling priority in order from high to low scheduling priority. In this way, when it is necessary to give priority to sending the request sending data of one or more services to improve their response speed, when improving their scheduling priority, the field value of their service type field can be adjusted to ensure that the adjusted field value is mapped to the data sending queue of the scheduling priority to be adjusted, thereby meeting the data priority sending requirements for the corresponding services.

[0153] A data transmission scheduling method provided in an embodiment of the present application is introduced above, and a device for executing the above data transmission scheduling method will be introduced below.

[0154] See also Figure 6 , Figure 6 A schematic diagram of the structure of a data transmission scheduling device provided in an embodiment of the present application. Figure 6 As shown, the data transmission scheduling device may include:

[0155] The data transmission rate adjustment module 61 is used to respond to the data transmission scheduling request for the first service and the second service running on the electronic device, and adjust the data transmission rate for the second service in the system kernel of the electronic device based on the delay information of the first service; wherein the second service refers to at least one type of service whose scheduling priority is lower than the scheduling priority of the first service, and the first service and the second service share the same network communication device of the electronic device to perform data transmission with the corresponding external device;

[0156] A data receiving control module 62, configured to control the network communication device to receive response data for each of the first service and the second service through the system kernel based on the adjusted data transmission rate; the response data comes from the external device corresponding to the service;

[0157] A data transmission control module 63, configured to respond to the data transmission requests of the first service and the second service respectively, and control the network communication device to sequentially transmit the requested transmission data from the services corresponding to the scheduling priorities based on the scheduling priorities of the first service and the second service respectively through the system kernel;

[0158] The delay information of the first service can be changed based on the sending control of the request to send data of the first service and the receiving control of the corresponding response data.

[0159] In a possible implementation, the data transmission rate adjustment module 61 may include:

[0160] A delay information acquisition unit, used to acquire delay information of a first service running on the electronic device;

[0161] a data transmission scheduling determination unit, configured to determine that the electronic device runs a second service having a scheduling priority lower than that of the first service if the delay information satisfies a data transmission scheduling condition for the first service, and respond to a data transmission scheduling request for the first service and the second service;

[0162] A query unit, used to query the delay level to which the delay information of the first service belongs, and determine the target limit rate configured for the delay level; different delay levels correspond to different configured delay information ranges and limit rates;

[0163] An adjustment unit is used to adjust the data transmission rate for the second service in the electronic device system kernel to the target limit rate.

[0164] In a possible implementation, the data transmission rate adjustment module 61 may include:

[0165] A first adjustment unit is configured to reduce the data transmission rate for the second service in the electronic device system kernel based on the delay information of the first service if the delay information of the first service is greater than a first delay threshold, and the reduced data transmission rate is greater than or equal to a minimum data transmission rate at which the network communication device can successfully receive response data of the second service;

[0166] The second adjustment unit is used to increase the data transmission rate for the second service in the electronic device system kernel based on the delay information of the first service if the delay information of the first service is less than a second delay threshold, and the second delay threshold is less than the first delay threshold.

[0167] In a possible implementation, the delay information acquiring unit may include:

[0168] a communication message receiving unit, configured to receive a communication message sent by a system kernel of the electronic device in response to a delay acquisition request for a first service running on the electronic device; the communication message includes delay information of the first service determined by the system kernel, the delay information being determined based on a sending time of requesting data to be sent for the first service and a receiving time of the corresponding response data;

[0169] The delay information obtaining unit is used to parse the communication message and obtain the current delay information of the first service.

[0170] In some embodiments, in combination with the above analysis, the data receiving control module 62 may include:

[0171] A data receiving resource scheduling unit, configured to schedule data receiving resources of the network communication device for each of the first service and the second service through the system kernel based on the adjusted data transmission rate;

[0172] a response data receiving unit, configured to control the network communication device to receive the response data for the first service by using the first data receiving resource scheduled to the first service, and to receive the response data for the second service by using the second data receiving resource scheduled to the second service;

[0173] Wherein, in a case where the data transmission rate for the second service in the system kernel is reduced, the first data receiving resource is greater than the second data receiving resource.

[0174] In some further embodiments, the data transmission control module 63 may include:

[0175] A writing unit, used for writing the request sending data of the corresponding service into the data sending queue of the scheduling priority to which the service belongs through the system kernel; different scheduling priorities correspond to different data sending queues;

[0176] The sending unit is used to control the network communication device to sequentially send each of the request-to-send data in the corresponding data sending queue according to the scheduling priorities of different data sending queues through the system kernel.

[0177] In a possible implementation, the writing unit may include:

[0178] a data transmission queue determination unit, configured to read, through the system kernel, a current field value of a service type field in the request transmission data, and determine a data transmission queue to which the current field value is mapped;

[0179] a field value adjustment unit, configured to adjust the current field value of the service type field for the service in the system kernel according to each field value of the service type corresponding to the scheduling priority of the service, if the data sending queue mapped thereto is inconsistent with the scheduling priority of the service sending the corresponding request to send data, so that the adjusted field value is mapped to the data sending queue corresponding to the scheduling priority of the service;

[0180] The request to send data writing unit is used to write the request to send data into the data sending queue mapped to the current field value if the data sending queue mapped to it is consistent with the scheduling priority of the service sending the corresponding request to send data.

[0181] In some further embodiments, the above-mentioned data transmission scheduling device may further include:

[0182] A field value adjustment module, configured to respond to a scheduling priority adjustment request for any service, and adjust the original field value of the service type field for the service in the system kernel by using the respective field values ​​of the service type field corresponding to the scheduling priority after adjustment requested by the service, so as to map the adjusted field value to the data processing queue corresponding to the scheduling priority after adjustment requested;

[0183] A request-to-send data sending module, configured to control the network communication device through the system kernel to simultaneously send the request-to-send data from the first service and the second service respectively, when it is determined that the data sending resources of the network communication device meet the data sending requests of the first service and the second service respectively;

[0184] A trigger module is used to trigger a sending unit to control the network communication device to sequentially send requested data from services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service through the system kernel when it is determined that the data sending resources of the network communication device do not meet the data sending requests of the first service and the second service.

[0185] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the data transmission scheduling methods provided in the embodiments of the present application.

[0186] In the practical application of the present application, when the above-mentioned computer-readable instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer-readable instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0187] See also Figure 7 , Figure 7 A hardware structure diagram of an electronic device provided in an embodiment of the present application, the electronic device may be the terminal device described above, such as Figure 7 As shown, it may include: at least one processor 71, at least one network communication device 72 connected to the processor 71 and at least one memory 73, wherein:

[0188] At least one processor 71, at least one network communication device 72 and at least one memory 73 can communicate with each other via a bus. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0189] The network communication device 72 may include a network interface card (NIC) that supports different networks. For example, a mobile network (corresponding to Figure 3 The respective wireless network cards such as Cellular), WLAN and Ethernet shown in the figure can determine the hardware configuration, that is, the type and quantity of network communication devices 72 according to the wireless network configuration of the electronic device. This application does not elaborate on the type of network communication device 72 and the communication principle of the wireless communication protocol it supports.

[0190] The memory 73 can store a computer program for implementing the data transmission scheduling method provided in the embodiment of the present application. The processor 71 loads the computer program stored in the memory 73 to execute / run, thereby implementing the data transmission scheduling method provided in the corresponding embodiment. The implementation process can refer to the description of the corresponding part of the method embodiment above.

[0191] In the embodiment of the present application, the processor 71 may include one or more processing units, such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), a digital signal processor (DSP), a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a modem processor, and any one or more of the above processors.

[0192] The memory 73 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), such as a random-access memory (RAM). The memory 73 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 73 in the embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing program instructions and / or data.

[0193] It should be understood that Figure 7 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiment of the present application. In practical applications, the electronic device may include Figure 7 More components shown, or a combination of certain components, may also include a display unit (used to display the output results for the target task, various prompt information, etc.), a microphone (used to collect voice signals input by the user), a speaker, various sensors, a power supply module, a radio frequency unit (used to send and receive information, which may include an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA) and a duplexer, etc., to achieve data transmission between the electronic device and the base station), various communication elements, external ports and other input units (such as a touch screen, one or more of a mouse key, a function key, a joystick or a trackball, etc.) / output units, etc., which can be determined according to the processing function requirements, and this application does not list them one by one.

[0194] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any data transmission scheduling method provided in the embodiment of the present application.

[0195] In the practical application of the present application, the computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a training device or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)).

[0196] In combination with a data transmission scheduling method provided by an embodiment of the present application introduced above, an electronic device that executes the above data transmission scheduling method will be introduced below.

[0197] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0198] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0199] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0200] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A data transmission scheduling method, the method include: In response to a data transmission scheduling request for a first service and a second service running on an electronic device, adjusting the data transmission rate for the second service in the system kernel of the electronic device based on the latency information of the first service; wherein the second service refers to at least one type of service whose scheduling priority is lower than the scheduling priority of the first service, and the first service and the second service share the same network communication device of the electronic device to perform data transmission with the corresponding external device; Controlling the network communication device to receive response data for the first service and the second service respectively based on the adjusted data transmission rate through the system kernel; the response data comes from the external device corresponding to the service; In response to the data transmission requests of the first service and the second service respectively, the system kernel controls the network communication device to sequentially transmit the requested transmission data from the services corresponding to the scheduling priorities based on the scheduling priorities of the first service and the second service respectively; The delay information of the first service can be changed based on the sending control of the request to send data of the first service and the receiving control of the corresponding response data.

2. The method according to claim 1, wherein the response to the data transmission scheduling request for the first service and the second service running on the electronic device, include: Acquire time delay information of a first service run by the electronic device; If the delay information meets the data transmission scheduling condition for the first service, it is determined that the electronic device is running a second service whose scheduling priority is lower than the scheduling priority of the first service, and a data transmission scheduling request for the first service and the second service is responded to.

3. The method according to claim 1, wherein the data transmission rate for the second service in the electronic device system kernel is adjusted based on the delay information of the first service. include: Querying the delay level to which the delay information of the first service belongs, and determining a target limit rate configured for the delay level; The delay information range and the limit rate configured corresponding to different delay levels are different; The data transmission rate for the second service in the electronic device system kernel is adjusted to the target limit rate.

4. The method according to claim 1, wherein the data transmission rate for the second service in the electronic device system kernel is adjusted based on the delay information of the first service. include: If the delay information of the first service is greater than a first delay threshold, based on the delay information of the first service, the data transmission rate for the second service in the system kernel of the electronic device is reduced, and the reduced data transmission rate is greater than or equal to a minimum data transmission rate at which the network communication device can successfully receive the response data of the second service; If the delay information of the first service is less than a second delay threshold, the data transmission rate for the second service in the electronic device system kernel is increased based on the delay information of the first service, and the second delay threshold is less than the first delay threshold.

5. The method according to claim 1, wherein the system kernel controls the network communication device to receive response data for each of the first service and the second service based on the adjusted data transmission rate. include: Scheduling, by the system kernel based on the adjusted data transmission rate, data receiving resources of the network communication device for each of the first service and the second service; Control the network communication device to receive response data for the first service using the first data receiving resource scheduled for the first service, and to receive response data for the second service using the second data receiving resource scheduled for the second service; Wherein, in a case where the data transmission rate for the second service in the system kernel is reduced, the first data receiving resource is greater than the second data receiving resource.

6. The method according to claim 2, wherein the obtaining the delay information of the first service running on the electronic device comprises: include: In response to a latency acquisition request for a first service running on an electronic device, receiving a communication message sent by a system kernel of the electronic device; The communication message includes the latency information of the first service determined by the system kernel, where the latency information is determined based on the sending time of the request to send data of the first service and the receiving time of the corresponding response data; Parse the communication message to obtain current delay information of the first service.

7. The method according to any one of claims 1 to 6, wherein the system kernel controls the network communication device to sequentially send request data from services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service, include: Writing the request sending data of the corresponding service into the data sending queue of the scheduling priority to which the service belongs through the system kernel; Different scheduling priorities correspond to different data sending queues; The system kernel controls the network communication device to sequentially send each of the request-to-send data in the corresponding data sending queue according to the scheduling priorities of the different data sending queues.

8. The method according to claim 7, wherein the system kernel writes the request sending data of the corresponding service into the data sending queue of the scheduling priority to which the service belongs. include: Reading, by the system kernel, a current field value of a service type field in the request-to-send data, and determining a data sending queue to which the current field value is mapped; If the data sending queue mapped thereto is inconsistent with the scheduling priority of the service for sending the data corresponding to the request to send the data, adjusting the current field value of the service type field for the service in the system kernel according to the field values ​​of the service type corresponding to the scheduling priority of the service, so that the adjusted field value is mapped to the data sending queue corresponding to the scheduling priority of the service; If the data sending queue mapped thereto is consistent with the scheduling priority of the service for sending the data corresponding to the request to send the data, the request to send the data is written into the data sending queue mapped thereto by the current field value.

9. The method according to claim 7, further comprising at least one of the following: In response to a scheduling priority adjustment request for any service, adjusting the original field value of the service type field for the service in the system kernel using the respective field values ​​of the service type field corresponding to the scheduling priority after adjustment requested by the service, so as to map the adjusted field value to the data processing queue corresponding to the scheduling priority after adjustment requested; If it is determined that the data transmission resources of the network communication device meet the data transmission requests of the first service and the second service respectively, controlling the network communication device through the system kernel to simultaneously transmit the requested data from the first service and the second service respectively; If it is determined that the data sending resources of the network communication device do not meet the data sending requests of the first service and the second service, execute the step of controlling the network communication device to sequentially send requested data from the services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service through the system kernel.

10. A data transmission scheduling device, the device include: A data transmission rate adjustment module, configured to respond to a data transmission scheduling request for a first service and a second service running on an electronic device, and adjust the data transmission rate for the second service in the system kernel of the electronic device based on the delay information of the first service; wherein the second service refers to at least one type of service whose scheduling priority is lower than the scheduling priority of the first service, and the first service and the second service share the same network communication device of the electronic device to perform data transmission with a corresponding external device; A data receiving control module, configured to control the network communication device to receive response data for each of the first service and the second service through the system kernel based on the adjusted data transmission rate; the response data comes from the external device corresponding to the service; a data transmission control module, configured to respond to respective data transmission requests of the first service and the second service, and control the network communication device to sequentially transmit the requested transmission data from the services corresponding to the scheduling priorities based on the respective scheduling priorities of the first service and the second service through the system kernel; The delay information of the first service can be changed based on the sending control of the request to send data of the first service and the receiving control of the corresponding response data.

Citation Information

Cited By

  • Low-altitude robot-oriented end-side large model reasoning method and system

    CN122572693A

  • Low-altitude robot-oriented end-side large model inference method and system

    CN122572693B

  • Service performance tuning method and apparatus

    WO2026143339A1