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

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

Info

Publication number
CN111459690A
CN111459690A CN202010280709.7A CN202010280709A CN111459690A CN 111459690 A CN111459690 A CN 111459690A CN 202010280709 A CN202010280709 A CN 202010280709A CN 111459690 A CN111459690 A CN 111459690A
Authority
CN
China
Prior art keywords
queue
priority
data packet
data
mobile terminal
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.)
Granted
Application number
CN202010280709.7A
Other languages
Chinese (zh)
Other versions
CN111459690B (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

Images

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 sending 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 class to which the data packet to be transmitted and received belongs as a target class; 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 sending the data packets in each queue according to the priority from high to low, so that certain types of data can be processed preferentially, and the receiving and sending speed of the data needing to be processed preferentially is improved.

Description

Data transmitting and receiving 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 and apparatus, a mobile terminal, and a storage medium.
Background
In the using process of the mobile terminal connected with the network, the data of different tasks are received and transmitted according to the principle of one view, for example, the data generated firstly is transmitted firstly, and the data arriving firstly is received firstly, so that the data receiving and transmitting speed of the task with high requirement on the data receiving and transmitting speed is probably slower, and the data receiving and transmitting speed of the task with low requirement on the data receiving and transmitting speed is probably faster, which does not meet the actual use requirement of a user.
Disclosure of Invention
In view of the above problems, the present application provides a data transmission and reception control method, apparatus, mobile terminal and storage medium to improve the above problems.
In a first aspect, an embodiment of the present application provides a data transceiving control method, which is applied to a mobile terminal, and the method includes: identifying the class to which the data packet to be transmitted and received belongs as a target class; 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 sending 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 transceiving control device, which is applied to a mobile terminal, and 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 class according to the corresponding relation between the class and the queue, and different queue priorities are different; and the data processing module is used for correspondingly receiving or sending 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 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, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
According to the data receiving and sending control method, the data receiving and sending control device, the mobile terminal and the storage medium, the data packets to be received and sent are placed into the corresponding queues according to the types of the data packets, different queues have different priorities, and the data receiving or sending is carried out according to the priorities from high to low, so that data of certain types can be processed preferentially, and the receiving and sending speed of the data needing to be processed preferentially is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
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 is a functional block diagram illustrating a data transmission/reception control apparatus 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 storage unit for storing or carrying program codes for implementing a data transmission/reception control method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The mobile terminal can receive and transmit data through the network in a network connection state. 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 transferred to a process for processing the data.
The inventor finds that, in the actual use process of the mobile terminal, the user has different requirements on the data transceiving speed of different tasks, and some service users may want the data transceiving speed to be faster so as to complete the service faster; some service users may not be aware of the data transmission and reception speed and how long the data transmission and reception can be completed. Therefore, the inventor proposes a data transceiving control method, device, mobile terminal and storage medium according to the embodiments of the present application, and puts different types of data packets into corresponding queues, where different queues have different priorities, so that each type of data packet can be processed with a corresponding priority, and the transceiving speed of the data packet in the queue with a high priority is increased. The following describes in detail a data transmission and reception control method, apparatus, mobile terminal and storage medium provided in the embodiments of the present application with specific embodiments.
Referring to fig. 1, a data transceiving control method according to an embodiment of the present application is shown. The method is applied to the mobile terminal, and the mobile terminal can be a mobile phone, a tablet computer, a computer, an intelligent wearable device, an electronic reader and the like, and is not limited in the embodiment of the application. Specifically, as shown in fig. 1, the data transmission/reception control method includes:
step S110: and identifying the class to which the data packet to be transmitted and received belongs as a target class.
The data packet is a data unit in communication transmission, and includes communication data. The data packets to be transmitted and received include 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, and 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 generated by the mobile terminal, and the data packet needs to be transmitted by the communication unit through the network, such as to the server, to other mobile terminals, and the like.
The mobile terminal can identify the category of the data packet to be transmitted and received. In the embodiment of the present application, for convenience of description, the class of the currently identified data packet is defined as the target class, that is, the class of the currently identified data packet is identified as the target class.
Step S120: and putting the data packet into the queue corresponding to the target category according to the corresponding relation between the category and the queue, wherein different queues have different priorities.
In the embodiment of the application, the mobile terminal comprises queues for storing the data packets to be received and sent, different types of queues correspond to different categories, and the queues corresponding to the different categories have different priorities, so that the data packets of the different categories have different priorities. After determining the class to which the data packet to be received and transmitted belongs, the data packet may be placed in a queue corresponding to the class to which the data packet belongs.
Step S130: and correspondingly receiving or sending the data packets in each queue according to the priority from high to low.
When data is transmitted and received, the data is processed from high to low according to the queue priority. Namely, a queue with high priority, wherein the stored data packets are processed preferentially; and the queue with low priority, wherein the stored data packet has lower processing priority than the data packet in the queue with higher priority.
The processing of the data packet may be the corresponding receiving or sending of the data packet. The data packet may be sent by the communication unit for the data packet to be sent; the data packet may be received by allocating the data packet to a process corresponding to the data packet and processing the data packet by the corresponding process.
In the embodiment of the application, the type of the data packet to be transmitted and received is identified, and the data packet is placed in the queue corresponding to the type of the data packet. Because different queues have different priorities and the data packets are received or sent according to the priorities from high to low, the receiving and sending speeds of the data packets in the queues with high priorities are higher than the receiving and sending speeds of the data packets in the queues with low priorities, and the receiving and sending speeds of the data packets in different classes can be different, so that the actual requirements of users on the data receiving and sending speeds of different tasks in the mobile terminal are met.
In a data transceiving control method provided in another embodiment of the present 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 class to which the data packet to be transmitted and received belongs as a target class.
In the embodiment of the application, when the mobile terminal has the data packet to be transmitted and received, the class to which the data packet belongs is identified.
Various categories and the corresponding relationship between the categories and the identity information can be preset.
In one embodiment, the number of the set categories is determined according to the number of the priorities, that is, how many priorities need to be set, that is, how many categories are set; in the set correspondence between the identity information and the category, the identity information of the packets processed with the same priority may be set to correspond to the same category.
In another embodiment, the number of different data packets may be set according to the number of different data packets into which the identity information of the data packet can be divided, and each type corresponds to a data packet of one kind of identity information. If the identity information of the data packet is a protocol, the identity information can be divided into different categories according to different protocols; if the identity information of the data packet is a port, the number of ports can be determined, and the ports are divided into different categories; the identity information of the data packet is User Identification (UID), which may be classified into how many kinds of UID.
In this embodiment, if the identity information of a packet includes multiple types, such as a protocol, a port, and a UID, different priorities may be set for different identity information, and if the same packet is classified into different categories according to different identity information, the category of the packet is classified by the identity information of the highest priority corresponding to the packet.
In another embodiment, the mobile terminal may be classified according to the usage scenarios thereof, that is, how many different usage scenarios the mobile terminal may use, how many categories are set, and each category corresponds to one 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 network connection, and an internet scenario for web browsing; a download scenario of file download; a video scene of the video viewing; a game scene of a game by a game application, and the like.
In one embodiment, the data packet of each application program may be regarded as a category, and each new application program is installed in the mobile terminal, the category is added, and the data packet of the application program belongs to the category corresponding to the application program.
The specific setting mode and the dividing mode of the categories and the corresponding relationship between the categories and the identity information in the embodiments of the present application are not limited, and the various embodiments may be crossed or combined in accordance with logic, or may 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, and therefore 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 the identity information may be acquired by an Iptables tool, for example.
For each data packet, the category to which each data packet belongs can be determined according to the correspondence between the identity information and the category. Therefore, for the data packet to be transmitted and received, the identity information of the data packet can be acquired, 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 category of the data packet includes a basic category corresponding to a basic data packet for establishing a network connection and maintaining the network connection; the network access type corresponds to a data packet generated by webpage browsing; downloading type, corresponding to data packet generated during file downloading; video type, data packets corresponding to video playback of video applications, etc.; the game category corresponds to a data packet generated by a game application. The identified protocol, UID and port corresponding to the DNS, DHCP, ARP and other messages can be used as the data packet of the basic category; identifying data packets corresponding to identity information such as an http protocol, an https protocol, a port corresponding to web page browsing, and a UID (user identifier) of an application program corresponding to web page browsing as an internet access category; identifying a data packet of UID (user identifier) of a process related to file downloading, a specific downloading port and the identity information of which is ftp as a downloading category; identifying the type of a data packet with the identity information of UID of the game application, a data protocol of game characteristics, a port related to the game and the like as a game type; and taking data packets of video protocols such as video streaming and multicast, specific ports related to the video and UIDs related to video applications as video data.
Step S220: the priorities of the different queues are determined.
In the embodiment of the present application, different queues may be created for storing 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 different queues, corresponding to categories, wherein the categories can correspond to the queues one by one; or a plurality of categories correspond to one queue, and each category corresponds to only one queue, that is, the category and the queue may have a one-to-one relationship or a many-to-one relationship. In addition, the queues also correspond to priorities, and the priorities of different queues are different, so that different priorities are corresponding to different types of queues.
In one embodiment, the queues may be created automatically by the mobile terminal or created by factory default, each created queue has a default priority, and each created queue corresponds to a category of the data packet. For example, the default internet surfing category, the game category, the video category and the downloading category respectively correspond to different queues, and the priority of the corresponding queues is changed from high to low.
In this embodiment, the default priority of the created queue may be set randomly or according to big data statistics. Optionally, the mode set according to the big data statistics may be that, among statistical users, which queue has the highest setting probability at which priority, that is, the queue is set as the priority, for example, the queue with the highest probability set as the first priority is set as the first priority, the queue with the highest probability 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 and the like are lower in sequence.
In one embodiment, the queue may be created by a user, and the correspondence between the queue and the category of the packet and the priority of the queue may be specified by the user. In this embodiment, a user may initiate a queue creation request at a mobile terminal and specify a category 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 category specified by the user, and set the priority of the queue to the priority specified by the user.
In the embodiment of the present application, the way of creating the queue is not limited, and may be any of the above embodiments; or a combination of the above embodiments, such as being created in part automatically by the mobile terminal and in part requested by the user. When the queue is partially created by the mobile terminal automatically and partially created by the user request, if the priority of the queue created by the user is specified as the non-lowest priority, the priority of the queue created by the user is adjusted to the priority specified by the user, and the priorities of the original queues with the same priority and lower priorities are sequentially reduced.
In addition, optionally, in this embodiment of the application, the timing for the user to create the queue is not limited. Optionally, the method may include creating a queue on a queue creation interface, setting a priority of the newly created queue, and setting a correspondence between the queue and the category.
Optionally, when a new task is started in the mobile terminal, for example, a new application is opened, a new process is started, and the queue creation key may be displayed. And if the user clicks the queue creation key, creating a new queue, establishing a corresponding relation between the class to which the data packet of the new task belongs and the new queue, and setting the priority of the new queue to be higher than the priorities 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 control of the priority adjusting key, the current queues and the priorities of the queues may be displayed in a suspended 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 this 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 a 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 can be performed on a priority creation interface; or in an interface dedicated to priority configuration; or in response to the touch of an adjustment key for adjusting the priority, displaying the priority of each queue in a floating manner on an interface during touch and receiving the configuration operation of a user.
In this embodiment, the specific operation manner of the configuration is not limited. For example, the queues may be displayed in order from high to low according to the priority, and the user may drag the queue to adjust the high and low positions of the queue. 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 the queue is adjusted to be low, and each adjusted queue shows that the priority of the queue is correspondingly changed from high to low according to the display position. For example, the priority of the queue may be represented by a number, a character, or the like, and the user may fill in or select the number or the character 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 queue which is originally the priority and is lower than the priority is sequentially reduced.
The user's requirements for priority may be the same for the same kind of task. The mobile terminal may be in different usage scenarios, and the different usage scenarios of the mobile terminal for performing the different types of tasks may be different usage scenarios of the mobile terminal. And, under different usage scenarios, the generated data packets have corresponding categories. Therefore, in another embodiment, the current usage scenario of the mobile terminal may be determined; and taking the queue corresponding to the type 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 as to enable the data packet receiving and sending speed of the current use scene to be higher.
Specifically, in this embodiment, the usage scenario of the mobile terminal is what task the mobile terminal is currently in during execution, and may be determined by a process running in the mobile terminal, for example, if a process related to a 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 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 an internet scene; if the process for downloading the file is running, it may be determined that the mobile terminal is in a file download scenario. Therefore, in this embodiment, a corresponding relationship between a process and a usage scenario may be set, and the manner of determining the current usage scenario of the mobile terminal may be to acquire the process currently running by the mobile terminal; and determining the use scenes respectively corresponding to the processes currently running 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 this embodiment, a process is mainly taken as an example for description.
In this embodiment, the current usage scenario may be determined periodically, the current usage scenario may be determined in real time, or the current usage scenario of the mobile terminal may be determined when a new process is started, and the specific time when the current usage scenario is determined is not limited in this embodiment.
In addition, in this embodiment, after the current usage scenario is determined, a queue corresponding to the current usage scenario may be determined.
Optionally, the determining the queue corresponding to the current usage scenario may be determining a data packet corresponding to the current usage scenario; and determining the category of the data packet corresponding to the current use scene. Because each category corresponds to a queue, the queue corresponding to the category to which the data packet corresponding to the current usage scenario belongs is determined as the queue corresponding to the current usage scenario. For example, if the data packet corresponding to the current usage scenario is P, the class to which the data 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 usage scenario is a data packet used for executing a task of the current usage scenario, such as a data packet currently received and transmitted by a process corresponding to the current usage scenario. If the current usage scenario includes a plurality of usage scenarios, the data packet corresponding to each usage scenario may be determined.
Optionally, because the class to which the data packet of each usage scenario belongs is basically unchanged, the corresponding relationship between the usage scenario and the queue may be preset, and in the preset corresponding relationship, the queue corresponding to the class to which the data packet corresponding to the usage scenario belongs may be the queue corresponding to the usage scenario. The mode of determining the queue corresponding to the current usage scenario may also be that the queue corresponding to the current usage scenario is determined according to the correspondence between the usage scenario 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 number of the current using scenes of the mobile terminal is multiple, the priority of the queues corresponding to the current multiple using scenes is increased, and the increasing amplitude of the queue corresponding to the using scene to which the process running in the foreground belongs is larger than that of the queue corresponding to the using scene to which the process running in the background belongs.
In an embodiment, the priority of the queue corresponding to the current usage scenario may be adjusted to the highest priority within an adjustable range, so that the data packet corresponding to the current usage scenario is received and transmitted at a higher speed, and other data packets not belonging to the current usage scenario may be received and transmitted at a lower speed.
In this embodiment, if there are a plurality of current usage scenarios, the queue corresponding to the foreground usage scenario may be adjusted to the highest priority within the adjustable range, and the priority of the queue corresponding to the background usage scenario is adjusted to be lower than the priority of the queue corresponding to the foreground usage scenario and higher than the priorities of the other queues. The foreground using scene is a using scene corresponding to the foreground running process, or a using scene to which the foreground running process belongs; the background use scene is a use scene of a background running process, or a use scene to which the background running process belongs.
In another embodiment, the priority of the queue corresponding to the current usage scenario may be adjusted up to the set number of levels, for example, the queue corresponding to the current usage scenario is the fourth priority before adjustment, and is adjusted up to two levels to become the second priority. The specific number of the up-regulation levels is not limited in the embodiment of the present application.
Optionally, in this embodiment, different usage scenarios may correspond to different levels, and the current usage scenario adjusts up the level number corresponding to the current usage scenario. Optionally, the usage scenario that the more data needs to be transmitted and received in unit time may be that the corresponding level number is higher, for example, the level number corresponding to the game scenario is higher than the level number corresponding to the internet scenario.
Optionally, in this embodiment, the level number corresponding to the foreground usage scenario may be higher than the level number corresponding to the background usage scenario, so that data of the foreground usage scenario may be received and transmitted with higher priority.
Optionally, in this 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, so as to ensure that the network is unobstructed. Therefore, in the embodiment of the present application, the queues corresponding to the basic scenario and the basic category may be fixed as the queues with the highest priority, that is, the queues for storing the packets for establishing the network connection and maintaining the network connection are used as the queues with the highest priority. The priority adjustment of the other queues is performed on the basis of a lower priority than the queue storing packets establishing and maintaining the network connection. In addition, optionally, in the queue storing the data packets for establishing the network connection and maintaining the network connection, other types of data packets may also be stored, and the stored data packets may be the data packets whose data transceiving speed needs to be guaranteed to be higher than that of the other data packets.
In the embodiment of the present application, the sequence between step S220 and step S210 is not limited, and step S210 may precede step S220, step S220 may precede step S210, or step S210 and step S220 may be executed simultaneously.
Step S230: and putting the data packet into the queue corresponding to the target category according to the corresponding relation between the category and the queue, wherein different queues have different priorities.
And for the data packets to be transmitted and received, enqueuing the data packets according to the types of the data packets, namely, putting the data packets into the queues corresponding to the types of the data packets, and putting the data packets of the target type into the queues corresponding to the target type.
Optionally, in this embodiment of the present application, the data packets include 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 of the same category, the data packet to be received and the data packet to be sent may be placed in the same queue, and the first-come data packet is placed in the queue first, where the queue may be a first-in first-out queue.
Optionally, each queue may include two sub-queues, the data packet to be received is placed into the sub-queue for storing the received data, the data packet to be sent is used for storing the sub-queue for sending the data, and the priorities of the two sub-queues are the same. The data of the two sub-queues can be processed in an intersecting way, namely, if the data packet in one sub-queue is processed last time, the data packet in the other sub-queue is processed next time. Or, the data packets in the two sub-queues are also processed according to the overall first-in first-out, and the data packet which enters the queue first in all the data packets in the two sub-queues is always processed before the data packet which enters the queue later.
Step S240: and correspondingly receiving or sending 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 data packets are processed from high to low according to the priority, and the data packets in the queue with high priority are processed preferentially. The processing includes receiving or sending a data packet, and for specific receiving or sending, reference may be made to the corresponding steps in the foregoing embodiments, which are not described herein again.
In an embodiment, the traversal and processing may be performed from high to low according to the priority, and after the data packet in the queue with the high priority is processed, the data packet in the queue with the next lower priority is traversed and processed.
In one embodiment, the ratio may be set from high to low according to the priority. Alternatively, the higher the priority, the lower the scale value may be. And in the process of processing the data packets in the low-priority queue, if the proportion of the number of the data packets in the high-priority queue to the number of the data packets in the queue is higher than or equal to the corresponding proportion value, switching to processing the data packets in the high-priority queue with the proportion higher than or equal to the corresponding proportion value.
For example, in this embodiment, three queues are included, namely a first queue, a second queue, and a third queue, the first queue being a first priority, the second queue being a second priority, and the third queue being a third priority, and the priorities of the first priority, the second priority, and the third priority decreasing in order. 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 proportion of the number of the data packets in the first queue to the storable number is higher than or equal to the proportion value corresponding to the first queue, processing the data packets in the first queue until 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; and in the data packet processing process of the third queue, if the number 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 preferentially processing the data packets in the first queue.
In one embodiment, the processing frequency of the packets in the queues with different priorities may be different, and the processing frequency of the packets in the queue with a high priority may be higher than the processing frequency of the packets in the queue with a low priority. The processing frequency indicates the number of packets processed per unit time.
For example, taking the first queue, the second queue and the third queue as an example, in this embodiment, in a unit time, the first queue processes x data packets, the second queue processes y data packets, and the third queue processes z data packets, x, y and z are positive integers, and x is greater than y and greater than z.
For another example, after the first queue processes x data packets, the second queue is processed, after the second queue processes y data packets, the third queue is processed, and after the third queue processes z data packets, the first queue is processed, where x is greater than y and greater than z.
Optionally, in this embodiment, it may also be set that the bandwidths corresponding to the queues with different priorities are different, and the bandwidth corresponding to the queue with the priority from high to low is decreased from high to low.
In the embodiment of the present application, for a data packet to be transmitted and received, a category to which the data packet belongs may be determined, and a queue corresponding to the data packet may be determined according to a correspondence between the category and the queue. When data is transmitted and received, the data is transmitted and received according to the priority from high to low. For different queues, the priority can be set and adjusted, so that the corresponding queue is set to have higher priority to enable the processing speed to be higher under the scene that the data transceiving speed is higher; and for the use scene with low data receiving and transmitting speed requirement, the speed 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 present application further provides a data transceiving control device 300, which can be applied to a mobile terminal. As illustrated in fig. 3, the apparatus 300 may comprise: a category identifying module 310, configured to identify a category to which a data packet to be transmitted and received belongs as a target category; the enqueuing module 320 is configured to place the data packet into a queue corresponding to the target category according to a correspondence between the category and the queue, where different queues have different priorities; and a data processing module 330, configured to correspondingly receive or send 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 type 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 process currently running by the mobile terminal; and determining the use scenes respectively corresponding to the processes currently running according to the corresponding relation between the processes and the use scenes as the current use scenes of the mobile terminal.
Optionally, the increasing the priority of the queue corresponding to the current usage scenario by the priority setting module may include: if the number of the current using scenes of the mobile terminal is multiple, the priority of the queues corresponding to the current multiple using scenes is increased, and the increasing amplitude of the queue corresponding to the using scene to which the process running in the foreground belongs is larger than that of the queue corresponding to the using scene to which the process running in the background belongs.
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 packets for establishing and maintaining a network connection as the queue with the highest priority.
Optionally, the identifying the class of the data packet to be transmitted or received by the class identifying module 310 may be a target class, and 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 and the category of the data packet, wherein the identity information comprises one or more of user identity certificate, protocol and port.
In the embodiment of the application, the priority control of the data packet receiving and sending is performed from the mobile terminal side, and the real requirements of the current user can be identified according to the direct operation of the user, so that the priority of the data packets of each category can be flexibly adjusted according to the actual use requirements of the mobile terminal, the speed limit or the speed increase can be performed on the data packets of different categories, and the task processing speed can be increased or limited in different scenes.
It will be clear to those skilled in the art that, for convenience and brevity of description, the various method embodiments described above may be referred to one another; for the specific working processes of the above-described devices and modules, reference may be made to corresponding processes in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. Each module may be configured in different mobile terminals, and may also be configured in the same mobile terminal, which is not limited in this embodiment of the application.
Referring to fig. 4, a block diagram of a mobile terminal 500 according to an embodiment of the present disclosure 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 foregoing embodiments.
Processor 510 may include one or more Processing cores, processor 510 may be coupled to various portions throughout mobile terminal 500 using various interfaces and lines to perform various functions and process data of mobile terminal 500 by executing or executing instructions, programs, code sets, or instruction sets stored in memory 520, and calling data stored in memory 520. alternatively, processor 510 may be implemented in the form of at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), Programmable logic Array (Programmable L organic Array, P L a), processor 510 may be implemented in the form of at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem, where the CPU is primarily responsible for Processing operating systems, user interfaces, application programs, etc., the GPU is responsible for displaying content, and the modem is used to render and render content, and the modem is used for communication, and the wireless communication is not implemented by a single chip or by a combination of the foregoing.
The Memory 520 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 520 may be used to store instructions, programs, code sets, or instruction sets. The memory 520 may include a program storage area and a data storage area, wherein the program storage 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 storage data area may also store data created by the mobile terminal in use, and the like.
Referring to fig. 5, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 700 has stored therein program code that can be called by a processor to execute the methods described in the above-described method embodiments.
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 includes a non-volatile computer-readable storage medium. The computer readable storage medium 700 has storage space for program code 710 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 710 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A data transceiving control method is applied to a mobile terminal, and the method comprises the following steps:
identifying the class to which the data packet to be transmitted and received belongs as a target class;
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 sending the data packets in each queue according to the priority from high to low.
2. The method according to claim 1, wherein the placing the data packet before the priority queue corresponding to the target class according to the correspondence between the class and the priority queue further comprises:
determining a current use scene of the mobile terminal;
and taking the queue corresponding to the type 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.
3. The method of claim 2, wherein the determining the current usage scenario of the mobile terminal comprises:
acquiring a process currently running by the mobile terminal;
and determining the use scenes respectively corresponding to the processes currently running according to the corresponding relation between the processes and the use scenes as the current use scenes of the mobile terminal.
4. The method of claim 2, wherein the prioritizing the queue corresponding to the current usage scenario comprises:
if the number of the current using scenes of the mobile terminal is multiple, the priority of the queues corresponding to the current multiple using scenes is increased, and the increasing amplitude of the queue corresponding to the using scene to which the process running in the foreground belongs is larger than that of the queue corresponding to the using scene to which the process running in the background belongs.
5. The method according to claim 1, wherein the placing the data packet before the priority queue corresponding to the target class according to the correspondence between the class and the priority queue comprises:
and adjusting the priority of each queue according to the received priority configuration operation.
6. The method according to any one of claims 2 to 5, further comprising:
and taking the queue for storing the data packets for establishing the network connection and maintaining the network connection as the queue with the highest priority.
7. The method of claim 1, wherein the identifying the class of the data packet to be transmitted and received 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 and the category of the data packet, wherein the identity information comprises one or more of user identity certificate, protocol and port.
8. A data transmission/reception control apparatus 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 enqueuing module is used for putting the data packet into a queue corresponding to the target class according to the corresponding relation between the class and the queue, and different queue priorities are different;
and the data processing module is used for correspondingly receiving or sending the data packets in each queue according to the priority from high to low.
9. 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 for performing the method recited in any of claims 1-7.
10. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 7.
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 true CN111459690A (en) 2020-07-28
CN111459690B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069105A (en) * 2020-07-31 2020-12-11 深圳市优必选科技股份有限公司 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
CN115086248A (en) * 2022-06-15 2022-09-20 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer equipment
CN115208845A (en) * 2021-04-09 2022-10-18 盛立安元科技(杭州)股份有限公司 Method, apparatus, device, storage medium, and program product for transmitting data packet
CN117278490A (en) * 2023-10-18 2023-12-22 石家庄常宏建筑装饰工程有限公司 Internet of things gateway data rapid transmission method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217499A (en) * 2008-01-21 2008-07-09 中兴通讯股份有限公司 Array dispatching method
CN102035748A (en) * 2010-12-31 2011-04-27 深圳市深信服电子科技有限公司 Application-based traffic control method and controller
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
CN104125167A (en) * 2014-07-24 2014-10-29 海信集团有限公司 Flow control method and device
CN105490962A (en) * 2015-12-04 2016-04-13 哈尔滨工程大学 QoS management method based on OpenFlow network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217499A (en) * 2008-01-21 2008-07-09 中兴通讯股份有限公司 Array dispatching method
CN102035732A (en) * 2010-11-25 2011-04-27 华为技术有限公司 Service scheduling method and device
CN102035748A (en) * 2010-12-31 2011-04-27 深圳市深信服电子科技有限公司 Application-based traffic control method and controller
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
CN104125167A (en) * 2014-07-24 2014-10-29 海信集团有限公司 Flow control method and device
CN105490962A (en) * 2015-12-04 2016-04-13 哈尔滨工程大学 QoS management method based on OpenFlow network

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069105A (en) * 2020-07-31 2020-12-11 深圳市优必选科技股份有限公司 Serial port communication processing method and device and electronic equipment
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
WO2023240998A1 (en) * 2022-06-15 2023-12-21 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer device
CN117278490A (en) * 2023-10-18 2023-12-22 石家庄常宏建筑装饰工程有限公司 Internet of things gateway data rapid transmission method and system
CN117278490B (en) * 2023-10-18 2024-04-02 石家庄常宏建筑装饰工程有限公司 Internet of things gateway data rapid transmission method and system

Also Published As

Publication number Publication date
CN111459690B (en) 2023-09-08

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
CN107637029B (en) Communication system and communication method for providing wireless terminal with access to IP network
CN107547746B (en) Resource allocation method and related product
KR101346549B1 (en) Technique for setting network communication parameters
CN106850402B (en) Message transmission method and device
CN107547745B (en) Resource allocation method and related product
CN110312283B (en) Information processing method and device
US11258717B2 (en) Method for sending service packet, network device, and system
CN110267276B (en) Network slice deployment method and device
CN112868265B (en) Network resource management method, management device, electronic equipment and storage medium
WO2022193890A1 (en) Resource scheduling method and apparatus
EP3448106B1 (en) Air interface resource allocation method and apparatus
WO2014094310A1 (en) Resource scheduling method and device
CN115834556B (en) Data transmission method, system, device, storage medium and program product
JP2021501536A (en) Uplink data packet resource allocation method and user terminal
CN114466226B (en) Bandwidth duration duty cycle determination method, device, equipment and computer readable medium
CN111800441B (en) Data processing method, system, device, user side server, user side and management and control server
CN113438169A (en) Data scheduling method, electronic equipment and storage medium
CN115412502B (en) Network port expansion and message rapid equalization processing method
CN116074784A (en) Vehicle-mounted data transmission method and device and storage medium
CN113923206A (en) Data transmission method, device and system
US11456960B2 (en) Method of network data transmission and method of network data reception
CN110620725A (en) Method for expanding out-of-band interface of switching equipment and switching equipment
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