CN111459690B - Data receiving and transmitting control method and device, mobile terminal and storage medium - Google Patents

Data receiving and transmitting control method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN111459690B
CN111459690B CN202010280709.7A CN202010280709A CN111459690B CN 111459690 B CN111459690 B CN 111459690B CN 202010280709 A CN202010280709 A CN 202010280709A CN 111459690 B CN111459690 B CN 111459690B
Authority
CN
China
Prior art keywords
queue
priority
data
data packets
data packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010280709.7A
Other languages
Chinese (zh)
Other versions
CN111459690A (en
Inventor
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010280709.7A priority Critical patent/CN111459690B/en
Publication of CN111459690A publication Critical patent/CN111459690A/en
Application granted granted Critical
Publication of CN111459690B publication Critical patent/CN111459690B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a data receiving and transmitting control method and device, a mobile terminal and a storage medium, and relates to the technical field of data processing. The method is applied to the mobile terminal and comprises the following steps: identifying the category of the data packet to be transmitted and received as a target category; according to the corresponding relation between the category and the queue, the data packet is put into the queue corresponding to the target category, and different queues have different priorities; the data packets in each queue are correspondingly received or transmitted according to the priority from high to low, so that data of certain types can be processed preferentially, and the transmitting and receiving speed of the data needing to be processed preferentially is improved.

Description

Data receiving and transmitting control method and device, mobile terminal and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data transceiving control method, device, mobile terminal, and storage medium.
Background
In the use process of the connection network, the mobile terminal receives and transmits data of different tasks according to the principle of the same view, for example, firstly generated data is firstly transmitted, firstly arrived data is firstly received, so that the data receiving and transmitting speed of the task with high data receiving and transmitting speed requirement can be slower, and the data receiving and transmitting speed of the task with low data receiving and transmitting speed requirement can be faster, and the actual use requirement of a user is not met.
Disclosure of Invention
In view of the above, the present application provides a data transceiving control method, device, mobile terminal and storage medium, so as to improve the above problem.
In a first aspect, an embodiment of the present application provides a data transceiver control method, which is applied to a mobile terminal, where the method includes: identifying the category of the data packet to be transmitted and received as a target category; according to the corresponding relation between the category and the queue, the data packet is put into the queue corresponding to the target category, and different queues have different priorities; and correspondingly receiving or transmitting the data packets in each queue according to the priority from high to low.
In a second aspect, an embodiment of the present application provides a data transceiver control device, applied to a mobile terminal, where the device includes: the class identification module is used for identifying the class to which the data packet to be transmitted and received belongs as a target class; the enqueuing module is used for putting the data packet into a queue corresponding to the target category according to the corresponding relation between the category and the queue, and different queues have different priorities; and the data processing module is used for correspondingly receiving or transmitting the data packets in each queue according to the priority from high to low.
In a third aspect, an embodiment of the present application provides a mobile terminal, including: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being executed by the processors for performing the methods described above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having program code stored therein, the program code being callable by a processor to perform the method described above.
According to the data receiving and transmitting control method, the device, the mobile terminal and the storage medium, the corresponding queues are placed according to the category of the data packet to be received and transmitted, and different queues have different priorities, and when data is received or transmitted, the data is processed from high priority to low priority, so that the data of certain categories can be processed preferentially, and the receiving and transmitting speed of the data needing to be processed preferentially is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a data transceiving control method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a data transceiving control method according to another embodiment of the present application.
Fig. 3 shows a functional block diagram of a data transceiver control device according to an embodiment of the present application.
Fig. 4 shows a block diagram of a mobile terminal according to an embodiment of the present application.
Fig. 5 is a memory unit for storing or carrying program codes for implementing a data transceiving control method according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
In the network connection state, the mobile terminal can receive and transmit data through the network. When the mobile terminal generates data to be transmitted through the network, the newly generated data is transmitted through the communication unit, and when the communication unit of the mobile terminal receives the data, the received data is transmitted to a process for processing the data.
The inventor finds that in the actual use process of the mobile terminal, the requirements of users on the data transceiving speeds of different tasks are different, and some service users may want the data transceiving speeds to be faster so as to complete the service faster; some service users may not mind the speed and how long the data can be transmitted and received. Therefore, the inventor proposes the data transceiving control method, the device, the mobile terminal and the storage medium according to the embodiment of the application, the data packets of different types are put into the corresponding queues, and the different queues have different priorities, so that the data packets of each type can be processed with the corresponding priorities, and the transceiving speed of the data packets in the queues with high priorities is improved. The data transceiver control method, the device, the mobile terminal and the storage medium provided by the embodiment of the application are described in detail below through specific embodiments.
Referring to fig. 1, a data transceiving control method provided by an embodiment of the present application is shown. The method is applied to a mobile terminal, which can be a mobile phone, a tablet computer, a computer, intelligent wearable equipment, an electronic reader and the like, and is not limited in the embodiment of the application. Specifically, as shown in fig. 1, the data transceiving control method includes:
step S110: and identifying the category to which the data packet to be transmitted and received belongs as a target category.
The data packet is a data unit in communication transmission, and includes communication data. The data packets to be transmitted and received comprise data packets to be received and data packets to be transmitted. The data packet to be received may be a data packet received by the communication unit of the mobile terminal through the network, where the data packet waits to be allocated to a process corresponding to the data packet for processing, that is, data in the data packet is data processed by the corresponding process. The data packet to be transmitted is a data packet generated by the mobile terminal and needs to be transmitted by the communication unit through the network, for example, to a server, to other mobile terminals, etc.
The mobile terminal can identify the category to which the data packet to be transmitted and received belongs. In the embodiment of the present application, for convenience of description, the currently identified class of the data packet is defined as the target class, that is, the class identified as the current data packet is defined as the target class.
Step S120: and according to the corresponding relation between the class and the queue, placing the data packet into the queue corresponding to the target class, wherein different queues have different priorities.
In the embodiment of the application, the mobile terminal comprises the queues for storing the data packets to be received and transmitted, and the queues corresponding to different categories have different priorities, so that the data packets of different categories have different priorities. After determining the category to which the data packet to be received and transmitted belongs, the data packet can be put into a queue corresponding to the category to which the data packet belongs.
Step S130: and correspondingly receiving or transmitting the data packets in each queue according to the priority from high to low.
When data is transmitted and received, the processing is performed according to the priority of the queue from high to low. I.e., a high priority queue in which stored packets are preferentially processed; a low priority queue in which stored packets are processed with a lower priority than packets in a higher priority queue.
The processing of the data packet may be corresponding receiving or transmitting of the data packet. The sending of the data packet may be that, for the data packet to be sent, the data packet is sent through a communication unit; the receiving of the data packet may be that, for the data packet to be received, the data packet is allocated to a process corresponding to the data packet, and the corresponding process processes the data packet.
In the embodiment of the application, the data packet to be transmitted and received is identified in the category, and the data packet is put into the queue corresponding to the category. Because different queues have different priorities and the data packets are received or transmitted according to the priorities from high to low, the data packet receiving and transmitting speed in the queue with high priority is higher than that in the queue with low priority, so that the data packet receiving and transmitting speeds of different types can be different, and the actual requirements of users on the data receiving and transmitting speeds of different tasks in the mobile terminal are met.
In the data transceiving control method provided by the other embodiment of the application, priority setting or adjustment of different queues is described. Specifically, referring to fig. 2, the method provided in this embodiment includes:
step S210: and identifying the category to which the data packet to be transmitted and received belongs as a target category.
In the embodiment of the application, when the mobile terminal has the data packet to be transmitted and received, the category to which the data packet belongs is identified.
A plurality of categories and correspondence between the categories and the identity information may be preset.
In one embodiment, the number of categories set is determined according to the number of priorities, i.e. how many priorities need to be set, i.e. how many categories are set; in the corresponding relation between the set identity information and the category, the identity information of the data packets processed with the same priority level can be set to correspond to the same category.
In another embodiment, the number of types of packets may be set according to the number of different types of packets according to the identity information of the packets, and each type of packet corresponds to one type of identity information. If the identity information of the data packet is a protocol, it can be how many different protocols exist, and then the data packet is divided into how many categories; the identity information of the data packet is a port, and can be the number of ports, and is divided into different categories; the identity information of the data packet is user identification (UID, (User Identification), which may be how many types of UIDs are, and into how many types of categories.
In this embodiment, if the identity information of the data packet includes multiple types, including the protocol, the port and the UID, different priorities may be set for different identity information, and if the same data packet is classified into different categories according to the different identity information, the category classification of the data packet is performed according to the identity information of the highest priority corresponding to the data packet.
In yet another embodiment, the classification may also be performed according to the usage scenario of the mobile terminal, i.e. how many different usage scenarios the mobile terminal may be used in, how many kinds of categories are set, each corresponding to a usage scenario. In this embodiment, the mobile terminal may specifically include which usage scenarios are not limited, such as a basic scenario for establishing and maintaining a network connection, and a surfing scenario for web browsing; a download scene of file download; video scenes for video viewing; game scenes in which games are played through a game application, and the like.
In one embodiment, the data packet of each application program may be used as a class, and if one application program is newly installed in the mobile terminal, a class is newly added, where the data packet of the application program belongs to the class corresponding to the application program.
The specific setting mode and dividing mode of the category and the corresponding relation between the category and the identity information in the embodiment of the application are not limited, and the above various embodiments can be crossed or combined under the condition of conforming to logic, and can also be set according to actual needs.
In addition, each data packet has identity information, and the identity information of the data packet can be determined. If the data packet is analyzed, the field corresponding to the identity information is obtained, so that the identity information is obtained. The specific manner of acquiring the identity information of the data packet is not limited in the embodiment of the present application, and may be acquired by an Iptables tool, for example.
For each data packet, determining the category to which each data packet belongs according to the corresponding relation between the identity information and the category. Therefore, for the data packet to be transceived, the identity information of the data packet can be obtained, the category corresponding to the identity information of the data packet is identified according to the preset corresponding relation between the identity information of the data packet and the category, and the identified category is defined as the target category.
The identity information of the data packet may include one or more of a user identification, a protocol, and a port of the data packet. For example, the categories of the data packets include basic categories corresponding to basic data packets for establishing and maintaining network connections; the internet category corresponds to a data packet generated by web browsing; the download category corresponds to the data packet generated during file downloading; video category, corresponding to data packets of video playing, etc. of the video application; the game category corresponds to the data packet generated by the game application program. The identified protocol, UID and port corresponding to the DNS, DHCP, ARP message can be used as the data packet of the basic class; identifying data packets corresponding to identity information such as an http protocol, an https protocol, a port corresponding to web browsing, a UID corresponding to web browsing application program and the like as internet surfing types; identifying a data packet with the identity information being an ftp protocol, a specific download port and a UID of a file downloading related process as a downloading type; identifying the categories of data packets with the identity information of UIDs of game applications, data protocols of game characteristics, game related ports and the like as game categories; and taking the data packets of which the identity information is a video protocol such as video streaming, multicast and the like, a specific port related to video and a UID related to video application as video data.
Step S220: the priorities of the different queues are determined.
In the embodiment of the application, different queues can be created for storing the data packets to be transmitted and received. The specifically created queue is not limited in the embodiment of the present application, and may be a Traffic Control (TC) queue, for example. For different queues, the categories are corresponding, wherein the categories can be in one-to-one correspondence with the queues; or a plurality of categories correspond to one queue, each category corresponds to only one queue, namely the categories and the queues can be in a one-to-one relationship or a many-to-one relationship. In addition, the queues also correspond to different priorities, so that different priorities corresponding to different types of the queues are realized.
In one embodiment, the queues may be automatically created by the mobile terminal or factory default created, each created queue having a default priority, each created queue corresponding to a class of data packets. Such as a default surfing category, a game category, a video category and a download category, respectively correspond to different queues, and the priority of the corresponding queues is from high to low.
In this embodiment, the default priority of the created queue may be set randomly or may be set based on big data statistics. Alternatively, the statistical setting may be performed according to the big data, in which the statistically available user has the highest probability of setting which queue has the highest priority, that is, the queue is set as the priority, for example, the queue having the highest probability of being set as the first priority is set as the first priority, the queue having the highest probability of being set as the second priority is set as the second priority, and so on. Wherein the first priority, the second priority, the third priority, the fourth priority, etc. are sequentially lowered.
In one embodiment, the queues may also be created by the user, and the correspondence of the queues to the categories of the data packets and the priorities of the queues may also be specified by the user. In this embodiment, the user may initiate a queue creation request at the mobile terminal and designate a class corresponding to the created queue and a priority of the queue, create a new queue according to the queue creation request of the user, establish a correspondence between the queue and the class designated by the user, and set the priority of the queue to the priority designated by the user.
In the embodiment of the present application, the manner of creating the queue is not limited, and may be any of the above embodiments; combinations of the above embodiments are also possible, e.g. created partly automatically by the mobile terminal and partly by the user request. When part of the queues are automatically created by the mobile terminal and part of the queues are created by the user request, if the priority of the queues created by the user is designated as the non-lowest priority, the priority of the queues created by the user is adjusted to the priority designated by the user, and the priority of the queues with the same priority and lower priority is sequentially adjusted.
In addition, optionally, in the embodiment of the present application, the timing of creating the queue by the user is not limited. Optionally, the creation of the queue may be performed at a queue creation interface, and priority setting of the newly created queue and corresponding relation setting of the queue and the category.
Alternatively, when a new task is started in the mobile terminal, for example, a new application is started, a new process is started, and a queue creation key may be displayed. If the user clicks the queue creation key, a new queue is created, a corresponding relation is established between the class to which the data packet of the new task belongs and the new queue, and the priority of the new queue is set to be higher than the priority of other queues in the priority adjustable range.
Optionally, the corresponding queue creating key may further display a priority adjusting key, and in response to the touch of the priority adjusting key, the current queues and the priorities of the queues may be displayed in a floating manner, and the user may adjust the priorities of the queues so that the priorities of the queues reach a state desired by the user.
Optionally, in the embodiment of the present application, priority adjustment may also be performed on the created queue.
In one embodiment, the priority of the queue may be adjusted by the user.
Specifically, in this embodiment, the user may perform a priority configuration operation on the mobile terminal, and the mobile terminal adjusts the priority of each queue according to the received priority configuration operation. Wherein the priority configuration operation may be performed at a priority creation interface; or at an interface dedicated to priority configuration; or, in response to the touch of the adjustment key for adjusting the priority, the interface at the time of touch may suspend and display the priority of each queue and receive the configuration operation of the user.
In this embodiment, the specific operation manner of performing the configuration is not limited. For example, the queues may be displayed in order of priority from high to low, and the user may drag the queues to adjust the high and low positions of the queues. If the position of the queue is adjusted to be high, the priority of the queue is adjusted to be high, if the position of the queue is adjusted to be low, the priority of each adjusted queue is adjusted to be correspondingly from high to low according to the display position from high to low. For example, the priority of the queue may be represented by a number or a letter, and the user may fill out or select the number or letter corresponding to each queue to determine the priority of the queue. If the priority filled or selected by the user is the priority of other queues, the priority of the queues which are originally the priority and lower than the priority is sequentially reduced.
The user's demand for priority may be the same for the same kind of task. The mobile terminal may be in different usage scenarios, and the mobile terminal may be used to perform different types of tasks in different usage scenarios of the mobile terminal. And, under different use scenes, the data packet generated has corresponding category. Thus, in another embodiment, a current usage scenario of the mobile terminal may be determined; and taking the queue corresponding to the category to which the data packet corresponding to the current use scene belongs as the queue corresponding to the current use scene, and increasing the priority corresponding to the current use scene, so that the data packet receiving and transmitting speed of the current use scene is higher.
Specifically, in this embodiment, the usage scenario of the mobile terminal is what task the mobile terminal is currently in execution, and may be determined by a process running in the mobile terminal, if a process related to the game application is running, it indicates that the mobile terminal is in a game scenario; if the process related to the video application program is running, the mobile terminal is indicated to be in a video scene; if the process of the application program related to the webpage is running, the mobile terminal can be determined to be in the Internet scene; if the process for file downloading is running, it may be determined that the mobile terminal is in a file download scenario. Therefore, in this embodiment, a correspondence between a process and a usage scenario may be set, and a manner of determining the current usage scenario of the mobile terminal may be to obtain a process that the mobile terminal is currently running; and determining the use scenes corresponding to the currently running processes respectively according to the corresponding relation between the processes and the use scenes, and taking the use scenes as the current use scenes of the mobile terminal. Of course, in this embodiment, the usage scenario of the mobile terminal may also be determined according to an application program running in the mobile terminal, and in the embodiment of the present application, a process is mainly described as an example.
In this embodiment, the current usage scenario may be determined periodically, may be determined in real time, or may be determined when a new process is started, and specifically, when the current usage scenario is determined is not limited in the embodiment of the present application.
In addition, in this embodiment, after determining the current usage scenario, a queue corresponding to the current usage scenario may be determined.
Optionally, the manner of determining the queue corresponding to the current usage scenario may be to determine the data packet corresponding to the current usage scenario; and determining the category to which the data packet corresponding to the current use scene belongs. And determining the queue corresponding to the current use scene as the queue corresponding to the class to which the data packet corresponding to the current use scene belongs because each class corresponds to the queue. For example, if the packet corresponding to the current usage scenario is P, the class to which the packet P belongs is C, and the queue corresponding to the class C is Q, it may be determined that the queue corresponding to the current usage scenario is Q.
The data packet corresponding to the current use scenario is a data packet for executing the task of the current use scenario, such as a data packet that is currently received and transmitted by the process corresponding to the current use scenario. If the current usage scenario includes a plurality of usage scenarios, a data packet corresponding to each usage scenario may be determined.
Optionally, since the class to which the data packet of each usage scenario belongs is basically unchanged, the correspondence between the usage scenario and the queue may be preset, and in the preset correspondence, the corresponding queue of the class to which the data packet corresponding to the usage scenario belongs may be the queue corresponding to the usage scenario. The method for determining the queue corresponding to the current use scene may also be to determine the queue corresponding to the current use scene according to the corresponding relation between the use scene and the queue.
In addition, in this embodiment, after determining the queue corresponding to the current usage scenario, the priority of the queue corresponding to the current usage scenario may be increased. If the current use scenes of the mobile terminal are multiple, the priority of a plurality of queues corresponding to the current use scenes is increased, and the increasing amplitude of the queue corresponding to the use scene to which the process running in the foreground belongs is larger than that of the queue corresponding to the use scene to which the process running in the background belongs.
In one embodiment, the priority of the queue corresponding to the current use scenario may be adjusted to the highest priority in the adjustable range, so that the data packet corresponding to the current use scenario may be sent and received at a faster speed, and other data packets not belonging to the current use scenario may be sent and received at a lower speed.
In this embodiment, if the number of current use scenarios is plural, the queue corresponding to the foreground use scenario may be adjusted to the highest priority within the adjustable range, and the priority of the queue corresponding to the background use scenario may be adjusted to be lower than the priority of the queue corresponding to the foreground use scenario and higher than the priority of the other queues. The foreground use scene is a use scene corresponding to a foreground running process or a use scene to which the foreground running process belongs; the background usage scenario is a usage scenario of a process running in the background, or a usage scenario to which the process running in the background belongs.
In another embodiment, the priority of the queue corresponding to the current use scenario may be up-regulated by a set level number, for example, the queue corresponding to the current use scenario is the fourth priority before being regulated, and the queue corresponding to the current use scenario is up-regulated by two levels and then becomes the second priority. The specific number of levels up-regulated is not limited in the embodiments of the present application.
Alternatively, in this embodiment, different usage scenarios may correspond to different level numbers, and the current usage scenario is up-regulated by the level number corresponding to the current usage scenario. Alternatively, the more usage scenarios that need to send and receive data in a unit time, the higher the corresponding level number may be, for example, the higher the level number corresponding to the game scenario is than the level number corresponding to the internet scenario.
Optionally, in this embodiment, the number of levels corresponding to the foreground usage scenario may be higher than the number of levels corresponding to the background usage scenario, so that data of the foreground usage scenario may be sent and received more preferentially.
Optionally, in the embodiment of the present application, since data transceiving depends on network establishment and connection, data related to network establishment and connection may have the highest priority to ensure that the network is unobstructed. Therefore, in the embodiment of the application, the queues corresponding to the basic scene and the basic category can be fixed as the queues with the highest priority, namely, the queues for storing the data packets for establishing the network connection and maintaining the network connection are used as the queues with the highest priority. The priority of the other queues is adjusted based on the priority of the queue storing data packets for establishing and maintaining the network connection. In addition, optionally, other types of data packets may be stored in a queue storing data packets for establishing and maintaining network connection, where the storage may be of a type that needs to ensure that the data transmission and reception speed is higher than that of other data packets.
In the embodiment of the present application, the sequence between the step S220 and the step S210 is not limited, and the step S210 may precede the step S220, the step S220 may precede the step S210, or the step S210 and the step S220 may be executed simultaneously.
Step S230: and according to the corresponding relation between the class and the queue, placing the data packet into the queue corresponding to the target class, wherein different queues have different priorities.
And (3) queuing the data packets to be transmitted and received according to the types of the data packets, namely placing the data packets in the queues corresponding to the types of the data packets, and placing the data packets of the target types in the queues corresponding to the target types of the data packets.
Optionally, in the embodiment of the present application, the data packet includes a data packet to be received and a data packet to be sent, and for the data packet to be received and the data packet to be sent in the same class, the same queue may be put in the first-in data packet, and the first-out data packet may be put in the first-out queue.
Optionally, each queue may include two sub-queues, where the data packet to be received is placed in the sub-queue for storing the received data, and the data packet to be sent is used in the sub-queue for storing the sent data, where the priorities of the two sub-queues are the same. The data of the two sub-queues can be cross-processed, i.e. if the last processing is the data packet in one sub-queue, the next processing is the data packet in the other sub-queue. Alternatively, the data packets in the two sub-queues are processed according to the general first-in first-out process, and the data packet which enters the queue first is always processed before the data packet which enters the queue later.
Step S240: and correspondingly receiving or transmitting the data packets in each queue according to the priority from high to low.
When the mobile terminal processes the data packets in each queue, the mobile terminal processes the data packets from high priority to low priority, so that the data packets in the queues with high priority are processed preferentially. The processing includes receiving or transmitting the data packet, and specific receiving or transmitting may refer to the corresponding steps of the foregoing embodiments, which are not described herein.
In one embodiment, the data packets in the queue with the higher priority may be traversed and processed from the high priority to the low priority, and then the data packets in the queue with the lower priority may be traversed and processed.
In one embodiment, the scale value may be set from high to low according to priority. Alternatively, the higher the priority, the lower the scale value may be. And when the ratio of the number of the data packets in the high-priority queue to the number of the data packets in the queue capable of storing the data packets is ensured to be lower than the corresponding ratio value, processing the data packets in the next-priority queue, and in the process of processing the data packets in the low-priority queue, if the ratio of the number of the data packets in the high-priority queue to the number of the data packets in the queue capable of storing the data packets is higher than or equal to the corresponding ratio value, switching to process the data packets in the high-priority queue with the ratio higher than or equal to the corresponding ratio value.
For example, in this embodiment, the first queue, the second queue and the third queue are respectively the first queue, the second queue and the third queue, and the first queue is the first priority, the second queue is the second priority and the third queue is the third priority, and the priorities of the first priority, the second priority and the third priority are sequentially decreased. When the proportion of the number of the data packets in the first queue to the storable number is lower than the proportion value corresponding to the first queue, processing the data packets in the second queue; when processing the queues in the second data packets, if the quantity of the data packets in the first queue changes to be higher than or equal to the corresponding proportion value of the first queue in proportion to the storable quantity, firstly processing the data packets in the first queue until the proportion of the quantity of the data packets in the first queue in proportion to the storable quantity is lower than the corresponding proportion value of the first queue; and in the process of processing the data packets in the third queue, if the quantity of the data packets in the first queue or the second queue is changed to be higher than the corresponding proportion again, processing the data packets in the first queue or the second queue first and processing the data packets in the first queue preferentially.
In one embodiment, the processing frequency of the data packets in the queues with different priorities may be different, and the processing frequency of the data packets in the queues with high priorities may be higher than the processing frequency of the data packets in the queues with low priorities. The processing frequency represents the number of packets processed per unit time.
For example, in the foregoing first queue, second queue, and third queue, in this embodiment, the first queue processes x packets, the second queue processes y packets, and the third queue processes z packets, where x, y, and z are positive integers, and x is greater than y and greater than z.
For another example, after each x data packets are processed by the first queue, the second queue is processed, after y data packets are processed by the second queue, the third queue is processed, and after z data packets are processed by the third queue, the first queue is processed, where x is greater than y and greater than z.
Alternatively, in this embodiment, it is also possible to set that the bandwidths corresponding to the queues with different priorities are different, and the bandwidths corresponding to the queues with priorities from high to low are from high to low.
In the embodiment of the application, for the data packet to be received and transmitted, the category to which the data packet belongs can be determined, and the queue corresponding to the data packet can be determined according to the corresponding relation between the category and the queue. And when data is transmitted and received, transmitting and receiving are performed from high to low according to the priority. For different queues, the priority of the queues can be set and adjusted, so that the corresponding queues are set to be higher in priority under the scene of faster data receiving and transmitting speed, and the processing speed of the queues is higher; and for the use scene with low data receiving and transmitting speed requirement, the speed of the data can be limited. Under the condition that the processing speed of the data packet is higher, the corresponding task execution speed is higher so as to meet the actual use requirement of a user.
The embodiment of the application also provides a data receiving and transmitting control device 300, which can be applied to a mobile terminal. As illustrated in fig. 3, the apparatus 300 may include: a class identification module 310, configured to identify a class to which a data packet to be transceived belongs as a target class; an enqueuing module 320, configured to put the data packet into a queue corresponding to the target class according to a corresponding relation between the class and the queue, where different queues have different priorities; and a data processing module 330, configured to correspondingly receive or transmit the data packets in each queue according to the priority from high to low.
Optionally, the apparatus may further include a priority setting module, configured to determine a current usage scenario of the mobile terminal; and taking the queue corresponding to the category to which the data packet corresponding to the current use scene belongs as the queue corresponding to the current use scene, and increasing the priority of the queue corresponding to the current use scene.
Optionally, the determining, by the priority setting module, the current usage scenario of the mobile terminal may include: acquiring a current running process of the mobile terminal; and determining the use scenes corresponding to the currently running processes respectively according to the corresponding relation between the processes and the use scenes, and taking the use scenes as the current use scenes of the mobile terminal.
Optionally, the priority setting module increases the priority of the queue corresponding to the current usage scenario, which may include: if the current use scenes of the mobile terminal are multiple, the priority of a plurality of queues corresponding to the current use scenes is increased, and the increasing amplitude of the queue corresponding to the use scene of the process running in the foreground is larger than that of the queue corresponding to the use scene of the process running in the background.
Optionally, the priority setting module may be further configured to adjust the priority of each queue according to the received priority configuration operation.
Optionally, the priority setting module may be further configured to use a queue for storing data packets for establishing and maintaining a network connection as a highest priority queue.
Optionally, the category identifying module 310 identifies a category of the data packet to be transceived as a target category, which may include: and identifying the category corresponding to the identity information of the data packet as the target category according to the preset corresponding relation between the identity information of the data packet and the category, wherein the identity information comprises one or more of user identity, protocol and port.
In the embodiment of the application, the priority control of the data packet transceiving is carried out from the mobile terminal side, the real requirement of the current user can be identified according to the direct operation of the user, and therefore, the priority of each type of data packet can be flexibly adjusted according to the actual use requirement of the mobile terminal, so that the speed limit or the speed increase of the data packet transceiving of different types can be carried out, and the improvement or the limitation of the task processing speed under different scenes can be realized.
It will be apparent to those skilled in the art that, for convenience and brevity of description, reference may be made to the above-described embodiments of the method; the specific working process of the above-described device and module may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In several embodiments provided by the present application, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules. The modules may be configured in different mobile terminals or may be configured in the same mobile terminal, and embodiments of the present application are not limited.
Referring to fig. 4, a block diagram of a mobile terminal 500 according to an embodiment of the application is shown. The mobile terminal may include one or more processors 510 (only one shown), memory 520, and one or more programs. Wherein the one or more programs are stored in the memory 520 and configured to be executed by the one or more processors 510. The one or more programs are executed by the processor for performing the methods described in the previous embodiments.
Processor 510 may include one or more processing cores. The processor 510 connects various parts within the overall mobile terminal 500 using various interfaces and lines, and performs various functions of the mobile terminal 500 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 520, and invoking data stored in the memory 520. Alternatively, the processor 510 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 510 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 510 and may be implemented solely by a single communication chip.
The Memory 520 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 520 may be used to store instructions, programs, code sets, or instruction sets. The memory 520 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, and the like. The stored data area may also be data created by the mobile terminal in use, etc.
Referring to fig. 5, a block diagram of a computer readable storage medium according to an embodiment of the application is shown. The computer readable storage medium 700 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 700 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 700 has memory space for program code 710 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 710 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (8)

1. A data transceiving control method, characterized in that it is applied to a mobile terminal, the method comprising:
identifying the category of the data packet to be transmitted and received as a target category;
acquiring a current running process of the mobile terminal;
according to the corresponding relation between the processes and the usage scenes, determining the usage scenes corresponding to the processes currently running respectively as the current usage scenes of the mobile terminal;
taking a queue corresponding to the category to which the data packet corresponding to the current use scene belongs as a queue corresponding to the current use scene, and increasing the priority of the queue corresponding to the current use scene;
according to the corresponding relation between the class and the queue, the data packet is put into the queue corresponding to the target class, the priorities of different queues are different, each queue corresponds to a proportion value, and the proportion value corresponding to the queue with higher priority is lower;
and correspondingly receiving or transmitting the data packets in each queue according to the priority from high to low, wherein when the proportion of the number of the data packets in the queue with higher priority to the number of the data packets which can be stored in the queue is lower than a corresponding proportion value, the data packets in the queue with next priority are processed, and when the proportion of the number of the data packets in the queue with higher priority to the number of the data packets which can be stored in the queue with lower priority is higher than or equal to the corresponding proportion value in the process of processing the data packets in the queue with lower priority, the data packets in the queue with higher priority are recovered to be processed.
2. The method of claim 1, wherein said raising the priority of the current usage scenario correspondence queue comprises:
if the current use scenes of the mobile terminal are multiple, the priority of a plurality of queues corresponding to the current use scenes is increased, and the increasing amplitude of the queue corresponding to the use scene of the process running in the foreground is larger than that of the queue corresponding to the use scene of the process running in the background.
3. The method according to claim 1, wherein the step of placing the data packet in the priority queue corresponding to the target class according to the correspondence between the class and the priority queue includes:
and adjusting the priority of each queue according to the received priority configuration operation.
4. A method according to any one of claims 2 to 3, wherein the method further comprises:
the queue for storing the data packets for establishing and maintaining the network connection is used as the queue with the highest priority.
5. The method according to claim 1, wherein identifying the class of the data packet to be transceived as the target class comprises:
and identifying the category corresponding to the identity information of the data packet as the target category according to the preset corresponding relation between the identity information of the data packet and the category, wherein the identity information comprises one or more of user identity, protocol and port.
6. A data transmission/reception control apparatus, which is applied to a mobile terminal, the apparatus comprising:
the class identification module is used for identifying the class to which the data packet to be transmitted and received belongs as a target class;
the priority setting module is used for acquiring the current running process of the mobile terminal; according to the corresponding relation between the processes and the usage scenes, determining the usage scenes corresponding to the processes currently running respectively as the current usage scenes of the mobile terminal; taking a queue corresponding to the category to which the data packet corresponding to the current use scene belongs as a queue corresponding to the current use scene, and increasing the priority of the queue corresponding to the current use scene;
the enqueuing module is used for putting the data packet into the queue corresponding to the target class according to the corresponding relation between the class and the queue, the priorities of different queues are different, each queue corresponds to a proportion value, and the proportion value corresponding to the queue with higher priority is lower;
and the data processing module is used for correspondingly receiving or transmitting the data packets in each queue according to the priority from high to low, wherein when the proportion of the number of the data packets in the queue with higher priority to the number of the data packets which can be stored in the queue is lower than a corresponding proportion value, the data packets in the queue with next priority are processed, and when the proportion of the number of the data packets in the queue with higher priority to the number of the data packets which can be stored in the queue with higher priority is higher than or equal to the corresponding proportion value in the process of processing the data packets in the queue with lower priority, the data packets in the queue with higher priority are recovered to be processed.
7. A mobile terminal, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being executed by the processor for performing the method of any of claims 1-5.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for executing the method according to any one of claims 1-5.
CN202010280709.7A 2020-04-10 2020-04-10 Data receiving and transmitting control method and device, mobile terminal and storage medium Active CN111459690B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010280709.7A CN111459690B (en) 2020-04-10 2020-04-10 Data receiving and transmitting control method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010280709.7A CN111459690B (en) 2020-04-10 2020-04-10 Data receiving and transmitting control method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111459690A CN111459690A (en) 2020-07-28
CN111459690B true CN111459690B (en) 2023-09-08

Family

ID=71678578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010280709.7A Active CN111459690B (en) 2020-04-10 2020-04-10 Data receiving and transmitting control method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111459690B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069105B (en) * 2020-07-31 2022-09-23 深圳市优必选科技股份有限公司 Serial port communication processing method and device and electronic equipment
CN112134813A (en) * 2020-09-22 2020-12-25 上海商米科技集团股份有限公司 Bandwidth allocation method based on application process priority and electronic equipment
CN112631811A (en) * 2020-12-30 2021-04-09 中国农业银行股份有限公司 Data processing method and device
CN115208845A (en) * 2021-04-09 2022-10-18 盛立安元科技(杭州)股份有限公司 Method, apparatus, device, storage medium, and program product for transmitting data packet
CN115086248A (en) * 2022-06-15 2022-09-20 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer equipment
CN117278490B (en) * 2023-10-18 2024-04-02 石家庄常宏建筑装饰工程有限公司 Internet of things gateway data rapid transmission method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035732A (en) * 2010-11-25 2011-04-27 华为技术有限公司 Service scheduling method and device
CN103024699A (en) * 2011-09-22 2013-04-03 北京神州泰岳软件股份有限公司 Short message sending method and information resource station entity
CN103532877A (en) * 2013-10-29 2014-01-22 华北科技学院 Scheduling method for guaranteeing real-time transmission of wireless sensor network information

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217499B (en) * 2008-01-21 2010-12-01 中兴通讯股份有限公司 Array dispatching method
CN102035748B (en) * 2010-12-31 2014-07-30 深圳市深信服电子科技有限公司 Application-based traffic control method and controller
CN104125167A (en) * 2014-07-24 2014-10-29 海信集团有限公司 Flow control method and device
CN105490962B (en) * 2015-12-04 2018-10-26 哈尔滨工程大学 A kind of QoS management methods based on OpenFlow networks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035732A (en) * 2010-11-25 2011-04-27 华为技术有限公司 Service scheduling method and device
CN103024699A (en) * 2011-09-22 2013-04-03 北京神州泰岳软件股份有限公司 Short message sending method and information resource station entity
CN103532877A (en) * 2013-10-29 2014-01-22 华北科技学院 Scheduling method for guaranteeing real-time transmission of wireless sensor network information

Also Published As

Publication number Publication date
CN111459690A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN111459690B (en) Data receiving and transmitting control method and device, mobile terminal and storage medium
CN111240837B (en) Resource allocation method, device, terminal and storage medium
CN106850402B (en) Message transmission method and device
CN107547746B (en) Resource allocation method and related product
KR101346549B1 (en) Technique for setting network communication parameters
WO2020038175A1 (en) Data-stream allocation method for link aggregation and related devices
CN112003785B (en) Link aggregation method and related product
CN113574836B (en) Electronic device and method for controlling data transmission
CN110312283B (en) Information processing method and device
CN109062715B (en) Method and device for determining memory clock frequency and terminal
US11924255B2 (en) Data transmission method and apparatus, server, storage medium, and program product
CN112868265A (en) Network resource management method, management device, electronic device and storage medium
CN110392098B (en) Self-adaptive virtual desktop transmission method and device
CN114077568A (en) Inter-core communication method and device, electronic assembly and electronic equipment
CN105511587B (en) Method and device for controlling radio frequency link
CN114286447A (en) Method, device and storage medium for adjusting scheduling priority
CN114048441A (en) Control method and device for login user, storage medium and terminal equipment
CN109729061A (en) Message treatment method, device, equipment and readable storage medium storing program for executing
CN113438169A (en) Data scheduling method, electronic equipment and storage medium
CN114553281A (en) Antenna number configuration method and device, electronic equipment and storage medium
US11456960B2 (en) Method of network data transmission and method of network data reception
CN107888540B (en) Network anti-attack method and network equipment
CN111327695B (en) Resource downloading method and related device
CN109819274B (en) Data transmission method, data processing method and device
CN113891398B (en) Resource determination method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant