CN113556352B - Information pushing method and device, terminal equipment and storage medium - Google Patents

Information pushing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN113556352B
CN113556352B CN202110852691.8A CN202110852691A CN113556352B CN 113556352 B CN113556352 B CN 113556352B CN 202110852691 A CN202110852691 A CN 202110852691A CN 113556352 B CN113556352 B CN 113556352B
Authority
CN
China
Prior art keywords
information
pushed
identification information
pulled
identification
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.)
Active
Application number
CN202110852691.8A
Other languages
Chinese (zh)
Other versions
CN113556352A (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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202110852691.8A priority Critical patent/CN113556352B/en
Publication of CN113556352A publication Critical patent/CN113556352A/en
Application granted granted Critical
Publication of CN113556352B publication Critical patent/CN113556352B/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
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/403Arrangements for multi-party communication, e.g. for conferences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • 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

Abstract

The disclosure discloses an information pushing method, an information pushing device, terminal equipment and a storage medium. The method comprises the following steps: acquiring pushed identification information and an information set, wherein the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed; searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information; when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from a server; when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found; and transmitting the information to be pushed. By the method, the occurrence of the communication abnormal condition can be timely known in an active pulling mode, and the conference quality is improved.

Description

Information pushing method and device, terminal equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, and in particular relates to an information pushing method and device, a terminal device and a storage medium.
Background
An audio-video conference is a teleconference providing audio and video services, such as a video conference, which refers to a conference in which people at two or more locations have face-to-face conversations through communication devices and networks. Video conferences can be divided into point-to-point conferences and multipoint conferences according to different numbers of participating places. Individuals in daily life have no requirements on conversation content security, conference quality and conference scale, however, reliable conference quality is required for audio-video chatting by adopting audio-video software.
The conference quality of the audio-video conference is determined by various factors, such as the continuity of information push of both audio and video parties. However, when there is an abnormality in communication, the information pushed by both audio and video may be lost. At present, if the pushed information is lost, the loss can be perceived only after the next pushed information is received, thereby affecting the conference quality.
Disclosure of Invention
The embodiment of the disclosure provides an information pushing method and device, a terminal device and a storage medium, which can timely know the occurrence of a communication abnormal condition and improve conference quality.
In a first aspect, an embodiment of the present disclosure provides an information pushing method, including:
acquiring pushed identification information and an information set, wherein the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server;
when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found;
and transmitting the information to be pushed.
In a second aspect, an embodiment of the present disclosure further provides an information pushing apparatus, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring pushed identification information and an information set, and the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
the searching module is used for searching the information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
the pull module is used for pulling the information from the server when the information to be pushed corresponding to the pushed identification information is not found;
the judging module is used for returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found when the pulled information meets the set pulling condition;
and the transmission module is used for transmitting the information to be pushed.
In a third aspect, an embodiment of the present disclosure further provides a terminal device, including:
one or more processing devices;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processing devices, so that the one or more processing devices implement the information pushing method provided by the embodiment of the disclosure.
In a fourth aspect, the present disclosure further provides a computer readable medium, where a computer program is stored, where the computer program is executed by a processing apparatus to implement the information pushing method provided by the present disclosure.
The embodiment of the disclosure provides an information pushing method, an information pushing device, terminal equipment and a storage medium, firstly, pushed identification information and an information set are obtained, and information to be pushed and pushing identification information corresponding to the information to be pushed are stored in the information set; secondly, searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information; then when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server; then, when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found; and finally, transmitting the information to be pushed. By means of the technical scheme, the occurrence of the communication abnormal condition can be timely known in an active pulling mode, and the conference quality is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of an information pushing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of an information pushing method according to a second embodiment of the present disclosure;
fig. 2a is a schematic diagram of a push order-preserving process according to an embodiment of the disclosure;
FIG. 2b is a schematic flow chart illustrating a consuming thread according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an information pushing apparatus according to a third embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein is intended to be open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution. Furthermore, the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
Example one
Fig. 1 is a schematic flowchart of an information pushing method provided in an embodiment of the present disclosure, where the method is applicable to a client for information pushing, and the method may be executed by an information pushing apparatus, where the apparatus may be implemented by software and/or hardware and is generally integrated on a terminal device, where in this embodiment, the terminal device includes but is not limited to: computers, mobile phones, personal digital assistants, and the like. The terminal device in the present disclosure may be considered as a client, and the terminal device may receive information to be pushed transmitted by the server, and then push the information to an upper layer of the terminal device, that is, a service layer, so as to implement information pushing.
As shown in fig. 1, a first information push provided in the embodiment of the present disclosure includes the following steps:
s110, pushed identification information and an information set are obtained, and the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed.
In this embodiment, the pushed identification information may be understood as identification information of information that has been currently pushed to an upper layer (e.g., a service layer in the terminal device). An information set may be understood as a collection of information received by the terminal device from the server to be pushed to the upper layers. The information to be pushed may be considered information waiting to be pushed to an upper layer. The push identification information may be understood as identification information for determining which information to be pushed is to be pushed to an upper layer. The push identification information may be identification information of information to be pushed corresponding to the push identification information; or may be the identification information of the information to be pushed which is previous to the information to be pushed and corresponds to the pushing identification information.
In an embodiment, the information set includes three pieces of information to be pushed, the pushing identification information corresponding to the first piece of information to be pushed may indicate that the piece of information to be pushed is the 1 st piece of information to be pushed, the pushing identification information corresponding to the second piece of information to be pushed may indicate that the piece of information to be pushed is the 2 nd piece of information to be pushed, and the pushing identification information corresponding to the third piece of information to be pushed may indicate that the piece of information to be pushed is the 3 rd piece of information to be pushed. Such as using the sequence number of the information to be pushed as its identification information.
In an embodiment, the information set includes three pieces of information to be pushed, the push identification information corresponding to the first piece of information to be pushed may represent a sequence number of the last piece of information to be pushed of the piece of information to be pushed, and if the sequence number of the first piece of information to be pushed is 2, the push identification information corresponding to the first piece of information to be pushed is 1.
When information pushing is carried out, the information pushing is completed based on the pushed identification information and the information set. First, the present disclosure may form an information set according to information to be pushed read from a server, so as to obtain the information set. The step can obtain the information set stored in the local terminal and the pushed identification information in the information pushing process.
In this embodiment, the pushed identification information may be null, and in this step, the pushed identification information with the smallest pushed identification information in the information set may be used as the pushed identification information, so as to obtain the pushed identification information. When the information which is successfully pushed currently exists, the pushed identification information can be determined based on the pushing identification information of the information which is successfully pushed last, so as to obtain the pushed identification information.
In this embodiment, the pushed identification information and the pushed identification information may be sequence numbers.
S120, searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information.
After obtaining the pushed identification information and the information set, the step may search the information set to determine the information to be pushed corresponding to the pushed identification information, that is, search the information to be pushed corresponding to the pushed identification information from the information set. In this embodiment, the specific search means is determined based on the specific setting of the push identification information, which is not limited herein.
The push identification information and the information to be pushed are in a one-to-one correspondence relationship, and the push identification information may be identification information of the last information to be pushed or identification information of the corresponding information to be pushed.
In an example, if the push identification information is identification information of the last information to be pushed, the step may search, from the information set, push identification information that is the same as the pushed identification information as the information to be pushed corresponding to the pushed identification information, and exemplarily, two pieces of information to be pushed exist in the information set, which are information a to be pushed (corresponding to identification information M) and information B to be pushed, respectively. The setting manner of the push identifier of the information a to be pushed is not limited.
In an example, if the pushing identification information is identification information corresponding to information to be pushed, this step may search, from the information set, for minimum pushing identification information larger than the pushed identification information as information to be pushed corresponding to the pushed identification information. Illustratively, two pieces of information to be pushed exist in the information set, namely information a to be pushed and information B to be pushed respectively, the pushing identification information of the information a to be pushed, the pushing identification information of the information B to be pushed and the pushing identification information of the information C to be pushed can be i, j and k respectively, the pushing identification information can be set based on the time sequence increasing stored in the information set, and if the information a to be pushed, the information B to be pushed and the information C to be pushed are stored in the information set in sequence, the numerical values of i, j and k are increased in sequence. When the pushed identification information is i, representing that the information A to be pushed corresponding to the pushed identification information i is pushed, and the next information to be pushed after the information A to be pushed needs to be pushed, acquiring the minimum pushed identification information j larger than i from the information set, and then acquiring the information B to be pushed corresponding to the pushed identification information j.
When the information to be pushed corresponding to the pushed identification information is found, the embodiment may push the found information to be pushed to an upper layer.
S130, when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server.
And when the information to be pushed corresponding to the pushed identification information is not found, the step can pull the information from the service area through a pulling interface. The information to be pulled may be all information to be pushed after the identification information has been pushed, and is not limited herein. And the scene of the information to be pushed which is not searched and corresponds to the pushed identification information is not limited.
In one example, the information to be pushed corresponding to the pushed identification information is lost, which may result in that the information to be pushed corresponding to the pushed identification information is not found when the information set is found. If the information to be pushed in the information set is to-be-pushed information a (corresponding identification information is 1), information B to be pushed (corresponding pushing identification information is 1, corresponding identification information is 2), and information D to be pushed (corresponding pushing identification information is 3, corresponding identification information is 4), the information C to be pushed (corresponding pushing identification information is 2, corresponding identification information is 3) is lost, the information a to be pushed and the information B to be pushed are currently pushed to the upper layer, the pushed identification information is 2, the information B to be pushed, representing identification information 3, has been pushed to the upper layer, when the information set is searched based on the pushed identification information 2, the information C to be pushed, corresponding to the pushed identification information 2, is searched, but the information C to be pushed in the information set is lost, so that the information to be pushed corresponding to the pushed identification information cannot be searched.
In an embodiment, after the information to be pushed transmitted to the terminal device by the server is pushed to the upper layer by the terminal device, the information to be pushed corresponding to the pushed identification information may not be found, and if the information to be pushed that is pushed to the terminal device by the server is information a to be pushed (corresponding identification information is 1) and information B to be pushed (corresponding pushing identification information is 1 and corresponding identification information is 2), where the information B to be pushed is already pushed to the upper layer and the pushed identification information is 2, the information to be pushed with the pushed identification information being 2 needs to be found when the information set is found, but the information set does not currently have the pushed identification information, so the information to be pushed corresponding to the pushed identification information cannot be found.
In this embodiment, the information to be pushed corresponding to the pushed identification information may be considered as the information to be pushed searched based on the pushed identification information.
S140, when the pulled information meets the set pulling condition, the step of obtaining the pushed identification information and the pushed information set is returned to be executed until the information to be pushed is found.
The pull condition may be considered as a condition that triggers pulling information again. The information to be pushed may be the information to be pushed corresponding to the pushed identification information, or may be the information to be pushed next to the information to be pushed corresponding to the pushed identification information.
The specific content of the pull condition may be determined based on the specific content characterized by the pull information without limitation. If the pulled information represents that no data is pulled and the information set is empty, in order to avoid discontinuous data packets, the step can continue to trigger execution of the acquisition operation, that is, the step of acquiring the information set and the pushed identification information is returned, the acquired information set can be an updated information set, and the acquired pushed identification information can also be updated pushed identification information, so that information is continuously pulled, and therefore, even if the latest information is lost and the next information (i.e., information to be pushed) is not read, pulling can be triggered to pull the latest pushing.
When the pulled information pulls information, or the pulled information representation information set is not empty, or when a push notification is received, the information to be pushed can be successfully read from the information set. The push notification may be regarded as a notification that triggers the terminal device to push information. The push notification can be triggered after new information to be pushed, pushed by the server, is read and stored in the information set.
S150, transmitting the information to be pushed.
After the information to be pushed is found, the information to be pushed can be pushed to the upper layer in the step.
After the information to be pushed is pushed, the present embodiment may delete the information to be pushed and the corresponding pushing identification information from the information set.
The information pushing method provided by the first embodiment of the disclosure includes acquiring pushed identification information and an information set, wherein the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed; secondly, searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information; then when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server; then, when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found; and finally, transmitting the information to be pushed. By means of the technical scheme, the occurrence of the communication abnormal condition can be timely known in an active pulling mode, and the conference quality is improved.
On the basis of the above-described embodiment, a modified embodiment of the above-described embodiment is proposed, and it is to be noted here that, in order to make the description brief, only the differences from the above-described embodiment are described in the modified embodiment.
In one embodiment, the pull condition comprises one of:
the pulled information represents that the pulling fails, the information set is empty, and the time length for which the push notification is not received reaches a first set time length;
the pulled information represents that the pulling is successful, the pulled information represents that the information is not pulled, the information set is empty, and the time length for which the push notification is not received reaches a second set time length.
The specific values of the first set duration and the second set duration are not limited, and may be determined according to the actual service scenario, for example, 5s.
The pulled information represents that pulling fails, the information set is empty, the server is represented to be abnormal when the time length of the information set which does not receive the push notification reaches a first set time length, the information to be pushed (such as the information A to be pushed and the information B to be pushed) in the information set is currently pushed to the upper layer (namely the information to be pushed is not pushed to the upper layer), and the time length of the information set which does not receive the push notification (namely the server does not send new information to be pushed) reaches the first set time length, the step of obtaining the pushed identification information and the information set can be triggered and returned, so that the operation of pulling the information from the server is triggered, and the continuity of pushing the information to be pushed to the upper layer is ensured.
The pulled information representation is successfully pulled, the pulled information representation is not pulled, the information set is a null representation, the information to be pushed in the current information set is pushed to the upper layer, the information to be pushed in the current information set is successfully pulled from the server, and the server does not have a scene of the information to be pushed. In this scenario, if the duration of not receiving the push notification reaches a second set duration, the step of returning to obtain the pushed identification information and the information set is triggered to trigger the operation of pulling the information from the server, so as to ensure the continuity of pushing the information to be pushed to the upper layer.
Illustratively, the information set includes information a to be pushed (corresponding identification information is 1) and information B to be pushed (corresponding pushing identification information is 1, and corresponding identification information is 2), at this time, the information set includes all information to be pushed by the server, there is no situation that the information to be pushed is lost, when the pushed identification information is 2 (at this time, the information set is empty), the corresponding information to be pushed is not found in the information set, and therefore the information to be pushed is pulled to the server, at this time, the information to be pushed after the information B to be pushed does not exist in the server, so the information to be pushed is pulled successfully but the information to be pushed is not pulled. At this point, the pushed identification information and information set will continue to be acquired.
In one embodiment, the method further comprises:
when the pulled information represents that the pulling fails and the information set is not empty, updating the pushed identification information according to the pushed identification information in the information set and then continuously searching the information set;
when the pulled information representation is pulled successfully and the pulled information representation is pulled to obtain information, updating the information set according to the pulled information, and returning to the step of obtaining pushed identification information and the information set until the information to be pushed is found;
and when the pulled information representation is successfully pulled, the pulled information representation does not pull information, and the information set is not empty, updating the pushed identification information and then continuously searching the information set.
The present embodiment may update the pushed identification information based on the content included in the information set, so that the information to be pushed can be read and pushed to the upper layer.
And when the pulled information representation is successfully pulled, the pulled information representation successfully pulls the information representation to acquire the information to be pushed from the server, so that the information to be pushed is orderly pushed.
The method specifically comprises the following two scenes:
scene 1: all information to be pushed in an information set is transmitted to an upper layer, the information set comprises information A to be pushed (corresponding identification information is 1) and information B to be pushed (corresponding pushing identification information is 1, corresponding identification information is 2), pushed identification information is 2, the information to be pushed with the pushing identification information being 2 is not found in the information set and is pulled to a server, the pulling is successful, and the information C to be pushed (corresponding pushing identification information is 2, corresponding identification information is 3) and the information D to be pushed (corresponding pushing identification information is 3, corresponding identification information is 4) are pulled, the information set needs to be updated, if the information C to be pushed and the information D to be pushed are added to the information set, and then the step of obtaining the information set and the pushed identification information is continuously executed.
Scene 2: the information set is lost with identification information to be pushed, the information set comprises information A to be pushed (corresponding identification information is 1), information B to be pushed (corresponding pushing identification information is 1, corresponding identification information is 2) and information D to be pushed (corresponding pushing identification information is 3, corresponding identification information is 4), information C to be pushed (corresponding pushing identification information is 2, corresponding identification information is 3) is lost, and pushed identification information is 2.
The information to be pushed is represented by pulling failure and is not empty, the server is represented to be abnormal, but the information set has information to be pushed, illustratively, the information set comprises information to be pushed A (corresponding identification information is 1), information to be pushed B (corresponding pushing identification information is 1 and corresponding identification information is 2) and information to be pushed D (corresponding pushing identification information is 3 and corresponding identification information is 4), information to be pushed C (corresponding pushing identification information is 2 and corresponding identification information is 3) is lost, when the pushed identification information is 2, the information needs to be pulled to the server, at the moment, the server is abnormal, but the information to be pushed D still remains in the information set, so the pushed identification information can be updated to be 3 by the method, and the information to be pushed is searched based on 3 to be pushed to the upper layer, so that the pushing interruption of the information to be pushed is avoided.
And when the pulled information representation is successfully pulled, the pulled information representation does not pull information, the information set is not empty, the loss of the information to be pushed exists in the representation information set, but the lost data is not obtained from the server.
Illustratively, the information set includes information a to be pushed (corresponding identification information is 1), information B to be pushed (corresponding pushing identification information is 1, corresponding identification information is 2), and information D to be pushed (corresponding pushing identification information is 3, corresponding identification information is 4), the information C to be pushed (corresponding pushing identification information is 2, corresponding identification information is 3) is lost (the information set is not empty at this time), when the information C to be pushed and the information to be pushed at the back are pulled to the server, although the pulling is successful (the server is characterized to be not abnormal), the information is not pulled due to some reasons, such as a problem exists in the server code logic, that is, the information to be pushed is not pulled. And continuously searching the information set after updating the pushed identification information, and if the pushed identification information is updated to 3, acquiring the information D to be pushed and pushing the information D to the upper layer. Thereby avoiding an interruption of pushing information to be pushed to an upper layer.
In this embodiment, the information set may be updated based on the pulled information, for example, to-be-pushed information corresponding to the push identification information that is greater than or equal to the pushed identification information is selected from the pulled information and added to the information set, so as to continuously read the to-be-pushed information to be pushed from the information set.
When the pulled information representation is successfully pulled, the pulled information representation does not pull information, and the information set is not empty and continues to perform the obtaining operation, the pushed identification information may be updated based on the content in the information set, and then the information set is searched based on the updated pushed identification information.
In one embodiment, updating the pushed identification information comprises:
when the pushed identification information is not empty, determining the pushed identification information with the smallest represented numerical value in the pushed identification information with the numerical value in the information set larger than the represented numerical value of the pushed identification information as the updated pushed identification information;
when the pushed identification information is empty, determining the pushed identification information with the minimum represented numerical value in the pushed identification information included in the information set as updated pushed identification information;
the push identification information in the information set represents the identification information of the last information to be pushed, and the identification information comprises a sequence number.
The sequence number may be used to characterize the order in which the information to be pushed is obtained from the server.
It should be noted that the pushed identification information may be cleared when the server is abnormal, so when the pushed identification information is updated, it is necessary to first determine whether the pushed identification information is empty, so as to assign a value to the pushed identification again, thereby implementing the update of the pushed identification information.
In one embodiment, obtaining pushed identification information includes:
and when the obtained pushed identification information is empty, determining the pushed identification information with the minimum representation value in the pushed identification information included in the information set as the pushed identification information.
It should be noted that, when the server is abnormal, the pushed identification information clearing operation may be performed, so that the pushed identification information is empty.
Example two
Fig. 2 is a schematic flow chart of an information pushing method provided in the second embodiment of the present disclosure, and the second embodiment is embodied on the basis of various alternatives in the above embodiments. In this embodiment, the information set is formed by the steps of:
acquiring information to be pushed;
and when the order-preserving condition is met, storing the information to be pushed and pushing identification information corresponding to the information to be pushed into an information set.
Please refer to the first embodiment for a detailed description of the present embodiment.
As shown in fig. 2, an information pushing method provided in the second embodiment of the present disclosure includes the following steps:
and S210, obtaining the information to be pushed.
The information to be pushed may be information obtained from the server and pushed to an upper layer by the terminal device. In this step, the information to be pushed can be directly read from the server, for example, the information to be pushed is read from the server by a callback pushing method.
S220, when the order preserving condition is met, storing the information to be pushed and pushing identification information corresponding to the information to be pushed into an information set.
When the order preserving condition is not met currently, the read information to be pushed can be directly pushed to the upper layer by the embodiment. When the order-preserving condition is met, the information to be pushed and the corresponding pushing identification information can be stored in the information set to be pushed.
The order-preserving condition can be understood as a condition for determining whether the information to be pushed needs to be preserved, and the order-preserving condition is not limited herein as long as the read information to be pushed needs to be preserved and the server state is normal.
In one embodiment, the order preserving conditions include:
starting a pushing order-preserving function at present, wherein the server state is normal and the information to be pushed needs order preservation;
whether the information to be pushed needs to be order-preserved or not is determined based on the attribute of the information to be pushed.
Wherein, whether the server state is normal or not can be determined based on the specific content of the read information to be pushed. Whether the information to be pushed needs to be preserved or not can be determined based on the attribute of the information to be pushed.
It should be noted that the information to be pushed is orderly pushed to the upper layer of the terminal device, and if the order preserving condition is not met, the information to be pushed can be directly pushed to the upper layer after the information to be pushed is obtained; if the order-preserving condition is met, the information to be pushed transmitted by the server can be stored in the form of an information set, and then the pushing of the information to be pushed is realized by the information pushing method disclosed by the disclosure. The order-preserving condition can be regarded as a judgment condition for whether to execute the information pushing method disclosed by the disclosure, and is a precondition for orderly pushing information to be pushed.
S230, pushed identification information and an information set are obtained, and the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed.
S240, searching the information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information.
And S250, pulling the information from the server when the information to be pushed corresponding to the pushed identification information is not found.
And S260, when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found.
S270, transmitting the information to be pushed.
The information pushing method provided by the second embodiment of the disclosure optimizes the operation of forming the information set. By using the method, the information to be pushed from the server can be stored in order, and the pulling is triggered in time when abnormal conditions exist, so that the conference quality is ensured.
The information push method provided by the present disclosure may be regarded as an improved scheme of push ordering commonly used in a video conference service, and is used for implementing a scheme of receiving ordered push by an upper layer of a client in a video conference scene. Under the condition that the video conference is abnormal, the prior art has the defects that the scene is not timely found and limited in a conference room. Assume that there are several pushes: a is pushed at 10 points 00 and B is pushed at 11 points 00, and if A is lost, the loss of the push A can be sensed only after the push B is received in the prior art, so that the pull logic is triggered, and the push A is pulled. This can affect the experience because a 10-point push will wait until an 11-point client can receive it.
The information pushing method provided by the disclosure is a set of well-packaged pushing ordering module, can be suitable for each sub-service scene of a video conference, such as a conference room, a screen projection box, a single product and a video conference sub-service, and can realize the Says for recording videos; the method and the device avoid the abnormal situation in the original scheme by means of periodical pulling, namely pulling the message pushed earlier very late.
Fig. 2a is a schematic diagram of a push order-preserving flow provided by an embodiment of the present disclosure, and fig. 2b is a schematic diagram of a consumption thread provided by an embodiment of the present disclosure, and referring to fig. 2a and fig. 2b, when push order-preserving is implemented, the overall implementation follows a "producer-consumer" model, a pool of packets, namely PacketPool, maintains packets, wsChannel SDK, is a producer, and a packet consumption thread, namely PacketConsumer, is a consumer.
WsChannel Push is a long connection Push channel, and when receiving new Push, the onPush method of WsChannel SDK is called back to read the pushed data packet.
And if the current APP does not start the push order protection, directly throwing the current APP to an upper layer (pushDispatcher is the upper layer). If the current APP starts push order preservation, but pre _ sid = '0' of the current Packet (server is abnormal, at this time, the pushed identification information may be cleared, i.e. clear mLastSid), or the ignore _ correction attribute is TRUE (the push does not need order preservation), the push order preservation is directly thrown to the upper layer. Otherwise, the Packet is put into a TreeMap (pool), the key of the TreeMap is pre _ sid of the Packet, namely push identification information, and the value is a data Packet, namely information to be pushed.
When a new element is put into the pool, the PacketConsumer is notified (NOTIFY, i.e., push notification) to process, finds a proper data packet from TreeMap and throws the proper data packet to an upper layer, i.e., transmits the proper data packet to a service layer, and pulls the proper data packet from the server to the upper layer if the proper data packet cannot be found.
The PacketConsumer class is a consumption thread of a data packet, starts the thread when an application starts, and continuously loops (some cases enter a WAIT state, namely a WAIT state, and WAIT to be notified by a PacketPool), and executes the same logic every time, which has the following key points:
mLastSid represents the SID of the last Packet dropped to the upper layer, i.e. the pushed identification information.
TreeMap < String, packet > is a data Packet pool, and under normal conditions, after a long continuous pushed data Packet is received, the data Packet is firstly stored in the pool and then thrown to an upper layer through a PacketConsumer thread.
In order to prevent the data packet discontinuity caused by the server logic error and the client consuming thread jam (in order to wait for a future data packet, the upper layer may not receive the push), the disclosure re-assigns mLastSid (i.e. rebuild method) at some time.
Logic of rebuild method:
(1) If the pool is empty, directly returning the mLastSid of the parameter;
(2) If the mLastSid of the parameter is empty, the minimum key in the pool is taken and returned to the mLastSid;
(3) And if the mLastSid of the parameter is not empty, deleting all the pushing identification information smaller than the mLastSid and the corresponding information to be pushed in the pool to avoid repeated pushing abnormity, and returning a minimum key larger than the mLastSid to the mLastSid.
The one-cycle logic for the PacketConsumer thread is as follows:
1. and judging whether the mLastSid is empty or not, and if the mLastSid is empty, reassigning the mLastSid. (if the pool is empty, then the reassignment is done or empty).
2. The packet with the key mLastSid is taken out of the pool.
3. If the packet is not empty, the packet is discarded to the upper layer through PushDispatcher.
4. If the data packet is empty, it indicates that there is no data packet that can be processed continuously, and then all data packets after the current sid are pulled through the pullPacketsByPreSid interface (after the data is pulled internally by the method, appropriate data will be put into the pool).
1. Pull result, i.e., result >0: and if the pulling is successful (or the request is successful) and a plurality of values are returned (namely the server side returns non-null data), continuing the next cycle, namely, if the pulled information represents that the pulling is successful and the pulled information represents that the information is pulled, updating the information set according to the pulled information, and returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found.
2.Result =0: and if the pool is empty, waiting, namely the corresponding pulling condition is that the pulled information represents that the pulling is successful, the pulled information represents that the information is not pulled, the information set is empty, and the time length for which the push notification is not received reaches a second set time length. result =0: if the pool is not empty, the value is reassigned, namely the pulled information represents that the pulling is successful, the pulled information represents that the information is not pulled, and the information set is not empty, the pushed identification information is updated, and then the information set is continuously searched;
result = -1: and (3) waiting for the situation that the pulling fails (or the request fails) and the pool is empty, namely the corresponding pulling condition is that the pulled information represents the pulling failure, the information set is empty, and the duration of not receiving the push notification reaches a first set duration.
4.Result = -2: and if the pulling fails (or the request fails) and the pool is not empty, re-assigning the mLastSid, and continuing to perform the next cycle, namely updating the pushed identification information according to the pushed identification information in the information set and continuously searching the information set when the pulled information represents the pulling failure and the information set is not empty.
In the PacketConsumer, a logic of timing pull is implemented, for example, if the time is 5s, if no message is processed for more than 5s during processing, pull is triggered, so that even if the latest message is lost and the next message does not arrive, pull can be triggered, and the latest push is pulled.
The information push method provided by the disclosure is a reusable push ordering scheme for the video conference, and ensures that the latest push can be pulled in time.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an information pushing apparatus according to a third embodiment of the present disclosure, where the apparatus is applicable to a situation where a client performs information pushing, where the apparatus may be implemented by software and/or hardware and is generally integrated on a terminal device.
As shown in fig. 3, the apparatus includes:
an obtaining module 31, configured to obtain pushed identification information and an information set, where the information set stores information to be pushed and pushed identification information corresponding to the information to be pushed;
a searching module 32, configured to search, according to the pushed identification information and the pushed identification information, information to be pushed corresponding to the pushed identification information from the information set;
the pulling module 33 is configured to pull information from the server when the information to be pushed corresponding to the pushed identification information is not found;
the judging module 34 is configured to, when the pulled information meets the set pulling condition, return to the step of acquiring the pushed identifier information and the information set until the information to be pushed is found;
the transmission module 35 is configured to transmit the information to be pushed.
In this embodiment, the apparatus first obtains, by an obtaining module 31, pushed identification information and an information set, where the information set stores information to be pushed and pushed identification information corresponding to the information to be pushed; secondly, searching the information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information through a searching module 32; then, when the information to be pushed corresponding to the pushed identification information is not found, the information is pulled from the server through the pulling module 33; then, when the pulled information meets the set pulling condition, the judging module 34 returns to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found; and finally, transmitting the information to be pushed to the server through the transmission module 35.
The embodiment provides an information pushing device which can timely know the occurrence of communication abnormal conditions in an active pulling mode and improve conference quality.
Further, the pulling condition includes one of:
the pulled information represents that the pulling fails, the information set is empty, and the time length for which the push notification is not received reaches a first set time length;
the pulled information representation is pulled successfully, the pulled information representation does not pull information, the information set is empty, and the duration of not receiving the push notification reaches a second set duration.
Further, the device also comprises a processing module:
when the pulled information represents that the pulling fails and the information set is not empty, updating the pushed identification information according to the pushed identification information in the information set and then continuously searching the information set;
when the pulled information representation is pulled successfully and the pulled information representation is pulled to obtain information, updating the information set according to the pulled information, and returning to the step of obtaining the pushed identification information and the information set until the information to be pushed is found;
and when the pulled information representation is successfully pulled, the pulled information representation does not pull information, and the information set is not empty, updating the pushed identification information and then continuously searching the information set.
Further, updating the pushed identification information includes:
when the pushed identification information is not empty, determining the pushed identification information with the smallest represented numerical value in the pushed identification information with the numerical value in the information set larger than the represented numerical value of the pushed identification information as the updated pushed identification information;
when the pushed identification information is empty, determining the pushed identification information with the minimum represented numerical value in the pushed identification information included in the information set as updated pushed identification information;
the push identification information in the information set represents the identification information of the last information to be pushed, and the identification information comprises a sequence number.
Further, the information set is formed by:
acquiring information to be pushed;
and when the order-preserving condition is met, storing the information to be pushed and pushing identification information corresponding to the information to be pushed into an information set.
Further, the order-preserving conditions comprise:
starting a pushing order-preserving function currently, wherein the server state is normal and the information to be pushed needs order preservation;
whether the information to be pushed needs to be order-preserved or not is determined based on the attribute of the information to be pushed.
Further, the obtaining module 31 obtains the pushed identification information, including:
and when the obtained pushed identification information is empty, determining the pushed identification information with the minimum representation value in the pushed identification information included in the information set as the pushed identification information.
The information pushing device can execute the information pushing method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present disclosure. Fig. 4 shows a schematic structural diagram of a terminal device 400 suitable for implementing an embodiment of the present disclosure. The terminal Device 400 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Media Player (PMP), a car terminal (e.g., car navigation terminal), and the like, and fixed terminals such as a Digital TV, a desktop computer, and the like. The terminal device 400 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the terminal device 400 may include one or more processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that can perform various appropriate actions and processes according to programs stored in a Read-Only Memory (ROM) 402 or loaded from a storage means 408 into a Random Access Memory (RAM) 403. The one or more processing devices 401 implement the information push method as provided by the present disclosure. In the RAM403, various programs and data necessary for the operation of the terminal apparatus 400 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other through a bus 404. An Input/Output (I/O) interface 405 is also connected to the bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, or the like; storage 408, including, for example, magnetic tape, hard disk, etc., storage 408 for storing one or more programs; and a communication device 409. The communication means 409 may allow the terminal device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates a terminal apparatus 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing device 401, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (EPROM or flash Memory), an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as the hypertext Transfer Protocol (HTTP), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be contained in the terminal device 400; or may exist separately without being assembled into the terminal device 400.
The computer readable medium stores one or more computer programs which, when executed by a processing device, implement the method of: acquiring pushed identification information and an information set, wherein the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server;
when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found;
and transmitting the information to be pushed.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Part (ASSP), a System On Chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides, in accordance with one or more embodiments of the present disclosure, an information pushing method including:
acquiring pushed identification information and an information set, wherein the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server;
when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found;
and transmitting the information to be pushed.
Example 2 the method of example 1, the pull condition comprising one of:
the pulled information represents that the pulling fails, the information set is empty, and the time length for which the push notification is not received reaches a first set time length;
the pulled information represents that the pulling is successful, the pulled information represents that the information is not pulled, the information set is empty, and the time length for which the push notification is not received reaches a second set time length.
Example 3 the method of example 1, in accordance with one or more embodiments of the present disclosure, further comprising:
when the pulled information represents that the pulling fails and the information set is not empty, updating the pushed identification information according to the pushed identification information in the information set and then continuously searching the information set;
when the pulled information representation is pulled successfully and the pulled information representation is pulled to obtain information, updating the information set according to the pulled information, and returning to the step of obtaining pushed identification information and the information set until the information to be pushed is found;
and when the pulled information representation is successfully pulled, the pulled information representation does not pull information, and the information set is not empty, updating the pushed identification information and then continuously searching the information set.
Example 4 the method of example 3, updating the pushed identification information, according to one or more embodiments of the present disclosure, comprises:
when the pushed identification information is not empty, determining the pushed identification information with the smallest represented numerical value in the pushed identification information with the numerical value in the information set larger than the represented numerical value of the pushed identification information as the updated pushed identification information;
when the pushed identification information is empty, determining the pushed identification information with the minimum represented numerical value in the pushed identification information included in the information set as updated pushed identification information;
the push identification information in the information set represents the identification information of the last information to be pushed, and the identification information comprises a sequence number.
Example 5 in accordance with one or more embodiments of the present disclosure, the information set is formed by the method of example 1 by:
acquiring information to be pushed;
and when the order-preserving condition is met, storing the information to be pushed and pushing identification information corresponding to the information to be pushed into an information set.
Example 6 in accordance with one or more embodiments of the present disclosure, the method of example 5,
the order-preserving conditions comprise:
starting a pushing order-preserving function currently, wherein the server state is normal and the information to be pushed needs order preservation;
whether the information to be pushed needs to be order-preserved or not is determined based on the attribute of the information to be pushed.
Example 7 in accordance with one or more embodiments of the present disclosure, the method of example 1,
acquiring pushed identification information, including:
and when the obtained pushed identification information is empty, determining the pushed identification information with the minimum representation value in the pushed identification information included in the information set as the pushed identification information.
Example 8 provides, in accordance with one or more embodiments of the present disclosure, an information pushing apparatus, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring pushed identification information and an information set, and the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
the searching module is used for searching the information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
the pull module is used for pulling the information from the server when the information to be pushed corresponding to the pushed identification information is not found;
the judging module is used for returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found when the pulled information meets the set pulling condition;
and the transmission module is used for transmitting the information to be pushed.
Example 9 provides, in accordance with one or more embodiments of the present disclosure, a terminal device, comprising:
one or more processing devices;
storage means for storing one or more programs;
when executed by the one or more processing devices, cause the one or more processing devices to implement the information push method of any of examples 1-7.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, a computer-readable medium having stored thereon a computer program that, when executed by a processing apparatus, implements the information push method as in any of examples 1-7.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (9)

1. An information pushing method applied to a client, the method comprising:
acquiring pushed identification information and an information set, wherein the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
searching information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
when the information to be pushed corresponding to the pushed identification information is not found, pulling the information from the server;
when the pulled information meets the set pulling condition, returning to execute the step of acquiring the pushed identification information and the information set until the information to be pushed is found;
transmitting the information to be pushed;
when the information to be pushed corresponding to the pushed identification information is found, pushing the found information to be pushed to a service layer, and returning to continuously execute the step of obtaining the pushed identification information and the information set;
the pulling condition comprises one of the following conditions:
the pulled information represents that pulling fails, the information set is empty, and the duration of not receiving the push notification reaches a first set duration;
the pulled information represents that the pulling is successful, the pulled information represents that the information is not pulled, the information set is empty, and the time length for which the push notification is not received reaches a second set time length.
2. The method of claim 1, further comprising:
when the pulled information represents that the pulling fails and the information set is not empty, updating the pushed identification information according to the pushed identification information in the information set and then continuously searching the information set;
when the pulled information representation is pulled successfully and the pulled information representation is pulled to obtain information, updating the information set according to the pulled information, and returning to the step of obtaining pushed identification information and the information set until the information to be pushed is found;
and when the pulled information representation is successfully pulled, the pulled information representation does not pull information, and the information set is not empty, updating the pushed identification information and then continuously searching the information set.
3. The method of claim 2, wherein updating the pushed identification information comprises:
when the pushed identification information is not empty, determining the pushed identification information with the smallest represented numerical value in the pushed identification information with the numerical value in the information set larger than the represented numerical value of the pushed identification information as the updated pushed identification information;
when the pushed identification information is empty, determining the pushed identification information with the minimum represented numerical value in the pushed identification information included in the information set as updated pushed identification information;
the push identification information in the information set represents the identification information of the last information to be pushed, and the identification information comprises a sequence number.
4. The method of claim 1, wherein the set of information is formed by:
acquiring information to be pushed;
and when the order-preserving condition is met, storing the information to be pushed and pushing identification information corresponding to the information to be pushed into an information set.
5. The method of claim 4, wherein the order preserving condition comprises: starting a pushing order-preserving function currently, wherein the server state is normal and the information to be pushed needs order preservation;
whether the information to be pushed needs to be order-preserved or not is determined based on the attribute of the information to be pushed.
6. The method of claim 1, wherein obtaining pushed identification information comprises:
and when the obtained pushed identification information is empty, determining the pushed identification information with the minimum representation value in the pushed identification information included in the information set as the pushed identification information.
7. An information pushing apparatus applied to a client, the apparatus comprising:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring pushed identification information and an information set, and the information set stores information to be pushed and the pushed identification information corresponding to the information to be pushed;
the searching module is used for searching the information to be pushed corresponding to the pushed identification information from the information set according to the pushed identification information and the pushed identification information;
the pull module is used for pulling the information from the server when the information to be pushed corresponding to the pushed identification information is not found;
the judging module is configured to return to execute the step of acquiring the pushed identifier information and the information set until the information to be pushed is found when the pulled information meets the set pulling condition, where the pulling condition includes one of: the pulled information represents that pulling fails, the information set is empty, and the duration of not receiving the push notification reaches a first set duration; the pulled information represents that the pulling is successful, the pulled information represents that the information is not pulled, the information set is empty, and the time length for which the push notification is not received reaches a second set time length;
the transmission module is used for transmitting the information to be pushed;
and the pushing module is used for pushing the searched information to be pushed to the service layer when the information to be pushed corresponding to the pushed identification information is searched, and returning to continue executing the step of acquiring the pushed identification information and the information set.
8. A terminal device, comprising:
one or more processing devices;
storage means for storing one or more programs;
when executed by the one or more processing devices, cause the one or more processing devices to implement the information push method of any one of claims 1-6.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processing device, carries out the information push method according to any one of claims 1 to 6.
CN202110852691.8A 2021-07-27 2021-07-27 Information pushing method and device, terminal equipment and storage medium Active CN113556352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110852691.8A CN113556352B (en) 2021-07-27 2021-07-27 Information pushing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110852691.8A CN113556352B (en) 2021-07-27 2021-07-27 Information pushing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113556352A CN113556352A (en) 2021-10-26
CN113556352B true CN113556352B (en) 2022-10-28

Family

ID=78104642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110852691.8A Active CN113556352B (en) 2021-07-27 2021-07-27 Information pushing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113556352B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019019644A1 (en) * 2017-07-24 2019-01-31 深圳壹账通智能科技有限公司 Push server allocation method and apparatus, and computer device and storage medium
WO2020039241A1 (en) * 2018-08-24 2020-02-27 优视科技新加坡有限公司 Message pushing method and apparatus, device/terminal/server, and computer-readable medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684999B (en) * 2012-04-20 2015-05-20 中兴通讯股份有限公司 Data packet processing method and device
CN107528874B (en) * 2016-07-15 2020-06-16 腾讯科技(深圳)有限公司 Information pushing and playing method and device
CN106027379A (en) * 2016-07-28 2016-10-12 贵州中科汉天下信息技术有限公司 Push message receiving processing method
CN108512876B (en) * 2017-02-27 2020-11-10 腾讯科技(深圳)有限公司 Data pushing method and device
CN107147724A (en) * 2017-05-23 2017-09-08 深圳市金立通信设备有限公司 A kind of information push method, server and computer-readable recording medium
WO2019217446A2 (en) * 2018-05-07 2019-11-14 Apple Inc. Media feed prioritization for multi-party conferencing
CN109582873B (en) * 2018-12-07 2020-11-10 北京字节跳动网络技术有限公司 Method and device for pushing information
CN111385330B (en) * 2018-12-29 2024-01-26 广州市百果园信息技术有限公司 Message pushing method, device, computer equipment and storage medium
CN110633419B (en) * 2019-09-20 2022-10-21 百度在线网络技术(北京)有限公司 Information pushing method and device
CN111245709A (en) * 2020-02-10 2020-06-05 北京字节跳动网络技术有限公司 Message pushing method and device, electronic equipment and storage medium
CN112799860B (en) * 2021-01-27 2023-02-21 浪潮云信息技术股份公司 Method for realizing service callback based on message queue and search engine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019019644A1 (en) * 2017-07-24 2019-01-31 深圳壹账通智能科技有限公司 Push server allocation method and apparatus, and computer device and storage medium
WO2020039241A1 (en) * 2018-08-24 2020-02-27 优视科技新加坡有限公司 Message pushing method and apparatus, device/terminal/server, and computer-readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
信息发布终端网络通信方法的研究;吴文娟等;《计算机系统应用》;20080615(第06期);全文 *
信息推送技术综述;谢晓琦;《科技创新与应用》;20160818(第23期);全文 *

Also Published As

Publication number Publication date
CN113556352A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN111147606B (en) Data transmission method, device, terminal and storage medium
CN111163329B (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN111245709A (en) Message pushing method and device, electronic equipment and storage medium
WO2022068488A1 (en) Message sending control method and apparatus, and electronic device and computer-readable storage medium
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN110795446A (en) List updating method and device, readable medium and electronic equipment
CN112256733A (en) Data caching method and device, electronic equipment and computer readable storage medium
CN110691282A (en) Video processing method and device, storage medium and electronic equipment
CN113542856B (en) Method, device, equipment and computer readable medium for reverse playing of online video
CN112015816A (en) Data synchronization method, device, medium and electronic equipment
CN113556352B (en) Information pushing method and device, terminal equipment and storage medium
CN112713969A (en) Data transmission method and device and system using same
CN111818293B (en) Communication method and device and electronic equipment
CN112203103B (en) Message processing method, device, electronic equipment and computer readable storage medium
CN111709782B (en) Information interaction method and device and electronic equipment
CN113115074B (en) Video jamming processing method and device
CN113535428B (en) Method, device, equipment and medium for processing request message and response message
CN112311840A (en) Multi-terminal data synchronization method, device, equipment and medium
CN113163154B (en) Information processing method and device and electronic equipment
CN115134641B (en) Screen projection method and device and electronic equipment
CN112653691B (en) Data processing method, device, equipment and storage medium
CN113076195B (en) Object shunting method and device, readable medium and electronic equipment
CN114422482B (en) Message sending method and device, electronic equipment and storage medium
CN116185665A (en) Message processing method, device, equipment and medium
CN117294863A (en) Live broadcasting room wheat connecting method, device, electronic equipment, storage medium and program product

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