CN111245874A - Information pushing method and device, server and storage medium - Google Patents

Information pushing method and device, server and storage medium Download PDF

Info

Publication number
CN111245874A
CN111245874A CN201811431914.8A CN201811431914A CN111245874A CN 111245874 A CN111245874 A CN 111245874A CN 201811431914 A CN201811431914 A CN 201811431914A CN 111245874 A CN111245874 A CN 111245874A
Authority
CN
China
Prior art keywords
target
push
information
request
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811431914.8A
Other languages
Chinese (zh)
Other versions
CN111245874B (en
Inventor
冯中坚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201811431914.8A priority Critical patent/CN111245874B/en
Publication of CN111245874A publication Critical patent/CN111245874A/en
Application granted granted Critical
Publication of CN111245874B publication Critical patent/CN111245874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides an information pushing method, an information pushing device, a server and a storage medium, wherein the information pushing method comprises the following steps: after receiving a push preparation request, generating a target communication identifier for communicating with a target terminal sending the push preparation request, and sending the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different; receiving a short connection push request for requesting target push information, wherein the short connection push request carries a target communication identifier; when the target push information does not exist, suspending the short connection push request; and after the target push information is generated, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier. According to the information pushing method, the sending of the recommendation information is achieved through the short connection, compared with the long connection, the transmission efficiency of the pushing information is improved, the occupancy rate of system resources is reduced, and the application range is enlarged.

Description

Information pushing method and device, server and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an information push method, an information push apparatus, a server, and a storage medium.
Background
With the continuous development of network technology, various terminal devices need to interact with a server to realize various information, so that various application requirements of people are met. For example, the user obtains audio and video information from the server through the terminal device and plays the information on the terminal device, or obtains data information updated at any time in a database of the server from the server through the terminal device.
In the related data push technology, an HTTP (HyperText Transfer Protocol) client establishes a long connection with a server based on a TCP (Transmission Control Protocol), and after a server updates recommended data, the server sends the recommended data to the client through the long connection.
However, with long TCP-based connections, three handshaking operations are required to establish the long connection, and there are mechanisms of acknowledgement, window, retransmission, and congestion during data transmission, which results in low transmission efficiency of the pushed information and high occupation of system resources.
Disclosure of Invention
The embodiment of the application aims to provide an information pushing method, an information pushing device, a server and a storage medium, so as to improve the transmission efficiency of pushed information and reduce the occupancy rate of system resources. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an information pushing method, which is applied to a server, and the method includes:
after receiving a push preparation request, generating a target communication identifier for communicating with a target terminal sending the push preparation request, and sending the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different;
receiving a short connection push request for requesting target push information, which is sent by the target terminal, wherein the short connection push request carries the target communication identifier;
when the target push information does not exist, suspending the short connection push request;
and after the target push information is generated, processing the short connection push request, and sending the target push information to the target terminal according to the target communication identifier.
Optionally, after receiving the short-connection push request for requesting the target push information sent by the target terminal, the method further includes:
and when the target push information exists, sending the target push information to the target terminal according to the target communication identifier.
Optionally, after suspending the short connection push request when the target push information does not exist, the method further includes:
and if a preset first time threshold value is passed from a target moment, the target push information is not generated, and push overdue information is sent to the target terminal according to the target communication identifier, wherein the target moment is the moment when the short-connection push request is received or the moment when the short-connection push request is suspended.
Optionally, after the target push information is generated, processing the short connection push request, and sending the target push information to the target terminal according to the target communication identifier includes:
and from a target moment, if the target push information is generated within a preset first time threshold, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier, wherein the target moment is the moment when the short-connection push request is received or the moment when the short-connection push request is suspended.
Optionally, after suspending the short connection push request when the target push information does not exist, the method further includes:
after receiving other information requests except the short connection pushing request sent by the target terminal, sending pushing overdue information to the target terminal according to the target communication identifier, wherein the other information requests are used for acquiring target request information existing in the server;
and sending the target request information to the target terminal according to the other information requests.
Optionally, the short connection push request is stored in a first message queue, the other information requests are stored in a second message queue, and the first message queue and the second message queue are different message queues.
Optionally, the information pushing method applied to the server in the embodiment of the present application further includes:
and after the moment of sending the expired information to the target terminal, within a preset second time threshold, not receiving a new short connection pushing request sent by the target terminal, and releasing the first message queue and the target communication identifier.
In a second aspect, an embodiment of the present application provides an information pushing method, which is applied to a terminal, and the method includes:
sending a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, wherein the communication identifiers of all terminals are different;
receiving a target communication identifier sent by the server;
sending a short connection pushing request to the server, wherein the short connection pushing request carries the target communication identifier, and the short connection pushing request is used for acquiring target pushing information from the server;
and receiving the target push information sent by the server according to the target communication identifier, and displaying the target push information.
Optionally, after sending the short connection push request to the server, the method further includes:
and receiving the push overdue information sent by the server according to the target communication identifier without updating push.
In a third aspect, an embodiment of the present application provides an information pushing apparatus, located at a server, where the apparatus includes:
the communication identifier generation module is configured to generate a target communication identifier for communicating with a target terminal sending a push preparation request after receiving the push preparation request, and send the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different;
a push request receiving module configured to receive a short connection push request for requesting target push information sent by the target terminal, where the short connection push request carries the target communication identifier;
a push request suspension module configured to suspend the short connection push request when the target push information does not exist;
and the first push information sending module is configured to process the short connection push request after the target push information is generated, and send the target push information to the target terminal according to the target communication identifier.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
and the second push information sending module is configured to send the target push information to the target terminal according to the target communication identifier when the target push information exists.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
and the first outdated information sending module is configured to send push outdated information to the target terminal according to the target communication identifier if a preset first time threshold value passes from a target time, wherein the target time is the time when the short-connection push request is received or the time when the short-connection push request is suspended.
Optionally, the first push information sending module is specifically configured to:
and from a target moment, if the target push information is generated within a preset first time threshold, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier, wherein the target moment is the moment when the short-connection push request is received or the moment when the short-connection push request is suspended.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
a second outdated information sending module, configured to send, after receiving other information requests except the short connection push request sent by the target terminal, push outdated information to the target terminal according to the target communication identifier, where the other information requests are used to obtain target request information already existing in the server;
and the request information sending module is configured to send the target request information to the target terminal according to the other information requests.
Optionally, in the information push apparatus at the server in the embodiment of the present application, the short connection push request is stored in a first message queue, the other information requests are stored in a second message queue, and the first message queue and the second message queue are different message queues.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
and the resource release module is configured to release the first message queue and the target communication identifier when a new short-connection push request sent by the target terminal is not received within a preset second time threshold from the time when the push expiration information is sent to the target terminal.
In a fourth aspect, an embodiment of the present application provides an information pushing apparatus, where the information pushing apparatus is located at a terminal, and the apparatus includes:
the accurate request sending module is configured to send a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, wherein the communication identifiers of the terminals are different;
the communication identifier receiving module is configured to receive a target communication identifier sent by the server;
a push request sending module configured to send a short connection push request to the server, where the short connection push request carries the target communication identifier, and the short connection push request is used to obtain target push information from the server;
and the push information receiving module is configured to receive the target push information sent by the server according to the target communication identifier and display the target push information.
Optionally, the information pushing device located at the terminal in the embodiment of the present application further includes:
and the expired information receiving module is configured to receive the push expired information sent by the server according to the target communication identifier without updating push.
In a fifth aspect, an embodiment of the present application provides a server, including a processor and a memory;
a memory for storing a computer program;
and a processor, configured to implement the information push method applied to the server according to any one of the first aspect described above when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present application provides a terminal, including a processor and a memory;
a memory for storing a computer program;
and a processor, configured to implement the information push method applied to the terminal according to any one of the second aspects when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the information pushing method applied to the server side according to any of the first aspect.
In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the information push method applied to a terminal according to any one of the above second aspects is implemented.
According to the information push method, the information push device, the server and the storage medium, after a push preparation request is received, a target communication identifier used for communicating with a target terminal sending the push preparation request is generated, and the target communication identifier is sent to the target terminal, wherein the communication identifiers of all the terminals are different; receiving a short connection push request for requesting target push information, wherein the short connection push request carries a target communication identifier; when the target push information does not exist, suspending the short connection push request; and after the target push information is generated, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier. The method and the device realize the sending of the recommendation information through the short connection, improve the transmission efficiency of the push information, reduce the occupancy rate of system resources and increase the application range compared with the long connection. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first flowchart illustrating an information push method applied to a server according to an embodiment of the present application;
fig. 2 is a second flowchart of an information pushing method applied to a server according to an embodiment of the present application;
fig. 3 is a third flowchart illustrating an information pushing method applied to a server according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating information interaction between a server and a terminal according to an embodiment of the present application;
fig. 5 is a flowchart illustrating an information push method applied to a terminal according to an embodiment of the present application;
fig. 6 is a schematic diagram of an information pushing apparatus at a server according to an embodiment of the present application;
fig. 7 is a schematic diagram of an information pushing apparatus at a terminal according to an embodiment of the present application;
fig. 8 is a schematic diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a first flowchart of an information pushing method provided in the embodiment of the present application, and is applied to a server. The server can be in various forms such as a single server, a server cluster and a cloud platform, and can be a server as long as the server can realize data interaction with the terminal. The terminal can be various terminal intelligent devices, for example, a mobile phone, a personal computer, a tablet computer, and the like.
As shown in fig. 1, an information push method provided in an embodiment of the present application includes:
step 110, after receiving the push preparation request, generating a target communication identifier for communicating with a target terminal sending the push preparation request, and sending the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different.
The information pushing method is applied to the server side, and therefore the information pushing method can be achieved through the server side. Specifically, the method may be implemented by a server at a server side. The User terminal sends a push preparation request to the server, for example, when a User opens an application program containing a push function in the User terminal, the User terminal sends the push preparation request to the server, where the push preparation request is a short connection request, and may be based on UDP (User Datagram Protocol), for example. The push preparation request is asynchronous, and other information can be sent and received in parallel before the user terminal receives the reply information.
After receiving the push preparation request, the server generates a target communication identifier for a target terminal sending the push preparation request, wherein the target communication identifier is used for identifying communication between the target terminal and the server, and the communication identifiers of different terminals are different in order to distinguish communication between different terminals and the server. The different communication identifiers of the terminals mean that the communication identifiers of the terminals connected with the server side in the same time are different. The connection here means that the server does not log off or release the communication identifier with the terminal, unlike a long connection based on TCP, and the connection is maintained with only a small amount of server resources compared to a long connection based on TCP, and therefore, the influence on other data traffic is small.
In actual use, the server may establish connections with multiple terminals at the same time, and therefore, the connection with a specific terminal needs to be uniquely distinguished through the communication identifier. Otherwise, abnormal situations such as data transmission errors are easily caused. The target communication identification is a communication identification between the server and the target. The communication identifier may be a character string or a serial number composed of letters, numbers, and the like, as long as the connection between the server and the terminal can be uniquely identified, and in the embodiment of the present application, a specific form of the target communication identifier is not specifically limited.
After the server generates the target communication identifier, the server can send the target communication identifier to the target terminal, so that the target terminal carries the target communication identifier in various subsequent requests sent by the target terminal, and the server can determine the connection with the target terminal according to the target communication identifier and transmit data information to the terminal.
Specifically, the connection established between the server and the terminal may be an http long connection simulated by an http short connection, for example, the server may establish a short connection through UDP and simulate a TCP long connection with the terminal. I.e. the established connection, although a UDP short connection, has the characteristics of a TCP long connection. Of course, in practical application, the corresponding connection may also be generated according to different data transmission protocols between the terminal and the server. Various connection modes can be applied to the implementation of the present application as long as the requirements in the embodiments of the present application can be met.
Step 120, receiving a short-connection push request for requesting target push information sent by the target terminal, where the short-connection push request carries the target communication identifier.
When the target terminal wants to update the push information, for example, the target terminal periodically updates the push information, or the user triggers the target terminal to update the push information, the target terminal sends a short-connection push request to the server. And the server receives the short connection pushing request. The short connection push request is used for requesting the server side to send target push information, and the short connection push request carries a target communication identifier.
In the process of communication between the server and the destination terminal, the communication between the server and the destination terminal is always completed through the target communication identifier. Since the short connection push request or the like is a short connection request, which may be, for example, a request based on UDP, in order to identify the communication between the server and the destination terminal, the target communication identifier is used as an identifier for identifying the communication between the server and the destination terminal. The only communication identification corresponds to the communication between the server and the terminal, so that the server can only identify the http long connection simulated by the http short connection between the server and the terminal through the communication identification.
The target push information is information of the short connection push request, and may be set according to an actual situation, for example, set as push information updated by the server. The short connection push request can comprise an identifier of push information currently displayed in a target terminal, and if the server detects that the identifier of the push information in the short connection push request is the same as the identifier of the push information updated by the server newly, the server judges that the target push information does not exist; and if the server detects that the identifier of the push information in the short-connection push request is different from the identifier of the push information which is updated by the server newly, judging that the target push information exists. Or the server judges according to the target communication identifier, and if the latest updated push information is sent to the terminal corresponding to the target communication identifier, the server judges that the target push information does not exist; and if the latest updated push information is not sent to the terminal corresponding to the target communication identifier, judging that the target push information exists.
Step 130, when the target push information does not exist, suspending the short connection push request.
The suspended process can be defined in the operating system as temporarily eliminating the program from the memory, the resources of the machine are limited, and under the condition of limited resources, the operating system reasonably arranges the program in the memory, wherein some processes are temporarily called out of the memory, and when the conditions allow, the processes are called back to the memory by the operating system again, and enter the state waiting to be executed, namely the ready state again.
The short connection push request is used for acquiring target push information from the server. After the server receives the short connection push request, if the target push information does not exist in the current server, the method is different from the method for processing the short connection request in the related technology, the server does not directly return reply information, but puts or suspends the short connection push request, namely, the short connection push request is not processed temporarily, other data services are continuously executed, and the target push information is generated or exists in the server.
Step 140, after generating the target push information, processing the short connection push request, and sending the target push information to the target terminal according to the target communication identifier.
And after the server generates the target push information, the server reprocesses the short-connection push request, returns the target push information to the target terminal according to the target communication identifier, and deletes the short-connection push request.
In the embodiment of the application, the sending of the recommendation information is realized through the short connection, and compared with the long connection, the transmission efficiency of the push information is improved, and the occupancy rate of system resources is reduced. And the method can be suitable for the condition that long connection is not supported, and the application range is increased.
Optionally, referring to fig. 2, after receiving the short-connection push request for requesting the target push information sent by the target terminal, the method further includes:
step 150, when the target push information exists, sending the target push information to the target terminal according to the target communication identifier.
And if the target push information exists in the server, the server directly returns target base information to the target terminal according to the target communication identification.
Optionally, after suspending the short connection push request when the target push information does not exist, the method further includes:
step 160, if a preset first time threshold value passes from a target time, the target push information is not generated, and push expiration information is sent to the target terminal according to the target communication identifier, where the target time is a time when the short connection push request is received or a time when the short connection push request is suspended.
The preset first time threshold may be set as needed, and may be, for example, 30 seconds, 1 minute, 2 minutes, or the like.
And starting timing by the server from the moment when the server receives the short-connection pushing request or the moment when the server suspends the short-connection pushing request, and if the timing exceeds a preset first time threshold value, the server still does not generate or does not have target pushing information. The terminal may be sent with push expiration information that identifies push timeout, even if the target terminal can know that the target terminal has not generated or does not have the target push information within the preset first time threshold. Thus, the target terminal may adopt different strategies according to the information, for example, may give up acquiring the target push information, or may resend a new short connection push request, etc.
The server sends the push expiration information, which is equivalent to the short connection push request being responded or processed, so that the server can clear the short connection push request and does not suspend or suspend the short connection push request. For example, the short connection push request is deleted from the first message queue and the corresponding resource is released. Thereby avoiding the long-time resource occupation of the short-connection push request.
Optionally, in step 140, after generating the target push information, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier, where the step includes:
and processing the short-connection pushing request and sending the target pushing information to the target terminal according to the target communication identifier if the target pushing information is generated within a preset first time threshold from a target time, wherein the target time is the time when the short-connection pushing request is received or the time when the short-connection pushing request is suspended.
Optionally, referring to fig. 3, in step 130, after suspending the short connection push request when the target push information does not exist, the method further includes:
step 171, after receiving other information requests sent by the target terminal except the short connection push request, sending push expiration information to the target terminal according to the target communication identifier, where the other information requests are used to obtain target request information already existing in the server.
Step 172, according to the other information request, transmitting the target request information to the target terminal.
When the short-connection push request of the target terminal is suspended and the server receives other information requests sent by the target terminal, the server needs to process the suspended short-connection push request first and send push overdue information to the target terminal, so that the target terminal gives up displaying the target push information. And then target request information of other information request requests is sent to the target terminal so that the target terminal can display the target request information. This is done to prevent display confusion and display errors of the target terminal.
For example, the target terminal runs a browser a, the browser a sends a short connection push request to the server through the target terminal, the short connection push request is suspended by the server, then the browser a sends another information request C for requesting access to the web page B to the server, and when receiving the other information request C, the server needs to return push expiration information to the target terminal first, so that the target terminal gives up displaying the target push information, and then sends related data of the web page B to the target terminal, so that the target terminal displays the web page B. If the suspended short-connection pushing request is not processed first, the server may send the target recommendation information after sending the relevant data of the webpage B, so that the target terminal may suddenly jump to display the target recommendation information in the process of displaying the webpage B, the display is disordered, and even a display error of the target terminal may be caused.
Optionally, in the information push method according to the embodiment of the present application, the short connection push request is stored in a first message queue, the other information requests are stored in a second message queue, and the first message queue and the second message queue are different message queues.
The first message queue is a message buffer queue in the server, and after the server acquires the short connection push request, the short connection push request can be added into the first message queue. The server may then process the short connection push requests in the first message queue one by one in sequence. The short connection push request may be placed in the first message queue at all times when no targeted push data is generated or present. After the target push data is sent to the terminal, the corresponding short connection push request in the first message queue may be deleted, and the resource occupied by the short connection push request is released.
Since the server may receive multiple short-connection push requests, the multiple short-connection push requests may all be added to the first message queue. The plurality of short connection pushing requests can be suspended or set aside, and when the server generates or has recommendation information corresponding to each short connection pushing request, the corresponding recommendation information can be pushed to the terminal. After the push is completed, the corresponding short connection push request may be deleted from the first message queue.
Similarly, the second message queue is internal to the server and is a different message buffer queue than the first message queue. After the server side obtains other information requests, the other information requests can be added into the second message queue. The server may also receive a plurality of other information requests, and the plurality of other information requests may all join the second message queue. And the server can process other information requests in the second message queue one by one.
After receiving the other information requests, the server may buffer the other information requests in the second message queue, and then perform corresponding processing, for example, send target request information to the terminal according to the other information requests. When the transmission is completed, the corresponding other information request may be deleted from the second message queue.
In the server, a first message queue and a second message queue are respectively established for the short connection push request and other information requests. Therefore, the short connection push request and other information requests are respectively stored in different message queues, mutual series of the short connection push request and other information request messages is prevented, and mutual conflicts of the short connection push request and other information requests are reduced. Errors and faults which may occur when the server side processes the short connection push request and other information requests respectively are reduced. The reliability and the stability of the server are improved.
After the server side obtains other information requests sent by a terminal, if the terminal has sent a short connection push request before, the other information requests and the short connection push request both use the same communication identifier, that is, data is transmitted through one connection. Therefore, in order to avoid the conflict between the two requests, the server needs to process the short connection push request which is received before and is added into the first message queue, and after the processing of the short connection push request is completed, the short connection push request can be deleted from the first message queue. And then processes the other information requests which are acquired and added into the second message queue.
Optionally, the information pushing method in the embodiment of the present application further includes:
step 180, from the moment when the push expired information is sent to the target terminal, within a preset second time threshold, a new short connection push request sent by the target terminal is not received, and the first message queue and the target communication identifier are released.
The second time threshold may be set according to actual needs, and may be, for example, 3 minutes, 5 minutes, 10 minutes, or the like. In the preset second time threshold, the server side receives a message sent by the target terminal, which indicates that the target terminal may close a corresponding application program, and in order to save resources of the server side, the server side releases the first message queue and the target communication identifier of the target terminal, and the server side can also release other resources related to information push of the target terminal.
After the server sends the push expiration information to the terminal, timing can be performed again, and if the time from the time of sending the push expiration information exceeds a preset second time threshold, the server still does not receive the short connection push request sent again by the target terminal, which indicates that the target terminal has abandoned obtaining the target push information. Therefore, the server may no longer maintain a connection with the target terminal. Therefore, the server can disconnect the connection established with the terminal, where the connection refers to the communication between the server and the target terminal using the target communication identifier, and the disconnection refers to the release of the target communication identifier, i.e., the target communication identifier is not used for identifying the communication between the server and the target terminal, and various resources related to the connection are released. When receiving the push preparation request again, the server may establish a connection with the terminal again.
In the embodiment of the application, the resource of the server can be released by presetting the second time threshold, and the invalid occupation of the resource of the server is reduced.
The information push method in the embodiment of the present application may also be as shown in fig. 4: and the terminal sends an HTTP request to the server to establish connection, wherein the HTTP request is the push preparation request. After receiving the HTTP request, the server generates a communication identifier and returns the communication identifier to the terminal, and the server simulates HTTP long connection through the terminal communication identifier. And the terminal sends a short connection push request for receiving push information, wherein the request carries the communication identifier. And the server suspends the short connection pushing request, pushes the short connection pushing request to the first message queue in a connection mode, and returns the short connection pushing request when target pushing data exists. The terminal sends other information requests. And the server returns the suspended short connection pushing request of the terminal in the process of receiving other information requests, removes the corresponding connection in the first message queue, processes the other information request return and pushes the other information request return to the second message queue. And the server side does not receive the short connection pushing request for a certain time, disconnects the corresponding connection of the communication identification, releases the resource and deletes the first message queue.
The server can obtain the short connection push request when the server keeps the simulated http long connection. After the server side acquires the short connection push request, whether target push information required by the short connection push request exists at present can be firstly judged, and if the target push information exists, the target push information can be directly sent to the terminal through the determined connection corresponding to the target communication identification.
If the target push information does not exist or is not generated in the current server, the server may put the short connection push request on hold or suspend, i.e. temporarily not respond to the short connection push request, and maintain the emulated http long connection. And continuing to execute other data services, and waiting for generation or existence of target push information in the server. When the target push information is generated or appears in the server, the server can restart to process the short connection push request, and the target push information to be generated or appears is sent to the terminal through the connection corresponding to the determined target communication identifier.
In some application scenarios, the target push information may be data updated or generated on the server, and the data is generated or updated at the server at an indefinite time or period. Therefore, if the server receives a short-connection push request for acquiring the target push information before updating or generating the target push information, the server puts or suspends the short-connection push request, but the server still maintains connection with the terminal when the short-connection push request is put on hold or suspended. When the target push information is generated or updated, the server side has the target push information, so that the target push information can be pushed to the terminal through the maintained connection with the terminal.
With the above embodiment, in practical application, after the terminal and the server establish a connection, since the connection is a http long connection simulated by a http short connection, the connection can be used not only for transmitting target push information requested by a short connection push request, but also for transmitting other data information, thereby improving the universality and utilization rate of the connection between the terminal and the server.
The server receives other information requests sent by the terminal, and the other information requests are used for acquiring target request information which already exists in the server. After receiving the short connection push request sent by the terminal, the server can also continue to receive other information requests sent by the terminal. The other information request is a conventional information or data acquisition request. The other information request can be used for acquiring the conventional existing target request information of the server from the server. For example, the target request information may be a data file, a message, or other information.
And if the target push information is generated or exists in the server, the target push information is sent to the terminal through the connection corresponding to the target communication identifier, and then the target request information is sent to the terminal according to other information requests. If the target push information is not generated or does not exist in the server, sending push overdue information to the terminal through the connection corresponding to the target communication identifier, and then sending target request information to the terminal according to other information requests, wherein the push overdue information is used for indicating that the target push information does not exist or is not generated at present in the server.
After the server sends the push expiration information, the server also completes the processing or responding to the previously received short connection push request, and can release the resources occupied by the short connection push request. And processing the received other information requests, namely sending target request information to the terminal through the connection corresponding to the target communication identifier.
In the information push method of the embodiment of the application, the received short connection push request sent by the terminal is cached in the first message queue, and the received other information requests sent by the terminal are cached in the second message queue.
The first message queue is an information cache queue in the server, and after the server acquires the short connection push request, the short connection push request can be added into the first message queue. The server may then process or respond to the short connection push requests in the first message queue one by one in sequence. The short connection push request may be suspended when the first target data is not generated or present. After the first target data is sent to the terminal, the corresponding short connection push request in the first message queue may be deleted, and the resource corresponding to the short connection push request is released at the same time. Since the server may receive multiple short-connection push requests, the multiple short-connection push requests may all be added to the first message queue. The plurality of short connection push requests can be suspended or set aside, and when the server generates or has target push information corresponding to each short connection push request, the server can push the corresponding target push information to the terminal. After the push is completed, the corresponding short connection push request may be deleted from the first message queue.
Similarly, the second message queue is an information buffer queue internal to the server and different from the first message queue. After the server side obtains other information requests, the other information requests can be added into the second message queue. The server may also receive a plurality of other information requests, and the plurality of other information requests may all join the second message queue. And the server can process other information requests in the second message queue one by one. The server receives other information requests, and can directly perform corresponding processing on the other information requests without suspending or suspending the other information requests, for example, sending target request information to the terminal according to the other information requests. When the transmission is completed, the corresponding other information request may be deleted from the second message queue.
In the server, a first message queue and a second message queue are respectively established for the short connection push request and other information requests. Therefore, other information requests and short connection pushing requests are respectively stored in different information queues, and collision caused by the fact that the same connection is adopted is avoided. The method and the device avoid errors and faults which may occur when the server side processes other information requests and short connection pushing requests respectively. The reliability and the stability of the server are improved.
After the server obtains other information requests sent by a terminal, if the terminal has sent a short connection push request before, in order to avoid a conflict between the two requests, the server needs to respond to the short connection push request in the first message queue received before, and after the response to the short connection push request is completed, the short connection push request can be deleted from the first message queue. And then processes or responds to other information requests that are obtained and added to the second message queue.
And if no target push information is generated or does not exist in the server side after a preset first time threshold value from the moment of receiving the short-connection push request, sending a push overdue message to the terminal through the target communication identifier, wherein the push overdue message is used for indicating that no target push information is generated or does not exist in the server side within the preset first time threshold value.
The server sends the push overdue message, which is equivalent to that the short connection push request is responded or processed, so that the short connection push request can be cleared, and the short connection push request is not continuously put aside or hung up. For example, the short connection push request is deleted from the first message queue and the corresponding resource is released. Thereby avoiding the long-time resource occupation of the short-connection push request.
And if the preset second time threshold value is passed from the moment of sending the push expiration message and the short connection push request sent again by the terminal is not received, disconnecting the connection with the terminal.
After the server sends the timeout information to the terminal, timing may be performed again, and if the time for sending the timeout information exceeds the preset second time threshold, the server still does not receive the short-connection push request sent again by the terminal, which indicates that the terminal has abandoned obtaining the target push information, or the terminal does not need the target push information any more. The server may no longer maintain the connection with the terminal. Therefore, the server can disconnect the connection established with the terminal and release various resources related to the connection. And when the push preparation request is received again, establishing connection with the terminal.
In the embodiment of the application, a server receives a push preparation request sent by a terminal, establishes connection with the terminal, and then sends a target communication identifier corresponding to the connection to the terminal, so that the terminal adds the target communication identifier in a short connection push request sent subsequently; the server receives a short connection pushing request sent by the terminal, and determines a connection corresponding to a target communication identifier according to the target communication identifier in the short connection pushing request; and when the server generates or has the target push information, the server sends the target push information to the terminal through the connection corresponding to the target communication identifier. Therefore, after the terminal sends the short connection pushing request once, when the server generates or has the target pushing information requested by the short connection pushing request, the server sends the target pushing information to the terminal through the previously established and maintained connection, and the high-frequency data request sent by the terminal to the server is avoided, so that the waste of network resources and network congestion are avoided, and the equipment burden is reduced. In addition, after receiving the short-connection pushing request, the server can put or suspend the short-connection pushing request, and once the target pushing information exists or is generated in the server, the target pushing information is sent to the terminal, so that the real-time performance of the target pushing information is guaranteed. By presetting the first time threshold and the second time threshold, the active response to the short-connection pushing request and the active disconnection from the terminal can be realized under the condition that no target pushing information is generated or exists. The method and the device avoid long-time occupation of resources of the server side and also avoid the situations that the short-connection pushing request and the connection with the terminal cannot be terminated when the target pushing information cannot be generated.
Referring to fig. 5, fig. 5 is a schematic view illustrating a flow chart of an information pushing method applied to a terminal according to an embodiment of the present application, where the method includes:
step 210, sending a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, wherein the communication identifiers of the terminals are different.
The terminal may send a push preparation request to the server. Specifically, the connection established between the terminal and the server may be an http long connection simulated by an http short connection, for example, the server may simulate a TCP long connection with the terminal by a UDP short connection. I.e. the established connection is a UDP short connection but has the characteristics of a TCP long connection, the server can suspend and maintain the simulated TCP long connection.
The connection established between the terminal and the server is asynchronous, that is, after the connection is established, the terminal can continue to execute other data services, and the connection does not affect other data services.
Step 220, receiving the target communication identifier sent by the server.
The terminal may receive a target communication identifier sent by the server, where the target communication identifier may uniquely correspond to a connection established between the server and the terminal.
Step 230, sending a short connection push request to the server, where the short connection push request carries the target communication identifier, and the short connection push request is used to obtain target push information from the server.
After the connection is established, the terminal can send a short connection pushing request to the server, and add the received target communication identifier into the short connection pushing request, so that the server can determine the connection with the terminal through the target communication identifier.
The short connection push request is used for acquiring target push information from the server. And, the short connection push request is different from the conventional data request, the short connection push request is used to obtain the specified target push information, but does not require the server side to immediately return the target push information.
Step 240, receiving the target push information sent by the server according to the target communication identifier, and displaying the target push information.
After sending the short connection push request, the terminal does not need to continuously wait for the returned target push information, and can continue to execute other data services. When the target push information is generated or exists in the server side, the server side can actively send the target push information to the terminal through the connection corresponding to the target communication identification. So that the terminal can receive the targeted push information.
The implementation process of the server is as described above in the information push method applied to the server, and is not described herein again.
In the embodiment of the application, after the terminal sends the short connection push request once, and after the server generates or has the target push information requested by the short connection push request, the server sends the target push information to the terminal through the previously established and maintained connection, so that the high-frequency data request sent by the terminal to the server is avoided, the waste of network resources and the network congestion are avoided, and the equipment burden is reduced. In addition, after receiving the short-connection pushing request, the server can put or suspend the short-connection pushing request, and once the target pushing information exists or is generated in the server, the target pushing information is sent to the terminal, so that the real-time performance of the target pushing information is guaranteed.
Optionally, in the information pushing method provided in the embodiment of the present application, in step 230, after sending the short connection push request to the server, the method further includes:
and step 250, receiving the push expiration information sent by the server according to the target communication identifier without updating push.
When the terminal receives the push expiration information, it indicates that the server does not have target push information, for example, the server does not generate new push information, and therefore the terminal does not update push, for example, push information in the display page is not updated. Because asynchronous connection is adopted, the terminal can also send other request information after sending the short connection pushing request and before not receiving the reply of the short connection pushing request. Of course, the terminal may also send other request information after receiving the reply of the short connection push request. The implementation process of the server is as described above in the information push method applied to the server, and is not described herein again.
An embodiment of the present application further provides an information pushing apparatus, located at a server, referring to fig. 6, where the apparatus includes:
a communication identifier generating module 601 configured to generate a target communication identifier for communicating with a target terminal that transmits a push preparation request after receiving the push preparation request, and transmit the target communication identifier to the target terminal, where communication identifiers of terminals are different;
a push request receiving module 602 configured to receive a short connection push request for requesting target push information sent by the target terminal, where the short connection push request carries the target communication identifier;
a push request suspension module 603 configured to suspend the short connection push request when the target push information does not exist;
a first push information sending module 604, configured to process the short connection push request after generating the target push information, and send the target push information to the target terminal according to the target communication identifier.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
and the second push information sending module is configured to send the target push information to the target terminal according to the target communication identifier when the target push information exists.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
a first expiration information sending module, configured to send push expiration information to the target terminal according to the target communication identifier if a preset first time threshold has passed since a target time, where the target time is a time when the short connection push request is received or a time when the short connection push request is suspended, and the target push information is not generated.
Optionally, the first push information sending module 604 is specifically configured to:
and processing the short-connection pushing request and sending the target pushing information to the target terminal according to the target communication identifier if the target pushing information is generated within a preset first time threshold from a target time, wherein the target time is the time when the short-connection pushing request is received or the time when the short-connection pushing request is suspended.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
a second outdated information sending module, configured to send, after receiving another information request sent by the target terminal except for the short connection push request, pushed outdated information to the target terminal according to the target communication identifier, where the another information request is used to obtain target request information already existing in the server;
and a request information sending module configured to send the target request information to the target terminal according to the other information request.
Optionally, in the information pushing apparatus at the server in the embodiment of the present application, the short connection pushing request is stored in a first message queue, the other information requests are stored in a second message queue, and the first message queue and the second message queue are different message queues.
Optionally, the information pushing device located at the server in the embodiment of the present application further includes:
and the resource release module is configured to release the first message queue and the target communication identifier when a new short-connection push request sent by the target terminal is not received within a preset second time threshold from the time when the push expiration information is sent to the target terminal.
An embodiment of the present application provides an information pushing apparatus, located at a terminal, see fig. 7, where the apparatus includes:
an accurate request sending module 701 configured to send a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, where the communication identifiers of the terminals are different;
a communication identifier receiving module 702 configured to receive a target communication identifier sent by the server;
a push request sending module 703 configured to send a short connection push request to the server, where the short connection push request carries the target communication identifier, and the short connection push request is used to obtain target push information from the server;
a push information receiving module 704 configured to receive the target push information sent by the server according to the target communication identifier, and display the target push information.
Optionally, the information pushing device located at the terminal in the embodiment of the present application further includes:
and the expired information receiving module is configured to receive the push expired information sent by the server according to the target communication identifier without updating push.
An embodiment of the present application further provides a server, including: a processor 801 and a memory 802.
The memory 801 stores a computer program.
The processor 802 is configured to implement the following steps when executing the program stored in the memory 802:
after receiving a push preparation request, generating a target communication identifier for communicating with a target terminal sending the push preparation request, and sending the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different;
receiving a short connection push request for requesting target push information sent by the target terminal, wherein the short connection push request carries the target communication identifier;
when the target push information does not exist, suspending the short connection push request;
and after the target push information is generated, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier.
Optionally, the server further includes a communication interface and a communication bus, where the processor 801, the communication interface, and the memory 802 complete communication with each other through the communication bus.
Optionally, the processor 801 is configured to implement any of the information pushing methods applied to the server when executing the program stored in the memory 802.
An embodiment of the present application further provides a terminal, including: a processor and a memory.
A memory for storing a computer program.
The processor is used for realizing the following steps when executing the program stored in the memory:
sending a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, wherein the communication identifiers of all terminals are different;
receiving a target communication identifier sent by the server;
sending a short connection pushing request to the server, wherein the short connection pushing request carries the target communication identifier, and the short connection pushing request is used for acquiring target pushing information from the server;
and receiving the target push information sent by the server according to the target communication identifier, and displaying the target push information.
Optionally, the terminal further includes a communication interface and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus.
Optionally, when the processor is configured to execute the program stored in the memory, any of the above information push methods applied to the terminal may also be implemented.
The communication bus mentioned in the server and the terminal may be a PCI (Peripheral component interconnect) bus, an EISA (Extended Industry standard architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a RAM (Random Access Memory) or an NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the information push method applied to a server in any of the foregoing embodiments.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the information push method applied to a terminal in any of the above embodiments.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the information push methods applied to a server in the foregoing embodiments.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the information push method applied to a terminal in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (18)

1. An information pushing method is applied to a server side, and the method comprises the following steps:
after receiving a push preparation request, generating a target communication identifier for communicating with a target terminal sending the push preparation request, and sending the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different;
receiving a short connection push request for requesting target push information, which is sent by the target terminal, wherein the short connection push request carries the target communication identifier;
when the target push information does not exist, suspending the short connection push request;
and after the target push information is generated, processing the short connection push request, and sending the target push information to the target terminal according to the target communication identifier.
2. The method according to claim 1, wherein after said receiving the short connection push request for requesting the target push information sent by the target terminal, the method further comprises:
and when the target push information exists, sending the target push information to the target terminal according to the target communication identifier.
3. The method of claim 1, wherein after suspending the short connection push request when the target push information is not present, the method further comprises:
and if a preset first time threshold value is passed from a target moment, the target push information is not generated, and push overdue information is sent to the target terminal according to the target communication identifier, wherein the target moment is the moment when the short-connection push request is received or the moment when the short-connection push request is suspended.
4. The method according to claim 1 or 3, wherein the processing the short connection push request after generating the target push information, and sending the target push information to the target terminal according to the target communication identifier comprises:
and from a target moment, if the target push information is generated within a preset first time threshold, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier, wherein the target moment is the moment when the short-connection push request is received or the moment when the short-connection push request is suspended.
5. The method of claim 1, wherein after suspending the short connection push request when the target push information is not present, the method further comprises:
after receiving other information requests except the short connection pushing request sent by the target terminal, sending pushing overdue information to the target terminal according to the target communication identifier, wherein the other information requests are used for acquiring target request information existing in the server;
and sending the target request information to the target terminal according to the other information requests.
6. The method of claim 5, wherein the short connection push request is stored in a first message queue and the other information requests are stored in a second message queue, and wherein the first message queue and the second message queue are different message queues.
7. The method of claim 6, further comprising:
and after the moment of sending the expired information to the target terminal, within a preset second time threshold, not receiving a new short connection pushing request sent by the target terminal, and releasing the first message queue and the target communication identifier.
8. An information pushing method is applied to a terminal, and the method comprises the following steps:
sending a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, wherein the communication identifiers of all terminals are different;
receiving a target communication identifier sent by the server;
sending a short connection pushing request to the server, wherein the short connection pushing request carries the target communication identifier, and the short connection pushing request is used for acquiring target pushing information from the server;
and receiving the target push information sent by the server according to the target communication identifier, and displaying the target push information.
9. The method of claim 8, wherein after the sending the short connection push request to the server, the method further comprises:
and receiving the push overdue information sent by the server according to the target communication identifier without updating push.
10. An information pushing apparatus, located at a server, the apparatus comprising:
the communication identifier generation module is configured to generate a target communication identifier for communicating with a target terminal sending a push preparation request after receiving the push preparation request, and send the target communication identifier to the target terminal, wherein the communication identifiers of the terminals are different;
a push request receiving module configured to receive a short connection push request for requesting target push information sent by the target terminal, where the short connection push request carries the target communication identifier;
a push request suspension module configured to suspend the short connection push request when the target push information does not exist;
and the first push information sending module is configured to process the short connection push request after the target push information is generated, and send the target push information to the target terminal according to the target communication identifier.
11. The apparatus of claim 10, further comprising:
and the second push information sending module is configured to send the target push information to the target terminal according to the target communication identifier when the target push information exists.
12. The apparatus of claim 10, further comprising:
and the first outdated information sending module is configured to send push outdated information to the target terminal according to the target communication identifier if a preset first time threshold value passes from a target time, wherein the target time is the time when the short-connection push request is received or the time when the short-connection push request is suspended.
13. The apparatus according to claim 10 or 12, wherein the first push information sending module is specifically configured to:
and from a target moment, if the target push information is generated within a preset first time threshold, processing the short-connection push request, and sending the target push information to the target terminal according to the target communication identifier, wherein the target moment is the moment when the short-connection push request is received or the moment when the short-connection push request is suspended.
14. The apparatus of claim 10, further comprising:
a second outdated information sending module, configured to send, after receiving other information requests except the short connection push request sent by the target terminal, push outdated information to the target terminal according to the target communication identifier, where the other information requests are used to obtain target request information already existing in the server;
and the request information sending module is configured to send the target request information to the target terminal according to the other information requests.
15. The apparatus of claim 14, wherein the short connection push request is stored in a first message queue and the other information requests are stored in a second message queue, and wherein the first message queue is a different message queue than the second message queue.
16. The apparatus of claim 15, further comprising:
and the resource release module is configured to release the first message queue and the target communication identifier when a new short-connection push request sent by the target terminal is not received within a preset second time threshold from the time when the push expiration information is sent to the target terminal.
17. An information pushing apparatus, located at a terminal, the apparatus comprising:
the accurate request sending module is configured to send a push preparation request to a server, so that the server generates and returns a target communication identifier after receiving the push preparation request, wherein the communication identifiers of the terminals are different;
the communication identifier receiving module is configured to receive a target communication identifier sent by the server;
a push request sending module configured to send a short connection push request to the server, where the short connection push request carries the target communication identifier, and the short connection push request is used to obtain target push information from the server;
and the push information receiving module is configured to receive the target push information sent by the server according to the target communication identifier and display the target push information.
18. The apparatus of claim 17, further comprising:
and the expired information receiving module is configured to receive the push expired information sent by the server according to the target communication identifier without updating push.
CN201811431914.8A 2018-11-28 2018-11-28 Information pushing method, device, server and storage medium Active CN111245874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811431914.8A CN111245874B (en) 2018-11-28 2018-11-28 Information pushing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811431914.8A CN111245874B (en) 2018-11-28 2018-11-28 Information pushing method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111245874A true CN111245874A (en) 2020-06-05
CN111245874B CN111245874B (en) 2023-12-05

Family

ID=70863731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811431914.8A Active CN111245874B (en) 2018-11-28 2018-11-28 Information pushing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111245874B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000148A (en) * 2020-07-09 2020-11-27 合肥美的智能科技有限公司 Temperature control method, temperature control equipment and device for container

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904962A (en) * 2012-10-23 2013-01-30 深圳市汇智集信息科技有限公司 Message pushing system and message pushing method thereof
US20140148205A1 (en) * 2012-11-27 2014-05-29 Alcatel-Lucent Canada Inc. Push service without persistent tcp connection in a mobile network
CN105162838A (en) * 2015-07-30 2015-12-16 青岛海尔智能家电科技有限公司 Message pushing method, and method and device for receiving pushed message
CN106209951A (en) * 2015-05-08 2016-12-07 北京娜迦信息科技发展有限公司 Information transferring method, client and server
CN107947960A (en) * 2017-10-13 2018-04-20 用友网络科技股份有限公司 The method for pushing and system of configuration information, the method for reseptance and system of configuration information

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5736599B2 (en) * 2013-10-11 2015-06-17 株式会社セガゲームス Push notification management device, push notification management method, and push notification management program
CN104660648B (en) * 2013-11-25 2018-01-30 中国移动通信集团公司 A kind of message push system, method, apparatus and relevant device
CN105898446A (en) * 2015-12-14 2016-08-24 乐视网信息技术(北京)股份有限公司 Advertisement push method and device, video server and terminal equipment
CN106569899A (en) * 2016-11-03 2017-04-19 努比亚技术有限公司 Ajax communication system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904962A (en) * 2012-10-23 2013-01-30 深圳市汇智集信息科技有限公司 Message pushing system and message pushing method thereof
US20140148205A1 (en) * 2012-11-27 2014-05-29 Alcatel-Lucent Canada Inc. Push service without persistent tcp connection in a mobile network
CN104813637A (en) * 2012-11-27 2015-07-29 阿尔卡特朗讯 Push service without persistent TCP connection in mobile network
CN106209951A (en) * 2015-05-08 2016-12-07 北京娜迦信息科技发展有限公司 Information transferring method, client and server
CN105162838A (en) * 2015-07-30 2015-12-16 青岛海尔智能家电科技有限公司 Message pushing method, and method and device for receiving pushed message
CN107947960A (en) * 2017-10-13 2018-04-20 用友网络科技股份有限公司 The method for pushing and system of configuration information, the method for reseptance and system of configuration information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000148A (en) * 2020-07-09 2020-11-27 合肥美的智能科技有限公司 Temperature control method, temperature control equipment and device for container
CN112000148B (en) * 2020-07-09 2022-04-19 合肥美的智能科技有限公司 Temperature control method, temperature control equipment and device for container

Also Published As

Publication number Publication date
CN111245874B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
US10587544B2 (en) Message processing method, processing server, terminal, and storage medium
US7945673B2 (en) Reduced wireless internet connect time
US9753794B2 (en) Method and apparatus for controlling sending of heartbeat signal
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN108833950B (en) Barrage message issuing method, server, system and storage medium
US20040186918A1 (en) Method and apparatus for dispatching incoming data in a multi-application terminal
JP6676080B2 (en) Method and system for installing an application version via near field communication
US10021182B2 (en) Method and apparatus for data synchronization
WO2013044671A1 (en) Internet access method, terminal and storage medium
CN103516785A (en) Web page proxy system and communication method thereof
CN110851290A (en) Data synchronization method and device, electronic equipment and storage medium
WO2016197727A1 (en) Data transmission method and device
WO2014179950A1 (en) File uploading method, client, and server
WO2021087892A1 (en) Resource subscription method and device, and storage medium
WO2017004990A1 (en) Notification pushing method and device
CN111245874B (en) Information pushing method, device, server and storage medium
EP3384660A1 (en) Accelerating connections to a host server
KR101367265B1 (en) Push server, push service providing system and method of the same
CN107087011B (en) Method, device and system for realizing remote access
CN108259576B (en) Software and hardware real-time information transmission system and method
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN116308671A (en) Online bidding method based on MQTT protocol, electronic equipment and storage medium
WO2018132557A1 (en) Dynamic protocol switching
CN110233744B (en) Conference state display method, conference state updating method and device
CN113794622A (en) Message processing method and device, electronic equipment and storage medium

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