CN108449256A - Processing method, device, computer equipment and the storage medium of message push - Google Patents
Processing method, device, computer equipment and the storage medium of message push Download PDFInfo
- Publication number
- CN108449256A CN108449256A CN201810138045.3A CN201810138045A CN108449256A CN 108449256 A CN108449256 A CN 108449256A CN 201810138045 A CN201810138045 A CN 201810138045A CN 108449256 A CN108449256 A CN 108449256A
- Authority
- CN
- China
- Prior art keywords
- push
- message
- device identification
- unique mark
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/214—Monitoring or handling of messages using selective forwarding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/23—Reliability checks, e.g. acknowledgments or fault reporting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/234—Monitoring or handling of messages for tracking messages
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention is suitable for field of communication technology, provides a kind of processing method of message push, the treating method comprises:When initiating message push, acquisition waits for the message body of PUSH message, the device identification of push side, the device identification of recipient;The corresponding unique mark of PUSH message is waited for described in generation;The push interface that the unique mark, message body, the device identification of push side, the device identification of recipient are provided as interface parameters incoming message supplying system, so that the message push system inquires the corresponding grouping of device identification of the push side according to the unique mark and executes push operation according to query result.The present invention leaks the processing logic between hair and repeating transmission by the unique mark come co-ordination message, so that push side need to only pay close attention to the initiation logic of message push and generate unique mark, and whether pushes and finally completed according to the query result of caching by message push system, not only the problem of having ensure that the case where not leaking hair, but also having controlled repeating transmission.
Description
Technical field
The invention belongs to field of communication technology more particularly to a kind of processing method of message push, device, computer equipments
And storage medium.
Background technology
In message push system, the chat either in notice push, short message push, or social class application program disappears
Breath, the interior push believed of standing, the problem of all encountering message leakage hair and retransmit.Message leakage hair and message retransmission are to a certain extent
Conflicting, for example be asynchronous since recipient receives message when removing to solve the problems, such as leakage hair using failure retransfer mechanism
, it is susceptible to that recipient has been received by message and push side thinks that message sends the phenomenon that unsuccessfully requiring to retransmit, so as to cause
Recipient repeatedly receives same message, reduces the experience sense of user.As it can be seen that the prior art is in the monitoring of leakage hair and retransmits startup
Between there are larger contradiction, retransmit and the coordination logic of leakage hair be not good enough, the message for be easy to causeing waste, the push of Internet resources is lost
The phenomenon that losing or receiving repeatedly.
Invention content
An embodiment of the present invention provides a kind of message push processing method, device, computer equipment and storage medium, with
Solve the problems, such as that the coordination logic for retransmitting and leaking hair in the prior art is not good enough.
In a first aspect, an embodiment of the present invention provides a kind of processing method of message push, the treating method comprises:
Initiate message push when, obtain wait for the message body of PUSH message, the device identification of push side, recipient equipment
Mark;
The corresponding unique mark of PUSH message is waited for described in generation;
The unique mark, message body, the device identification of push side, the device identification of recipient are passed as interface parameters
Enter the push interface of message push system offer, so that the message push system inquires the push according to the unique mark
The corresponding grouping of device identification of side simultaneously executes push operation according to query result.
Further, wait for that the corresponding unique mark of PUSH message includes described in the generation:
36 random number strings are generated using random number algorithm, and reject 4 separators in 36 random number strings, are obtained
To 32 random number strings;
14 timestamps are generated according to current temporal information;
The timestamp is added to 32 random number strings end, 46 random number strings is obtained, is waited for as described
The unique mark of PUSH message.
Further, the processing method further includes:
According to prefixed time interval from message push system described in the push interface polls to the PUSH message of waiting for
Handling result;
If it is default result not inquire handling result or the handling result inquired in the prefixed time interval not
When code, the unique mark, message body, the device identification of push side, the device identification of recipient are passed to the push interface,
Initiated again to the push for waiting for PUSH message.
Second aspect, an embodiment of the present invention provides a kind of processing methods of message push, the treating method comprises:
The interface parameters that push side is passed to by push interface is obtained, the interface parameters includes wait for PUSH message unique
Mark, message body, the device identification of push side, the device identification of recipient;
The corresponding grouping of device identification of the push side is inquired in preset buffer memory according to the unique mark;
If terminating at push there are the identical unique mark in the corresponding grouping of the device identification of the push side
Manage flow;
If the identical unique mark is not present in the corresponding grouping of the device identification of the push side, according to
Wait for that the message body of PUSH message, the device identification of push side and the device identification of recipient execute push operation.
Further, in the equipment for waiting for the message body of PUSH message, the device identification of push side and recipient according to
After mark executes push operation, it the treating method comprises:
If push operation runs succeeded, the unique mark is added to corresponding point of the device identification of the push side
In group.
Further, before obtaining push side's interface parameters incoming by pushing interface, the processing method is also wrapped
It includes:
The configuring request that push side is sent is obtained, the configuring request includes the device identification of push side;
The corresponding grouping of device identification of the push side is created in preset buffer memory, the grouping is for storing described push away
The unique mark of the device identification for the side of sending and its corresponding PUSH message.
The third aspect, an embodiment of the present invention provides a kind of processing unit of message push, the processing unit includes:
Acquisition module, for when initiating message push, obtaining the equipment mark of the message body, push side of waiting for PUSH message
Know, the device identification of recipient;
Generation module described waits for the corresponding unique mark of PUSH message for generating;
Push request module, for by the unique mark, message body, the device identification of push side, recipient equipment
The push interface that is there is provided as interface parameters incoming message supplying system is provided so that the message push system according to only
One mark inquires the corresponding grouping of device identification of the push side and executes push operation according to query result.
Fourth aspect, an embodiment of the present invention provides a kind of processing unit of message push, the processing unit includes:
Parameter acquisition module, the interface parameters incoming by pushing interface for obtaining push side, the interface parameters packet
Include the unique mark for waiting for PUSH message, message body, the device identification of push side, the device identification of recipient;
Identify enquiry module, the device identification for inquiring the push side in preset buffer memory according to the unique mark
Corresponding grouping;
Processing module is pushed, if there are identical described unique in the corresponding grouping of device identification for the push side
Mark then terminates to push process flow;Otherwise, according to the message body for waiting for PUSH message, push side device identification and connect
The device identification of debit executes push operation.
5th aspect an embodiment of the present invention provides a kind of computer equipment, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
The step of realizing the processing method of message push as described above.
6th aspect, an embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, the computer program to realize the processing of message push as described above when being executed by processor
The step of method.
Compared with prior art, the embodiment of the present invention waits for the unique mark of PUSH message by adding, and is pushed away initiating message
When sending, by push side generate described in wait for the unique mark of PUSH message, by the unique mark, message body, push side equipment
The device identification of mark, recipient is passed to the push interface that supplying system provides as interface parameters, so that the supplying system
The corresponding grouping of device identification of the push side is inquired according to the unique mark and push operation is executed according to query result;
To which the processing logic between hair and repeating transmission is leaked come co-ordination message by the unique mark so that push side only need to pay close attention to message
Whether the initiation logic and generation unique mark of push, simplify processing mode of the push side when initiating message push, and push away
It send and is finally completed according to the query result of caching by message push system, not only ensure that the case where not leaking hair, but also control repeating transmission
The problem of, it efficiently solves the problems, such as information drop-out or receives repeatedly, reduce the waste of Internet resources.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention
Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the first implementation flow chart of the processing method of message push provided in an embodiment of the present invention;
Fig. 2 is the second implementation flow chart of the processing method of message push provided in an embodiment of the present invention;
Fig. 3 is the third implementation flow chart of the processing method of message push provided in an embodiment of the present invention;
Fig. 4 is the 4th implementation flow chart of the processing method of message push provided in an embodiment of the present invention;
Fig. 5 is the 5th implementation flow chart of the processing method of message push provided in an embodiment of the present invention;
Fig. 6 is the first composite structural diagram of the processing unit of message push provided in an embodiment of the present invention;
Fig. 7 is the second composite structural diagram of the processing unit of message push provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
The processing method of message push provided in an embodiment of the present invention is applied to call equipment and message push system.Its
In, the background server for calling equipment as the application program on mobile terminal can both pass through as the push side of message
The push interface that message push system provides is called to initiate message push request, recipient is can also be used as, is pushed from message
PUSH message is received in system.Optionally, the message push includes but not limited to notice push, short message pushes, social class is answered
With the chat messages push in program, interior letter push of standing.
The process flow of equipment side is being called to be described in detail the processing method pushed to message below.
Fig. 1 shows the first implementation flow of the processing method of message push provided in an embodiment of the present invention.The present invention is real
The processing method for applying the message push of example offer is applied to call equipment.Refering to fig. 1, the processing method of the message push
Including:
In step S101, when initiating message push, the equipment mark of the message body, push side of waiting for PUSH message is obtained
Know, the device identification of recipient.
In embodiments of the present invention, message push system provides push interface for calling equipment calls.Illustratively, described
Pushing interface can be:ip:port/admin/msgFacade.When calling push interface to initiate message push, the calling
Method, apparatus acquisition waits for the message body of PUSH message, the device identification of push side, the device identification of recipient.The message body is to disappear
Cease content.
Herein, the device identification is the background server of different application programs on the message push system
Identity coding distinguishes different calling equipment for message push system.Each calls equipment before using the push interface,
It needs to be configured on message push system, its corresponding device identification is set.
In step s 102, the corresponding unique mark of PUSH message is waited for described in generation.
In the embodiment of the present invention, the unique mark for waiting for PUSH message is the different identity coding for waiting for PUSH message,
For message push system, as push side/recipient calling equipment distinguish it is different wait for PUSH message, by as push side
Calling equipment to message carry out for the first time push when generate, with establish do not wait for the conflicting identification code of PUSH message with other.
Each waits for that PUSH message corresponds to a unique mark.
It should be noted that it is described it is different wait for that PUSH message is distinguished according to different business scenarios, same business scenario
Under the push of identical content belong to one and wait for PUSH message.Illustratively, it is pushed by message as the calling device A of push side
" how do you do to the calling equipment B transmissions a piece of news as recipient for system", for the first time push previous existence at corresponding one only
One mark 1;If during push, when message push system push unsuccessfully executes repetition push, " how do you do for this message" still
Corresponding unique mark 1 repeats not regenerating new unique mark when pushing, this is pushed twice belongs to same and wait for PUSH message
Scope.If the calling equipment as push side differs or the same calling equipment as push side is pushed away in different time initiation
It send, then belongs to different and wait for PUSH message, use different unique marks.For example, the calling device A as push side is by disappearing
Breath supplying system sent to the calling equipment B as recipient at 2 points a piece of news " you", one is sent again at 4 points
Message " you", then belong to two it is different wait for PUSH message, use different unique marks.
In step s 103, by the unique mark, message body, the device identification of push side, the device identification of recipient
As the push interface that interface parameters incoming message supplying system provides, so that the message push system is according to unique mark
Know the corresponding grouping of device identification for inquiring the push side and push operation is executed according to query result.
It is generating after the unique mark of PUSH message, is calling equipment to call push interface by way of HTTP, by institute
State unique mark, message body, the device identification of push side, the device identification of recipient are packaged as push request, incoming described to push away
Interface is sent, to initiate push request so that the supplying system executes push operation according to the interface parameters.The message pushes away
Send system after receiving the unique mark, message body, the device identification of push side, the device identification of recipient, according to institute
The corresponding grouping of device identification that unique mark inquires the push side is stated, and determines whether that executing push grasps according to query result
Make.
The embodiment of the present invention waits for the unique mark of PUSH message by adding, when initiating message push, by pushing Fang Sheng
At the unique mark for waiting for PUSH message, the unique mark, message body, the device identification of push side, recipient are set
Standby mark is passed to the push interface that supplying system provides as interface parameters, to initiate push request to message push system, from
And make push side that need to only pay close attention to the initiation logic of message push and generate unique mark, the processing mode of push side is simplified,
And whether push and finally determined according to the query result to unique mark by message push system, it both ensure that the feelings for not leaking hair
Condition, and the problem of control repeating transmission.
Further, on the basis of the first implementation flow of the processing method for the message push that Fig. 1 is provided, this hair is proposed
Second implementation process of the processing method for the message push that bright embodiment provides.
As shown in Fig. 2, being the second implementation process schematic diagram of the processing method of message push provided in an embodiment of the present invention.
The embodiment of the present invention generates Universally Unique Identifier UUID using Java, is then based on Universally Unique Identifier UUID
(Universally Unique Identifier) generates the unique mark.The step S102 waits for that push disappears described in generating
Ceasing corresponding unique mark includes:
In step S1021,36 random number strings are generated using random number algorithm, and reject in 36 random number strings
4 separators, obtain 32 random number strings.
Herein, 36 random number strings are the UUID, i.e. xxxxxxxx-xxxx-xxxx-xxxxxx- of reference format
xxxxxxxxxx(8-4-4-4-12).Wherein each " x " is a hexadecimal number within the scope of 0-9 or a-f.Each
"-" is separator, can pass through executive mode one:
UUID uuid=UUID.randomUUID ();
String str=uuid.toString ();
Or executive mode two:
UUID uuid=UUID.randomUUID ();
System.out.println(uuid.toString().replace("-",""));
Remove 4 separator "-" in 36 random number strings, obtained 32 random number strings, that is, described are general only
One identification code UUID.
Illustratively, it is 2f393d0f-0479-4d8f-9189- according to 36 random number strings that random number algorithm generates
0d1efe160fe5, rejecting the 32 random number strings obtained after 4 separators in 36 random number strings is
2f393d0f04794d8f91890d1efe160fe5。
In step S1022,14 timestamps are generated according to current temporal information.
In embodiments of the present invention, the format of 14 timestamps is yyyymmddhhMMss, and wherein yyyy is indicated
Year, mm indicates that the moon, dd indicate that day, hh indicate that hour, MM expressions point, ss indicate second, such as 20181221120923.
In step S1023, the timestamp is added to 32 random number strings end, obtains 46 random numbers
String, as the unique mark for waiting for PUSH message.
After obtaining 32 random number strings and 14 timestamps, the timestamp is added to 32 random number strings
End obtains the unique mark for waiting for PUSH message to combine 32 random number strings and 14 timestamps.Such as preceding institute
It states, if 32 random number strings are:2f393d0f04794d8f91890d1efe160fe5,14 timestamps are:
20181221120923, then the unique mark combined is:
2f393d0f04794d8f91890d1efe160fe520180121120923。
The embodiment of the present invention uses UUID, ensure that generated unique mark will not repeat, and to it is same when it is aerial
All devices are all unique, ensure that the uniqueness of each identification information for waiting for PUSH message.
Further, on the basis of the implementation process of the processing method for the message push that Fig. 1 or Fig. 2 is provided, this is proposed
The third implementation process of the processing method for the message push that inventive embodiments provide.
As shown in figure 3, being the third implementation process schematic diagram of the processing method of message push provided in an embodiment of the present invention.
Herein, each calls equipment before using the push interface, in addition to its corresponding equipment is arranged on message push system
Mark is outer, and repetition regulative strategy can also further be arranged, and voluntarily agreement waits for that PUSH message repeats push interface for same
The time interval of calling does not receive return in the designated time interval for initiating to have pushed such as or returns to mistake, can perform weight
Polyphony is used, until pushing successfully.By the unique mark, message body, the device identification of push side, the device identification of recipient
It is passed to as interface parameters after the push interface of supplying system offer, the processing method can also include:
In step S104, according to prefixed time interval from message push system described in the push interface polls to described
Wait for the handling result of PUSH message.
Illustratively, it is assumed that it is described that equipment is called voluntarily to arrange to repeat the time interval called to push interface to be 1 minute,
Then from initiating push request, the calling equipment can inquire the push interface every one minute, to obtain the message
Supplying system is to the handling result for waiting for PUSH message.
In step S105, if the handling result for not inquiring handling result in the prefixed time interval or inquiring
When not being default result code, the unique mark, message body, the device identification of push side, the device identification of recipient are passed to
The push interface, initiated again to the push for waiting for PUSH message.
Herein, the embodiment of the present invention pre-sets message and pushes successful result code, such as 0000.If message success
When being pushed to recipient, the message push system can return to the default result code by pushing interface to push side, otherwise
Default result code is not returned or returns to other character strings.Calling equipment as push side in the prefixed time interval not
When inquiring handling result, message push time-out is indicated, or when the handling result that inquires is not default result code, indicate to push away
Send execution mistake, at this point, described call equipment that can initiate the push for waiting for PUSH message to described request, i.e., again will described in only
One mark, message body, the device identification of recipient, the device identification of push side are passed to the push interface, until push successfully,
To solve the problems, such as message leakage hair.Call equipment without being concerned about repeating transmission problem, it is only necessary to which within the designated time, interface does not return
It when returning or returning to failure, re-calls, further simplifies the logic for calling equipment processing leakage question topic.
Optionally, each calls equipment before using the push interface, can also further be arranged to pushing interface weight
The frequency threshold value of polyphony does not receive return in designated time interval such as or returns to the frequency of mistake in the number
In threshold value, it can perform and repeat to call, until pushing successfully;If more than the frequency threshold value, then the push interface is not recalled.
It is the processing method of message push above at the process flow for calling equipment side, the place that will be pushed below to message
Process flow of the reason method in message push system side is described in detail.
Fig. 4 shows the 4th implementation process of the processing method of message push provided in an embodiment of the present invention.The present invention is real
The processing method for applying the message push of example offer is applied to message push system.Refering to Fig. 4, the processing of the message push
Method includes:
In step S401, push side's interface parameters incoming by pushing interface is obtained, the interface parameters includes waiting for
The unique mark of PUSH message, message body, the device identification of push side, the device identification of recipient.
As previously mentioned, the push interface can be:ip:port/admin/msgFacade.Calling as push side
Equipment by calling the push interface, to the push interface be passed to the unique mark, message body, push side equipment mark
Know, the device identification of recipient, message push is initiated to the message push system;Message push system then passes through described push away
Interface is sent to obtain the unique mark for waiting for PUSH message, message body, the device identification of push side, the device identification of recipient.
In step S402, the device identification for inquiring the push side in preset buffer memory according to the unique mark corresponds to
Grouping.
In embodiments of the present invention, each calls equipment corresponding grouping on the message push system, uses
In the device identification of storage push side and its unique mark of corresponding PUSH message.As previously mentioned, each calls equipment
It before calling the push interface as push side, needs to be configured on message push system, its corresponding equipment mark is set
Know.Therefore, before receiving push side's interface parameters incoming by pushing interface, the message push system needs are exchanged
It is configured with equipment, the processing method further includes:
The configuring request that push side is sent is received, the configuring request includes the device identification of push side;
The corresponding grouping of device identification of the push side is created in preset buffer memory.
Herein, according to calling the device identification of equipment to be divided, each calls equipment to correspond to a grouping for grouping.
By grouping, to improve message push system to the data cached efficiency of management, it is also convenient for message push system inquiry
It is data cached, it is described it is data cached include but not limited to call equipment device identification, message unique mark.Optionally, institute
It states preset buffer memory and Redis cachings may be used, memory space is not only saved compared to other databases, but also improve the push and connect
The performance of mouth.
Whenever getting the push request that push side is sent, the message push system calls Redis cachings to Java
The software development kit sdk (Software Development Kit) of offer is combined with the device identification of push side and is waited for that push disappears
The unique mark of breath is inquired as key data cached.Corresponding with the device identification of the push side point is obtained first
Group, then matching described in wait for PUSH message unique mark and grouping in existing unique mark, be to inquire in the grouping
It is no that there are the identical unique marks for waiting for PUSH message.
In step S403, if there are identical unique marks in the corresponding grouping of the device identification of the push side
Know, then terminates to push process flow.
In step s 404, if identical unique mark is not present in the corresponding grouping of the device identification of the push side
Know, then waits for that the message body of PUSH message, the device identification of push side and the device identification of recipient execute push behaviour according to
Make.
In embodiments of the present invention, the unique mark in the corresponding grouping of every device identification for having been written into push side, table
Show that the message that the unique mark is referred to is completed push and has successfully pushed.It, can be with by the inquiry operation of step S402
Wait for whether PUSH message is whether push for the first time or last time push succeed described in confirmation.If in grouping there are it is identical it is described only
One mark, then it represents that the corresponding message of the unique mark has successfully pushed during last time push, then terminates push processing
Flow.If the identical unique mark is not present in grouping, then it represents that the corresponding message of the unique mark is to push for the first time
Or last time push failure, then the device identification of recipient is obtained, the message pushing module for triggering internal system executes push stream
Journey waits for that the message body of PUSH message is sent to the recipient by described.
The embodiment of the present invention is by being that each calling equipment adds corresponding grouping on message push system, for depositing
Store up the unique mark of PUSH message.Before executing push operation, by message push system according to the inquiry to unique mark
As a result determine it is to execute push or terminate flow, to not only ensure that the case where not leaking hair, but also the problem of control repeating transmission, have
It solves the problems, such as information drop-out or receives repeatedly to effect, reduce the waste of Internet resources.
Optionally, a preferable example as the present invention, in the corresponding grouping of each device identification, in addition to storage
Outside the unique mark of device identification and its corresponding PUSH message, a status bar can also be added, the state of message is recorded
Information pushes or retransmits push for the first time to distinguish.Wherein, the status information includes default value and has pushed.At this
In, the default value is initial value of the status information when being grouped establishment, after message successfully pushes, the state letter
Breath is updated to push.
It is inquired in step S402 and whether there is identical unique mark under the corresponding grouping of device identification of the push side
When:If there are identical unique mark, waits for that PUSH message has successfully pushed in last time push process described in expression, then follow the steps
S403;If being default value there is no identical unique mark and status bar, indicates current and wait for that PUSH message is to push for the first time, then
Push operation is executed, step S404 is arrived in circulation;If being default value there are identical unique mark and status bar, indicates current and wait for
PUSH message pushes for n-th, and wherein n is the positive integer not equal to 1, executes and repeats to push, step S404 is arrived in circulation.
Further, on the basis of four implementation process of the processing method for the message push that Fig. 4 is provided, this hair is proposed
5th implementation process of the processing method for the message push that bright embodiment provides.
As shown in figure 5, being the 5th implementation process schematic diagram of the processing method of message push provided in an embodiment of the present invention.
Wait for that the message body of PUSH message, the device identification of push side and the device identification of recipient execution are pushed away according in step S404
After sending operation, it the treating method comprises:
In step S405, if push operation runs succeeded, the unique mark is added to setting for the push side
It is standby to identify in corresponding grouping.
Herein, when push operation runs succeeded, for example the push of the message pushing module feedback of internal system is received
When success status information, the unique mark is written in the corresponding grouping of device identification of the push side, described in update
The corresponding grouped record of device identification of push side;Default result code is generated simultaneously, is returned to push side by the push interface
Return default result code.The embodiment of the present invention is initiated again in push side to having pushed away by preserving the unique mark of PUSH message
It can successfully terminate to push flow when the push of message being sent to ask, to efficiently avoid the reception repeatedly of PUSH message
The problem of, solve the problems, such as that the coordination logic of repeating transmission and leakage hair is not good enough.
It should be understood that in the above-described embodiments, the size of the serial number of each step is not meant that the order of the execution order, it is each to walk
Rapid execution sequence should be determined by its function and internal logic, and the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Embodiment 2
Fig. 6 shows the first composite structural diagram of the processing unit of message push provided in an embodiment of the present invention, in order to just
In explanation, illustrate only and the relevant part of the embodiment of the present invention.
In embodiments of the present invention, the processing unit of the message push is for realizing above-mentioned Fig. 1, Fig. 2 or Fig. 3 embodiment
Described in message push processing method, can be the software unit for being built in computer equipment, hardware cell or soft or hard
The unit that part combines.The computer equipment is the background server of the application program on mobile terminal.Optionally, the message
Push including but not limited to notifies push, short message to push, the chat messages in social class application program push, interior letter of standing pushes.
Refering to Fig. 6, the processing unit of the message push includes:
Acquisition module 61, for when initiating message push, obtaining the equipment mark of the message body, push side of waiting for PUSH message
Know, the device identification of recipient;
Generation module 62 described waits for the corresponding unique mark of PUSH message for generating;
Request module 63 is pushed, for setting the unique mark, message body, the device identification of push side, recipient
The push interface that standby mark is provided as interface parameters incoming message supplying system, so that the message push system is according to
Unique mark inquires the corresponding grouping of device identification of the push side and executes push operation according to query result.
Optionally, the generation module 62 further includes:
First generation unit 621 for generating 36 random number strings using random number algorithm, and rejects described 36 at random
4 separators in number string, obtain 32 random number strings;
Second generation unit 622, the timestamp for generating 14 according to current temporal information;
Adding device 623 obtains 46 random for the timestamp to be added to 32 random number strings end
Number string, as the unique mark for waiting for PUSH message.
Optionally, the processing unit further includes:
Result queries module 64, for according to prefixed time interval from message push system described in the push interface polls
To the handling result for waiting for PUSH message;
The push request module 63 is additionally operable to, if not inquiring handling result or inquiry in the prefixed time interval
When the handling result arrived is not default result code, by the unique mark, message body, the device identification of push side, recipient
Device identification is passed to the push interface, initiated again to the push for waiting for PUSH message.
It should be noted that each module/unit in the embodiment of the present invention can be used to implement above-mentioned Fig. 1, Fig. 2 or Fig. 3
Whole technical solutions in the embodiment of the method, specific work process can refer to pair in preceding method embodiment
Process is answered, details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Fig. 7 shows the second composite structural diagram of the processing unit of message push provided in an embodiment of the present invention, in order to just
In explanation, illustrate only and the relevant part of the embodiment of the present invention.
In embodiments of the present invention, the processing unit of the message push is for realizing institute in above-mentioned Fig. 4 or Fig. 5 embodiments
The processing method for the message push stated, can be the software unit for being built in computer equipment, hardware cell or software and hardware knot
The unit of conjunction.The computer equipment is the corresponding background server of message push system.
Refering to Fig. 7, the processing unit of the message push includes:
Parameter acquisition module 71, the interface parameters incoming by pushing interface for obtaining push side, the interface parameters
Including waiting for the unique mark of PUSH message, message body, the device identification of push side, the device identification of recipient;
Identify enquiry module 72, the equipment mark for inquiring the push side in preset buffer memory according to the unique mark
Know corresponding grouping;
Push processing module 73, if in the corresponding grouping of device identification for the push side there are described in identical only
One mark then terminates to push process flow;Otherwise, according to the message body for waiting for PUSH message, push side device identification and
The device identification of recipient executes push operation.
Optionally, the processing unit further includes:
The unique mark is added to the push side by add module 74 if running succeeded for push operation
In the corresponding grouping of device identification.
Optionally, the processing unit further includes:
Configuration module 75, for before obtaining push side's interface parameters incoming by pushing interface, obtaining push side
The configuring request of transmission, the configuring request include the device identification of push side;The push side is created in preset buffer memory
The corresponding grouping of device identification, the device identification of the grouping for storing the push side and its corresponding PUSH message
Unique mark.
It should be noted that each module/unit in the embodiment of the present invention can be used to implement described in above-mentioned Fig. 4 or Fig. 5
Embodiment of the method in whole technical solutions, specific work process, can refer to preceding method embodiment in corresponding to
Journey, details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Embodiment 3
The present embodiment provides a computer readable storage medium, computer journey is stored on the computer readable storage medium
Sequence realizes the processing method that message pushes in embodiment 1, to avoid repeating, here when the computer program is executed by processor
It repeats no more.Alternatively, realizing each mould in the processing unit that message pushes in embodiment 2 when the computer program is executed by processor
The function of block/unit, to avoid repeating, which is not described herein again.
It is to be appreciated that the computer readable storage medium may include:The computer program code can be carried
Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, computer storage, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal and telecommunications letter
Number etc..
Embodiment 4
Fig. 8 is a kind of schematic diagram of computer equipment provided in an embodiment of the present invention.As shown in figure 8, the meter of the embodiment
Calculating machine equipment 8 includes:It processor 80, memory 81 and is stored in the memory 81 and can be transported on the processor 80
Capable computer program 82.The processor 80 realizes that message pushes in above-described embodiment 1 when executing the computer program 82
Processing method the step of, such as step S101 to S103 shown in FIG. 1, step S1021 described in Fig. 2 embodiments to step
The step S401 to step S404 described in step S104 to S105 and Fig. 4 embodiments described in S1023, Fig. 3 embodiment,
Step S405 described in Fig. 5 embodiments, alternatively, the processor 80 realizes above-mentioned implementation when executing the computer program 82
Described in example 2 message push processing unit in each module/unit function, such as module 61 to 64 shown in Fig. 6 work(
The function of module 71 to 75 shown in energy, Fig. 7
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work(
Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device are divided into different functional units or module, more than completion
The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to aforementioned reality
Applying example, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each
Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed
Or replace, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of processing method of message push, which is characterized in that the treating method comprises:
Initiate message push when, obtain wait for the message body of PUSH message, the device identification of push side, recipient equipment mark
Know;
The corresponding unique mark of PUSH message is waited for described in generation;
The unique mark, message body, the device identification of push side, the device identification of recipient are passed to as interface parameters and disappeared
The push interface that supplying system provides is ceased, so that the message push system inquires the push side according to the unique mark
The corresponding grouping of device identification simultaneously executes push operation according to query result.
2. the processing method of message push as described in claim 1, which is characterized in that wait for PUSH message pair described in the generation
The unique mark answered includes:
36 random number strings are generated using random number algorithm, and reject 4 separators in 36 random number strings, obtain 32
Position random number string;
14 timestamps are generated according to current temporal information;
The timestamp is added to 32 random number strings end, 46 random number strings is obtained, waits pushing as described
The unique mark of message.
3. the processing method of message as claimed in claim 1 or 2 push, which is characterized in that the processing method further includes:
According to prefixed time interval from message push system described in the push interface polls to the processing for waiting for PUSH message
As a result;
If do not inquired in the prefixed time interval handling result or the handling result inquired not be default result code when,
The unique mark, message body, the device identification of push side, the device identification of recipient are passed to the push interface, with again
Secondary initiation is to the push for waiting for PUSH message.
4. a kind of processing method of message push, which is characterized in that the treating method comprises:
Push side's interface parameters incoming by pushing interface is obtained, the interface parameters includes waiting for unique mark of PUSH message
Knowledge, message body, the device identification of push side, the device identification of recipient;
The corresponding grouping of device identification of the push side is inquired in preset buffer memory according to the unique mark;
If there are the identical unique mark in the corresponding grouping of the device identification of the push side, terminate to push processing stream
Journey;
If the identical unique mark is not present in the corresponding grouping of the device identification of the push side, wait pushing away according to
The message body of message, the device identification of push side and the device identification of recipient is sent to execute push operation.
5. the processing method of message push as claimed in claim 4, which is characterized in that waiting for disappearing for PUSH message according to
After ceasing body, the device identification of push side and the device identification of recipient execution push operation, it the treating method comprises:
If push operation runs succeeded, the unique mark is added to the corresponding grouping of device identification of the push side
In.
6. the processing method of message push as claimed in claim 4, which is characterized in that obtaining push side by pushing interface
Before incoming interface parameters, the processing method further includes:
The configuring request that push side is sent is obtained, the configuring request includes the device identification of push side;
The corresponding grouping of device identification of the push side is created in preset buffer memory, the grouping is for storing the push side
Device identification and its corresponding PUSH message unique mark.
7. a kind of processing unit of message push, which is characterized in that the processing unit includes:
Acquisition module, for when initiating message push, obtaining the device identification of the message body, push side of waiting for PUSH message, connecing
The device identification of debit;
Generation module described waits for the corresponding unique mark of PUSH message for generating;
Request module is pushed, is used for the unique mark, message body, the device identification of push side, the device identification of recipient
As the push interface that interface parameters incoming message supplying system provides, so that the message push system is according to unique mark
Know the corresponding grouping of device identification for inquiring the push side and push operation is executed according to query result.
8. a kind of processing unit of message push, which is characterized in that the processing unit includes:
Parameter acquisition module, the interface parameters incoming by pushing interface for obtaining push side, the interface parameters includes waiting for
The unique mark of PUSH message, message body, the device identification of push side, the device identification of recipient;
Enquiry module is identified, the device identification for inquiring the push side in preset buffer memory according to the unique mark corresponds to
Grouping;
Processing module is pushed, if there are identical unique marks in the corresponding grouping of device identification for the push side
Know, then terminates to push process flow;Otherwise, according to the message body for waiting for PUSH message, the device identification and reception of push side
The device identification of side executes push operation.
9. a kind of computer equipment, including memory, processor and it is stored in the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to
The step of 3 any one or the processing method of claim 4 to 6 any one of them message push.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist
In any one of such as claims 1 to 3 of realization or any one of claim 4 to 6 when the computer program is executed by processor
The step of processing method of the message push.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810138045.3A CN108449256B (en) | 2018-02-10 | 2018-02-10 | Message pushing processing method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810138045.3A CN108449256B (en) | 2018-02-10 | 2018-02-10 | Message pushing processing method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108449256A true CN108449256A (en) | 2018-08-24 |
CN108449256B CN108449256B (en) | 2021-05-04 |
Family
ID=63192212
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810138045.3A Active CN108449256B (en) | 2018-02-10 | 2018-02-10 | Message pushing processing method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108449256B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109491765A (en) * | 2018-10-09 | 2019-03-19 | 阿里巴巴集团控股有限公司 | To the processing method and processing device of cross-domain service request |
CN109802995A (en) * | 2018-12-13 | 2019-05-24 | 深圳壹账通智能科技有限公司 | Information push method, device, equipment and storage medium |
CN110247963A (en) * | 2019-05-31 | 2019-09-17 | 北京智慧云行科技有限责任公司 | A kind of data push method and system |
CN111984713A (en) * | 2020-06-29 | 2020-11-24 | 五八到家有限公司 | Data processing method, device, equipment and storage medium |
CN112187903A (en) * | 2020-09-22 | 2021-01-05 | 华云数据控股集团有限公司 | Message pushing method and device and message service system |
CN112579093A (en) * | 2020-12-11 | 2021-03-30 | 杭州安恒信息技术股份有限公司 | Information pushing method and device and related equipment |
CN112637151A (en) * | 2020-12-11 | 2021-04-09 | 深圳市英威腾电气股份有限公司 | Data message transmission method, terminal device, server and storage medium |
WO2022036526A1 (en) * | 2020-08-17 | 2022-02-24 | Oppo广东移动通信有限公司 | Method, apparatus, and device for processing notification message, and storage medium |
CN114374705A (en) * | 2022-01-06 | 2022-04-19 | 青岛海信智慧生活科技股份有限公司 | Service cluster and message pushing method |
CN114553815A (en) * | 2022-01-29 | 2022-05-27 | 北京金堤科技有限公司 | Method and device for processing message |
CN114584416A (en) * | 2022-02-11 | 2022-06-03 | 青岛海尔科技有限公司 | Electrical equipment control method, system and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104702486A (en) * | 2013-12-09 | 2015-06-10 | 腾讯科技(深圳)有限公司 | Information publication method and device |
CN105491539A (en) * | 2014-09-18 | 2016-04-13 | 博雅网络游戏开发(深圳)有限公司 | Message push management method and device |
CN106330947A (en) * | 2016-09-06 | 2017-01-11 | 西安瀚炬网络科技有限公司 | Method and system for recognizing disguised WiFi and system working method |
CN106657299A (en) * | 2016-12-08 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and system for online reminding of concerned anchor |
CN106713124A (en) * | 2017-01-24 | 2017-05-24 | 深圳市启仑智能科技有限公司 | Message push method and system based on MQTT and MYSQL |
-
2018
- 2018-02-10 CN CN201810138045.3A patent/CN108449256B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104702486A (en) * | 2013-12-09 | 2015-06-10 | 腾讯科技(深圳)有限公司 | Information publication method and device |
CN105491539A (en) * | 2014-09-18 | 2016-04-13 | 博雅网络游戏开发(深圳)有限公司 | Message push management method and device |
CN106330947A (en) * | 2016-09-06 | 2017-01-11 | 西安瀚炬网络科技有限公司 | Method and system for recognizing disguised WiFi and system working method |
CN106657299A (en) * | 2016-12-08 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and system for online reminding of concerned anchor |
CN106713124A (en) * | 2017-01-24 | 2017-05-24 | 深圳市启仑智能科技有限公司 | Message push method and system based on MQTT and MYSQL |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109491765A (en) * | 2018-10-09 | 2019-03-19 | 阿里巴巴集团控股有限公司 | To the processing method and processing device of cross-domain service request |
CN109491765B (en) * | 2018-10-09 | 2021-07-30 | 创新先进技术有限公司 | Method and device for processing cross-domain service request |
CN109802995A (en) * | 2018-12-13 | 2019-05-24 | 深圳壹账通智能科技有限公司 | Information push method, device, equipment and storage medium |
CN109802995B (en) * | 2018-12-13 | 2023-04-11 | 深圳壹账通智能科技有限公司 | Message pushing method, device, equipment and storage medium |
CN110247963A (en) * | 2019-05-31 | 2019-09-17 | 北京智慧云行科技有限责任公司 | A kind of data push method and system |
CN111984713A (en) * | 2020-06-29 | 2020-11-24 | 五八到家有限公司 | Data processing method, device, equipment and storage medium |
WO2022036526A1 (en) * | 2020-08-17 | 2022-02-24 | Oppo广东移动通信有限公司 | Method, apparatus, and device for processing notification message, and storage medium |
CN112187903A (en) * | 2020-09-22 | 2021-01-05 | 华云数据控股集团有限公司 | Message pushing method and device and message service system |
CN112637151A (en) * | 2020-12-11 | 2021-04-09 | 深圳市英威腾电气股份有限公司 | Data message transmission method, terminal device, server and storage medium |
CN112579093A (en) * | 2020-12-11 | 2021-03-30 | 杭州安恒信息技术股份有限公司 | Information pushing method and device and related equipment |
CN114374705A (en) * | 2022-01-06 | 2022-04-19 | 青岛海信智慧生活科技股份有限公司 | Service cluster and message pushing method |
CN114553815A (en) * | 2022-01-29 | 2022-05-27 | 北京金堤科技有限公司 | Method and device for processing message |
CN114584416A (en) * | 2022-02-11 | 2022-06-03 | 青岛海尔科技有限公司 | Electrical equipment control method, system and storage medium |
CN114584416B (en) * | 2022-02-11 | 2023-12-19 | 青岛海尔科技有限公司 | Electrical equipment control method, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108449256B (en) | 2021-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108449256A (en) | Processing method, device, computer equipment and the storage medium of message push | |
CN103250390B (en) | For the method and apparatus providing object-based host-host protocol | |
CN108200165B (en) | Request Transmission system, method, apparatus and storage medium | |
CN107948324B (en) | Request Transmission system, method, apparatus and storage medium | |
CN108965484A (en) | A kind of transmission method of internet of things data, system and terminal | |
CN103547342B (en) | Message method, message read notification method, message receival method and device | |
CN108200158B (en) | Request Transmission system, method, apparatus and storage medium | |
CN108667719A (en) | A kind of real-time Message Passing method and system | |
CN113556359B (en) | Communication protocol conversion method, device, system and gateway device | |
US20220312309A1 (en) | Method and Apparatus for Reporting User Plane Function Information, Storage Medium, and Electronic Apparatus | |
CN109819021A (en) | The method of business backstage and its asynchronous process service request | |
CN108632844B (en) | Information processing method, device and electronic equipment | |
CN107395559A (en) | Data processing method and equipment based on redis | |
EP4246936A1 (en) | Data processing method, function device and readable storage medium | |
CN106170968A (en) | A kind of data compression storage method, device, and distributed file system | |
CN108712320A (en) | Information push method and device | |
CN113055539A (en) | Communication system based on VoIP dual-redundancy exchange server | |
CN105207909A (en) | Method for transmitting information and network apparatus | |
CN108777664A (en) | A kind of data package processing method and its equipment, system, storage medium | |
CN107094085B (en) | Signaling transmission method and device | |
CN110855424A (en) | Method and device for synthesizing asymmetric flow xDR in DPI field | |
CN112333172B (en) | Signature verification method and system | |
CN109120578B (en) | Method and device for realizing link connection processing | |
CN103475506B (en) | Multiple equipment management control method and system | |
CN103607324B (en) | Data processing method for Java message service, Java message client and server |
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 |