CN108011860A - A kind of method and device for handling broadcast message - Google Patents
A kind of method and device for handling broadcast message Download PDFInfo
- Publication number
- CN108011860A CN108011860A CN201610964179.1A CN201610964179A CN108011860A CN 108011860 A CN108011860 A CN 108011860A CN 201610964179 A CN201610964179 A CN 201610964179A CN 108011860 A CN108011860 A CN 108011860A
- Authority
- CN
- China
- Prior art keywords
- broadcast message
- message
- broadcast
- application
- radio receiver
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
- H04L65/403—Arrangements for multi-party communication, e.g. for conferences
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
A kind of method and device for handling broadcast message, this method includes determining that there are N number of application the first preset condition of satisfaction in the first at least one application to broadcast the message for receiving, for each the second broadcast message of application generation in N number of application, and N number of second broadcast message of generation is respectively stored into Agent advertisement message queue, then according to default first rate, the second broadcast message in Agent advertisement message queue is handled successively, and first rate is less than system when the preceding speed that the first broadcast message is sent to application.By introducing the first preset condition and Agent advertisement message queue, the time that the first broadcast message is sent for N number of application is delayed, reduces the number of same the first broadcast message of time reception application, therefore reduces the possibility for being easy to cause system resource anxiety.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and device for handling broadcast message.
Background technology
In Android (Android) system, broadcast (Broadcast) is between system and application or application is with answering
A kind of mechanism of information is transmitted between.For example, the information of broadcast can be the use state of the battery of system statistics, for building
The information such as the network connection state that the application of vertical network connection produces.
Specifically, apply needs elder generation in AMS (Activity Manager Service, work before broadcast message is received
Dynamic management service) on register, such as need using 1 to receive broadcast message 1 and broadcast message 2, then needed in advance for wide using 1
Broadcast message 1 and a radio receiver 1 is registered on AMS, a radio receiver is registered on AMS for broadcast message 2 using 1
2, wherein, apply the registration radio receiver on AMS to include two ways at present:One kind is static registration, i.e., terminal is starting
Afterwards, radio receiver is registered on AMS using for the broadcast message for needing to receive;One kind is dynamic registration, i.e., should in startup
With rear, using for needing to receive broadcast message, radio receiver is registered on AMS, after application is closed, AMS release applications
The radio receiver of registration.One application is directed to different broadcast messages, can register radio receiver in different ways.
The detailed process that broadcast message is sent in current android system is described in detail by taking Fig. 1 as an example.Such as Fig. 1
It is shown, using 1 generation broadcast message 1, after receiving broadcast message 1 to 1, AMS of AMS transmission broadcast messages by binder, root
According to preconfigured strategy, 1 storage will be broadcast the message into the broadcast in parallel message queue in broadcast message queue, and be directed to
The broadcast message 1 is obtained using 2, using 3, using 4 in advance in radio receivers 2 of the AMS for the registration of broadcast message 1, broadcast
Receiver 3 and radio receiver 4, and the radio receiver 2, radio receiver 3 and radio receiver 4 of acquisition are respectively stored into
In broadcast in parallel receiver queue, AMS will broadcast the message 1 respectively by radio receiver 2, radio receiver 3, radio receiver
4 be sent to using 2, using 3, using 4, when broadcast message needs to send to more applications, be easy to cause broadcast storm, lead
Cause the process for sending broadcast message to take substantial amounts of system resource, be easy to cause system and interim card occurs in the application of front stage operation
Phenomenon.
In addition, after AMS receives broadcast message 1, according to preconfigured strategy, it is also possible to by the storage of broadcast message 1
Into the ordered broadcast message queue in broadcast message queue, then, obtained for the broadcast message 1 using 2, using 3, application
4 radio receiver 2, radio receiver 3 and the radio receivers 4 in AMS for the registration of broadcast message 1, and by acquisition in advance
Radio receiver 2, radio receiver 3 and radio receiver 4 are respectively stored into ordered broadcast receiver queue, and then, AMS is pressed
According to the sequencing that radio receiver 2, radio receiver 3 and radio receiver 4 are stored in ordered broadcast receiver queue, successively
Broadcast message 1 is sent to application 2, using 3 and application 4, that is, assumes that AMS first passes through radio receiver 2 and disappears to the transmission broadcast of application 2
Breath 1, after being sent completely, broadcasts the message being sent by radio receiver 3 to application 3, and so on, if using 3 by quiet
The mode of state registration have registered radio receiver on AMS, and when this be in inactive state using 3, AMS is applying hair to this
Send before broadcast message, it is necessary to the process of the pull-up application.Therefore, when multiple broadcast that ordered broadcast receiver queue includes
Receiver is registered by static mode, and when the corresponding application of radio receiver is in inactive state, then needs frequency
Numerous pull-up is applied accordingly, this also results in the anxiety of system resource, so as to cause system and occur in the application of front stage operation
The phenomenon of interim card.
In conclusion broadcast message if desired is sent to application in android system at present, then for the broadcast message
How many a applies have registered radio receiver in AMS, then the broadcast message is sent to all for broadcast messages note by AMS
The volume application of radio receiver, when the radio receiver for a broadcast message registration is excessive, is then easy to cause system
Resource is nervous, causes system and in front stage operation using there is a phenomenon where interim card.
The content of the invention
The present invention provides a kind of method and device for handling broadcast message, to solve in the prior art when wide for one
Broadcast message registration radio receiver it is excessive when, be easy to cause system resource anxiety, cause system and foreground that showing for interim card occurs
As problem.
The term occurred in the embodiment of the present invention is introduced first below.
First broadcast message:The broadcast message being stored in the prior art in broadcast message queue, such as broadcast message can
Think the message for opening offline mode, message of battery usage amount etc., wherein, the type of the first broadcast message is
BroadcastRecord types.
Second broadcast message:For the broadcast message stored in Agent advertisement message queue in the embodiment of the present invention, including return
Belong to the radio receiver of application and the correspondence of the first broadcast message, wherein, the second broadcast message type is
BroadcastRecord types, by taking application A as an example, it is assumed that for the first broadcast message to open the message of offline mode, belonging to should
Radio receiver is the radio receiver registered using A for the message for opening offline mode in AMS, and second broadcasts the message
It is then to include opening the message of offline mode and pair for the message and ownership for opening offline mode using the radio receiver of A
It should be related to.
Belong to the radio receiver of application:By taking application A as an example, exist using A for the same type of first broadcast message
AMS registers a radio receiver, it is necessary to which explanation, the mode that radio receiver is registered using A can be as
BroadcastFilter (dynamic registration), or ResolveInfo (static registration).Wherein, when the first broadcast message
When type includes being turned on and off the message of offline mode, bright screen message, battery using state message and input method change message,
Under normal conditions, for same type of message, can not possibly at the same time occur in synchronization, such as be turned on and off flight mould
The message of formula, the state of offline mode is in 1 terminal of moment, then the first broadcast message is opens the message of offline mode, no
May be the message for closing offline mode, therefore when the state that offline mode is in 1 terminal of moment, then using A in 1 pin of moment
Radio receiver 1 is registered in AMS to the message for opening offline mode, when terminal is being in normal communication state at the moment 2, then the
One broadcast message is then registered at the moment 2 using A to close the message of offline mode for the message for closing offline mode in AMS
Radio receiver 1.When application A changes message or bright screen message for generation input method corresponding broadcast reception is not registered in AMS
During device, then do not send generation input method to application A and change message or bright screen message.
Agent advertisement message queue:The storage second that is used for pre-set in the embodiment of the present invention in systems broadcasts the message
Queue, can be by varying the speed of speed, that is, default first of the second broadcast message solution queue in Agent advertisement message queue
Rate, controls the speed that the first broadcast message is sent to each application.
Broadcast the message queue:It is used for the queue for storing the first broadcast message in system, it is stored in broadcast message queue
Each broadcast message be required for sending, and the speed sent is not revisable.
Radio receiver queue:For storing the broadcast reception of any first broadcast message received in broadcast message queue
Device, wherein, a radio receiver belongs to an application, but an application can register multiple and different broadcast receptions
Device.
First aspect, there is provided a kind of method for handling broadcast message, this method can be used for Android system.This method bag
Include:Determine for receiving there are N number of application the first preset condition of satisfaction in the first at least one application to broadcast the message, for N
It is each using the broadcast message of generation second in a application, and N number of second broadcast message of generation is respectively stored into agency extensively
Broadcast in message queue, wherein the second broadcast message includes belonging to corresponding pass of the radio receiver with the first broadcast message of application
System;Then according to default first rate, the second broadcast message in Agent advertisement message queue is handled successively, in order to N number of
Using the first broadcast message can be received by belonging to the radio receiver of each application, wherein, first rate, which is less than, is
System is the positive integer more than zero as the preceding speed that the first broadcast message is sent to application, N.For example, for the first broadcast message, should
Radio receiver A, radio receiver B, radio receiver C, wide is have registered respectively with A, using B, using C, using D and using E
Receiver D and radio receiver E are broadcast, wherein meeting the first preset condition respectively using A and using B, then for A is applied, is generated
Second broadcast message 1, the second broadcast message 1 includes the correspondence of the broadcast messages of radio receiver A and first, for application
B, the broadcast message of generation second 2, the second broadcast message 2 include the correspondence of the broadcast messages of radio receiver B and first, so
Afterwards respectively by the second broadcast message 1 and 2 storage of the second broadcast message into Agent advertisement message queue.
Due to, by introducing the first preset condition and Agent advertisement message queue, being delayed in the embodiment of the present invention for N
A application sends the time of the first broadcast message, with being transmitted directly to all first broadcast messages of have registered in the prior art
Using compared to reducing same time receives the number of the first broadcast message application, therefore reduces for a broadcast message
When the radio receiver of registration is excessive, the possibility of system resource anxiety is easy to cause, so as to improve user experience.
It is to be understood that the first broadcast message in the embodiment of the present invention can be system broadcast message, or a certain to answer
Broadcast message.
Based in a first aspect, in the first implementation, after the broadcast message of generation second, determine that Agent advertisement disappears
The existing broadcast message identical with the second broadcast message that is generating in queue is ceased, deletes already present broadcast message, wherein, with
Broadcast during radio receiver in the second identical broadcast message of broadcast message of generation broadcasts the message with the second of generation connects
Receipts device is identical, and the type of message of the first broadcast message and the first message class to broadcast the message in the second broadcast message of generation
Type is identical.
By taking Fig. 2 as an example, it is wide that the second broadcast message 1, second broadcast message 2, second has been stored in Agent advertisement message queue
The broadcast message of message 3 and second 4 is broadcast, wherein the second broadcast message generated is the second broadcast message 5, if the second broadcast message 1
Including the first broadcast message 1 and the correspondence of radio receiver 1, the second broadcast message 5 include the first broadcast message 5 with extensively
The correspondence of receiver 1 is broadcast, the broadcast messages when the first broadcast message 1 with the first broadcast message 5 for same type, due to the
When radio receiver in two broadcast messages 1 and the second broadcast message 5 is all radio receiver 5, therefore the second 1 He of broadcast message
Second broadcast message 5 is identical broadcast message, then the second broadcast message 1 in deletion Agent advertisement message queue, such as the
One broadcast message 1 is that the surplus that battery using state is battery is 80%, and the first broadcast message 5 is that battery using state is electricity
The surplus in pond is 50%, then the first broadcast message 1 and the first broadcast message 5 belong to the broadcast message of same type, and broadcast connects
Receive radio receiver of the device 1 for same application for the broadcast message registration of the type.
It should be noted that in second of possible implementation, 5 storage of the second broadcast message can be arrived agency
The queue that broadcasts the message whether there is second broadcast identical with the second broadcast message 5 in Agent advertisement message queue is judged afterwards
Message, then if deleting second broadcast message identical with the second broadcast message 5 in the presence of if, can also first judge that Agent advertisement disappears
Cease and whether there is second broadcast message identical with the second broadcast message 5 in queue, if the deletion in the presence of and if the second broadcast message 5
Identical second broadcasts the message and then 5 storage of the second broadcast message is arrived Agent advertisement message queue.In the embodiment of the present invention
In, do not limit the order that storage generation second broadcasts the message.
When including second broadcast message identical with the second broadcast message of generation due to Agent advertisement message queue, delete
Except identical with the second broadcast message of generation the second broadcast message in Agent advertisement message queue, equivalent to deleting in system
Some insignificant second broadcast messages, send the first broadcast message number, further drop so as to reduce in system to application
It is low in the prior art because for the radio receiver of one first broadcast message registration excessively caused by system resource it is nervous
Possibility.For example, what is stored in Agent advertisement message queue includes radio receiver 1 and is remained with battery for the second broadcast message 1
Surplus is the correspondence of 80% message, first broadcast message of the message that wherein residual capacity of battery is 80% at the moment 1, and
The corresponding of message that the second broadcast message 2 that current time 2 generates includes radio receiver 1 with residual capacity of battery is 20% is closed
System, wherein residual capacity of battery be 20% message the moment 2 first broadcast message, the moment 1 before the moment 2, compared to when
Carve 2 first broadcast message, the moment 1 first broadcast message then lose it is ineffectiveness, therefore for insignificant first broadcast disappear
Breath, then the second broadcast message 1 is insignificant broadcast message, then need not disappear sending the broadcast to application for occupancy resource
Breath.
Based on the first of first aspect or first aspect implementation, in second of implementation, according to default
First rate, successively handle Agent advertisement message queue in second broadcast message while, judge Agent advertisement message team
With the presence or absence of the second broadcast message for meeting the second preset condition in row, when there is satisfaction the in definite Agent advertisement message queue
Second broadcast message of two preset conditions, then stop in the processing Agent advertisement message queue by the processing of default first rate
Second broadcast message, directly processing meet that the second of the second preset condition broadcasts the message, in order to meeting the of preset condition
The corresponding application of two broadcast messages can receive the first broadcast message in advance.So as to improve the stability of system normal operation.
For example, the second broadcast message 1 being stored in Agent advertisement message queue includes the first broadcast message 1 and is connect with broadcast
Receive the correspondence of device 1, if the application that is belonged to of radio receiver 1 is using A, be stored in Agent advertisement message queue it
Before, inactive state is in using A, pull-up application A is needed in order to avoid application A receives broadcast message, then generates the second broadcast
Message 1, and store into Agent advertisement message queue, still, user starts using A at this time, then system detectio exists to using A
Front stage operation, then need to receive the broadcast message using A, with the normal operation applied in guarantee system, then will detect should
With A after front stage operation, the stream of the second broadcast message handled according to default first rate in Agent advertisement message queue is jumped out
Journey, directly handles the second broadcast message 1, so that can timely receive the first broadcast message 1 using A, therefore, second is default
Can include application in condition has the state that other states switch to front stage operation, or other conditions, wherein the second preset condition can
Set with thoroughly doing away with the needs of actual conditions.
Based on the first of first aspect or first aspect implementation or second of implementation, in the third realization side
In formula, the number for the second broadcast message for determining to store in Agent advertisement message queue is more than predetermined threshold value, empties Agent advertisement
Message queue.It reduce further the possibility that broadcast storm occurs.
For example, the number of stored second broadcast message is 11 in Agent advertisement message queue, predetermined threshold value 11, when
During by the second broadcast message storage of generation into Agent advertisement message queue, stored second in Agent advertisement message queue
The number of broadcast message is updated to 12, more than predetermined threshold value 11, then deletes 12 second broadcast in Agent advertisement message queue
Message.
Based on the first of first aspect or first aspect implementation or second of implementation or the third realization side
Formula, in the 4th kind of implementation, determines the second speed, the preferred speed that the second speed broadcasts the message for system currently processed second
Rate;When determining that the second speed is different from default first rate, it is the second speed to change default first rate, in order to basis
Second rate processing handles the second broadcast message in Agent advertisement message queue successively.
Since the state of internal system operation constantly changes, by processing Agent advertisement message queue
The adjustment of the first rate of second broadcast message, come the state to optimize the system operation, further improves the experience of user.
The 4th kind of implementation based on first aspect, in the 5th kind of implementation, determines second in the following manner
Speed:
Determine that the unit interval in preset time period is used for the number of the radio receiver of reception broadcast message;
Determine the number of system frame losing in preset time period;
Determine to start in preset time period and apply required average duration;
It is used for the number of radio receiver, the number of system frame losing and the startup for receiving broadcast message according to the unit interval
Using required average duration, based on preset algorithm, the second speed is determined.
Since in preset time period, the unit interval is used for number, the system frame losing for receiving the radio receiver of broadcast message
Number, start application duration with processing Agent advertisement message queue in second broadcast message speed it is closely related, if locate
Manage Agent advertisement message queue in second broadcast message speed it is excessive, then may cause the unit interval be used for receive broadcast message
Radio receiver number increase, the number of system frame losing increases, start application duration it is elongated, influence user experience, if
Handle Agent advertisement message queue in second broadcast message speed it is too small, although so that the unit interval be used for receive broadcast the message
Radio receiver number reduce, the number of system frame losing is reduced, the duration that starts application shortens, but the utilization rate of resource
Reduce, therefore, by the preset algorithm in system, to determine the second speed, in the case where not reducing user experience, improve
The utilization rate of resource.
It should be noted that preset algorithm can be that (unit interval is used for for the radio receiver for receiving broadcast message
Several scope, the scope of the number of system frame losing, start application duration scope) correspondence with the second speed.
Based on the first of first aspect or first aspect implementation or second of implementation or the third realization side
Formula or the 4th kind of implementation or the 5th kind of implementation, in the 6th kind of implementation, after receiving the first broadcast message, really
Surely the speed for receiving first broadcast message exists more than the type of message of default third speed and first broadcast message
In the range of presetting message type.
Wherein, do not limit whether the speed for judging to receive the first broadcast message is more than default third speed and and judges
First broadcast message type of message whether the sequencing in the range of presetting message type.
The corresponding condition set due to first judging the first broadcast message whether to meet, is provided with presetting message type
Scope is avoided because delay sends important application, causes system or application not to run, and influences the experience of user, is set default
Third speed can prejudge the situation for the speed for receiving the first broadcast message, and then carry out appropriate adjusting, further drop
The low possibility for causing system resource anxiety.
Wherein, when the speed for receiving the first broadcast message be not more than default third speed, or first broadcasts the message
Type of message can send the first broadcast message according to the prior art not when in the range of presetting message type to application.
Based on the first of first aspect or first aspect implementation or second of implementation or the third realization side
Formula or the 4th kind of implementation or the 5th kind of implementation or the 6th kind of implementation, in the 7th kind of implementation, by with
The second broadcast message of under type processing, in order to which N number of application can receive the first broadcast message:
By the first broadcast message storage in the second broadcast message into broadcast message queue, by the second broadcast message
Radio receiver is stored into radio receiver queue;The first broadcast message is obtained from broadcast message queue, and from broadcast
Radio receiver is obtained in receiver queue, and the application transmission first belonged to by radio receiver to radio receiver is wide
Broadcast message.
Due to being broadcast the message by the way that mode same as the prior art is sent first to application, the technology of the present invention
Scheme realizes compatible between the prior art.
Second aspect, the embodiment of the present invention also provides a kind of device for handling broadcast message, including first aspect can be achieved
Or one or more modules of any one implementation of above-mentioned first aspect, each module can perform one or more steps
Suddenly.
The third aspect, the embodiment of the present invention also provide a kind of terminal, which includes processor and memory, the storage
Device is used to store software program, and the processor is used to read the software program stored in the memory and realizes first aspect
Or the method that any one implementation of above-mentioned first aspect provides.
Fourth aspect, also provides a kind of computer-readable storage medium in the embodiment of the present invention, which can be easy with right and wrong
The property lost, that is, content is not lost after powering off.Software program is stored in the storage medium, the software program is at by one or more
Reason device can realize the method that any one implementation of first aspect or above-mentioned first aspect provides when reading and performing.
Brief description of the drawings
Fig. 1 is the flow diagram for sending broadcast message in android system in the prior art;
Fig. 2 is the schematic diagram of Agent advertisement message queue of the embodiment of the present invention;
Fig. 3 is the hardware structure schematic diagram of terminal of the embodiment of the present invention;
Fig. 4 a are the flow diagram of processing broadcast message of the embodiment of the present invention;
Fig. 4 b are the circuit theory schematic diagram of Android system of the embodiment of the present invention;
The flow diagram of Fig. 4 c embodiment of the present invention processing broadcast message;
Fig. 5 acts on behalf of schematic diagram for solution of the embodiment of the present invention;
Fig. 6 a and Fig. 6 b are respectively the structure diagram of the device of processing broadcast message of the embodiment of the present invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing into
One step it is described in detail.
It is to be understood that the method for processing broadcast message of the embodiment of the present invention is mainly used in terminal, which is also referred to as
UE (UserEquipment, user equipment), MS (Mobile Station, mobile station), mobile terminal (Mobile
Terminal) etc., optionally, the terminal can be mobile phone, tablet computer, PDA (Personal DigitalAssistant, it is a
Personal digital assistant), POS (Point ofSales, point-of-sale terminal), vehicle-mounted computer, set-top box etc..
The method of processing broadcast message of the embodiment of the present invention, by introducing the first preset condition and Agent advertisement message team
Row, delay the time that the first broadcast message is sent for N number of application, with being transmitted directly to all have registered this in the prior art
The application of first broadcast message is compared, and reduces the number of same the first broadcast message of time reception application, therefore reduces pin
When the radio receiver registered to a broadcast message is excessive, the possibility of system resource anxiety is easy to cause, so as to improve
User experience.
Please refer to Fig.3, for the hardware architecture diagram of the terminal of application of the embodiment of the present invention.As shown in figure 3, terminal 300
Including display device 340, processor 350 and memory 380.Memory 380 generally comprises memory and external memory, and memory can be
RAM (RandomAccess Memory, random access memory), ROM (Read Only Memory, read-only storage), and at a high speed
Cache (CACHE) etc..External memory can be hard disk, CD, USB disk, floppy disk or magnetic tape station etc..Memory 380, which is used to store, to be calculated
Machine program and other data 383, the computer program include operating system 382 and application program 381 etc., other data 383 can
The data produced after being run including operating system 382 or application program 381, the data include system data (such as operation system
The configuration parameter of system) and user data, such as a photo of user's shooting is exactly typical user data, and the present invention is implemented
Agent advertisement queue is the part memory space on memory in example, is broadcast the message for storing second, in the embodiment of the present invention
The first preset condition be stored in memory 380, to avoid the overabundance of data stored in memory, influence the speed of service of terminal,
In the external memory that first preset condition is stored.Processor 350 before performing processing or calling data can by computer program or
Other data are loaded into memory from external memory.In embodiments of the present invention, when terminal 300 runs the program of the embodiment of the present invention,
The first preset condition being stored on external memory is loaded on memory, the program of the embodiment of the present invention is then performed on memory.
Processor 350 is used to read computer program, then performs the method that computer program defines, such as processor
350 read operation systems 382 in the terminal 300 so that run operating system and realize the various functions of operating system, or
Processor 350 reads one or more application programs 381, so as to run application in the terminal 300.Processor 350 can wrap
One or more general processors are included, may also include one or more DSP (Digital Signal Processor, numeral letter
Number processor), for performing relevant operation, to realize technical solution that the embodiment of the present invention is provided.
The computer of the method for achievable processing broadcast message provided in an embodiment of the present invention is contained in operating system 382
Program, so that after processor 350 reads the operating system 382 and runs the operating system, which can possess
The function of processing broadcast message provided in an embodiment of the present invention.So that the operating system sends broadcast in the application to upper strata
During message, the possibility that broadcast storm occurs is reduced.
Terminal 300 can also include input equipment 330, for receiving digital information, character information or the contact of input
Touch operation/non-contact gesture, and produce the signal input related with the user setting and function control of terminal 300
Deng.In addition, the input equipment 330 can include contact panel 331.Contact panel 331, also referred to as touch-screen, collect user
On it or neighbouring touch operation (such as user using any suitable object or annex such as finger, stylus in contact panel
Operation on 331 or in contact panel 331), and corresponding attachment device is driven according to formula set in advance.Optionally, touch
Control panel 331 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection user's is tactile
Orientation is touched, and detects the signal that touch operation is brought, transmits a signal to touch controller;Touch controller is filled from touch detection
Reception touch information is put, and is converted into contact coordinate, then gives processor 350, and can receive what processor 350 was sent
Order and performed.For example, user on contact panel 331 with finger click on apply A, using A from inactive state to
Foreground initiation, then after detecting using A startups, if the second preset condition includes, using front stage operation is switched to, jumping out
The second broadcast message in Agent advertisement message queue is handled according to default first rate, directly processing includes belonging to using A
Radio receiver correspondence second broadcast message.
Contact panel 331 can use the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize.Remove
Contact panel 331, input equipment 330 can also include other input equipments 332, other input equipments 332 can include but
One be not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operation lever etc.
Kind is a variety of.
Terminal 300 can also include display device 340, display device 340, including display panel 341, for show by with
The information of family input is supplied to the information of user and the various menu interfaces of terminal 300 etc., leads in embodiments of the present invention
It is used in display terminal 300 icon of application installed.The display device 340 may include display panel 341, optionally, can
With using LCD (Liquid Crystal Display, liquid crystal display) or OLED (Organic Light-Emitting
Diode, Organic Light Emitting Diode) etc. form configure display panel 341.In some other embodiment, contact panel 331 can
Cover on display panel 341, form touch display screen.
In addition to the above, terminal 300 can also include being used for the power supply 390 of other module for power supply and be shone for shooting
The camera 360 of piece or video.Terminal 300 can also include one or more sensors 320, such as acceleration transducer, light
Sensor etc..Terminal 300 can also include RF (Radio Frequency, less radio-frequency) circuit 310, be used for and wireless network
Equipment carry out network service, WiFi (Wireless Fidelity, Wireless Fidelity) module 370 can also be included, be used for and other
Equipment carries out WiFi communication.
The method of processing broadcast message provided in an embodiment of the present invention can be realized in the operating system 382 shown in Fig. 3.
Specifically, by taking Fig. 4 a as an example, describe in detail to the method for inventive embodiments processing broadcast message, wherein, the present invention is implemented
Example is realized in computer system 400 as shown in Figure 4b.The computer system 400 may operate in terminal, can also transport
Row is in other kinds of computer equipment.The computer system includes application layer 410 and operating system layer 450, and the present invention is real
The method for applying example offer is primarily implemented in the ccf layer 420 of operating system layer 450, which can be Android
(Android) operating system.Operating system layer 450 is divided into ccf layer 420, core library layer 430 and driving layer 440 again.Wherein, scheme
Operating system layer 450 in 4b may be considered a kind of of operating system 382 in Fig. 3 and implement, the application layer 410 in Fig. 4 b
It may be considered a kind of specific implementation of application program 381 in Fig. 3, including picture library 411, media player 412, browser 413
Deng.Layer 440 is driven to include CPU drivings 441, GPU drivings 442 and display controller driving 443 etc..Core library layer 430 is behaviour
Make the core of system, including input/output services 431, kernel service 432, graphical device interface 434 and realizes CPU
Or the graphics engine (Graphics Engine) 433 etc. of GPU graphics process.Ccf layer 420 may include AMS (Activity
Manager Service, job management service) 421, RDA (Realtime DataAquisitor, real-time data acquisition device)
422nd, RMS (Resource Management Server, resource management server) 423, R-DME (Realtime
DecisionMaker, Real-time Decision formulator) 424, CMS (ConfigurationManagement Server, configuration management
Server) 425, ARS (Awareness Recognizing Server, perceive identification server) 426 etc..Application layer 410
It may include picture library 411, media player (MediaPlayer) 412 and browser (Browser) 413 etc..
In addition, under driving layer 440, which further includes hardware layer.The computer system 400 it is hard
Part layer can include central processing unit (Central Processing Unit, CPU) and graphics processor (Graphic
Processing Unit, GPU) (equivalent to one kind specific implementation of the processor 350 in Fig. 3), memory can also be included
(equivalent to the memory 380 in Fig. 3), including memory and external memory, can also include input equipment (equivalent to the input in Fig. 3
Equipment 330), display device (equivalent to the display device 340 in Fig. 3), such as liquid crystal display (Liquid Crystal
Display, LCD), holographic imaging (Holographic), projection (Projector) etc., one or more sensings can also be included
Device (equivalent to the sensor 320 in Fig. 3).Certainly in addition, hardware layer can also include power supply, the shooting shown in Fig. 3
Head, RF circuits and WiFi module, can also include other hardware modules being also not shown in Fig. 3, for example, Memory Controller Hub and
Display controller etc..
The method that any one foregoing embodiment of the present invention provides can be realized in the ccf layer shown in Fig. 4 b.
As illustrated in fig. 4 c, the method for processing of embodiment of the present invention broadcast message, including:
Step 501, using the first broadcast message of A generations.Produced it should be noted that the first broadcast message can also be system
Raw broadcast message, such as state, the use state information of battery of the memory space in system.Wherein, the first broadcast message
Type be BroadcastRecord types.
Step 502, using A r the first broadcast message is sent to AMS.Specifically, it can be sent out using A by binder to AMS
Send the first broadcast message.
Step 503, AMS receives the first broadcast message, by the first broadcast message storage into broadcast message queue, and really
The fixed application for being useful for receiving the first broadcast message, will belong to the broadcast for receiving the first application to broadcast the message respectively
Receiver is stored to radio receiver queue, wherein, each radio receiver belongs to different applications.It is to be understood that institute is useful
It is at least one in the number for the application for receiving the first broadcast message.
For example, all applications for receiving the first broadcast message be using 1, using 2, using 3, using 4 and using 5,
Then for the first broadcast message, it is assumed that the radio receiver registered using 1 in AMS is radio receiver 1, then radio receiver 1
Belong to using 1, and so on, it is assumed that the radio receiver registered using 2 in AMS is radio receiver 2, then radio receiver
2 belong to using 2, it is assumed that the radio receiver registered using 3 in AMS is radio receiver 3, then radio receiver 3 belongs to
Using 3, it is assumed that as radio receiver 4, then radio receiver 4 is belonged to using 4 the radio receiver registered using 4 in AMS, false
If the radio receiver registered using 5 in AMS is broadcast reception 5, then radio receiver 5 is belonged to using 5, it is to be understood that
It is that the first broadcast message is sent to by application by radio receiver.
Specifically, due to including broadcast in parallel message queue and ordered broadcast message queue in the prior art, it is parallel wide
Broadcast the in message queue first broadcast message and application is sent to by the radio receiver in broadcast in parallel receiver queue, in order
The first broadcast message in broadcast message queue is sent to application by ordered broadcast receiver, for example, broadcast in parallel message team
Row include the first broadcast message 1, and the application for receiving the first broadcast message 1 is included using 1 and using 2, wherein using 1 note
The radio receiver of volume is radio receiver 1, and using 2 radio receivers registered as radio receiver 2, then AMS is directly by the
One broadcast message 1 by radio receiver 1 to application 1 send the first broadcast message 1 while by radio receiver 2 to application
2 send the first broadcast message 1, i.e., the first broadcast message in broadcast in parallel message queue is parallel transmission, and ordered broadcast
The first broadcast message in message queue is serial transmission, such as ordered broadcast message queue includes first and broadcasts the message 2,
Application for receiving the first broadcast message 2 is included using 3 and using 4, wherein being connect using 3 radio receivers registered as broadcast
Device 3 is received, using 4 radio receivers registered as radio receiver 4, is existed if first sending the first 2, AMS of broadcast message to application 3
First broadcast message 2 is sent to using after 3 by radio receiver 3, first is being sent to application 4 by radio receiver 4
Broadcast message 2.The queue that broadcasts the message in embodiments of the present invention can be broadcast in parallel message queue, or ordered broadcast
Message queue.
Step 504, AMS sends the first broadcast message to RDA.
Wherein, sequencing of the step 503 with step 504 without certainty.
Step 505, RDA obtains the attributive character information of the first broadcast message, and the attribute of the first broadcast message is sent to RMS
Characteristic information.
Attributive character information includes following parameters:For receiving the application of the first broadcast message, optionally, reception is further included
The type of message of the speed of first broadcast message and/or the first broadcast message.
Step 506, RMS from CMS obtain profile information, wherein, profile information include the first preset condition,
Second preset condition, default first rate, the scope of default third speed and presetting message type.Step 406 and step
Rapid 401 sequencing to step 405 without certainty.
CMS can also obtain behavioral statistics data of the user using application from ARS, then, according to the behavioral statistics number of acquisition
According to based on the algorithm of configuration every preset time period renewal profile information.
Step 507, RMS determines that the speed for receiving the first broadcast message is more than default third speed, and determines that first is wide
The type of message of message is broadcast in the range of presetting message type.
It should be noted that the type of message that presetting message type includes is that system operation and application operation are influenced not
Important or not crucial type of message, RMS is when determining that the speed for receiving the first broadcast message is more than default third speed, really
When in the range of the type of message no longer presetting message type of fixed first broadcast message, then the message class that the people first broadcast the message is said
Type is the first broadcast message of important kind, and to ensure the normal operation of system or application, then RMS does not report reception to R-DME
The speed of first broadcast message is in the configured information of overload, i.e., no longer agency first broadcasts the message, according to existing procedure
The first broadcast message is sent, optionally, the broadcast message that the first broadcast message is important kind, R-DME instructions are reported to R-DME
AMS sends the first broadcast message according to existing procedure.
In addition, when RMS determine receive first broadcast message speed be not more than default third speed when, no matter this first
Whether the type of message of broadcast message is in presetting message Type Range, due to receiving the speed of the first broadcast message no more than pre-
If third speed, then system operation be in normal or idle condition, without performing the broadcast message of agency first, optionally, to
R-DME, which is reported, receives configured information of the speed of the first broadcast message no more than default third speed, and R-DME instructions AMS is pressed
The first broadcast message is sent according to existing procedure.
Step 508, it whether there is at least one application that RMS judges to be used to receive the first broadcast message and meet that first is pre-
If the application of condition, if so, then performing step 509, otherwise, step 513 is performed.
It should be noted that the operating status that the first preset condition includes but not limited to apply is running background, blacklist
List of application, the list of application that is of little use etc..Such as when RMS determine using A be running background application, then using A for meet
The application of first preset condition, alternatively, when RMS determines that using B be application in blacklist list, then using B also to meet the
The application of one preset condition.
Step 509, RMS determines the N number of application for meeting the first preset condition, and reports the broadcast of reception first to disappear to R-DME
The speed of breath is in the configured information of overload and meets N number of application of the first preset condition, and N is the positive integer more than 0,
The speed that configured information is used to indicate to receive the first broadcast message is more than default third speed.
Specifically, configured information includes receiving the speed of the first broadcast message and default third speed.
Step 510, after R-DME receives configured information and the N number of application for meeting the first preset condition, sent to AMS
Meet N number of application of the first preset condition.
Optionally, to improve the performance of system operation, also configured information is sent to ARS in R-DME and meet that first is default
N number of application of condition, so that after ARS receives configured information and N number of application, user is carried out using the behavioural habits of application
Study, updates profile information, and after profile information renewal, ARS pushes the configuration text after renewal to RMS by CMS
Part information.
Since the state of internal system operation constantly changes, for the state to optimize the system operation, further improve
The experience of user, optionally, updates default first rate in profile information according to following manner:Determine the second speed,
The preferred rate that second speed broadcasts the message for system currently processed second;Determine that the second speed is different from default first rate
When, it is the second speed to change default first rate, in order to handle Agent advertisement message team successively according to the second rate processing
The second broadcast message in row.Here preferred rate be by certain mode obtain can preferably support system operation and
Ensure the speed of user experience.
The second speed, i.e. preferred rate can be determined in the following manner:
Step 1, determine that the unit interval in preset time period is used for the number of the radio receiver of reception broadcast message;Tool
Body, ARS determines that the unit interval in preset time period is used to receive the wide of broadcast message according to the R-DME configured informations sent
Broadcast the number of receiver.
Step 2, the number of system frame losing in preset time period is determined;
Step 3, determine to start in preset time period and apply required average duration;
Step 4, according to the unit interval be used for receive broadcast message the number of radio receiver, the number of system frame losing with
And start and apply required average duration, based on preset algorithm, determine the second speed.It should be noted that step 1 is to step 3,
Without inevitable sequencing, it may be performed simultaneously, can also perform step by step.Specifically, the unit interval can be according to actual feelings
Condition is configured, if such as the time weighed with the second, the unit interval is one second, if the time is weighed with frame, the unit interval
For a frame.Preset algorithm can be that (scope, the system that the unit interval is used to receive the number of the radio receiver of broadcast message are lost
The scope of the number of frame, start application duration scope) correspondence with the second speed.For example, the definite unit interval
The number of radio receiver for receiving broadcast message is 19, the 5 of the number of definite system frame losing, definite startup application
When a length of 2 seconds, it is assumed that (the number scope of radio receiver that the unit interval is used to receive broadcast message is lost in 0~20, system
The scope 0~9 of the number of frame, start application duration scope at 0.1 second~2.5 seconds) corresponding second speed is 0.9, then
It is 0.9 to determine the second speed.Wherein, preset algorithm can also be that (unit interval is used for the radio receiver for receiving broadcast message
The scope of number, the scope of the number of system frame losing, start application duration scope) pair with the second Rate Computation algorithm
It should be related to.
Step 511, AMS receives the N number of application for meeting the first preset condition, disappears for the second broadcast of each application generation
Breath, and by the second broadcast message storage into Agent advertisement message queue, wherein, the second broadcast message includes belonging to application
The correspondence of radio receiver and the first broadcast message.
The type of second broadcast message is BroadcastRecord types.
It should be noted that when the whole that N number of application broadcasts the message for reception first in application, AMS deletions broadcast the message
The first broadcast message in queue, and delete N number of broadcast reception for being respectively belonging to N number of application in radio receiver queue
Device.For example, the first broadcast message is broadcast message A, if N=2, the two applications are to receive whole applications of broadcast message A, are wrapped
Include using A and using B, wherein, radio receiver A and radio receiver B, radio receiver are stored with radio receiver queue
A is belonged to using A, and radio receiver B is belonged to using B, then deletes the broadcast message A in broadcast message queue, and delete
Radio receiver A and radio receiver B in radio receiver queue, when the number all applied for receiving the first broadcast message
During more than N, N number of radio receiver for being respectively belonging to N number of application in radio receiver queue is only deleted.
Specifically, as shown in figure 5, Agent advertisement message queue include second broadcast message 1, second broadcast message 2, its
In the second broadcast message 1 include correspondence between the broadcast message of radio receiver 1 and first 1, the second broadcast message 2 includes
Correspondence between the broadcast message of radio receiver 2 and first 1, when handling the second broadcast message, by the second broadcast message 1
In first broadcast message 1 storage to broadcast message queue in, by second broadcast the message 1 in radio receiver 1 store it is wide
Broadcast in receiver queue, it is wide by second by 1 storage of the first broadcast message in the second broadcast message 2 into broadcast message queue
The radio receiver 2 broadcast in message 2 is stored in radio receiver queue.
Furthermore, it is necessary to explanation, when the number for the second broadcast message that AMS determines to store in Agent advertisement message queue
More than predetermined threshold value, Agent advertisement message queue is emptied.Wherein, memory based on terminal system determines during predetermined threshold value, by
Installed System Memory is different in different terminals, and the predetermined threshold value that different terminals are set can be different.
Step 512, AMS is according to default first rate, by the first broadcast message storage in the second broadcast message to extensively
Broadcast in message queue, the radio receiver in the second broadcast message is stored into radio receiver queue.
Step 513, AMS obtains the first broadcast message from broadcast message queue respectively, is obtained from radio receiver queue
Radio receiver, sends the first broadcast message by the radio receiver of acquisition to application respectively.
For example, by taking Fig. 4 a as an example, using 2, using 3, using 4 to meet the application of the first preset condition, respectively by the
Belonging in two broadcast messages is stored into radio receiver queue using 2, using 3, using 4 radio receiver, respectively
After the first broadcast message in second broadcast message is stored into broadcast message queue, pass through the radio receiver of acquisition respectively
The first broadcast message is sent to application 2, using 3 and application 4.
In addition, sending the first broadcast message number to application to reduce in system, the prior art reduce further
It is middle because for one first broadcast message registration radio receiver excessively caused by system resource anxiety possibility, such as figure
Shown in 4c processing broadcast message on the basis of, generation second broadcast message after, judge be in Agent advertisement message queue
It is no to there is the broadcast message identical with the second broadcast message of generation, if deleting already present broadcast message in the presence of if, wherein, with
Broadcast during radio receiver in the second identical broadcast message of broadcast message of generation broadcasts the message with the second of generation connects
Receipts device is identical, and the type of message of the first broadcast message and the first message class to broadcast the message in the second broadcast message of generation
Type is identical.It should be noted that in embodiments of the present invention, do not limit the order of the second broadcast message of storage generation.
In embodiments of the present invention, to improve the stability of system normal operation, optionally, step 512 is being performed
Meanwhile judge with the presence or absence of the second broadcast message for meeting the second preset condition in Agent advertisement message queue, as definite agency
There is the second broadcast message for meeting the second preset condition in broadcast message queue, if not locating also by default first rate currently
The broadcast message of second preset condition of satisfaction is managed, then stops the processing Agent advertisement message by the processing of default first rate
The second broadcast message in queue, directly processing meet the second broadcast message of the second preset condition, in order to default with satisfaction
The corresponding application of the second broadcast message of condition can receive the first broadcast message in advance, to ensure the normal operation of application.
If currently by default first rate, processing to the broadcast message of second preset condition of satisfaction, continues to hold just
Row.
Wherein, the second preset condition can be identical with the first preset condition, can also be different from the first preset condition, example
Such as, the second preset condition is being transported from inactive state or from the background by the application that radio receiver in the second broadcast message belongs to
Capable state is switched to the state of front stage operation.It is to be understood that the second preset condition can need progress phase according to actual conditions
The setting answered.
Based on same inventive concept, one kind is additionally provided in the embodiment of the present invention, and there is processing broadcast of the embodiment of the present invention to disappear
The device of function is ceased, since the corresponding method of device in the embodiment of the present invention is the side of processing broadcast message of the embodiment of the present invention
Method, therefore the implementation of device of the embodiment of the present invention may refer to the implementation of this method, overlaps will not be repeated.
Fig. 6 a are referred to, are the structure diagram of device 600 provided in an embodiment of the present invention.
The device of processing broadcast message includes:Judgment module 610, for determining for receiving the first broadcast message extremely
There are N number of application in a few application to meet the first preset condition, and N is the positive integer more than zero;Broadcast agent module 620, is used
Each the second broadcast message of application generation in for N number of application, and Agent advertisement message is arrived into the second broadcast message storage
In queue, wherein the second broadcast message includes belonging to the correspondence of the radio receiver of application and the first broadcast message;Extensively
Solution proxy module 630 is broadcast, for according to default first rate, the second broadcast handled successively in Agent advertisement message queue to disappear
Breath, in order to which N number of application can receive the first broadcast message by belonging to the radio receiver of each application, wherein, the
One speed is less than system when the preceding speed that the first broadcast message is sent to application.
Further, broadcast agent module 620 is determined in Agent advertisement message queue after the broadcast message of generation second
The existing identical broadcast message of the second broadcast message with generating, deletes already present broadcast message, wherein, the with generation
Radio receiver in the identical broadcast message of two broadcast messages is identical with the radio receiver in the second broadcast message generated,
And first broadcast message type of message with generation second broadcast message in first broadcast the message type of message it is identical.
Further, broadcast agent module 620, which is additionally operable to determine to exist in Agent advertisement message queue, meets that second is pre-
If the second broadcast message of condition, advanced processing meets the second broadcast message of the second preset condition, in order to meeting to preset
The corresponding application of the second broadcast message of condition can receive the first broadcast message in advance.
Further, the second broadcast that broadcast agent module 620 is additionally operable to determine to store in Agent advertisement message queue disappears
The number of breath is more than predetermined threshold value, empties Agent advertisement message queue.
Further, as shown in Figure 6 b, which further includes configuration module 640, for determining the second speed, the second speed
For the preferred rate of currently processed second broadcast message of system;When definite second speed is different from default first rate, repair
It is the second speed to change default first rate, in order to be handled successively in Agent advertisement message queue according to the second rate processing
Second broadcast message.
Optionally, configuration module 640 determines the second speed as follows:
Determine that the unit interval in preset time period is used for the number of the radio receiver of the broadcast message of reception first;Determine
The number of system frame losing in preset time period;Determine to start in preset time period and apply required average duration;And according to unit
Time is used to receive the number of radio receiver of broadcast message, the number of system frame losing and start to apply required mean time
It is long, based on preset algorithm, determine the second speed.
Further, judgment module 610, are additionally operable at least one application for receiving the first broadcast message is determined
Before meeting preset condition there are N number of application, the speed for determining to receive the first broadcast message is more than default third speed and the
The type of message of one broadcast message is in the range of presetting message type.
Further, broadcast solution proxy module 630 handles the second broadcast message as follows, in order to N number of application
The first broadcast message can be received:
By the first broadcast message storage in the second broadcast message into broadcast message queue, by the second broadcast message
Radio receiver is stored into radio receiver queue;The first broadcast message is obtained from broadcast message queue, and from broadcast
Radio receiver is obtained in receiver queue, and the application transmission first belonged to by radio receiver to radio receiver is wide
Broadcast message.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, physics list is may or may not be as the component that unit is shown
Member, you can with positioned at a place, or can also be distributed in multiple network unit.It can be selected according to the actual needs
In some or all of module realize the purpose of this embodiment scheme.In addition, device embodiment attached drawing provided by the invention
In, the connection relation between module represents there is communication connection between them, and it is total specifically to can be implemented as one or more communication
Line or signal wire.Those of ordinary skill in the art are without creative efforts, you can to understand and implement.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention is implemented
Plotting unit described in example can add the mode of required common hardware to realize by software, naturally it is also possible to pass through specialized hardware
Realized including application-specific integrated circuit, dedicated cpu, private memory, special components and parts etc..Under normal circumstances, it is all by computer
The function that program is completed can be realized easily with corresponding hardware, moreover, for realizing the specific hard of same function
Part structure can also be diversified, such as analog circuit, digital circuit or special circuit etc..
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (16)
- A kind of 1. method for handling broadcast message, it is characterised in that including:Determine that there are N number of application the first preset condition of satisfaction, the N in the first at least one application to broadcast the message for receiving For the positive integer more than zero;For each application the second broadcast message of generation in N number of application, and the described second broadcast message was stored to generation In reason broadcast message queue, wherein second broadcast message includes belonging to the radio receiver and described first of the application The correspondence of broadcast message;According to default first rate, the second broadcast message in the Agent advertisement message queue is handled successively, in order to institute First broadcast message can be received by belonging to the radio receiver of each application by stating N number of application, wherein, described the One speed is less than system when the preceding speed that first broadcast message is sent to the application.
- 2. the method as described in claim 1, it is characterised in that after the broadcast message of generation second, further include:Determine the existing broadcast message identical with second broadcast message that is generating in the Agent advertisement message queue, delete Except the already present broadcast message, wherein, it is wide in the broadcast message identical with second broadcast message that is generating Broadcast receiver with generation it is described second broadcast message in radio receiver it is identical, and first broadcast message type of message with The type of message of the first broadcast message in second broadcast message of generation is identical.
- 3. method as claimed in claim 1 or 2, it is characterised in that further include:Determine there is the second broadcast message for meeting the second preset condition in the Agent advertisement message queue, described in advanced processing Meet the second broadcast message of the second preset condition, answered in order to corresponding with second broadcast message for meeting preset condition Broadcast the message with described first can be received in advance.
- 4. the method as described in claims 1 to 3 is any, it is characterised in that further include:The number for the second broadcast message for determining to store in the Agent advertisement message queue is more than predetermined threshold value, empties the generation Reason broadcast message queue.
- 5. the method as described in Claims 1-4 is any, it is characterised in that further include:Determine the second speed, the preferred rate that second speed broadcasts the message for system currently processed second;When definite second speed is different from the default first rate, it is described to change the default first rate Second speed, disappears in order to handle the second broadcast in the Agent advertisement message queue successively according to second rate processing Breath.
- 6. method as claimed in claim 5, it is characterised in that described to determine that the second speed includes:Determine that the unit interval in preset time period is used for the number of the radio receiver of the broadcast message of reception first;Determine the number of system frame losing in the preset time period;Determine to start in the preset time period and apply required average duration;According to the unit interval be used for receive broadcast message the number of radio receiver, the number of the system frame losing and Start and apply required average duration, based on preset algorithm, determine second speed.
- 7. the method as described in claim 1 to 6 is any, it is characterised in that determine for receiving first broadcast message Before meeting preset condition there are N number of application at least one application, further include:Determine that the speed for receiving first broadcast message is more than the message of default third speed and first broadcast message Type is in the range of presetting message type.
- 8. the method as described in claim 1 to 7 is any, it is characterised in that the broadcast message of processing second, in order to described N number of application, which can receive first broadcast message, to be included:By the first broadcast message storage in the described second broadcast message into broadcast message queue, described second is broadcasted The radio receiver in message is stored into radio receiver queue;First broadcast message is obtained from the broadcast message queue, and from the radio receiver to being obtained in queue The radio receiver, and the application transmission described first belonged to by the radio receiver to the radio receiver is wide Broadcast message.
- A kind of 9. device for handling broadcast message, it is characterised in that including:Judgment module, for determining that there are N number of application satisfaction first in the first at least one application to broadcast the message for receiving Preset condition, the N are the positive integer more than zero;Broadcast agent module, for for each the second broadcast message of application generation in N number of application, and by described second Broadcast message storage is into Agent advertisement message queue, wherein second broadcast message includes belonging to the broadcast of the application Receiver and the correspondence of the described first broadcast message;Broadcast solution proxy module, for according to default first rate, handling the in the Agent advertisement message queue successively Two broadcast messages, in order to which N number of application can receive described first by belonging to the radio receiver of each application Broadcast message, wherein, the first rate is less than system when the preceding speed that first broadcast message is sent to the application.
- 10. device as claimed in claim 9, it is characterised in that the broadcast agent module disappears in the broadcast of generation second After breath, it is additionally operable to:Determine the existing broadcast message identical with second broadcast message that is generating in the Agent advertisement message queue, delete Except the already present broadcast message, wherein, it is wide in the broadcast message identical with second broadcast message that is generating Broadcast receiver with generation it is described second broadcast message in radio receiver it is identical, and first broadcast message type of message with The type of message of the first broadcast message in second broadcast message of generation is identical.
- 11. the device as described in claim 9 or 10, it is characterised in that the broadcast agent module, is additionally operable to:Determine there is the second broadcast message for meeting the second preset condition in the Agent advertisement message queue, described in advanced processing Meet the second broadcast message of the second preset condition, answered in order to corresponding with second broadcast message for meeting preset condition Broadcast the message with described first can be received in advance.
- 12. the device as described in claim 9 to 11 is any, it is characterised in that the broadcast agent module, is additionally operable to:The number for the second broadcast message for determining to store in the Agent advertisement message queue is more than predetermined threshold value, empties the generation Reason broadcast message queue.
- 13. the device as described in claim 9 to 12 is any, it is characterised in that further include configuration module;The configuration module, for determining the second speed, second speed is excellent for currently processed second broadcast message of system Select speed;When definite second speed is different from the default first rate, changing the default first rate is Second speed is second wide in the Agent advertisement message queue in order to be handled successively according to second rate processing Broadcast message.
- 14. device as claimed in claim 13, it is characterised in that the configuration module determines the second speed, is specifically used for:Determine that the unit interval in preset time period is used for the number of the radio receiver of the broadcast message of reception first;Determine described The number of system frame losing in preset time period;Determine to start in the preset time period and apply required average duration;And according to The unit interval is used to receive the number of radio receiver of broadcast message, the number of the system frame losing and starts application Required average duration, based on preset algorithm, determines second speed.
- 15. the device as described in claim 9 to 14 is any, it is characterised in that the judgment module, is additionally operable to:Determine for receive it is described first broadcast message at least one application in meet preset condition there are N number of application before, Determine that the speed for receiving first broadcast message is more than default third speed and the type of message of first broadcast message In the range of presetting message type.
- 16. the device as described in claim 9 to 15 is any, it is characterised in that the broadcast solution proxy module processing second is wide Message is broadcast, in order to which N number of application can receive first broadcast message, is specifically used for:By the first broadcast message storage in the described second broadcast message into broadcast message queue, described second is broadcasted The radio receiver in message is stored into radio receiver queue;First broadcast message is obtained from the broadcast message queue, and institute is obtained from the radio receiver queue Radio receiver is stated, and first broadcast is sent to the application that the radio receiver is belonged to by the radio receiver Message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610964179.1A CN108011860B (en) | 2016-10-28 | 2016-10-28 | Method, device and terminal for processing broadcast message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610964179.1A CN108011860B (en) | 2016-10-28 | 2016-10-28 | Method, device and terminal for processing broadcast message |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108011860A true CN108011860A (en) | 2018-05-08 |
CN108011860B CN108011860B (en) | 2020-05-08 |
Family
ID=62048225
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610964179.1A Active CN108011860B (en) | 2016-10-28 | 2016-10-28 | Method, device and terminal for processing broadcast message |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108011860B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971920A (en) * | 2018-09-30 | 2020-04-07 | 武汉斗鱼网络科技有限公司 | Message degradation method and related device |
CN112052101A (en) * | 2020-07-17 | 2020-12-08 | 苏宁智能终端有限公司 | Broadcast processing method and device and computer system |
CN116701008A (en) * | 2022-09-23 | 2023-09-05 | 荣耀终端有限公司 | Broadcasting method and apparatus |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104092815A (en) * | 2014-05-22 | 2014-10-08 | 中兴通讯股份有限公司 | Method and device for inter-application information interaction based on Android system |
WO2015070655A1 (en) * | 2013-11-15 | 2015-05-21 | 北京奇虎科技有限公司 | Broadcast interception method and apparatus of intelligent device |
CN104869569A (en) * | 2015-03-31 | 2015-08-26 | 小米科技有限责任公司 | Network permission control method and apparatus of application program |
CN104994481A (en) * | 2015-07-10 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Method and system for transceiving broadcast messages between application programs in Android system |
-
2016
- 2016-10-28 CN CN201610964179.1A patent/CN108011860B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015070655A1 (en) * | 2013-11-15 | 2015-05-21 | 北京奇虎科技有限公司 | Broadcast interception method and apparatus of intelligent device |
CN104092815A (en) * | 2014-05-22 | 2014-10-08 | 中兴通讯股份有限公司 | Method and device for inter-application information interaction based on Android system |
CN104869569A (en) * | 2015-03-31 | 2015-08-26 | 小米科技有限责任公司 | Network permission control method and apparatus of application program |
CN104994481A (en) * | 2015-07-10 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Method and system for transceiving broadcast messages between application programs in Android system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971920A (en) * | 2018-09-30 | 2020-04-07 | 武汉斗鱼网络科技有限公司 | Message degradation method and related device |
CN110971920B (en) * | 2018-09-30 | 2021-11-26 | 武汉斗鱼网络科技有限公司 | Message degradation method and related device |
CN112052101A (en) * | 2020-07-17 | 2020-12-08 | 苏宁智能终端有限公司 | Broadcast processing method and device and computer system |
CN116701008A (en) * | 2022-09-23 | 2023-09-05 | 荣耀终端有限公司 | Broadcasting method and apparatus |
CN116701008B (en) * | 2022-09-23 | 2024-08-13 | 荣耀终端有限公司 | Broadcasting method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN108011860B (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108512695B (en) | Method and device for monitoring application blockage | |
US11025963B2 (en) | Data processing method, apparatus, and system for live streaming page | |
US10516640B2 (en) | Group message updating and displaying method, apparatus, and terminal | |
CN107809542B (en) | Application program control method and device, storage medium and electronic equipment | |
CN108062190B (en) | Application running state control method and mobile terminal | |
CN109756767B (en) | Preview data playing method, device and storage medium | |
CN106937258B (en) | A kind of control method of broadcast, device and mobile terminal | |
CN107729755A (en) | A kind of terminal safety management method, terminal and computer-readable recording medium | |
CN111182135A (en) | Mobile terminal and method for optimizing running state of mobile terminal | |
CN112817501A (en) | Method and related device for displaying media content | |
CN110069333A (en) | Backstage management-control method, mobile terminal and the computer readable storage medium of application | |
CN108011860A (en) | A kind of method and device for handling broadcast message | |
CN109165042A (en) | Restoration methods, terminal and computer readable storage medium are interrupted in a kind of application | |
CN113038273B (en) | Video frame processing method and device, storage medium and electronic equipment | |
CN106708501A (en) | Activity monitoring method and device | |
CN112395029A (en) | Application program interface display method and device, electronic equipment and storage medium | |
CN115225966B (en) | Application starting method, device, terminal equipment and storage medium | |
CN108182122B (en) | Application update reminding method and device, storage medium and server | |
CN116594616A (en) | Component configuration method and device and computer readable storage medium | |
EP4351117A1 (en) | Information display method and apparatus, and electronic device | |
CN106339230B (en) | Graphical interface display method and device | |
CN112866422B (en) | Data request processing method and device | |
CN108833712A (en) | A kind of message prompt method, terminal and computer readable storage medium | |
CN108536540B (en) | Method and device for acquiring mouse message of desktop icon | |
CN115185418A (en) | Image processing method, image processing device, computer storage medium, equipment and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |