Method and device for pushing offline message in real time, equipment and storage medium
By utilizing the persistence and Rest request mechanisms of the first server and the second server when the browser is closed or the long connection is unavailable, message reminders can be received when the web page is not online, which solves the problem of being unable to receive real-time messages in the existing technology. Reminder issues improve the flexibility and scalability of message reminders.
Patent Information
- Application Number
- CN202410465932.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2024-09-20
AI Technical Summary
The existing message push technology cannot realize real-time message reminders when the browser is closed or cannot establish a long connection, cannot receive message reminders from the server when the web page is not online, and lacks an active reminder function.
By opening the first server to receive information data and persisting it, opening the second server to load local persistence files, identifying connection information and establishing a connection through Rest requests, message reminders can still be received when the browser is closed, using active or passive methods. The reminder method provides message reminders based on the status set by the client.
It realizes that message reminders can still be received when the browser is closed or the long connection is unavailable, which improves the flexibility and scalability of message reminders. Users can receive message reminders of persistent data even if they are not logged in.
Smart Images

Figure CN118677947A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer science and technology, and in particular to a method, device and storage medium for real-time push of offline messages. Background Art
[0002] With the continuous development of technologies such as artificial intelligence and big data, message push technology is also constantly innovating and changing. The current mainstream message push technologies include polling, operator SMS push, and long connection. Among them, the polling method is to access the server to obtain message data in a scheduled task mode; the operator SMS is to connect to a third-party operator to send SMS reminders; the long connection is to maintain a connection with the client through the socket server, and automatically push messages when triggered by messages. For the B / S mode architecture system of the intranet, the main method is long connection. However, the existing message push technology can only passively accept push reminders from the server and cannot actively remind. Only when the browser webpage is open and the current user is logged in can the reminder be received. If the browser webpage is closed, the real-time message reminder cannot be received.
[0003] Therefore, how to solve the problem of receiving message reminders from different servers in a timely manner when the web page is not online, and how to close the browser in B / S mode and fail to receive message reminders and actively close the long connection channel and fail to establish a message connection has long been a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] To this end, the present application provides one or more technical solutions to solve the above-mentioned defects of the prior art, realize online reception of message consumption after the browser is closed, and actively initiate a message consumption request to the business service when the browser and the server cannot establish a long connection. The present invention provides a method, device and storage medium for real-time push of offline messages to solve at least one of the above-mentioned technical problems.
[0005] To achieve the above object, in a first aspect, the present invention provides a method for real-time push of offline messages, comprising:
[0006] The first server is started to receive information data sent from the first client; after the first server receives the information sent from the first client, the received information data is persisted and persistently refreshed;
[0007] Open the second server and load a local persistent file into the memory, wherein the persistent file includes the previous connection information and remote message address of the first client; after the loading is completed, read the connection information and identify the connection information;
[0008] Identify the connection information of the latest business service, read the remote message address from the memory, and initiate an HTTP request through a Rest request template to establish a connection with the first server;
[0009] A connection request is initiated by the first client, and after the connection is established, the transmitted data packet is read and persisted to the disk, and then the connection is closed, the data packet is parsed, and a reminder is given according to the state set by the first client.
[0010] Furthermore, the information reminder according to the setting state of the first client includes: active reminder or passive reminder of the message queue.
[0011] Furthermore, the active reminder is: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; when the information that needs to be reminded is received, the second client will play the reminder content.
[0012] Furthermore, the passive reminder of the message queue is: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
[0013] Furthermore, the information data received from the first client includes: basic information data and connection information data; the basic information data is used for data persistence, and the connection information data is used for persistent data refresh.
[0014] In a second aspect, the present invention further provides a device for real-time push of offline messages, the device comprising: a receiving module, a first processing module, a second processing module, and an output module;
[0015] The receiving module is used to start the first server and receive information data sent from the first client; after the first server receives the information sent from the first client, the received information data is persisted and persistently refreshed;
[0016] The first processing module is used to start the second server and load a local persistent file into the memory, wherein the persistent file includes the previous connection information and remote message address of the first client; after the loading is completed, the connection information is read and identified;
[0017] The second processing module is used for, when the connection information of the latest business service is identified, reading the remote message address from the memory, and initiating an HTTP request through a Rest request template to establish a connection with the first server;
[0018] The output module is used to initiate a connection request through the first client, read the transmitted data packet after the connection is established, persist it to the disk, and then close the connection, parse the data packet, and remind according to the status set by the first client.
[0019] Furthermore, the information reminder according to the setting state of the first client includes: active reminder or passive reminder of the message queue;
[0020] The active reminder is as follows: after being persisted locally, a file object is created to load the information file into the memory, field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; when receiving the information that needs to be reminded, the second client plays the reminder content;
[0021] The passive reminder of the message queue is as follows: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
[0022] Furthermore, the information data received from the first client includes: basic information data and connection information data; the basic information data is used for data persistence, and the connection information data is used for persistent data refresh.
[0023] In a third aspect, the present invention provides a computing device, comprising:
[0024] A memory for storing program instructions;
[0025] The processor is used to call the program instructions stored in the memory and execute the above-mentioned method for real-time push of offline messages according to the obtained program instructions.
[0026] In a fourth aspect, the present invention provides a computer-readable storage medium, including computer-readable instructions. When a computer reads and executes the computer-readable instructions, the above-mentioned method of real-time push of offline messages is implemented. The readable medium may be multiple, and the multiple readable media can operate independently of each other.
[0027] Compared with the prior art, this solution adopts a lightweight design concept; by opening the first server, receiving the information data sent from the first client, persisting and refreshing the received information data; opening the second server, loading the local persistent file into the memory, after loading, reading the connection information and identifying the connection information; identifying the connection information of the latest business service, reading the remote message address from the memory, and initiating an HTTP request through the Rest request template to establish a connection with the first server; initiating a connection request through the first client, reading the transmitted data packet after establishing the connection, persisting it to the disk, and then closing the connection, parsing the data packet, and reminding according to the status set by the first client. The present invention can not only receive message consumption online through RabbitMQ technology, but also initiate a request to the business information system by the second server. It only needs to return the value according to the given template, and the business information end can control whether to remind or not, which greatly improves the flexibility and scalability of message reminders; the present invention can also persist user data, and even if the user has not logged in to the business system, the persistent data can still be read for message reminders. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 A flowchart of an embodiment of a method for real-time push of offline messages provided by the present invention;
[0030] Figure 2 A framework diagram of an embodiment of the method for real-time push of offline messages provided by the present invention;
[0031] Figure 3 This is a structural block diagram of an embodiment of the device for real-time push of offline messages provided by the present invention. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0033] It will be understood by those skilled in the art that, unless otherwise stated, the singular forms "a", "an" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0034] In order to make the objectives, technical solutions and advantages of the present application more clear, the specific implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0035] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0036] RabbitMQ: An open source message broker software that implements the Advanced Message Queuing Protocol (AMQP). It has many notable features, including scalability, reliability, flexibility, manageability, and support for multiple programming languages. It can also send tasks to the message queue asynchronously and be processed asynchronously by consumers.
[0037] Jframe: One of the basic classes for graphical user interface (GUI) programming in the Java programming language, mainly used to create windows.
[0038] The core of the present invention is to provide a method for real-time push of offline messages. Figure 1 FIG. 1 is a flow chart of a method for real-time push of offline messages provided in this embodiment. Figure 2 The figure shows a framework diagram of the method for real-time offline message push provided by this embodiment. In order to better understand the method, Figure 1 and Figure 2 The technical solution of this embodiment is described in detail:
[0039] Step S1: start the first server and receive information data sent from the first client; after the first server receives the information sent from the first client, persist and refresh the received information data.
[0040] In one embodiment, after the program is started for the first time, a WebSocket server with port 8203 will be opened, waiting for the third-party business system client to connect and transmit basic information; after receiving the basic information, the data will be persisted, and after receiving the connection information again, the persistent data will be refreshed.
[0041] Step S2: start the second server and load a local persistent file into the memory, wherein the persistent file includes the previous connection information and remote message address of the first client; after the loading is completed, read the connection information and identify the connection information.
[0042] In one embodiment, when the second server is started, it first preloads a local persistent file into the memory, and the file stores the information of the last connection of the business system client.
[0043] Step S3: Identify the connection information of the latest business service, read the remote message address from the memory, and initiate an HTTP request through a Rest request template to establish a connection with the first server;
[0044] In one embodiment, after reading the latest persistent business service connection information, the program actively reads the remoteMsgUrl from the memory and initiates an HTTP request through RestTemplate to establish a connection with the business service end.
[0045] Step S4: Initiate a connection request through the first client, read the transmitted data packet after the connection is established, persist it to the disk, and then close the connection, parse the data packet, and remind according to the status set by the first client.
[0046] In a preferred embodiment, the information reminder is performed according to the setting state of the first client, and the reminder mode is divided into: active reminder or message queue passive reminder.
[0047] In a preferred embodiment, the active reminder is: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; when the information that needs to be reminded is received, the second client plays the reminder content.
[0048] In one embodiment, when active reminder is selected, the business system client will first initiate a socket connection request to transfer basic data. After the connection is established, the json data packet transmitted is read and persisted to the disk and then the connection is closed. It mainly includes: remoteMsgUrl: server interface address; pushFrequency: message request frequency (unit s); audioUrl: ringtone file download address; after persisting to the local file, first create a File object to load the information file into the memory, use the objectMapper.readTree method to read the field attributes, use the restTemplate.getForEntity method, pass in the remoteMsgUrl address to establish an HTTP connection to read the message data. After receiving the response from the business system server, parse the data packet, which mainly includes: title: reminder content title; content: reminder content; messageStatus: control whether a reminder is needed; when messageStatus is 1, a reminder is needed, and the reminder client will render the reminder content to the Jframe and play the sound, that is, complete the consumption of the message. If the business system server has a custom ringtone address, the reminder program will obtain the business system server ringtone online according to the audioUrl for reminder. If no valid ringtone address is detected, the reminder program will default to the local ringtone. In a preferred embodiment, the message queue passive reminder is: after the persistence is local, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
[0049] In a preferred embodiment, the passive reminder of the message queue is as follows: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
[0050] In one embodiment, the message queue is selected for passive reminder. First, the basic data is received and persisted in the same way as the active reminder. Then the reminder client will start the topic mode of the message queue and create a consumption queue to bind to the "topic_msg" switch, and consume fixed messages with the topic key of "msg.username". The message body is agreed to be in json format, mainly including: title: reminder content title; content: reminder content; when the message queue receives the push message from the business system producer, the reminder client will render the reminder title and content to Jframe and play the sound.
[0051] In a preferred embodiment, the information data received from the first client includes: basic information data and connection information data; the basic information data is used for data persistence, and the connection information data is used for persistent data refresh.
[0052] In this embodiment, by opening the first server, receiving the information data sent from the first client, persisting and refreshing the received information data; opening the second server, loading the local persistent file into the memory, after loading, reading the connection information and identifying the connection information; identifying the connection information of the latest business service, reading the remote message address from the memory, and initiating an HTTP request through the Rest request template to establish a connection with the first server; initiating a connection request through the first client, after establishing the connection, reading the transmitted data packet to persist it to the disk, and then closing the connection, parsing the data packet, and reminding according to the status set by the first client. In this embodiment, not only can the online reception of message consumption through RabbitMQ technology, but also the second server can initiate a request to the business information system. It only needs to return the value according to the given template to control whether the reminder should be given by the business information end, thereby improving the flexibility and scalability of the message reminder; this embodiment adopts two methods of active request and passive reception, which increases the flexibility of message acquisition and the timeliness of message push.
[0053] In one embodiment, a device for real-time push of offline messages is provided. Figure 3 The figure shows a structural block diagram of a device for real-time push of offline messages provided in this embodiment, wherein the device comprises: a receiving module 10, a first processing module 20, a second processing module 30, and an output module 40;
[0054] Receiving module 10: used to start the first server and receive information data sent from the first client; after the first server receives the information sent from the first client, the received information data is persisted and persistently refreshed.
[0055] The first processing module 20 is used to start the second server and load a local persistent file into the memory, wherein the persistent file includes the previous connection information and remote message address of the first client; after the loading is completed, the connection information is read and identified.
[0056] The second processing module 30 is used to, when the connection information of the latest business service is identified, read the remote message address from the memory, and initiate an Http request through a Rest request template to establish a connection with the first server.
[0057] The output module 40 is used to initiate a connection request through the first client, read the transmitted data packet after the connection is established, persist it to the disk, and then close the connection, parse the data packet, and remind according to the status set by the first client.
[0058] In a preferred implementation, the information reminder according to the setting state of the first client includes: active reminder or message queue passive reminder.
[0059] Active reminders are: after being persisted locally, a file object is created to load the information file into the memory, field attributes are read to establish an Http connection to read the message data, and the data packet transmitted by the first client is read through the second server; when receiving the information that needs to be reminded, the second client plays the reminder content;
[0060] The passive reminder of the message queue is as follows: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an Http connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
[0061] In a preferred embodiment, the information data received from the first client includes: basic information data and connection information data; the basic information data is used for data persistence, and the connection information data is used for persistent data refresh.
[0062] In this embodiment, by opening the first server, receiving the information data sent from the first client, persisting and refreshing the received information data; opening the second server, loading the local persistent file into the memory, after loading, reading the connection information and identifying the connection information; identifying the connection information of the latest business service, reading the remote message address from the memory, initiating an HTTP request through the Rest request template to establish a connection with the first server; initiating a connection request through the first client, reading the transmitted data packet after establishing the connection, persisting it to the disk, and then closing the connection, parsing the data packet, and reminding according to the status set by the first client. This embodiment can not only receive message consumption online through RabbitMQ technology, but also initiate a request to the business information system by the second server. It only needs to return the value according to the given template to control whether the reminder should be given by the business information end, thereby improving the flexibility and scalability of message reminders; this embodiment adopts two methods of active request and passive reception, which increases the flexibility of message acquisition and the timeliness of message push.
[0063] The device for real-time push of offline messages in this embodiment is used to implement the aforementioned method for real-time push of offline messages. Therefore, the specific implementation of the device for real-time push of offline messages can be seen from the specific implementation of the method for real-time push of offline messages in the previous text. For example, the receiving module 10 is used to implement step S1 in the above-mentioned method for real-time push of offline messages, and the first processing module 20 is used to implement step S2 in the above-mentioned method for real-time push of offline messages, etc. Therefore, its specific implementation can refer to the description of the corresponding embodiments of each part. The device provided by the present invention is attached to the method provided by the present invention, and its specific effects can refer to the above-mentioned method, which will not be repeated here.
[0064] In one embodiment, a computing device is provided, comprising:
[0065] A memory for storing program instructions;
[0066] A processor is used to implement the steps of the method for real-time push of offline messages as described in any of the above when executing the computer program. A method for real-time push of offline messages in the present invention has obvious advantages and beneficial effects compared with the prior art. By opening the first server, receiving the information data sent from the first client, and persisting and persistently refreshing the received information data; opening the second server, loading the local persistent file into the memory, and after loading, reading the connection information and identifying the connection information; identifying the connection information of the latest business service, reading the remote message address from the memory, and initiating an HTTP request to establish a connection with the first server through the Rest request template; initiating a connection request through the first client, reading the transmitted data packet after establishing the connection, persisting it to the disk, and then closing the connection, parsing the data packet, and reminding according to the status set by the first client. This embodiment can not only receive message consumption online through RabbitMQ technology, but also initiate a request to the business information system by the second server. It only needs to return the value according to the given template to control whether the reminder should be given by the business information end, thereby improving the flexibility and scalability of the message reminder; this embodiment adopts two methods of active request and passive reception, which increases the flexibility of message acquisition and the timeliness of message push.
[0067] In one embodiment, a computer-readable storage medium is provided, including computer-readable instructions. When a computer reads and executes the computer-readable instructions, the steps of the method for real-time offline message push described above are implemented. Compared with the prior art, the method for real-time offline message push of the present invention has obvious advantages and beneficial effects. By opening a first server, receiving information data sent from a first client, and persisting and persistently refreshing the received information data; opening a second server, loading a local persistent file into a memory, and after loading, reading connection information and identifying the connection information; identifying the connection information of the latest business service, reading a remote message address from the memory, and initiating an HTTP request through a Rest request template to establish a connection with the first server; initiating a connection request through the first client, reading the transmitted data packet after the connection is established, persisting it to the disk, and then closing the connection, parsing the data packet, and reminding according to the status set by the first client. This embodiment can not only receive message consumption online through RabbitMQ technology, but also initiate a request to the business information system by the second server. The business information end can control whether a reminder should be given by simply returning a value according to a given template, thereby improving the flexibility and scalability of message reminders. This embodiment adopts two methods, active request and passive reception, which increases the flexibility of message acquisition and the timeliness of message push.
[0068] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the specific device can be divided into different functional modules to complete all or part of the functions described above.
[0069] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0070] In several embodiments covered by the present application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
[0071] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0072] In addition, each functional module in each embodiment of the present application can be implemented in the form of hardware or in the form of software functional modules. If these functional modules are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or part of the prior art that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a computer program product, which includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer program product is stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, a computer instruction can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)).
[0073] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. A method for real-time push of offline messages, It is characterized in that include: Open the first server to receive information data sent from the first client; When the first server receives the information sent from the first client, the received information data is persisted and persistently refreshed; Open the second server and load a local persistent file into the memory, wherein the persistent file includes the previous connection information and remote message address of the first client; after the loading is completed, read the connection information and identify the connection information; Identify the connection information of the latest business service, read the remote message address from the memory, and initiate an HTTP request through a Rest request template to establish a connection with the first server; A connection request is initiated by the first client, and after the connection is established, the transmitted data packet is read and persisted to the disk, and then the connection is closed, the data packet is parsed, and a reminder is given according to the state set by the first client.
2. The method for real-time offline message push according to claim 1, It is characterized in that The information reminder according to the setting state of the first client includes: active reminder or message queue passive reminder.
3. The method for real-time offline message push according to claim 2, It is characterized in that The active reminder is as follows: after being persisted locally, a file object is created to load the information file into the memory, field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; When receiving the information requiring reminder, the second client plays the reminder content.
4. The method for real-time offline message push according to claim 2, It is characterized in that The passive reminder of the message queue is as follows: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
5. The method for real-time offline message push according to claim 1, It is characterized in that The information data received from the first client includes: basic information data and connection information data; the basic information data is used for data persistence, and the connection information data is used for persistent data refresh.
6. A device for real-time push of offline messages, It is characterized in that include: Receiving module, first processing module, second processing module, output module; The receiving module is used to start the first server and receive information data sent from the first client; after the first server receives the information sent from the first client, the received information data is persisted and persistently refreshed; The first processing module is used to start the second server and load a local persistent file into the memory, wherein the persistent file includes the previous connection information and remote message address of the first client; after the loading is completed, the connection information is read and identified; The second processing module is used for, when the connection information of the latest business service is identified, reading the remote message address from the memory, and initiating an HTTP request through a Rest request template to establish a connection with the first server; The output module is used to initiate a connection request through the first client, read the transmitted data packet after the connection is established, persist it to the disk, and then close the connection, parse the data packet, and remind according to the status set by the first client.
7. The device for real-time offline message push according to claim 6, It is characterized in that The information reminder according to the setting state of the first client includes: active reminder or message queue passive reminder; The active reminder is as follows: after being persisted locally, a file object is created to load the information file into the memory, field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; when receiving the information that needs to be reminded, the second client plays the reminder content; The passive reminder of the message queue is as follows: after being persisted locally, a file object is created to load the information file into the memory, the field attributes are read to establish an HTTP connection to read the message data, and the data packet transmitted by the first client is read through the second server; the second client starts the message queue mode, and when the message queue receives the push message from the first client, the second server plays the received push message.
8. The device for real-time offline message push according to claim 6, It is characterized in that The information data received from the first client includes: basic information data and connection information data; the basic information data is used for data persistence, and the connection information data is used for persistent data refresh.
9. A computing device, It is characterized in that include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 5 according to the obtained program instructions.
10. A computer-readable storage medium, It is characterized in that It includes computer-readable instructions. When a computer reads and executes the computer-readable instructions, it implements the method as claimed in any one of claims 1 to 5. There can be multiple readable media, and the multiple readable media can operate independently of each other.
