The content of the invention
Embodiments of the invention provide a kind of information pushing treating method and apparatus, solve and go out during pushed information
When now abnormal, it is impossible to resend the problem of the pushed information having been sent from, improve the quality of pushed information.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
A kind of first aspect, there is provided information pushing processing method, is applied to the first electric terminal, and methods described includes:
When the push thread for detecting pushed information brings into operation, the pushed information is sequentially stored in into described first
In the buffer queue of electric terminal;
Detect whether the pushed information is abnormal;
When the pushed information for exception occur is detected, stop the push thread of the pushed information;
Deletion is stored in all pushed informations before the described abnormal pushed information in the buffer queue, and again
Send the abnormal pushed information and all pushed informations after the abnormal pushed information.
In the first possible implementation, with reference in a first aspect, methods described also includes:
Detect whether the quantity of the pushed information in the buffer queue exceedes predetermined number threshold value;
If the quantity for detecting the pushed information reaches predetermined number threshold value, delete
Breath.
It is in second possible implementation, with reference to first aspect or the first possible implementation, described when inspection
When measuring the push thread of the pushed information and bringing into operation, the pushed information is sequentially stored in into first electric terminal
Buffer queue in before, also include:
The pushed information is sent to user equipment by the second electric terminal, is being received in order to the user equipment
After the pushed information, to second electric terminal, second electric terminal is according to the feedback information for send feedback information
Judge whether the ID of the pushed information for sending error code and exception to first electric terminal;
It is described to detect whether the pushed information exception occurs, including:
Detect whether the ID of the pushed information of the error code and exception that receive the second electric terminal transmission;
If receiving the ID of the error code and the abnormal pushed information, judge that the pushed information occurs different
Often.
In the third possible implementation, with reference to second possible implementation,
The error code is that second electric terminal is sent according to the form and the user equipment of the pushed information
Feedback information obtain.
In the 4th kind of possible implementation, with reference to second possible implementation, the deletion is stored in described
The all pushed informations before described abnormal pushed information in buffer queue, and resend the abnormal pushed information
Before all pushed informations afterwards, also include:
The abnormal push letter is searched in the buffer queue according to the ID of the described abnormal pushed information for receiving
Breath.
In the 5th kind of possible implementation, with reference to first aspect or the first possible implementation, it is described again
After sending the abnormal pushed information and all pushed informations after the abnormal pushed information, also include:
All pushed informations after the abnormal pushed information and the abnormal pushed information have resend
Cheng Hou, sends new pushed information and the new pushed information is sequentially stored in the buffer queue.
Second aspect, there is provided a kind of information pushing processing meanss, described device include:
Memory element, for when the push thread for detecting pushed information brings into operation, by the pushed information successively
It is stored in the buffer queue of first electric terminal;
Detector unit, for detecting whether the pushed information is abnormal;
Processing unit, for when the pushed information for exception occur is detected, stopping the push thread of the pushed information;
The processing unit, before being additionally operable to delete the described abnormal pushed information being stored in the buffer queue
All pushed informations, and resend the abnormal pushed information and all push letters after the abnormal pushed information
Breath.
In the first possible implementation, with reference to second aspect, described device also includes:
The detector unit, it is default whether the quantity of the pushed information for being additionally operable to detect in the buffer queue exceedes
Amount threshold;
Unit is deleted, if the quantity for detecting the pushed information reaches predetermined number threshold value, institute is deleted successively
State pushed information.
In second possible implementation, with reference to second aspect or the first possible implementation, described device
Also include:
Transmitting element, for sending the pushed information to user equipment by the second electric terminal, in order to the use
Family equipment after the pushed information is received send feedback information to second electric terminal, the second electric terminal root
Judge whether the ID of the pushed information for sending error code and exception to first electric terminal according to the feedback information;
The detector unit includes:
Detection module, for detecting whether the push for receiving error code and exception that second electric terminal sends is believed
The ID of breath;
Judge module, if the ID for receiving the error code and the abnormal pushed information, pushes away described in judgement
Breath of delivering letters occurs abnormal.
In the third possible implementation, with reference to second possible implementation,
The error code is that second electric terminal is sent according to the form and the user equipment of the pushed information
Feedback information obtain.
In the 4th kind of possible implementation, with reference to second possible implementation, described device also includes:
Searching unit, searches in the buffer queue for the ID according to the described abnormal pushed information for receiving described
Abnormal pushed information.
In the 5th kind of possible implementation, with reference to second aspect or the first possible implementation,
The processing unit, is additionally operable to all after the abnormal pushed information and the abnormal pushed information
After the completion of pushed information resends, send new pushed information and the new pushed information is sequentially stored in into the caching
In queue.
The information pushing treating method and apparatus that embodiments of the invention are provided, by inciting somebody to action while pushed information is sent
The pushed information for having sent is stored in buffer queue, when pushed information occurs abnormal, is directly deleted in the buffer queue
All pushed informations before abnormal pushed information the abnormal pushed information stored in resending the buffer queue
With all pushed informations after the abnormal pushed information, solve when pushed information occurs abnormal, it is impossible to resend
There is the problem of abnormal pushed information, improve the quality of pushed information.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
Embodiments of the invention provide a kind of information pushing processing method, are applied to the first electric terminal, with reference to Fig. 1 institutes
Show, the method is comprised the following steps:
101st, when the push thread for detecting pushed information brings into operation, the first electric terminal by the pushed information successively
It is stored in the buffer queue of the first electric terminal.
Specifically, the first electric terminal is communicated with user equipment by the second electric terminal.When the first electric terminal
Server when sending pushed information to user equipment by the server of the second electric terminal, often send a pushed information then
First electric terminal then can be stored in the pushed information that this has sent in the buffer queue of the first electric terminal.Wherein, should
Buffer queue is to be arranged in the memorizer of the first electric terminal dedicated for storing pushed information in advance.
102nd, whether the first electric terminal detection pushed information is abnormal.
Specifically, the first electric terminal is by detecting whether to receive the error code of the second electric terminal transmission and exception
The ID of pushed information abnormal to judge whether to occur pushed information situation.
103rd, when the pushed information for exception occur is detected, the first electric terminal stops the push thread of pushed information.
Specifically, when there is pushed information generation exception, stop sending pushed information to user equipment, to avoid rear supervention
There is mistake in the pushed information sent, and abnormal pushed information occurs in convenient subsequently resending.
104th, the first electric terminal deletes all push letters being stored in before the pushed information of the exception in buffer queue
Breath, and resend all pushed informations after the pushed information of abnormal pushed information and exception.
It should be noted that step 103 and step 104 in the process of implementation no sequencing point, i.e., step 103 is stopped
Only pushed information before the pushed information for pushing thread and step 104 suppressing exception of pushed information, resends
All pushed informations after breath and abnormal pushed information can be carried out on execution sequence simultaneously.
The information pushing processing method that embodiments of the invention are provided, by having been sent while pushed information is sent
Pushed information be stored in buffer queue, when pushed information occurs abnormal, the direct suppressing exception in the buffer queue
All pushed informations before pushed information the abnormal pushed information that stores in resending the buffer queue and this is different
All pushed informations after normal pushed information, solve when pushed information occurs abnormal, it is impossible to resend appearance different
The problem of normal pushed information, improves the quality of pushed information.
Embodiments of the invention provide a kind of information pushing processing method, and the method is applied to the first electric terminal, reference
Shown in Fig. 2, the method is comprised the following steps:
201st, the first electric terminal sends pushed information to user equipment by the second electric terminal, in order to user equipment
After pushed information is received, to the second electric terminal, the second electric terminal judges whether send feedback information according to feedback information
Send the electric terminals of ID to first of the pushed information of error code and exception.Pushed information occurs abnormal situation to be included:Push
Information errors, network error etc..
Wherein, error code is that the second electric terminal is obtained according to the feedback information that the form and user equipment of pushed information send
Arrive.
In the present invention, pushed information can be Token pushed informations.
Specifically, the second electric terminal detects whether the form of the pushed information for receiving is correct first, if finding to push
The format error of information then sends the ID of corresponding error code and the pushed information to the first electric terminal;If the lattice of pushed information
The feedback information that the correct user equipment that then the second electric terminal inspection is received of formula sends, the feedback information can be:Confirm
Character(Acknowledgement, abbreviation ACK)Or negative acknowledge character(Negative Acknowledgement, abbreviation NACK).If
The feedback information that the detection of second electric terminal is received is NACK, then send corresponding error code and push away with this to the first electric terminal
Deliver letters breath ID give the first electric terminal;If the feedback information that detection is received is ACK, do not deal with.Meanwhile, the first electronics
The reason for can there is mistake according to the error code analysis for receiving in terminal, and appearance mistake is searched according to the ID of pushed information
Pushed information.Wherein, whether the pushed information that the pushed information that user equipment judgement is received is obtained with the needs being obtained ahead of time
It is identical come send feedback information;If the pushed information that the pushed information for receiving is obtained with the needs being obtained ahead of time is identical, send out
ACK characters are sent to the second electric terminal;If the pushed information that the pushed information for receiving is obtained with the needs being obtained ahead of time not phase
Together, then NACK characters are sent to the second electric terminal.
202nd, when the push thread for detecting pushed information brings into operation, the first electric terminal by the pushed information successively
It is stored in the buffer queue of the first electric terminal.
Wherein, the buffer queue is the buffer queue of a limited storage space, the storage of pushed information can be according to
The principle of first in first out is carried out.The buffer queue is to be arranged in the memorizer of the first electric terminal dedicated for storage in advance
Pushed information, the capacity of buffer queue can be set according to the actual capacity of the first electric terminal.
203rd, the first electric terminal detects whether the push letter of the error code and exception for receiving the transmission of the second electric terminal
The ID of breath.
First electric terminal can be with according to whether receive the push letter of the error code and exception of the transmission of the second electric terminal
The ID of breath is judging whether pushed information exception occurs.
If the 204, receiving the ID of the pushed information of error code and exception, the first electric terminal judges that pushed information occurs
It is abnormal.
205th, when the pushed information for exception occur is detected, the first electric terminal stops the push thread of pushed information.
When detecting the situation of generation pushed information exception, the first electric terminal stops by the second electric terminal to user
Equipment sends pushed information, it is to avoid mistake occurs in the follow-up pushed information for sending.
206th, the first electric terminal deletes all push letters being stored in before the pushed information of the exception in buffer queue
Breath, and resend all pushed informations after the pushed information of abnormal pushed information and exception.
It should be noted that step 205 and step 206 in the process of implementation no sequencing point, i.e., step 205 is stopped
Only pushed information before the pushed information for pushing thread and step 206 suppressing exception of pushed information, resends abnormal pushing away
Deliver letters breath and exception pushed information after all pushed informations on execution sequence can be and meanwhile it is carrying out, or
Step 206 is performed after step 205.
Specifically, after stopping sending pushed information to user equipment, according to the ID of the pushed information of the exception for receiving
The position that abnormal pushed information is located is searched in buffer queue, by the abnormal pushed information position before it is all
Pushed information is deleted, and is saved buffer queue designated space, is facilitated the first electric terminal to carry out follow-up operation.Suppressing exception is pushed away
The pushed information delivered letters before breath position, such first electric terminal are only needed to buffer queue when resending directly
In all pushed informations resend once, without pushing away before first crossing abnormal pushed information position
Deliver letters breath, retransmit the pushed information after the pushed information position of abnormal pushed information and exception, greatly save
The operating process of electric terminal and time.
The information pushing processing method that embodiments of the invention are provided, by having been sent while pushed information is sent
Pushed information be stored in buffer queue, when pushed information occurs abnormal, the direct suppressing exception in the buffer queue
All pushed informations before pushed information the abnormal pushed information that stores in resending the buffer queue and this is different
All pushed informations after normal pushed information, solve when pushed information occurs abnormal, it is impossible to resend appearance different
The problem of normal pushed information, improves the quality of pushed information.Further, the pushing efficiency of pushed information can be improved.
Embodiments of the invention provide a kind of information pushing processing method, and the method is applied to the first electric terminal, reference
Shown in Fig. 3, the method is comprised the following steps:
301st, the first electric terminal sends pushed information to user equipment by the second electric terminal, in order to user equipment
After pushed information is received, to the second electric terminal, the second electric terminal judges whether send feedback information according to feedback information
Send the electric terminals of ID to first of the pushed information of error code and exception.
Wherein, error code is that the second electric terminal is obtained according to the feedback information that the form and user equipment of pushed information send
Arrive.
302nd, when the push thread for detecting pushed information brings into operation, the first electric terminal by the pushed information successively
It is stored in the buffer queue of the first electric terminal.
303rd, whether the quantity of the pushed information in the first electric terminal detection buffer queue exceedes predetermined number threshold value.
Wherein, predetermined number threshold value is the first electric terminal according to the memory capacity of the memorizer of the first electric terminal and pushes away
The memory space delivered letters required for breath is set in advance, is a variable numerical value.
If the quantity for the 304, detecting pushed information reaches predetermined number threshold value, the first electric terminal deletes push successively
Information.
When electric terminal detects the quantity of the pushed information in buffer queue and reaches default amount threshold, electronic equipment
Order according to storage pushed information is that the order of first in first out deletes pushed information successively, it is ensured that pushed information in buffer queue
Quantity is less than predetermined number threshold value, it is to avoid the situation that internal memory exhausts occurs in electric terminal, it is ensured that the push thread of pushed information
It is normally carried out.
305th, the first electric terminal detects whether the push letter of the error code and exception for receiving the transmission of the second electric terminal
The ID of breath.
If the 306, receiving the ID of the pushed information of error code and exception, the first electric terminal judges that pushed information occurs
It is abnormal.
307th, when the pushed information for exception occur is detected, the first electric terminal stops the push thread of pushed information.
308th, the first electric terminal searches abnormal push away in buffer queue according to the ID of the pushed information of the exception for receiving
Deliver letters breath.
First electric terminal is according to the abnormal pushed information of the ID lookups of abnormal pushed information in buffer queue
Position, facilitates the first electric terminal to process the pushed information in buffer queue.
309th, the first electric terminal deletes all push letters being stored in before the pushed information of the exception in buffer queue
Breath, and resend all pushed informations after the pushed information of abnormal pushed information and exception.
It should be noted that step 307~308 and step 309 in the process of implementation no sequencing point, i.e. step
307~308 and step 309 suppressing exception pushed information before pushed information, resend normal pushed information and exception push away
The all pushed informations delivered letters after breath can be while carry out, or step 309 is in step 307 on execution sequence
Perform after~308.
310th, after the completion of all pushed informations after the pushed information of abnormal pushed information and exception resend,
First electric terminal sends new pushed information and new pushed information is sequentially stored in buffer queue.
Specifically, when resending abnormal pushed information and the pushed information after the abnormal pushed information, first
Electric terminal does not preserve the pushed information that these resend, but during new pushed information is sent, and this new is pushed away
Breath of delivering letters is sequentially stored in buffer queue.
Optionally, when resend abnormal pushed information and exception pushed information after all pushed informations when,
All pushed informations after the pushed information of the abnormal pushed information and exception are stored in buffer queue, caching is covered
Original pushed information in queue.
Wherein, in the present embodiment, the detailed description of the step step identical with step in above-described embodiment refers to above-mentioned enforcement
Description in example, here is omitted.
The information pushing processing method that embodiments of the invention are provided, by having been sent while pushed information is sent
Pushed information be stored in buffer queue, when pushed information occurs abnormal, the direct suppressing exception in the buffer queue
All pushed informations before pushed information the abnormal pushed information that stores in resending the buffer queue and this is different
All pushed informations after normal pushed information, solve when pushed information occurs abnormal, it is impossible to resend appearance different
The problem of normal pushed information, improves the quality of pushed information.Further, the pushing efficiency of pushed information can be improved.
Embodiments of the invention provide a kind of information pushing processing meanss 4, for realizing the arbitrary correspondence in Fig. 1~Fig. 3
The information pushing processing method that provided of embodiment of the method, with reference to shown in Fig. 4, the device 4 includes:Memory element 41, detection
Unit 42, processing unit 43, wherein:
Memory element 41, for when the push thread for detecting pushed information brings into operation, pushed information being deposited successively
Storage is in the buffer queue of the first electric terminal.
Detector unit 42, for detecting whether pushed information is abnormal.
Processing unit 43, for when the pushed information for exception occur is detected, stopping the push thread of pushed information.
Processing unit 43, all push letters being additionally operable to before deleting the pushed information of the exception being stored in buffer queue
Breath, and resend all pushed informations after the pushed information of abnormal pushed information and exception.
The information pushing processing meanss that embodiments of the invention are provided, by having been sent while pushed information is sent
Pushed information be stored in buffer queue, when pushed information occurs abnormal, the direct suppressing exception in the buffer queue
All pushed informations before pushed information the abnormal pushed information that stores in resending the buffer queue and this is different
All pushed informations after normal pushed information, solve when pushed information occurs abnormal, it is impossible to resend appearance different
The problem of normal pushed information, improves the quality of pushed information.
Further, with reference to shown in Fig. 5, the device 4 also includes:Unit 44 is deleted, wherein:
Whether detector unit 42, the quantity of the pushed information being additionally operable in detection buffer queue exceed predetermined number threshold value.
Unit 44 is deleted, if the quantity for detecting pushed information reaches predetermined number threshold value, is deleted successively and is pushed
Information.
Further, with reference to shown in Fig. 6, the device 4 also includes:Transmitting element 45, wherein:
Transmitting element 45, for sending pushed information to user equipment by the second electric terminal, in order to user equipment
After pushed information is received, to the second electric terminal, the second electric terminal judges whether send feedback information according to feedback information
Send the electric terminals of ID to first of the pushed information of error code and exception.
Specifically, with reference to shown in Fig. 7, detector unit 42 includes:Detection module 421 and judge module 422, wherein:
Detection module 421, for detecting whether receiving the push letter of the error code and exception of the transmission of the second electric terminal
The ID of breath.
Judge module 422, if the ID of the pushed information for receiving error code and exception, judges that pushed information occurs
It is abnormal.
Wherein, error code is that the second electric terminal is obtained according to the feedback information that the form and user equipment of pushed information send
Arrive.
Further, with reference to shown in Fig. 8, the device also includes:Searching unit 46, wherein:
Searching unit 46, the ID for the pushed information according to the exception for receiving search abnormal push in buffer queue
Information.
Further alternative, processing unit 43 is additionally operable to after the pushed information of abnormal pushed information and exception
After the completion of all pushed informations resend, send new pushed information and new pushed information is sequentially stored in into buffer queue
In.
It should be noted that the implementation of each unit and each module in information pushing processing meanss in the present embodiment
The associated description in correlation method embodiment be may be referred to interaction.
The information pushing processing meanss that embodiments of the invention are provided, by having been sent while pushed information is sent
Pushed information be stored in buffer queue, when pushed information occurs abnormal, the direct suppressing exception in the buffer queue
All pushed informations before pushed information the abnormal pushed information that stores in resending the buffer queue and this is different
All pushed informations after normal pushed information, solve when pushed information occurs abnormal, it is impossible to resend appearance different
The problem of normal pushed information, improves the quality of pushed information.Further, the pushing efficiency of pushed information can be improved.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of said method embodiment can pass through
Completing, aforesaid program can be stored in a computer read/write memory medium the related hardware of programmed instruction, the program
Upon execution, perform the step of including said method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by the scope of the claims.