CN107741884A - The method and apparatus that a kind of stratification state machine realizes message push - Google Patents
The method and apparatus that a kind of stratification state machine realizes message push Download PDFInfo
- Publication number
- CN107741884A CN107741884A CN201710930050.3A CN201710930050A CN107741884A CN 107741884 A CN107741884 A CN 107741884A CN 201710930050 A CN201710930050 A CN 201710930050A CN 107741884 A CN107741884 A CN 107741884A
- Authority
- CN
- China
- Prior art keywords
- message
- layer
- receiving layer
- switching
- routing
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses the method and apparatus that a kind of stratification state machine realizes message push, including receiving layer, switching layer, routing layer and consumption layer, first, the message respectively from different platform that the receiving layer the reception server is sent;Secondly, the receiving layer runs on the message transmission message received in same process to the switching layer from the switching layer with two different threads respectively;Then, the switching layer passes to the routing layer after unified form conversion is carried out to the message;Finally, the routing layer runs on worker thread, and the message received is pushed to the consumption layer for running on UI threads.Each level division of labor is detailed, and without the degree of coupling, improves compatibility and success rate that message pushes.Thus solve in the prior art that various third party's message push platforms are incompatible, cause message to be sent to the low technical problem of rate, reached compatible a variety of push platforms, and then improve the technique effect that message pushes success rate.
Description
Technical field
The invention belongs to Android TV applications technical field, more particularly to a kind of stratification state machine realizes the side of message push
Method and device.
Background technology
At present, scheme is pushed using unified iOS Cloud different from iOS platforms, Android platform is unified due to lacking
Standard pushes scheme, has also just expedited the emergence of a large amount of third parties and has pushed platforms, it is more well-known such as:Friendly alliance's push (UMPush), pole
Light push (JPush), individual push (GTPush) and some manufacturers push (millet push, Huawei's push, Meizu push) etc..
The advantage that platform PUSH message is pushed using third party builds server without application developers repetition, secondly
Third party pushes the push framework and data timely processing means that platform possesses maturation.But using third party push platform there is also
Shortcomings:
First, third party push platform can not compatible institute's organic type, all in the presence of push be sent to rate less than 80% the problem of;
Secondly, third party, which pushes platform, can not realize online (application process survival) and offline (application process is dead) simultaneously
Two kinds of message push;
Again, the type of message of third party's push platform push is limited, can not meet the growing multiparts of app
Push demand;
Finally, once there is operation troubles in third party's push platform, and app push is also in paralyzed state immediately, influences app
Rate is enlivened, brings economic loss huge.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on
State the method and apparatus that a kind of stratification state machine of problem realizes message push.
In a first aspect, a kind of method that stratification state machine realizes message push is provided in the embodiment of the present invention, described point
Layer state machine includes receiving layer, switching layer, routing layer and consumption layer, applied to android terminal, specifically comprises the following steps:
The message respectively from different platform that the receiving layer the reception server is sent;
The receiving layer runs on the message received together from the switching layer with two different threads respectively
The message transmission is given to the switching layer in one process;
The switching layer passes to the routing layer after unified form conversion is carried out to the message;
The routing layer runs on worker thread, the message received is pushed to run on disappeared described in UI threads
Take layer.
With reference in a first aspect, the present invention in the first implementation of first aspect, is received in the receiving layer and serviced
Before the message respectively from different platform that device is sent, in addition to:
The receiving layer establishes long connection communication with the server.
It is described in second of implementation of first aspect with reference to the first implementation of first aspect, the present invention
The message respectively from different platform that receiving layer the reception server is sent, including:
When the long connection communication of the server and the receiving layer is in connection status, the message is directly by described
Server is transferred to the receiving layer by socket communication mechanisms;
When the long connection communication of the server and the receiving layer is off, the message is by the service
Device is forwarded to system message and receives service on behalf of trustship, and after process where the receiving layer is activated, system service is again by institute
State message and be transmitted to the receiving layer.
With reference in a first aspect, the present invention in the third implementation of first aspect, the receiving layer will receive
The message is run on the message transmission in same process to described with two different threads respectively from the switching layer
Switching layer, including:
The message received is wrapped in service intention by the receiving layer, will be intended to pass to institute when starting service
State switching layer;
Transmission is broadcast to the receiving layer after the switching layer receives the intention, feeds back whether the message exchanges success
Information;
After the receiving layer receives the successful information of feedback of the switching layer, a piece of news under random start transmission.
With reference in a first aspect, of the invention in the 4th kind of implementation of first aspect, the receiving layer receives described
After the successful information of feedback of switching layer, a piece of news under random start transmission, including:
The transmission of the message is carried out one by one in the form of queue.
With reference in a first aspect, of the invention in the 5th kind of implementation of first aspect, the switching layer is to the message
The routing layer is passed to after carrying out unified form conversion, including:
The switching layer carries out passing to after the message conversion of unified form described to the message according to UMT standard criterions
Routing layer.
With reference in a first aspect, of the invention in the 6th kind of implementation of first aspect, the routing layer runs on work
Thread, the message received is pushed to the consumption layer for running on UI threads, including:
The routing layer stores the message received into database, and generates a unique query handler;
The routing layer seals the query handler into message informing, is sent at random after the message informing is activated
Broadcast, the broadcast will carry the query handler and sends, and waits the consumption layer to receive and broadcasts and read in broadcast
Query handler;
The consumption layer reads after the query handler message according to corresponding to the query handler enters data base querying
Data, acted according to the message data establishment and be intended to carry out page layout switch or message display.
The second aspect of the present invention, disclose the device that a kind of stratification state machine realizes message push, the stratification state
Machine includes receiving layer, switching layer, routing layer and consumption layer, applied to android terminal, including:
First receiving module, the message respectively from different platform sent for the receiving layer the reception server;
First Switching Module, for the receiving layer by the message received and the switching layer respectively with two not
Same thread is run on the message transmission in same process to the switching layer;
First modular converter, the route is passed to after carrying out unified form conversion to the message for the switching layer
Layer;
First pushing module, worker thread is run on for the routing layer, the message received is pushed to fortune
Row is in the consumption layer of UI threads.
With reference to second aspect, the present invention is in the first implementation of second aspect, first pushing module, bag
Include:
First memory module, the message received is stored into database for the routing layer, and generate one
Individual unique query handler;
First package module, the query handler is sealed into message informing for the routing layer, treats that the message is led to
Know that random send is broadcasted after being activated, the broadcast will carry the query handler and send, and wait the consumption layer to receive
Broadcast and read the query handler in broadcast;
First enquiry module, for entering data according to the query handler after the consumption layer reading query handler
Message data corresponding to library inquiry, acted according to the message data establishment and be intended to carry out page layout switch or message display.
The third aspect of the present invention, disclose a kind of electronic equipment, including processor and memory:
The memory is used to store the program performed described in any of the above-described method,
The processor is configurable for performing the program stored in the memory.
The technical scheme provided in the embodiment of the present application, has at least the following technical effects or advantages:
The invention discloses the method and apparatus that a kind of stratification state machine realizes message push, the stratification state machine includes
Receiving layer, switching layer, routing layer and consumption layer, first, the receiving layer the reception server send respectively from different platform
Message;Secondly, the receiving layer runs the message received from the switching layer with two different threads respectively
The message transmission is given to the switching layer in same process;Then, the switching layer carries out unified form to the message
The routing layer is passed to after conversion;Finally, the routing layer runs on worker thread, and the message received is pushed to
The consumption layer of UI threads is run on, so final third-party platform is realized by the reception of message, data exchange, conversion
Message push, each link do not interfere with each other, and the transmission of message can also can be carried out offline online, and compatible a variety of push are flat
Platform, when one of which push platform is in malfunction, it can switch to other available platforms.Thus solve in the prior art
Various third party's message push platforms are incompatible, cause message to be sent to the low technical problem of rate, have reached compatible and a variety of pushed away
Platform is sent, and then improves the technique effect of message push success rate.
Brief description of the drawings
Fig. 1 shows the flow chart of method according to an embodiment of the invention;
Fig. 2 shows the structure chart of an apparatus in accordance with one embodiment of the invention;
Fig. 3 shows the structure chart of device in accordance with another embodiment of the present invention.
Embodiment
The present invention provides the method and apparatus method and apparatus that a kind of stratification state machine realizes message push, existing to solve
Various third party's message push platform in technology is incompatible, causes message to be sent to the low technical problem of rate, has reached simultaneous
Hold a variety of push platforms, and then improve the technical problem of message push success rate.
In order to be better understood from above-mentioned technical proposal, below by accompanying drawing and specific embodiment to technical solution of the present invention
It is described in detail, it should be understood that the specific features in the embodiment of the present invention and embodiment are to the detailed of technical solution of the present invention
Thin explanation, rather than the restriction to technical solution of the present invention, in the case where not conflicting, the embodiment of the present invention and embodiment
In technical characteristic can be mutually combined.
It refer to shown in Fig. 1, the present embodiment provides a kind of method that stratification state machine realizes message push, the layering shape
State machine includes receiving layer, switching layer, routing layer and consumption layer, and applied to android terminal, specific method comprises the following steps:
The message respectively from different platform that S1, the receiving layer the reception server are sent.
In specific implementation process, receiving layer (Receiver) operates in background process (Background Process)
In, essence is a background service (Background Service), establishes and communicates to connect with message server, is responsible for receiving clothes
The various message that business device issues.
S2, the receiving layer run on the message received from the switching layer with two different threads respectively
The message transmission is given to the switching layer in same process.
In specific implementation process, switching layer (Switcher) is operated in background process, and essence is intended to after one
Service (Intent Service), be responsible for the various message passed over by receiving layer.Receiving layer runs on same with switching layer
In process, to prevent from being in same thread, once thread is killed, subsequent operation is terminated, and the two is separately operable in two
In different threads, so the compatible integrated multiple push platforms of the frame system of the present invention, multi-platform not interfere with each other, and mutually
Make up, even if single platform breaks down, the push that other platforms continue message can be switched to immediately.
S3, the switching layer pass to the routing layer after unified form conversion is carried out to the message.
In specific implementation process, various message that switching layer (Switcher) passes over receiving layer, according to system
One message specification form (Uniform Message Type, UMT) carries out format conversion processing to the message of all platforms.
S4, the routing layer run on worker thread, and the message received is pushed to the institute for running on UI threads
State consumption layer method.
In specific implementation process, routing layer (Router) and consumption layer (Consumer) are all located in host process, no
Same is that routing layer operates in worker thread (WorkThread), and consumes layer and run on UI threads (UI Thread/Main
Thread in).Wherein, routing layer (Router) essence is a background service (Background Service), is responsible for message
Local persistence (storage), the dissection process of message and the batch processing of message.Before consumption layer (Consumer) essence is
Platform service (Foreground Service), it is message final destination, is responsible for message and reads and carry out intention processing (Intent
Handle)。
In the present invention, whole message push layered shaping framework is divided into 4 layers:Receiving layer, switching layer, routing layer, consumption layer.
Each level follows in the flow for transmitting message in whole framework:Server → receiving layer → switching layer → routing layer → consumption
Layer.Each level division of labor is detailed, and without the degree of coupling, even if some level goes wrong, but not influences follow-up level and offset breath
Processing, and then improve the success rate that message issues.
As an alternative embodiment, in step S1) the receiving layer the reception server send respectively from not
Before the message of platform, in addition to:
The receiving layer establishes long connection communication with the server.
In specific implementation process, long connection (Persistent Connection) refers to can connect in a connection
Supervention send multiple packets, during holding is connected, if sent without packet, it is necessary to which both sides send out link detecting bag, with this
Avoid exchanging, and improve data transmission efficiency.
As an alternative embodiment, step S1) the receiving layer the reception server send respectively from difference
The message of platform, including:
When the long connection communication of the server and the receiving layer is in connection status, the message is directly by described
Server is transferred to the receiving layer by socket communication mechanisms;
When the long connection communication of the server and the receiving layer is off, the message is by the service
Device is forwarded to system message and receives service on behalf of trustship, and after process where the receiving layer is activated, system service is again by institute
State message and be transmitted to the receiving layer.
In specific implementation process, when the server establishes long connection communication with the receiving layer, under server
Hair message to receiving layer is divided into 2 kinds of situations:A kind of is that the long connection of server and receiving layer is in connection status, and now message is straight
Connect and receiving layer is transferred to by socket communication mechanisms by server;Another kind is that server and the long of receiving layer are connected in disconnected
Open state, now message system message is forwarded to by server and receives service on behalf of trustship, process where layer to be received is activated
Afterwards, system service forwards messages to receiving layer again.So, the transmission of each message is not interfere with each other, the transmission of each message
It is independent progress, the transmission of a message does not interfere with another message.
As an alternative embodiment, step S2) receiving layer exchanges the message received with described
Layer is run on the message transmission in same process to the switching layer with two different threads respectively, including:
The message received is wrapped in service intention by step S21, described receiving layer, will be intended to when starting service
Pass to the switching layer;
Step S22, transmission is broadcast to the receiving layer after described switching layer receives the intention, whether feeds back the message
Exchange successful information;
Step S23, after the successful information of feedback that described receiving layer receives the switching layer, random start transmits next
Bar message.
In specific implementation process, receiving layer and switching layer essence are all service, to realize the data exchange between the two,
This programme it is used start service mode come realize service between communication, message data be wrapped in service be intended in, start service
When by be intended to pass in switching layer, can send one after switching layer receives the intention of receiving layer transmission is broadcast to receiving layer,
For receiving layer after the feedback successful information of switching layer is received, random start issues lower a piece of news.
As an alternative embodiment, step S23) receiving layer feedback that receives the switching layer is successful
After information, a piece of news under random start transmission, including:
The transmission of the message is carried out one by one in the form of queue.
In specific implementation process, issuing for message is transmitted one by one in the form of queue, prevents from hindering caused by message is excessive
Plug problem.
As an alternative embodiment, step S3) after the switching layer carries out unified form conversion to the message
The routing layer is passed to, including:
The switching layer carries out passing to after the message conversion of unified form described to the message according to UMT standard criterions
Routing layer.
In specific implementation process, switching layer turns in the notice form that posts messages to routing layer and can carry out message
Change, the message of different platform routes to switching layer same, any pretreatment is not done early stage, for ease of the local of follow-up routing layer
Message duration and the intention processing for consuming layer, all formats that switching layer carries out all platforms according to UMT standard criterions disappear
Breath formats message of the processing for unified form, and the principle of UMT standard criterions is by the message field information of XML or JSON forms
Parsed using the mode of note, by taking message Id as an example, the character that field is explained in@brackets represents the original word of push platform
Name section, met {@(mId) ,@(msgId) ,@(id) ,@(mId) ,@(messId) } according to the above-mentioned every field name of 3-1 tables
In any one, the field Uniform Name after parsing is msg_Id, and other message field principles are similar.
The multi-platform message id fields of table 3-1 are explained
Friendly alliance | Millet | Huawei | Meizu | It is individual to push away | |
Field is explained | @(mId) | @(msgId) | @(id) | @(msgId) | @(messId) |
Parse field | msg_Id | msg_Id | msg_Id | msg_Id | msg_Id |
As an alternative embodiment, step S4) routing layer runs on worker thread, described in receiving
Message is pushed to the consumption layer for running on UI threads, including:
S41, the routing layer store the message received into database, and generate a unique inquiry sentence
Handle;
In specific implementation process, the message received is initially stored in database and realized locally by routing layer
Persistence:Such as the message for issuing server is stored into local data base with JSON forms, prevents message in transmittance process
It is middle to lose and mess code occur.And message takes local persistence before UI threads are entered, and prevents the communication of cross-thread from causing to disappear
Breath is lost, and improves message and is sent to rate.
S42, the routing layer seal the query handler into message informing, random after the message informing is activated
Broadcast is sent, the broadcast will carry the query handler and send, and waits the consumption layer to receive and broadcasts and read broadcast
In query handler.
, can be by one unique inquiry sentence of generation after routing layer completion message is locally stored in specific implementation process
Handle, then the handle is sealed into notice when creating message informing, send a broadcast with chance after notice is clicked, extensively
Query handler will be carried by, which broadcasting, sends, and waits layer to be consumed to receive to broadcast and read the query handler in broadcast.
After S43, the consumption layer reading query handler according to corresponding to the query handler enters data base querying
Message data, acted according to the message data establishment and be intended to carry out page layout switch or message display.
In specific implementation process, consumption layer can enter data base querying pair after reading query handler according to query handler
Message data is answered, is then acted according to message data establishment and is intended to (Intent) progress page layout switch or message display.Consume
Layer can do intention processing:Intention mark according to being included in message carries out application program app business processings, including:Page layout switch,
Message display etc..
It is emphasized that above method step not necessarily performs according to number order, why it is intended merely to numbering
The convenience of statement, as long as the purpose of the present invention can be realized, changing in any step should all be protected in the claim of the present invention
In the range of.
It refer to shown in Fig. 2, the embodiment of the present invention also provides the device that a kind of stratification state machine realizes message push, described
Stratification state machine includes receiving layer, switching layer, routing layer and consumption layer, applied to android terminal, including:
First receiving module 21, the message respectively from different platform sent for the receiving layer the reception server;
First Switching Module 22, for the receiving layer by the message received and the switching layer respectively with two
Different threads is run on the message transmission in same process to the switching layer;
First modular converter 23, the road is passed to after carrying out unified form conversion to the message for the switching layer
By layer;
First pushing module 24, worker thread is run on for the routing layer, the message received is pushed to
Run on the consumption layer of UI threads.
As shown in figure 3, as an alternative embodiment, first pushing module, further comprises:
First memory module 241, the message received is stored into database for the routing layer, and generated
One unique query handler;
First package module 242, the query handler is sealed into message informing for the routing layer, treats the message
Notice is random after being activated to send broadcast, and the broadcast will carry the query handler and send, and wait the consumption layer to connect
Receive broadcast and read the query handler in broadcast;
First enquiry module 243, for being entered after the consumption layer reading query handler according to the query handler
Message data corresponding to data base querying, acted according to the message data establishment and be intended to carry out page layout switch or message display.
The embodiment of the present invention additionally provides a kind of electronic equipment, including processor and memory:
The memory is used to store the program performed described in any of the above-described method;
The processor is configurable for performing the program stored in the memory.
It should be noted that the concrete methods of realizing of function may refer to method corresponding to above-mentioned modules and module
The specific descriptions of embodiment, do not repeating here.
In above-mentioned module and system embodiment, included modules or module are simply divided according to function logic
, but above-mentioned division is not limited to, as long as corresponding function can be realized;In addition, the specific name of each functional module
Claim also only to facilitate mutually distinguishing, the protection domain being not intended to limit the invention.
The technical scheme provided in the embodiment of the present application, has at least the following technical effects or advantages:
The invention discloses the method and apparatus that a kind of stratification state machine realizes message push, the stratification state machine includes
Receiving layer, switching layer, routing layer and consumption layer, first, the receiving layer the reception server send respectively from different platform
Message;Secondly, the receiving layer runs the message received from the switching layer with two different threads respectively
The message transmission is given to the switching layer in same process;Then, the switching layer carries out unified form to the message
The routing layer is passed to after conversion;Finally, the routing layer runs on worker thread, and the message received is pushed to
The consumption layer of UI threads is run on, so final third-party platform is realized by the reception of message, data exchange, conversion
Message push, each link do not interfere with each other, and the transmission of message can also can be carried out offline online, and compatible a variety of push are flat
Platform, when one of which push platform is in malfunction, it can switch to other available platforms.Thus solve in the prior art
Various third party's message push platforms are incompatible, cause message to be sent to the low technical problem of rate, have reached compatible and a variety of pushed away
Platform is sent, and then improves the technique effect of message push success rate.
It will be understood by those skilled in the art that in method provided in an embodiment of the present invention, its all or part of step is can
To be completed by the related hardware of programmed instruction.For example journey can be run by computer to complete.The program can store
In read/write memory medium, for example, random access memory, disk, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.
Claims (10)
1. a kind of method that stratification state machine realizes message push, it is characterised in that the stratification state machine includes receiving layer, handed over
Layer, routing layer and consumption layer are changed, applied to android terminal, including:
The message respectively from different platform that the receiving layer the reception server is sent;
The receiving layer by the message received and the switching layer respectively with two different threads run on it is same enter
The message transmission is given to the switching layer in journey;
The switching layer passes to the routing layer after unified form conversion is carried out to the message;
The routing layer runs on worker thread, and the message received is pushed to the consumption for running on UI threads
Layer.
2. the method as described in claim 1, it is characterised in that in receiving layer the reception server transmission respectively from not
Before the message of platform, in addition to:
The receiving layer establishes long connection communication with the server.
3. method as claimed in claim 2, it is characterised in that the receiving layer the reception server send respectively from difference
The message of platform, including:
When the long connection communication of the server and the receiving layer is in connection status, the message is directly by the service
Device is transferred to the receiving layer by socket communication mechanisms;
When the long connection communication of the server and the receiving layer is off, the message is turned by the server
It is sent to system message and receives service on behalf of trustship, after process where the receiving layer is activated, system service disappears described again
Breath is transmitted to the receiving layer.
4. the method as described in claim 1, it is characterised in that the receiving layer exchanges the message received with described
Layer is run on the message transmission in same process to the switching layer with two different threads respectively, including:
The message received is wrapped in service intention by the receiving layer, will be intended to pass to the friendship when starting service
Change layer;
Transmission is broadcast to the receiving layer after the switching layer receives the intention, feeds back whether the message exchanges successful letter
Breath;
After the receiving layer receives the successful information of feedback of the switching layer, a piece of news under random start transmission.
5. the method as described in claim 1, it is characterised in that the feedback that the receiving layer receives the switching layer is successful
After information, a piece of news under random start transmission, including:
The transmission of the message is carried out one by one in the form of queue.
6. the method as described in claim 1, it is characterised in that after the switching layer carries out unified form conversion to the message
The routing layer is passed to, including:
The switching layer passes to the route after carrying out the message conversion of unified form according to UMT standard criterions to the message
Layer.
7. the method as described in claim 1, it is characterised in that the routing layer runs on worker thread, the institute that will be received
State message and be pushed to the consumption layer for running on UI threads, including:
The routing layer stores the message received into database, and generates a unique query handler;
The routing layer seals the query handler into message informing, random after the message informing is activated to send extensively
Broadcast, the broadcast will carry the query handler and send, and waits the consumption layer to receive and broadcasts and read looking into broadcast
Ask handle;
The consumption layer reads after the query handler message data according to corresponding to the query handler enters data base querying,
Acted according to the message data establishment and be intended to carry out page layout switch or message display.
8. a kind of stratification state machine realizes the device of message push, it is characterised in that the stratification state machine includes receiving layer, handed over
Layer, routing layer and consumption layer are changed, applied to android terminal, including:
First receiving module, the message respectively from different platform sent for the receiving layer the reception server;
First Switching Module, it is for the receiving layer that the message received and the switching layer is different with two respectively
Thread is run on the message transmission in same process to the switching layer;
First modular converter, the routing layer is passed to after carrying out unified form conversion to the message for the switching layer;
First pushing module, worker thread is run on for the routing layer, the message received is pushed to and run on
The consumption layer of UI threads.
9. device as claimed in claim 8, it is characterised in that first pushing module, including:
First memory module, the message received is stored into database for the routing layer, and generate one only
One query handler;
First package module, the query handler is sealed into message informing for the routing layer, treats the message informing quilt
Random after activation to send broadcast, the broadcast will carry the query handler and send, and wait the consumption layer to receive broadcast
And read the query handler in broadcast;
First enquiry module, for being looked into after the consumption layer reading query handler according to the query handler into database
Message data corresponding to inquiry, acted according to the message data establishment and be intended to carry out page layout switch or message display.
10. a kind of electronic equipment, it is characterised in that including processor and memory:
The memory is used for the program for storing any one of perform claim requirement 1 to 7 methods described,
The processor is configurable for performing the program stored in the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710930050.3A CN107741884B (en) | 2017-10-09 | 2017-10-09 | Method and device for realizing message pushing by hierarchical state machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710930050.3A CN107741884B (en) | 2017-10-09 | 2017-10-09 | Method and device for realizing message pushing by hierarchical state machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107741884A true CN107741884A (en) | 2018-02-27 |
CN107741884B CN107741884B (en) | 2020-10-27 |
Family
ID=61236739
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710930050.3A Active CN107741884B (en) | 2017-10-09 | 2017-10-09 | Method and device for realizing message pushing by hierarchical state machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107741884B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108401027A (en) * | 2018-02-27 | 2018-08-14 | 魏会风 | A kind of intelligent transportation software system for unified management based on cloud computing |
CN108964971A (en) * | 2018-05-23 | 2018-12-07 | 国政通科技股份有限公司 | A kind of data interchange platform |
CN110233883A (en) * | 2019-05-24 | 2019-09-13 | 中国平安人寿保险股份有限公司 | Processing method, device, server and the storage medium of PUSH message |
CN110297707A (en) * | 2018-03-22 | 2019-10-01 | 香港乐蜜有限公司 | A kind of method for message transmission and device |
CN115412523A (en) * | 2021-05-28 | 2022-11-29 | 阿里巴巴新加坡控股有限公司 | Message processing method and device |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101075201A (en) * | 2007-06-26 | 2007-11-21 | 北京邮电大学 | Method for realizing unified universal message bus between different assembly process |
WO2008039430A2 (en) * | 2006-09-26 | 2008-04-03 | Nextel Communications, Inc. | Client-based solution for seamless access to applications across networks |
US8244822B1 (en) * | 2011-06-14 | 2012-08-14 | Urban Airship, Inc. | Push notification delivery system |
US8634810B2 (en) * | 2011-09-29 | 2014-01-21 | International Business Machines Corporation | Pushing secure notifications to mobile computing devices |
CN103731802A (en) * | 2012-10-12 | 2014-04-16 | 上海宝信软件股份有限公司 | Device management method based on Android mobile terminal |
CN103778228A (en) * | 2014-01-24 | 2014-05-07 | 五八同城信息技术有限公司 | Method for realizing directional promotion of resume information by utilizing instant messaging system |
CN103856392A (en) * | 2013-06-26 | 2014-06-11 | 携程计算机技术(上海)有限公司 | Message push method, outgoing server using message push method and outgoing server system |
CN103973718A (en) * | 2013-01-25 | 2014-08-06 | 成都勤智数码科技股份有限公司 | Operation and maintenance message pushing method based on android mobile platform |
CN104753769A (en) * | 2015-03-24 | 2015-07-01 | 新余兴邦信息产业有限公司 | Method and device for issuing messages by message queue |
CN105005201A (en) * | 2015-06-04 | 2015-10-28 | 广东康宝电器股份有限公司 | Multi-mobile-terminal data synchronization and push system for intelligent household |
CN105246054A (en) * | 2015-08-27 | 2016-01-13 | 武汉诚迈科技有限公司 | Message push method suitable for android smart phone |
CN105978795A (en) * | 2016-06-22 | 2016-09-28 | 安徽广行物联科技有限公司 | Mobile message double-platform, multi-terminal and multi-application pushing method |
CN106203075A (en) * | 2016-07-19 | 2016-12-07 | 北京珠穆朗玛移动通信有限公司 | A kind of method and device preventing application program from waking up up mutually |
CN107193674A (en) * | 2017-06-29 | 2017-09-22 | 武汉斗鱼网络科技有限公司 | The processing method and processing device of online PUSH message |
-
2017
- 2017-10-09 CN CN201710930050.3A patent/CN107741884B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008039430A2 (en) * | 2006-09-26 | 2008-04-03 | Nextel Communications, Inc. | Client-based solution for seamless access to applications across networks |
CN101075201A (en) * | 2007-06-26 | 2007-11-21 | 北京邮电大学 | Method for realizing unified universal message bus between different assembly process |
US8244822B1 (en) * | 2011-06-14 | 2012-08-14 | Urban Airship, Inc. | Push notification delivery system |
US8634810B2 (en) * | 2011-09-29 | 2014-01-21 | International Business Machines Corporation | Pushing secure notifications to mobile computing devices |
CN103731802A (en) * | 2012-10-12 | 2014-04-16 | 上海宝信软件股份有限公司 | Device management method based on Android mobile terminal |
CN103973718A (en) * | 2013-01-25 | 2014-08-06 | 成都勤智数码科技股份有限公司 | Operation and maintenance message pushing method based on android mobile platform |
CN103856392A (en) * | 2013-06-26 | 2014-06-11 | 携程计算机技术(上海)有限公司 | Message push method, outgoing server using message push method and outgoing server system |
CN103778228A (en) * | 2014-01-24 | 2014-05-07 | 五八同城信息技术有限公司 | Method for realizing directional promotion of resume information by utilizing instant messaging system |
CN104753769A (en) * | 2015-03-24 | 2015-07-01 | 新余兴邦信息产业有限公司 | Method and device for issuing messages by message queue |
CN105005201A (en) * | 2015-06-04 | 2015-10-28 | 广东康宝电器股份有限公司 | Multi-mobile-terminal data synchronization and push system for intelligent household |
CN105246054A (en) * | 2015-08-27 | 2016-01-13 | 武汉诚迈科技有限公司 | Message push method suitable for android smart phone |
CN105978795A (en) * | 2016-06-22 | 2016-09-28 | 安徽广行物联科技有限公司 | Mobile message double-platform, multi-terminal and multi-application pushing method |
CN106203075A (en) * | 2016-07-19 | 2016-12-07 | 北京珠穆朗玛移动通信有限公司 | A kind of method and device preventing application program from waking up up mutually |
CN107193674A (en) * | 2017-06-29 | 2017-09-22 | 武汉斗鱼网络科技有限公司 | The processing method and processing device of online PUSH message |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108401027A (en) * | 2018-02-27 | 2018-08-14 | 魏会风 | A kind of intelligent transportation software system for unified management based on cloud computing |
CN108401027B (en) * | 2018-02-27 | 2019-12-06 | 广州市艾发信息技术有限公司 | Intelligent transportation software unified management system based on cloud computing |
CN110297707A (en) * | 2018-03-22 | 2019-10-01 | 香港乐蜜有限公司 | A kind of method for message transmission and device |
CN108964971A (en) * | 2018-05-23 | 2018-12-07 | 国政通科技股份有限公司 | A kind of data interchange platform |
CN110233883A (en) * | 2019-05-24 | 2019-09-13 | 中国平安人寿保险股份有限公司 | Processing method, device, server and the storage medium of PUSH message |
CN115412523A (en) * | 2021-05-28 | 2022-11-29 | 阿里巴巴新加坡控股有限公司 | Message processing method and device |
CN115412523B (en) * | 2021-05-28 | 2024-02-06 | 阿里巴巴新加坡控股有限公司 | Message processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107741884B (en) | 2020-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107741884A (en) | The method and apparatus that a kind of stratification state machine realizes message push | |
EP2888858B1 (en) | Method and apparatus of generalized network controller for a software defined network (sdn) | |
CN100471162C (en) | Method for releasing and processing virtual circuit information and supplier edge device | |
CN101232444B (en) | Apparatus and method for solving hash collision and exchange equipment with the same | |
CN102647355A (en) | LACP (Link Aggregation Control Protocol) consultation processing method, relay node and system | |
CN102006245B (en) | Date exchanging and sharing platform | |
CN106209559B (en) | A kind of method and apparatus for establishing Multicast Tunnel | |
CN101222437B (en) | Method and system for transparent transmission of BPDU packet in two-layer switching network | |
CN101924701A (en) | Building method of multicast forwarding path and route equipment | |
CN110022366A (en) | Multichannel multi-protocols switching method, system, storage medium, cloud platform based on cloud platform | |
CN102299862B (en) | Quick forwarding equipment and method for two-layer tunnel | |
CN102752230A (en) | Method and system for sharing subscriber relationship chain | |
CN102025632B (en) | Label distribution method and system for data packets in MPLS network | |
CN106162313A (en) | A kind of multi-screen interaction method and system | |
CN102571615B (en) | Quality of service (QOS) strategy realizing method based on Ethernet over coax (EOC) terminal | |
CN102629345B (en) | Chain type links up collaboration method, Apparatus and system | |
CN101626348B (en) | System and method for realizing service support of enterprise convergence communication | |
CN108052401A (en) | System property monitor method, terminal device and computer readable storage medium | |
CN102523152A (en) | Method and device for realizing outlet control | |
CN103222230B (en) | Multicast duplicating method, Apparatus and system | |
CN107450999A (en) | A kind of method and system of cluster inter-component communication | |
CN102082782B (en) | Method and relevant equipment for introducing external route to OSPF (Open Shortest Path First Interior Gateway Protocol) network | |
CN105871917A (en) | Transmission control protocol TCP connection scheduling method and device | |
CN103338229B (en) | The exchange method of remote terminal unit and data transmission unit and system | |
CN102769540B (en) | A kind of overall label management method and equipment |
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 |