CN115567575B - Method and system for triggering multi-window message in real time - Google Patents
Method and system for triggering multi-window message in real time Download PDFInfo
- Publication number
- CN115567575B CN115567575B CN202211381435.6A CN202211381435A CN115567575B CN 115567575 B CN115567575 B CN 115567575B CN 202211381435 A CN202211381435 A CN 202211381435A CN 115567575 B CN115567575 B CN 115567575B
- Authority
- CN
- China
- Prior art keywords
- window
- message
- triggering
- background server
- client
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to a method and a system for triggering multi-window messages in real time, which belong to the technical field of computers, and the method comprises the steps of establishing websocket long connection between a client and a background server; the background server receives multi-window information needing message triggering at the current moment, marks and groups each window to acquire a triggering message, and sends a triggering instruction containing a window component updating message to the client; the client side carries out updating operation of the corresponding window assembly according to the received triggering instruction, and multi-window message triggering at the current moment is realized; the background server receives the multi-window information in real time, repeats window identification, window grouping and real-time trigger information acquisition, and sends a real-time trigger instruction to the client to complete real-time triggering of the multi-window information. The method and the system provided by the application solve the problem that the reloading and refreshing of the whole multi-window page cannot be realized under the condition that the multiple windows of the browser are displayed on the left screen, the right screen or the multiple screens.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for triggering multi-window messages in real time.
Background
With the development of computer technology and networking, two or more browser windows are opened simultaneously based on browser mode operation, the requirements for multi-window, multi-screen and multi-dimensional synchronous display are increasing day by day, for information change in multiple windows opened simultaneously in a browser, a main window and auxiliary window display mode is mostly adopted, when information of a certain window is changed, information of other windows is reloaded, under the condition of adopting display of the main window and the auxiliary window, reloading and refreshing of the whole page can be accepted, but under the condition of carrying out multi-window display of the browser on the left screen and the right screen or the multi-screen, the mode is obviously not preferable.
Disclosure of Invention
The invention aims to provide a method and a system for triggering multi-window messages in real time, which aim to solve the defects in the prior art, and the technical problem to be solved by the invention is realized by the following technical scheme.
In one aspect, the present invention provides a method for triggering a multi-window message in real time, including:
the client initiates a service request to the background server through a message triggering mechanism, and establishes a websocket long connection with the background server through a handshake protocol;
the background server receives multi-window information needing message triggering, which is obtained by a plurality of users operating a browser at a client at the current moment, through a background service mechanism;
the background server groups the windows according to the user roles to which the windows belong, classifies the windows corresponding to the same user role into the same window group, and identifies the windows in the window group according to the interface names and the positions of the windows in the window group;
the background server acquires a trigger message according to the identification information and the grouping information;
the background server sends a trigger instruction containing a window component updating message to the client according to the trigger message;
the client side carries out updating operation of the corresponding window component according to the received triggering instruction, and multi-window message triggering at the current moment is realized;
the background server receives multi-window information obtained by a plurality of users operating the browser at the client in real time, repeats window identification, window grouping and acquisition of real-time trigger information, and sends a real-time trigger instruction containing window component updating information to the client to complete real-time triggering of the multi-window information according to the real-time trigger information.
In the above solution, the message triggering mechanism includes making a connection, subscribing to a message, disconnecting a connection, and sending a message.
In the scheme, the client initiates a service request to the background server through a message trigger mechanism, and after establishing the websocket long connection with the background server through a handshake protocol, the background server stores a websocket object corresponding to the client.
In the above scheme, the websocket object includes a multi-window message sent by the client to the background server and a window component update message sent by the background server to the client.
In the above solution, the background service mechanism includes monitoring a connection opening event, disconnecting a connection closing event, monitoring a message receiving error information event, sending a message, and closing a connection.
On the other hand, the invention provides a system for triggering multi-window messages in real time, which is characterized by comprising a background server unit and a client unit; the background server unit and the client unit are in communication with each other; the background server unit is used for monitoring multi-window information which is sent by the client unit and needs to be triggered in real time, identifying, grouping and processing the monitored multi-window information to obtain a window component updating message, and sending the window component updating message to the client unit;
and the client unit receives the window component updating message and carries out updating operation of the corresponding window component, thereby realizing real-time multi-window message triggering.
In the above scheme, the background server unit includes a database and a message monitoring module, where the database is used to store information sent by the message monitoring module and a websocket object corresponding to the client unit, and update the stored information according to real-time information sent by the message monitoring module; the message monitoring module is used for monitoring the multi-window information which is sent by the client unit and needs to be triggered by the message in real time.
In the above solution, the background server unit further includes a window grouping module, a window identification module and a message processing module, where the window grouping module is configured to receive multi-window information that needs to be triggered by a message and is acquired by the message monitoring module, and group windows according to user roles to which the windows belong, and classify windows corresponding to the same user role into the same window group; the window identification module is used for identifying each window in the window group according to the interface name and the position of each window in the window group acquired by the window grouping module; and the message processing module is used for acquiring a trigger message according to the identification information and the grouping information and sending a trigger instruction containing a window component updating message to the client unit in real time according to the trigger message.
In the above scheme, the background server unit further includes a window loading module, where the window loading module is configured to load a multi-window interface to be displayed according to the trigger instruction acquired by the message processing module.
In the scheme, the client unit comprises a message triggering module and a message receiving module, wherein the message triggering module establishes a websocket long connection with the background server and sends multi-window information needing message triggering to the background server unit in real time; and the message receiving module receives the window component updating message sent by the background server unit in real time, and sends the component id which needs to be subjected to data updating to the message triggering module according to the window component updating message to perform updating operation of the corresponding window component, so that real-time multi-window message triggering is realized.
The embodiment of the invention has the following advantages:
the method and the system for triggering the multi-window message in real time provided by the embodiment of the invention have the advantages that the websocket long connection between the client and the background server is established, the background server receives the multi-window information which is obtained by a plurality of users operating the browser at the client at the current moment and needs to be subjected to message triggering, marks and groups each window, the trigger message is obtained according to the mark information and the group information, the trigger instruction containing the window component updating message is sent to the client according to the trigger message, the client performs the updating operation of the corresponding window component according to the received trigger instruction, the message triggering of the multi-window at the current moment is realized, the background server receives the multi-window information in real time, the window marks, the window grouping and the real-time trigger message are repeated, the real-time trigger instruction is sent to the client according to the real-time trigger message, the real-time trigger of the multi-window is completed, and the problem that the reloading and refreshing of the whole multi-window page cannot be realized under the condition that the multi-window displaying is performed on the left and right double screens or multi-screens is solved.
Drawings
Fig. 1 is a flowchart illustrating the steps of an embodiment of a method for real-time triggering of a multi-window message according to the present invention.
Fig. 2 is a schematic diagram of the system for real-time triggering of multi-window messages according to the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As shown in fig. 1, a method for triggering a multi-window message in real time provided by the present invention includes:
step S1: the client initiates a service request to the background server through a message triggering mechanism, and establishes a websocket long connection with the background server through a handshake protocol;
step S2: the background server receives multi-window information needing message triggering, which is obtained by a plurality of users operating a browser at a client at the current moment, through a background service mechanism;
and step S3: the background server groups the windows according to the user roles to which the windows belong, classifies the windows corresponding to the same user role into the same window group, and identifies the windows in the window group according to the interface names and the positions of the windows in the window group;
and step S4: the background server acquires a trigger message according to the identification information and the grouping information;
step S5: the background server sends a trigger instruction containing a window component updating message to the client according to the trigger message;
step S6: the client side carries out updating operation of the corresponding window assembly according to the received triggering instruction, and multi-window message triggering at the current moment is realized;
step S7: the background server receives multi-window information obtained by a plurality of users operating the browser at the client in real time, repeats window identification, window grouping and acquisition of real-time trigger information, and sends a real-time trigger instruction containing window component update information to the client according to the real-time trigger information to complete real-time triggering of the multi-window information.
In this embodiment, the message triggering mechanism in step S1 includes performing connection, subscribing to a message, disconnecting a connection, sending a message, processing an error, and the like.
In this embodiment, the client initiates a service request to the background server through a message trigger mechanism, and after establishing a long websocket connection with the background server through a handshake protocol, the background server stores a websocket object corresponding to the client.
In this embodiment, the websocket object includes a multi-window message sent by the client to the backend server, a window component update message sent by the backend server to the client, and the like.
In this embodiment, the background service mechanism in step S2 includes monitoring a connection open event, disconnecting a connection close event, monitoring a message receiving error event, sending a message, closing a connection, and the like.
In this embodiment, the position of each window in step S3 includes a left screen, a middle screen, a right screen, and the like.
In this embodiment, when the windows are grouped according to the user roles to which the respective windows belong in step S3, there is a case where the same window belongs to different user roles at the same time.
In this embodiment, the trigger message in step S4 includes window identification information to be triggered, user window group information, and the like.
As shown in fig. 2, the system for triggering a multi-window message in real time provided by the present invention includes a background server unit 20 and a client unit 21; the background server unit 20 and the client unit 21 communicate with each other; the background server unit 20 is configured to monitor, in real time, multi-window information that needs to be triggered by a message and is sent by the client unit 21, identify, group, and process the monitored multi-window information to obtain a window component update message, and send the window component update message to the client unit 21; the client unit 21 receives the window component update message, performs the update operation of the corresponding window component, and implements real-time multi-window message triggering.
In this embodiment, the backend server unit 20 includes a database 201 and a message monitoring module 202, where the database 201 is configured to store information sent by the message monitoring module 202 and a websocket object corresponding to a client unit, and update the stored information according to real-time information sent by the message monitoring module 202; the message monitoring module 202 is configured to monitor, in real time, multi-window information that needs to be triggered by a message and is sent by the client unit 21.
In this embodiment, the background server unit 20 further includes a window grouping module 203, a window identification module 204, and a message processing module 205, where the window grouping module 203 is configured to receive multi-window information that needs to be triggered by a message and is acquired by the message monitoring module 202, group windows according to user roles to which each window belongs, and classify windows corresponding to the same user role into the same window group; the window identification module 204 is configured to identify each window in the window group according to the interface name and position of each window in the window group obtained by the window grouping module 203; the message processing module 205 is configured to obtain a trigger message according to the identification information and the grouping information, and send a trigger instruction including a window component update message to the client unit 21 in real time according to the trigger message.
In the present embodiment, in the background server unit 20, the window grouping module 203 encapsulates the window components of each user.
In this embodiment, the background server unit 20 further includes a window loading module 206, and the window loading module 206 is configured to load a multi-window interface to be displayed according to the trigger instruction acquired by the message processing module 205.
In this embodiment, the client unit 21 includes a message triggering module 211 and a message receiving module 212, where the message triggering module 211 establishes a websocket long connection with a background server, and sends multi-window information to be message triggered to the background server unit 20 in real time; the message receiving module 212 receives the window component update message sent by the backend server unit 20 in real time, and sends the component id that needs to be updated to the message triggering module 211 according to the window component update message to perform the update operation of the corresponding window component, thereby implementing real-time multi-window message triggering.
It should be noted that the above detailed description is exemplary and is intended to provide further explanation of the disclosure. 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 application 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 example embodiments according to the present application. As used herein, the singular is intended to include the plural unless the context clearly dictates otherwise. Furthermore, it will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or otherwise described herein.
Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
For ease of description, spatially relative terms such as "over 8230," "upper surface," "above," and the like may be used herein to describe the spatial positional relationship of one device or feature to other devices or features as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if a device in the figures is turned over, devices described as "above" or "on" other devices or configurations would then be oriented "below" or "under" the other devices or configurations. Thus, the exemplary terms "at 8230; \8230; 'above" may include both orientations "at 8230; \8230;' above 8230; 'at 8230;' below 8230;" above ". The device may also be oriented in other different ways, such as by rotating it 90 degrees or at other orientations, and the spatially relative descriptors used herein interpreted accordingly.
In the foregoing detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, like numerals typically identify like components, unless context dictates otherwise. The illustrated embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the spirit or scope of the subject matter presented here.
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.
Claims (7)
1. A method for real-time triggering of a multi-window message, the method comprising:
the client initiates a service request to the background server through a message triggering mechanism, and establishes a websocket long connection with the background server through a handshake protocol;
the background server receives multi-window information needing message triggering, which is obtained by a plurality of users operating a browser at a client at the current moment, through a background service mechanism;
the background server groups the windows according to the user roles to which the windows belong, classifies the windows corresponding to the same user role as the same window group, and identifies each window in the window group according to the interface name and position of each window in the window group;
the background server acquires a trigger message according to the identification information and the grouping information;
the background server sends a trigger instruction containing a window component updating message to the client according to the trigger message;
the client side carries out updating operation of the corresponding window component according to the received triggering instruction, and multi-window message triggering at the current moment is realized;
the background server receives multi-window information obtained by a plurality of users operating a browser at a client in real time, repeats window identification, window grouping and acquisition of real-time trigger information, and sends a real-time trigger instruction containing window component update information to the client according to the real-time trigger information to complete real-time triggering of the multi-window information;
the method comprises the steps that a client side initiates a service request to a background server through a message triggering mechanism, after a websocket long connection with the background server is established through a handshake protocol, a websocket object corresponding to the client side is stored in the background server;
the websocket object comprises a multi-window message sent by the client to the background server and a window component updating message sent by the background server to the client.
2. The method of real-time triggering of a multi-window message as recited in claim 1, wherein the message triggering mechanism comprises connecting, subscribing to a message, disconnecting, and sending a message.
3. The method of claim 1, wherein the background service mechanism comprises listening for a connection open event, a disconnection close event, listening for a message received event, listening for an error message received event, sending a message, and closing a connection.
4. A system for real-time triggering of multi-window messages is characterized by comprising a background server unit (20) and a client unit (21);
the background server unit (20) and the client unit (21) are in communication with each other;
the background server unit (20) is used for monitoring multi-window information which is sent by the client unit (21) and needs to be triggered by messages in real time, identifying, grouping and processing the monitored multi-window information to obtain a window component updating message, and sending the window component updating message to the client unit (21);
the client unit (21) receives a window component updating message, performs updating operation on a corresponding window component, and realizes real-time multi-window message triggering, the client unit (21) comprises a message triggering module (211) and a message receiving module (212), the message triggering module (211) establishes websocket long connection with a background server, and sends multi-window information needing message triggering to the background server unit (20) in real time; the message receiving module (212) receives the window component updating message sent by the background server unit (20) in real time, and sends the component id which needs to be subjected to data updating to the message triggering module (211) according to the window component updating message to perform the updating operation of the corresponding window component, so that the real-time multi-window message triggering is realized.
5. The system for multi-window message real-time triggering according to claim 4, wherein the backend server unit (20) includes a database (201) and a message monitoring module (202), and the database (201) is configured to store information sent by the message monitoring module (202) and a websocket object corresponding to a client unit, and update the stored information according to real-time information sent by the message monitoring module (202); the message monitoring module (202) is used for monitoring multi-window information which is sent by the client unit (21) and needs to be triggered by messages in real time.
6. The system for triggering messages in multiple windows in real time according to claim 5, wherein the background server unit (20) further includes a window grouping module (203), a window identification module (204), and a message processing module (205), and the window grouping module (203) is configured to receive the multiple window information that needs to be triggered by messages and is acquired by the message monitoring module (202), group windows according to the user roles to which the respective windows belong, and classify the windows corresponding to the same user role into the same window group; the window identification module (204) is used for identifying each window in the window group according to the interface name and the position of each window in the window group acquired by the window grouping module (203); the message processing module (205) is configured to obtain a trigger message according to the identification information and the grouping information, and send a trigger instruction containing a window component update message to the client unit (21) in real time according to the trigger message.
7. The system for triggering multi-window messages in real time as recited in claim 6, wherein the backend server unit (20) further comprises a window loading module (206), and the window loading module (206) is configured to load a multi-window interface to be displayed according to the trigger instruction obtained by the message processing module (205).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211381435.6A CN115567575B (en) | 2022-11-07 | 2022-11-07 | Method and system for triggering multi-window message in real time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211381435.6A CN115567575B (en) | 2022-11-07 | 2022-11-07 | Method and system for triggering multi-window message in real time |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115567575A CN115567575A (en) | 2023-01-03 |
CN115567575B true CN115567575B (en) | 2023-04-04 |
Family
ID=84768785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211381435.6A Active CN115567575B (en) | 2022-11-07 | 2022-11-07 | Method and system for triggering multi-window message in real time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115567575B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112600926A (en) * | 2020-12-16 | 2021-04-02 | 平安消费金融有限公司 | Message pushing method and device and computer readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105426370A (en) * | 2014-09-17 | 2016-03-23 | 姚林 | Method for simultaneous multi-screen browsing of website page in single browser |
CN108469972B (en) * | 2017-02-20 | 2021-09-24 | 阿里巴巴集团控股有限公司 | Method and device for supporting display of multiple windows in WEB page |
CN107943441A (en) * | 2017-11-17 | 2018-04-20 | 郑州云海信息技术有限公司 | A kind of multiwindow method of data synchronization and device |
CN108008929B (en) * | 2017-12-19 | 2021-07-27 | 重庆满惠网络科技有限公司 | Method and system for establishing split-screen PC (personal computer) webpage browser |
US10547466B2 (en) * | 2018-05-25 | 2020-01-28 | Slack Technologies, Inc. | Multiplexing message distribution within group-based communication system |
-
2022
- 2022-11-07 CN CN202211381435.6A patent/CN115567575B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112600926A (en) * | 2020-12-16 | 2021-04-02 | 平安消费金融有限公司 | Message pushing method and device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115567575A (en) | 2023-01-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9141509B2 (en) | Mobile device remote control session activity pattern recognition | |
CN109154890A (en) | Software renewing apparatus and software update system | |
CN108132850B (en) | Code positioning method and device and electronic equipment | |
CN106557402B (en) | Mobile terminal and exception information processing method | |
CN103731853B (en) | Cloud recognition methods, equipment and the system of double-card mobile communication device | |
CN102710736A (en) | Head-mounted display and client apparatus | |
CN107908487B (en) | Task control management method, device and equipment and computer readable storage medium | |
CN110493269A (en) | A kind of method of the long-range Docker container desktop of Web | |
CN110223088A (en) | A kind of method and device that method, the information of information distribution generate | |
CN103647685A (en) | Processing method for unloading and receiving test result information | |
CN111897502A (en) | Split screen control system and method | |
JP2023143944A (en) | Network system, monitoring system, work management system, and work management method | |
CN110912731A (en) | NFV-based system and method for realizing service identification and topology analysis by adopting DPI technology | |
US20140351408A1 (en) | Utilizing augmented reality for locating computer hardware associated to a reported incident | |
CN105357023A (en) | Rack diagram display method and apparatus | |
CN104427285B (en) | A kind of prompt message generation method and device | |
CN115567575B (en) | Method and system for triggering multi-window message in real time | |
CN104350522A (en) | Information processing device, information processing system, information processing method, and program | |
CN115951923B (en) | Subscription event management method, display system, device and storage medium | |
CN106941680B (en) | Base station monitoring method, terminal, VPN server and system | |
CN111262738A (en) | Terminal equipment information binding method and device, switch and storage medium | |
JP2018528744A (en) | Method and apparatus for retrieving data from a power distribution unit | |
CN107870947A (en) | Method and apparatus for updating web page contents | |
KR20120004679A (en) | System and method for tracking missed portable communication terminal | |
JP2002009868A (en) | Information transmission system, information managing device and setting information distribution method |
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 |