WO2018041020A1 - 一种广播消息的管理方法及装置 - Google Patents

一种广播消息的管理方法及装置 Download PDF

Info

Publication number
WO2018041020A1
WO2018041020A1 PCT/CN2017/098966 CN2017098966W WO2018041020A1 WO 2018041020 A1 WO2018041020 A1 WO 2018041020A1 CN 2017098966 W CN2017098966 W CN 2017098966W WO 2018041020 A1 WO2018041020 A1 WO 2018041020A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
application
queue
broadcast message
target
Prior art date
Application number
PCT/CN2017/098966
Other languages
English (en)
French (fr)
Inventor
陈秋林
应云剑
王辉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20173443.1A priority Critical patent/EP3754902B1/en
Priority to EP17845322.1A priority patent/EP3496335B1/en
Publication of WO2018041020A1 publication Critical patent/WO2018041020A1/zh
Priority to US16/287,706 priority patent/US10862819B2/en
Priority to US17/100,547 priority patent/US11283724B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1881Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with schedule organisation, e.g. priority, sequence management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1886Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with traffic restrictions for efficiency improvement, e.g. involving subnets or subdomains
    • 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/6215Individual queue per QOS, rate or priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/806Broadcast or multicast traffic

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for managing broadcast messages.
  • Broadcast (English: Broadcast) is an information transfer mechanism that is widely used in applications of Android (English: Android) operating system or between applications.
  • the activity management service (AMS) stores the broadcast message in a broadcast queue in the AMS, and when the broadcast message is scheduled, the broadcast message is sent from the broadcast queue.
  • the broadcast message is read and broadcast.
  • the delay of subsequent broadcast message processing in the broadcast queue will be delayed, causing the application message receiving the subsequent broadcast message to receive delay or running the card.
  • the prior art employs a pair of broadcast queues, one of which is used to store broadcast messages generated by the foreground application, and the other is used to store broadcast messages generated by the background application.
  • the effect of the processing of the broadcast message of the background application on the processing of the broadcast message of the foreground application is alleviated, and the phenomenon that the foreground application runs on the card is alleviated.
  • the prior art only distinguishes between foreground applications and background applications, and cannot distinguish between various types of applications included in the foreground application, and cannot distinguish between various types of applications included in the background application.
  • Broadcast messages generated by different applications of the foreground application cannot be distinguished, or broadcast messages generated by different applications of the background application cannot be distinguished, and the instant processing of broadcast messages of important applications cannot be guaranteed. Unable to avoid important application message reception delays or running stuck, low applicability.
  • the present application provides a method and device for managing broadcast messages, which can improve the processing efficiency of broadcast messages, improve the applicability of management of broadcast messages, and enhance the user experience of the terminal.
  • the first aspect provides a management method for a broadcast message, where the method is used to manage a broadcast message sent by a foreground application of a terminal or a broadcast message sent by a background application for managing a terminal, which may include: receiving a target application a broadcast message sent; determining a user experience guarantee priority of the target application, and determining, from the preset at least two broadcast queues, a target broadcast queue corresponding to a user experience guarantee priority of the target application, wherein the at least 2 Each broadcast queue in the broadcast queue corresponds to a broadcast message scheduling priority; the broadcast message is stored in the target broadcast queue; when receiving the broadcast message scheduling request, the target broadcast message corresponding to the target broadcast queue is scheduled first.
  • the level broadcasts the broadcast message stored in the target broadcast queue.
  • the application may store the broadcast message to the target broadcast queue according to the user experience guarantee priority of the target application that sends the broadcast message, where the target broadcast queue also corresponds to a broadcast message scheduling priority.
  • the scheduling process of the broadcast message may also be performed according to the broadcast message scheduling priority.
  • the application classifies and stores the broadcast message according to the user experience guarantee priority of the application, and improves the controllability of the storage of the broadcast message. Improve the scheduling priority of broadcast messages by setting the broadcast message scheduling priority for the broadcast queue of the broadcast message store. Controllability, which improves the processing efficiency of broadcast messages and enhances the user experience of the application.
  • the target application provided by the present application may be a background application or a foreground application, that is, the method provided by the present application may be used for management of a broadcast message of a foreground application, or may be managed by a broadcast message of a background application, and the operation is flexible. Improve the applicability of management of broadcast messages.
  • the user experience guarantee priority provided in this application is used to indicate the impact of the application on the user experience.
  • the user experience guarantee priority may be determined by the frequency of use of the application, or the degree of impact of the application response delay on the user. For example, the higher the frequency of application use, the higher the user experience guarantee priority of the application; or the more inconvenient the response delay of the broadcast message of the application is to the user, the user experience guarantee priority of the application The higher the level, and so on.
  • the application of the terminal before receiving the broadcast message sent by the target application, the application of the terminal may be divided into at least two user experience guarantees according to the user experience guarantee priority of each application.
  • a priority application where the at least two user experience guarantee priority applications include a first application experience guarantee priority first application and a second user experience guarantee priority second application, The first user experience guarantee priority is higher than the second user experience guarantee priority; the first broadcast queue corresponding to the first application, the second broadcast queue corresponding to the second application, and set The first broadcast message scheduling priority of the first broadcast queue, the second broadcast message scheduling priority of the second broadcast queue, the first broadcast message scheduling priority is higher than the second broadcast message scheduling priority Determining a target broadcast corresponding to the user experience guarantee priority of the target application from the preset at least two broadcast queues In the queue, if the target application is the first application, determining the first broadcast queue as a target broadcast queue; if the target application is a second application, determining the second broadcast queue Broadcast the queue for the target.
  • the present application may pre-establish multiple broadcast queues, each broadcast queue is used to store broadcast messages sent by one type of application, and each broadcast queue corresponds to one broadcast message scheduling priority, which improves the operational flexibility of the broadcast message storage. The controllability and processing efficiency of the scheduling of broadcast messages are improved.
  • the first application includes a system application and a preset application of the terminal; and the first broadcast queue includes a first sub-queue storing a broadcast message of the system application and a second sub-queue for storing a broadcast message of the preset application; determining the target application from at least two preset broadcast queues If the target application is the system application of the terminal, the first sub-queue of the first broadcast queue is determined as the target broadcast queue; The target application is the preset application, and the second sub-queue of the first broadcast queue is determined as the target broadcast queue.
  • the application can set the scheduling priority of the system application of the terminal or the broadcast message of the preset application to be higher than the scheduling priority of the broadcast messages of other applications, so as to better ensure smooth running of the system and enhance the user experience.
  • the application can store the broadcast messages of the system application and the preset application separately, which can better ensure the scheduling competition of the broadcast messages of the system application and the preset application, and the scheduling operation of the broadcast message is more flexible. Enhance the user experience of the terminal.
  • the third application that has a third user experience guarantee priority is also included in the application of the at least two user experience guarantee priorities
  • the specified application if the number of broadcast messages of the specified application received within the preset time threshold is greater than the preset a quantity threshold, the specified application is determined as a third application; and a third broadcast queue corresponding to the third application may be established, the third broadcast queue is determined as a target broadcast queue, and the first a broadcast message of the third application is stored to the third broadcast queue; and a scheduling priority of the broadcast message stored in the third broadcast queue is set to a third broadcast message scheduling priority; wherein the third broadcast The message scheduling priority is lower than the second broadcast message scheduling priority.
  • the application may also separately create a broadcast queue for an abnormal application that sends more than the expected number of broadcast messages within a preset time threshold, and stores a broadcast message sent by the abnormal application through a separately created broadcast queue, and the broadcast queue is
  • the broadcast message scheduling priority is set lower than the broadcast message scheduling priority of other broadcast queues, which reduces the competition of the scheduling resources, and can prevent the large number of broadcast messages sent by the abnormal application from affecting the processing of broadcast messages sent by other applications, and enhance the users of the terminal. Experience.
  • a fourth possible implementation manner in the management process of the broadcast message, if the broadcast message stored in the third broadcast queue is scheduled to be executed, and the detected The third broadcast queue is deleted when the specified application exits the run.
  • the application can delete the queue of the broadcast message storing the abnormal application after the broadcast message processing of the abnormal application ends and the abnormal application exits, which can save the storage space of the terminal.
  • the broadcast message further carries a message type identifier of the broadcast message;
  • the target broadcast queue includes at least two broadcast message linked lists And the at least two broadcast message linked list includes a first linked list for storing a broadcast message of a first message type, and a second linked list for storing a broadcast message of a second message type; storing the broadcast message to the Determining, according to the message type identifier of the broadcast message, the type of the broadcast message when the target broadcast queue is used; if the type of the broadcast message is the first message type, storing the broadcast message to the first linked list And if the type of the broadcast message is a second message type, storing the broadcast message to the second linked list.
  • the application can set different links in the broadcast queue according to the message type of the broadcast message, so as to store the broadcast messages of different message types into the corresponding broadcast message link, adapt to the type characteristics of the broadcast message, and improve the management method of the broadcast message. applicability.
  • the third broadcast queue includes at least two broadcast message linked lists, where the at least two broadcast message linked lists are included for storing a third linked list of broadcast messages of the third message type, and a fourth linked list for storing the broadcast message of the fourth message type; the message carried in the specified broadcast message that can be sent according to the third application in the management process of the broadcast message
  • the type identifier determines a type of the specified broadcast message; if the type of the specified broadcast message is a third message type, storing the specified broadcast message to a third linked list; if the type of the specified broadcast message is a fourth message Type, storing the specified broadcast message to the fourth linked list.
  • the application can set different links in the broadcast queue according to the message type of the broadcast message, so as to store the broadcast messages of different message types into the corresponding broadcast message link, adapt to the type characteristics of the broadcast message, and improve the management method of the broadcast message. applicability.
  • the second aspect provides a management apparatus for a broadcast message, where the management apparatus is configured to manage a broadcast message sent by a foreground application of the terminal or a broadcast message sent by a background application for managing the terminal, and the method may include: a receiving module, Determining a module, a storage module, and a scheduling module; the receiving module receives a broadcast message sent by the target application; determining The module determines that the receiving module receives the user experience guarantee priority of the target application corresponding to the broadcast message, and determines, from the preset at least two broadcast queues, the target broadcast corresponding to the user experience guarantee priority of the target application.
  • each of the at least two broadcast queues corresponds to a broadcast message scheduling priority
  • the storage module stores the broadcast message received by the receiving module to the target broadcast queue determined by the determining module
  • the scheduling module when receiving the broadcast message scheduling request, schedules the broadcast message stored in the target broadcast queue by the storage module according to the target broadcast message scheduling priority corresponding to the target broadcast queue.
  • the management apparatus further includes: a classification module and a setting module; the classification module divides the application of the terminal into at least two types according to user experience guarantee priorities of the respective applications.
  • the user experience guarantee priority application where the at least two user experience guarantee priority applications include a first application experience guarantee priority first application and a second user experience guarantee priority second application, The first user experience guarantee priority is higher than the second user experience guarantee priority;
  • the setting module establishes a first broadcast queue corresponding to the first application obtained by the classification module, and the second application Corresponding second broadcast queue, and setting a first broadcast message scheduling priority of the first broadcast queue, a second broadcast message scheduling priority of the second broadcast queue, the first broadcast message scheduling priority is high Determining a priority for the second broadcast message; the determining module determining that the target application is the first application , Broadcast the first broadcast queue determined as a target queue, when determining the target application is the second application program, the second broadcast queue determined as the target broadcast queue.
  • the first application includes a system application and a preset application of the terminal; and the first broadcast queue includes a first sub-queue storing a broadcast message of the system application and a second sub-queue for storing a broadcast message of the preset application; the determining module determining that the target application is a system application of the terminal Determining, by the program, the first sub-queue of the first broadcast queue as a target broadcast queue, and determining that the target application is the preset application, determining a second sub-queue of the first broadcast queue Broadcast the queue for the target.
  • the third application that has the third user experience guarantee priority in the application of the at least two user experience guarantee priorities Determining, by the module, that the number of broadcast messages of the specified application received within the preset time threshold is greater than a preset number of thresholds, determining the specified application as a third application; the setting module establishing the determined by the determining module Determining, by the third application, a third broadcast queue, determining the third broadcast queue as a target broadcast queue, and storing the broadcast message of the third application to the third broadcast queue by using the storage module,
  • the scheduling priority of the broadcast message stored in the third broadcast queue is set to a third broadcast message scheduling priority; wherein the third broadcast message scheduling priority is lower than the second broadcast message scheduling priority.
  • the setting module may further perform, in the scheduling module, scheduling to perform a broadcast message stored in the third broadcast queue, and detecting The third broadcast queue is deleted when the specified application exits the run.
  • a third aspect provides a terminal, which can include: a memory and a processor; the memory is configured to store a program code; the processor is configured to invoke program code stored in the memory to perform the following operations:
  • Receiving a broadcast message sent by the target application determining a user experience guarantee priority of the target application, and determining, from the preset at least two broadcast queues, a user experience guarantee priority corresponding to the target application a broadcast queue, wherein each of the at least two broadcast queues corresponds to one broadcast message scheduling priority; storing the broadcast message in the target broadcast queue; when receiving a broadcast message scheduling request, according to The target broadcast message scheduling priority corresponding to the target broadcast queue schedules the broadcast message stored in the target broadcast queue.
  • the processor may further divide the application of the terminal into at least two application experience guarantee priority applications according to the user experience guarantee priority of each application.
  • a first application that includes a first user experience guarantee priority and a second user experience guarantee priority, the first user experience guarantee priority is higher than the second user experience guarantee priority;
  • the target application is the first application, determining the first broadcast queue Broadcasting the queue for the target; determining the second broadcast queue as the target broadcast queue when the target application is the second application.
  • the first application includes a system application and a preset application of the terminal; and the first broadcast queue includes a first sub-queue storing a broadcast message of the system application and a second sub-queue for storing a broadcast message of the preset application; if the target application is a system application of the terminal, processing The first sub-queue of the first broadcast queue is determined as a target broadcast queue, and if the target application is the preset application, the second sub-queue of the first broadcast queue is determined as a target Broadcast queue.
  • the third application that has the third user experience guarantee priority in the application of the at least two user experience guarantee priorities
  • the processor determines the specified application as a third application
  • the processor establishes the third application Corresponding third broadcast queue, determining the third broadcast queue as a target broadcast queue and storing the broadcast message of the third application to the third broadcast queue; and further storing the third broadcast queue
  • the scheduling priority of the broadcast message is set to a third broadcast message scheduling priority; wherein the third broadcast message scheduling priority is lower than the second broadcast message scheduling priority.
  • the processor may also perform scheduled execution of the broadcast message stored in the third broadcast queue, and detect the specified application. When the program exits the run, the third broadcast queue is deleted.
  • the application may store the broadcast message to the target broadcast queue according to the user experience guarantee priority of the target application that sends the broadcast message, where the target broadcast queue also corresponds to a broadcast message scheduling priority.
  • the scheduling process of the broadcast message may also be performed according to the broadcast message scheduling priority.
  • the application classifies and stores the broadcast message according to the user experience guarantee priority of the application, and improves the controllability of the storage of the broadcast message. By setting the broadcast message scheduling priority to the broadcast queue of the broadcast message, the controllability of the scheduling priority of the broadcast message is improved, thereby improving the processing efficiency of the broadcast message and enhancing the user experience of the application.
  • the target application provided by the present application may be a background application or a foreground application, that is, the method provided by the present application may be used for management of a broadcast message of a foreground application, or may be managed by a broadcast message of a background application, and the operation is flexible. Improve the applicability of the management method of broadcast messages.
  • FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of interaction of transmission of a conventional broadcast message
  • FIG. 3 is a schematic flowchart of a method for managing a broadcast message according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a broadcast queue according to an embodiment of the present invention.
  • FIG. 5 is another schematic diagram of a broadcast queue according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a device for managing a broadcast message according to an embodiment of the present invention.
  • FIG. 8 is another schematic structural diagram of a device for managing a broadcast message according to an embodiment of the present invention.
  • the method for managing a broadcast message provided by the embodiment of the present invention is mainly applied to a terminal device, which may also be called a user equipment (English: User Equipment, UE), a mobile station (English: Mobile Station, MS), and a mobile terminal ( English: Mobile Terminal) and so on.
  • the terminal device (hereinafter referred to as the terminal) may have the capability of communicating with one or more core networks via a Radio Access Network (RAN).
  • RAN Radio Access Network
  • the terminal can be a mobile phone (or "cellular" phone), or a computer with mobile nature, and the like.
  • the terminal can also be a portable, pocket, handheld, computer built-in or in-vehicle mobile device.
  • the management method of the broadcast message provided by the embodiment of the present invention can be applied to other types of computer systems in addition to the terminal device.
  • FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • the terminal device 100 includes a memory 180, a processor 150, and a display device 140.
  • the memory 180 stores a computer program (or program code) including an operating system program 182, an application program 181, and the like.
  • the processor 150 is configured to read a computer program in the memory 180 and then execute a computer program defined method, for example, the processor 150 reads the operating system program 182 to run an operating system on the terminal device 100 and implement various functions of the operating system. Or reading one or more applications 181 to run an application on the terminal device or perform processing of a broadcast message of the application or the like.
  • Processor 150 may include one or more processors, for example, processor 150 may include one or more central processors or one or more central processors and one or more application processors. When the processor 150 includes a plurality of processors, the plurality of processors may be integrated on the same chip, or may each be a separate chip.
  • a processor may include one or more processor cores (or processing cores). The following embodiments are all described by using multiple cores as an example. However, the method for managing broadcast messages provided by the embodiments of the present invention can also be applied to a single-core processor, and the parallel operation of multiple applications is performed by using the time-sharing working principle of the single-core processor.
  • the memory 180 also stores other data 183 in addition to the computer program.
  • the other data 183 may include data generated by the operating system 182 or the application 181 after being run, and the like, including the system data (for example, configuration parameters of the operating system).
  • system data for example, configuration parameters of the operating system.
  • user data such as broadcast messages generated by individual applications, are typical user data.
  • Memory 180 generally includes memory and external memory.
  • the memory can be random access memory (RAM), read only memory (ROM), and cache (CACHE).
  • the external storage can be a hard disk, a CD, a USB disk, a floppy disk, or a tape drive.
  • Computer programs are typically stored on external storage, and the processor loads the computer program from external memory into memory before processing.
  • the operating system program 182 includes a computer program that can implement the management method of the broadcast message provided by the embodiment of the present invention, so that the processor 150 can read the operating system program 182 and run the operating system.
  • the management function of the broadcast message provided by the embodiment of the invention.
  • the terminal device 100 may further include an input device 130 for receiving input digital information, character information or contact touch/contactless gestures, and generating signal inputs related to user settings and function control of the terminal device 100, and the like.
  • the input device 130 may include a touch panel 131.
  • the touch panel 131 also referred to as a touch screen, can collect touch operations on or near the user (such as the user's operation on the touch panel 131 or on the touch panel 131 using any suitable object or accessory such as a finger, a stylus, or the like. ), and drive the corresponding connection device according to a preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 150 is provided and can receive commands from the processor 150 and execute them. For example, the user double-clicks an icon of an application on the touch panel 131, and the touch detection device detects the signal brought by the double click, and then transmits the signal to the touch controller, and the touch controller converts the signal.
  • the coordinates are sent to the processor 150.
  • the processor 150 performs an operation such as starting the application according to the coordinates and the type of the signal (such as double-clicking), and finally displays the operation interface of the application on the display panel 141, thereby implementing "opening". "application.
  • the touch panel 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input device 130 may further include other input devices 132.
  • the other input devices 132 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like. One or more of them.
  • the display device 140 included in the terminal device 100 includes a display panel 141 for displaying information input by the user or information provided to the user, and various menu interfaces of the terminal device 100, etc., which are mainly used for displaying applications in the embodiment of the present invention. Information such as the user interface of the program.
  • the display panel 141 can be configured in the form of a liquid crystal display (LED) or an organic light-emitting diode (OLED).
  • the touch panel 131 can cover the display panel 141 to form a touch display screen.
  • the terminal device 100 may further include a power source 190 for supplying power to other modules and a camera 160 for taking a photo or video.
  • the terminal device 100 may also include one or more sensors 120, such as gravity sensors, acceleration sensors, light sensors, and the like.
  • the terminal device 100 may further include a radio frequency (RF) circuit 110 for performing network communication with the wireless network device, and may further include a WiFi module 170 for His device performs WiFi communication and the like.
  • RF radio frequency
  • the following embodiments describe a method and an apparatus for managing a broadcast message provided by an embodiment of the present invention.
  • the method for managing broadcast messages provided by the embodiments of the present invention can be implemented in the operating system program 182 shown in FIG. 1.
  • various broadcast messages are generated during the running of various applications.
  • an application included in the terminal for monitoring the usage status of the battery may issue a broadcast message during use of the battery, and the short message module may also generate a broadcast message when the information is received.
  • the developer of the application can also listen to the broadcast message sent during the running of the application, and then can perform the processing of the program logic according to the broadcast message.
  • a broadcast message may be received by one or more applications or may not be received by any application. That is, in broadcasting such an information transmission mechanism, the sender of the broadcast message does not care whether the receiver receives the data or how the receiver processes the data.
  • a broadcast message sent by a sender of a broadcast message may be pre-stored in the AMS, and the AMS notifies the listener object of the broadcast message (ie, the receiver of the broadcast message) to process the broadcast message.
  • broadcast messages can be stored in a queue set up in the AMS (hereinafter referred to as a broadcast queue), and the inbound queue (ie, the message is queued) and the dequeue (that is, the message is output from the queue) of the broadcast message are processed by different processes. Triggering, and the inclusion and dequeue of broadcast messages require the use of AMS locks.
  • the processing of the serial broadcast (also called an ordered broadcast) message needs to be processed in sequence according to the timing of the serial broadcast message.
  • Parallel broadcast (also called unordered broadcast) messages can be scheduled in parallel from the queue.
  • the specific scheduling priority can be determined by the order in which each parallel broadcast message preempts the AMS lock, and the broadcast message with the AMS lock is preferentially preempted.
  • the parallel broadcast message sent by the application (that is, the transmission of the broadcast message adopts the parallel mode) is more, the AMS lock competition caused by the preemption of each parallel broadcast message in the broadcast message scheduling will be intensified, and the processing time of each application cannot be guaranteed. It is easy to cause the application to run stuck or the message reception delay.
  • the prior art employs a pair of global broadcast queues (including two broadcast queues), one of which is used to store broadcast messages generated by foreground applications, and the other is used to store broadcast messages generated by background applications.
  • a pair of global broadcast queues including two broadcast queues
  • the AMS uses a pair of broadcast queues to store broadcast messages.
  • the broadcast queue pair includes a broadcast queue for storing a broadcast message of the foreground application (such as the broadcast queue 1 in FIG. 2), and a broadcast queue for storing the broadcast message of the background application (FIG. 2).
  • Each broadcast queue includes two linked lists, one of which is linked (such as linked list 11 in FIG. 2) for storing ordered broadcast messages (ie, serial broadcast messages), and another linked list (such as linked list 12 in FIG. 2). Used to store out-of-order broadcast messages (ie, parallel broadcast messages).
  • an application that needs to listen to or process a broadcast message (specifically, a process, such as process 1 in FIG. 2) needs to register a broadcast receiver in advance to the AMS (step 1 in FIG. 2).
  • process 1 may use a broadcast receiver registration function (such as registerReceiver) to dynamically register a broadcast receiver to the AMS, or statically register in AndroidManifest.xml (ie, the manifest file included in the Android application).
  • a broadcast receiver registration function such as registerReceiver
  • AndroidManifest.xml ie, the manifest file included in the Android application.
  • AMS will save all broadcast receivers to a member variable (such as the mReceiverResolver member variable).
  • the application that sends the broadcast message (which may also behave as a process, such as process 2 in Figure 2) sends a broadcast message to the AMS by sending a broadcast function (such as sendBroadcast) (step 2 in Figure 2).
  • the AMS first finds all the receivers corresponding to the broadcast message by querying the mReceiverResolver member variable (that is, the broadcast receivers that listen to the broadcast message included in all the broadcast receivers that have been registered in the ASM), and then generates a BroadcastRecord (ie, Broadcast record). Further, the AMS puts the broadcast message into the corresponding broadcast queue list according to the type of the receiver of the broadcast message and the type of the broadcast message recorded in the BroadcastRecord.
  • the type of the receiver of the broadcast message includes a foreground application (or a foreground process) or a background application (or a background process).
  • the types of the above broadcast messages include serial broadcast messages (ie, ordered broadcast messages) or parallel broadcast messages (ie, out-of-order broadcast messages) and the like.
  • the broadcast queue (English: Handler) can be sequentially used to broadcast the broadcast queue list of the serial broadcast message (ie, the serial broadcast linked list) according to the scheduling timing of the broadcast message.
  • a serial broadcast message is read, or a thread scheduled by the broadcast message reads all broadcast messages from a broadcast queue list of parallel broadcast messages (ie, a parallel broadcast linked list).
  • the AMS uses a communication mechanism such as a binder to notify the receiver application of each broadcast message to process the broadcast message.
  • the AMS can use the binder to remotely invoke the broadcast receiving processing function that the broadcast receiver has registered in the AMS (ie, The onReceiver function) performs the processing of the broadcast message (step 3 in FIG. 2).
  • the existing technical solution uses a pair of broadcast queues (only distinguishing between front and back applications), and does not distinguish the types of applications.
  • the processing time of the broadcast message is long, which will cause the system to jam and other broadcast messages.
  • the processing delay and other issues For example, the system application and all other applications share a pair of broadcast message queues, serial broadcast messages are stored in the serial broadcast list, and parallel broadcast messages are stored in the parallel broadcast list.
  • the background application When the background application sends too many serial broadcast messages, it may cause the serial broadcast list to be too long, which causes the AMS to take a long time to process the broadcast message sent by the background application, thereby causing the processing of the broadcast message sent by the background application.
  • the AMS lock takes a long time, which causes the broadcast message of the foreground application to be unprocessed because it cannot seize the AMS lock, which may cause problems such as the front-end application running the jam.
  • the AMS lock and the parallel broadcast linked list are required because the broadcast management process of the broadcast message or the dequeue management process of the broadcast message accesses the parallel broadcast linked list. Too many broadcast messages stored in the media will also lead to increased competition for preempting AMS locks, which may cause problems such as application running jams.
  • the embodiment of the invention provides a method and a device for managing broadcast messages, which can be used in the foreground application.
  • the broadcast message sent by the broadcast message or the broadcast message sent by the background application is stored and scheduled differently according to the user experience guarantee priority order of the application, thereby improving the applicability of the management of the broadcast message.
  • a method and an apparatus for managing a broadcast message according to an embodiment of the present invention are described below with reference to FIG. 3 to FIG.
  • FIG. 3 is a schematic flowchart diagram of a method for managing a broadcast message according to an embodiment of the present invention.
  • the method provided by the embodiment of the present invention includes the following steps:
  • the method for managing a broadcast message is applicable to management of a broadcast message of a foreground application of the terminal, and is also applicable to management of a broadcast message of a background application of the terminal.
  • the terminal may separately set multiple broadcast queues for the foreground application and the background application, and the broadcast queues of the foreground application and the background application may be set in pairs, or may be set according to requirements, and are not limited herein.
  • different broadcast queues are used to store broadcast messages sent by different types of applications.
  • Each broadcast queue includes multiple linked lists, and different linked lists of the same broadcast queue are used to store broadcast messages of different broadcast message types of the same application type.
  • the terminal may first determine whether the broadcast message is from the foreground or from the background, and may determine whether to store the broadcast message in a broadcast queue corresponding to the foreground application or to broadcast the message. Stored in the broadcast queue corresponding to the background application. Specifically, the terminal may determine whether the broadcast message is a foreground broadcast message or a background broadcast message according to a front-end situation of a registered broadcast receiver (ie, a listener of the broadcast message) saved in the AMS. Further, the terminal may use the management method of the broadcast message provided by the embodiment of the present invention to determine which broadcast queue the broadcast message is specifically stored to implement targeted management of the broadcast message, and may also determine the scheduling priority of the broadcast message by storing the broadcast message. Level and other information. The following describes the broadcast message sent by the foreground application as an example. Of course, the following specific implementation is also applicable to the management of the broadcast message sent by the background application, which is not limited herein.
  • the execution body of the management method of the broadcast message provided by the embodiment of the present invention may be a module such as an AMS in the terminal, or may be another module having a management function of a broadcast message, and is not limited herein.
  • the embodiment of the present invention will be described by taking an AMS as an example.
  • the broadcast message may carry the identification information such as the user identifier (UID) or the package name (English: Package Name, PKGName) of the application.
  • the identification information such as the UID or the PKGName of the application may be used to determine the name of the application, and further determine information such as the type of the application (referred to as the application type).
  • the application for transmitting the broadcast message to the terminal may be one or more of all applications built in the terminal, and one of the applications (ie, the target application) will be described as an example.
  • the AMS of the terminal may parse the broadcast message, and obtain an application such as a UID or a PKGName or a use frequency data or an application type white list carried in the broadcast message. Identification information. After the AMS obtains the identification information of the application carried in the broadcast message, the type of the target application and the user experience guarantee priority of the application may be determined according to the identifier information.
  • the user experience guarantee priority of the application may be determined by the frequency of use of the application, or the degree of impact of the response delay of the application on the experience brought by the user.
  • the system application runs the necessary applications for the system (determined by the application's UID, or PKGName), so the system application is used most frequently, and the smooth running of the system application has the greatest impact on the user. This determines the highest priority for user experience assurance for system applications.
  • Applications such as instant messaging tools are applications that users use every day. The frequency of use of such applications is also high. The smooth running of instant messaging tools has a greater impact on users. It can also determine instant messaging tools.
  • the user experience guarantee for the application has a higher priority.
  • the terminal can determine the user experience guarantee of each application in the terminal in this manner.
  • Priority in which the user experience guarantee priority identification information of each application is added to the broadcast message sent by each application, for example, an identifier such as "1" or "0" identifies the first user experience guarantee priority (may be " 1 "identification” or second user experience assurance priority (identified by "0").
  • the user experience guarantee priority of the application can be determined upon receiving the broadcast message of each application.
  • the terminal may determine the user experience guarantee priority of each application in the terminal by using the foregoing implementation manner, and further establish a correspondence between the identifier of each application and its user experience guarantee priority.
  • the user experience guarantee priority of the application can be determined when determining the identification information such as each application UID.
  • the terminal may determine the user experience guarantee priority of the application by using a more implementation manner, which may be determined according to actual application scenario requirements or technical requirements, and is not limited herein.
  • the AMS of the terminal may classify all the applications built in the terminal in advance to classify and manage the broadcast messages sent by the respective applications.
  • the terminal may determine a critical application by using a whitelist mechanism, or may set an application whose frequency is higher than a preset frequency threshold as a key application according to information such as the frequency of use of each application of the terminal by the user.
  • the terminal can also set the instant messaging application in each application as a key application, or the application that is sensitive to the transmission and reception of the broadcast message, and the broadcast message is sent and received to the user experience of the application is set to Key application.
  • the setting method of the above-mentioned key application is only an example, and may be determined according to an actual application, and is not limited herein.
  • the above-mentioned critical applications provide the highest priority application for user experience, with the same user experience assurance priority as the system application of the terminal. Or the user experience guarantee priority of the system application of the terminal is the highest, and the priority of the user experience guarantee of the key application is lower than the user experience guarantee priority of the system application, which is higher than the user experience guarantee priority of other applications. It can be determined according to the actual application scenario, and there is no limitation here.
  • the terminal After the terminal determines the critical application, it can generate a list of critical applications and send it to the AMS for the AMS to manage the broadcast messages of the key applications.
  • the key application list includes at least one key determined by the above various setting methods. application.
  • the terminal may also update the key applications included in the critical application list in a timely manner according to newly installed applications during the terminal running process or information such as user usage habits. For example, the application included in the list of critical applications can be updated at the point in time when the terminal is powered on or the terminal is connected to the wireless network.
  • the application of the terminal may be compared with the application included in the key application list, and the terminal built-in application is included in the key.
  • the application in the application list determines the first application that is the first user experience assurance priority.
  • the AMS can also set the system application of the terminal as the first application of the first user experience guarantee priority.
  • Other applications that are not included in the list of critical applications above, nor are the system applications of the terminal can be set as the second application of the second user experience guarantee priority.
  • the above-mentioned key application or the second application may be a third-party application that the terminal downloads and installs from a platform such as an application market, and is not limited herein.
  • FIG. 4 is a schematic diagram of a broadcast queue according to an embodiment of the present invention.
  • the broadcast queue may be separately established for each type of application, and the broadcast queue is used to store broadcast messages sent by various types of applications.
  • the AMS may establish a first broadcast queue corresponding to the first application, and establish a second broadcast queue corresponding to the second application.
  • the first broadcast queue and the second broadcast queue are two broadcast queues, and the queue types of the broadcast queues may be the same. It can be different, and can be determined according to actual application requirements, and there is no limitation here.
  • the AMS may also set a broadcast message scheduling priority for each broadcast queue, where the broadcast message scheduling priority is used to determine a scheduling priority of the broadcast message stored in the broadcast queue.
  • the AMS may set a first broadcast message scheduling priority of the first broadcast queue, and may also set a second broadcast message scheduling priority of the second broadcast queue, and the first broadcast message scheduling priority is higher than the second broadcast.
  • Message scheduling priority That is, the AMS can set the priority of the broadcast message sent by the critical application and the system application included in the terminal to be higher than the scheduling priority of the broadcast message sent by other applications, and can ensure the running of the critical application and the system application. Smooth, secure user experience for critical applications and system applications.
  • the AMS pre-establishes the first broadcast queue of the first application and the second broadcast queue of the second application, and sets the first broadcast message scheduling priority and the second broadcast message scheduling priority
  • determining whether to store the broadcast message to the first broadcast queue or the second broadcast queue according to the type of the application that sends the broadcast message, while storing the broadcast message to the corresponding broadcast queue also determines the scheduling of the broadcast message. Priority and other information.
  • S202 Determine a user experience guarantee priority of the target application, and determine, from the preset at least two broadcast queues, a target broadcast queue corresponding to the user experience guarantee priority of the target application.
  • the AMS may determine the target application according to information such as the identifier of the application carried in the broadcast message, and then match the target application with each application included in the key application list to determine the foregoing. Whether the target application is included in the list of key applications above. If the target application is included in the list of key applications described above, the first application that the target application is the first user experience assurance priority can be determined. If the target application is not included in the above list of critical applications, it can be determined whether the above target application is a terminal system application. If the target application is a system application of the terminal, the target application may be determined to be the first application of the first user experience guarantee priority, or the target application may be determined as the second user experience guarantee priority. Two applications.
  • the first broadcast queue may be determined as the target broadcast queue. If the target application is the second application, the second broadcast queue may be determined as the target broadcast queue.
  • the two subqueues of the first broadcast queue can be established.
  • One of the subqueues (which can be set as the second subqueue) is used to store the broadcast message of the preset application, and the other subqueue (which can be set as the first subqueue) is used to store the broadcast message of the system application.
  • the first subqueue and the second subqueue of the first broadcast queue may be a queue of the same queue format as the second broadcast queue, or may be a queue of a queue format different from the second broadcast queue, and the first The scheduling priority of the broadcast messages stored in the one subqueue and the second subqueue is the first broadcast message scheduling priority of the preset first broadcast queue. That is, the scheduling priorities of the broadcast messages of the first sub-queue and the second sub-queue of the first broadcast queue are the same, and both are higher than the second broadcast message scheduling priority of the second broadcast queue. In a specific implementation, the scheduling priority of the broadcast message of the first sub-queue and the second sub-queue of the first broadcast queue may be different, and the scheduling priority order between the two may be determined according to the actual application scenario. Make restrictions.
  • the AMS determines that the target application is a system application of the terminal, the first sub-queue of the first broadcast queue may be determined as the target broadcast queue. If the AMS determines that the target application is a preset application, then The second sub-queue of a broadcast queue is determined to be the target broadcast queue. After the AMS determines the target broadcast queue, the broadcast message can be stored in the target broadcast queue for subsequent scheduling and processing.
  • the broadcast message sent by the application may be further divided into an ordered broadcast message (also called a serial broadcast message) and an unordered broadcast message (also called a parallel broadcast message).
  • the AMS can separately store the received broadcast messages in an ordered broadcast message and an out-of-order broadcast message.
  • each broadcast queue and its sub-queue in the first broadcast queue and the second broadcast queue established by the AMS may include at least two broadcast message linked lists.
  • the at least two broadcast message linked lists include a first linked list for storing a broadcast message of a first message type (for example, an ordered broadcast message), and a second linked list for storing a second message type.
  • Broadcast messages (such as unordered broadcast messages). For example, as shown in FIG.
  • the AMS may set two linked lists for the first sub-queue in the first broadcast queue, wherein one linked list (such as the linked list 31) is used to store the ordered broadcast messages sent by the system application, and another linked list (such as The linked list 32) is used to store out-of-order broadcast messages sent by the system application.
  • the AMS may also set three or four more than two linked lists for the first sub-queue in the first broadcast queue, wherein at least one linked list is used to store the ordered broadcast message sent by the system application, and at least one linked list is used for An unordered broadcast message sent by the storage system application.
  • the message type identifier of the broadcast message may be carried in the broadcast message for the AMS to identify and distinguish the broadcast message.
  • the message type of the broadcast message may be first determined. If the broadcast message is a broadcast message of a first message type (eg, an ordered broadcast message), the broadcast message may be stored to a first linked list in the target broadcast queue (ie, a linked list for storing the ordered broadcast message). If the broadcast message is a broadcast message of a second message type (eg, an unordered broadcast message), the broadcast message may be stored in a second linked list in the target broadcast queue (ie, a linked list for storing the out-of-order broadcast message).
  • a first message type eg, an ordered broadcast message
  • the broadcast message may be stored to a first linked list in the target broadcast queue (ie, a linked list for storing the ordered broadcast message).
  • the broadcast message is a broadcast message of a second message type (eg, an unordered broadcast message)
  • the broadcast message may be stored in a second linked list
  • the scheduling priorities of the broadcast messages stored in different linked lists in the same broadcast queue are the same.
  • the broadcast messages in the linked list may be determined according to the scheduling manner in the actual application scenario, or may be randomly scheduled.
  • the scheduling priority of the broadcast message is determined by the broadcast message scheduling priority corresponding to the linked list storing the broadcast message. If the broadcast message is an ordered broadcast message, the broadcast message needs to be queued for scheduling after being stored in the linked list, that is, the broadcast message needs to wait for the other broadcast message scheduling processing before the queue to be scheduled. If the broadcast message is an unordered broadcast message, after the broadcast message is stored in the linked list, each broadcast message in the linked list may be scheduled in sequence, without waiting for the previous broadcast message to be processed and then scheduling the next broadcast message.
  • the scheduling processor can read the broadcast message from the linked list of the target broadcast queue according to the broadcast message scheduling priority, and then can pass the binder, etc.
  • the communication mechanism notifies the application that listens to the currently read broadcast message to process the broadcast message.
  • the AMS may invoke a broadcast receiver registered by each application in the AMS to execute a broadcast message to complete scheduling of the broadcast message.
  • the AMS may also perform special processing on the received abnormal broadcast message.
  • the AMS may also perform special processing on the received abnormal broadcast message.
  • the AMS receives a certain application (ie, specifies an application) within a preset time threshold
  • the broadcast message is greater than the preset number threshold, that is, if the AMS receives too many broadcast messages of the specified application within the preset time threshold, the specified application may be set as the abnormal application.
  • the abnormal broadcast message will bring negative experience to the user, so the user experience guarantee priority of the abnormal application can be set to the lowest priority.
  • the AMS can determine the above abnormal application as the third application of the third user experience guarantee priority.
  • the AMS may establish a broadcast queue (set as a third broadcast queue) for the third application, and set a scheduling priority of the broadcast message stored in the third broadcast queue to a third broadcast message scheduling priority.
  • the AMS may set the third broadcast message scheduling priority to the lowest priority, that is, the third broadcast message scheduling priority is lower than the second broadcast. Message scheduling priority.
  • the AMS may also set at least two broadcast message linked lists for the third broadcast queue.
  • the at least two linked lists include a third linked list for storing a broadcast message of a third message type, and a fourth linked list for storing a broadcast message of a fourth message type.
  • the third message type may be an ordered broadcast message sent by the abnormal application
  • the fourth message type may be an unordered broadcast message sent by the abnormal application.
  • FIG. 5 is another schematic diagram of a broadcast queue according to an embodiment of the present invention.
  • the AMS can set a broadcast queue for the third application, and set two linked lists in the broadcast queue, wherein one linked list (set to an ordered broadcast linked list, such as the linked list 41 in FIG. 5) is used to store the third application.
  • the ordered broadcast message sent by the program, another linked list (setting the unordered broadcast linked list, such as the linked list 42 in FIG. 5) is used to store the out-of-order broadcast message sent by the third application.
  • the AMS may determine the message type of the specified broadcast message according to the message type identifier carried in the broadcast message. If the type of the specified broadcast message is the third message type (such as an ordered broadcast message sent by the abnormal application), the specified broadcast message may be stored in the third linked list (such as the ordered broadcast linked list in FIG. 5). If the type of the specified broadcast message is the fourth message type (such as an unordered broadcast message sent by the abnormal application), the specified broadcast message may be stored in the fourth linked list (such as the unordered broadcast linked list in FIG. 5).
  • the broadcast processor may read the broadcast from the linked list according to the priority order of the third broadcast message scheduling priority by the scheduling processor.
  • the message can notify the application (such as the abnormal process in FIG. 5) that listens to the broadcast message sent by the abnormal application through a communication mechanism such as a binder to process the broadcast message and complete the scheduling of the broadcast message.
  • the third broadcast queue may be deleted to save memory space. If the broadcast message sent by the abnormal application is received, the broadcast queue of the broadcast message sent by the application storage exception application is established to avoid waste of the storage space of the terminal caused by the vacant broadcast queue.
  • the terminal may separately store the broadcast message according to the type of the application that sends the broadcast message, and may also set different scheduling priorities for the broadcast messages sent by different types of applications, thereby ensuring the system application. Or pre-emptive broadcast messages of critical applications such as applications are prioritized to ensure smooth operation of critical applications and improve the applicability of management of broadcast messages. Further, the embodiment of the present invention may further identify an abnormal application that sends a broadcast storm within a preset time threshold, and perform an abnormally sent broadcast message by dynamically establishing a broadcast queue of the abnormal application to store the abnormal broadcast message. Management, to avoid the impact of abnormal applications on other applications, further ensuring smooth running of critical applications and improving the user experience of the terminal.
  • FIG. 6 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
  • the computer system may be the terminal device provided by the foregoing embodiment of the present invention, or may be other types of computer devices.
  • the computer system includes an application layer 601, an operating system layer 600, and a hardware layer 604.
  • the modules shown in the structural diagram of the computer system shown in FIG. 6 are only partial modules of the system, not all modules.
  • the various modules included in the schematic diagram shown in FIG. 6 are only examples, and the specific structure may be determined according to actual applications, and is not limited herein.
  • the operating system may be an Android operating system, and may be an operating system that is applicable to the method provided by the embodiment of the present invention, and is not limited herein.
  • the operating system layer 600 is further divided into a system framework layer 602 and a kernel layer 603.
  • the operating system layer 600 in FIG. 6 can be considered as a specific implementation of the operating system 182 in FIG.
  • the system framework layer 602 includes a system service 610, a storage service 620, a display service 630, a media service 640, and the like.
  • the system service 610 includes a power management service (PMS) 611, a notification management service (NMS) 612, a window manager service (WMS) 613, and an AMS service 614.
  • PMS power management service
  • NMS notification management service
  • WMS window manager service
  • the AMS service 614 includes a multi-level broadcast recognizer, a multi-level broadcast constructor, a multi-level broadcast scheduler, a multi-stage broadcast executor, and the like.
  • the kernel layer 603 includes modules such as CPU resource scheduling, memory resource scheduling, and IO resource scheduling.
  • the CPU resource scheduling is used to configure a CPU of a broadcast executor corresponding to a different broadcast queue.
  • the memory resource scheduling is used to configure the memory of the broadcast executor corresponding to different broadcast queues.
  • the IO resource scheduling is used to configure the IO resource acquisition priority of the broadcast executor corresponding to different broadcast queues.
  • the multi-level broadcast identifier is used to determine a target application and a target broadcast queue corresponding to the target application, such as a first broadcast queue, a second broadcast queue, or a third broadcast queue.
  • the multi-level broadcast constructor is configured to create a first broadcast queue for storing a broadcast message sent by the first application, and a second for storing a broadcast message sent by the second application, according to the preset configuration information of the broadcast queue.
  • the multi-level broadcast constructor is further configured to configure resources such as broadcast message scheduling priorities of the first broadcast queue, the second broadcast queue, and the third broadcast queue.
  • the multi-level broadcast constructor can set the broadcast message scheduling priority of each broadcast queue to be that the broadcast message scheduling priority of the first broadcast queue is higher than the second broadcast queue, and the broadcast message scheduling priority of the second broadcast queue is higher than the first The broadcast message scheduling priority of the three broadcast queues.
  • the multi-stage broadcast scheduler is configured to perform a process such as distribution of a broadcast message by scheduling a target broadcast queue according to a target application processed by the multi-level broadcast recognizer and a target broadcast queue corresponding to the target application. For example, for the first application, the multi-level broadcast scheduler selects the first one of the plurality of broadcast queues created by the multi-level broadcast constructor to perform broadcast distribution.
  • the multi-stage broadcast executor is configured to provide broadcast distribution processing capability, and the broadcasts in the first broadcast queue, the second broadcast queue, and the third broadcast queue may be processed separately.
  • the application layer 601 of the terminal may include applications such as a phone, a short message, a camera, an instant messaging, a browser, and a map navigation.
  • the application shown in FIG. 6 is only a part of the application layer 601, not all of them, and may be set according to actual application requirements, and is not limited herein.
  • the application layer 601 in FIG. 6 can be considered as a specific implementation of the application 181 in FIG. 1 , and is not limited herein.
  • the hardware layer 604 of the terminal includes hardware modules such as a central processing unit (ie, a CPU), a sensor, a memory, an input device, and an output device (which may also be a display device).
  • the central processing unit may be equivalent to a specific implementation of the processor 150 in FIG. 1.
  • the memory may be equivalent to the memory 180 in FIG. 1, including memory and external memory.
  • the input device in FIG. 6 can be equivalent to the input device 132 in FIG. 1, and the output device in FIG. 6 can be equivalent to the display device 140 in FIG. 1, such as a liquid crystal display (LCD), holographic imaging ( English: Holographic), projection (English: Projector).
  • the hardware layer 604 may also include one or more sensors (equivalent to the sensor 120 in FIG. 1).
  • the hardware layer 604 may also include the power source, the camera, the RF circuit, and the WiFi module shown in FIG. 1, and may also include other hardware modules not shown in FIG. 1, such as a memory controller and a display controller, etc., Make restrictions.
  • FIG. 7 is a schematic structural diagram of a device for managing a broadcast message according to an embodiment of the present invention.
  • the device for managing a broadcast message according to the embodiment of the present invention may be specifically the terminal in the foregoing embodiment, which may include:
  • the receiving module 71 is configured to receive a broadcast message sent by the target application.
  • a determining module 72 configured to determine a user experience guarantee priority of the target application, and determine, from the preset at least two broadcast queues, a target broadcast queue corresponding to a user experience guarantee priority of the target application, where Each broadcast queue of the at least two broadcast queues corresponds to one broadcast message scheduling priority.
  • the storage module 73 is configured to store the broadcast message received by the receiving module 71 into the target broadcast queue determined by the determining module 72.
  • the scheduling module 74 is configured to schedule, according to the target broadcast message scheduling priority corresponding to the target broadcast queue, the broadcast message stored in the target broadcast queue by the storage module 73 when receiving the broadcast message scheduling request.
  • FIG. 8 is another schematic structural diagram of a management apparatus for a broadcast message according to an embodiment of the present invention.
  • the management device provided by the embodiment of the present invention further includes:
  • the classification module 75 is configured to divide the application of the terminal into an application of at least two user experience guarantee priorities according to the user experience guarantee priority of each application, where the at least two application experience guarantee priority applications are included.
  • a setting module 76 configured to establish a first broadcast queue corresponding to the first application that is divided by the classification module 75, a second broadcast queue corresponding to the second application, and set the first broadcast queue a first broadcast message scheduling priority, a second broadcast message scheduling priority of the second broadcast queue, the first broadcast message scheduling priority being higher than the second broadcast message scheduling priority.
  • the determining module 72 is specifically configured to:
  • the second broadcast queue is determined as a target broadcast queue.
  • the first application includes a system application and a preset application of the terminal
  • the first broadcast queue includes a first sub-queue for storing a broadcast message of the system application and a second sub-queue for storing a broadcast message of the preset application;
  • the determining module 72 is specifically configured to:
  • the second sub-queue of the first broadcast queue is determined as a target broadcast queue.
  • the at least two user experience guarantee priority applications further include a third user experience guarantee priority third application
  • the determining module 72 is further configured to:
  • the setting module 76 is further configured to:
  • the third broadcast message scheduling priority is lower than the second broadcast message scheduling priority.
  • the setting module 76 is further configured to:
  • the foregoing management device may perform the implementation manners described in the foregoing steps of the foregoing method for managing the broadcast message by using the built-in modules.
  • the foregoing management device may perform the implementation manners described in the foregoing steps of the foregoing method for managing the broadcast message by using the built-in modules.
  • the terminal when receiving the broadcast message, may store the broadcast message to the target broadcast queue according to the user experience guarantee priority of the target application that sends the broadcast message, where the target broadcast queue also corresponds to a broadcast message scheduling priority. level.
  • the scheduling process of the broadcast message may also be performed according to the broadcast message scheduling priority.
  • Improve the controllability of the storage of broadcast messages by classifying and storing broadcast messages according to the user experience guarantee priority of the application.
  • the controllability of the scheduling priority of the broadcast message is improved, thereby improving the processing efficiency of the broadcast message and enhancing the user experience of the application.
  • the target application provided by the embodiment of the present invention may be a background application or a foreground application, that is, the method provided by the present application may be used for management of a broadcast message of a foreground application, or may be managed by a broadcast message of a background application. Flexible, improving the applicability of management of broadcast messages.
  • the storage medium may be a magnetic disk, Optical disc, read-only memory (ROM), or random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例公开了一种广播消息的管理方法,包括:接收目标应用程序发送的广播消息;确定目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出目标应用程序对应的目标广播队列,其中,每个广播队列对应一个广播消息调度优先级;将广播消息存储至目标广播队列中;当接收到广播消息调度请求时,根据目标广播队列对应的目标广播消息调度优先级调度目标广播队列中存储的广播消息。本发明实施例还公开了一种广播消息的管理装置。采用本发明实施例,具有可提高广播消息的处理效率,提高广播消息的管理的适用性,增强终端的用户体验的优点。

Description

一种广播消息的管理方法及装置 技术领域
本发明涉及通信技术领域,尤其涉及一种广播消息的管理方法及装置。
背景技术
广播(英文:Broadcast)是一种广泛运用于安卓(英文:Android)操作系统的应用程序内或者应用程序之间的信息传输机制。在Android操作系统中,活动管理服务(英文:Activity Manager Service,AMS)接收到某个广播消息之后,将该广播消息存储在AMS中的广播队列,调度该广播消息时将该广播消息从广播队列中读出并广播该广播消息。当某个广播消息的处理时间较长时,将导致广播队列中后续其他广播消息处理的延时,造成接收后续其他广播消息的应用程序消息接收延迟或者运行卡顿。
现有技术采用一对广播队列,其中一个广播队列用于存储前台应用程序产生的广播消息,另外一个广播队列用于存储后台应用程序产生的广播消息。通过将前后台应用程序的广播消息进行分开存储,缓解后台应用程序的广播消息的处理对前台应用程序的广播消息的处理的影响,缓解前台应用程序运行卡顿的现象。然而,现有技术仅是区分前台应用程序和后台应用程序,无法对前台应用程序包含的各个类型的应用程序进行区分,也无法对后台应用程序包含的各个类型的应用程序进行区分。同为前台应用程序的不同应用程序产生的广播消息无法进行区别处理,或者同为后台应用程序的不同应用程序产生的广播消息无法进行区别处理,依然无法保障重要应用程序的广播消息的即时处理,无法避免重要应用程序消息接收延迟或者运行卡顿,适用性低。
发明内容
本申请提供一种广播消息的管理方法及装置,可提高广播消息的处理效率,提高广播消息的管理的适用性,增强终端的用户体验。
第一方面提供了一种广播消息的管理方法,所述方法用于管理终端的前台应用程序发送的广播消息或者用于管理终端的后台应用程序发送的广播消息,其可包括:接收目标应用程序发送的广播消息;确定目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出目标应用程序的用户体验保障优先级对应的目标广播队列,其中,所述至少2个广播队列中每个广播队列对应一个广播消息调度优先级;将所述广播消息存储至所述目标广播队列中;当接收到广播消息调度请求时,根据目标广播队列对应的目标广播消息调度优先级调度目标广播队列中存储的所述广播消息。
本申请可接收到广播消息时可根据发送广播消息的目标应用程序的用户体验保障优先级将广播消息存储至目标广播队列,其中,目标广播队列还对应一个广播消息调度优先级。广播消息调度时还可根据广播消息调度优先级进行广播消息的调度处理。本申请通过对广播消息按照应用程序的用户体验保障优先级进行分类存储,提高广播消息的存储的可控性。通过对广播消息存储的广播队列设置广播消息调度优先级,提高广播消息的调度优先级的 可控性,进而提高了广播消息的处理效率,增强了应用程序的用户体验。本申请提供的目标应用程序可为后台应用程序也可为前台应用程序,即本申请提供的方法可用于前台应用程序的广播消息的管理,也可用后台应用程序的广播消息的管理,操作灵活,提高了广播消息的管理的适用性。
本申请中提供的用户体验保障优先级用于指示应用程序对用户体验的影响程度,对用户体验的影响程度越高,用户保障优先级越高。具体的,用户体验保障优先级可由应用程序的使用频率,或者应用程序的响应延迟给用户带来的体验影响程度确定。例如,应用程序的使用频率越高,则该应用程序的用户体验保障优先级越高;或者应用程序的广播消息的响应延迟给用户带来的不便越严重,则该应用程序的用户体验保障优先级越高,等。
结合第一方面,在第一种可能的实现方式中,接收目标应用程序发送的广播消息之前,还可将终端的应用程序按照各个应用程序的用户体验保障优先级划分为至少两种用户体验保障优先级的应用程序,所述至少两种用户体验保障优先级的应用程序中包括第一用户体验保障优先级的第一应用程序和第二用户体验保障优先级的第二应用程序,所述第一用户体验保障优先级高于所述第二用户体验保障优先级;进而可建立所述第一应用程序对应的第一广播队列,所述第二应用程序对应的第二广播队列,并设定所述第一广播队列的第一广播消息调度优先级,所述第二广播队列的第二广播消息调度优先级,所述第一广播消息调度优先级高于所述第二广播消息调度优先级;从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列时,若所述目标应用程序为第一应用程序,则将所述第一广播队列确定为目标广播队列;若所述目标应用程序为第二应用程序,则将所述第二广播队列确定为目标广播队列。
本申请可预先建立多个广播队列,每个广播队列用于存储一种类型的应用程序发送的广播消息,并且每个广播队列对应一个广播消息调度优先级,提高了广播消息存储的操作灵活性,提高了广播消息的调度的可控性和处理效率。
结合第一方面第一种可能的实现方式,在第二种可能的实现方式中,所述第一应用程序包括所述终端的系统应用程序和预设应用程序;所述第一广播队列包括用于存储所述系统应用程序的广播消息的第一子队列和用于存储所述预设应用程序的广播消息的第二子队列;从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列时,若所述目标应用程序为所述终端的系统应用程序,则将所述第一广播队列的第一子队列确定为目标广播队列;若所述目标应用程序为所述预设应用程序,则将所述第一广播队列的第二子队列确定为目标广播队列。
本申请可对终端的系统应用程序或者预设应用程序的广播消息的调度优先级设置为高于其他应用程序的广播消息的调度优先级,可更好地保障系统运行顺畅,增强用户体验。此外,本申请可将系统应用程序和预设应用程序的广播消息进行分开存储,可更好地保障系统应用程序和预设应用程序的广播消息的调度竞争性,广播消息的调度操作更灵活,增强终端的用户体验。
结合第一方面第一种可能的实现方式,在第三种可能的实现方式中,所述至少两种用户体验保障优先级的应用程序中还包括第三用户体验保障优先级的第三应用程序;广播消息的管理过程中,若在预设时间阈值内接收到的指定应用程序的广播消息的数量大于预设 数量阈值,则将所述指定应用程序确定为第三应用程序;进而可建立所述第三应用程序对应的第三广播队列,将所述第三广播队列确定为目标广播队列并将所述第三应用程序的广播消息存储至所述第三广播队列;并将所述第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级;其中,所述第三广播消息调度优先级低于所述第二广播消息调度优先级。
本申请还可对预设时间阈值内发送广播消息的数量超过预期数量的异常应用程序进行单独创建广播队列,通过单独创建的广播队列来存储异常应用程序发送的广播消息,并将该广播队列的广播消息调度优先级设置为低于其他广播队列的广播消息调度优先级,减少调度资源的竞争,可避免异常应用程序发送的大量广播消息影响其他应用程序发的广播消息的处理,增强终端的用户体验。
结合第一方面第三种可能的实现方式,在第四种可能的实现方式中,广播消息的管理过程中,若所述第三广播队列中存储的广播消息被调度执行完,并且检测到所述指定应用程序退出运行,则删除所述第三广播队列。
本申请可在异常应用程序的广播消息处理结束并且异常应用程序退出之后将存储该异常应用程序的广播消息的队列删除,可节省终端的存储空间。
结合第一方面第二种可能的实现方式,在第五种可能的实现方式中,所述广播消息中还携带所述广播消息的消息类型标识;所述目标广播队列包含至少两个广播消息链表,所述至少两个广播消息链表中包含用于存储第一消息类型的广播消息的第一链表,和用于存储第二消息类型的广播消息的第二链表;将所述广播消息存储至所述目标广播队列中时可根据所述广播消息的消息类型标识确定所述广播消息的类型;若所述广播消息的类型为第一消息类型,则将所述广播消息存储至所述第一链表;若所述广播消息的类型为第二消息类型,则将所述广播消息存储至所述第二链表。
本申请可根据广播消息的消息类型设置广播队列中的不同链接,以将不同消息类型的广播消息存储至相应的广播消息链接中,适应了广播消息的类型特点,提高了广播消息的管理方法的适用性。
结合第一方面第三种可能的实现方式,在第六种可能的实现方式中,所述第三广播队列包含至少两个广播消息链表,所述至少两个广播消息链表中包含用于存储第三消息类型的广播消息的第三链表,和用于存储第四消息类型的广播消息的第四链表;广播消息的管理过程中可根据所述第三应用程序发送的指定广播消息中携带的消息类型标识确定所述指定广播消息的类型;若所述指定广播消息的类型为第三消息类型,则将所述指定广播消息存储至第三链表;若所述指定广播消息的类型为第四消息类型,将所述指定广播消息存储至第四链表。
本申请可根据广播消息的消息类型设置广播队列中的不同链接,以将不同消息类型的广播消息存储至相应的广播消息链接中,适应了广播消息的类型特点,提高了广播消息的管理方法的适用性。
第二方面提供了一种广播消息的管理装置,所述管理装置用于管理终端的前台应用程序发送的广播消息或者用于管理终端的后台应用程序发送的广播消息,其可包括:接收模块、确定模块、存储模块和调度模块;接收模块接收目标应用程序发送的广播消息;确定 模块确定接收模块接收到广播消息对应的所述目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列,其中,所述至少2个广播队列中每个广播队列对应一个广播消息调度优先级;存储模块将所述接收模块接收的所述广播消息存储至所述确定模块确定的所述目标广播队列中;调度模块在接收到广播消息调度请求时,根据所述目标广播队列对应的目标广播消息调度优先级调度所述存储模块存储在所述目标广播队列中的所述广播消息。
结合第二方面,在第一种可能的实现方式中,所述管理装置还包括:分类模块和设置模块;分类模块将终端的应用程序按照各个应用程序的用户体验保障优先级划分为至少两种用户体验保障优先级的应用程序,所述至少两种用户体验保障优先级的应用程序中包括第一用户体验保障优先级的第一应用程序和第二用户体验保障优先级的第二应用程序,所述第一用户体验保障优先级高于所述第二用户体验保障优先级;设置模块建立所述分类模块划分得到的所述第一应用程序对应的第一广播队列,所述第二应用程序对应的第二广播队列,并设定所述第一广播队列的第一广播消息调度优先级,所述第二广播队列的第二广播消息调度优先级,所述第一广播消息调度优先级高于所述第二广播消息调度优先级;所述确定模块在确定所述目标应用程序为第一应用程序时,将所述第一广播队列确定为目标广播队列,在确定所述目标应用程序为第二应用程序时,将所述第二广播队列确定为目标广播队列。
结合第二方面第一种可能的实现方式,在第二种可能的实现方式中,所述第一应用程序包括所述终端的系统应用程序和预设应用程序;所述第一广播队列包括用于存储所述系统应用程序的广播消息的第一子队列和用于存储所述预设应用程序的广播消息的第二子队列;确定模块在确定所述目标应用程序为所述终端的系统应用程序时,将所述第一广播队列的第一子队列确定为目标广播队列,在确定所述目标应用程序为所述预设应用程序时,将所述第一广播队列的第二子队列确定为目标广播队列。
结合第二方面第一种可能的实现方式,在第三种可能的实现方式中,所述至少两种用户体验保障优先级的应用程序中还包括第三用户体验保障优先级的第三应用程序;确定模块在预设时间阈值内接收到的指定应用程序的广播消息的数量大于预设数量阈值时,将所述指定应用程序确定为第三应用程序;设置模块建立所述确定模块确定的所述第三应用程序对应的第三广播队列,将所述第三广播队列确定为目标广播队列并通过所述存储模块将所述第三应用程序的广播消息存储至所述第三广播队列,将所述第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级;其中,所述第三广播消息调度优先级低于所述第二广播消息调度优先级。
结合第二方面第三种可能的实现方式,在第四种可能的实现方式中,所述设置模块还可在所述调度模块调度执行完所述第三广播队列中存储的广播消息,并且检测到所述指定应用程序退出运行时,删除所述第三广播队列。
第三方面提供了一种终端,其可包括:存储器和处理器;所述存储器用于存储一种程序代码;所述处理器用于调用所述存储器中存储的程序代码执行如下操作:
接收目标应用程序发送的广播消息;确定所述目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目 标广播队列,其中,所述至少2个广播队列中每个广播队列对应一个广播消息调度优先级;将所述广播消息存储至所述目标广播队列中;当接收到广播消息调度请求时,根据所述目标广播队列对应的目标广播消息调度优先级调度所述目标广播队列中存储的所述广播消息。
结合第三方面,在第一种可能的实现方式中,所述处理器还可将终端的应用程序按照各个应用程序的用户体验保障优先级划分为至少两种用户体验保障优先级的应用程序,包括第一用户体验保障优先级的第一应用程序和第二用户体验保障优先级的第二应用程序,所述第一用户体验保障优先级高于所述第二用户体验保障优先级;建立所述第一应用程序对应的第一广播队列,所述第二应用程序对应的第二广播队列,并设定所述第一广播队列的第一广播消息调度优先级,所述第二广播队列的第二广播消息调度优先级,所述第一广播消息调度优先级高于所述第二广播消息调度优先级;在所述目标应用程序为第一应用程序时,将所述第一广播队列确定为目标广播队列;在所述目标应用程序为第二应用程序时,将所述第二广播队列确定为目标广播队列。
结合第三方面第一种可能的实现方式,在第二种可能的实现方式中,所述第一应用程序包括所述终端的系统应用程序和预设应用程序;所述第一广播队列包括用于存储所述系统应用程序的广播消息的第一子队列和用于存储所述预设应用程序的广播消息的第二子队列;若所述目标应用程序为所述终端的系统应用程序,处理器则将所述第一广播队列的第一子队列确定为目标广播队列,若所述目标应用程序为所述预设应用程序,则将所述第一广播队列的第二子队列确定为目标广播队列。
结合第三方面第一种可能的实现方式,在第三种可能的实现方式中,所述至少两种用户体验保障优先级的应用程序中还包括第三用户体验保障优先级的第三应用程序;若在预设时间阈值内接收到的指定应用程序的广播消息的数量大于预设数量阈值,处理器则将所述指定应用程序确定为第三应用程序;处理器建立所述第三应用程序对应的第三广播队列,将所述第三广播队列确定为目标广播队列并将所述第三应用程序的广播消息存储至所述第三广播队列;进而将所述第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级;其中,所述第三广播消息调度优先级低于所述第二广播消息调度优先级。
结合第三方面第三种可能的实现方式,在第四种可能的实现方式中,处理器还可在所述第三广播队列中存储的广播消息被调度执行完,并且检测到所述指定应用程序退出运行时,删除所述第三广播队列。
本申请可接收到广播消息时可根据发送广播消息的目标应用程序的用户体验保障优先级将广播消息存储至目标广播队列,其中,目标广播队列还对应一个广播消息调度优先级。广播消息调度时还可根据广播消息调度优先级进行广播消息的调度处理。本申请通过对广播消息按照应用程序的用户体验保障优先级进行分类存储,提高广播消息的存储的可控性。通过对广播消息存储的广播队列设置广播消息调度优先级,提高广播消息的调度优先级的可控性,进而提高了广播消息的处理效率,增强了应用程序的用户体验。本申请提供的目标应用程序可为后台应用程序也可为前台应用程序,即本申请提供的方法可用于前台应用程序的广播消息的管理,也可用后台应用程序的广播消息的管理,操作灵活,提高了广播消息的管理方法的适用性。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例应用的终端设备的结构示意图;
图2是现有的广播消息的传输的交互示意图;
图3是本发明实施例提供的广播消息的管理方法的流程示意图;
图4是本发明实施例提供的广播队列的一示意图;
图5是本发明实施例提供的广播队列的另一示意图;
图6是本发明实施例提供的计算机系统的结构示意图;
图7是本发明实施例提供的广播消息的管理装置的一结构示意图;
图8是本发明实施例提供的广播消息的管理装置的另一结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供的广播消息的管理方法主要应用于终端设备,该终端设备也可称之为用户设备(英文:User Equipment,UE)、移动台(英文:Mobile Station,MS)、移动终端(英文:Mobile Terminal)等。可选的,该终端设备(以下简称终端)可以具备经无线接入网(英文:Radio Access Network,RAN)与一个或多个核心网进行通信的能力。例如,终端可以是移动电话(或称为“蜂窝”电话)、或具有移动性质的计算机等。例如,终端还可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置。应理解的是,除了终端设备以外,本发明实施例提供的广播消息的管理方法也可以应用于其他类型的计算机系统。
请参考图1,为本发明实施例提供的终端设备的结构示意图。如图1所示,终端设备100包括存储器180、处理器150以及显示设备140。存储器180存储计算机程序(或称程序代码),该计算机程序包括操作系统程序182和应用程序181等。处理器150用于读取存储器180中的计算机程序,然后执行计算机程序定义的方法,例如处理器150读取操作系统程序182从而在该终端设备100上运行操作系统以及实现操作系统的各种功能,或读取一种或多种应用程序181,从而在该终端设备上运行应用或者进行应用程序的广播消息的处理等。
处理器150可以包括一个或多个处理器,例如,处理器150可以包括一个或多个中央处理器,或者包括一个或者多个中央处理器和一个或者多个应用处理器。当处理器150包括多个处理器时,这多个处理器可以集成在同一块芯片上,也可以各自为独立的芯片。一个处理器可以包括一个或多个处理器核(或称处理核),以下实施例均以多核为例来介绍, 但是本发明实施例提供的广播消息的管理方法也可以应用于单核处理器,利用单核处理器的分时工作原理执行多个应用程序的并行运行。
另外,存储器180还存储有除计算机程序之外的其他数据183,其他数据183可包括操作系统182或应用程序181被运行后产生的数据等,该数据包括系统数据(例如操作系统的配置参数)和用户数据,例如各个应用程序产生的广播消息就是典型的用户数据。
存储器180一般包括内存和外存。内存可以为随机存储器(RAM),只读存储器(ROM),以及高速缓存(CACHE)等。外存可以为硬盘、光盘、USB盘、软盘或磁带机等。计算机程序通常被存储在外存上,处理器在执行处理前会将计算机程序从外存加载到内存。
操作系统程序182中包含了可实现本发明实施例提供的广播消息的管理方法的计算机程序,从而使得处理器150读取到该操作系统程序182并运行该操作系统后,该操作系统可具备本发明实施例提供的广播消息的管理功能。
终端设备100还可以包括输入设备130,用于接收输入的数字信息、字符信息或接触式触摸操作/非接触式手势,以及产生与终端设备100的用户设置以及功能控制有关的信号输入等。具体地,本发明实施例中,该输入设备130可以包括触控面板131。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器150,并能接收处理器150发来的命令并加以执行。例如,用户在触控面板131上用手指双击一个应用程序的图标,触摸检测装置检测到此次双击带来的这个信号,然后将该信号传送给触摸控制器,触摸控制器再将这个信号转换成坐标发送给处理器150,处理器150根据该坐标和该信号的类型(如双击)执行启动该应用程序等操作,最后将该应用程序的操作界面显示在显示面板141上,从而实现“打开”应用程序。
触控面板131可以采用电阻式、电容式、红外线以及表面声波等多种类型实现。除了触控面板131,输入设备130还可以包括其他输入设备132,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
终端设备100包括的显示设备140,包括显示面板141,用于显示由用户输入的信息或提供给用户的信息以及终端设备100的各种菜单界面等,在本发明实施例中主要用于显示应用程序的用户操作界面等信息。可选的,可以采用液晶显示器(英文:Liquid Crystal Display,LED)或有机发光二极管(英文:Organic Light-Emitting Diode,OLED)等形式来配置显示面板141。在其他一些实施例中,触控面板131可覆盖显示面板141上,形成触摸显示屏。
除以上之外,终端设备100还可以包括用于给其他模块供电的电源190以及用于拍摄照片或视频的摄像头160。终端设备100还可以包括一个或多个传感器120,例如重力传感器、加速度传感器、光传感器等。终端设备100还可以包括无线射频(英文:Radio Frequency,RF)电路110,用于与无线网络设备进行网络通信,还可以包括WiFi模块170,用于与其 他设备进行WiFi通信等。
下面的实施例将以终端为执行主体对本发明实施例提供的广播消息的管理方法及装置进行描述。本发明实施例提供的广播消息的管理方法可以实现在图1所示的操作系统程序182中。
在Android操作系统中,各个应用程序运行过程中会产生各种各样的广播消息。例如,终端中包含的用于监控电池的使用状态的应用程序在电池的使用过程中会发出广播消息,短信模块接收到信息也会产生一个广播消息等。应用程序的开发者也可监听应用程序运行过程中发出的广播消息,进而可根据广播消息作出程序逻辑的处理等操作。在广播这种信息传输机制中,广播消息可以被一个或者多个应用程序所接收,也可不被任何应用程序所接收。即,在广播这种信息传输机制中,广播消息的发送方并不关心接收方是否接收到数据,也不关心接收方是如何处理数据的。
在Android操作系统中,广播消息的发送方发出的广播消息可预先存储在AMS中,再由AMS通知广播消息的监听对象(即广播消息的接收方)来处理该广播消息。在AMS中,广播消息可存储在AMS中设置的队列(下面称广播队列)中,广播消息的入列(即消息存入队列中)和出列(即消息从队列中输出)由不同的进程触发,并且广播消息的入列和出列均需要使用AMS锁。具体实现中,串行广播(也称有序广播)消息的处理需要按照串行广播消息入列的时序先后进行处理。并行广播(也称无序广播)消息从队列中调度可并行进行,具体调度优先级可由各个并行广播消息抢占得到AMS锁的顺序确定,优先抢占得到AMS锁的广播消息优先调度。当某个应用程序发出的串行广播消息(即广播消息的传输采用串行模式)的处理时间较长时,将导致广播队列中后续其他串行广播消息处理的延时,造成其他串行广播消息对应的应用程序的消息接收延迟或者运行卡顿。若应用程序发出的并行广播消息(即广播消息的传输采用并行模式)较多时,则将导致广播消息调度时各个并行广播消息抢占AMS导致的AMS锁竞争加剧,无法保证各个应用程序的处理时效,容易造成应用程序运行卡顿或者消息接收延迟。
现有技术采用一对全局的广播队列(包含两个广播队列),其中一个广播队列用于存储前台应用程序产生的广播消息,另外一个广播队列用于存储后台应用程序产生的广播消息。通过将前后台应用程序的广播消息进行分开存储,缓解后台应用程序的广播消息的处理对前台应用程序的广播消息的处理的影响,缓解前台应用程序运行卡顿的现象。参见图2,是现有的广播消息的传输的交互示意图。如图2,现有的广播消息的传输方案中,AMS使用一对广播队列来存储广播消息。其中,上述广播队列对中包含一个用于存储前台应用程序的广播消息的广播队列(如图2中的广播队列1),和一个用于存储后台应用程序的广播消息的广播队列(如图2中的广播队列2)。其中,每个广播队列包含两个链表,其中一个链表(如图2中的链表11)用于存储有序广播消息(即串行广播消息),另外一个链表(如图2中的链表12)用于存储无序广播消息(即并行广播消息)。
在广播消息传输中,需要监听或者处理广播消息的应用程序(具体也可为进程,如图2中的进程1)需要提前注册一个广播接收器到AMS中(如图2中的步骤1)。具体的,进程1可使用广播接收器的注册函数(如registerReceiver)来动态注册一个广播接收器到AMS中,或者在AndroidManifest.xml(即Android应用程序中包含的清单文件)中静态注册一 个广播接收器到AMS中。AMS会保存所有的广播接收器到一个成员变量(例如mReceiverResolver成员变量)中。发送广播消息的应用程序(具体也可表现为一个进程,如图2中的进程2)通过发送广播函数(如sendBroadcast)发送一个广播消息到AMS(如图2中的步骤2)。AMS首先通过查询mReceiverResolver成员变量,找出该广播消息对应的所有的接收者(即已经在ASM中注册的所有广播接收器中包含的监听该广播消息的广播接收器),然后生成一个BroadcastRecord(即广播记录)。进一步的,AMS根据上述BroadcastRecord中记录的该广播消息的接收方的类型和广播消息的类型将上述广播消息放入相应的广播队列链表中。其中,上述广播消息的接收方的类型包括前台应用程序(或者前台进程)或者后台应用程序(或者后台进程)等。上述广播消息的类型包括串行广播消息(即有序广播消息)或者并行广播消息(即无序广播消息)等。
AMS将广播消息存入相应的广播队列链表之后,则可按照广播消息的调度时序,通过广播消息调度的线程(英文:Handler)依次从串行广播消息的广播队列链表(即串行广播链表)中读取串行广播消息,或者通过广播消息调度的线程从并行广播消息的广播队列链表(即并行广播链表)中读取所有广播消息。进一步的,AMS再使用binder等通信机制通知各个广播消息的接收方应用程序来进行广播消息的处理,具体的,AMS可使用binder远程调用广播接收方在AMS中已注册的广播接收处理函数(即onReceiver函数)来执行广播消息的处理(如图2中的步骤3)。
由上可知,现有的技术方案使用一对广播队列(只区分前后台应用程序),不区分应用程序的类型。当某个应用程序的广播消息(尤其是有序广播消息)过多或者某个广播消息的接收方的数量过多时,该广播消息的处理时间较长,这将导致系统卡顿及其他广播消息的处理延时等问题。例如,系统应用程序和其他所有应用程序共用一对广播消息队列,串行广播消息都存储在串行广播链表中,并行广播消息都存储在并行广播链表中。当后台应用程序发出的串行广播消息过多时,将可能造成串行广播链表过长从而导致AMS需要较长的时间处理后台应用程序发出的广播消息,进而使得后台应用程序发出的广播消息的处理占用AMS锁的时间较长,导致前台应用程序的广播消息因为抢占不到AMS锁而得不到处理,容易引起前台应用程序运行卡顿等问题。进一步的,当前台应用程序或者后台应用程序发出的并行广播消息过多时,由于广播消息的入列管理进程或者广播消息的出列管理进程对并行广播链表进行访问需要持有AMS锁,并行广播链表中存储的广播消息过多还将导致抢占AMS锁的竞争加剧,容易引起应用程序运行卡顿等问题。
为了实现不同应用类型的应用程序发送的广播消息的区别处理,以保证系统应用程序或者关键应用程序的运行顺畅,本发明实施例提供了一种广播消息的管理方法及装置,可将前台应用程序发送的广播消息或者后台应用程序发送的广播消息按照应用程序的用户体验保障优先级顺序进行区别存储和调度,提高广播消息的管理的适用性。下面将结合图3至图8对本发明实施例提供的广播消息的管理方法及装置进行描述。
参见图3,是本发明实施例提供的广播消息的管理方法的流程示意图。本发明实施例提供的方法,包括步骤:
S201,接收目标应用程序发送的广播消息。
具体实现中,本发明实施例提供的广播消息的管理方法适用于终端的前台应用程序的广播消息的管理,也适用于终端的后台应用程序的广播消息的管理。具体实现中,终端可为前台应用程序和后台应用程序分别设置多个广播队列,前台应用程序和后台应用程序的广播队列可成对设置,也可分别根据需求设置,在此不做限制。前台应用程序对应的多个广播队列,或者后台应用程序对应的多个广播队列中,不同的广播队列用于存储不同类型的应用程序发送的广播消息。其中,每个广播队列包含多个链表,同一个广播队列的不同的链表用于存储相同应用程序类型的不同广播消息类型的广播消息。
在一些可行的实施方式中,终端接收到广播消息之后,可首先判断该广播消息来自前台,还是来自后台,进而可确定是将广播消息存储在前台应用程序对应的广播队列中,还是将广播消息存储在后台应用程序对应的广播队列中。具体的,终端可根据AMS中保存的已注册的广播接收器(即广播消息的监听者)的前后台情况,确定广播消息为前台广播消息还是后台广播消息。进一步的,终端可采用本发明实施例提供的广播消息的管理方法确定具体将广播消息存储至哪个广播队列,以实现广播消息的针对性管理,还可通过存储广播消息来确定广播消息的调度优先级等信息。下面将以前台应用程序发送的广播消息为例进行说明,当然,下述具体实现方式也适用于后台应用程序发送的广播消息的管理,在此不做限制。
在一些可行的实施方式中,本发明实施例提供的广播消息的管理方法的执行主体可为终端中的AMS等模块,也可为其他具有广播消息的管理功能的模块,在此不做限制,本发明实施例将以AMS为例进行描述。具体实现中,终端的应用程序向AMS发送广播消息时,可在广播消息中携带应用程序的用户标识(英文:User Identification,UID)或者包名(英文:Package Name,PKGName)等标识信息。其中,上述应用程序的UID或者PKGName等标识信息可用于确定应用程序的名称,进而可确定应用程序的类型(简称应用类型)等信息。其中,上述向终端发送广播消息的应用程序可为终端内置的所有应用程序中的一个或者多个,下面将以其中一个应用程序(即目标应用程序)为例进行说明。
在一些可行的实施方式中,终端的AMS接收到目标应用程序发送的广播消息之后,可解析上述广播消息,获取广播消息中携带的UID或者PKGName或者使用频率数据或者应用程序类型白名单等应用程序的标识信息。AMS获取得到上述广播消息中携带的应用程序的标识信息之后,则可根据上述标识信息确定目标应用程序的类型以及应用程序的用户体验保障优先级。
需要说明的是,本发明实施例提供的应用程序的用户体验保障优先级可由应用程序的使用频率,或者应用程序的响应延迟给用户带来的体验影响程度确定。例如,系统应用程序为系统运行必备的应用程序(通过应用程序的UID,或者PKGName确定),因此系统应用程序的使用频率最高,系统应用程序的运行顺畅与否对用户的影响也最大,由此可确定系统应用程序的用户体验保障优先级最高。即时通讯工具等应用程序为用户每天使用的应用程序,该类应用程序的使用频率也较高,即时通讯工具运行的顺畅与否对用户的影响也较大,由此也可确定即时通讯工具等应用程序的用户体验保障优先级较高。用户较少使用或者应用程序的运行顺畅与否对用户感知的影响不明显的应用程序,则可确定其用户体验保障优先级较低。具体实现中,终端可以以此方式确定终端中各个应用程序的用户体验保障 优先级,进而可在各个应用程序发送的广播消息中添加各个应用程序的用户体验保障优先级的标识信息,例如“1”或者“0”等标识符标识第一用户体验保障优先级(可由“1”标识)或者第二用户体验保障优先级(可由“0”标识)。由此可在接收到各个应用程序的广播消息时确定应用程序的用户体验保障优先级。进一步的,终端也可通过上述实现方式确定终端中各个应用程序的用户体验保障优先级,进而可建立各个应用程序的标识与其用户体验保障优先级的对应关系。由此可在确定各个应用程序UID等标识信息时确定应用程序的用户体验保障优先级。具体实现中,终端还可通过更多的实现方式确定应用程序的用户体验保障优先级,具体可根据实际应用场景需求或者技术需求确定,在此不做限制。
进一步的,在一些可行的实施方式中,终端的AMS在接收目标应用程序发送的广播消息之前,可预先在将终端内置的所有应用程序进行分类,以对各个应用程序发送的广播消息进行分类管理。具体实现中,终端可通过使用白名单机制确定关键应用程序,或者可根据用户对终端的各个应用程序的使用频率等信息将使用频率高于预设频率阈值的应用程序设定为关键应用程序。终端也可将各个应用程序中的即时通讯类应用程序设定为关键应用程序,或者将对广播消息的收发比较敏感、广播消息的收发对应用程序的用户体验影响比较大的应用程序设定为关键应用程序。其中,上述关键应用程序的设定方式仅为举例,具体可根据实际应用程序确定,在此不做限制。上述关键应用程序可为用户体验保障优先级最高的应用程序,与终端的系统应用程序的用户体验保障优先级相同。或者上述终端的系统应用程序的用户体验保障优先级最高,上述关键应用程序的用户体验保障优先级低于系统应用程序的用户体验保障优先级,高于其他应用程序的用户体验保障优先级,具体可根据实际应用场景确定,在此不做限制。
终端确定了关键应用程序之后,可生成关键应用程序列表并发送给AMS,以供AMS对关键应用程序的广播消息进行管理,上述关键应用程序列表中包含上述各种设定方式确定的至少一个关键应用程序。进一步的,终端还可根据终端运行过程中新安装的应用程序,或者用户使用习惯等信息适时地更新关键应用程序列表中包含的关键应用程序。例如,可在终端开机或者终端连接无线网络等时间点更新关键应用程序列表中包含的应用程序。
在一些可行的实施方式中,AMS接收到关键应用程序列表之后,则可将终端的应用程序与上述关键应用程序列表中包含的应用程序进行比对,将终端内置的应用程序中包含在上述关键应用程序列表中的应用程序确定为第一用户体验保障优先级的第一应用程序。进一步的,为了保障终端系统运行顺畅,AMS可将终端的系统应用程序也设定为第一用户体验保障优先级的第一应用程序。不包含在上述关键应用程序列表中,也不是终端的系统应用程序的其他应用程序则可设定为第二用户体验保障优先级的第二应用程序。需要说明的是,上述关键应用程序或者第二应用程序可为终端从应用市场等平台中下载、安装的第三方应用程序,在此不做限制。
进一步的,参见图4,图4是本发明实施例提供的广播队列的一示意图。在一些可行的实施方式中,AMS将终端的应用程序进行分类之后,还可分别为各个类型的应用程序建立广播队列,上述广播队列用于存储各个类型的应用程序发送的广播消息。具体实现中,AMS可建立第一应用程序对应的第一广播队列,建立第二应用程序对应的第二广播队列等。其中,上述第一广播队列和第二广播队列为两个广播队列,广播队列的队列类型可相同,也 可不同,具体可根据实际应用需求确定,在此不做限制。进一步的,AMS还可为每个广播队列设定广播消息调度优先级,其中,上述广播消息调度优先级用于确定该广播队列中存储的广播消息的调度优先级。具体的,AMS可设定第一广播队列的第一广播消息调度优先级,还可设定第二广播队列的第二广播消息调度优先级,并且第一广播消息调度优先级高于第二广播消息调度优先级。即,AMS可设定终端中包含的关键应用程序和系统应用程序发送的广播消息的调度优先级高于其他应用程序发送的广播消息的调度优先级,可保证关键应用程序和系统应用程序的运行顺畅,保障关键应用程序和系统应用程序的用户体验。
具体实现中,AMS预先建立了第一应用程序的第一广播队列和第二应用程序的第二广播队列,并设定第一广播消息调度优先级和第二广播消息调度优先级之后,则可在接收到广播消息时,根据发送广播消息的应用程序的类型确定将广播消息存储至第一广播队列还是第二广播队列,同时将广播消息存储至相应的广播队列也决定了该广播消息的调度优先级等信息。
S202,确定所述目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列。
在一些可行的实施方式中,AMS可根据广播消息中携带的应用程序的标识等信息确定目标应用程序,进而可将目标应用程序与上述关键应用程序列表中包含的各个应用程序进行匹配,确定上述目标应用程序是否包含在上述关键应用程序列表中。若目标应用程序包含在上述关键应用程序列表中,则可确定目标应用程序为第一用户体验保障优先级的第一应用程序。若目标应用程序不包含在上述关键应用程序列表中,则可确定上述目标应用程序是否为终端的系统应用程序。若上述目标应用程序为终端的系统应用程序,则可确定上述目标应用程序为第一用户体验保障优先级的第一应用程序,否则可将目标应用程序确定为第二用户体验保障优先级的第二应用程序。
在一些可行的实施方式中,若上述目标应用程序为第一应用程序,则可将第一广播队列确定为目标广播队列。若上述目标应用程序为第二应用程序,则可将第二广播队列确定为目标广播队列。
进一步的,如图4,若上述第一应用程序中包含关键应用程序列表中包含的应用程序(可设定为预设应用程序)和系统应用程序,则可建立第一广播队列的两个子队列,其中一个子队列(可设定为第二子队列)用于存储预设应用程序的广播消息,另外一个子队列(可设定为第一子队列)用于存储系统应用程序的广播消息。具体实现中,上述第一广播队列的第一子队列和第二子队列可为与第二广播队列相同的队列格式的队列,也可为与第二广播队列不同的队列格式的队列,并且第一子队列和第二子队列中存储的广播消息的调度优先级均为预先设定的第一广播队列的第一广播消息调度优先级。即,第一广播队列的第一子队列和第二子队列的广播消息的调度优先级相同,并且均高于第二广播队列的第二广播消息调度优先级。具体实现中,上述第一广播队列的第一子队列和第二子队列的广播消息的调度优先级也可不同,具体两者之间的调度优先级顺序可根据实际应用场景确定,在此不做限制。
具体实现中,若AMS确定目标应用程序为终端的系统应用程序,则可将第一广播队列的第一子队列确定为目标广播队列。若AMS确定目标应用程序为预设应用程序,则可将第 一广播队列的第二子队列确定为目标广播队列。AMS确定了目标广播队列之后,则可将广播消息存储至上述目标广播队列中,以供后续调度、处理。
S203,将所述广播消息存储至所述目标广播队列中。
在一些可行的实施方式中,应用程序发送的广播消息中还可分为有序广播消息(也称串行广播消息)和无序广播消息(也称并行广播消息)。AMS可将接收到的广播消息按照有序广播消息和无序广播消息进行分开存储。具体实现中,AMS建立的第一广播队列和第二广播队列中每个广播队列及其子队列均可包含至少两个广播消息链表。其中,上述至少两个广播消息链表中包含第一链表和第二链表,第一链表用于存储第一消息类型的广播消息(例如有序广播消息),第二链表用于存储第二消息类型的广播消息(例如无序广播消息)。例如,如图4,AMS可为第一广播队列中的第一子队列设置两个链表,其中一个链表(如链表31)用于存储系统应用程序发送的有序广播消息,另外一个链表(如链表32)用于存储系统应用程序发送的无序广播消息。AMS也可为第一广播队列中的第一子队列设置三个或者四个等多于两个的链表,其中至少一个链表用于存储系统应用程序发送的有序广播消息,至少一个链表用于存储系统应用程序发送的无序广播消息。
在一些可行的实施方式中,终端的应用程序发送广播消息时可在广播消息中携带广播消息的消息类型标识,以供AMS对广播消息进行识别和区分存储。具体实现中,AMS将广播消息存储至目标广播队列时,可首先判断广播消息的消息类型。如果广播消息为第一消息类型(例如有序广播消息)的广播消息,则可将上述广播消息存储至目标广播队列中的第一链表(即用于存储有序广播消息的链表)。若上述广播消息为第二消息类型(例如无序广播消息)的广播消息,则可将上述广播消息存储至目标广播队列中的第二链表(即用于存储无序广播消息的链表)。
需要说明的是,同一个广播队列中不同链表存储的广播消息的调度优先级相同,具体调度哪个链表中的广播消息可根据实际应用场景中的调度方式确定,也可随机调度。AMS将广播消息存储至具体链表之后,该广播消息的调度优先级则由存储该广播消息的链表对应的广播消息调度优先级确定。若该广播消息为有序广播消息,则该广播消息存入链表之后需按照时序先后进行排队等待调度,即,该广播消息需要等待排队在前的其他广播消息调度处理完成之后才能被调度。若该广播消息为无序广播消息,则该广播消息存入链表之后,可依次调度链表中的各个广播消息,而不需要等上一个广播消息处理完成再调度下一个广播消息。
S204,当接收到广播消息调度请求时,根据所述目标广播队列对应的目标广播消息调度优先级调度所述目标广播队列中存储的所述广播消息。
在一些可行的实施方式中,AMS将广播消息存储至目标广播队列的具体链表之后,可通过调度处理器按照广播消息调度优先级从目标广播队列的链表中读出广播消息,进而可通过binder等通信机制通知监听当前读出的广播消息的应用程序来处理该广播消息。具体的,AMS可调用各个应用程序预先在AMS中注册的广播接收器来执行广播消息,以完成广播消息的调度。
进一步的,在一些可行的实施方式中,AMS还可对接收到的异常广播消息进行特殊处理。具体实现中,若AMS在预设时间阈值内接收到某个应用程序(即指定应用程序)的广 播消息大于预设数量阈值,即AMS在预设时间阈值内接收到指定应用程序的广播消息过多,则可将该指定应用程序设定为异常应用程序。此时异常广播消息将给用户带来负面的体验效果,因此异常应用程序的用户体验保障优先级可设定为最低优先级。具体的,AMS可将上述异常应用程序确定为第三用户体验保障优先级的第三应用程序。进一步的,AMS可为第三应用程序建立广播队列(设为第三广播队列),并将第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级。具体实现中,为了保障正常运行的应用程序发出的广播消息的优先处理,AMS可将第三广播消息调度优先级设定为最低优先级,即,第三广播消息调度优先级低于第二广播消息调度优先级。
进一步的,在一些可行的实施方式中,AMS也可为第三广播队列设置至少两个广播消息链表。其中,上述至少两个链表中包含用于存储第三消息类型的广播消息的第三链表,和用于存储第四消息类型的广播消息的第四链表。其中,上述第三消息类型具体可为异常应用程序发送的有序广播消息,上述第四消息类型具体可为异常应用程序发送的无序广播消息。如图5,图5是本发明实施例提供的广播队列的另一示意图。AMS可为第三应用程序设定一个广播队列,并在该广播队列中设定两个链表,其中一个链表(设为有序广播链表,如图5中的链表41)用于存储第三应用程序发送的有序广播消息,另一个链表(设定无序广播链表,如图5中的链表42)用于存储第三应用程序发送的无序广播消息。
具体实现中,AMS接收到异常应用程序发送的广播消息(即指定广播消息)之后,可根据广播消息中携带的消息类型标识确定上述指定广播消息的消息类型。如果上述指定广播消息的类型为第三消息类型(如异常应用程序发送的有序广播消息),则可将上述指定广播消息存储至第三链表(如图5中的有序广播链表)。若上述指定广播消息的类型为第四消息类型(如异常应用程序发送的无序广播消息),则可将上述指定广播消息存储至第四链表(如图5中的无序广播链表)。
进一步的,在一些可行的实施方式中,AMS将上述异常应用程序发送的广播消息存储至相关链表之后,可通过调度处理器按照第三广播消息调度优先级的优先级排序从链表中读出广播消息,进而可通过binder等通信机制通知监听该异常应用程序发送的广播消息的应用程序(如图5中的异常进程)来处理该广播消息,完成广播消息的调度。上述第三广播队列中的广播消息被调度执行结束之后,若检测到上述异常应用程序(即指定应用程序)退出运行,则可删除上述第三广播队列,节省内存空间。若后续再接收到异常应用程序发送的广播消息,则再建立应用存储异常应用程序发送的广播消息的广播队列,以避免空置的广播队列造成终端的存储空间的浪费。
在本发明实施例中,终端可根据发送广播消息的应用程序的类型将广播消息进行区分存储,还可为不同类型的应用程序发送的广播消息设定不同的调度优先级,可保障系统应用程序或者预设应用程序等关键应用程序的广播消息优先处理,保障关键应用程序的运行顺畅,提高广播消息的管理的适用性。进一步的,本发明实施例还可对预设时间阈值内发送广播风暴的异常应用程序进行识别,并通过动态建立异常应用程序的广播队列对异常广播消息进行存储的方式进行异常发送的广播消息进行管理,避免异常应用程序对其他应用程序的影响,进一步保障了关键应用程序的运行顺畅,提高了终端的用户体验。
以上主要介绍了本发明实施例提供的方法的具体流程,下面结合图6并以Android操 作系统为例,介绍本发明实施例提供的方法的实现位置和运行时状态,更具体的方法流程可参考前述实施例。
请参阅图6,为本发明实施例提供的计算机系统的结构示意图。该计算机系统可以是上述本发明实施例提供的终端设备,也可以是其他类型的计算机设备。该计算机系统包括应用层601、操作系统层600和硬件层604。需要说明的是,图6所示的计算机系统的结构示意图中展示的模块的仅是系统的部分模块,并非全部模块。图6所示的结构示意图中包含的各个模块仅是示例,具体结构可根据实际应用确定,在此不做限制。
其中,上述操作系统可以为Android操作系统,也可为其他适用于本发明实施例提供的方法的操作系统,在此不做限制。操作系统层600又分为系统框架层602和内核层603。其中,图6中的操作系统层600可以认为是图1中操作系统182的一种具体实现。系统框架层602包括系统服务610、存储服务620、显示服务630和媒体服务640等。系统服务610包括电源管理服务(英文:power manager service,PMS)611、通知管理服务(英文:notification manager service,NMS)612、窗口管理服务(英文:window manager service,WMS)613和AMS服务614等。其中,AMS服务614包括多级广播识别器、多级广播构造器、多级广播调度器和多级广播执行器等。内核层603包括CPU资源调度、内存资源调度和IO资源调度等模块。其中,CPU资源调度用于配置不同的广播队列对应的广播执行器的CPU。内存资源调度用于配置不同的广播队列对应的广播执行器的内存。IO资源调度用于配置不同的广播队列对应的广播执行器的IO资源获取优先级等。
本发明实施例前述任意一个实现方式均可以实现在图6所示的AMS服务614中。
在一些可行的实施方式中,在AMS服务中,多级广播识别器用于确定目标应用程序以及目标应用程序对应的目标广播队列,例如第一广播队列、第二广播队列或者第三广播队列等。多级广播构造器用于根据预先设定的广播队列的配置信息,创建分别用于存储第一应用程序发送的广播消息的第一广播队列、用于存储第二应用程序发送的广播消息的第二广播队列以及用于存储第三应用程序发送的广播消息的第三广播队列。多级广播构造器还用于配置第一广播队列、第二广播队列和第三广播队列的广播消息调度优先级等资源。例如,多级广播构造器可设定各个广播队列的广播消息调度优先级为第一广播队列的广播消息调度优先级高于第二广播队列,第二广播队列的广播消息调度优先级高于第三广播队列的广播消息调度优先级。多级广播调度器用于根据多级广播识别器处理得到的目标应用程序以及目标应用程序对应的目标广播队列,调度目标广播队列来执行广播消息的分发等处理。例如,对于第一应用程序,多级广播调度器选择多级广播构造器创建的多个广播队列中的第一广播队列来执行广播分发。多级广播执行器用于提供广播分发处理能力,可分别处理第一广播队列、第二广播队列、第三广播队列中的广播。
进一步的,如图6,终端的应用层601可包括电话、短信、照相机、即时通讯、浏览器和地图导航等应用。其中,图6中展示的应用仅是应用层601中的部分应用,并非全部,具体可根据实际应用需求设定,在此不做限制。具体实现中,图6中的应用层601可以认为是图1中应用程序181的一种具体实现,在此不做限制。终端的硬件层604包括中央处理器(即CPU)、传感器、存储器、输入设备和输出设备(具体也可为显示设备)等硬件模块。其中,图6中展示的硬件模块仅是硬件层604中的部分模块,并非全部,具体可根据 实际应用需求设定,在此不做限制。其中,中央处理器可相当于图1中的处理器150的一种具体实现,存储器可相当于图1中的存储器180,包括内存和外存。图6中的输入设备可相当于图1中的输入设备132,图6中的输出设备可相当于图1中的显示设备140,例如液晶显示器(英文:Liquid Crystal Display,LCD)、全息成像(英文:Holographic)、投影(英文:Projector)等。当然除此之外,硬件层604还可以包括一个或多个传感器(相当于图1中的传感器120)。硬件层604还可以包括图1中示出的电源、摄像头、RF电路和WiFi模块,还可以包括图1中也没有示出的其他硬件模块,例如内存控制器和显示控制器等,在此不做限制。
参见图7,是本发明实施例提供的广播消息的管理装置的一结构示意图。本发明实施例提供的广播消息的管理装置具体可为上述实施例中的终端,其可包括:
接收模块71,用于接收目标应用程序发送的广播消息。
确定模块72,用于确定所述目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列,其中,所述至少2个广播队列中每个广播队列对应一个广播消息调度优先级。
存储模块73,用于将所述接收模块71接收的所述广播消息存储至所述确定模块72确定的所述目标广播队列中。
调度模块74,用于在接收到广播消息调度请求时,根据所述目标广播队列对应的目标广播消息调度优先级调度所述存储模块73存储在所述目标广播队列中的所述广播消息。
在一些可行的实现方式中,参见图8,是本发明实施例提供的广播消息的管理装置的另一结构示意图。本发明实施例提供的管理装置还包括:
分类模块75,用于将终端的应用程序按照各个应用程序的用户体验保障优先级划分为至少两种用户体验保障优先级的应用程序,所述至少两种用户体验保障优先级的应用程序中包括第一用户体验保障优先级的第一应用程序和第二用户体验保障优先级的第二应用程序,所述第一用户体验保障优先级高于所述第二用户体验保障优先级。
设置模块76,用于建立所述分类模块75划分得到的所述第一应用程序对应的第一广播队列,所述第二应用程序对应的第二广播队列,并设定所述第一广播队列的第一广播消息调度优先级,所述第二广播队列的第二广播消息调度优先级,所述第一广播消息调度优先级高于所述第二广播消息调度优先级。
所述确定模块72具体用于:
在确定所述目标应用程序为第一应用程序时,将所述第一广播队列确定为目标广播队列;
在确定所述目标应用程序为第二应用程序时,将所述第二广播队列确定为目标广播队列。
在一些可行的实现方式中,所述第一应用程序包括所述终端的系统应用程序和预设应用程序;
所述第一广播队列包括用于存储所述系统应用程序的广播消息的第一子队列和用于存储所述预设应用程序的广播消息的第二子队列;
所述确定模块72具体用于:
在确定所述目标应用程序为所述终端的系统应用程序时,将所述第一广播队列的第一子队列确定为目标广播队列;
在确定所述目标应用程序为所述预设应用程序时,将所述第一广播队列的第二子队列确定为目标广播队列。
在一些可行的实现方式中,所述至少两种用户体验保障优先级的应用程序中还包括第三用户体验保障优先级的第三应用程序;
所述确定模块72还用于:
在预设时间阈值内接收到的指定应用程序的广播消息的数量大于预设数量阈值时,将所述指定应用程序确定为第三应用程序;
所述设置模块76还用于:
建立所述确定模块72确定的所述第三应用程序对应的第三广播队列,将所述第三广播队列确定为目标广播队列并通过所述存储模块将所述第三应用程序的广播消息存储至所述第三广播队列;
将所述第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级;
其中,所述第三广播消息调度优先级低于所述第二广播消息调度优先级。
在一些可行的实现方式中,所述设置模块76还用于:
在所述调度模块74调度执行完所述第三广播队列中存储的广播消息,并且检测到所述指定应用程序退出运行时,删除所述第三广播队列。
具体实现中,上述管理装置可通过其内置的各个模块执行上述广播消息的管理方法中各个步骤所描述的实现方式,具体可参见上述各个实施例描述的实现方式,在此不再赘述。
在本发明实施例中,终端可接收到广播消息时可根据发送广播消息的目标应用程序的用户体验保障优先级将广播消息存储至目标广播队列,其中,目标广播队列还对应一个广播消息调度优先级。广播消息调度时还可根据广播消息调度优先级进行广播消息的调度处理。通过对广播消息按照应用程序的用户体验保障优先级进行分类存储,提高广播消息的存储的可控性。通过对广播消息存储的广播队列设置广播消息调度优先级,提高广播消息的调度优先级的可控性,进而提高了广播消息的处理效率,增强了应用程序的用户体验。本发明实施例提供的目标应用程序可为后台应用程序也可为前台应用程序,即本申请提供的方法可用于前台应用程序的广播消息的管理,也可用后台应用程序的广播消息的管理,操作灵活,提高了广播消息的管理的适用性。
本发明的说明书、权利要求书以及附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或者单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或者单元,或可选地还包括对于这些过程、方法、系统、产品或设备固有的其他步骤或单元。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、 光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (10)

  1. 一种广播消息的管理方法,其特征在于,所述方法用于管理终端的前台应用程序发送的广播消息或者用于管理终端的后台应用程序发送的广播消息,所述方法包括:
    接收目标应用程序发送的广播消息;
    确定所述目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列,其中,所述至少2个广播队列中每个广播队列对应一个广播消息调度优先级;
    将所述广播消息存储至所述目标广播队列中;
    当接收到广播消息调度请求时,根据所述目标广播队列对应的目标广播消息调度优先级调度所述目标广播队列中存储的所述广播消息。
  2. 如权利要求1所述的方法,其特征在于,所述接收目标应用程序发送的广播消息之前,所述方法还包括:
    将终端的应用程序按照各个应用程序的用户体验保障优先级划分为至少两种用户体验保障优先级的应用程序,所述至少两种用户体验保障优先级的应用程序中包括第一用户体验保障优先级的第一应用程序和第二用户体验保障优先级的第二应用程序,所述第一用户体验保障优先级高于所述第二用户体验保障优先级;
    建立所述第一应用程序对应的第一广播队列,所述第二应用程序对应的第二广播队列,并设定所述第一广播队列的第一广播消息调度优先级,所述第二广播队列的第二广播消息调度优先级,所述第一广播消息调度优先级高于所述第二广播消息调度优先级;
    所述从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列包括:
    若所述目标应用程序为第一应用程序,则将所述第一广播队列确定为目标广播队列;
    若所述目标应用程序为第二应用程序,则将所述第二广播队列确定为目标广播队列。
  3. 如权利要求2所述的方法,其特征在于,所述第一应用程序包括所述终端的系统应用程序和预设应用程序;
    所述第一广播队列包括用于存储所述系统应用程序的广播消息的第一子队列和用于存储所述预设应用程序的广播消息的第二子队列;
    所述从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列包括:
    若所述目标应用程序为所述终端的系统应用程序,则将所述第一广播队列的第一子队列确定为目标广播队列;
    若所述目标应用程序为所述预设应用程序,则将所述第一广播队列的第二子队列确定为目标广播队列。
  4. 如权利要求2所述的方法,其特征在于,所述至少两种用户体验保障优先级的应用 程序中还包括第三用户体验保障优先级的第三应用程序;
    所述方法还包括:
    若在预设时间阈值内接收到的指定应用程序的广播消息的数量大于预设数量阈值,则将所述指定应用程序确定为第三应用程序;
    建立所述第三应用程序对应的第三广播队列,将所述第三广播队列确定为目标广播队列并将所述第三应用程序的广播消息存储至所述第三广播队列;
    将所述第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级;
    其中,所述第三广播消息调度优先级低于所述第二广播消息调度优先级。
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:
    若所述第三广播队列中存储的广播消息被调度执行完,并且检测到所述指定应用程序退出运行,则删除所述第三广播队列。
  6. 一种广播消息的管理装置,其特征在于,所述管理装置用于管理终端的前台应用程序发送的广播消息或者用于管理终端的后台应用程序发送的广播消息,所述管理装置包括:
    接收模块,用于接收目标应用程序发送的广播消息;
    确定模块,用于确定所述目标应用程序的用户体验保障优先级,并从预置的至少2个广播队列中确定出所述目标应用程序的用户体验保障优先级对应的目标广播队列,其中,所述至少2个广播队列中每个广播队列对应一个广播消息调度优先级;
    存储模块,用于将所述接收模块接收的所述广播消息存储至所述确定模块确定的所述目标广播队列中;
    调度模块,用于在接收到广播消息调度请求时,根据所述目标广播队列对应的目标广播消息调度优先级调度所述存储模块存储在所述目标广播队列中的所述广播消息。
  7. 如权利要求6所述的管理装置,其特征在于,所述管理装置还包括:
    分类模块,用于将终端的应用程序按照各个应用程序的用户体验保障优先级划分为至少两种用户体验保障优先级的应用程序,所述至少两种用户体验保障优先级的应用程序中包括第一用户体验保障优先级的第一应用程序和第二用户体验保障优先级的第二应用程序,所述第一用户体验保障优先级高于所述第二用户体验保障优先级;
    设置模块,用于建立所述分类模块划分得到的所述第一应用程序对应的第一广播队列,所述第二应用程序对应的第二广播队列,并设定所述第一广播队列的第一广播消息调度优先级,所述第二广播队列的第二广播消息调度优先级,所述第一广播消息调度优先级高于所述第二广播消息调度优先级;
    所述确定模块具体用于:
    在确定所述目标应用程序为第一应用程序时,将所述第一广播队列确定为目标广播队列;
    在确定所述目标应用程序为第二应用程序时,将所述第二广播队列确定为目标广播队列。
  8. 如权利要求7所述的管理装置,其特征在于,所述第一应用程序包括所述终端的系统应用程序和预设应用程序;
    所述第一广播队列包括用于存储所述系统应用程序的广播消息的第一子队列和用于存储所述预设应用程序的广播消息的第二子队列;
    所述确定模块具体用于:
    在确定所述目标应用程序为所述终端的系统应用程序时,将所述第一广播队列的第一子队列确定为目标广播队列;
    在确定所述目标应用程序为所述预设应用程序时,将所述第一广播队列的第二子队列确定为目标广播队列。
  9. 如权利要求7所述的管理装置,其特征在于,所述至少两种用户体验保障优先级的应用程序中还包括第三用户体验保障优先级的第三应用程序;
    所述确定模块还用于:
    在预设时间阈值内接收到的指定应用程序的广播消息的数量大于预设数量阈值时,将所述指定应用程序确定为第三应用程序;
    所述设置模块还用于:
    建立所述确定模块确定的所述第三应用程序对应的第三广播队列,将所述第三广播队列确定为目标广播队列并通过所述存储模块将所述第三应用程序的广播消息存储至所述第三广播队列;
    将所述第三广播队列中存储的广播消息的调度优先级设定为第三广播消息调度优先级;
    其中,所述第三广播消息调度优先级低于所述第二广播消息调度优先级。
  10. 如权利要求9所述的管理装置,其特征在于,所述设置模块还用于:
    在所述调度模块调度执行完所述第三广播队列中存储的广播消息,并且检测到所述指定应用程序退出运行时,删除所述第三广播队列。
PCT/CN2017/098966 2016-08-31 2017-08-25 一种广播消息的管理方法及装置 WO2018041020A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP20173443.1A EP3754902B1 (en) 2016-08-31 2017-08-25 Broadcast message management method and apparatus
EP17845322.1A EP3496335B1 (en) 2016-08-31 2017-08-25 Method and apparatus for managing broadcast message
US16/287,706 US10862819B2 (en) 2016-08-31 2019-02-27 Broadcast message management method and apparatus
US17/100,547 US11283724B2 (en) 2016-08-31 2020-11-20 Broadcast message management method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610799210.0 2016-08-31
CN201610799210.0A CN107800546B (zh) 2016-08-31 2016-08-31 一种广播消息的管理方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/287,706 Continuation US10862819B2 (en) 2016-08-31 2019-02-27 Broadcast message management method and apparatus

Publications (1)

Publication Number Publication Date
WO2018041020A1 true WO2018041020A1 (zh) 2018-03-08

Family

ID=61300289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098966 WO2018041020A1 (zh) 2016-08-31 2017-08-25 一种广播消息的管理方法及装置

Country Status (4)

Country Link
US (2) US10862819B2 (zh)
EP (2) EP3496335B1 (zh)
CN (1) CN107800546B (zh)
WO (1) WO2018041020A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106937258B (zh) * 2017-03-10 2019-07-12 Oppo广东移动通信有限公司 一种广播的控制方法、装置及移动终端
CN106936826B (zh) * 2017-03-10 2020-01-14 Oppo广东移动通信有限公司 广播接收器的注册方法、装置和终端设备
CN108766550B (zh) * 2018-03-22 2022-06-28 青岛海信医疗设备股份有限公司 医疗设备终端信息保存方法、存储介质和医疗设备终端
CN111245745B (zh) * 2020-01-07 2022-05-24 腾讯科技(深圳)有限公司 消息发送方法、装置、节点设备及存储介质
CN113709759A (zh) * 2020-05-20 2021-11-26 中国移动通信有限公司研究院 一种网络切片管理方法、装置和计算机可读存储介质
CN111953584B (zh) * 2020-08-21 2021-06-29 北京一起教育信息咨询有限责任公司 一种实时消息通道流量的优化方法及系统
CN114615454B (zh) * 2020-12-09 2023-08-15 成都鼎桥通信技术有限公司 消息提示方法、装置、终端、存储介质
CN114793324B (zh) * 2021-01-25 2023-06-30 中国广播电视网络有限公司 广播传输方法及装置
CN113138883B (zh) * 2021-05-14 2024-02-02 北京字节跳动网络技术有限公司 消息处理方法、装置、存储介质及电子设备
US11743200B2 (en) * 2021-08-23 2023-08-29 Netflix, Inc. Techniques for improving resource utilization in a microservices architecture via priority queues
CN115277557B (zh) * 2022-07-25 2024-01-05 Oppo广东移动通信有限公司 广播处理方法、装置、电子设备及存储介质
CN117640271A (zh) * 2023-11-30 2024-03-01 摩尔线程智能科技(北京)有限责任公司 数据广播装置及系统
CN117879742A (zh) * 2024-02-29 2024-04-12 广东美电国创科技有限公司 应急广播管理方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491507A (zh) * 2013-09-05 2014-01-01 深圳市欧珀通信软件有限公司 一种有序广播优先级重定位的方法及装置
CN103593217A (zh) * 2013-11-26 2014-02-19 广东欧珀移动通信有限公司 一种调整耳机的hook键启动应用次序的方法及终端
CN103826008A (zh) * 2014-02-18 2014-05-28 华为终端有限公司 一种移动终端通知消息提示方法、装置及移动终端

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748453B2 (en) * 2000-05-08 2004-06-08 Microtune (San Diego), Inc. Distributed applications in a portable thread environment
US7792121B2 (en) * 2003-01-03 2010-09-07 Microsoft Corporation Frame protocol and scheduling system
US8201205B2 (en) * 2005-03-16 2012-06-12 Tvworks, Llc Upstream bandwidth management methods and apparatus
US8356130B2 (en) * 2009-08-14 2013-01-15 Advanced Micro Devices, Inc. Mechanism for recording undeliverable user-level interrupts
US8885533B2 (en) * 2011-07-13 2014-11-11 Zte Corporation Enhancement of slotted mode operation for wireless communication
KR101324604B1 (ko) 2012-05-25 2013-11-01 전자부품연구원 다중 대기 상태 운용 방법 및 이를 적용한 방송수신장치
KR101318308B1 (ko) 2012-06-12 2013-10-15 애니포인트 미디어 그룹 안드로이드 플랫폼 기반 수신기에서의 연동형 애플리케이션 제공 방법
US9117087B2 (en) 2012-09-06 2015-08-25 Box, Inc. System and method for creating a secure channel for inter-application communication based on intents
GB2531932A (en) * 2013-03-15 2016-05-04 Blinkx Inc Systems and methods of processing data involving presentation of information on Android devices
CN103595547B (zh) * 2013-11-15 2016-07-13 北京奇虎科技有限公司 智能设备的广播拦截方法和装置
CN104994481B (zh) 2015-07-10 2018-09-28 上海斐讯数据通信技术有限公司 一种Android系统中应用程序之间广播消息的收发方法及系统
CN107277780B (zh) * 2016-04-07 2020-11-20 中兴通讯股份有限公司 一种广播消息发送方法及装置、移动终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491507A (zh) * 2013-09-05 2014-01-01 深圳市欧珀通信软件有限公司 一种有序广播优先级重定位的方法及装置
CN103593217A (zh) * 2013-11-26 2014-02-19 广东欧珀移动通信有限公司 一种调整耳机的hook键启动应用次序的方法及终端
CN103826008A (zh) * 2014-02-18 2014-05-28 华为终端有限公司 一种移动终端通知消息提示方法、装置及移动终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3496335A4 *

Also Published As

Publication number Publication date
EP3496335B1 (en) 2020-05-13
CN107800546A (zh) 2018-03-13
EP3754902B1 (en) 2022-10-12
US20190199648A1 (en) 2019-06-27
US20210075739A1 (en) 2021-03-11
EP3496335A4 (en) 2019-06-12
EP3754902A1 (en) 2020-12-23
EP3496335A1 (en) 2019-06-12
US10862819B2 (en) 2020-12-08
CN107800546B (zh) 2021-03-30
US11283724B2 (en) 2022-03-22

Similar Documents

Publication Publication Date Title
WO2018041020A1 (zh) 一种广播消息的管理方法及装置
US10628216B2 (en) I/O request scheduling method and apparatus by adjusting queue depth associated with storage device based on hige or low priority status
WO2018059076A1 (zh) 一种内存回收方法及装置
US10908954B2 (en) Quality of service classes
EP3966681B1 (en) Automated application updates during operating system upgrades
CN107526640B (zh) 资源管理方法、装置、移动终端及计算机可读存储介质
US20190155656A1 (en) Method and system for scheduling threads for execution
CN109783028B (zh) I/o调度的优化方法、装置、存储介质及智能终端
US20150127755A1 (en) Method and apparatus for checking status of messages in electronic device
CN109905545B (zh) 一种消息处理方法及终端、计算机可读存储介质
US11243784B2 (en) Method for managing trigger, and terminal device
US8856798B2 (en) Mobile computing device activity manager
WO2018045934A1 (zh) 应用进程的管理方法和终端设备
WO2021109767A1 (zh) 网络设备及其降低传输时延的方法
WO2019137252A1 (zh) 内存处理方法、电子设备、计算机可读存储介质
CN106020962B (zh) 一种进程控制方法及终端设备
CN107479744B (zh) 调整触摸屏调度优先级的方法、装置、终端及存储介质
WO2018045874A1 (zh) 信息处理的方法及相关产品
CN107015866B (zh) 一种数据处理方法及装置
CN110888683A (zh) 操作系统的性能优化方法、装置及可读介质
US11150913B2 (en) Method, device, and terminal for accelerating startup of application
CN107402816B (zh) 调整触摸屏工作队列的方法、装置、终端和存储介质
WO2016059479A1 (en) Method of processing system requests in a wireless communication device
CN106484536B (zh) 一种io调度方法、装置和设备
CN109426572B (zh) 任务处理方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845322

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017845322

Country of ref document: EP

Effective date: 20190305