CN108881354B - Push information storage method and device, server and computer storage medium - Google Patents

Push information storage method and device, server and computer storage medium Download PDF

Info

Publication number
CN108881354B
CN108881354B CN201710365891.4A CN201710365891A CN108881354B CN 108881354 B CN108881354 B CN 108881354B CN 201710365891 A CN201710365891 A CN 201710365891A CN 108881354 B CN108881354 B CN 108881354B
Authority
CN
China
Prior art keywords
information
pushed
identifier
terminal
storage
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
CN201710365891.4A
Other languages
Chinese (zh)
Other versions
CN108881354A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710365891.4A priority Critical patent/CN108881354B/en
Publication of CN108881354A publication Critical patent/CN108881354A/en
Application granted granted Critical
Publication of CN108881354B publication Critical patent/CN108881354B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0277Online advertisement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a storage method of push information, which comprises the following steps: receiving a push request for pushing information to at least two terminals; the push request carries an identifier of the terminal and an identifier of information to be pushed; responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed; generating an index identifier of the information to be pushed based on the identifier of the terminal; establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation; determining a storage position of the information to be pushed, and storing the information to be pushed; and establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation. The embodiment of the invention also discloses a push information storage device, a server and a computer storage medium.

Description

Push information storage method and device, server and computer storage medium
Technical Field
The present invention relates to information push technology in the field of communications, and in particular, to a method, an apparatus, a server, and a computer storage medium for storing push information.
Background
With the development of the internet (especially mobile internet) and social networks, applications with social properties are coming out endlessly. The application of the social attributes can not only enhance the user stickiness, but also help business parties to promote business. For applications with social functions, an important scenario is that an application party usually pushes information for all users based on a certain marketing purpose (e.g., lottery activity), so as to increase user activity; and, this all-member push information feature is that each user information entity is identical.
In the prior art, a sender of a whole member push reads a current list of all users and independently sends a piece of push information with the same information body to each receiver. When information is sent, if a receiver is not on line currently, a sender needs to store the information; if a large number of receivers are not on-line, a plurality of information to be pushed needs to be stored in the sending and sending process, and at the moment, the required storage space is large, so that the storage space is greatly wasted.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention desirably provide a method, an apparatus, a server, and a computer storage medium for storing push information, so as to solve the problem that a plurality of pieces of information to be pushed need to be stored in the existing information push scheme, greatly save storage space, and avoid waste of resources.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for storing push information, where the method includes:
receiving a push request for pushing information to at least two terminals; the push request carries an identifier of the terminal and an identifier of information to be pushed;
responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed;
generating an index identifier of the information to be pushed based on the identifier of the terminal;
establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation;
determining a storage position of the information to be pushed, and storing the information to be pushed;
and establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation.
In a second aspect, an embodiment of the present invention provides a push information storage apparatus, where the apparatus includes: the device comprises a first receiving unit, a first obtaining unit, a first establishing unit, a first processing unit and a second establishing unit, wherein:
the first receiving unit is used for receiving a push request for pushing information to at least two terminals; the push request carries an identifier of the terminal and an identifier of information to be pushed;
the first obtaining unit is configured to respond to the push request and obtain the information to be pushed based on the identifier of the information to be pushed;
the first obtaining unit is further configured to generate an index identifier of the information to be pushed based on the identifier of the terminal;
the first establishing unit is configured to establish a first corresponding relationship between the identifier of the terminal and the index identifier, and store the first corresponding relationship;
the first processing unit is configured to determine a storage location of the information to be pushed, and store the information to be pushed;
the second establishing unit is configured to establish a second corresponding relationship between the index identifier and the storage location of the information to be pushed, and store the second corresponding relationship.
In a third aspect, an embodiment of the present invention provides a server, where the server includes: a processor and a communication interface, wherein:
the processor is used for receiving a push request for pushing information to at least two terminals through the communication interface; the push request carries an identifier of the terminal and an identifier of information to be pushed; responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed; generating an index identifier of the information to be pushed based on the identifier of the terminal; establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation; determining a storage position of the information to be pushed, and storing the information to be pushed; and establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and the computer-executable instructions are configured to execute the push information storage method according to the first aspect.
The push information storage method, device, server and computer storage medium provided by the embodiments of the present invention receive a push request and obtain information to be pushed based on an identifier of the information to be pushed, generate an index identifier of the information to be pushed based on the identifier of a terminal, establish a first correspondence between the identifier of the terminal and the index identifier and store the first correspondence, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determine a storage location of the information to be pushed and store the information to be pushed, establish a second correspondence between the index identifier and the storage location of the information to be pushed and store the second correspondence, so that when pushing the information to be pushed, the information to be pushed can be obtained according to the correspondence between the stored index identifier of the information to be pushed and the identifier of the terminal and the correspondence between the index identifier and the storage location of the information to be pushed, therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of pieces of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
Drawings
Fig. 1 is a schematic flowchart of a pushed information storage method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another pushed information storage method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another pushed information storage method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a number aggregation module in a push information storage method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a common message storage module in a push information storage method according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a message pull in a method for storing push information according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a shared storage server storing first information and a first mapping relationship according to an embodiment of the invention;
fig. 8 is a schematic processing flow diagram of a group message distribution server distributing information to users in a group according to an embodiment of the present invention;
fig. 9 is a schematic view of a processing flow of acquiring offline information by a terminal according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a push information storage device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a system according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
An embodiment of the present invention provides a push information storage method, which is shown in fig. 1 and includes the following steps:
step 101, receiving a push request for pushing information to at least two terminals.
The push request carries an identifier of the terminal and an identifier of the information to be pushed.
In other embodiments of the present invention, the step 101 of receiving a push request for pushing information to at least two terminals may be implemented by a server; the server may be a server capable of sending the same information to a plurality of terminals, that is, a server capable of performing a whole member push service, where the whole member push means that a message can be pushed to all users (i.e., terminals); of course, the server has a communication connection with at least two terminals.
The push request is actively sent to the server when an operator (administrator) at the front end of the server needs to push certain information to all user terminals; of course, the push request may be generated after an operator triggers a function in the server.
And 102, responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed.
Step 102, responding to the push request, where obtaining the information to be pushed based on the identifier of the information to be pushed may be implemented by a server; when an operator sends a pushing request to a server, the identifier of the information to be pushed can be the type of information which the server needs to push, or the type of information to be pushed, and the like; therefore, after receiving the push request, the server can acquire the information to be pushed, which needs to be sent, according to the type information in the push request.
And 103, generating an index identifier of the information to be pushed based on the identifier of the terminal.
In other embodiments of the present invention, step 103 may be implemented by a server, based on the identifier of the terminal, to generate an index identifier of the information to be pushed; the index identifier of the information to be pushed is a globally unique identifier, and the index identifier is used for indexing the information to be pushed (i.e. has a corresponding relationship with the storage location of the information to be pushed).
And 104, establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation.
In other embodiments of the present invention, step 104 establishes a first corresponding relationship between the identifier of the terminal and the index identifier, and storing the first corresponding relationship may be implemented by a server; the first corresponding relationship may be stored in the current local storage of the server, or the first corresponding relationship may be stored in both the local storage and the newly added storage after the storage of the server is expanded. That is, for a server that needs to expand the storage, the server provides services in a cluster manner, and each storage in the cluster needs to store the first corresponding relationship.
And 105, determining a storage position of the information to be pushed, and storing the information to be pushed.
In other embodiments of the present invention, the step 105 of determining the storage location of the information to be pushed and storing the information to be pushed may be implemented by a server; the determining of the storage location of the information to be pushed may be implemented by determining where the information to be pushed is stored in the server, and after the storage location of the information to be pushed is obtained, the information to be pushed may be stored in the corresponding storage location.
The information to be pushed may be stored in the current local storage of the server, or the information to be pushed may be stored in both the local storage and the newly added storage after the storage of the server is expanded. That is, for a server that needs to expand the storage, the server provides services in a cluster manner, and each storage in the cluster needs to store the information to be pushed.
And 106, establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation.
In other embodiments of the present invention, step 106 establishes a second corresponding relationship between the index identifier and the storage location of the information to be pushed, and the storage of the second corresponding relationship may be implemented by a server; the second corresponding relationship may be stored in the current local storage of the server, or the second corresponding relationship may be stored in both the local storage and the newly added storage after the storage of the server is expanded. That is, for a server that needs to expand the storage, the server provides services in a cluster manner, and each storage in the cluster needs to store the to-be-second correspondence.
The push information storage method provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
The embodiment of the invention provides a push information storage method, which comprises the following steps:
step 201, the server receives a push request for pushing information to at least two terminals.
The push request carries an identifier of the terminal.
Step 202, the server responds to the pushing request, and obtains the information to be pushed based on the identifier of the information to be pushed.
Illustratively, obtaining the information to be pushed may be achieved by: one is that other terminals or servers can actively send the information to be pushed to the current server; the other is that the information to be pushed is stored in a cloud storage of the server, and the server can directly download the information to be pushed from the cloud storage after receiving the pushing request.
Step 203, the server obtains the attribute information of the terminal based on the identifier of the terminal.
The attribute information of the terminal may include, for example, an identifier of the terminal, a time for sending the push information to the terminal, a service identifier of the terminal, and other information related to the terminal that can be used for indexing the information to be pushed.
And 204, the server generates an index identifier of the information to be pushed by adopting a preset algorithm based on the attribute information of the terminal.
Illustratively, the preset algorithm may include: hash Algorithm, Cyclic Redundancy Check (CRC) Algorithm, fifth version of Message-Digest Algorithm (MD 5), Secure Hash Algorithm 2 (SHA-2), and the like, which can generate an index. The index identifier may be obtained by substituting the obtained attribute information of the terminal into any one of the above algorithms, so that the obtained index identifier is unique, and the index identifier is a unique basis for reading the information to be pushed.
Step 205, the server establishes a first corresponding relationship between the identifier of the terminal and the index identifier, and stores the first corresponding relationship in a memory of the server.
Illustratively, the memory in this embodiment is a local memory of the server, i.e. the first correspondence between the identifier of the terminal and the index identifier is stored only in the local memory of the server. The stored first corresponding relationship may be in the form of a table, where the table may store the identifier and the index identifier of the terminal and indicate a relationship between the identifier and the index identifier of the terminal.
Step 206, the server determines whether the memory of the server stores information to be pushed.
Before storing the information to be pushed, the server needs to detect whether the local storage of the server already stores the information to be pushed.
Step 207, if the information to be pushed is not stored in the server, the server determines the storage location of the information to be pushed and stores the information to be pushed.
Illustratively, the location for storing the information to be pushed determined in the present embodiment is a local storage of the server. If the information to be pushed does not exist in the local memory of the server, the information to be pushed can be stored in the local memory of the server; if the information to be pushed is stored in the local memory of the server, the information to be pushed does not need to be stored, and only the corresponding relation between the identifier of the terminal corresponding to the information to be pushed and the index identifier needs to be stored. Therefore, repeated storage can be avoided, and effective utilization of storage resources is guaranteed.
And 208, the server establishes a second corresponding relation between the index identifier and the storage position of the information to be pushed, and stores the second corresponding relation.
The stored second corresponding relationship may be in the form of a table, where the table may store the index identifier and the storage location of the information to be pushed, and indicate a relationship between the index identifier and the storage location of the information to be pushed.
It should be noted that the first corresponding relationship, the second corresponding relationship and the information to be pushed in the present embodiment are all stored in the same memory of the server.
Step 209, after a preset time interval, the server deletes the first corresponding relationship, the second corresponding relationship and the information to be pushed stored in the memory of the server.
The first corresponding relation, the second corresponding relation and the information to be pushed stored in the server are shared by all the whole member pushing users, so that the shared message entity cannot be deleted in any way except for automatic elimination of the expired message. The preset time is set in advance according to the actual application scene and the implementation effect, the first corresponding relation, the second corresponding relation and the information to be pushed stored in the server memory are deleted regularly, and the information is still stored in the server memory after the information is over, so that the waste of storage resources is avoided.
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
The push information storage method provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
The embodiment of the invention provides a push information storage method, which comprises the following steps:
step 301, the server receives a push request for pushing information to at least two terminals.
Step 302, the server responds to the pushing request, and obtains the information to be pushed based on the identifier of the information to be pushed.
Step 303, the server obtains the attribute information of the terminal based on the identifier of the terminal.
And 304, the server generates an index identifier of the information to be pushed by adopting a preset algorithm based on the attribute information of the terminal.
Step 305, the server obtains the current remaining storage space of its own storage.
Wherein, the storage space of the storage of the server is set by the server when the server is shipped from the factory.
Step 306, the server obtains the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed.
Illustratively, the server may index the storage space to be occupied by the identifier and the storage space to be occupied by the information to be pushed according to the storage space to be occupied by the identifier of the terminal estimated in advance, and add the storage spaces to be occupied to obtain the sum of the storage spaces to be occupied.
And 307, if the sum of the storage space occupied by the identifier of the terminal, the index identifier and the information to be pushed is less than or equal to the current residual storage space of the storage of the server, the server establishes a first corresponding relation and stores the first corresponding relation in the storage of the server.
The server can compare the size relationship between the current residual storage space of the self memory and the sum of the storage spaces required to be occupied, if the current residual storage space of the self memory is smaller than or equal to the sum of the storage spaces required to be occupied, the current residual storage space of the server is enough to store the information, and the first corresponding relationship, the second corresponding relationship and the information to be pushed can be directly stored in the self memory of the server.
And 308, if the sum of the storage space occupied by the identifier of the terminal, the index identifier and the information to be pushed is larger than the storage space of the storage, adding the first storage by the server to obtain a second storage.
Wherein, the second memory comprises at least two memories; the first memory belongs to the second memory.
For example, if the current remaining storage space of the server's own storage is less than or equal to the sum of the storage space required to be occupied, which indicates that the current remaining storage space of the server is not enough to store the above information, at this time, additional storage needs to be expanded to form a cluster to provide services. The storage space of the server is added with the first memory and is combined with the memory of the server to obtain the second memory. Wherein, the first memory may include at least one memory.
And 309, classifying the terminals by the server according to a preset classification rule.
The preset classification rules can be determined according to different business scenes, and the size of each category can be adjusted according to different business scenes; one possible classification principle in classification is, for example, an average classification principle.
Step 310, the server establishes a correspondence between the identity of the terminal in each category and the second memory.
For example, a mapping relationship may be established between the terminal identifier in each category and the finally obtained second storage according to the category as a unit, so as to determine which storage the identifier of the terminal in each category should correspond to. Of course, for terminals of the same category, the identifiers of the terminals correspond to the same memory.
Step 311, the server stores the correspondence between the identifier of the terminal in each category and the index identifier in a corresponding memory in the second memory based on the correspondence between the identifier of the terminal in each category and the second memory.
Illustratively, the specific location where the correspondence between the identifier of the terminal in each category and the index identifier should be stored may be determined and stored according to the correspondence between the identifier of the terminal in each category and the second storage. If only one memory is arranged in the first memory, the terminals can be divided into two types, according to the mapping relation between the terminal identifier and the second memory, the mapping relation between the terminal identifier and the index identifier in one type can be determined to be stored in the memory of the server, and the mapping relation between the terminal identifier and the index identifier in the other type can be determined to be stored in the first memory. Of course, for terminals of the same category, the correspondence between the identifier of the terminal and the index identifier is stored in a memory.
Step 312, the server determines whether the memory of the server stores information to be pushed.
Step 313, if the information to be pushed is not stored in the server, the server determines that the storage location of the information to be pushed is the location of the identifier of the terminal corresponding to the information to be pushed in the second storage, and stores the information to be pushed.
The storage position of the information to be pushed is the position of the identifier of the terminal which has a corresponding relation with the information to be pushed; for example, if the identifier of the terminal is stored in the first memory, the information to be pushed corresponding to the terminal must also be stored in the first memory.
Step 314, the server establishes a second corresponding relationship between the index identifier and the storage location of the information to be pushed, and stores the second corresponding relationship in the location of the information to be pushed in the second storage.
It should be noted that the first corresponding relationship, the second corresponding relationship and the information to be pushed belonging to the same category in the present embodiment are all stored in the same memory.
Of course, in this embodiment, after the interval preset time, the server may delete the first corresponding relationship, the second corresponding relationship, and the information to be pushed, which are stored in the memories (the self memory and the first memory).
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
The push information storage method provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
Based on the foregoing embodiment, referring to fig. 2, a pushed information storage method provided by an embodiment of the present invention further includes the following steps:
step 401, the server receives a push request for pushing information to at least two terminals.
The push request carries an identifier of the terminal.
The identifier of the terminal may be information that can uniquely identify the terminal, and may be, for example, a number that uses the terminal to perform an application.
Step 402, the server responds to the pushing request, and obtains the information to be pushed based on the identifier of the information to be pushed.
Step 403, the server obtains attribute information of the terminal based on the identifier of the terminal.
And step 404, the server generates an index identifier of the information to be pushed by adopting a preset algorithm based on the attribute information of the terminal.
Step 405, the server obtains the current remaining storage space of its own memory.
Step 406, the server obtains the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed.
Step 407, if the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed is less than or equal to the current remaining storage space of the server memory, the server establishes a first corresponding relationship and stores the first corresponding relationship in the server memory.
And step 408, if the sum of the storage space occupied by the identifier of the terminal, the index identifier and the information to be pushed is larger than the current residual storage space of the storage, adding the first storage by the server to obtain a second storage.
Wherein, the second memory comprises at least two memories; the first memory belongs to the second memory.
And 409, classifying the terminals by the server according to a preset classification rule.
Step 410, the server establishes a correspondence between the identity of the terminal in each category and the second memory.
Step 411, the server stores the correspondence between the identifier of the terminal in each category and the index identifier in the corresponding memory in the second memory based on the correspondence between the identifier of the terminal in each category and the second memory.
Step 412, the server determines whether the information to be pushed is stored in its own memory.
Step 413, if the information to be pushed is not stored in the server, the server determines that the storage location of the information to be pushed is the location of the identifier of the terminal corresponding to the information to be pushed in the second storage, and stores the information to be pushed.
Step 414, the server establishes a second corresponding relationship between the index identifier and the storage location of the information to be pushed, and stores the second corresponding relationship in the location of the information to be pushed in the second storage.
Step 415, the target terminal sends a download request for downloading the information to be pushed to the server.
Wherein, the downloading request carries the identifier of the target terminal.
The target terminal may be a terminal which has a communication connection with the server and needs to download the information to be pushed, which is stored in the server. For example, the identifier of the target terminal may be a user account of an APP application.
It should be noted that the first corresponding relationship, the second corresponding relationship and the information to be pushed belonging to the same category in the present embodiment are all stored in the same memory.
Step 416, the server receives the download request sent by the target terminal.
Step 417, the server responds to the download request, and searches for the target index identifier corresponding to the identifier of the target terminal in the first corresponding relationship based on the identifier of the target terminal.
The target index identifier is an index identifier corresponding to the identifier of the target terminal.
Step 418, the server searches the target storage location in the second corresponding relationship based on the target index identifier.
The target storage position is a storage position of information to be pushed, which needs to be downloaded by the terminal.
And 419, the server acquires the information to be pushed from the target storage position and sends the information to the target terminal.
After the server acquires the target storage position of the information to be pushed, which is required to be downloaded by the target terminal, the server can acquire the information to be pushed from the corresponding memory and push the acquired information to be pushed to the target terminal. It should be noted that, while sending the information to be pushed, the target terminal may send the index identifier corresponding to the pushed information, so that the target terminal may determine whether the received information to be pushed is correct by using the same hash algorithm as that of the service terminal according to the received index identifier.
Based on the foregoing embodiment, the push information storage method provided in the embodiment of the present invention further includes the following steps:
and step 420, the target terminal receives the information to be pushed sent by the server.
For example, after determining that the information to be pushed sent by the server is received, the target terminal may generate a read confirmation message and send the read confirmation message to the server, so as to inform the server that the target terminal has received the information to be pushed.
Step 421, the target terminal sends the read confirmation message to the server.
Step 422, the server receives the read acknowledge message sent by the target terminal.
Step 423, the server responds to the read confirmation message and deletes the stored identifier of the target terminal.
In other embodiments of the present invention, after receiving the read confirm message, the server may determine that the target terminal has received the information to be pushed, and to avoid repeated reading of the message and waste of storage space, may delete the identifier corresponding to the target terminal, that is, delete the correspondence between the identifier of the target terminal and the index identifier in the first correspondence.
Of course, in this embodiment, after the interval preset time, the server may delete the first corresponding relationship, the second corresponding relationship, and the information to be pushed, which are stored in the memories (the self memory and the first memory).
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
The push information storage method provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
Based on the foregoing embodiments, an embodiment of the present invention provides a push information storage method, which is shown in fig. 3 and includes the following steps:
step 501, a server receives a push request for pushing information to at least two terminals.
Step 502, the server responds to the pushing request, and obtains the information to be pushed based on the identifier of the information to be pushed.
Step 503, the server obtains the attribute information of the terminal based on the identifier of the terminal.
And 504, the server generates an index identifier of the information to be pushed by adopting a preset algorithm based on the attribute information of the terminal.
Step 505, the server establishes a first corresponding relationship and stores the first corresponding relationship in a memory of the server.
Step 506, the server determines whether the information to be pushed is stored in its own memory.
Step 507, if the information to be pushed is not stored in the server, the server determines the storage position of the information to be pushed and stores the information to be pushed.
And step 508, the server establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed, and stores the second corresponding relationship.
After 509, the server deletes the first corresponding relationship, the second corresponding relationship and the information to be pushed stored in the memory of the server at preset time intervals.
It should be noted that the first corresponding relationship, the second corresponding relationship and the information to be pushed in the present embodiment are all stored in the same memory of the server.
Step 510, receiving a downloading request sent by the target terminal for downloading the information to be pushed to the server.
Step 511, the server receives the download request sent by the target terminal.
Step 512, the server responds to the download request, and searches for a target index identifier corresponding to the identifier of the target terminal in the first corresponding relationship based on the identifier of the target terminal.
Step 513, the server searches the target storage location in the second corresponding relationship based on the target index identifier.
The target storage position is a storage position of information to be pushed, which needs to be downloaded by the terminal.
And 514, the server acquires the information to be pushed in the target storage position and sends the information to the target terminal.
Based on the foregoing embodiment, the push information storage method provided in the embodiment of the present invention further includes the following steps:
step 515, the target terminal receives the information to be pushed sent by the server.
Step 516, the target terminal sends a read confirm message to the server.
Step 517, the server receives the read confirmation message sent by the target terminal.
Step 518, the server responds to the read confirm message and deletes the stored identification of the target terminal.
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
The push information storage method provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
Based on the foregoing embodiment, the information pushing method provided in the embodiment of the present invention is applied to pushing a whole member of information through an instant messaging application, where the terminal is a mobile device C, the server is a server a having a communication connection with the mobile device C, the target terminal B, and the identifier of the terminal is an example where each terminal uses a number of the instant messaging application:
after receiving a push request sent by an administrator, if more users need to be pushed and the current remaining storage space of the mobile device C is not enough to store the numbers, information to be pushed and index identifiers of all terminals, a whole push number packet can be divided by a number aggregation module, and an index identifier MSGID of the information to be pushed is generated by adopting a hash algorithm, wherein the whole push number packet comprises the terminal numbers UIN of all mobile device C using applications; as shown in fig. 4, after receiving the whole member push request, the number aggregation module 11 may generate an index identifier MSGID, and divide the number packet from the number pool, where each divided category number has push information MSG corresponding to the number. For example, the numbers of UIN1, UIN4 and UIN7 may be classified into one category, and the numbers of UIN2, UIN6 and UIN8 may be classified into one category, but the MSGID and the MSG corresponding to the number of each category are the same.
Then, after classifying and establishing the corresponding relationship among UIN, MSG and MSGID, as shown in fig. 5, the public message storage module 12 may store these pieces of information, and the public message storage module includes two modules, a number message list and a public message storage module. When the first corresponding relation, the second corresponding relation and the MSG are stored, the first corresponding relation, the second corresponding relation and the MSG are stored in the same memory, and the first corresponding relation, the second corresponding relation and the MSG are stored in another memory, wherein the first corresponding relation, the second corresponding relation and the MSG correspond to numbers UIN1, UIN4 and UIN7, and the numbers UIN2, UIN6 and UIN 8.
Finally, as shown in fig. 6, when the target terminal B needs to download the information to be pushed (client pull message), the public message reading and aggregating module 13 first traverses all messages of the number UIN from the number message list, and if the traversed message is a whole member push message, the message entity is exchanged from the public message storage module 14 by using the MSGID as a main key, and the message entity and the index identifier corresponding to the information to be pushed are issued to the client together.
The embodiment of the invention also provides a storage method of the push information, which comprises the following steps:
and a1, receiving the first information sent by the first terminal.
The server receives first information sent by a first terminal, wherein the first information is information sent by the first terminal to at least one second terminal; the first terminal and the at least one second terminal are in a first group.
Here, the first group is a group consisting of at least two terminals in instant messaging, and the members in the group share information sent by any member in the group.
The information includes textual content, rich media content, and the like.
Step a2, generating a first index identifier corresponding to the content of the first information based on the first information, and establishing a first mapping relation between the first information and the first index identifier.
Illustratively, the server generates a first index identifier corresponding to the content of the first information based on the first information, and establishes a first mapping relation between the first information and the first index identifier.
The first index identification is a unique description of the first information and is related to information such as a sender number of the first information, a serial number of the first information, an information type of the first information, a length of information content, a random value and the like.
Here, when the first group is a QQ group, the sender number of the first message is a QQ number corresponding to the terminal that sent the first message; the information types of the first information include: textual information, rich media information, etc.
Step a3, storing the first information and the first mapping relation to the first storage area.
The server sends the first information and the first mapping relation to a first storage area of the first storage, so that the first storage area of the first storage stores the first information and the first mapping relation.
The first memory is a shared storage server corresponding to the server, and the first memory and the server are independent.
And a4, storing the first index identification in a second storage area corresponding to the first terminal and the at least one second terminal respectively.
The server sends a first index identifier to a second storage area of a second storage corresponding to the first terminal and the at least one second terminal respectively; that is, the second storage area of the second memory stores only the first index identification and does not store the first information.
Here, each terminal will have a second memory, i.e. a personal storage server, uniquely corresponding to it; the personal storage server and the terminal are independent, and the shared storage server and the personal storage server are also independent.
The operation executed by the information processing method in the first embodiment of the invention can be realized by an independent server as described above; or may be implemented by a plurality of independent servers as in the embodiment of the present invention.
The embodiment of the invention also provides a storage method of the push information, which comprises the following steps:
step b1, the group message distribution server receives the first information sent by the first terminal.
Illustratively, the first information is information sent by the first terminal to at least one second terminal; the first terminal and the at least one second terminal are in a first group.
Here, the first group is a group consisting of at least two terminals in instant messaging, and the members in the group share information sent by any member in the group.
The information includes textual content, rich media content, and the like.
Step b2, the group message distribution server generates a first index identifier corresponding to the content of the first information based on the first information, and establishes a first mapping relationship between the first information and the first index identifier.
The first index identification is a unique description of the first information and is related to information such as a sender number of the first information, a serial number of the first information, an information type of the first information, a length of information content, a random value and the like.
Step b3, the group message distribution server distributes the first information and the first mapping relation to the first storage area.
Illustratively, the group message distribution server sends the first information and the first mapping relation to the first storage area of the first memory, so that the first storage area of the first memory stores the first information and the first mapping relation;
the first memory is a shared storage server, and the first memory is independent of the transit server and the group message distribution server.
Step b4, the transit server sends the first index identifier to a second storage area corresponding to the first terminal and the at least one second terminal respectively.
The relay server sends a first index identifier to a second storage area of a second storage corresponding to the first terminal and the at least one second terminal respectively; that is, the second storage area of the second memory stores only the first index identification and does not store the first information.
Here, each terminal will have a second memory, i.e. a personal storage server, uniquely corresponding to it; the personal storage server and the terminal are independent, and the shared storage server and the personal storage server are also independent.
The group message distribution server and the transit server in the embodiment of the present invention may be understood as the servers in the foregoing embodiments.
The embodiment of the invention also provides a storage method of the push information, which comprises the following steps:
step c1, the group message distribution server receives the first information sent by the first terminal.
In other embodiments of the present invention, the first information is information that the first terminal sends to at least one second terminal; the first terminal and the at least one second terminal are in a first group.
Here, the first group is a group consisting of at least two terminals in instant messaging, and the members in the group share information sent by any member in the group.
The information includes textual content, rich media content, and the like.
Step c2, the group message distribution server generates a first index identifier corresponding to the content of the first information based on the first information, and establishes a first mapping relationship between the first information and the first index identifier.
The first index identification is a unique description of the first information and is related to information such as a sender number of the first information, a serial number of the first information, an information type of the first information, a length of information content, a random value and the like.
And c3, the group message distribution server distributes the first information and the first mapping relation to the shared information storage server.
And c4, the shared storage server stores the first information and the first mapping relation and sends a message of successful storage to the group message distribution server.
In another embodiment of the present invention, as shown in fig. 7, taking the first group as the group number groupCode1 QQ group as an example, the terminals are all terminals in the group number groupCode1 QQ group, and the shared storage server already stores the index identifier 1, the information content 1, and the mapping relationship between the index identifier 1 and the information content 1 in the group number groupCode1 QQ group; the shared storage server also stores index identifier 3, information content 3, mapping relation between index identifier 3 and information content 3 in the QQ group with group number groupCode2, and mapping relation between index identifier 4, information content 4, and mapping relation between index identifier 4 and information content 4.
When the shared storage server stores the index identifier 2, the information content 2 and the mapping relation between the index identifier 2 and the information content 2 in the QQ group with the group number of groupCode1, firstly, the group message distribution server sends the index identifier 2, the information content 2 and the mapping relation between the index identifier 2 and the information content 2 in the QQ group with the group number of groupCode1 to the shared storage server; the shared storage server stores the index identifier 2 and the information content 2 in the received QQ group with the group number of groupCode1 sent by the group message distribution server and the mapping relation between the index identifier 2 and the information content 2 to the storage area corresponding to the QQ group with the group number of groupCode1, and sends a message of successful storage to the group message distribution server.
And c5, the group message distribution server distributes the first index identification to the transit server.
And c6, the transit server sends the first index identification to the personal storage servers respectively corresponding to the first terminal and the at least one second terminal.
Here, each terminal has a personal storage server uniquely corresponding thereto.
Taking the example that the group message distribution server sends the index identifier 2 and the information content 2 in the group number of group pc code1 to the user in the group number of group pc code1, the group message distribution server distributes the information to the users in the group, as shown in fig. 8, the group message distribution server first obtains the user information of the group number of group pc code1, and the user information at least includes the terminal number of the user in the group; the group message distribution server sends the index identifier 2 and the information content 2 to the transit server based on each user in the group, or the group message distribution server sends the terminal number of the user in the QQ group, the index identifier 2 and the information content 2 to the transit server together. Here, the group message distribution server respectively sends the index identifier 2 and the information content 2 to the relay server based on each user in the QQ group, which means that for each user in the QQ group, the group message distribution server sends the index identifier 2 and the information content 2 of the user to the relay server to request the relay server to send information to the user; if there are N users in the QQ group, the group message distribution server sends the index identifier 2 and the information content 2 to the transit server N times, and sends the index identifier 2 and the information content 2 to the transit server for one user in the QQ group each time.
The transit server obtains the network connection state of the users in the QQ group with the group number of groupCode1 and the personal control information corresponding to each user in the group, wherein the personal control information comprises: the effective time length of information storage, read-write access authority and the like; the transfer server sends the information content 2 to a first terminal and a second terminal which are established in a QQ group internal network connection state with a group number of groupCode 1; storing the personal control information and the index identifier 2 to a personal storage server corresponding to each terminal in the QQ group; here, each user within the QQ group has corresponding personal control information. Therefore, the index identifier 2 is sent to the personal memories corresponding to the fifth terminal and the sixth terminal, which are disconnected from the QQ intra-group network with the group number of groupCode1, so that the information content 2 is stored offline.
The embodiment of the invention also provides a storage method of the push information, which comprises the following steps:
and d1, when the terminal state of the third terminal is switched from the network connection non-establishment state to the network connection establishment state, obtaining the second index identifier from the second storage area corresponding to the third terminal.
In other embodiments of the present invention, the third terminal sends, to the corresponding second storage area, an index identifier request message that is stored in the second storage area when the request for acquiring the terminal state of the third terminal is that the network connection is not established.
The second storage area transmits a second index identification to the third terminal based on the request message.
Here, the second storage area is a personal storage server uniquely corresponding to the third terminal.
The third terminal is any one terminal in a first group formed by a plurality of terminals; the second index identifier is an index identifier corresponding to information to be sent to the third terminal in the first group when the third terminal is in a network connection non-established state; the first storage area stores a mapping relation between a plurality of groups of information and index identifications; the second storage area stores a plurality of index identifications.
And d2, acquiring the corresponding second information from the first storage area based on the second index identifier.
In other embodiments of the present invention, the third terminal sends a request message carrying the second index identifier to the first storage area to request to acquire the second information corresponding to the second index identifier; and receiving second information matched with the second storage area in the mapping relation between the index identification stored in the second storage area and the information based on the second index identification.
Here, the second storage area is a shared storage server.
In this embodiment, when the network connection state of the terminal is switched from disconnection to connection, the terminal obtains the offline information, and as shown in fig. 9, when the network connection state of the third terminal is switched from disconnection to connection, the terminal first pulls the offline information to the personal storage server uniquely corresponding to the terminal, and when the network connection state of the third terminal is obtained from the personal storage server and is offline, the index identifier 1 and the index identifier 2 stored in the personal storage server are sent to the third terminal; the third terminal sends a request message to the shared storage server based on the index identifier 1 and the index identifier 2 to request to acquire the information content 1 and the information content 2 corresponding to the index identifier 1 and the index identifier 2; the shared storage server searches the information content 1 corresponding to the index identifier 1 and the information content 2 corresponding to the index identifier 2 in the mapping relation between the index identifier and the information content stored in the shared storage server, and sends the information content 1 and the information content 2 to the third terminal, so that the session window formed by the third terminal and corresponding to the corresponding group outputs the information content 1 and the information content 2.
In the process, the shared storage server stores a message content, the personal storage server corresponding to each terminal is not required to store the information content sent by the transfer server respectively, and the personal storage server is only required to store the index identification uniquely corresponding to the information content; when the network connection state of the terminal is switched from disconnection to connection, the information content corresponding to the index identifier can be acquired from the shared storage server through the index identifier in the personal storage server corresponding to the terminal; therefore, resources occupied by the information content stored in the personal memory are saved, and the waste of the storage resources is avoided.
An embodiment of the present invention provides a pushed information storage apparatus 6, which can be applied to a pushed information storage method provided in the embodiment corresponding to fig. 1 to 3, and as shown in fig. 10, the apparatus includes: a first receiving unit 61, a first obtaining unit 62, a first establishing unit 63, a first processing unit 64 and a second establishing unit 65, wherein:
a first receiving unit 61, configured to receive a push request for pushing information to at least two terminals.
The push request carries an identifier of the terminal and an identifier of the information to be pushed.
And a first obtaining unit 62, configured to, in response to the push request, obtain the information to be pushed based on the identifier of the information to be pushed.
The first obtaining unit 62 is further configured to generate an index identifier of the information to be pushed based on the identifier of the terminal.
A first establishing unit 63, configured to establish a first corresponding relationship between the identifier of the terminal and the index identifier, and store the first corresponding relationship.
And the first processing unit 64 is configured to determine a storage location of the information to be pushed, and store the information to be pushed.
The second establishing unit 65 is configured to establish a second corresponding relationship between the index identifier and the storage location of the information to be pushed, and store the second corresponding relationship.
The push information storage device provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
In other embodiments of the present invention, the first obtaining unit includes: a first acquisition module and a first processing module, wherein:
and the first acquisition module is used for acquiring the attribute information of the terminal based on the identifier of the terminal.
Wherein the attribute information is information related to the terminal.
And the first processing module is used for generating an index identifier of the information to be pushed by adopting a preset algorithm based on the attribute information of the terminal.
In other embodiments of the present invention, the first establishing unit includes: a second acquisition module and a second processing module, wherein:
and the second acquisition module is used for acquiring the residual storage space of the storage of the server.
And the second acquisition module is further used for acquiring the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed.
And the second processing module is used for establishing a first corresponding relation and storing the first corresponding relation in the memory of the server if the sum of the identifier of the terminal, the index identifier and the memory space occupied by the information to be pushed is less than or equal to the residual memory space of the memory of the server.
Further, the second processing module is further configured to perform the following steps:
and if the sum of the identifiers of the at least two terminals, the index identifiers and the storage space occupied by the information to be pushed is larger than the rest storage space of the storage, adding the first storage to obtain a second storage.
Wherein, the second memory comprises at least two memories; the first memory belongs to the second memory.
And classifying the terminals according to a preset classification rule.
A correspondence between the identity of the terminal in each category and the second memory is established.
And establishing a corresponding relation between the identifier of the terminal in each category and the index identifier.
The correspondence between the identity of the terminal in each category and the index identity is stored in a corresponding memory in the second memory based on the correspondence between the identity of the terminal in each category and the second memory.
Correspondingly, the first processing unit is further configured to perform the following steps:
and determining the storage position of the information to be pushed as the position of the identifier of the terminal corresponding to the information to be pushed in the second memory, and storing the information to be pushed.
In other embodiments of the present invention, the first processing unit comprises: judge module and storage module, wherein:
and the judging module is used for judging whether the information to be pushed is stored in the memory of the server.
And the storage module is used for determining the storage position of the information to be pushed and storing the information to be pushed if the information to be pushed is not stored in the server.
Further, the apparatus further comprises: a deletion unit in which:
and the deleting unit is used for deleting the first corresponding relation, the second corresponding relation and the information to be pushed which are stored in the memory of the server at intervals of preset time.
Further, the apparatus further comprises: a second receiving unit, a second obtaining unit and a sending unit, wherein:
and the second receiving unit is used for receiving a downloading request which is sent by the target terminal and used for downloading the information to be pushed.
Wherein, the downloading request carries the identifier of the target terminal.
And the second acquisition unit is used for responding to the downloading request and searching a target index identifier corresponding to the identifier of the target terminal in the first corresponding relation based on the identifier of the target terminal.
And the second acquisition unit is further used for searching the target storage position in the second corresponding relation based on the target index identifier.
The target storage position is a storage position of information to be pushed, which needs to be downloaded by the terminal.
And the sending unit is used for acquiring the information to be pushed in the target storage position and sending the information to the target terminal.
In other embodiments of the present invention, the second receiving unit is further configured to receive a read confirm message sent by the target terminal.
The read confirmation message is sent by the target terminal after the target terminal determines to receive the information to be pushed.
And the deleting unit is also used for responding the read confirmation message and deleting the stored identification of the target terminal.
It should be noted that, in the interaction process between each unit and each module in this embodiment, reference may be made to the interaction process in the push information storage method provided in the embodiments corresponding to fig. 1 to 3, and details are not described here.
The push information storage device provided by the embodiment of the invention receives a push request and acquires information to be pushed based on the identifier of the information to be pushed, generates an index identifier of the information to be pushed based on the identifier of a terminal, establishes a first corresponding relationship between the identifier of the terminal and the index identifier and stores the first corresponding relationship, the identifier of the terminal and the identifier of the information to be pushed are carried in the push request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes a second corresponding relationship between the index identifier and the storage position of the information to be pushed and stores the second corresponding relationship, so that when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identifier of the information to be pushed and the identifier of the terminal and the corresponding relationship between the stored index identifier and the storage position of the information to be pushed, and therefore, the information to be pushed does not need to be stored for many times, the problem that a plurality of information to be pushed need to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
An embodiment of the present invention provides a server 7, which may be applied to the pushed information storage method provided in the embodiment corresponding to fig. 1 to 3, and as shown in fig. 11, the server includes: a processor 71 and a communication interface 72, wherein:
a processor 71 for receiving a push request for pushing information to at least two terminals via a communication interface 72; the push request carries identification information of the terminal and an identification of information to be pushed; responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed; generating an index identification of information to be pushed based on the identification of the terminal; establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation; determining a storage position of information to be pushed, and storing the information to be pushed; and establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation.
It should be noted that, in the interaction process between the processor and the communication interface in this embodiment, reference may be made to the interaction process in the pushed information storage method provided in the embodiments corresponding to fig. 1 to 3, and details are not described here.
The server provided by the embodiment of the invention receives the pushing request, acquires the information to be pushed, generates the index identification of the information to be pushed, establishes the first corresponding relationship between the identification of the terminal and the index identification and stores the first corresponding relationship, the identification of the terminal is carried in the pushing request, determines the storage position of the information to be pushed and stores the information to be pushed, establishes the second corresponding relationship between the index identification and the storage position of the information to be pushed and stores the second corresponding relationship, thus, when the information to be pushed is pushed, the information to be pushed can be acquired according to the corresponding relationship between the stored index identification of the information to be pushed and the identification of the terminal and the corresponding relationship between the index identification and the storage position of the information to be pushed, the information to be pushed does not need to be stored for many times, and the problem that a plurality of information to be pushed needs to be stored in the existing information pushing scheme is solved, the storage space is greatly saved, and the waste of resources is avoided.
The push information storage method provided by the embodiment of the present invention may be applied to a system corresponding to fig. 12, where the system includes: a terminal and a server c, wherein the server c can communicate with a plurality of terminals, and fig. 12 illustrates an example in which two terminals, terminal a and terminal b, are included; the terminal a is a target terminal, and the server is the server provided in the embodiment corresponding to fig. 11.
The embodiment of the invention provides a computer storage medium, wherein computer-executable instructions are stored in the computer storage medium and are used for the push information storage method provided by the embodiment corresponding to the figures 1-3.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (17)

1. A method for storing pushed information, the method comprising:
receiving a push request for pushing information to at least two terminals; the push request carries an identifier of the terminal and an identifier of information to be pushed;
responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed;
generating an index identifier of the information to be pushed based on the identifier of the terminal;
establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation;
determining a storage position of the information to be pushed, and storing the information to be pushed;
and establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation.
2. The method according to claim 1, wherein the generating an index identifier of the information to be pushed based on the identifier of the terminal comprises:
acquiring attribute information of the terminal based on the identifier of the terminal;
and generating an index identifier of the information to be pushed by adopting a preset algorithm based on the attribute information of the terminal.
3. The method according to claim 1, wherein the establishing a first correspondence between the identifier of the terminal and the index identifier, and storing the first correspondence comprises:
acquiring the current residual storage space of a storage of a server;
acquiring the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed;
and if the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed is less than or equal to the current residual storage space of the server storage, establishing the first corresponding relation and storing the first corresponding relation in the server storage.
4. The method of claim 3, further comprising:
if the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed is larger than the current residual storage space of the storage, adding a first storage to obtain a second storage; wherein, the second memory comprises at least two memories; the first memory belongs to the second memory;
classifying the terminals according to a preset classification rule;
establishing a corresponding relation between the identifier of the terminal in each category and the second memory;
storing the correspondence between the identifier of the terminal in each category and the index identifier in a corresponding memory in a second memory based on the correspondence between the identifier of the terminal in each category and the second memory;
the determining a storage location of the information to be pushed and storing the information to be pushed includes:
and determining that the storage position of the information to be pushed is the position of the identifier of the terminal corresponding to the information to be pushed in the second storage, and storing the information to be pushed.
5. The method according to claim 1, wherein the determining a storage location of the information to be pushed and storing the information to be pushed comprises:
judging whether the information to be pushed is stored in a memory of the server;
and if the information to be pushed is not stored in the server, determining the storage position of the information to be pushed and storing the information to be pushed.
6. The method according to claim 1, wherein the establishing a second correspondence between the index identifier and the storage location of the information to be pushed, and storing the second correspondence, further comprises:
and after a preset time interval, deleting the first corresponding relation, the second corresponding relation and the information to be pushed stored in a memory of the server.
7. The method according to claim 1, wherein the establishing a second correspondence between the index identifier and the storage location of the information to be pushed, and storing the second correspondence, further comprises:
receiving a downloading request sent by a target terminal and used for downloading the information to be pushed; wherein, the downloading request carries the identifier of the target terminal;
responding to the downloading request, and searching a target index identifier corresponding to the identifier of the target terminal in the first corresponding relation based on the identifier of the target terminal;
searching a target storage position in the second corresponding relation based on the target index identification; the target storage position is a storage position of the information to be pushed, which needs to be downloaded by the terminal;
and acquiring the information to be pushed in the target storage position, and sending the information to the target terminal.
8. The method according to claim 7, wherein the obtaining the information to be pushed in the target storage location and sending the information to the target terminal further comprises:
receiving a read confirmation message sent by the target terminal; the read confirmation message is sent by the target terminal after the target terminal determines to receive the information to be pushed;
and deleting the stored identification of the target terminal in response to the read confirmation message.
9. A push information storage device, the device comprising: the device comprises a first receiving unit, a first obtaining unit, a first establishing unit, a first processing unit and a second establishing unit, wherein:
the first receiving unit is used for receiving a push request for pushing information to at least two terminals; the push request carries an identifier of the terminal and an identifier of information to be pushed;
the first obtaining unit is configured to respond to the push request and obtain the information to be pushed based on the identifier of the information to be pushed;
the first obtaining unit is further configured to generate an index identifier of the information to be pushed based on the identifier of the terminal;
the first establishing unit is configured to establish a first corresponding relationship between the identifier of the terminal and the index identifier, and store the first corresponding relationship;
the first processing unit is configured to determine a storage location of the information to be pushed, and store the information to be pushed;
the second establishing unit is configured to establish a second corresponding relationship between the index identifier and the storage location of the information to be pushed, and store the second corresponding relationship.
10. The apparatus of claim 9, wherein the first obtaining unit comprises: a first acquisition module and a first processing module, wherein:
the first obtaining module is configured to obtain attribute information of the terminal based on the identifier of the terminal; wherein the attribute information is information related to the terminal;
the first processing module is configured to generate an index identifier of the information to be pushed by using a preset algorithm based on the attribute information of the terminal.
11. The apparatus of claim 9, wherein the first establishing unit comprises: a second acquisition module and a second processing module, wherein:
the second obtaining module is used for obtaining the residual storage space of the storage of the server;
the second obtaining module is further configured to obtain a sum of the identifier of the terminal, the index identifier, and a storage space occupied by the information to be pushed;
the second processing module is configured to establish the first corresponding relationship and store the first corresponding relationship in the memory of the server if a sum of the identifier of the terminal, the index identifier, and the memory space occupied by the information to be pushed is less than or equal to a memory space of a remaining memory of the server.
12. The apparatus of claim 11, wherein the second processing module is further configured to:
if the sum of the identifier of the terminal, the index identifier and the storage space occupied by the information to be pushed is larger than the rest storage space of the storage, adding a first storage to obtain a second storage; wherein, the second memory comprises at least two memories; the first memory belongs to the second memory;
classifying the terminals according to a preset classification rule;
establishing a corresponding relation between the identifier of the terminal in each category and the second memory;
storing the correspondence between the identifier of the terminal in each category and the index identifier in a corresponding memory in a second memory based on the correspondence between the identifier of the terminal in each category and the second memory;
the first processing unit is further configured to:
and determining that the storage position of the information to be pushed is the position of the identifier of the terminal corresponding to the information to be pushed in the second storage, and storing the information to be pushed.
13. The apparatus of claim 9, wherein the first processing unit comprises: judge module and storage module, wherein:
the judging module is used for judging whether the information to be pushed is stored in a memory of the server;
the storage module is configured to determine a storage location of the information to be pushed and store the information to be pushed if the information to be pushed is not stored in the server.
14. The apparatus of claim 9, further comprising: a deletion unit in which:
the deleting unit is configured to delete the first corresponding relationship, the second corresponding relationship, and the information to be pushed, which are stored in a memory of the server, at intervals of preset time.
15. The apparatus of claim 9, further comprising: a second receiving unit, a second obtaining unit and a sending unit, wherein:
the second receiving unit is used for receiving a downloading request which is sent by a target terminal and used for downloading the information to be pushed; wherein, the downloading request carries the identifier of the target terminal;
the second obtaining unit is configured to, in response to the download request, search for a target index identifier corresponding to the identifier of the target terminal in the first corresponding relationship based on the identifier of the target terminal;
the second obtaining unit is further configured to search a target storage location in the second corresponding relationship based on the target index identifier; the target storage position is a storage position of the information to be pushed, which needs to be downloaded by the terminal;
and the sending unit is used for acquiring the information to be pushed in the target storage position and sending the information to the target terminal.
16. A server, characterized in that the server comprises: a processor and a communication interface, wherein:
the processor is used for receiving a push request for pushing information to at least two terminals through the communication interface; the push request carries an identifier of the terminal and an identifier of information to be pushed; responding to the pushing request, and acquiring the information to be pushed based on the identification of the information to be pushed; generating an index identifier of the information to be pushed based on the identifier of the terminal; establishing a first corresponding relation between the identifier of the terminal and the index identifier, and storing the first corresponding relation; determining a storage position of the information to be pushed, and storing the information to be pushed; and establishing a second corresponding relation between the index identification and the storage position of the information to be pushed, and storing the second corresponding relation.
17. A computer storage medium having stored therein computer-executable instructions for performing the push information storage method of any one of claims 1 to 8.
CN201710365891.4A 2017-05-09 2017-05-09 Push information storage method and device, server and computer storage medium Active CN108881354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710365891.4A CN108881354B (en) 2017-05-09 2017-05-09 Push information storage method and device, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710365891.4A CN108881354B (en) 2017-05-09 2017-05-09 Push information storage method and device, server and computer storage medium

Publications (2)

Publication Number Publication Date
CN108881354A CN108881354A (en) 2018-11-23
CN108881354B true CN108881354B (en) 2021-11-09

Family

ID=64320948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710365891.4A Active CN108881354B (en) 2017-05-09 2017-05-09 Push information storage method and device, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN108881354B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617787A (en) * 2018-12-17 2019-04-12 上海点融信息科技有限责任公司 For the message method of sending and receiving of block chain network, storage medium, calculate equipment
CN109600240A (en) * 2018-12-21 2019-04-09 北京云中融信网络科技有限公司 Group Communications method and device
CN110035002B (en) * 2019-04-01 2021-09-10 达闼机器人有限公司 Method for implementing instant messaging, terminal equipment and storage medium
CN110691143B (en) * 2019-10-21 2022-03-04 北京奇艺世纪科技有限公司 File pushing method and device, electronic equipment and medium
CN111131277B (en) * 2019-12-27 2022-07-05 深圳市速易宝智能科技有限公司 Data pushing method and system
CN112632375B (en) * 2020-12-18 2023-07-25 深圳市和讯华谷信息技术有限公司 Session information processing method, server and storage medium
CN112671636B (en) * 2020-12-25 2023-03-03 深圳云之家网络有限公司 Group message pushing method and device, computer equipment and storage medium
CN112788128B (en) * 2020-12-31 2023-02-03 青岛海尔科技有限公司 Business information pushing method and device, storage medium and electronic device
CN112954018A (en) * 2021-01-28 2021-06-11 北京奇艺世纪科技有限公司 Information processing method and device, electronic equipment and readable storage medium
CN113176951A (en) * 2021-04-20 2021-07-27 京东数字科技控股股份有限公司 Message copying method, device, equipment and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056079A (en) * 2009-10-30 2011-05-11 中国移动通信集团上海有限公司 Method, device and system for determining information to be pushed
CN103973737A (en) * 2013-01-30 2014-08-06 腾讯科技(深圳)有限公司 Method, server and browser for actively pushing messages
CN104796322A (en) * 2015-03-25 2015-07-22 腾讯科技(深圳)有限公司 Message processing method and equipment
CN104811482A (en) * 2015-04-01 2015-07-29 广东小天才科技有限公司 Classifying storing method and system for terminal data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102347967B (en) * 2010-07-30 2014-01-01 华为技术有限公司 Method and device for cooperation between push equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056079A (en) * 2009-10-30 2011-05-11 中国移动通信集团上海有限公司 Method, device and system for determining information to be pushed
CN103973737A (en) * 2013-01-30 2014-08-06 腾讯科技(深圳)有限公司 Method, server and browser for actively pushing messages
CN104796322A (en) * 2015-03-25 2015-07-22 腾讯科技(深圳)有限公司 Message processing method and equipment
CN104811482A (en) * 2015-04-01 2015-07-29 广东小天才科技有限公司 Classifying storing method and system for terminal data

Also Published As

Publication number Publication date
CN108881354A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108881354B (en) Push information storage method and device, server and computer storage medium
CN107332876B (en) Method and device for synchronizing block chain state
US7496602B2 (en) Optimizing communication using scalable peer groups
CN105991412B (en) Information push method and device
CN106549988B (en) Group joining method, device and system
US20060117026A1 (en) Optimizing communication using scaleable peer groups
US10637794B2 (en) Resource subscription method, resource subscription apparatus, and resource subscription system
CN107204873B (en) Method for switching target domain name resolution server and related equipment
CN106470150B (en) Relation chain storage method and device
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN108880972B (en) Information processing method, server and terminal
KR20180118732A (en) Managing multiple profiles for a single account in an asynchronous messaging system
CN103326925B (en) A kind of information push method and device
CN103685357A (en) Account multi-open message processing method and system
CN111901705A (en) OMCI function virtualization system of OLT equipment
CN106411713B (en) State notification method and server
US10268532B2 (en) Application message processing system, method, and application device
CN112929257A (en) Multi-scenario message sending method, device, server and storage medium
CN104079663A (en) Distributed type real-time synchronizing network system and data annunciating method thereof
CN106534234B (en) Relationship chain processing system, method and device
CN112104888B (en) Method and system for grouping live broadcast users
CN112702361B (en) Safety blocking method, device and equipment based on lightweight distributed cooperative equipment
CN110913020B (en) Data transmission method and device for workgroup
CN100454908C (en) Instant message service processing method and service system
US8150999B2 (en) Messaging service in a peer to peer type telecommunications network

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