[go: up one dir, main page]

CN111211971A - A clustered instant messaging system supporting internet consultation service and its implementation method - Google Patents

A clustered instant messaging system supporting internet consultation service and its implementation method Download PDF

Info

Publication number
CN111211971A
CN111211971A CN202010004667.4A CN202010004667A CN111211971A CN 111211971 A CN111211971 A CN 111211971A CN 202010004667 A CN202010004667 A CN 202010004667A CN 111211971 A CN111211971 A CN 111211971A
Authority
CN
China
Prior art keywords
message
service
client
node
socketio
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
CN202010004667.4A
Other languages
Chinese (zh)
Other versions
CN111211971B (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.)
Xinnengkang Technology Co ltd
Yang Fan
Original Assignee
Xi'an Xinneng 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 Xi'an Xinneng Technology Co Ltd filed Critical Xi'an Xinneng Technology Co Ltd
Priority to CN202010004667.4A priority Critical patent/CN111211971B/en
Publication of CN111211971A publication Critical patent/CN111211971A/en
Application granted granted Critical
Publication of CN111211971B publication Critical patent/CN111211971B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0281Proxies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention belongs to the technical field of instant messaging, and relates to a cluster type instant message system supporting internet inquiry service and an implementation method thereof. Compared with the standard Jabber/XMPP architecture and protocol, the method has great advantages that firstly, the client is not limited by naming any more, and can be automatically and dynamically registered to any message service of the cluster, thereby greatly ensuring the high reliability of the instant message use of the client; secondly, compared with manual domain name configuration, the network connection number-based load balancing algorithm maximally utilizes the resources of each node in the cluster, has better dynamic flexibility, realizes larger-scale instant message throughput pressure, and finally adopts the mode of MQ message center broadcasting, thereby not only reducing the routing pressure of each message node, but also preventing the concurrent pressure of sudden and sudden rise of a certain message node due to the mode of MQ queue, and completely preventing the message node from crashing due to certain delay of queue processing when a sudden peak condition occurs.

Description

Cluster type instant message system supporting internet inquiry service and implementation method thereof
Technical Field
The invention belongs to the technical field of instant messaging, and particularly relates to a cluster type instant message system supporting internet inquiry service and an implementation method thereof.
Background
The instant messaging system is the basic requirement of internet medical service, doctors and patients, doctors and doctors need to pass through a message notification platform facing to internet medical service characteristics and instant messaging, so that the transmission of general information data such as characters, images and files is realized, and the integration and cooperation of third-party medical service systems such as EHR (health record), video exchange and online prescriptions can be realized. For example: the sender provides a patient health record number to the message service node, the message service node calls the EHR system, basic information of a patient in the health record database is extracted and packaged into a network-transferable data packet to the receiver, the receiver can conveniently and quickly look up the basic information of the patient in the data packet, the data packet is finally sent to the receiving end, the receiving end can achieve access penetrating query capability of the EHR system in a hospital according to data sources and certificate authorization in the data packet, and detailed health data retrieval capability of the patient is provided for a client of the receiver. The EHR system has a very tight business collaboration with the instant messaging system, as does video communication, online prescriptions, etc.
In order to meet large-scale and high-concurrency internet message transmission, most instant message products form a distributed network architecture on the basis of a standard internet TCP/IP network protocol, and a sender message is routed to a receiver message service node on the message service node through an application layer Socket communication protocol and finally reaches a target receiving end. For example: the Jabber/XMPP protocol and the framework are standardized by IETFXMPP protocol (RFC3290), namely a more typical standard instant message protocol conforming to the characteristics of a distributed framework, a user name is represented by a Jabber identifier (home @ example. com similar mail format), the former half part of the @ part of the user name is represented by a user name, the latter half part of the @ part of the user name is represented by a domain name of an XMPP protocol server, when a sender @ A.com user sends a message to a receiver @ B.com user, an A.com service node firstly receives an XML stream message sent by a sender, then the XML stream message is routed to a B.com service node through a gateway, and finally the B.com sends the received XML stream message to the receiver user to realize complete message routing transmission. In the whole process, the A.com and B.com service nodes respectively load huge user groups, so that a real distributed network architecture is realized, on one hand, the requirements of large scale and high concurrency are met based on a domain name grouping mode, and on the other hand, interconnection and intercommunication among different service nodes through a standard protocol are realized.
The message service oriented to the internet inquiry service not only needs to realize general information material transmission, but also needs to be tightly combined with a business system, such as: the system comprises an EHR (electronic health record system), a video chat system, a HIS (home information system) system and the like, so that the close combination degree of a message service node and a service system is far greater than that of a common instant message server, if the coupling degree of the message service and the service is too close, if the service system has unreliable factors, the communication fault of the message service node can be caused, and the reliability of the system is extremely high by the Internet medical inquiry service, so that the high reliability of the message service node is very critical to protect.
The instant message system based on the Jabber/XMPP protocol and the framework realizes the transmission of large-scale and high-concurrency instant messages among internet message service nodes in a domain name grouping mode through the convention of Jabber identifiers. However, although the engagement of Jabber identifier skillfully solves the expansion of the message service node, a new problem is brought about, namely that the client node must register on the message service node corresponding to the domain name according to the engaged Jabber identifier name. Once the communication of the message service node corresponding to the domain name is broken, there is no way to dynamically switch all the clients under the service node to other service nodes, unless the user name and the domain of the client are changed, which brings a very high switching cost in view of the universality of the internet users.
Secondly, the message transfer between the service nodes is in a routing mode, that is, the a.com service node is routed to the b.com service node in a TCP/IP connection establishment mode, so that (a) a client to a.com, (B) a.com to b.com, and (B) a TCP communication three-stage message communication chain from b.com to B client are formed, and the same principle can be obtained that the C client, the D client and the E client … … all perform message transfer with the service node in the routing mode and other service nodes. When A, C, D, E … … and other service nodes in the network transmit messages to the B service node at the same time, the B service node becomes a huge pressure point, and once the situation occurs, the B service node may slow or even break down due to the pressure, which may cause abnormal communication in the entire network. And the XMPP protocol transmits an XML stream data format, occupies large network bandwidth, is slow in DOM assembling and unpacking processing and also increases the pressure of service nodes.
Disclosure of Invention
The invention aims to provide a cluster-type instant message system supporting internet inquiry service and an implementation method thereof, so as to solve the problems in the prior art.
The realization process of the invention is as follows:
a method for supporting the implementation of clustered instant messages for Internet interrogation services, comprising:
the method comprises the steps that message node registration is carried out through a client, a temporary and dynamic token is generated through a registration request of a socketIO service node, and the validity of the token is controlled by a socketIO service end for the temporary token taken by the client;
when a sender sends a message to a socketIO service node through message node communication, the socketIO service node traverses the type of the message, establishes an observer mode, monitors an object through image-text messages, and realizes the butt joint with an image storage system; monitoring an object through a video message to realize the butt joint with a video service system; monitoring an object through health record information to realize the butt joint with the EHR system; monitoring an object through a prescription message to realize the object with an HIS system;
if the receiver finds out in the session, the message notification, the service interaction, the result encapsulation and the result message sending receiving end between the SocketIO service node and the service node are carried out.
The method for realizing the cluster instant message supporting the internet inquiry service comprises the following steps of registering message nodes through the client:
s10: initializing client registration, and sending a registration request to a registration request proxy service;
s20: a registration request proxy service receives a registration request of a client;
s21: the registration request proxy service distributes the new client to the socketIO service nodes in a balanced manner;
s30: the socketIO service node performs session registration;
s31: if the registration fails, returning to the step S20 to register the request proxy service, and the registration request proxy will return the error to the client;
s32: if the registration is successful, the socket IO service node creates an identity token for the client and finally responds to the client through an HTTP (hyper text transport protocol);
s40: and the client acquires the token with successful registration and finishes the registration.
The method for realizing the cluster-type instant message supporting the internet inquiry service specifically comprises the following steps of registering message nodes through the client:
s10: client registration initialization
The client needs to register and initialize the service node for instant message communication; in the process of registration initialization, a client establishes connection resources with a socket IO service node by sending a registration request to a registration agent service through a Websocket protocol over an HTTP protocol;
s20: the registration request proxy service receives a registration request of a client and performs dynamic socket IO allocation;
the proxy service is composed of a reverse proxy server based on an HTTP protocol, wherein the Nginx service can be effectively used as a high-performance reverse proxy service, through the two-stage registration mode, a first-stage proxy is used as a client request inlet to realize the dispatching of a socketIO cluster, and the socketIO cluster is used as a second-stage cluster to provide loads of hundreds of registration service sub-nodes;
s21: the process of the Nginx service acting is in a load balancing distribution mode, the load balancing algorithm is used for balancing load according to the minimum connection number algorithm provided by the Nginx service, and new client connection is preferentially registered for the SocketIO service node with the minimum connection number;
s30: the socket IO service node provides data communication between TCP/IP long connections on the basis of a Netty-socket IO open source component;
a session registration step of the socketIO service node: (a) the method comprises the following steps that (a) a socketIO service node obtains a client registration request sent by a registration agent node, (b) the socketIO performs database identity authentication on an identity certificate of the service node, and the identity authentication data is cached in a Redis memory database;
s31: if the registration fails and returns to the step S20, the registration request agent will return the error to the client;
s32: if the registration is successful, the socketIO service node creates an identity token for the client as an identity authorization certificate of the next access, and finally responds to the client through the HTTP;
s40: after the client acquires the token message which is successfully registered, the token is stored in a local temporary database of the client, and when the message is sent next time, the token and the message are sent together.
In the method for implementing the cluster-type instant message supporting the internet inquiry service, in step S40, the token has an expiration time, and if the token exceeds the expiration time, the client needs to re-register for application.
The method for realizing the cluster instant message supporting the internet inquiry service comprises the following steps in the message sending process:
100, the client serves as a sending end and starts to send the serial number of the health file;
200, the socketIO registration node acquires a message sent by a client;
201, inquiring the serial number of the EHR system of the hospital according to the serial number of the health file acquired by the 200socketIO registration node;
202, carrying out data encapsulation on patient index information in the health record and information required by hospital EHR transparent transmission;
the socket IO service node performs sending preparation after completing encapsulation of the health archive data, and confirms whether a receiver client exists in a registration list of the socket IO service node or not;
204, if the registration list of the socketIO service node is confirmed to have a receiver client, directly transmitting the encapsulated health file data to the receiver client;
300: the receiving party client receives the health file data, analyzes the health file data and links the health file data to 700, wherein the receiving party client inquires detailed information by an EHR system in a system to which the receiving party client belongs and returns the detailed information to the receiving party client for detailed display;
if the receiving party client side does not exist in the registration list of the socketIO service node, the socketIO needs to inform the MQ message service center, the socketIO service node acquires an MQ message service center client side object from the local, and pushes the Json data of the encapsulated health file to the MQ message service center through the MQ message service center object until the completion;
400, after data pushing is completed to the MQ message service center, the MQ message service receives the health archive data of the client of the sending party pushed by the SocketIO and adds the health archive data into a channel queue, and the MQ message service center broadcasts the health archive messages to all SocketIO message service nodes subscribed in the message service center;
500, each socket IO message node subscribing the health file channel of the MQ message service center acquires the message pushed by the MQ message service center in a polling way in time and confirms whether a receiver client exists in a registration list of the socket IO service node;
if the session list of the socketIO service node does not have the receiving client, directly discarding the message;
if the session list of the socketIO service node exists in the receiver client, taking out the session connection of the receiver client from the registration list, and directly transmitting the encapsulated health record data to the receiver client until the completion;
and 600, after the health file data transmission is completed to the receiver client, the receiver doctor client acquires the patient health file data transmitted by the sender, the receiver analyzes the health file data, and the health file data is linked to 700. the receiver belongs to a system, inquires detailed information by an EHR system and returns the detailed information to the receiver client for detail display.
In the method for implementing the cluster-type instant message supporting the internet inquiry service, in step 400, each SocketIO message node subscribing to the channel pushes the health archive data of the polling MQ message service center until the pushing is completed.
The above-mentioned method for implementing the cluster instant message supporting the internet inquiry service,
(a) the client sends a request message to the socketIO service node, wherein the request message comprises the type of the message;
(b) the socketIO service node performs message traversal from a monitoring object list, wherein the monitoring object comprises: image message monitoring, video chat message monitoring, health archive message monitoring and prescription message monitoring, wherein if the message type is matched with the monitor, the SocketIO service node implements thread asynchronization on the matched monitor, so that the main service is ensured to continuously process other message requests and is not blocked by the interaction between the monitor and an external service or system, and the main message processing and the service processing are thoroughly decoupled;
(c) the image message monitoring and the image storage service form interaction, mainly uploads an image to the image storage service, and acquires a download address of a packaged image; the video chat message monitoring and the video chat service form interaction, mainly carry out notification, connection establishment and message communication of point-to-point video chat destruction, and encapsulate video session state data; the health archive message monitoring is interacted with a health archive system, and the health archive index data and the transparent transmission source information are inquired and encapsulated according to the patient number; monitoring prescription information, interacting with a hospital HIS system, and inquiring and acquiring prescription data according to a prescription number; the encapsulated business message data is added into an encapsulated data queue event asynchronously processed by a main message service thread and is delivered to the main message service for dequeue processing of the encapsulated data; forming a main message package and a service data package which are completely decoupled;
(d) if the socketIO service node finds the session of the receiver at the service node, the result message is directly sent to the client of the receiver, if the result message is not found, the request message is directly pushed to an MQ message forwarding center without any processing, all message service node clusters subscribing the channel are broadcasted, the broadcast service node of the session of the receiver is found, the message event notification and the message result encapsulation are also carried out, the result message is also directly sent to the client of the receiver, the request message is directly abandoned if the broadcast service node is not found, and the communication and the message routing among all nodes of the clusters are thoroughly decoupled through an MQ broadcast mode.
A cluster instant message system supporting Internet inquiry service comprises a message node registration module, a message node communication module and a message node service integration module;
the message node registration module consists of a node agent service module and a client authorization module;
the message node communication module consists of a node communication module and a session management module;
the message node service integration module is composed of a service adaptation module and a service cooperation module.
Further, the node proxy service module is composed of a balance distribution module and a node management module; the client authorization module consists of a client token module and a client authentication module;
the node communication module consists of a message engine module and an MQ message center module; the session management module consists of a client joining module and a client quitting module;
the service adaptation module consists of a third party integration module and a message registration monitoring module; the service coordination module is composed of a message event notification module and a service calling encapsulation module.
Further, the balanced distribution module adopts a minimum network connection algorithm for distribution; the node management module comprises an adding dynamic detection module and a downtime dynamic detection module;
the message engine module comprises a message receiving module, a message sending module and a message filtering module; the MQ message center module comprises a message subscription module, a message pushing module and a message broadcasting module;
the third-party integration module comprises a video call service module, an image storage service module, a health file system and an HIS (home information system) system.
The key points of the invention are as follows:
the Jabber/XMPP protocol requires that the client de-couples the naming convention, that is, the naming of the client account is specified, especially the user name and the domain name are bound, which results in the locking of the client to the domain name. In the invention, a temporary and dynamic token is generated through the registration request of the socketIO service node, so that the user name and the instant message client mark are separated, and the user name is defined by a service system and is not restricted by an instant message system.
The temporary token taken by the client is also stored in the registration session list of the socketIO, and the validity of the token can be controlled by the socketIO server side through the validity of the fast matching token in the Hash set when each request is required, so that the safety of the whole access is improved.
According to the dynamic load of Nginx and the minimum connection number balancing algorithm, the registration agent enables the registration client to be automatically and uniformly distributed to each socket IO service node by the registration center, so that the resource cannot achieve optimal configuration better than that a Jabber framework needs the client to manually specify and register to the message service. Meanwhile, the client can form a dynamic reconnection mechanism, and even if the client is connected to the socketIO message service and goes down, the client can automatically reselect a new socketIO service node.
When a sender sends a message to a socketIO service node, the sender traverses the type of the message, judges the message to belong to image-text messages, video messages, health archive messages, prescription messages and the like, establishes an observer mode aiming at different message similarities, monitors an object through the image-text messages and realizes the butt joint with an image storage system; monitoring an object through a video message to realize the butt joint with a video service system; monitoring an object through health record information to realize the butt joint with the EHR system; and monitoring the object through the prescription message to realize the object with the HIS system. Therefore, the strong invasion service requirement for medical inquiry can completely decouple the message processing mechanism of the socketIO service node and the interaction of service systems such as medical inquiry and the like through the event monitoring mechanism of the traversal message type.
The receiver does not exist in the sender socketIO message node session, broadcasts in a socketIO message node cluster in the form of MQ message center broadcast, discards the message as long as the receiver does not exist in the session, and performs message notification, service interaction, result encapsulation and result message sending receiving end between the socketIO service node and the service node once found in the session, so that communication and message routing among all nodes of the cluster can be thoroughly decoupled.
The invention has the following positive effects:
compared with the standard Jabber/XMPP architecture and protocol, the cluster instant message system and the method for the internet inquiry service have great advantages, firstly, the client is not limited by naming any more, and can be automatically and dynamically registered to any message service of the cluster, thereby greatly ensuring the high reliability of the instant message use of the client; secondly, compared with manual domain name configuration, the network connection number-based load balancing algorithm maximally utilizes the resources of each node in the cluster, has better dynamic flexibility, realizes larger-scale instant message throughput pressure, and finally adopts the mode of MQ message center broadcasting, thereby not only reducing the routing pressure of each message node, but also preventing the concurrent pressure of sudden and sudden rise of a certain message node due to the mode of MQ queue, and completely preventing the message node from crashing due to certain delay of queue processing when a sudden peak condition occurs.
The client side is registered and decoupled, and the client side is completely decoupled on which message node of the cluster the client side is registered through a balanced load mechanism of a registration agent, so that the client side can more simply and dynamically register, switch and destroy the connection with the message cluster, and the high reliability and experience of the client side are enhanced; secondly, medical service decoupling, namely, completely decoupling the main message processing of the message node from service interaction through an asynchronous event monitoring mechanism and the service interaction, so that the robustness and robustness of the main message service are enhanced, and tightly coupling the message model and the service model can not be generated through the complete decoupling of the main message packaging and the service interaction data packaging, so that not only is the reliability of the service enhanced, but also more service interaction mechanisms can be more easily added on the basis of the message service, and an instant message infrastructure platform more conforming to the requirements of the medical service is created; finally, the route decoupling between the message services is realized through the support of the MQ message center on the pushing, subscribing and broadcasting of the message services, the message services can be added and destroyed more easily without knowing the states of other cluster nodes, and the flexibility of the clusters are greatly enhanced.
Drawings
FIG. 1 is a flow chart of a client registering an instant messaging service node according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating the transmission of a health profile message according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of service decoupling in an embodiment of the present invention;
fig. 4 is a block diagram of a clustered instant messaging system supporting an internet interrogation service in accordance with the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
Fig. 1 is a flow chart of client registering an instant messaging service node. The method comprises the following steps:
s10: client registration initialization
The client needs to perform instant messaging, and registration initialization of the service node is required first.
In the process, a client establishes a connection resource with a socket IO service node by sending a registration request to a registration agent service through a Websocket protocol over an HTTP protocol.
The socketIO service node establishes message communication interaction with other clients for the client, so that in the initialization process, one socketIO service node needs to be dynamically searched by an agent for registration.
S20: and the registration request agent receives the registration request of the client and performs dynamic socket IO allocation.
The proxy service is composed of a reverse proxy server based on the HTTP protocol, for example: the Nginx service can be effectively used as a high-performance reverse proxy service, and through the two-stage registration mode, the purpose that a first-stage proxy is used as a client request inlet is achieved, the dispatching of a socketIO cluster is achieved, and the socketIO cluster is used as a second-stage cluster and provides loads of hundreds of registration service sub-nodes.
For example: in the case of a server configuration with a stand-alone 8-core 64GB, a Nginx proxy can carry an average stand-alone hundred thousand connections and load to 10 SocketIO service nodes, which is equivalent to a message activity of providing a long-time registered active connection of 100 thousand users.
S21: the process of the Nginx agent acting is in a load balancing distribution mode, the load balancing algorithm is used for balancing load according to the minimum connection number algorithm provided by the Nginx, and new client connection is preferentially registered for the SocketIO service node with the minimum connection number.
S30: the socket IO service node is based on a Netty-socket IO open source component and provides data communication between TCP/IP long connections with high performance and end-to-end.
A registration step: (a) the SocketIO service node obtains a client registration request sent by a registration agent node, and (b) the SocketIO performs database identity authentication (generally cached in a Redis memory database) on an identity certificate of the service node.
S31 if the registration fails and returns to the proxy of the registration request, the proxy will return an error to the client.
And S32, if the registration is successful, the Socket service node creates an identity token for the client as an identity authorization certificate for the next access, and finally responds to the client through HTTP.
S40, after obtaining the token message which is registered successfully, the client stores the token in the local temporary database of the client, and when the message is sent next time, the client sends the token and the message together;
in addition, the token also has expiration time, and if the token exceeds the expiration time, the client needs to re-register for application.
FIG. 2 is a messaging flow diagram illustrating the transmission of a health profile message. The flow chart is the most important technical flow description in the patent.
And 100, the client serves as a sending end and starts the serial number sending of the health file.
For example: in the process of instant message communication between doctors and doctors, when one doctor needs to initiate patient condition consultation to the doctor of the other doctor, the doctor needs to share the patient information of the doctor to the other doctor, and the instant message transmission is the simplest and convenient method.
Step (a) a consulting doctor finds a patient by a client application system, (b) the consulting doctor selects the patient to click and send to a chat window of an opposite doctor, and the system can acquire a system number of the patient according to the selected patient in the process; (c) the system number, the registration token, the message type, the sender number and the receiver number are packaged into a message body, the Json format is used as a medium format for internet transmission, and the message body is sent to the socketIO registration node in an http request form.
200, the socketIO registration node acquires and processes the message sent by the consulting doctor client.
The method comprises the following steps: firstly, extracting a registration token from Json data of a client, performing identity authentication, performing next processing after determining that no error exists, extracting the serial number of a doctor of a sender from the Json data sent by the client, and determining a hospital to which the doctor belongs from a database;
firstly 201, extracting a patient number from Json data sent by a client, and acquiring patient health record index data of an EHR system of a hospital according to the patient number and a hospital to which a doctor belongs, wherein the index data comprises basic information capable of describing and clearly showing the whole outline of a patient, such as patient name, sex, an identity card, a last visit record, a common disease mark and the like;
secondly, 202, Json data encapsulation is carried out on the patient index information and the information required by the hospital EHR transparent transmission to form the information package of the patient basic information and the source;
and 203, the socketIO service node performs sending preparation after packaging the health archive data, extracts the number of the receiver from Json data sent by the client, searches and matches the client of the sending end in a session list of the socketIO service node, and confirms whether the client of the receiver exists in a registration list of the socketIO service node.
And 204, if a receiver client is confirmed in the registration list of the socketIO service node, taking out the session connection of the receiver client from the registration list, and directly transmitting the Json data of the encapsulated health record to the receiver client through a socketIO connection object until the completion.
And finally, if the client does not exist in the registration list of the socketIO service node, the socketIO needs to notify the MQ message service center, and the socketIO service node acquires the MQ message service center client object from the local and pushes the Json data of the encapsulated health record to the MQ message service center through the MQ message service center object until the completion.
300: after the health record data transmission is completed from the upper 204 to the receiver client, the receiver doctor client acquires the patient health record data transmitted from the sender, the receiver analyzes the health record Json data, firstly, the most basic personal basic situation and health information of the patient can be seen on the display of the client system, if the personal health situation of the patient needs to be further mastered, a data source including a plurality of lists of EHR transparent transmission information such as the address of the EHR system of the hospital to which the receiver belongs, the access certificate of the EHR system and the like needs to be analyzed from the health record Json data in a link mode, the data source is linked to the system of the hospital to which the receiver belongs through the transparent transmission access mode, the EHR system inquires the detailed health data of the patient, and the detailed health data are returned to the receiver client for detailed display.
400, after the data pushing is completed to the MQ message service center by the upper 205, the MQ message service receives the health file data of the sending party client terminal pushed by the socketIO and adds the health file data into the channel queue. The MQ message service center does not participate in the routing forwarding work of business logic, and indiscriminately broadcasts the health record messages to all the socket IO message service nodes (except for the push nodes) subscribed in the message service center. And each socket IO message node subscribing the channel pushes the health file data of the polling receiving MQ message service center until the pushing is completed.
500, each socketIO message node subscribing the health file channel of the MQ message service center acquires the message pushed by the MQ message service center in a polling way in time.
The method comprises the following steps: firstly, extracting the number of a receiving end of Json data of the health archive message, and determining whether a receiving end client exists in a registration list of the socketIO service node.
Secondly 501, if the receiving client does not exist in the session list of the socketIO service node, the message is directly discarded.
Finally 502, if the session list of the socketIO service node exists in the receiving client, taking out the session connection of the receiving client from the registration list, connecting the Json data of the encapsulated health file with an object through the socketIO service node, and directly transmitting the data to the receiving client until the completion;
600, after the health record data transmission is completed from the upper 502 to the receiver client, the receiver doctor client acquires the patient health record data transmitted from the sender, the receiver analyzes the health record Json data, firstly, the most basic personal basic situation and health information of the patient can be seen on the display of the client system, if the personal health situation of the patient needs to be further mastered, a data source including a certain series of EHR transparent transmission information such as the address of the EHR system of the hospital to which the receiver belongs, the access certificate of the EHR system and the like needs to be analyzed from the health record Json data in a link mode, the data source is linked to the system of the hospital to which the receiver belongs in a transparent transmission access mode, the EHR system inquires the detailed health data of the patient, and the detailed health data are returned to the receiver client for detailed display.
The message and traffic decoupling step is shown in fig. 3:
(a) a client (socketIO client) sends a request message to a socketIO service node (socketIOSever), wherein the request message comprises the type of the message;
(b) the socket ioserver performs message traversal from the listening object list, including: the method comprises the steps that PictureListener (image message monitoring), VideoChatListener (video chat message monitoring), EHR Listener (health archive message monitoring) and HISListener (prescription message monitoring), if the message type is matched with the monitor, the SocketIOServer implements thread asynchronization on the matched monitor, ensures that the main service continues to process other message requests and cannot be blocked by the interaction between the monitor and an external service or system, and realizes the complete decoupling of main message processing and service processing;
(c) the PictureListener and the ImagestorageServer form interaction, mainly upload images to the image storage service, and acquire a download address of the packaged images; the VideoChatListener and the VideoChatServer (video chat service) form interaction, mainly carry out point-to-point video chat message communication such as notification, connection establishment, destruction and the like, and encapsulate video session state data; the EHR Listener interacts with an EHR System (health record System), and inquires and packages health record index data and unvarnished transmission source information according to the patient number; the HISListener interacts with the HISSystem to query and obtain prescription data based on the prescription number. The encapsulated business message data is added into an encapsulated data queue event asynchronously processed by a main message service thread and is delivered to the main message service for dequeue processing of the encapsulated data; the primary message encapsulation is formed to be completely decoupled from the service data encapsulation.
(d) If the socketIOServer finds the session of the receiver in the service node, the result message is directly sent to the socketIOclient (the receiver), if the result message is not found, the request message is directly pushed to an MQ message forwarding center without any processing, all the server IOServer clusters subscribing the channel are broadcasted, the broadcast service node of the session of the receiver is found, the message event notification and the message result encapsulation are also carried out, the result message is also directly sent to the socketIOclient, and the request message is directly discarded if the result message is not found. And communication among all nodes of the cluster is completely decoupled from message routing through an MQ broadcast mode.
(2) Key point of the invention
The Jabber/XMPP protocol requires that the client de-couples the naming convention, that is, the naming of the client account is specified, especially the user name and the domain name are bound, which results in the locking of the client to the domain name. In the invention, a temporary and dynamic token is generated through the registration request of the socketIO service node, so that the user name and the instant message client mark are separated, and the user name is defined by a service system and is not restricted by an instant message system.
The temporary token taken by the client is also stored in the registration session list of the socketIO, and the validity of the token can be controlled by the socketIO server side through the validity of the fast matching token in the Hash set when each request is required, so that the safety of the whole access is improved.
According to the dynamic load of Nginx and the minimum connection number balancing algorithm, the registration agent enables the registration client to be automatically and uniformly distributed to each socket IO service node by the registration center, so that the resource cannot achieve optimal configuration better than that a Jabber framework needs the client to manually specify and register to the message service. Meanwhile, the client can form a dynamic reconnection mechanism, and even if the client is connected to the socketIO message service and goes down, the client can automatically reselect a new socketIO service node.
When a sender sends a message to a socketIO service node, the sender traverses the type of the message, judges the message to belong to image-text messages, video messages, health archive messages, prescription messages and the like, establishes an observer mode aiming at different message similarities, monitors an object through the image-text messages and realizes the butt joint with an image storage system; monitoring an object through a video message to realize the butt joint with a video service system; monitoring an object through health record information to realize the butt joint with the EHR system; and monitoring the object through the prescription message to realize the object with the HIS system. Therefore, the strong invasion service requirement for medical inquiry can completely decouple the message processing mechanism of the socketIO service node and the interaction of service systems such as medical inquiry and the like through the event monitoring mechanism of the traversal message type.
The receiver does not exist in the sender socketIO message node session, broadcasts in a socketIO message node cluster in the form of MQ message center broadcast, discards the message as long as the receiver does not exist in the session, and performs message notification, service interaction, result encapsulation and result message sending receiving end between the socketIO service node and the service node once found in the session, so that communication and message routing among all nodes of the cluster can be thoroughly decoupled.
Example 2
The cluster-type instant message system supporting the internet inquiry service in this embodiment is shown in fig. 4 and includes a message node registration module, a message node communication module, and a message node service integration module; the message node registration module consists of a node agent service module and a client authorization module; the message node communication module consists of a node communication module and a session management module; the message node service integration module is composed of a service adaptation module and a service cooperation module.
Further, the node proxy service module is composed of a balance distribution module and a node management module; the client authorization module consists of a client token module and a client authentication module;
the node communication module consists of a message engine module and an MQ message center module; the session management module consists of a client joining module and a client quitting module;
the service adaptation module consists of a third party integration module and a message registration monitoring module; the service coordination module is composed of a message event notification module and a service calling encapsulation module.
Further, the balanced distribution module adopts a minimum network connection algorithm for distribution; the node management module comprises an adding dynamic detection module and a downtime dynamic detection module;
the message engine module comprises a message receiving module, a message sending module and a message filtering module; the MQ message center module comprises a message subscription module, a message pushing module and a message broadcasting module;
the third-party integration module comprises a video call service module, an image storage service module, a health file system and an HIS (home information system) system.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. 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 (10)

1.一种支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于,包括:1. a kind of method that supports the cluster type instant message realization of Internet consultation service, is characterized in that, comprises: 通过客户端进行消息节点注册,通过SocketIO服务节点的注册请求,生成临时的、动态的令牌,由SocketIO服务端对客户端拿到的临时令牌进行令牌有效性的控制;The message node is registered through the client, and a temporary and dynamic token is generated through the registration request of the SocketIO service node, and the SocketIO server controls the token validity of the temporary token obtained by the client; 发送方通过消息节点通讯将消息发送到SocketIO服务节点时,SocketIO服务节点会对消息的类型进行遍历,建立观察者模式,通过图文消息监听对象,实现与图像存储系统的对接;通过视频消息监听对象,实现与视频服务系统的对接;通过健康档案消息监听对象,实现与EHR系统对接;通过处方消息监听对象,实现与HIS系统对象;When the sender sends a message to the SocketIO service node through message node communication, the SocketIO service node traverses the type of the message, establishes an observer mode, and monitors objects through graphic messages to realize the connection with the image storage system; monitor through video messages object, realize the connection with the video service system; realize the connection with the EHR system through the health file message monitoring object; realize the HIS system object through the prescription message monitoring object; 接收方不在发送方SocketIO消息节点会话内,将在SocketIO消息节点集群广播,如果接收方不在自己的会话内就丢弃,如果接收方在会话内找到就进行SocketIO服务节点与业务节点之间的消息通知、业务交互、结果封装及结果消息发送接收端。If the receiver is not in the session of the sender's SocketIO message node, it will be broadcast in the SocketIO message node cluster. If the receiver is not in its own session, it will be discarded. If the receiver is found in the session, the message notification between the SocketIO service node and the business node will be carried out. , business interaction, result encapsulation, and result message sending and receiving end. 2.根据权利要求1所述支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于,所述通过客户端进行消息节点注册的包括如下步骤:2. The method for implementing a clustered instant message supporting Internet consultation service according to claim 1, wherein the registering of the message node by the client comprises the following steps: S10:客户端注册初始化,向注册请求代理服务发送注册请求;S10: Client registration is initialized, and a registration request is sent to the registration request proxy service; S20:注册请求代理服务接收客户端的注册请求;S20: The registration request proxy service receives the registration request of the client; S21:注册请求代理服务将新的客户端均衡分配到SocketIO服务节点;S21: The registration request proxy service distributes the new client to the SocketIO service node in a balanced manner; S30:SocketIO服务节点进行会话注册;S30: SocketIO service node performs session registration; S31:若注册失败,返回步骤S20注册请求代理服务,注册请求代理会将错误原路返回给客户端;S31: If the registration fails, go back to step S20 to register the request proxy service, and the registration request proxy will return the original error path to the client; S32:若注册成功,SocketIO服务节点为客户端创建身份令牌,并通过HTTP协议最终回应给客户端;S32: If the registration is successful, the SocketIO service node creates an identity token for the client, and finally responds to the client through the HTTP protocol; S40:客户端获取到注册成功的令牌,注册完成。S40: The client obtains a successful registration token, and the registration is completed. 3.根据权利要求2所述支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于,所述通过客户端进行消息节点注册的具体包括如下步骤:3. The method for implementing a clustered instant message supporting Internet consultation service according to claim 2, wherein the step of registering a message node by the client specifically comprises the following steps: S10:客户端注册初始化S10: Client registration initialization 客户端要进行即时消息通讯,需要进行服务节点的注册初始化;注册初始化的流程中客户端通过HTTP协议之上的WebSocket协议,通过向注册代理服务发送注册请求,建立与SocketIO服务节点的连接资源;The client needs to register and initialize the service node for instant message communication; in the process of registration initialization, the client sends a registration request to the registration proxy service through the WebSocket protocol over the HTTP protocol to establish a connection resource with the SocketIO service node; S20:注册请求代理服务接收客户端的注册请求,并且进行SocketIO动态分配;S20: The registration request proxy service receives the registration request from the client and performs dynamic allocation of SocketIO; 代理服务是一个基于HTTP协议的反向代理服务器组成,其中,Nginx服务可以有效的作为高性能反向代理服务,通过这种两级注册模式,实现一级代理作为客户端请求入口,实现SocketIO集群的调度,SocketIO做为二级集群,提供数百台注册服务子节点的负载;The proxy service is composed of a reverse proxy server based on the HTTP protocol. Among them, the Nginx service can effectively serve as a high-performance reverse proxy service. Through this two-level registration mode, the first-level proxy can be used as the client request entry, and the SocketIO cluster can be realized. SocketIO, as a secondary cluster, provides the load of hundreds of registered service sub-nodes; S21:Nginx服务进行代理的过程是通过负载均衡的分配方式,负载均衡算法是根据Nginx服务提供的最少连接数算法进行均衡负载,优先给连接数最少的SocketIO服务节点注册新的客户端连接;S21: The process of proxying the Nginx service is through the distribution method of load balancing. The load balancing algorithm is to balance the load according to the algorithm of the least number of connections provided by the Nginx service, and give priority to registering new client connections to the SocketIO service node with the least number of connections; S30:SocketIO服务节点是以Netty-SocketIO开源组件为基础,提供了TCP/IP长连接之间的数据通讯;S30: The SocketIO service node is based on the Netty-SocketIO open source component, which provides data communication between TCP/IP long connections; SocketIO服务节点会话注册步骤:(a)SocketIO服务节点获取注册代理节点发来的客户端注册请求,(b)SocketIO对服务节点的身份证书进行数据库身份鉴权,所述身份鉴权数据会缓存在Redis内存数据库中;SocketIO service node session registration steps: (a) SocketIO service node obtains the client registration request sent by the registration agent node, (b) SocketIO performs database identity authentication on the service node's identity certificate, and the identity authentication data will be cached in the Redis in-memory database; S31:若注册失败返回步骤S20注册请求代理服务,注册请求代理会将错误原路返回给客户端;S31: If the registration fails, return to step S20 to register the request proxy service, and the registration request proxy will return the original error path to the client; S32:若注册成功,SocketIO服务节点为客户端创建身份令牌,作为下次访问的身份授权证书,通过HTTP协议最终回应给客户端;S32: If the registration is successful, the SocketIO service node creates an identity token for the client, which is used as the identity authorization certificate for the next visit, and finally responds to the client through the HTTP protocol; S40:客户端获取到注册成功的令牌消息后,将令牌保存在自己的本地临时数据库中,当下次进行消息发送的时候,会将令牌和消息一并发送。S40: After obtaining the token message of successful registration, the client saves the token in its own local temporary database, and sends the token and the message together when sending a message next time. 4.根据权利要求2或3所述支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于:步骤S40中,所述令牌有过期时间,若令牌超过过期时间后,客户端需要重新注册申请。4. The method for realizing the clustered instant message supporting Internet consultation service according to claim 2 or 3, wherein in step S40, the token has an expiration time, and if the token exceeds the expiration time, the client A re-registration application is required. 5.根据权利要求1所述支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于,消息发送过程中,包括如下步骤:5. The method for realizing the clustered instant message of supporting Internet consultation service according to claim 1, is characterized in that, in the message sending process, comprises the following steps: 100:客户端作为发送端,开始健康档案的编号发送;100: The client, as the sender, starts sending the number of the health file; 200:SocketIO注册节点获取到客户端发来的消息;200: The SocketIO registration node obtains the message sent by the client; 201:根据200SocketIO注册节点获取的健康档案编号进行医院EHR系统编号查询;201: query the hospital EHR system number according to the health file number obtained by the 200SocketIO registration node; 202:对健康档案中患者索引信息、医院EHR透传所需信息进行数据封装;202: Data encapsulation of patient index information in health files and information required for hospital EHR transparent transmission; 203:SocketIO服务节点完成对健康档案数据的封装后进行发送准备,并确认在本SocketIO服务节点的注册列表中是否存在接收方客户端;203: The SocketIO service node completes the encapsulation of the health file data and prepares for sending, and confirms whether there is a recipient client in the registration list of the SocketIO service node; 204:如果确认本SocketIO服务节点的注册列表中有接收方客户端,则将封装后的健康档案数据向接收方客户端直接进行数据传输;204: If it is confirmed that there is a recipient client in the registration list of this SocketIO service node, the encapsulated health file data is directly transmitted to the recipient client; 300:接收方客户端接收到健康档案数据,并对健康档案数据进行解析,链接到700:接收方客户端所属的系统中,由EHR系统查询详细信息,并返回给接收方客户端进行详情展示;300: The recipient client receives the health file data, parses the health file data, and links to the system to which the recipient client belongs. 700: The EHR system queries the detailed information and returns it to the recipient client for detailed display. ; 205:如果确认本SocketIO服务节点的注册列表中没有接收方客户端,则SocketIO需要进行MQ消息服务中心的通知,SocketIO服务节点从本地获取MQ消息服务中心客户端对象,并将封装好的健康档案Json数据通过MQ消息服务中心对象,向MQ消息服务中心进行数据推送,直到完成;205: If it is confirmed that there is no receiver client in the registration list of this SocketIO service node, SocketIO needs to notify the MQ message service center, and the SocketIO service node obtains the MQ message service center client object from the local, and will encapsulate the health file. Json data pushes data to the MQ message service center through the MQ message service center object until it is completed; 400:向MQ消息服务中心进行数据推送完成后,MQ消息服务接收到SocketIO推送来的发送方客户端健康档案数据,并加入到通道队列中,MQ消息服务中心对订阅在该消息服务中心的所有SocketIO消息服务节点,进行健康档案消息广播;400: After the data push to the MQ message service center is completed, the MQ message service receives the sender client health file data pushed by SocketIO and adds it to the channel queue. The MQ message service center will subscribe to the message service center. SocketIO message service node to broadcast health file messages; 500:每个订阅MQ消息服务中心健康档案通道的SocketIO消息节点,都将及时获取到MQ消息服务中心轮询推送来的消息,确认正处于本SocketIO服务节点的注册列表中是否有接收方客户端;500: Each SocketIO message node that subscribes to the health file channel of the MQ message service center will obtain the messages polled and pushed by the MQ message service center in time to confirm whether there is a receiver client in the registration list of the SocketIO service node ; 501:若SocketIO服务节点的会话列表不存在该接收方客户端,则直接对消息丢弃;501: If the recipient client does not exist in the session list of the SocketIO service node, the message is directly discarded; 502:若SocketIO服务节点的会话列表存在该接收方客户端,则从注册列表中取出接收方客户端的会话连接,并将封装好的健康档案数据向接收方客户端直接进行数据传输直到完成;502: if the session list of the SocketIO service node has the receiver client, then take out the session connection of the receiver client from the registration list, and directly perform data transmission to the receiver client with the encapsulated health file data until completion; 600:向接收方客户端完成健康档案数据传输后,接收方医生客户端就获取到了发送方传来的患者健康档案数据,接收方对健康档案数据进行解析,链接到700:接收方所属的系统中,由EHR系统查询详细信息,并返回给接收方客户端进行详情展示。600: After completing the transmission of the health file data to the recipient client, the recipient doctor client obtains the patient health file data from the sender, the recipient parses the health file data, and links to 700: The system to which the recipient belongs , the detailed information is queried by the EHR system and returned to the receiving client for detailed display. 6.根据权利要求5所述支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于:步骤400中,每一个订阅该通道的SocketIO消息节点都将轮询接收MQ消息服务中心的健康档案数据推送,直到推送完成。6. the method for realizing the clustered instant message of supporting Internet consultation service according to claim 5, is characterized in that: in step 400, each SocketIO message node that subscribes to this channel will poll the health of receiving MQ message service center Archive data is pushed until the push is complete. 7.根据权利要求1所述支撑互联网问诊服务的集群式即时消息实现的方法,其特征在于:7. the method for realizing the clustered instant message of supporting Internet consultation service according to claim 1, is characterized in that: (a)客户端向SocketIO服务节点发送请求消息,请求消息中包括了消息的类型;(a) The client sends a request message to the SocketIO service node, and the request message includes the type of the message; (b)SocketIO服务节点从监听对象列表中进行消息遍历,监听对象包括:图像消息监听、视频聊天消息监听、健康档案消息监听、处方消息监听,若该消息类型匹配该监听器,则SocketIO服务节点对匹配的监听器实施线程异步,保证主服务继续处理其他消息请求,不会被监听器与外部服务或系统的交互中所阻塞,实现主消息处理与业务处理的彻底解耦;(b) The SocketIO service node performs message traversal from the list of listening objects. The monitoring objects include: image message monitoring, video chat message monitoring, health file message monitoring, and prescription message monitoring. If the message type matches the listener, the SocketIO service node Implement thread asynchrony to the matching listener to ensure that the main service continues to process other message requests, and will not be blocked by the interaction between the listener and external services or systems, and realize the complete decoupling of main message processing and business processing; (c)图像消息监听与图像存储服务形成交互,主要上传图像到图像存储服务,并获取封装图像下载地址;视频聊天消息监听与视频聊天服务形成交互,主要进行通知、建立连接、销毁中点对点的视频聊天的消息通讯,并封装视频会话状态数据;健康档案消息监听与健康档案系统交互,根据患者编号查询并封装健康档案索引数据和透传来源信息;处方消息监听与院内HIS系统交互,根据处方号,查询并获取处方数据;封装后的业务消息数据加入到主消息服务线程异步处理的封装数据队列事件中,交给主消息服务进行封装数据的出队处理;形成主消息封装与业务数据封装彻底解耦;(c) The image message monitoring interacts with the image storage service, mainly uploading images to the image storage service, and obtaining the download address of the packaged image; the video chat message monitoring interacts with the video chat service, mainly for notification, establishment of connections, and destruction of peer-to-peer data. Video chat message communication, and encapsulate video session status data; health record message monitoring interacts with the health record system, query and encapsulate health record index data and transparent transmission source information according to patient number; prescription message monitoring interacts with the hospital HIS system, according to the prescription number, query and obtain the prescription data; the encapsulated business message data is added to the encapsulated data queue event asynchronously processed by the main message service thread, and handed over to the main message service for dequeuing processing of the encapsulated data; forming the main message encapsulation and business data encapsulation complete decoupling; (d)SocketIO服务节点若在本服务节点找到接收方的会话,将结果消息直接发送给接收方客户端,若未找到,则直接将请求消息在不经过任何处理的状态下直接推送给MQ消息转发中心,并对所有订阅该通道的消息服务节点集群进行广播,找到接收方会话的广播服务节点,同样进行消息事件通知和消息结果封装,同样将结果消息直接发送给接收方客户端,未找到广播服务节点直接废弃请求消息,通过MQ广播模式,形成集群各个节点间的通讯与消息路由彻底解耦。(d) If the SocketIO service node finds the receiver's session in this service node, it will directly send the result message to the receiver's client. If it is not found, it will directly push the request message to the MQ message without any processing. The forwarding center broadcasts to all the message service node clusters subscribed to the channel, finds the broadcast service node of the receiver session, also performs message event notification and message result encapsulation, and also sends the result message directly to the receiver client. The broadcast service node directly discards the request message, and through the MQ broadcast mode, the communication between each node of the cluster and the message routing are completely decoupled. 8.一种支撑互联网问诊服务的集群式即时消息系统,其特征在于:包括消息节点注册模块、消息节点通讯模块和消息节点业务集成模块;8. A clustered instant messaging system supporting Internet consultation services, characterized in that it comprises a message node registration module, a message node communication module and a message node business integration module; 所述消息节点注册模块由节点代理服务模块和客户端授权模块构成;The message node registration module is composed of a node proxy service module and a client authorization module; 所述消息节点通讯模块由节点通讯模块和会话管理模块构成;The message node communication module is composed of a node communication module and a session management module; 所述消息节点业务集成模块由业务适配模块和业务协同模块构成。The message node service integration module is composed of a service adaptation module and a service coordination module. 9.根据权利要求8所述支撑互联网问诊服务的集群式即时消息系统,其特征在于:所述节点代理服务模块由均衡分配模块和节点管理模块构成;所述客户端授权模块由客户端令牌模块和客户端认证模块构成;9. The clustered instant messaging system supporting Internet consultation service according to claim 8, wherein the node proxy service module is composed of a balanced distribution module and a node management module; the client authorization module is composed of a client The card module and the client authentication module are composed; 所述节点通讯模块由消息引擎模块和MQ消息中心模块构成;所述会话管理模块由客户端加入模块和客户端退出模块构成;The node communication module is composed of a message engine module and an MQ message center module; the session management module is composed of a client joining module and a client exiting module; 业务适配模块由第三方集成模块和消息注册监听模块构成;所述业务协同模块由消息事件通知模块和业务调用封装模块构成。The business adaptation module is composed of a third-party integration module and a message registration monitoring module; the business coordination module is composed of a message event notification module and a business invocation encapsulation module. 10.根据权利要求9所述支撑互联网问诊服务的集群式即时消息系统,其特征在于:所述均衡分配模块采用最少网络连接算法进行分配;所述节点管理模块包括加入动态检测模块和宕机动态检测模块;10. The clustered instant messaging system supporting Internet consultation service according to claim 9, wherein: the balanced distribution module adopts a least network connection algorithm for distribution; the node management module includes adding a dynamic detection module and a downtime Dynamic detection module; 所述消息引擎模块包括消息接收模块、消息发送模块和消息过滤模块;所述MQ消息中心模块包括消息订阅模块、消息推送模块和消息广播模块;The message engine module includes a message receiving module, a message sending module and a message filtering module; the MQ message center module includes a message subscription module, a message push module and a message broadcast module; 所述第三方集成模块包括视频通话服务模块、图像储存服务模块、健康档案系统和院内HIS系统。The third-party integration module includes a video call service module, an image storage service module, a health file system and an in-hospital HIS system.
CN202010004667.4A 2020-01-03 2020-01-03 Cluster type instant message system supporting internet inquiry service and implementation method thereof Active CN111211971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010004667.4A CN111211971B (en) 2020-01-03 2020-01-03 Cluster type instant message system supporting internet inquiry service and implementation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010004667.4A CN111211971B (en) 2020-01-03 2020-01-03 Cluster type instant message system supporting internet inquiry service and implementation method thereof

Publications (2)

Publication Number Publication Date
CN111211971A true CN111211971A (en) 2020-05-29
CN111211971B CN111211971B (en) 2021-11-05

Family

ID=70786619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010004667.4A Active CN111211971B (en) 2020-01-03 2020-01-03 Cluster type instant message system supporting internet inquiry service and implementation method thereof

Country Status (1)

Country Link
CN (1) CN111211971B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787073A (en) * 2020-06-18 2020-10-16 多加网络科技(北京)有限公司 A unified service current limiting fuse platform and method thereof
CN111899857A (en) * 2020-07-29 2020-11-06 广州海鹚网络科技有限公司 Data processing method and device based on hospital codes and computer equipment
CN112399256A (en) * 2020-12-14 2021-02-23 富盛科技股份有限公司 Method for detecting cluster and monitoring running service based on video streaming media service
CN112866091A (en) * 2021-01-21 2021-05-28 即时匹配(上海)网络科技有限公司 Instant communication system and communication method
CN113556587A (en) * 2021-09-18 2021-10-26 广州易方信息科技股份有限公司 Video playing link route optimization method and device based on android terminal
CN113676477A (en) * 2021-08-20 2021-11-19 中邮科通信技术股份有限公司 Method for realizing Socket session cluster communication based on star network and memory routing table
CN114095568A (en) * 2021-06-02 2022-02-25 北京机电工程研究所 Message transmission device and method based on middleware technology
CN114328129A (en) * 2022-01-17 2022-04-12 蚂蚁区块链科技(上海)有限公司 Message sending method, apparatus, device and storage medium
CN115866058A (en) * 2022-12-02 2023-03-28 用友网络科技股份有限公司 Process scheduling system and its operating method, operating device and readable storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019571A1 (en) * 2002-07-26 2004-01-29 Intel Corporation Mobile communication device with electronic token repository and method
CN101453482A (en) * 2007-11-29 2009-06-10 中兴通讯股份有限公司 Real-time data transmission method and real-time data transmission system
CN102447734B (en) * 2012-02-14 2014-01-15 浪潮齐鲁软件产业有限公司 A cloud service method of tax cloud computing network open IM online customer service system
US9270761B1 (en) * 2014-10-08 2016-02-23 Google Inc. Device control profile for a fabric network
CN106055348A (en) * 2016-05-19 2016-10-26 青岛海信电器股份有限公司 Method and device for informing system attribute updating
CN106445705A (en) * 2016-10-08 2017-02-22 武汉烽火众智数字技术有限责任公司 Platform cascading method and system based on Rabbit MQ and Socket.io
CN107239675A (en) * 2017-07-21 2017-10-10 上海桑格信息技术有限公司 Biological information analysis system based on cloud platform
CN108320242A (en) * 2017-01-17 2018-07-24 深圳市联教科技有限公司 A kind of educational system based on multiple users share database
CN109040017A (en) * 2018-06-25 2018-12-18 华南理工大学 A kind of intelligent customer service system and implementation method based on MQTT and HTTP
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
US10397303B1 (en) * 2016-08-29 2019-08-27 Amazon Technologies, Inc. Semantic annotation and translations for devices
CN110247971A (en) * 2019-06-17 2019-09-17 福建天泉教育科技有限公司 Reduce the method and its system of message-oriented middleware connection quantity
US10721336B2 (en) * 2017-01-11 2020-07-21 The Western Union Company Transaction analyzer using graph-oriented data structures

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019571A1 (en) * 2002-07-26 2004-01-29 Intel Corporation Mobile communication device with electronic token repository and method
CN101453482A (en) * 2007-11-29 2009-06-10 中兴通讯股份有限公司 Real-time data transmission method and real-time data transmission system
CN102447734B (en) * 2012-02-14 2014-01-15 浪潮齐鲁软件产业有限公司 A cloud service method of tax cloud computing network open IM online customer service system
US9270761B1 (en) * 2014-10-08 2016-02-23 Google Inc. Device control profile for a fabric network
CN106055348A (en) * 2016-05-19 2016-10-26 青岛海信电器股份有限公司 Method and device for informing system attribute updating
US10397303B1 (en) * 2016-08-29 2019-08-27 Amazon Technologies, Inc. Semantic annotation and translations for devices
CN106445705A (en) * 2016-10-08 2017-02-22 武汉烽火众智数字技术有限责任公司 Platform cascading method and system based on Rabbit MQ and Socket.io
US10721336B2 (en) * 2017-01-11 2020-07-21 The Western Union Company Transaction analyzer using graph-oriented data structures
CN108320242A (en) * 2017-01-17 2018-07-24 深圳市联教科技有限公司 A kind of educational system based on multiple users share database
CN107239675A (en) * 2017-07-21 2017-10-10 上海桑格信息技术有限公司 Biological information analysis system based on cloud platform
CN109040017A (en) * 2018-06-25 2018-12-18 华南理工大学 A kind of intelligent customer service system and implementation method based on MQTT and HTTP
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN110247971A (en) * 2019-06-17 2019-09-17 福建天泉教育科技有限公司 Reduce the method and its system of message-oriented middleware connection quantity

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
左晓麟: "基于Nginx负载均衡的智能家居研究与实现", 《CNKI中国硕士论文全文数据库》 *
杨帆: "区域卫生信息服务平台健康服务门户系统设计与实现", 《CNKI中国硕士论文全文数据库》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787073A (en) * 2020-06-18 2020-10-16 多加网络科技(北京)有限公司 A unified service current limiting fuse platform and method thereof
CN111787073B (en) * 2020-06-18 2023-08-22 庞茂林 A unified service current-limiting fuse platform and method thereof
CN111899857A (en) * 2020-07-29 2020-11-06 广州海鹚网络科技有限公司 Data processing method and device based on hospital codes and computer equipment
CN112399256A (en) * 2020-12-14 2021-02-23 富盛科技股份有限公司 Method for detecting cluster and monitoring running service based on video streaming media service
CN112866091A (en) * 2021-01-21 2021-05-28 即时匹配(上海)网络科技有限公司 Instant communication system and communication method
CN114095568A (en) * 2021-06-02 2022-02-25 北京机电工程研究所 Message transmission device and method based on middleware technology
CN114095568B (en) * 2021-06-02 2023-09-12 北京机电工程研究所 Message transmitting device and method based on middleware technology
CN113676477A (en) * 2021-08-20 2021-11-19 中邮科通信技术股份有限公司 Method for realizing Socket session cluster communication based on star network and memory routing table
CN113556587A (en) * 2021-09-18 2021-10-26 广州易方信息科技股份有限公司 Video playing link route optimization method and device based on android terminal
CN114328129A (en) * 2022-01-17 2022-04-12 蚂蚁区块链科技(上海)有限公司 Message sending method, apparatus, device and storage medium
CN114328129B (en) * 2022-01-17 2025-08-12 蚂蚁区块链科技(上海)有限公司 Message sending method, device, equipment and storage medium
CN115866058A (en) * 2022-12-02 2023-03-28 用友网络科技股份有限公司 Process scheduling system and its operating method, operating device and readable storage medium

Also Published As

Publication number Publication date
CN111211971B (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN111211971B (en) Cluster type instant message system supporting internet inquiry service and implementation method thereof
JP5898980B2 (en) Method, system, and storage medium for managing multiple queues of non-persistent messages in a network environment
US20200153946A1 (en) Concurrent process execution
US9578081B2 (en) System and method for providing an actively invalidated client-side network resource cache
EP1576789B1 (en) Transmission of application information and commands using presence technology
CN101002451B (en) Method, system and computer program to enable querying of resources in a certain context by definition of SIP event package
US20060173959A1 (en) Agent based application using data synchronization
US20170104700A1 (en) Assembling a primitive having information elements with a structure recognizable by a terminal device and another entity, both of which communicate over a network
US20140372516A1 (en) System and method for providing a scalable translation between polling-based clients and connection-based message queues
US20070300232A1 (en) Omnimodal messaging system
CN114338063B (en) Message queue system, business processing method and computer-readable storage medium
US20100281169A1 (en) Presence-awareness for wireless devices
EP2560329B1 (en) Method and processing system for routing a message request
US20070226745A1 (en) Method and system for processing a service request
CN115150364A (en) Service request processing system and method supporting multi-communication protocol concurrent communication
US8453229B2 (en) Push type communications system
CN101989959B (en) Group management method and system in interworking system
US20050289096A1 (en) Method, system and computer program to enable SIP event-based discovery of services and content within a community built on context information
KR20080085864A (en) Method, system, and apparatus for sending IMS instant messages
Saveliev et al. Architecture of data exchange with minimal client-server interaction at multipoint video conferencing
CN115695526A (en) A communication method and system
CN101127614A (en) System and method for maintaining public group member presence information
US20080021968A1 (en) Low bandwidth chat system
CN113840151A (en) OTT multicast gateway scheduling method, device and system, and storage medium
CN116846959B (en) A message sending and receiving method and apparatus based on the MQTT protocol

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
CP03 Change of name, title or address

Address after: Room 1003, Building A, Zhongtou International, No. 10 Jinye 1st Road, High tech Zone, Xi'an City, Shaanxi Province, 710065

Patentee after: Xinnengkang Technology Co.,Ltd.

Patentee after: Yang Fan

Address before: 710077 Yongli international financial center, Jinye 1st Road, high tech Zone, Xi'an, Shaanxi

Patentee before: Xi'an Xinneng Technology Co.,Ltd.

Patentee before: Yang Fan

CP03 Change of name, title or address