Movatterモバイル変換


[0]ホーム

URL:


CN111124703A - Method and system for automatically reminding processing work in cluster environment - Google Patents

Method and system for automatically reminding processing work in cluster environment
Download PDF

Info

Publication number
CN111124703A
CN111124703ACN201911168550.3ACN201911168550ACN111124703ACN 111124703 ACN111124703 ACN 111124703ACN 201911168550 ACN201911168550 ACN 201911168550ACN 111124703 ACN111124703 ACN 111124703A
Authority
CN
China
Prior art keywords
message
client
activemq
data
processing work
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.)
Granted
Application number
CN201911168550.3A
Other languages
Chinese (zh)
Other versions
CN111124703B (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.)
State Grid Shandong Electric Power Co Ltd
Shandong Luneng Software Technology Co Ltd
Original Assignee
State Grid Shandong Electric Power Co Ltd
Shandong Luneng Software 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 State Grid Shandong Electric Power Co Ltd, Shandong Luneng Software Technology Co LtdfiledCriticalState Grid Shandong Electric Power Co Ltd
Priority to CN201911168550.3ApriorityCriticalpatent/CN111124703B/en
Publication of CN111124703ApublicationCriticalpatent/CN111124703A/en
Application grantedgrantedCritical
Publication of CN111124703BpublicationCriticalpatent/CN111124703B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种集群环境下自动提醒处理工作的方法及系统,包括:通过客户端登录系统,并使用长期保持的http连接实现客户端和服务器间的基于事件驱动的通信;服务器端接收客户端用户根据需要加入订阅,实现push数据到指定客户端浏览器后进行展示。本专利在发送消息给用户时因基于确切的需求从而确保数据百分之百的有效性。

Figure 201911168550

The invention discloses a method and system for automatically reminding processing work in a cluster environment, comprising: logging into the system through a client, and using a long-term HTTP connection to realize event-driven communication between the client and the server; the server receiving the client The end user joins the subscription according to their needs, and realizes the push data to the designated client browser for display. This patent ensures 100% data availability based on exact requirements when sending messages to users.

Figure 201911168550

Description

Method and system for automatically reminding processing work in cluster environment
Technical Field
The invention belongs to the technical field of server side message pushing, and particularly relates to a method and a system for realizing a server message pushing mechanism in a cluster mode.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
In Web applications, when a client, such as a browser, needs to obtain latest background data immediately and display the latest background data to a user, a polling mode is usually adopted, and such polling requests are mostly invalid (possibly, background data does not change) and are relatively weak in instantaneity, and pressure on foreground and background is relatively large.
In the prior art, no matter whether background data changes or not, polling is performed on the data from the background all the time, for example, the data is taken once every 5 seconds, when the background data changes within 5 seconds, the data cannot be displayed immediately due to the need of waiting for 5 seconds, and the data can be displayed after being taken by polling processing after 5 seconds. In addition, if the polling is performed 12 times without changing the background data within 1 minute, the 12 times of data fetching are the same, so the 12 times of data fetching are invalid.
With the continuous development of the information-based society, timely and accurate information acquisition plays a very important role in the correct decision of people, and also provides new requirements for various technologies.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method for realizing a server message pushing mechanism in a cluster mode, which not only can realize the communication among cluster nodes, but also can meet the requirement that a server actively pushes messages to a client under a cluster environment, meet the requirement of instantaneity and reduce the pressure on foreground and background caused by polling.
In order to achieve the above object, one or more embodiments of the present invention provide the following technical solutions:
a method for automatically reminding processing work in cluster environment comprises the following steps:
logging in a web application system through a client browser, and realizing event-driven communication between a client and a server by using a long-term http connection;
the client sends the information request to the server by adding various subject message types needing to be subscribed, and the client browser receives the data actively sent by the server and displays the data.
The technical scheme is that a client logs in an application system, an activemq configuration item is loaded after a project is started, two message destinations are generated in spring and used for pushing messages to the activemq when the messages are sent, one is a queue destination, and the other is a theme destination; and loading a listener for monitoring the queue and the theme in the message middleware at the same time, and immediately receiving and processing the message when a new message exists.
According to the further technical scheme, after the server side generates data needing to be pushed, the server side analyzes the data to obtain a receiving object and pushes an appointed client side, a set destination and a message body are pushed to activemq through a public method, and the activemq stores the data in a table after receiving the message and waits for a listener to read the data.
In a further technical scheme, after finding the message to be processed, the client monitor reads the message from the activemq, and the activemq automatically determines whether to empty the message according to the type of the message, namely the queue or the theme.
According to the further technical scheme, after a monitor obtains a message, a message body is analyzed to obtain message content and receiver information, an online user list is obtained through a pushlet, a message receiver in the online user list is found out, the message is pushed to a client browser in real time, if a user corresponding to the client browser is not online, the message is persisted to a database, and after the message is online, a message to be processed is searched and displayed to the user.
According to the further technical scheme, after the client side has the message to be processed, the system sets the message to be in a read state after the message is processed by clicking, and the read message is not displayed after logging in again.
In the further technical scheme, the client logs out of the system to cancel the subscription, logs out the session and does not receive the message any more.
A system for automatically alerting processing jobs in a clustered environment, comprising: a client and a server;
logging in a system through a client, and realizing event-driven communication between the client and a server by using a long-term http connection;
and the server receives a subscription request added by a client user as required, and displays the push data to a specified client browser.
The above one or more technical solutions have the following beneficial effects:
the client user is free from installing any software, and only a browser is needed: pushlet is a Servlet-based mechanism for realizing a comet architecture, and data is directly pushed (push) from a Java object at a server end to a (dynamic) HTML page of a browser at a client end without any Java applet or plug-in, so that a user is free from installing any software.
The client side displays multiple styles of effects. The display of the messages on the browser is in seamless connection with the javascript, the received and displayed messages are completely composed of js and html elements, and the browser can form various display effects according to needs after receiving the messages.
And meets the requirement of instantaneity. The pushlet message is sent by using an http protocol, and under the condition of good network state, the online user hardly perceives the time consumed in the data circulation process. Activemq is also on the order of milliseconds, with almost negligible time from sending a message to receiving it.
The effectiveness of the message is improved. The ordinary polling method is most of the cases where the acquired message data is invalid. When the patent is used for sending a message to a user, the message is triggered when new data are generated or changed based on the exact requirement, so that the one-hundred-percent validity of the data is ensured.
The technical scheme of the application can solve the problem that the latest data cannot be obtained in the polling interval in the background technology, and can be immediately pushed and displayed without waiting as long as data change exists.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
FIG. 1 is a schematic diagram of a user login system according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating boot loading according to an embodiment of the present invention;
fig. 3 is a schematic diagram of message pushing according to an embodiment of the present invention.
Detailed Description
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The embodiments and features of the embodiments of the present invention may be combined with each other without conflict.
Example one
The embodiment discloses a method for automatically reminding processing work in a cluster environment, which not only can realize communication among cluster service nodes, but also can meet the requirement that a server actively pushes a message to a client in the cluster environment, and reduce the pressure on foreground and background caused by polling while meeting the requirement on instantaneity.
In an embodiment, referring to fig. 1, a user logs in an application system, and uses a jsp/servlet technology to implement event-driven communication between a client and a server by using a long-term http connection. The user is identified by adding a unique TOKEN in the cookie, and the user adds a pushlet in the client through the TOKEN identity and listens to various subject messages. Background service defines multiple types of theme message types, a user joins in and subscribes different types of themes according to needs to receive different types of messages, a server side sends messages to a specified client side according to TOKEN, and the client side can display the messages instantly when monitoring new messages.
Referring to fig. 2, after the background server is started, an activemq configuration item is loaded to generate two message destinations in spring for pushing a message to the activemq when sending the message, one is that only one person can receive the message at the queue destination, and the other is that multiple persons at the subject destination can receive the message; and meanwhile, loading a listener for monitoring the queue and the theme in the message middleware, and immediately receiving and processing the message when a new message exists.
After the background generates data to be pushed, people needing to be pushed find the corresponding TOKEN, a destination, a message body and a receiver are set in a json format, the data are pushed to activemq through a public method, the activemq analyzes the data after receiving the message, and the data are stored in a table and wait for a listener in the background cluster node to read.
Referring to fig. 3, after finding the message to be processed, the listener reads the message from activemq, and the activemq automatically determines whether to empty the message according to the type of the message, i.e., whether the message is a queue or a topic. After a listener acquires a message, a message body is analyzed to acquire message content and receiver information, an online user list is acquired through TOKEN, a message receiver in the online user list is found out, the message is instantly pushed to a user, if the user is not found in pushlet monitoring, namely the user is not online, the message is persisted to a database, and after the user is online, a message to be processed is searched and displayed to the user.
After finding the message to be processed, the user clicks the message processing system to set the message to be in a read state, and the read message is not displayed after logging in again.
The user logs out of the system to cancel the subscription, logs out the session and does not accept the message any more.
Example two
The present embodiment aims to provide a system for automatically reminding processing work in a cluster environment, including: a client and a server;
logging in a system through a client, and realizing event-driven communication between the client and a server by using a long-term http connection;
and the server receives the subscription added by the client user as required, and displays the push data after the push data is sent to the specified client browser.
After the server side generates data needing to be pushed, according to the received client side needing to be pushed, a destination and a message body are set to be pushed to activemq through a public method, and after the activemq receives the message, the data are stored in a table to wait for a listener to read.
After finding the message to be processed, the client monitor reads the message from the activemq, and the activemq automatically determines whether to empty the message according to the type of the message, namely the queue or the theme;
after a listener acquires a message, a message body is analyzed to acquire message content and receiver information, an online user list is acquired through a pushlet, a message receiver in the online user list is found out, the message is instantly pushed to a client browser, if a user corresponding to the client browser is not online, the message is duralized to a database, and after the message is online, a message to be processed is searched and displayed to the user.
For the specific information processing procedure of the client and the server, refer to the detailed description of the first embodiment.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

Translated fromChinese
1.一种集群环境下自动提醒处理工作的方法,其特征是,包括:1. a method for automatically reminding processing work under a cluster environment, is characterized in that, comprising:通过客户端浏览器登录web应用系统,并使用长期保持的http连接实现客户端和服务器间的基于事件驱动的通信;Log in to the web application system through the client browser, and use the long-term HTTP connection to realize event-driven communication between the client and the server;客户端通过加入需要订阅的各种主题消息类型把信息请求发送至服务端,客户端浏览器接收服务器端主动发送的数据后进行展示。The client sends information requests to the server by adding various topic message types that need to be subscribed, and the client browser displays the data after receiving the data actively sent by the server.2.如权利要求1所述的一种集群环境下自动提醒处理工作的方法,其特征是,客户端登录系统项目启动后加载activemq配置项,在spring中生成两种消息目的地用于发送消息时推送消息到activemq,一个是队列目的地,一个是主题目的地;同时加载对消息中间件中的队列和主题进行监听的监听器,在有新消息时即时接收处理消息。2. the method for automatically reminding processing work under a kind of cluster environment as claimed in claim 1, it is characterized in that, load activemq configuration item after client login system project is started, generate two kinds of message destinations in spring for sending message When pushing messages to activemq, one is the queue destination and the other is the topic destination; at the same time, the listeners that monitor the queues and topics in the message middleware are loaded, and the messages are received and processed immediately when there are new messages.3.如权利要求1所述的一种集群环境下自动提醒处理工作的方法,其特征是,服务器端产生需要推送的数据后,解析数据获取接收对象推送指定的客户端,设置目的地和消息体通过公用方法推送给activemq,activemq在收到消息后会将数据存放到表中等待监听者读取。3. the method for automatically reminding processing work under a kind of cluster environment as claimed in claim 1, it is characterized in that, after the server side produces the data that needs to be pushed, analyzes the data and obtains the client that receives object pushes the specified client, sets destination and message The body is pushed to activemq through public methods, and activemq will store the data in the table after receiving the message and wait for the listener to read it.4.如权利要求1所述的一种集群环境下自动提醒处理工作的方法,其特征是,客户端监听者发现有待处理的消息后,从activemq中读取消息,activemq自动根据消息类型是队列还是主题决定是否清空消息。4. the method for automatically reminding processing work under a kind of cluster environment as claimed in claim 1 is characterized in that, after the client listener finds the message to be processed, reads the message from activemq, and activemq automatically is a queue according to the message type It's the subject that decides whether to clear the message or not.5.如权利要求1所述的一种集群环境下自动提醒处理工作的方法,其特征是,监听者获取消息后,解析消息体获取消息内容和接收者信息,通过pushlet获取在线用户列表并找出其中的消息接收者将消息即时推送到客户端浏览器,若客户端浏览器对应的用户不在线,则将消息持久化到数据库,上线后查找待处理消息并展示给用户。5. the method for automatically reminding processing work under a kind of cluster environment as claimed in claim 1 is characterized in that, after the listener obtains the message, parses the message body to obtain the message content and recipient information, obtains the online user list by pushlet and finds The receiver of the message will push the message to the client browser immediately. If the user corresponding to the client browser is not online, the message will be persisted to the database, and the pending message will be searched and displayed to the user after going online.6.如权利要求1所述的一种集群环境下自动提醒处理工作的方法,其特征是,客户端有待处理的消息后,通过点击消息处理后系统将消息设置为已读状态,再次登录后不再展示已读消息。6. the method for automatically reminding processing work under a kind of cluster environment as claimed in claim 1 is characterized in that, after the client has the message to be processed, the system sets the message to read status by clicking on the message after processing, and after logging in again Don't show read messages anymore.7.如权利要求1所述的一种集群环境下自动提醒处理工作的方法,其特征是,客户端退出系统取消订阅,注销会话,不再接受消息。7 . The method for automatically reminding processing work in a cluster environment according to claim 1 , wherein the client exits the system to cancel subscription, log out the session, and no longer accept messages. 8 .8.一种集群环境下自动提醒处理工作的系统,其特征是,包括:客户端及服务端;8. A system for automatically reminding processing work in a cluster environment, characterized in that it comprises: a client and a server;通过客户端登录系统,并使用长期保持的http连接实现客户端和服务器间的基于事件驱动的通信;Log in to the system through the client, and implement event-driven communication between the client and the server using a long-term HTTP connection;服务器端接收客户端用户根据需要加入的订阅请求,实现push数据到指定客户端浏览器后进行展示。The server side receives the subscription request that the client user joins as needed, and implements the push data to the specified client browser for display.9.如权利要求8所述的一种集群环境下自动提醒处理工作的系统,其特征是,服务器端产生需要推送的数据后,解析数据获取接收对象推送指定的客户端,设置目的地和消息体通过公用方法推送给activemq,activemq在收到消息后会将数据存放到表中等待监听者读取。9. the system of automatically reminding processing work under a kind of cluster environment as claimed in claim 8, it is characterized in that, after the server side produces the data that needs to be pushed, parses the data and obtains the client that receives object pushes the designated client, sets destination and message The body is pushed to activemq through public methods, and activemq will store the data in the table after receiving the message and wait for the listener to read it.10.如权利要求8所述的一种集群环境下自动提醒处理工作的系统,其特征是,客户端监听者发现有待处理的消息后,从activemq中读取消息,activemq自动根据消息类型是队列还是主题决定是否清空消息;10. The system of automatically reminding processing work under a kind of cluster environment as claimed in claim 8, it is characterized in that, after the client listener finds the message to be processed, reads the message from activemq, and activemq automatically is a queue according to the message type. Or the topic decides whether to clear the message;进一步的技术方案,监听者获取消息后,解析消息体获取消息内容和接收者信息,通过pushlet获取在线用户列表并找出其中的消息接收者将消息即时推送到客户端浏览器,若客户端浏览器对应的用户不在线,则将消息持久化到数据库,上线后查找待处理消息并展示给用户。In a further technical solution, after the listener obtains the message, the listener parses the message body to obtain the message content and recipient information, obtains the online user list through pushlet, finds out the message recipient, and pushes the message to the client browser immediately. If the user corresponding to the server is not online, the message will be persisted to the database, and after going online, the pending message will be searched and displayed to the user.
CN201911168550.3A2019-11-252019-11-25Method and system for automatically reminding processing work in cluster environmentActiveCN111124703B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201911168550.3ACN111124703B (en)2019-11-252019-11-25Method and system for automatically reminding processing work in cluster environment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201911168550.3ACN111124703B (en)2019-11-252019-11-25Method and system for automatically reminding processing work in cluster environment

Publications (2)

Publication NumberPublication Date
CN111124703Atrue CN111124703A (en)2020-05-08
CN111124703B CN111124703B (en)2024-03-22

Family

ID=70496566

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201911168550.3AActiveCN111124703B (en)2019-11-252019-11-25Method and system for automatically reminding processing work in cluster environment

Country Status (1)

CountryLink
CN (1)CN111124703B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114513500A (en)*2022-01-192022-05-17统信软件技术有限公司Method, device and system for batch installation of browser plug-ins and computing device
CN115174296A (en)*2022-05-302022-10-11青岛海尔科技有限公司Equipment function access method, device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103442072A (en)*2013-09-022013-12-11百度在线网络技术(北京)有限公司Method and device for pushing traffic information related to user schedules
CN104092767A (en)*2014-07-212014-10-08北京邮电大学 A publish/subscribe system with added message queue model and its working method
CN105162687A (en)*2015-08-112015-12-16甘肃万维信息技术有限责任公司WEB-based real-time message push method
CN110019240A (en)*2017-12-292019-07-16中国移动通信集团北京有限公司A kind of service data interaction method, apparatus and system
CN110113420A (en)*2019-05-082019-08-09重庆大学Distributed Message Queue management system based on NVM

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103442072A (en)*2013-09-022013-12-11百度在线网络技术(北京)有限公司Method and device for pushing traffic information related to user schedules
CN104092767A (en)*2014-07-212014-10-08北京邮电大学 A publish/subscribe system with added message queue model and its working method
CN105162687A (en)*2015-08-112015-12-16甘肃万维信息技术有限责任公司WEB-based real-time message push method
CN110019240A (en)*2017-12-292019-07-16中国移动通信集团北京有限公司A kind of service data interaction method, apparatus and system
CN110113420A (en)*2019-05-082019-08-09重庆大学Distributed Message Queue management system based on NVM

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114513500A (en)*2022-01-192022-05-17统信软件技术有限公司Method, device and system for batch installation of browser plug-ins and computing device
CN114513500B (en)*2022-01-192024-06-04统信软件技术有限公司Method, device, system and computing device for batch installation of browser plug-ins
CN115174296A (en)*2022-05-302022-10-11青岛海尔科技有限公司Equipment function access method, device, storage medium and electronic device
CN115174296B (en)*2022-05-302024-03-22青岛海尔科技有限公司Equipment function access method and device, storage medium and electronic device

Also Published As

Publication numberPublication date
CN111124703B (en)2024-03-22

Similar Documents

PublicationPublication DateTitle
US9578081B2 (en)System and method for providing an actively invalidated client-side network resource cache
US8799400B2 (en)System and method for managing multiple queues of non-persistent messages in a networked environment
EP2115976B1 (en)Method and system for resource-based synchronization between endpoints in a web-based real time collaboration
US8234559B2 (en)Managing rich presence collections
US8606859B2 (en)Method and system to communicate messages in a computer network
US8452833B2 (en)Cached message distribution via HTTP redirects
US7836123B2 (en)System and method for non-HTTP session based publish/subscribe support using pre-emptive subscriptions
EP2746950B1 (en)ABAP channels for event signaling
KR102208935B1 (en)Messaging api over http protocol to establish context for data exchange
WO2021237433A1 (en)Message pushing method and apparatus, and electronic device and computer-readable medium
WO2003077139A1 (en)Asynchronous message push to web browser
JP4934195B2 (en) Automatically subscribe to syndication feeds using contact lists
US20070061282A1 (en)Data network information distribution
CA2644124A1 (en)Managing rich presence collections
US20120096073A1 (en)Local polling method and system for real time updating of web-based services
US8665311B2 (en)Methods and apparatus for collaboration
CN110753129A (en) Message transmission method, system, apparatus, device, and computer-readable storage medium
US20090240829A1 (en)Translating between implicit and explicit publish-subscribe protocols
US9503485B1 (en)Connecting communicating devices in a multi-server communication system
US20040039776A1 (en)System and method for efficient data refresh
JP2021535515A (en) Event content distribution
CN111124703A (en)Method and system for automatically reminding processing work in cluster environment
JP2021185509A (en) Dynamic object update subscription based on user interaction by interface
US8755397B2 (en)Asynchronous communication in an unstable network
EP2555478A1 (en)Method, system, resource list server and presence server for subscribing presence information

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information

Address after:185 Jingsi Road, Shizhong District, Jinan City, Shandong Province

Applicant after:Shandong luruan Digital Technology Co.,Ltd.

Applicant after:STATE GRID SHANDONG ELECTRIC POWER Co.

Address before:185 Jingsi Road, Shizhong District, Jinan City, Shandong Province

Applicant before:SHANDONG LUNENG SOFTWARE TECHNOLOGY Co.,Ltd.

Applicant before:STATE GRID SHANDONG ELECTRIC POWER Co.

CB02Change of applicant information
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp