CN112632375B - Session information processing method, server and storage medium - Google Patents

Session information processing method, server and storage medium Download PDF

Info

Publication number
CN112632375B
CN112632375B CN202011504222.9A CN202011504222A CN112632375B CN 112632375 B CN112632375 B CN 112632375B CN 202011504222 A CN202011504222 A CN 202011504222A CN 112632375 B CN112632375 B CN 112632375B
Authority
CN
China
Prior art keywords
push message
web page
session
storage object
message
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
CN202011504222.9A
Other languages
Chinese (zh)
Other versions
CN112632375A (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.)
Shenzhen Hexun Huagu Information Technology Co ltd
Original Assignee
Shenzhen Hexun Huagu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hexun Huagu Information Technology Co ltd filed Critical Shenzhen Hexun Huagu Information Technology Co ltd
Priority to CN202011504222.9A priority Critical patent/CN112632375B/en
Publication of CN112632375A publication Critical patent/CN112632375A/en
Application granted granted Critical
Publication of CN112632375B publication Critical patent/CN112632375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a session information processing method, a server and a storage medium, which are used for providing an effective storage scheme so as to reduce the repeated issuing of push messages. The method comprises the following steps: creating a target storage space socket; when a user opens a web page and sends a push message to the user through the web page; taking a session identifier of the session storage object as a key value, and storing the related information of the push message and the container map in the session storage object; taking a user identification (id) of a user as a key value of a target storage space socket, storing a session storage object in the target storage space socket, and sending a push message to a web page; judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message; and if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in a container map by taking the message identification of the push message as a key value.

Description

Session information processing method, server and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a session information processing method, a server, and a storage medium.
Background
The core idea of the web push service for users is multi-session storage, the users need to store one session each time a web page is opened, and the inventor realizes that the situation that push messages are sent down for a plurality of times is easy to cause due to the fact that the storage scheme of the page session is not ideal.
Disclosure of Invention
The embodiment of the invention provides a session information processing method, a server and a storage medium, which are used for solving the technical problem of the condition of sending push messages for multiple times.
In a first aspect, a session information processing method is provided, including:
creating a target storage space socket;
when a user opens a web page and sends a push message to the user through the web page, judging whether a corresponding session storage object exists in the web page;
if the session storage object exists in the web page, recording related information of the push message, wherein the related information of the push message comprises a message identifier and expiration time;
taking the session identifier of the session storage object as a key value, and storing the related information of the push message in the session storage object;
taking the user identification id of the user as a key value of the target storage space socket, storing the session storage object and the container map in the target storage space socket, and sending the push message to the web page;
judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message;
and if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in the container map by taking the message identification of the push message as a key value.
Further, after the determining whether the web page has the corresponding session storage object, the method further includes:
if the session storage object does not exist in the web page, creating one session storage object for the web page, and copying the push message which is not sent to the web page and/or is not expired into the session storage object.
Further, after the sending the push message to the web page, the method further includes:
recording the corresponding relation between the message identification of the push message and the user identification id of the user into a couchbase database;
if the push message is successfully sent, deleting the corresponding relation from the couchbase database;
when the user opens the web page again, inquiring from the couchbase database according to the user identification id of the user to obtain a first inquiring result;
and determining whether to send the push message to the web page again according to the first query result.
Further, the method further comprises:
and according to a timing task of a preset timer, periodically inquiring the corresponding relation stored in the couchbase database to obtain a second inquiry result, and updating the related information of the push message in the session storage object according to the second inquiry result.
In a second aspect, there is provided a server comprising:
the creation module is used for creating a target storage space socket;
the first judging module is used for judging whether a corresponding session storage object exists on the web page or not when the user opens the web page and sends a push message to the user through the web page;
the recording module is used for recording the related information of the push message if the session storage object exists in the web page, wherein the related information of the push message comprises a message identifier and an expiration time;
the storage module is used for storing the related information of the push message in the session storage object by taking the session identifier of the session storage object as a key value;
the storage module is further configured to store the session storage object and the container map in the target storage space socket by using a user identification id of the user as a key value of the target storage space socket;
the sending module is used for sending the push message to the web page;
the second judging module is used for judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt comprises the delivery information of the push message;
the deleting module is used for deleting the message identifier in the session storage object if a push message receipt fed back by the web page is received;
and the storage module is used for storing the delivery information of the push message in the container map by taking the message identifier of the push message as a key value.
Further, the creation module is further configured to create, if the session storage object does not exist in the web page, one session storage object for the web page; the storage module is used for copying the push message which is not sent to the web page and/or is not expired to the session storage object.
Further, the server also comprises a deleting module, a query module and a determining module;
the recording module is used for recording the corresponding relation between the message identifier of the push message and the user identifier id of the user into the couchbase database;
the deleting module is used for deleting the corresponding relation from the couchbase database if the push message is successfully sent;
the query module is used for querying from the couchbase database according to the user identification id of the user when the user opens the web page again, so as to obtain a first query result;
and the determining module is used for determining whether to send the push message to the web page again according to the first query result.
Further, the server also comprises an updating module;
the query module is also used for periodically querying the corresponding relation stored in the couchbase database according to the timing task of the preset timer to obtain a second query result;
and the updating module is used for updating the related information of the push message in the session storage object according to the second query result.
A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the session information processing method described above when the computer program is executed by the processor.
A computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the session information processing method described above.
In the session information processing method, the server and the storage medium, in the implementation scheme, a target storage space socket is created; when a user opens a web page and sends a push message to the user through the web page, judging whether the web page has a corresponding session storage object or not; if the web page has a session storage object, recording related information of a push message, wherein the related information of the push message comprises a message identifier and expiration time; taking a session identifier of the session storage object as a key value, and storing the related information of the push message in the session storage object; taking a user identification (id) of a user as a key value of a target storage space socket, storing a session storage object and a container map in the target storage space socket, and sending a push message to a web page; judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message; and if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in a container map by taking the message identification of the push message as a key value. In the above scheme, the related session information of the web page is effectively stored in a mode of creating the target storage space socket in a key value pair mode, wherein after the push message is successfully sent, the message identifier of the corresponding push message is deleted in the session storage object, if the session storage object also has the corresponding message identifier, the push message corresponding to the message identifier is indicated to be not sent successfully, the subsequent push message can be sent again, and in the scheme, the message identifier of the push message can be deleted after the push message is sent successfully, so that the occurrence of multiple times of sending of the push message can be effectively reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of a session information processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a session information processing method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a server according to an embodiment of the invention;
fig. 4 is a schematic diagram of a server according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The session information processing method provided by the embodiment of the invention can be applied to an application environment as shown in fig. 1, wherein the terminal equipment can communicate with a server through a network. The invention provides a session information processing method, which is applied to a server, wherein the server can create a target storage space socket, when a user opens a web page and sends a push message to the user through the web page, whether the web page has a corresponding session storage object is judged, if the web page has the session storage object, relevant information of the push message is recorded, the relevant information of the push message comprises a message identifier and expiration time, the session identifier of the session storage object is used as a key value, the relevant information of the push message and a container map are stored in the session storage object, the user identifier id of the user is used as the key value of the target storage space socket, the session storage object is stored in the target storage space socket, and the web page is sent with the corresponding session storage object, if the web page has the session storage object, the relevant information of the push message is recorded, the relevant information of the push message comprises a message identifier and expiration time, the relevant information of the push message and the container map is stored in the session storage object, and if the page feedback information of the push message is received in the page, and the feedback information of the page is stored in the target storage object.
The terminal device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. The session information processing method provided by the present invention is described below by way of specific embodiments.
In one embodiment, as shown in fig. 2, a session information processing method is provided, and the method is applied to the server in fig. 1, and the method includes the following steps:
s10: and creating a target storage space socket.
In the embodiment of the present invention, a storage space socket is created in advance, and in the embodiment of the present invention, the storage space socket is called a target storage space socket. It should be noted that, the socket is a namespace on OSS, and is also a management entity with advanced functions such as charging, authority control, log record, etc.; the Bucket name has global uniqueness in the whole OSS service and cannot be modified; each Object stored on the OSS must be contained in a certain socket. The sum of the number and the size of objects stored in each socket is not limited, and a user does not need to consider the expandability of data. For the present solution, the Object is related session information to be stored later.
The object storage service (Object Storage Service, OSS) is a mass, safe, low-cost and highly reliable cloud storage service, is suitable for storing any type of files, flexibly expands the capacity and processing capacity, selects various storage types and comprehensively optimizes the storage cost.
In the embodiment of the invention, in order to effectively store the session information for the web page later, a target storage space socket is created in the object storage service in advance.
S20: when a user opens a web page and sends a push message to the user through the web page, judging whether a corresponding session storage object exists on the web page.
The user can open any web page by using the browser application on the terminal device through the terminal device, and the web page in the embodiment of the invention can refer to any web page opened by the user. It will be appreciated that when a user opens a web page, the message pushing system may send a push message to the web page to achieve the purpose of pushing a desired message through the web page. In the embodiment of the invention, when a user opens a web page and sends a push message to the user through the web page, whether the web page has a corresponding session storage object or not is judged.
S30: if the session storage object exists in the web page, recording relevant information of the push message, wherein the relevant information of the push message comprises a message identifier and an expiration time.
When judging that the web page has a session storage object, recording related information of a push message which is currently required to be sent to the web page, wherein the related information comprises a message identifier and an expiration time, the expiration time refers to the expiration time of the push message, and the push message can be pushed only when the expiration time is not reached.
S40: and storing the related information of the push message in the session storage object by taking the session identifier of the session storage object as a key value.
After the relevant information of the push message is recorded, the relevant information of the push message is stored in the session storage object by taking the session identifier of the session storage object as a key value, that is, the relevant information of the push message is stored in the session storage object in the form of a key value pair. In the session storage object, the key is a session identifier (session id), and the value is related information such as a message identifier and an expiration time. It should be noted that, the push message may also include other information related to the push message, which may be configured according to an actual application scenario, which is not described herein, and is not limited herein.
S50: and taking the user identification id of the user as a key value of the target storage space socket, storing the session storage object and the container map in the target storage space socket, and sending the push message to the web page.
In the embodiment of the present invention, after the session identifier of the session storage object is used as a key value and the related information of the push message is stored in the session storage object, the session storage object and the container map are stored in the target storage space socket by using the user identifier id of the user as the key value of the target storage space socket, and the push message is sent to the web page.
Where the container map is an associative container of STL [1], it provides one-to-one (where the first may be referred to as a key, each key may appear only once in the map, and the second may be referred to as the value of the key), because of this feature, a fast path is provided on the programming when processing one-to-one data. Based on this feature, the embodiment of the present invention further saves the container map as a value in the created target storage space socket.
That is, in the target storage space socket, the key is a user identification id (uid) of the user, the value includes the session storage object and the container map, and the storage structure is jointly optimized through the session storage object and the container map.
And the push message is sent to the web page.
S60: and judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message.
After the push message is sent to the web page, there are two cases, the first is that the terminal device successfully receives the push message through the web page, and the second is that the terminal device does not receive the push message on the web page. Aiming at the first condition, the terminal equipment returns a push message receipt through a web page, wherein the push message receipt contains delivery information of the push condition of the push message. Illustratively, the delivery information includes a delivery number, an expiration time, a last time sent, and the like of the push message.
S70: and if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in the container map by taking the message identification of the push message as a key value.
When receiving a receipt of a push message fed back by the web page, indicating that the web page has successfully received the push message, the embodiment of the invention deletes the message identifier in the session storage object, and stores the delivery information of the push message in the container map by taking the message identifier of the push message as a key value.
It can be seen that the embodiment of the invention provides a session information processing method, by creating the target storage space bucket, session to store the object and the map container, the related session information of the web page is effectively stored in combination with the key value pair, and the storage structure is optimized, wherein after the push message is successfully sent, the message identifier of the corresponding push message is deleted in the session storage object, if the corresponding message identifier is stored in the session storage object, it is indicated that the push message corresponding to the message identifier is not sent successfully, the subsequent transmission can be performed again, and by adopting the scheme, the occurrence of the condition that the push message is sent repeatedly can be effectively reduced because the message identifier of the push message is deleted after the transmission is successful.
In an embodiment, after the determining whether the web page has the corresponding session storage object, if the web page does not have the session storage object, one session storage object is newly created for the web page, and the push message that is not sent to the web page and/or is not expired is copied to the session storage object. It can be seen that, in this embodiment, for a certain user, a push message that is not expired or is not successfully delivered is also saved to the created session storage object, so that storage management is effectively performed on the push message.
In an embodiment, after the sending the push message to the web page, the method further comprises the steps of:
s80: and recording the corresponding relation between the message identification of the push message and the user identification id of the user into a couchbase database.
In the embodiment of the invention, the push message is sent to the web page, and the corresponding relation between the message identification of the push message and the user identification id of the user is recorded in the couchbase database, so that the relation between the user and the push message is recorded through the recorded corresponding relation between the user identification id and the message identification, and the method and the device know which push messages are sent to the user and are helpful for making reference for the subsequent sending of the push message.
S90: and if the push message is successfully sent, deleting the corresponding relation from the couchbase database.
And deleting the corresponding relation from the couchbase database if the push message is successfully sent, and reserving the corresponding relation in the couchbase database if the push message is not successfully sent. Therefore, the push message push system can know which push messages are pushed to which users in real time, and is beneficial to the directed push management of the push messages.
S100: when the user opens the web page again, inquiring from the couchbase database according to the user identification id of the user to obtain a first inquiring result;
s110: and determining whether to send the push message to the web page again according to the first query result.
When the user opens the web page again, inquiring from the couchbase database according to the user identification id of the user to obtain a first inquiry result, and knowing whether the user identification id has a corresponding message identification according to the first inquiry result, thereby determining whether to send the push message to the web page again according to the first inquiry result. If the user identification id in the couchbase database has a corresponding message identification, the fact that the transmission is not successful last time is indicated, the push message is sent to the web page again, if the user identification id in the couchbase database has no corresponding message identification, the fact that the transmission is successful last time is indicated, and when the user opens the web page again, the fact that the push message is sent to the web page again is refused, and the fact that the push message is sent for multiple times is avoided.
In an implementation, the embodiment of the invention also queries the corresponding relation stored in the couchbase database at regular time according to the timing task of the preset timer to obtain a second query result; and updating the related information of the push message in the session storage object according to the second query result. And deleting the corresponding uid-msgid in the couchbase database if the push message is successfully issued, and periodically inquiring the corresponding relation between the user identification ids of the users, so that the related information of the push message in the session storage object is correspondingly changed, and the situation that the push message is issued for multiple times is avoided.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, a session server is provided, where the session server corresponds to the server in the session information processing method in the above embodiment one by one. As shown in fig. 3, the server includes a creation module 101, a first judgment module 102, a recording module 103, a storage module 104, a transmission module 105, a second judgment module 106, and a deletion module 107. The functional modules are described in detail as follows:
a creating module 101, configured to create a target storage space socket;
a first judging module 102, configured to judge whether a corresponding session storage object exists on a web page when a user opens the web page and sends a push message to the user through the web page;
a recording module 103, configured to record relevant information of the push message if the session storage object exists in the web page, where the relevant information of the push message includes a message identifier and an expiration time;
the storage module 104 is configured to store relevant information of the push message in the session storage object with a session identifier of the session storage object as a key value;
the storage module 104 is further configured to store the session storage object and the container map in the target storage space socket with a user identification id of the user as a key value of the target storage space socket;
a sending module 105, configured to send the push message to the web page;
a second judging module 106, configured to judge whether a push message receipt fed back by the web page is received, where the push message receipt includes delivery information of the push message;
a deleting module 107, configured to delete the message identifier in the session storage object if a push message receipt fed back by the web page is received;
the storage module 104 is configured to store delivery information of the push message in the container map with a message identifier of the push message as a key value.
In an embodiment, the creating module is further configured to create, if the session storage object does not exist in the web page, one session storage object for the web page; the storage module is used for copying the push message which is not sent to the web page and/or is not expired to the session storage object.
In one embodiment, the server further comprises a recording module, a deleting module, a querying module and a determining module;
the recording module is used for recording the corresponding relation between the message identifier of the push message and the user identifier id of the user into a couchbase database;
the deleting module is configured to delete the corresponding relationship from the couchbase database if the push message is sent successfully;
the query module is used for querying from the couchbase database according to the user identification id of the user when the user opens the web page again, so as to obtain a first query result;
and the determining module is used for determining whether to send the push message to the web page again according to the first query result.
In one embodiment, the server further comprises an update module;
the query module is further used for querying the corresponding relation stored in the couchbase database at regular time according to a timing task of a preset timer to obtain a second query result;
and the updating module is used for updating the related information of the push message in the session storage object according to the second query result.
It can be seen that the embodiment of the present invention provides a server, by creating the target storage space bucket, session to store the object and the map container, the relevant session information of the web page is effectively stored in combination with the key value pair, so as to optimize the storage structure, where after the push message is successfully sent, the message identifier of the corresponding push message is deleted in the session storage object, if the session storage object also has the corresponding message identifier, it is indicated that the push message corresponding to the message identifier is not sent successfully, then the message identifier can be sent again later, and by adopting the scheme, since the message identifier of the push message is deleted after the push message is sent successfully, the occurrence of multiple times of sending of the push message can be effectively reduced.
For specific limitation of the server, reference may be made to the limitation of the session information processing method hereinabove, and the description thereof will not be repeated here. Each of the modules in the above server may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a processor in a server, or may be stored in software in a memory in the server, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a server is provided, which may be a server, and the internal structure thereof may be as shown in fig. 4. The server includes a processor, memory, network interface, and database connected by a system bus. Wherein the processor of the server is configured to provide computing and control capabilities. The memory of the server includes nonvolatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the server is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a session information processing method.
In one embodiment, a server is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
creating a target storage space socket;
when a user opens a web page and sends a push message to the user through the web page, judging whether a corresponding session storage object exists in the web page;
if the session storage object exists in the web page, recording related information of the push message, wherein the related information of the push message comprises a message identifier and expiration time;
taking the session identifier of the session storage object as a key value, and storing the related information of the push message in the session storage object;
taking the user identification id of the user as a key value of the target storage space socket, storing the session storage object and the container map in the target storage space socket, and sending the push message to the web page;
judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message;
and if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in the container map by taking the message identification of the push message as a key value.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
creating a target storage space socket;
when a user opens a web page and sends a push message to the user through the web page, judging whether a corresponding session storage object exists in the web page;
if the session storage object exists in the web page, recording related information of the push message, wherein the related information of the push message comprises a message identifier and expiration time;
taking the session identifier of the session storage object as a key value, and storing the related information of the push message in the session storage object;
taking the user identification id of the user as a key value of the target storage space socket, storing the session storage object and the container map in the target storage space socket, and sending the push message to the web page;
judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message;
and if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in the container map by taking the message identification of the push message as a key value.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of each functional unit and module is illustrated, and in practical application, the above-mentioned functional allocation may be performed by different functional units and modules according to needs, i.e. the internal structure of the server is divided into different functional units or modules, so as to perform all or part of the above-mentioned functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. A session information processing method, characterized by comprising:
creating a target storage space socket in an object storage service OSS;
when a user opens a web page and sends a push message to the user through the web page, judging whether a corresponding session storage object exists in the web page;
if the session storage object exists in the web page, recording related information of the push message, wherein the related information of the push message comprises a message identifier and expiration time;
taking the session identifier of the session storage object as a key value, and storing the related information of the push message in the session storage object;
taking the user identification id of the user as a key value of the target storage space socket, storing the session storage object and the container map in the target storage space socket, and sending the push message to the web page;
judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt contains the delivery information of the push message;
if a push message receipt fed back by the web page is received, deleting the message identification in the session storage object, and storing the delivery information of the push message in the container map by taking the message identification of the push message as a key value;
recording the corresponding relation between the message identification of the push message and the user identification id of the user into a couchbase database;
the corresponding relation between the user identification id and the message identification of the user is queried by the preset timing task at regular time, and relevant information of the push message in the session storage object is correspondingly changed.
2. The session information processing method of claim 1, wherein after the determining whether the web page has the corresponding session storage object, the method further comprises:
if the session storage object does not exist in the web page, creating one session storage object for the web page, and copying the push message which is not sent to the web page and/or is not expired into the session storage object.
3. The session information processing method according to claim 1, wherein after the push message is sent to the web page, the method further comprises:
if the push message is successfully sent, deleting the corresponding relation from the couchbase database;
when the user opens the web page again, inquiring from the couchbase database according to the user identification id of the user to obtain a first inquiring result;
and determining whether to send the push message to the web page again according to the first query result.
4. The session information processing method according to claim 3, wherein the method further comprises:
according to a timing task of a preset timer, the corresponding relation stored in the couchbase database is queried at fixed time to obtain a second query result;
and updating the related information of the push message in the session storage object according to the second query result.
5. A server, comprising:
the creation module is used for creating a target storage space socket in the object storage service OSS;
the first judging module is used for judging whether a corresponding session storage object exists on the web page or not when the user opens the web page and sends a push message to the user through the web page;
the recording module is used for recording the related information of the push message if the session storage object exists in the web page, wherein the related information of the push message comprises a message identifier and an expiration time;
the storage module is used for storing the related information of the push message in the session storage object by taking the session identifier of the session storage object as a key value;
the storage module is further configured to store the session storage object and the container map in the target storage space socket by using a user identification id of the user as a key value of the target storage space socket;
the sending module is used for sending the push message to the web page;
the second judging module is used for judging whether a push message receipt fed back by the web page is received or not, wherein the push message receipt comprises the delivery information of the push message;
the deleting module is used for deleting the message identifier in the session storage object if a push message receipt fed back by the web page is received;
the storage module is used for storing the delivery information of the push message in the container map by taking the message identifier of the push message as a key value;
the recording module is used for recording the corresponding relation between the message identification of the push message and the user identification id of the user into a couchbase database, and the corresponding relation between the user identification id of the user and the message identification is queried at regular time by a preset timing task, so that the relevant information of the push message in the session storage object is correspondingly changed.
6. The server according to claim 5, wherein,
the creation module is further configured to create a session storage object for the web page if the session storage object does not exist in the web page;
the storage module is used for copying the push message which is not sent to the web page and/or is not expired to the session storage object.
7. The server of claim 5, further comprising a deletion module, a query module, and a determination module;
the deleting module is configured to delete the corresponding relationship from the couchbase database if the push message is sent successfully;
the query module is used for querying from the couchbase database according to the user identification id of the user when the user opens the web page again, so as to obtain a first query result;
and the determining module is used for determining whether to send the push message to the web page again according to the first query result.
8. The server of claim 7, further comprising an update module;
the query module is further used for querying the corresponding relation stored in the couchbase database at regular time according to a timing task of a preset timer to obtain a second query result;
and the updating module is used for updating the related information of the push message in the session storage object according to the second query result.
9. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the session information processing method according to any one of claims 1 to 4 when the computer program is executed.
10. A computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the session information processing method according to any one of claims 1 to 4.
CN202011504222.9A 2020-12-18 2020-12-18 Session information processing method, server and storage medium Active CN112632375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011504222.9A CN112632375B (en) 2020-12-18 2020-12-18 Session information processing method, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011504222.9A CN112632375B (en) 2020-12-18 2020-12-18 Session information processing method, server and storage medium

Publications (2)

Publication Number Publication Date
CN112632375A CN112632375A (en) 2021-04-09
CN112632375B true CN112632375B (en) 2023-07-25

Family

ID=75316992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011504222.9A Active CN112632375B (en) 2020-12-18 2020-12-18 Session information processing method, server and storage medium

Country Status (1)

Country Link
CN (1) CN112632375B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022265B (en) * 2021-07-23 2024-04-16 北京字跳网络技术有限公司 Information processing method, device, terminal and storage medium
CN113596147B (en) * 2021-07-27 2023-10-24 奇安信科技集团股份有限公司 Message pushing method, device, equipment and storage medium
CN114221925B (en) * 2021-09-30 2024-05-03 北京奇艺世纪科技有限公司 Message pushing method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111031058A (en) * 2019-12-23 2020-04-17 集奥聚合(北京)人工智能科技有限公司 Websocket-based distributed server cluster interaction method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262497B (en) * 2008-04-21 2012-04-25 深圳市迅雷网络技术有限公司 A content push method, system and device
CN104281574A (en) * 2013-07-01 2015-01-14 腾讯科技(深圳)有限公司 Information recommending method, device and system
CN107786607B (en) * 2016-08-30 2020-12-25 腾讯科技(深圳)有限公司 Message retransmission method, message retransmission server and user equipment
CN106657299B (en) * 2016-12-08 2020-06-16 武汉斗鱼网络科技有限公司 Attention anchor online reminding method and system
CN108881354B (en) * 2017-05-09 2021-11-09 腾讯科技(深圳)有限公司 Push information storage method and device, server and computer storage medium
CN108055199A (en) * 2018-01-17 2018-05-18 吉浦斯信息咨询(深圳)有限公司 Support the mobile method for pushing and system that deferred information preserves
CN108460115B (en) * 2018-02-10 2020-06-23 深圳壹账通智能科技有限公司 Message pushing method and device, computer equipment and storage medium
CN108631955A (en) * 2018-05-15 2018-10-09 网易(杭州)网络有限公司 It is a kind of to ensure that message sends reachable mthods, systems and devices
CN110113393B (en) * 2019-04-18 2022-04-22 北京奇艺世纪科技有限公司 Message pushing method and device, electronic equipment and medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111031058A (en) * 2019-12-23 2020-04-17 集奥聚合(北京)人工智能科技有限公司 Websocket-based distributed server cluster interaction method and device

Also Published As

Publication number Publication date
CN112632375A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112632375B (en) Session information processing method, server and storage medium
CN109064345B (en) Message processing method, system and computer readable storage medium
CN101217571B (en) Write/read document operation method applied in multi-copy data grid system
US11385830B2 (en) Data storage method, apparatus and system, and server, control node and medium
CN110602165B (en) Government affair data synchronization method, device, system, computer equipment and storage medium
CN109460252B (en) Configuration file processing method and device based on git and computer equipment
CN110795171B (en) Service data processing method, device, computer equipment and storage medium
CN111475483A (en) Database migration method and device and computing equipment
CN108512930B (en) Shared file management method, device, server and storage medium
CN108966159B (en) Short message withdrawing method, system, computer equipment and storage medium
CN109358874B (en) Business rule updating method, business rule updating device, computer equipment and storage medium
CN111198856A (en) File management method and device, computer equipment and storage medium
CN108512948B (en) Address book updating method and device, computer equipment and storage medium
CN103197987A (en) Data backup method, data recovery method and cloud storage system
WO2022247316A1 (en) Storage object processing system, request processing method, gateway, and storage medium
CN109697112B (en) Distributed intensive one-stop operating system and implementation method
CN110543465B (en) Directory operation method and device, computer equipment and storage medium
CN107181773A (en) Data storage and data managing method, the equipment of distributed memory system
CN112865927B (en) Message delivery verification method, device, computer equipment and storage medium
CN115277678B (en) File downloading method, device, computer equipment and storage medium
CN111339054A (en) Storage system hierarchical management method, device, equipment and storage medium
CN109254997B (en) Data synchronization method, system, computer device and readable storage medium
CN117407361B (en) Data management method, device, system, server and storage medium
CN111191082A (en) Data management method and device, computer equipment and storage medium
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant