The content of the invention
In view of this, it is an object of the invention to provide a kind of information push method and device, to solve the above problems.
Present pre-ferred embodiments provide a kind of information push method, are applied to logical with user terminal and application server respectively
Believe the connection server of connection, methods described includes:
The systematic parameter attribute of the system of the user terminal is obtained, the user terminal is differentiated according to the systematic parameter attribute
System type;
Obtain message corresponding with the system type and push scheme;
It is that the user terminal registers corresponding message push service to push scheme according to the message, and sends corresponding note
Volume identifier to the user terminal so that the user terminal sends to the application server login ID;
The PUSH message that the application server sends according to the login ID is received, and is forwarded to the user
End.
Further, the user terminal is multiple, and the system type of each user terminal is different, and methods described also includes:
Obtain the multiple systems type of multiple user terminals;
The system list including multiple systems corresponding with the multiple systems type is set up, it is each in the system list
The message that the system can provide system level pushes scheme.
Further, it is described the user terminal is differentiated according to the systematic parameter attribute system type the step of, including:
Detect and whether include in the systematic parameter attribute special parameter, the special parameter is particular system types
The parameter that systematic parameter attribute is included;
If including the special parameter, judge that the system type of the user terminal is the particular system types;
If not including the special parameter, judge that the system type of the user terminal is default Third party system class
Type.
Further, the step of acquisition message corresponding with the system type pushes scheme, including:
The system list is inquired about, system corresponding with the system type of the user terminal is judged whether;
If in the presence of system corresponding with the system type of the user terminal, will push side corresponding with the system type
Case is set to message and pushes scheme;
If in the absence of system corresponding with the system type of the user terminal, default third party being pushed into scheme and being set
For message pushes scheme.
Further, described is that the user terminal registers corresponding message push service according to message push scheme
Step, including:
The SDK bags of Push Service corresponding with message push scheme are added into application database, it is interior initial in application
Change the Push Service;
PUSH message receiver is inherited, configuration pushes authority;
Registration message Push Service and radio receiver, set corresponding login ID.
Another preferred embodiment of the present invention provides a kind of message pusher, be applied to respectively with user terminal and application service
The connection server of device communication connection, the message pusher includes:
System type discrimination module, the systematic parameter attribute of the system for obtaining the user terminal, according to the system
Parameter attribute differentiates the system type of the user terminal;
Scheme acquisition module, scheme is pushed for obtaining message corresponding with the system type;
Registering modules, are that the user terminal registers corresponding message push service for pushing scheme according to the message,
And corresponding login ID to the user terminal is sent, so as to the user terminal sends to described the login ID answer
Use server;
Receiver module, for receiving the PUSH message that the application server sends according to the login ID, and turns
It is sent to the user terminal.
Further, the user terminal is multiple, and the system type of each user terminal is different, the message pusher
Also include that module is set up in system type acquisition module and list;
The system type acquisition module is used to obtain the multiple systems type of multiple user terminals;
The list set up module for set up including multiple systems corresponding with the multiple systems type system row
Table, the message that each described system in the system list can provide system level pushes scheme.
Further, the system type discrimination module is sentenced including detection sub-module, the first decision sub-module and second
Stator modules;
Whether the detection sub-module is used to detect and include special parameter, the specific ginseng in the systematic parameter attribute
The parameter that number is included by the systematic parameter attribute of particular system types;
First decision sub-module is used to judge when the special parameter is included the system type of the user terminal
It is the particular system types;
Second decision sub-module is used to judge when not comprising the special parameter system type of the user terminal
It is default Third party system type.
Further, the scheme acquisition module includes that judging submodule, first set submodule and the second setting
Module;
The judging submodule is used to inquire about the system list, judges whether the system type with the user terminal
Corresponding system;
Described first sets submodule is used for when there is system corresponding with the system type of the user terminal, will be with institute
State the corresponding push scheme of system type and be set to message push scheme;
Described second sets submodule is used for when in the absence of system corresponding with the system type of the user terminal, will be pre-
If third party push scheme be set to message push scheme.
Further, the Registering modules include initialization submodule, configuration submodule and registration submodule;
The initialization submodule is used to for the SDK bags of Push Service corresponding with message push scheme to add application
Database, in the interior initialization Push Service of application;
The configuration submodule is used to inherit PUSH message receiver, and configuration pushes authority;
The registration submodule is used for registration message Push Service and radio receiver, sets corresponding login ID.
Compared to existing technologies, the invention has the advantages that:
The embodiment of the present invention provides a kind of information push method and device, and scheme is pushed by integrated multiclass message, according to
User terminal system type is pushed respectively.While user terminal power consumption and performance is not influenceed, the message of user terminal is improved
The arrival rate of push, so as to improve apply exposure rate, Experience Degree is applied in increase.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate
Appended accompanying drawing, is described in detail below.
Specific embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground description, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Generally exist
The component of the embodiment of the present invention described and illustrated in accompanying drawing can be arranged and designed with a variety of configurations herein.Cause
This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below
Scope, but it is merely representative of selected embodiment of the invention.Based on embodiments of the invention, those skilled in the art are not doing
The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
Fig. 1 is referred to, is a kind of application scenarios schematic diagram of information push method provided in an embodiment of the present invention.The application
Scene includes connection server 100, user terminal 200 and application server 300.The connection server 100, application clothes
Business device 300 and the user terminal 200 are in communication with each other by network, to enter row data communication or interaction.Wherein, the user terminal
200 can be multiple, and the user terminal 200 can be but not limited to smart mobile phone, mobile internet surfing equipment, panel computer etc..
In the present embodiment, illustrated by taking smart mobile phone as an example below.
Types of applications can be installed, the application server 300 on the user terminal 200 by pacifying on the user terminal 200
The background server of the application of dress, can be to the PUSH message of user terminal 200 for being provided with respective application.The connection server 100
Being one can help developer that the clothes for operating in the application on user terminal 200 are sent data to from the application server 300
Business device.The server can provide a simple, light-weighted mechanism so that application server 300 can notify user terminal 200
Application set up with application server 300 and directly be connected to obtain the application of renewal or the data of user.Connection server
100 problems that can process message queue, and the intended application run on targeted customer end can be sent a message to.
Fig. 2 is referred to, is the functional block diagram of the above-mentioned connection server 100 that present pre-ferred embodiments are provided.Institute
Stating connection server 100 includes message pusher 110, processor 120 and memory 130.Wherein, the message pushes dress
Electric connection direct or indirect between 110 and the processor 120 is put, to realize the transmission or interaction of data.The message
Pusher 110 can be stored in the memory 130 in the form of software or firmware including at least one or is solidificated in described
Software function module in the operating system of connection server 100.During the processor 120 is used to perform the memory 130
The executable module of storage, such as software function module or computer program that described message pusher 110 includes.
Fig. 3 is referred to, is a kind of message push side for being applied to above-mentioned connection server 100 provided in an embodiment of the present invention
The flow chart of method.It should be noted that, the method that the present invention is provided is not limitation with Fig. 3 and particular order as described below.Under
Face will be described in detail to each step shown in Fig. 3.
Step S101, obtains the systematic parameter attribute of the system of the user terminal 200, is sentenced according to the systematic parameter attribute
The system type of not described user terminal 200.
With user terminal 200 as mobile phone, system is for as a example by Android system, the push in Android mobile phone is divided into system level push
Scheme is pushed with third party.System level pushes scheme cell phone manufacturer and is integrated in cell phone system, and Push Service process can't
Because being killed using exiting or being recovered using backstage.As long as using the registered push, no matter whether application process deposits
Backstage is all resided in, Push Service process, application server 300 pushes the information for coming and can receive and show.Third party
The Push Service process of push scheme is to depend on application process, it is impossible to as system process.When application process is killed, the
The Push Service process that tripartite pushes scheme is also killed simultaneously, and application server 300 pushes the information for coming and cannot receive
Arrive, PUSH message can be received after application is opened again.
, it is necessary to determine the system type of the system of user terminal 200 in implementation, to distinguish whether its system can provide system
The other message of irrespective of size pushes scheme.Alternatively, it is necessary to obtain the systematic parameter attribute of the system of user terminal 200.For example,
The system type parameter of android system is stored in " build.prop " file, can be by calling Properties.load
(new File (Environment.Get Root Directory (), " build.prop ")) obtains Properties attributes.
Wherein new File (Environment.Get Root Directory (), " build.prop ") are to open under root "
Build.prop " files, and be loaded into Properties attributes by Properties.load () function.Obtaining user
After the systematic parameter attribute of the system at end 200, can be according to the parameter attribute for obtaining differentiating the system type of user terminal 200.
Fig. 4 is referred to, step S101 can include step S1011, step S1013 and the sub-steps of step S1015 tri-.
Whether step S1011, include special parameter in the detection systematic parameter attribute, the special parameter is specific
The parameter that the systematic parameter attribute of system type is included, if including the special parameter, performs following step S1013,
If not including the special parameter, following step S1015 is performed.
Step S1013, judges that the system type of the user terminal 200 is the particular system types.
Step S1015, judges that the system type of the user terminal 200 is default Third party system type.
At present, opening source code due to android system, each mobile phone vendor commercial city has modify fixed to Android phone
System.Therefore, it can the system type acquisition methods according to the offer of each manufacturer to get cell phone system type.Alternatively, detect
Which kind of whether include specific parameter in the systematic parameter attribute for getting system type be judged as.For example, wherein millet
Whether the acquisition modes of MIUI systems are the special parameter for judging to include in systematic parameter attribute millet MIUI.Alternatively, lead to
Cross and call Properties.containsKey (" ro.miui.ui.version.code ") | |
Properties.containsKey("ro.m iui.ui.version.name")||Properties.containsKey("
ro.miui.has_handy_mode_sf")||Properties.containsKey("ro.miui.has_real_blur")
Whether to include the special parameter of millet MIUI in sensed system parameter attribute.If detecting the specific ginseng of corresponding millet MIUI
Number, the then system type that can be determined that the user terminal 200 is millet MIUI systems.
For example, the acquisition modes of Huawei's EMUI systems be judge accessed by systematic parameter attribute in whether include China
It is the special parameter of EMUI systems.Alternatively, by calling Properties.contains Key ("
Ro.build.version.emui ") carry out in sensed system parameter attribute whether to include the special parameter of Huawei EMUI.If inspection
The special parameter of corresponding Huawei EMUI is measured, then the system type that can be determined that the user terminal 200 is Huawei's EMUI systems.
If after detecting successively, being not detected by the special parameter of millet MIUI or the special parameter of Huawei EMUI, then will
The system type of the user terminal 200 is judged to default Third party system type.
Alternatively, in the present embodiment, user terminal 200 can also may not be used with multiple, and the system type of user terminal 200
Together, as described above, its system type can be millet MIUI systems, Huawei EMUI systems or other Third party systems.Can
Selection of land, refers to Fig. 5, and the information push method can also be comprised the following steps:
Step S201, obtains the multiple systems type of multiple user terminals 200.
Step S203, sets up the system list including multiple systems corresponding with the multiple systems type, the system
The message that each described system in list can provide system level pushes scheme.
Generally only need to judge the popular Android mobile phone system type that occupation rate of market is higher, get multiple mobile phone system
System type.Set up according to the multiple systems type for getting and include multiple systems corresponding with the multiple systems type
System list romList.Also, the message that each system included in system list romList can provide system level is pushed away
Scheme is sent, otherwise also the message push scheme without system level can use.For example hot topic cell phone system mainly has millet at present
MIUI and Huawei EMUI, then romList is MIUI and EMUI.
Step S103, obtains message corresponding with the system type and pushes scheme.
Fig. 6 is referred to, step S103 can include step S1031, step S1033 and step S1035.
Step S1031, inquires about the system list, judges whether corresponding with the system type of the user terminal 200
System, if in the presence of system corresponding with the system type of the user terminal 200, following step S1033 is performed, if not existing
System corresponding with the system type of the user terminal 200, then perform following step S1035.
Step S1033, message push scheme is set to by push scheme corresponding with the system type.
Step S1035, is set to default third party push scheme message and pushes scheme.
Alternatively, according to the system type of the user terminal 200 for determining, set up system list romList is searched.According to
Whether the secondary system for judging the user terminal 200 is the system preserved in system list romList.If the user terminal 200 is
System is the system in the system list romList, then push scheme corresponding with the system type is set into the user terminal
200 message pushes scheme.For example, it is the millet MIUI systems preserved in system list romList to judge whether successively, it is then
TYPE_MIUI is returned, and the push scheme of the user terminal 200 is set to millet and pushed.If not millet MIUI systems, then again
Judge whether it is Huawei's EMUI systems, be to return to TYPE_EMUI, and the push scheme of the user terminal 200 is set to Huawei
Push.
If found by after lookup, the system of the user terminal 200 is not to be in the system list romList
System, then return to TYPE_DEFAULT, and default third party push scheme is set to the message push side of the user terminal 200
Case.In the present embodiment, it is that friendly alliance pushes scheme that default third party pushes scheme.
Step S105, scheme is pushed for the user terminal 200 registers corresponding message push service according to the message, and
Corresponding login ID to the user terminal 200 is sent, so that the user terminal 200 sends to institute the login ID
State application server 300.
Fig. 7 is referred to, step S105 can include step S1051, step S1053 and the sub-steps of step S1055 tri-.
Step S1051, application database is added by the SDK bags of Push Service corresponding with message push scheme,
Using the interior initialization Push Service.
Step S1053, inherits PUSH message receiver, and configuration pushes authority.
Step S1055, registration message Push Service and radio receiver, set corresponding login ID.
Alternatively, only need to register a kind of message push service on each user terminal 200, so as to realize millet MIUI systems
Millet is registered on system mobile phone to push, Huawei is registered on Huawei's EMUI system mobile phones and is pushed.If mobile phone is not system list romList
In system then register third party's Push Service of acquiescence.For example, when the system type for determining user terminal 200 is millet
TYPE_MIUI, the then interface for pushing SDK (SDK) offers by millet is registered.By millet Push Service
SDK (SDK) add application database, application it is interior initialization millet Push Service.Inherit message receiver
Push Message Receiver, and the method for making carbon copies related PUSH message.Configured inside Android Manifest files
Push authority.Registration message Push Service Service and radio receiver Broadcast Receiver, and corresponding note is set
Volume identifier.Alternatively, a series of push can be arranged as required to set, such as user name, label etc..Wherein, pass through
MiPushClient.registerPush () realizes that millet pushes registration, by realizing onNotification Message
Arrived () method realizes that millet PUSH message is received.
If pushing what SDK was provided by Huawei for example, the system type for judging user terminal 200 is TYPE_EMUI again
Interface is registered and receives PUSH message.Realize that Huawei pushes registration by Push Manager.Request Token (), pass through
Realize that onPushMsg () method realizes that Huawei's PUSH message is received.Pushed away by friendly alliance if type of cell phone is TYPE_DEFAULT
The interface for sending SDK to provide is registered and receives PUSH message, realizes that friendly alliance pushes registration by Push Agent.register (),
By realizing that deal With Notification Message () method realizes that friendly alliance PUSH message is received.
From the foregoing, in the present embodiment, the system type according to mobile phone registers corresponding message push service, so that
Application on popular mobile phone can be registered in the system Push Service of the mobile phone.Because system Push Service will not be with
Exiting or killing and be recovered for application, system Push Service always in system process, so as to ensure that message was pushed
When coming, system Push Service can be received and shown, substantially increased the message applied on popular mobile phone and pushed arrival rate.And
Other regular handsets then still push scheme using third party, maintain original message to push arrival rate.And, although it is integrated
Various message push schemes, but only can be a kind of corresponding with system type to register according to the system type of each user terminal 200
Push Service, can't register multiple Push Services, and the internal memory for effectively optimizing user terminal 200 makes using with processing unit
With.
Step S107, receives the PUSH message that the application server 300 sends according to the login ID, and forward
To the user terminal 200.
Application server 300 sends PUSH message to connection server 100 according to login ID, if user terminal 200 is worked as
Preceding not online, then connection server 100 can be stored the PUSH message.When user terminal 200 is reached the standard grade, connection server
100 send to user terminal 200 PUSH message.After user terminal 200 receives PUSH message, system can be logical using appropriate authority
Cross Intent broadcast and the PUSH message is broadcast to specific application, then specific application can obtain the push and disappear
Breath, has thus waken up the application.
Fig. 8 is referred to, is the functional block diagram of message pusher 110 provided in an embodiment of the present invention.The message
Pusher 110 includes system type discrimination module 111, scheme acquisition module 112, Registering modules 113, receiver module 114, is
Module 116 is set up in system type acquisition module 115 and list.
The system type discrimination module 111 is used for the systematic parameter attribute of the system for obtaining the user terminal 200, according to
The systematic parameter attribute differentiates the system type of the user terminal 200.Specifically, the system type discrimination module 111 can use
S101 the step of performing shown in Fig. 3, specific operating method refers to the detailed description of step S101.
The scheme acquisition module 112 is used to obtain message push scheme corresponding with the system type.Specifically, should
Scheme acquisition module 112 can be used to perform S103 the step of shown in Fig. 3, and specific operating method refers to the detailed of step S103
Thin description.
The Registering modules 113 are used to push scheme for the user terminal 200 registers corresponding message according to the message
Push Service, and corresponding login ID to the user terminal 200 is sent, so that the user terminal 200 marks the registration
Know symbol to send to the application server 300.Specifically, the Registering modules 113 can be used for the step of performing shown in Fig. 3
S105, specific operating method refers to the detailed description of step S105.
The receiver module 114 is used to receive the push that the application server 300 sends according to the login ID
Message, and it is forwarded to the user terminal 200.Specifically, the receiver module 114 can be used to perform S107 the step of shown in Fig. 3,
Specific operating method refers to the detailed description of step S107.
The system type acquisition module 115 is used to obtain the multiple systems type of multiple user terminals 200.Specifically
Ground, the system type acquisition module 115 can be used to perform S201 the step of shown in Fig. 5, and specific operating method refers to step
The detailed description of rapid S201.
The list set up module 116 for set up include multiple systems corresponding with the multiple systems type system
List, the message that each described system in the system list can provide system level pushes scheme.Specifically, the list is built
Formwork erection block 116 can be used to perform S203 the step of shown in Fig. 5, and specific operating method refers to retouching in detail for step S203
State.
Alternatively, Fig. 9 is referred to, the system type discrimination module 111 includes that detection sub-module 1111, first judges son
The decision sub-module 1113 of module 1112 and second.
Whether the detection sub-module 1111 is used to detect and include special parameter, the spy in the systematic parameter attribute
Determine the parameter that parameter is included by the systematic parameter attribute of particular system types.Specifically, the detection sub-module 1111 can be used for
S1011 the step of shown in Fig. 4 is performed, specific operating method refers to the detailed description of step S1011.
First decision sub-module 1112 is used to, when the special parameter is included, judge the user terminal 200
System type is the particular system types.Specifically, first decision sub-module 1112 can be used to perform the step shown in Fig. 4
Rapid S1013, specific operating method refers to the detailed description of step S1013.
Second decision sub-module 1113 is used to when not comprising the special parameter, judge the user terminal 200
System type is default Third party system type.Specifically, second decision sub-module 1113 can be used to perform shown in Fig. 4
The step of S1015, specific operating method refers to the detailed description of step S1015.
Alternatively, Figure 10 is referred to, the scheme acquisition module 112 includes that judging submodule 1121, first sets submodule
Block 1122 and second sets submodule 1123.
The judging submodule 1121 is used to inquire about the system list, judges whether and the user terminal 200
The corresponding system of system type.Specifically, the judging submodule 1121 can be used to perform S1031 the step of shown in Fig. 6, specifically
Operating method refer to the detailed description of step S1031.
Described first sets submodule 1122 is used for the presence of system corresponding with the system type of the user terminal 200
When, push scheme corresponding with the system type is set to message push scheme.Specifically, the first setting submodule
1122 can be used to perform S1033 the step of shown in Fig. 6, and specific operating method refers to the detailed description of step S1033.
Described second sets submodule 1123 is used in the absence of system corresponding with the system type of the user terminal 200
When, default third party push scheme is set to message and pushes scheme.Specifically, the second setting submodule 1123 can be used for
S1035 the step of shown in Fig. 6 is performed, specific operating method refers to the detailed description of step S1035.
Alternatively, Figure 11 is referred to, the Registering modules 113 include initialization submodule 1131, configuration submodule 1132
And registration submodule 1133.
The initialization submodule 1131 is used to add the SDK bags of Push Service corresponding with message push scheme
Application database, in the interior initialization Push Service of application.Specifically, the initialization submodule 1131 can be used to perform Fig. 7
Shown in the step of S1051, specific operating method refers to the detailed description of step S1051.
The configuration submodule 1132 is used to inherit PUSH message receiver, and configuration pushes authority.Specifically, configuration
Module 1132 can be used to perform S1053 the step of shown in Fig. 7, and specific operating method refers to retouching in detail for step S1053
State.
The registration submodule 1133 is used for registration message Push Service and radio receiver, sets corresponding sign-on ID
Symbol.Specifically, the registration submodule 1133 can be used to perform S1055 the step of shown in Fig. 7, and specific operating method is referred to
The detailed description of step S1055.
In sum, a kind of information push method provided in an embodiment of the present invention and device, are pushed away by integrated multiclass message
Scheme is sent, the system type according to user terminal 200 is pushed respectively.Do not influenceing the same of the power consumption of user terminal 200 and performance
When, the arrival rate that the message of user terminal 200 is pushed is improved, so as to improve apply exposure rate, Experience Degree is applied in increase.
In embodiment provided herein, it should be understood that disclosed apparatus and method, it is also possible to by other
Mode realize.Device embodiment described above is only schematical, for example, the flow chart and block diagram in accompanying drawing show
Devices in accordance with embodiments of the present invention, the architectural framework in the cards of method and computer program product, function and behaviour
Make.At this point, each square frame in flow chart or block diagram can represent a part for module, program segment or code, institute
Stating a part for module, program segment or code is used for the executable instruction of the logic function that realization specifies comprising one or more.
It should also be noted that in some are as the implementation replaced, the function of being marked in square frame can also be with different from accompanying drawing
The order for being marked occurs.For example, two continuous square frames can essentially be performed substantially in parallel, they sometimes can also be by
Opposite order is performed, and this is depending on involved function.It is also noted that each square frame in block diagram and/or flow chart,
And the combination of the square frame in block diagram and/or flow chart, can be with the function or action for performing regulation it is special based on hardware
System realize, or can be realized with the combination of computer instruction with specialized hardware.
In addition, each functional module in each embodiment of the invention can integrate to form an independent portion
Divide, or modules individualism, it is also possible to which two or more modules are integrated to form an independent part.
If the function is to realize in the form of software function module and as independent production marketing or when using, can be with
Storage is in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used to so that a computer equipment (can be individual
People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the invention.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage, random access memory, magnetic disc or CD etc. are each
Planting can be with the medium of store program codes.
It should be noted that herein, term " including ", "comprising" or its any other variant be intended to non-row
His property is included, so that process, method, article or equipment including a series of key elements not only include those key elements, and
And also include other key elements being not expressly set out, or also include for this process, method, article or equipment institute are intrinsic
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including institute
Also there is other identical element in process, method, article or the equipment of stating key element.
The preferred embodiments of the present invention are the foregoing is only, is not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.It is all within the spirit and principles in the present invention, made any repair
Change, equivalent, improvement etc., should be included within the scope of the present invention.It should be noted that:Similar label and letter exists
Similar terms is represented in following accompanying drawing, therefore, once being defined in a certain Xiang Yi accompanying drawing, then it is not required in subsequent accompanying drawing
It is further defined and is explained.