CN103412752A - Event broadcasting adaptive service method and system - Google Patents

Event broadcasting adaptive service method and system Download PDF

Info

Publication number
CN103412752A
CN103412752A CN2013103478699A CN201310347869A CN103412752A CN 103412752 A CN103412752 A CN 103412752A CN 2013103478699 A CN2013103478699 A CN 2013103478699A CN 201310347869 A CN201310347869 A CN 201310347869A CN 103412752 A CN103412752 A CN 103412752A
Authority
CN
China
Prior art keywords
event
broadcast
response
list
response function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013103478699A
Other languages
Chinese (zh)
Other versions
CN103412752B (en
Inventor
曹霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201310347869.9A priority Critical patent/CN103412752B/en
Publication of CN103412752A publication Critical patent/CN103412752A/en
Application granted granted Critical
Publication of CN103412752B publication Critical patent/CN103412752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention is applicable to the field of computer technology and provides an event broadcasting adaptive service method and system. The method comprises receiving the broadcasting of a predefined event sent by a preset operating system kernel; querying the broadcasting of the predefined event in a broadcasting registration list according to broadcasting identifications of the broadcasting; obtaining an event response list associated with the broadcasting identifications when the broadcasting of the predefined event is queried; traversing the event response list according to the event state information contained in the broadcasting of the predefined event to obtain a response function associated with the event state information; executing the response function to change the state of a client of an application program associated with the response function. The embodiment of the event broadcasting adaptive service method and system solve the problem of compatibility difficulty of event broadcasting when a preset operating system is transplanted from one application platform to the other application platform, the compatibility of the preset operating system is improved, and the costs of the transplantation of the preset operating system are reduced.

Description

A kind of event broadcast adaptation services method and system
Technical field
The invention belongs to field of computer technology, relate in particular to a kind of event broadcast adaptation services method and system.
Background technology
Android operating system is a kind of operating system of the open source code based on Linux, is mainly used in mobile device, as smart mobile phone and panel computer, has been applied at present the intelligent television field.In Android operating system, message notification mechanism is broadcast mechanism, when having default event to occur, for example, camera plug event, network break-make event etc., the operating system bottom can send event broadcast to associated application client, as shown in Figure 1.
Generally, existing hardware manufacturer can be according to product separately (for example, mobile terminal product and intelligent television product etc.) need to be by same Android operating system transplantation to different application platforms, for example, mobile terminal application platform, intelligent television application platform.Operation and running environment demand for applicable different application platforms, under different application platforms, the event broadcast of Android operating system has adopted different broadcast action (Action) and data layout (parameter), in addition, different application platforms may comprise different event broadcast.Therefore, when an Android operating system is transplanted to the Another Application platform from an application platform, just there will be event broadcast to be difficult to compatible problem, thereby cause can't receiving corresponding event broadcast with the application client of event correlation, make Android operating system compatibility poor, also improved the cost of application migration.
Summary of the invention
The purpose of the embodiment of the present invention is to provide a kind of event broadcast adaptation services method and system, be intended to solve Android operating system and occur that event broadcast is difficult to compatibility when an application platform is transplanted to the Another Application platform, thereby cause can't receiving corresponding event broadcast with the application client of event correlation, make the poor problem of Android Compatibility of Operating System.
The embodiment of the present invention is achieved in that a kind of event broadcast adaptation services method, and described method comprises the steps:
Receive the broadcast of the predefine event of preset operating system kernel transmission;
According to the broadcast identification of described broadcast, the broadcast of the described predefine event of inquiry in the broadcast registration list;
When inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification;
The state information of event comprised in broadcast according to described predefine event, travel through described event response list, to obtain the response function associated with described state information of event;
Carry out described response function, with the state of the application client that changes described response function association.
Another purpose of the embodiment of the present invention is to provide a kind of event broadcast adaptation services system, and described system comprises:
The broadcast reception unit, be used to receiving the broadcast of the predefine event that the preset operating system kernel sends;
The broadcast query unit, for the broadcast identification according to described broadcast, the broadcast of the described predefine event of inquiry in the broadcast registration list;
Event response list acquiring unit, for when inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification;
The response function acquiring unit, the state information of event for the broadcast according to described predefine event comprises, travel through described event response list, to obtain the response function associated with described state information of event; And
The response function performance element, be used to carrying out described response function, with the state of the application client that changes described response function association.
The embodiment of the present invention is stored the broadcast of registration with a broadcast registration list, when needs add new broadcast, only need in described broadcast registration list, register and get final product, thereby solved preset operating system and when an application platform is transplanted to the Another Application platform, occurred that event broadcast is difficult to compatible problem, improve the compatibility of preset operating system, reduced the cost that this preset operating system is transplanted.
The accompanying drawing explanation
Fig. 1 is the event broadcast schematic diagram of Android operating system in prior art;
Fig. 2 is the realization flow figure of the event broadcast adaptation services method that provides of the embodiment of the present invention one;
Fig. 3 is the structural drawing of the event broadcast adaptation services system that provides of the embodiment of the present invention two;
Fig. 4 is the structural drawing of the broadcast registration unit that provides of the embodiment of the present invention two; And
Fig. 5 is the application principle figure of the event broadcast adaptation services system that provides of the embodiment of the present invention two.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Below in conjunction with specific embodiment, specific implementation of the present invention is described in detail:
Embodiment mono-:
Fig. 1 shows the realization flow of the event broadcast adaptation services method that the embodiment of the present invention one provides, and details are as follows:
In step S201, receive the broadcast of the predefine event of preset operating system kernel transmission.
In embodiments of the present invention, default operating system refers to and can adopt broadcast mechanism to carry out the operating system of message informing, and for example, Android operating system or other adopt the operating system of Linux Kernel kernel.The predefine event can be the event defined in operating system, and for example, USB flash disk plug event, network break-make event, mouse plug event etc., will not enumerate at this.
As example ground, for example, after the user extracts USB flash disk, the Linux Kernel of Android operating system can send Uevent message, to inform that change has occurred user's space storer (USB flash disk) state, after now Netlink monitors and receive this Uevent information, be connected by with carry service (MountService), setting up socket (Socket), be sent to user's space thereby the Uevent information exchange is crossed to the forms of broadcasting.
In step S202, according to the broadcast identification of described broadcast, the broadcast of the described predefine event of inquiry in the broadcast registration list.
In embodiments of the present invention, with a broadcast registration list, store the broadcast of registration.The broadcast of only registering in this broadcast registration list just can be received and then is processed, thereby when this operating system is transplanted to the Another Application platform from an application platform, for interpolation, the change of broadcasting provides the foundation.
In step S203, when inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification.
In embodiments of the present invention, when in the broadcast registration list, inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification, the all response functions with described predefine event correlation in this event response list, have been stored, to respond described predefine event.
In step S204, the state information of event comprised in the broadcast according to described predefine event, travel through described event response list, to obtain the response function associated with described state information of event.
In embodiments of the present invention, state information of event has been described the state variation of event, only has the response function associated with described state information of event just can be acquired.
In step S205, carry out described response function, with the state of the application client that changes described response function association.
In embodiments of the present invention, obtain the response function associated with described state information of event by step S204, carry out these response functions, thereby change the state of the application client of response function association.
As example ground, for example, if a plurality of application client is associated with USB flash disk, (inserts or extract as USB flash disk) when the USB flash disk interface changes, need to change show state or the interface of associated application client USB flash disk.By carrying out these response functions, just can realize the variation of associated application client state.
Preferably, in embodiments of the present invention, described response function is call back function, thereby, when operating system is transplanted to another platform from an application platform, carries out large modification without application programs, can realize the normal operation of application program in this operating system.
The embodiment of the present invention is stored the broadcast of registration with a broadcast registration list, when needs add new broadcast, only need in described broadcast registration list, register and get final product, thereby solved preset operating system and when an application platform is transplanted to the Another Application platform, occurred that event broadcast is difficult to compatible problem, improve the compatibility of preset operating system, reduced the cost that this preset operating system is transplanted.
Further, in another embodiment of the present invention, can also comprise step before step S201: by the broadcast registration of described predefine event in described broadcast registration list.Like this, when preset operating system need to increase new broadcast or former broadcast is modified, only need this broadcast registration just can compatiblely should be broadcasted in the broadcast registration list.For example, mobile-terminal platform and intelligent television platform, the broadcast that both use may be different, now, can realize according to the application platform difference of operating system the increase of new broadcast.
As example ground, particularly, the broadcast registration of described predefine event can be realized by following step to the step in described broadcast registration list:
(1) broadcast identification of described predefine event and corresponding state information of event are added in described broadcast registration list;
(2) in the event response list, the response function associated with described state information of event registered.
In embodiments of the present invention, by above-mentioned steps, can realize the registration of the broadcast of predefine event.When default operating system is other operating systems of Android operating system or use Linux Kernel kernel, can the response function associated with described state information of event be registered in described event response list by AIDL.
In this embodiment, when preset operating system need to increase new broadcast or former broadcast is modified, can be by this broadcast registration be realized in the broadcast registration list, thereby improve the compatibility of operating system, simultaneously, when an application program is transplanted to the Another Application platform from an application platform, by by its event response function registration in the event response list, realize corresponding interface, and then realize the registration of broadcast, simplified the migration process of application program.
One of ordinary skill in the art will appreciate that all or part of step realized in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk, CD etc.
Embodiment bis-:
Fig. 3 shows the structure of the event broadcast adaptation services system that the embodiment of the present invention two provides, and for convenience of explanation, only shows the part relevant to the embodiment of the present invention, comprising:
Broadcast reception unit 31, be used to receiving the broadcast of the predefine event that the preset operating system kernel sends;
Broadcast query unit 32, for the broadcast identification according to described broadcast, the broadcast of the described predefine event of inquiry in the broadcast registration list;
Event response list acquiring unit 33, for when inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification;
Response function acquiring unit 34, for the state information of event that the broadcast according to the predefine event comprises, the list of traversal event response, to obtain the response function associated with described state information of event; And
Response function performance element 35, be used to carrying out described response function, with the state of the application client that changes described response function association.
Wherein, as described in Figure 4, particularly, described broadcast registration unit 31 can comprise:
Broadcast message adding device 311, add described broadcast registration list to for the broadcast identification by described predefine event and corresponding state information of event; And
Response function registering unit 312, for registering the response function associated with described state information of event in described event response list.
In embodiments of the present invention, but in the concrete enforcement reference example one of each ingredient of this event broadcast adaptation services system, the enforcement of corresponding step is described, and does not repeat them here.
As shown in Figure 5, in embodiments of the present invention, event broadcast adaptation services system can be arranged in application layer, by this event broadcast adaptation services system, when preset operating system need to increase new broadcast or former broadcast is modified, by by this broadcast registration in the broadcast registration list of this event broadcast adaptation services system, to realize the compatibility to new broadcast, simultaneously, when an application program is transplanted to the Another Application platform from an application platform, also without large modification, only need to be by its event response function registration in the event response list of this event broadcast adaptation services system, realize corresponding interface, completing broadcast registration gets final product, thereby also simplified the migration process of application program.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. an event broadcast adaptation services method, is characterized in that, described method comprises the steps:
Receive the broadcast of the predefine event of preset operating system kernel transmission;
According to the broadcast identification of described broadcast, the broadcast of the described predefine event of inquiry in the broadcast registration list;
When inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification;
The state information of event comprised in broadcast according to described predefine event, travel through described event response list, to obtain the response function associated with described state information of event;
Carry out described response function, with the state of the application client that changes described response function association.
2. the method for claim 1, is characterized in that, before the step of the broadcast of the predefine event that described reception preset operating system kernel sends, described method also comprises step:
By the broadcast registration of described predefine event in described broadcast registration list.
3. method as claimed in claim 2, is characterized in that, the broadcast registration of described predefine event is comprised to the step in described broadcast registration list:
The broadcast identification of described predefine event and corresponding state information of event are added in described broadcast registration list;
In described event response list, the response function associated with described state information of event registered.
4. described method as arbitrary as claims 1 to 3, is characterized in that, described preset operating system is Android operating system.
5. method as claimed in claim 4, is characterized in that, by AIDL, the response function associated with described state information of event is registered in described event response list.
6. method as claimed in claim 4, is characterized in that, described response function is call back function.
7. an event broadcast adaptation services system, is characterized in that, described system comprises:
The broadcast reception unit, be used to receiving the broadcast of the predefine event that the preset operating system kernel sends;
The broadcast query unit, for the broadcast identification according to described broadcast, the broadcast of the described predefine event of inquiry in the broadcast registration list;
Event response list acquiring unit, for when inquiring the broadcast of described predefine event, obtain the event response list associated with described broadcast identification;
The response function acquiring unit, the state information of event for the broadcast according to described predefine event comprises, travel through described event response list, to obtain the response function associated with described state information of event; And
The response function performance element, be used to carrying out described response function, with the state of the application client that changes described response function association.
8. system as claimed in claim 7, is characterized in that, described system also comprises:
The broadcast registration unit, for the broadcast registration by described predefine event to described broadcast registration list.
9. system as claimed in claim 8, is characterized in that, described broadcast registration unit comprises:
The broadcast message adding device, add described broadcast registration list to for the broadcast identification by described predefine event and corresponding state information of event; And
The response function registering unit, for registering the response function associated with described state information of event in described event response list.
10. described system as arbitrary as claim 7 to 9, is characterized in that, described preset operating system is Android operating system.
11. system as claimed in claim 10, is characterized in that, by AIDL, the response function associated with described state information of event is registered in described event response list.
12. system as claimed in claim 10, is characterized in that, described response function is call back function.
CN201310347869.9A 2013-08-09 2013-08-09 A kind of event broadcasts adaptation services method and system Active CN103412752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310347869.9A CN103412752B (en) 2013-08-09 2013-08-09 A kind of event broadcasts adaptation services method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310347869.9A CN103412752B (en) 2013-08-09 2013-08-09 A kind of event broadcasts adaptation services method and system

Publications (2)

Publication Number Publication Date
CN103412752A true CN103412752A (en) 2013-11-27
CN103412752B CN103412752B (en) 2017-08-25

Family

ID=49605765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310347869.9A Active CN103412752B (en) 2013-08-09 2013-08-09 A kind of event broadcasts adaptation services method and system

Country Status (1)

Country Link
CN (1) CN103412752B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289484A (en) * 2011-08-03 2011-12-21 Tcl集团股份有限公司 Method for scanning multimedia files of storage equipment based on android system
CN102819452A (en) * 2012-07-13 2012-12-12 深圳市酷开网络科技有限公司 Middleware device based on android system and method thereof
CN103152701A (en) * 2011-12-07 2013-06-12 腾讯科技(深圳)有限公司 Method and device for obtaining service information in Android system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289484A (en) * 2011-08-03 2011-12-21 Tcl集团股份有限公司 Method for scanning multimedia files of storage equipment based on android system
CN103152701A (en) * 2011-12-07 2013-06-12 腾讯科技(深圳)有限公司 Method and device for obtaining service information in Android system
CN102819452A (en) * 2012-07-13 2012-12-12 深圳市酷开网络科技有限公司 Middleware device based on android system and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QUAN GAN,HAO WU: ""The Research of Android Broadcast Intercept Technology Based on Priority"", 《MULTIMEDIA INFORMATION NETWORKING AND SECURITY (MINES), 2012 FOURTH INTERNATIONAL CONFERENCE》 *

Also Published As

Publication number Publication date
CN103412752B (en) 2017-08-25

Similar Documents

Publication Publication Date Title
US10939404B2 (en) User-equipment location area updating method, access network entity, user equipment and core network entity
US9204300B2 (en) Method for providing SIM profile in eUICC environment and devices therefor
CN102724657B (en) The mobile terminal parameter automatic configuration method of android system and system
US9585022B2 (en) Profile integration management
CN104471917A (en) Application information sharing method and device
CN104756080A (en) Augmenting capabilities of a host device
CN103188616A (en) Management method and system of terminal group
CN104185208A (en) Approaching business authorizing method, device and system thereof
CN103246483A (en) Method, system and intelligent terminal for scanning files
US20160028832A1 (en) Methods and systems for efficient discovery of devices in a peer-to-peer network
CN105245500A (en) Multimedia resource sharing method and device
CN104754310A (en) Method and device for connecting camera of terminal equipment into target equipment
CN105530198A (en) Access control method and device for mobile terminal
US20130148554A1 (en) Electronic device and method for sharing contents via bluetooth network
US9462408B2 (en) Information processing method and electronic device
CN105472419A (en) Message notification method and apparatus
CN103906174A (en) Device discovery method and terminal
CN104092754A (en) File storage system and method
CN105684455A (en) Video sharing method and system based on app
CN103368907A (en) Event report request system, method thereof, client device and report request method thereof
CN104869445A (en) A method for realizing content sharing between intelligent terminals based on a cloud system and the cloud system
CN103412752A (en) Event broadcasting adaptive service method and system
CN103517202A (en) Method for acquiring and transmitting inquiry instruction, system, mobile terminal and server
CN102801590B (en) Method and system for positioning terminal equipment and terminal equipment
US20180091371A1 (en) Multi-terminal interaction relation maintenance system and method

Legal Events

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