CN108111574A - A kind of information push method and system - Google Patents
A kind of information push method and system Download PDFInfo
- Publication number
- CN108111574A CN108111574A CN201711224650.4A CN201711224650A CN108111574A CN 108111574 A CN108111574 A CN 108111574A CN 201711224650 A CN201711224650 A CN 201711224650A CN 108111574 A CN108111574 A CN 108111574A
- Authority
- CN
- China
- Prior art keywords
- user
- message
- personal messages
- system message
- database
- 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.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention, which provides a kind of information push method and system, method, to be included:System message ID and system message title correspondence are stored into first database, personal messages ID, designated user ID and personal messages title correspondence are stored into first database, system message ID and system message content correspondence are stored in the second database, personal messages ID and personal messages content correspondence are stored into the second database;User's request is received, the system message title stored in first database is pushed to User ID, and inquires about the designated user ID identical with User ID, the corresponding personal messages titles of designated user ID are pushed to User ID;Read requests of the user to message are received, by system message content or personal messages content push to User ID from the second database.This method and system are effectively reduced the storage burden of database, improve write efficiency of the database to message, are conducive to be promoted the performance of whole system, and then are conducive to promote user experience.
Description
Technical field
The present invention relates to field of computer technology, more particularly, to a kind of information push method and system.
Background technology
With the increasingly increase of website registered user and any active ues quantity, the service surface that website is related to is more and more wider,
Requirement of the user for obtaining precise information from website is also higher and higher.Meanwhile as the operation personnel of website, for by website
The information such as new dynamic, new information and New activity be pushed at the first time user demand it is also increasingly urgent.
However, website registered user's quantity is up to millions of, the message number that website need to push is consequently increased, and every disappears
Breath is both needed to first write in database, causes the load of database increasingly to increase before push.It is notified particularly with supplying system
Class message need to give each user to send out a data, and be both needed to first write database per data, greatly increase the pressure of database
At the same time power, also by the write efficiency of extreme influence database, causes when sending a pieces of system notification class message, first
A user for receiving message may receive early several minutes of the user of message than the last one.In addition, some registered users are actual
The upper message there is no reading push causes system to generate many useless data.
In view of this, it is urgent to provide a kind of method for pushing and system that can improve website message pushing efficiency.
The content of the invention
The present invention provides to overcome the problems, such as that website message pushing efficiency is relatively low in the prior art, provides a kind of message and pushes away
Delivery method and system.
On the one hand, the present invention provides a kind of information push method, including:
S1, for treating any system message in PUSH message queue and any personal messages, by the system message pair
System message ID and system message the title correspondence answered are stored into first database, and the corresponding individual of the personal messages is disappeared
Breath ID, designated user ID and personal messages title correspondence are stored into the first database, and the system message is corresponding
System message ID and system message content correspondence are stored in the second database, by the corresponding personal messages ID of the personal messages
It is corresponding with personal messages content to store into second database;
S2 receives user's request, obtains the corresponding User ID of the user, the system that will be stored in the first database
The corresponding system message title of message is pushed to the User ID, and inquires about the designated user ID identical with the User ID, will
The corresponding personal messages title of the designated user ID is pushed to the User ID;
S3 receives read requests of the user to message, according to the corresponding message id of the message, from the described second number
According to the system message ID identical with the message id or personal messages ID is obtained in storehouse, by the system message ID or personal messages
The corresponding system message contents of ID or personal messages content push give the User ID.
Preferably, the step S3 is further included:The system is obtained to the read requests of the system message according to user
The corresponding reading state of message, reading state system message ID corresponding with the system message and the user is corresponding
User ID correspondence store into user behavior record sheet.
Preferably, further included after the step S2:Described in being obtained according to user to the removal request of the system message
The corresponding deletion state of system message, by deletion state system message ID corresponding with the system message and the user
Corresponding User ID correspondence is stored into user behavior record sheet.
Preferably, further included after the step S2:It please to the read requests of the personal messages or deletion according to user
It asks and obtains the corresponding reading state of the personal messages or delete state, according to the corresponding User ID of the user and the individual
The corresponding personal messages ID of message stores the reading state or the state correspondence of deletion into the first database.
Preferably, further included after the step S2, detect the system message and/or the push state of personal messages,
According to the corresponding system message ID of the system message and/or corresponding personal messages ID of the personal messages, by the system
Message and/or the push state of personal messages correspondence are stored into the second database.
Preferably, further included after the step S2:The system stored in second database is periodically traveled through to disappear
The push state of breath and/or personal messages, when the system message and/or the push state of personal messages for failure when, by institute
It states and is treated described in system message and/or personal messages addition in PUSH message queue.
Preferably, further included after the step S3:The system message content and/or the deposit of personal messages content is slow
In depositing.
On the one hand, the present invention provides a kind of message push system, including:
Message storage module, for for treating any system message in PUSH message queue and any personal messages, inciting somebody to action
The corresponding system message ID of the system message and system message title correspondence are stored into first database, and the individual is disappeared
It ceases corresponding personal messages ID, designated user ID and personal messages title correspondence is stored into the first database, by described in
The corresponding system message ID of system message and system message content correspondence are stored in the second database, by the personal messages pair
Personal messages ID and personal messages the content correspondence answered are stored into second database;
Message header pushing module for receiving user's request, obtains the corresponding User ID of the user, by described first
The corresponding system message title of system message stored in database is pushed to the User ID, and inquires about and the User ID phase
Same designated user ID, the User ID is pushed to by the corresponding personal messages titles of the designated user ID;
Message content pushing module, it is corresponding according to the message for receiving read requests of the user to message
Message id obtains the system message ID identical with the message id or personal messages ID from second database, by described in
System message ID or the corresponding system message contents of personal messages ID or personal messages content push give the User ID.
On the one hand, the present invention provides a kind of computer program product, and the computer program product includes being stored in non-temporary
Computer program on state computer readable storage medium, the computer program include program instruction, when described program instructs
When being computer-executed, the computer is made to perform the information push method.
On the one hand, the present invention provides a kind of non-transient computer readable storage medium storing program for executing, and the non-transient computer is readable to deposit
Storage media stores computer instruction, and the computer instruction makes the computer perform the information push method.
A kind of information push method provided by the invention and system for system message, are stored by system message to number
During according to storehouse, the not corresponding user of appointing system message one by one, and only when user asks to receive message, just system message is sent out
Corresponding user is given, the storage burden of database is effectively reduced, improves write efficiency of the database to message, Jin Eryou
Effect improves the efficiency of message push;Meanwhile by the way that the title of message and content are separately stored so that user is asking
When receiving message, the title of message is first pushed to user, when user asks to read particular message, just by the message
Corresponding message content is pushed to user, avoids when message read requests are not present in user, blindly by the content of message
User is pushed to, effectively reduces the pressure of data transmission, avoids the generation of hash, and then saves memory space,
Be conducive to be promoted the performance of whole system, and then be conducive to promote user experience.
Description of the drawings
Fig. 1 is a kind of overall flow schematic diagram of information push method of the embodiment of the present invention;
Fig. 2 is a kind of overall structure diagram of message push system of the embodiment of the present invention.
Specific embodiment
With reference to the accompanying drawings and examples, the specific embodiment of the present invention is described in further detail.Implement below
Example is not limited to the scope of the present invention for illustrating the present invention.
Fig. 1 is a kind of overall flow schematic diagram of information push method of the embodiment of the present invention, as shown in Figure 1, of the invention
A kind of information push method is provided, including:
S1, for treating any system message in PUSH message queue and any personal messages, by the system message pair
System message ID and system message the title correspondence answered are stored into first database, and the corresponding individual of the personal messages is disappeared
Breath ID, designated user ID and personal messages title correspondence are stored into the first database, and the system message is corresponding
System message ID and system message content correspondence are stored in the second database, by the corresponding personal messages ID of the personal messages
It is corresponding with personal messages content to store into second database;
S2 receives user's request, obtains the corresponding User ID of the user, the system that will be stored in the first database
The corresponding system message title of message is pushed to the User ID, and inquires about the designated user ID identical with the User ID, will
The corresponding personal messages title of the designated user ID is pushed to the User ID;
S3 receives read requests of the user to message, according to the corresponding message id of the message, from the described second number
According to the system message ID identical with the message id or personal messages ID is obtained in storehouse, by the system message ID or personal messages
The corresponding system message contents of ID or personal messages content push give the User ID.
Specifically, in the present embodiment, mainly there are following three aspects in the source that message generates:
1) uniformly buried well a little on the modules in web station system, when detecting individual subscriber behavior, for example user is complete
It changes personal information, user into registration, user and buys and some columns etc. are successfully successfully paid close attention to user, will trigger at burying
The relevant message of current behavior is write message queue by message write-in functions;
2) user can independently select concern to subscribe to the column message in web station system, and the column of concern subscription is selected in user
After mesh, when any one column has new information to generate, web station system is capable of the user of the current column of query subscription, and actively will
The information directive sending of column is to booking reader.
3) website operation personnel can edit various website bulletins and system message etc., editor on website message editing machine
After finishing, message will be written into message queue, and website operation personnel can select to push messages to designated user, user group
Or all registered users etc..
With reference to it is above-mentioned understand, for web station system, in message queue the message of required push include system message and
Personal messages.Message in message queue need to be first written in database, and for system message, it in the prior art need to be in data
A piece of news is write for each user in storehouse, and when being write to message, it need to be by the title of message and content and message
The corresponding User ID of type, message id, message is write in database together, and since message number is more, and part messages is interior
It is larger to hold shared memory space, virtually adds the load of database, and the whole write efficiency of database is relatively low, and then
The pushing efficiency for causing message is relatively low.Meanwhile when user asks to receive message, existing web station system is by the title of message
User is issued together with content, however some users can't often read the content of message, so result in many nothings
Data.
In view of this, in the present embodiment, in order to reduce the storage pressure of database and effectively improve the write-in effect of database
Rate, for the system message treated in PUSH message queue, only corresponding write-in a piece of news in the database, and by the title of message
It is separately stored with content.Specifically, it is only that system message is corresponding for any system message in message queue to be sent
System message ID and system message title correspondence are stored into first database, do not specify specific User ID, i.e., without inciting somebody to action
Each system user is corresponded with system message to be stored, and without the corresponding content of storage system message;Meanwhile for waiting to push away
Any personal messages in message queue are sent, only by the corresponding personal messages ID of personal messages, designated user ID and personal messages
Title correspondence is stored into the first database, i.e., need not store the corresponding content of personal messages.In addition, lead in the present embodiment
The second database storage system message and the corresponding content of personal messages are crossed, specifically, by the corresponding system message of system message
ID and system message content correspondence are stored in the second database, and by the corresponding personal messages ID of personal messages and personal messages
Content correspondence is stored into the second database.
Further, when user initiates to ask, such as when user pulls down its messaging list, system receives asking for user
It asks, and obtains the corresponding User ID of user, and according to first database, will be stored in first database related to the user ID
Message be pushed to user.Specifically, according to the corresponding User ID of user, the system message stored in first database is pushed
To user, due to only storing the corresponding title of system message in first database, so system is only by system message pair at this time
The title answered is pushed to user.Meanwhile system is inquired about and the user ID according to the corresponding User ID of user in first database
The corresponding personal messages of designated user ID are pushed to user, due to only being stored in first database by identical designated user ID
The corresponding titles of personal messages, so at this time the corresponding title of personal messages is only pushed to user by system.
Further, system is pushed to the system message of user and personal messages are shown in the corresponding messaging list of user
In, when user, which clicks on, reads the message in messaging list, wherein message includes system message or personal messages, and system obtains first
The corresponding message id of message that reads of user, and according to the corresponding message id of message, from the second database inquiry with it is described
The identical message id of message id, the message id are system message ID or personal messages ID, are obtaining corresponding system message ID
Or after personal messages ID, system again disappears the system message ID stored in the second database or the corresponding systems of personal messages ID
Perhaps personal messages content push is to User ID in breath.As a result, only when user has reading demand, system can just correspond to message
Content be sent to user.
A kind of information push method provided by the invention, for system message, when storing system message to database,
System message is just sent to pair by the not corresponding user of appointing system message one by one, and only when user asks to receive message
The user answered is effectively reduced the storage burden of database, improves write efficiency of the database to message, and then effectively improve
The efficiency of message push;Meanwhile by the way that the title of message and content are separately stored so that user receives in request to disappear
During breath, the title of message is first pushed to user, it is just that the message is corresponding when user asks to read particular message
Message content is pushed to user, avoids when message read requests are not present in user, blindly gives the content push of message
User effectively reduces the pressure of data transmission, avoids the generation of hash, and then saves memory space, is conducive to
The performance of whole system is promoted, and then is conducive to promote user experience.
Based on any of the above-described embodiment, a kind of information push method is provided, the step S3 is further included:According to user to institute
The read requests for stating system message obtain the corresponding reading state of the system message, and the reading state and the system are disappeared
It ceases corresponding system message ID and the corresponding User ID correspondence of the user is stored into user behavior record sheet.
Specifically, in view of when system message is stored to first database, there is no specify specifically for system message
User, so each system user will be unable to be recorded in first database one by one to the read operation of system message.In view of
This, records the reading state of system message by user's behavior record table in the present embodiment, when user receives system
During the message of push, the message received is displayed in the corresponding messaging list of user, and a certain message is read when user clicks on
When, system then clicks on the type that the corresponding message id of message read judges the message according to user, when user clicks on what is read
When message is system message, system will then record user to the reading state of the system message to have read, and by reading state with
The corresponding system message ID of system message and the corresponding User ID correspondence of user are stored into user behavior record sheet.If however,
User does not read the system message, then system can't remember the user for the reading state of the system message
Record.Therefore, for a certain system message, have only when user reads the system message, the user can be just by system for this
The reading state of system message is recorded in user behavior record sheet, and does not read for inactive users or the system message
Any active ues would not generate the unrelated extra data of the system message reading state.That is, for a certain system message, if with
The reading state of the system message is recorded there is no a certain user in the behavior record table of family, then proving the user, there is no read
The system message.
Further, on the basis of the above, the counter function based on Redis, for any user, whenever system pushes
When one system message is to user, system default user, not read, records user of unread to the reading state of the system message
The Counter Value of the system message taken adds 1, when receiving user to the read requests of any system message, records user of unread
The Counter Value of the system message taken subtracts 1.The record of the system message quantity taken thereby, it is possible to realize user of unread, is conducive to
The system message quantity that prompting user of unread takes.
A kind of information push method provided by the invention, should when user is read out a certain system message
User can be just recorded in user behavior record sheet for the reading state of the system message, realize user to system message
The record of reading state, is conducive to the quantity for the system message that user of unread is prompted to take, while can effectively avoid generating with being
The unrelated extra data of message of uniting reduces the storage burden of whole system to a certain extent, is conducive to the entirety of lifting system
Performance.
Based on any of the above-described embodiment, a kind of information push method is provided, is further included after the step S2:According to user
The corresponding deletion state of the system message is obtained to the removal request of the system message, by the deletion state and the system
The system corresponding system message ID of message and the corresponding User ID correspondence of the user are stored into user behavior record sheet.
Specifically, in view of when system message is stored to first database, there is no specify specifically for system message
User, so each system user will be unable to be recorded in first database one by one to the delete operation of system message.In view of
This, records the deletion state of system message by user's behavior record table in the present embodiment, when user receives system
During the message of push, the message received is displayed in the corresponding messaging list of user, and a certain message is deleted when user clicks on
When, system then clicks on the type that the corresponding message id of message deleted judges the message according to user, when user clicks on what is deleted
When message is system message, system will then record user to the deletion state of the system message to delete, and will delete state with
The corresponding system message ID of system message and the corresponding User ID correspondence of user are stored into user behavior record sheet.If however,
User does not delete the system message, then system can't remember the user for the deletion state of the system message
Record.Therefore, for a certain system message, have only when user deletes the system message, the user can be just by system for this
The deletion state recording for message of uniting is in user behavior record sheet.That is, for a certain system message, if in user behavior record sheet
There is no a certain user to the deletion state recording of the system message, then prove that the user does not delete the system message.
Further, on the basis of the above, when user asks to receive message again, system can then be remembered according to user behavior
Table and the corresponding User ID of the user are recorded, the user ID is inquired about in user behavior record sheet and corresponds to the system with deletion state
According to system message ID, the corresponding system messages of system message ID are carried out in the corresponding messaging list of user for message id
It deletes.As a result, when user asks to receive message again, will not to be shown in user corresponding for the system message that the user deletes
In messaging list.
A kind of information push method provided by the invention, should when user deletes a certain system message
User can be just recorded in user behavior record sheet for the deletion state of the system message, realize user to system message
The record of deletion state so that the system message that user deletes will not be shown in the corresponding messaging list of user, has
Beneficial to promotion user experience;Meanwhile, it is capable to effectively avoid generating the unrelated extra data of the system message, reduce to a certain extent
The storage burden of whole system is conducive to the overall performance of lifting system.
Based on any of the above-described embodiment, a kind of information push method is provided, is further included after the step S2:According to user
Read requests or removal request to the personal messages obtain the corresponding reading state of the personal messages or delete state, root
By the reading state or state is deleted according to the corresponding User ID of the user and the corresponding personal messages ID of the personal messages
Correspondence is stored into the first database.
Specifically, for any personal messages, since personal messages ID and designated user ID is to correspond to be stored in the
In one database, thus to the reading state of every personal messages or state can be deleted record by first database.
When user receives the message of system push, the message received is displayed in the corresponding messaging list of user, works as user
When clicking on reading or deleting a certain message, system then clicks on the corresponding message id of message for reading or deleting according to user and judges to be somebody's turn to do
The type of message, when user clicks on reading or the message deleted is personal messages, system then disappears to the system record user
The reading state of breath is has read or the state of deleting is deletion, and according to the corresponding User ID of user and the corresponding individual of personal messages
Reading state and deletion state correspondence are stored in the second database by message id.
Further, on the basis of the above, the counter function based on Redis, for any user, whenever system pushes
When one personal messages is to user, system default user, not read, records user of unread to the reading state of the personal messages
The Counter Value of the personal messages taken adds 1, when receiving user to the read requests of any personal messages, records user of unread
The Counter Value of the personal messages taken subtracts 1.The record of the personal messages quantity taken thereby, it is possible to realize user of unread, is conducive to
The personal messages quantity that prompting user of unread takes.
Further, on the basis of the above, when user asks to receive message again, system then can be according to first database
User ID corresponding with the user inquires about the user ID personal messages IDs of the correspondence with deletion state in first database,
According to personal messages ID, the corresponding personal messages of personal messages ID are deleted in the corresponding messaging list of user.By
This, when user asks to receive message again, the personal messages that the user deletes will not be shown in the corresponding message column of user
In table.
A certain personal messages are read out or deleted and if only if user by a kind of information push method provided by the invention
When, the user can be just recorded in first database for the reading of the personal messages or deletion state, realize user to a
The reading of people's message or the record for deleting state, are conducive to the quantity for the personal messages that user of unread is prompted to take, and enable to
The personal messages that user deletes will not be shown in the corresponding messaging list of user, be conducive to promote user experience;Meanwhile energy
It is enough effectively to avoid generating the extra data unrelated with system message, the storage burden of whole system is reduced to a certain extent, is had
Beneficial to the overall performance of lifting system.
Based on any of the above-described embodiment, a kind of information push method is provided, is further included after the step S2, described in detection
The push state of system message and/or personal messages, according to the corresponding system message ID of the system message and/or the individual
The corresponding personal messages ID of message stores the system message and/or the push state of personal messages correspondence to the second data
In storehouse.
Specifically, when system message and/or the corresponding personal messages of the user are pushed to use by system response user's request
During family, system disappears detecting system message simultaneously and/or the push state of personal messages, i.e., definite system message and/or individual
Whether breath is successfully pushed to corresponding User ID.Meanwhile system will obtain the corresponding system message ID of every system message and/or
The corresponding personal messages ID of every personal messages, then inquire about corresponding system message ID in the second database and/or individual disappears
ID is ceased, and corresponding system message and/or the push state of personal messages is corresponding with system message ID and/or personal messages ID
It stores into the second database.
A kind of information push method provided by the invention by detecting the push state of message, disappears according to message is corresponding
ID is ceased, push state and the message id correspondence of message are stored in the second database, effectively realizes and state is pushed to message
Record, it is advantageously ensured that the successful push of message.
Based on any of the above-described embodiment, a kind of information push method is provided, is further included after the step S2:Periodically traversal
The system message and/or the push state of personal messages stored in second database, when the system message and/or
The push state of personal messages for failure when, will the system message and/or personal messages add in described in treat PUSH message queue
In.
Specifically, based on the above technical solutions, whenever system pushes a system message and/or individual to user
During message, the push states of system message and/or personal messages then can corresponding record in the second data.Hereafter, system will
The system message and/or the push state of personal messages periodically stored in the second database of traversal, obtaining wherein push state is
The system message and/or personal messages of failure, and push state is added to and treated for the system message and/or personal messages of failure
In PUSH message queue, to re-start push to system message and/or personal messages of the push state as failure.Wherein, it is
System can set the frequency of the second database of traversal according to actual demand, be not specifically limited herein.
A kind of information push method provided by the invention, by the push for periodically traveling through the message recorded in the second database
Push state for failure is added to and treats in PUSH message queue by state, using to pushing state as failure weight
It is newly pushed, effectively ensures the successful push of message.
Based on any of the above-described embodiment, a kind of information push method is provided, is further included after the step S3:By the system
In system message content and/or personal messages content deposit caching.
Specifically, when user asks read system message and/or personal messages, system will be obtained from the second database
Corresponding message content, i.e. system are read the second database, read the message content stored in the second database.
If user asks to read the message in its messaging list repeatedly, system is needed to carry out repeatedly read operation to the second database,
In view of this, in order to avoid the database read operation repeated, in the present embodiment, in system for the first time by system message content
And/or personal messages content push to user when, system message content and/or personal messages content can be stored in slow by system
In depositing, and then, in the term of validity of caching, when user asks read system message and/or personal messages again, system will be direct
To user the database repeated thus can be avoided to read system message content and/or personal messages content push from caching
Operation.
A kind of information push method provided by the invention, in system for the first time by system message content and/or personal messages
After content push is to user, by system message content and/or personal messages content deposit caching, effectively prevent what is repeated
Database read operation improves page response speed, while reduces database pressure.
Fig. 2 is a kind of overall structure diagram of message push system of the embodiment of the present invention, as shown in Fig. 2, based on upper
Any embodiment is stated, a kind of message push system is provided, including:
Message storage module 1, for for treating any system message in PUSH message queue and any personal messages, inciting somebody to action
The corresponding system message ID of the system message and system message title correspondence are stored into first database, and the individual is disappeared
It ceases corresponding personal messages ID, designated user ID and personal messages title correspondence is stored into the first database, by described in
The corresponding system message ID of system message and system message content correspondence are stored in the second database, by the personal messages pair
Personal messages ID and personal messages the content correspondence answered are stored into second database;
Message header pushing module 2 for receiving user's request, obtains the corresponding User ID of the user, by described the
The corresponding system message title of system message stored in one database is pushed to the User ID, and inquires about and the User ID
The corresponding personal messages titles of the designated user ID are pushed to the User ID by identical designated user ID;
Message content pushing module 3, it is corresponding according to the message for receiving read requests of the user to message
Message id obtains the system message ID identical with the message id or personal messages ID from second database, by described in
System message ID or the corresponding system message contents of personal messages ID or personal messages content push give the User ID.
Specifically, the system of the present embodiment is performed for the method in above method embodiment, is performing above-mentioned disappear
When ceasing method for pushing, firstly, for any system message in message queue to be sent, using message storage module 1 only by system
The corresponding system message ID of message and system message title correspondence are stored into first database, do not specify specific user
ID is stored without each system user and system message are corresponded, and without the corresponding content of storage system message;Together
When, for treating any personal messages in PUSH message queue, using message storage module 1 only by the corresponding individual of personal messages
Message id, designated user ID and personal messages title correspondence are stored into the first database, i.e., need not store personal messages
Corresponding content.In addition, by the second database storage system message and the corresponding content of personal messages in the present embodiment, specifically
The corresponding system message ID of system message and system message content correspondence are stored in the second number by ground using message storage module 1
It is stored according in storehouse, and by the corresponding personal messages ID of personal messages and personal messages content correspondence into the second database.
Further, when user initiates to ask, for example when user pulls down its messaging list, pushed using message header
Module 2 receives the request of user, and obtains the corresponding User ID of user, and according to first database, will be deposited in first database
Storage is pushed to user with the relevant message of the user ID.Specifically, message header pushing module 2 is according to the corresponding user of user
The system message stored in first database is pushed to user, due to only storing system message pair in first database by ID
The title answered, so the corresponding title of system message is only pushed to user by message header pushing module 2 at this time.Meanwhile message
Title pushing module 2 inquires about the designated user identical with the user ID according to the corresponding User ID of user in first database
The corresponding personal messages of designated user ID are pushed to user by ID, are corresponded to due to only storing personal messages in first database
Title, so the corresponding title of personal messages is only pushed to user by message header pushing module 2 at this time.
Further, message header pushing module 2 is pushed to the system message of user and personal messages are shown in user
In corresponding messaging list, when user, which clicks on, reads the message in messaging list, wherein message includes system message or individual
Message, message content pushing module 3 obtain the corresponding message id of message of user's reading first, and according to the corresponding message of message
ID, inquires about the message id identical with the message id from the second database, which is system message ID or personal messages
ID, after corresponding system message ID or personal messages ID is obtained, message content pushing module 3 again will be in the second database
The corresponding system message content of system message ID or personal messages ID or personal messages content push of storage are to User ID.By
This, only when user has reading demand, the corresponding content of message can be just sent to user by message content pushing module 3.
A kind of message push system provided by the invention, for system message, when storing system message to database,
System message is just sent to pair by the not corresponding user of appointing system message one by one, and only when user asks to receive message
The user answered, is effectively reduced the storage burden of database, and then improves write efficiency of the database to message;It is meanwhile logical
It crosses and separately stores the title of message and content so that user first pushes the title of message when request receives message
To user, when user asks to read particular message, the corresponding message content of the message is just pushed to user, is avoided
When message read requests are not present in user, blindly the content push of message is effectively reduced into data transmission to user
Pressure, avoid the generation of hash, and then save memory space, be conducive to be promoted the performance of whole system, and then
Be conducive to promote user experience.
Based on any of the above-described embodiment, a kind of computer program product is provided, the computer program product includes storage
Computer program on non-transient computer readable storage medium storing program for executing, the computer program includes program instruction, when the journey
Sequence instruction is when being computer-executed, and computer is able to carry out the method that above-mentioned each method embodiment is provided, such as including:For
Any system message in PUSH message queue and any personal messages are treated, by the corresponding system message ID of system message and system
Message header correspondence is stored into first database, and the corresponding personal messages ID of personal messages, designated user ID and individual are disappeared
Breath title correspondence is stored into first database, and the corresponding system message ID of system message and system message content are corresponded to storage
In the second database, the corresponding personal messages ID of personal messages and personal messages content correspondence are stored to the second database
In;User's request is received, the corresponding User ID of user is obtained, the corresponding system of the system message stored in first database is disappeared
Breath title is pushed to User ID, and inquires about the designated user ID identical with User ID, by the corresponding personal messages of designated user ID
Title is pushed to User ID;Read requests of the user to message are received, according to the corresponding message id of message, from the second database
The system message ID identical with message id or personal messages ID is obtained, system message ID or the corresponding systems of personal messages ID are disappeared
Perhaps personal messages content push is to User ID in breath.
Based on any of the above-described embodiment, a kind of non-transient computer readable storage medium storing program for executing, the non-transient computer are provided
Readable storage medium storing program for executing stores computer instruction, and the computer instruction is put forward the above-mentioned each method embodiment of the computer execution
The method of confession, such as including:For treating any system message in PUSH message queue and any personal messages, by system message
Corresponding system message ID and system message title correspondence are stored into first database, by the corresponding personal messages of personal messages
ID, designated user ID and personal messages title correspondence are stored into first database, by the corresponding system message ID of system message
It is corresponding with system message content to be stored in the second database, by the corresponding personal messages ID of personal messages and personal messages content
Correspondence is stored into the second database;User's request is received, the corresponding User ID of user is obtained, by what is stored in first database
The corresponding system message title of system message is pushed to User ID, and inquires about the designated user ID identical with User ID, will specify
The corresponding personal messages title of User ID is pushed to User ID;Read requests of the user to message are received, it is corresponding according to message
Message id obtains the system message ID identical with message id or personal messages ID from the second database, by system message ID or
The corresponding system message contents of personal messages ID or personal messages content push are to User ID.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It is realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on
Technical solution is stated substantially in other words to embody the part that the prior art contributes in the form of software product, it should
Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including several fingers
Order, which is used, so that computer equipment (can be personal computer, server or the network equipment etc.) performs each implementation
Method described in some parts of example or embodiment.
Finally, the present processes are only preferable embodiment, are not intended to limit the scope of the present invention.It is all
Within the spirit and principles in the present invention, any modifications, equivalent replacements and improvements are made should be included in the protection of the present invention
Within the scope of.
Claims (10)
1. a kind of information push method, which is characterized in that including:
S1, it is for treating any system message in PUSH message queue and any personal messages, the system message is corresponding
System message ID and system message title correspondence are stored into first database, by the corresponding personal messages of the personal messages
ID, designated user ID and personal messages title correspondence are stored into the first database, by the corresponding system of the system message
System message id and system message content correspondence are stored in the second database, by the corresponding personal messages ID of the personal messages and
Personal messages content correspondence is stored into second database;
S2 receives user's request, obtains the corresponding User ID of the user, the system message that will be stored in the first database
Corresponding system message title is pushed to the User ID, and inquires about the designated user ID identical with the User ID, by described in
The corresponding personal messages titles of designated user ID are pushed to the User ID;
S3 receives read requests of the user to message, according to the corresponding message id of the message, from second database
It is middle to obtain the system message ID identical with the message id or personal messages ID, by ID pairs of the system message ID or personal messages
The system message content or personal messages content push answered give the User ID.
2. according to the method described in claim 1, it is characterized in that, the step S3 is further included:According to user to the system
The read requests of message obtain the corresponding reading state of the system message, and the reading state is corresponding with the system message
System message ID and the user corresponding User ID correspondence store into user behavior record sheet.
3. it according to the method described in claim 1, it is characterized in that, is further included after the step S2:According to user to described
The removal request of system message obtains the corresponding deletion state of the system message, by the deletion state and the system message
Corresponding system message ID and the corresponding User ID correspondence of the user are stored into user behavior record sheet.
4. it according to the method described in claim 1, it is characterized in that, is further included after the step S2:According to user to described
The read requests or removal request of personal messages obtain the corresponding reading state of the personal messages or delete state, according to described
The corresponding User ID of user and the corresponding personal messages ID of the personal messages deposit the reading state or the state correspondence of deletion
Storage is into the first database.
5. according to the method described in claim 1, it is characterized in that, the step S2 after further include, detect the system and disappear
The push state of breath and/or personal messages, according to the corresponding system message ID of the system message and/or the personal messages pair
The personal messages ID answered stores the system message and/or the push state of personal messages correspondence into the second database.
6. it according to the method described in claim 5, it is characterized in that, is further included after the step S2:Periodically travel through described
The system message and/or the push state of personal messages stored in two databases, when the system message and/or individual disappear
The push state of breath for failure when, will the system message and/or personal messages add in described in treat in PUSH message queue.
7. it according to the method described in claim 1, it is characterized in that, is further included after the step S3:By the system message
In content and/or personal messages content deposit caching.
8. a kind of message push system, which is characterized in that including:
Message storage module, for for treating any system message in PUSH message queue and any personal messages, will described in
The corresponding system message ID of system message and system message title correspondence are stored into first database, by the personal messages pair
Personal messages ID, designated user ID and personal messages the title correspondence answered are stored into the first database, by the system
The corresponding system message ID of message and system message content correspondence are stored in the second database, and the personal messages are corresponding
Personal messages ID and personal messages content correspondence are stored into second database;
Message header pushing module for receiving user's request, obtains the corresponding User ID of the user, by first data
The corresponding system message title of system message stored in storehouse is pushed to the User ID, and inquires about identical with the User ID
The corresponding personal messages titles of the designated user ID are pushed to the User ID by designated user ID;
Message content pushing module, for receiving read requests of the user to message, according to the corresponding message of the message
ID obtains the system message ID identical with the message id or personal messages ID, by the system from second database
Message id or the corresponding system message contents of personal messages ID or personal messages content push give the User ID.
9. a kind of computer program product, which is characterized in that the computer program product includes being stored in non-transient computer
Computer program on readable storage medium storing program for executing, the computer program include program instruction, when described program is instructed by computer
During execution, the computer is made to perform the method as described in claim 1 to 7 is any.
10. a kind of non-transient computer readable storage medium storing program for executing, which is characterized in that the non-transient computer readable storage medium storing program for executing is deposited
Computer instruction is stored up, the computer instruction makes the computer perform the method as described in claim 1 to 7 is any.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711224650.4A CN108111574A (en) | 2017-11-29 | 2017-11-29 | A kind of information push method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711224650.4A CN108111574A (en) | 2017-11-29 | 2017-11-29 | A kind of information push method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108111574A true CN108111574A (en) | 2018-06-01 |
Family
ID=62207910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711224650.4A Withdrawn CN108111574A (en) | 2017-11-29 | 2017-11-29 | A kind of information push method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108111574A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110442581A (en) * | 2019-08-05 | 2019-11-12 | 北京智慧远景科技产业有限公司 | A kind of method and system that data are stored, read |
CN110971643A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Message pushing method and device, storage medium and processor |
CN115225600A (en) * | 2022-07-26 | 2022-10-21 | 中国银行股份有限公司 | Message display method and related device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103944799A (en) * | 2013-01-18 | 2014-07-23 | 阿里巴巴集团控股有限公司 | Message processing method and system |
CN105869057A (en) * | 2016-04-07 | 2016-08-17 | 腾讯科技(深圳)有限公司 | Comment storage device, comment reading method and apparatus, and comment writing method and apparatus |
CN106412078A (en) * | 2016-10-18 | 2017-02-15 | 北京京东尚科信息技术有限公司 | Precise information pushing method and system, and devices |
-
2017
- 2017-11-29 CN CN201711224650.4A patent/CN108111574A/en not_active Withdrawn
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103944799A (en) * | 2013-01-18 | 2014-07-23 | 阿里巴巴集团控股有限公司 | Message processing method and system |
CN105869057A (en) * | 2016-04-07 | 2016-08-17 | 腾讯科技(深圳)有限公司 | Comment storage device, comment reading method and apparatus, and comment writing method and apparatus |
CN106412078A (en) * | 2016-10-18 | 2017-02-15 | 北京京东尚科信息技术有限公司 | Precise information pushing method and system, and devices |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971643A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Message pushing method and device, storage medium and processor |
CN110971643B (en) * | 2018-09-30 | 2022-07-29 | 北京国双科技有限公司 | Message pushing method and device, storage medium and processor |
CN110442581A (en) * | 2019-08-05 | 2019-11-12 | 北京智慧远景科技产业有限公司 | A kind of method and system that data are stored, read |
CN115225600A (en) * | 2022-07-26 | 2022-10-21 | 中国银行股份有限公司 | Message display method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103119550B (en) | Store the digital content with time-varying characteristics | |
CN103853727B (en) | Improve the method and system of big data quantity query performance | |
CN101163265B (en) | Distributed database based on multimedia message log inquiring method and system | |
KR101224752B1 (en) | Efficient processing of time-bounded messages | |
CN108111574A (en) | A kind of information push method and system | |
US8706822B2 (en) | Delivering messages from message sources to subscribing recipients | |
CN104978335B (en) | Data access control method and device | |
CN105827706B (en) | Message pushing device and method | |
US7958094B2 (en) | Management of deletion requests for related documents in a content management system | |
CN102737065B (en) | Method and device for acquiring data | |
CN108509437B (en) | ElasticSearch query acceleration method | |
EP2871817A1 (en) | Combined cloud storage disk client, server and system, and combined cloud storage disk service serving method | |
CN101207580B (en) | System and method for adding and deleting linkman synchronously by instant communication platform and business platform | |
CN111083217B (en) | Method and device for pushing Feed stream and electronic equipment | |
CN104967552A (en) | Message push method and apparatus | |
CN110046133A (en) | A kind of metadata management method, the apparatus and system of storage file system | |
CN107872473A (en) | Message treatment method, device and system | |
CN102902762B (en) | A kind of methods, devices and systems of deleting duplicated data | |
CN111414424B (en) | Method, system, medium and equipment for automatically synchronizing redis of configuration data | |
CN107958079A (en) | Aggregate file delet method, system, device and readable storage medium storing program for executing | |
CN107368608A (en) | The HDFS small documents buffer memory management methods of algorithm are replaced based on ARC | |
CN107315745B (en) | Private letter storage method and system | |
CN106095789A (en) | A kind of message subscribing managing device and method | |
CN107402870A (en) | The processing method and processing device of daily record section in a kind of meta data server | |
CN114374965A (en) | User subscription data processing method, system, device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20180601 |