SSE-based digital pathological image diagnosis system message pushing method

By adopting the SSE protocol and the architecture of EventSource object in the digital pathological image diagnosis system, real-time message transmission and monitoring between the server and the client is realized, the delay and resource waste of the traditional message push mechanism is solved, and diagnostic efficiency and system stability are improved.

CN119864130APending Publication Date: 2025-04-22BEIJING THOROUGH FUTURE INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411918038.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the existing digital pathological image diagnosis system, traditional message push mechanisms such as polling and long polling mechanisms lead to delayed information delivery, high resource consumption and poor connection stability, which cannot achieve real-time notification and diagnostic efficiency improvement.

Method used

The architecture of server-side SSE service and client EventSource object is adopted, real-time message transmission and listening between the server and the client is realized through the SSE protocol, combining connection relationship monitoring and encryption processing to ensure instant information response and resource optimization.

Benefits of technology

Real-time update and timely feedback of information in the digital pathological image diagnosis system are realized, resource occupation is reduced, doctors' diagnostic efficiency and system stability are improved, and information delays and resource waste are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119864130A_ABST
    Figure CN119864130A_ABST
Patent Text Reader

Abstract

The invention provides an SSE-based digital pathological image diagnosis system message pushing method, and the method comprises the steps: building an SSE service at a server side, and creating an EventSource object at a client side; establishing a connection relationship between the SSE architecture and an EventSource object, and establishing a connection relationship between the SSE architecture and the EventSource object; monitoring is conducted on the server side and the client side based on the connection relation, the server side obtains response information in the digital pathological image diagnosis system according to request information of the client side and transmits the request information and the response information to the client side in real time, and the client side receives information of the request information and the response information and sends the information to the server side. And after the message is analyzed, the image and data display are updated according to the request information response information. The SSE technology is adopted in the digital pathological image diagnosis system, real-time updating and timely feedback are achieved, resource occupation can be reduced, a doctor can timely obtain request information response information in the digital pathological image diagnosis system for diagnosis, and the diagnosis efficiency of the doctor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of message push, and in particular to a message push method for a digital pathological image diagnosis system based on SSE. Background Art

[0002] With the rapid development of network information technology, digital pathology image diagnosis system has gradually become an indispensable platform for modern medicine, which can improve clinical work efficiency. In the process of digital pathology image diagnosis or learning, doctors and related personnel are in urgent need of obtaining diagnosis results and information in real time and accurately in the process of diagnosis. The message push mechanism usually adopted in the digital pathology image diagnosis system is based on polling mechanism and long polling (Long Polling) or Comet technology mechanism. However, there are problems of information transmission delay and inconvenience in these traditional message push mechanisms. Among them, the polling-based mechanism will cause unnecessary network traffic in the digital pathology image diagnosis system, consume high server resources, and need to wait for the next polling cycle to obtain updates, and cannot achieve real-time notification. The mechanism based on long polling (Long Polling) or Comet technology requires more complex implementation and maintenance in the digital pathology image diagnosis system, and has higher requirements for developers. The server maintains a large number of long connections, occupies more resources, and increases the delay and connection stability problems. Therefore, the present invention proposes a message push method for a digital pathology image diagnosis system based on SSE. The SSE technology is used in the digital pathology image diagnosis system to not only realize real-time update and timely feedback, but also reduce resource occupation, so that doctors can obtain request information response information in the digital pathology image diagnosis system in time for diagnosis, thereby improving the doctor's diagnosis efficiency. Summary of the invention

[0003] The object of the present invention is to provide a message push method for a digital pathological image diagnosis system based on SSE to solve the problems raised in the above-mentioned background technology.

[0004] To achieve the above object, the present invention provides the following technical solution: a message push method for a digital pathological image diagnosis system based on SSE, comprising:

[0005] Build the SSE service on the server side, obtain the SSE architecture, and create an EventSource object on the client side;

[0006] Establish the connection relationship between the SSE architecture and the EventSource object based on the relationship between the server and the client;

[0007] Based on the connection relationship, the server monitors the request information transmitted by the client, obtains the request information of the client, obtains the response information in the digital pathology image diagnosis system according to the request information of the client, obtains the request information response information, and transmits the request information response information to the client in real time;

[0008] Based on the connection relationship, the client listens to the messages transmitted by the server, receives the messages requesting the response information, parses the messages requesting the response information, and updates the image and data display according to the requesting the response information.

[0009] Furthermore, when establishing a connection relationship between the SSE architecture and the EventSource object according to the relationship between the server and the client, it includes:

[0010] The server monitors the client;

[0011] The client sends an SSE connection request;

[0012] When an SSE connection request is monitored, the client's EventSource object is connected to the SSE architecture according to the business needs of the server, and a connection relationship between the SSE architecture and the EventSource object is established.

[0013] Furthermore, when the server transmits the request information response information to the client in real time, it uses the SSE protocol to send messages to the client in real time, and the sent message is obtained based on the request information response information.

[0014] Furthermore, when the SSE protocol is used to send a message to the client in real time, the message is sent in JSON format, and the message is converted into JSON format and then sent to the client.

[0015] Furthermore, after establishing the connection relationship between the SSE architecture and the EventSource object based on the relationship between the server and the client, the connection relationship is monitored to obtain connection monitoring information, and the connection monitoring information is analyzed to determine whether the connection relationship is disconnected and obtain analysis results. Then, based on the analysis results, a disconnection and reconnection mechanism is used to restore the connection relationship when the connection relationship is disconnected.

[0016] Furthermore, the client's EventSource object is connected to the SSE architecture, including:

[0017] Parse the SSE request and obtain SSE request information;

[0018] In the SSE architecture, the port to be connected is determined according to the monitoring situation;

[0019] Extracting characteristic information of the EventSource object in the SSE request information, binding the EventSource object with the port to be connected according to the characteristic information of the EventSource object, matching the EventSource object with the port to be connected, and obtaining a first processing connection port;

[0020] Extract the ID identifier in the SSE request information, and configure the message sending in the first processing connection port according to the ID identifier, limit the target client sent by the connection port, clarify the message characteristics sent by the connection port to the target client, determine the connection relationship between the SSE architecture and the EventSource object, and complete the connection between the client and the server.

[0021] Furthermore, the number of clients is not unique. When the server monitors SSE connection requests issued by multiple clients, it determines the number of SSE requests monitored and obtains the number of ports to be connected on the server; compares the number of SSE requests with the number of ports to be connected to obtain a number comparison result; establishes a connection relationship based on the number comparison result, and when the number comparison result is that the number of SSE requests is less than or equal to the number of ports to be connected, directly connects the client's EventSource object to the SSE architecture, and establishes a connection relationship between the SSE architecture and the EventSource object; when the number comparison result is that the number of SSE requests is greater than the number of ports to be connected, classifies the SSE requests, obtains the classification results of the SSE requests, and connects the client's EventSource object in the same classification result to the SSE architecture according to the classification results of the SSE requests, and establishes a connection relationship between the SSE architecture and the EventSource object.

[0022] Furthermore, the SSE request is classified and processed, including:

[0023] Extract the ID of the SSE request and obtain the ID of the SSE request;

[0024] Analyze the client source according to the ID identifier to determine the client's location information, determine the client's affiliated hospital according to the client's location information, and classify the SSE requests according to the affiliated hospital to obtain a first classification result;

[0025] Analyze the size relationship between the number of categories included in the first classification result and the number of ports to be connected, and obtain a first classification judgment result;

[0026] When the first classification judgment result is that the number of classifications is less than or equal to the number of ports to be connected, the EventSource object of the client in the same classification result is connected to the SSE architecture according to the first classification result, and a connection relationship between the SSE architecture and the EventSource object is established;

[0027] When the first classification judgment result is that the number of classifications is greater than the number of ports to be connected, the location of the client's affiliated hospital is further obtained, regional division is performed according to the location of the client, and the SSE request is classified according to the regional division result to obtain a second classification result;

[0028] According to the second classification result, the EventSource object of the client in the same classification result is connected to the SSE architecture, and a connection relationship between the SSE architecture and the EventSource object is established.

[0029] Furthermore, the server sends a signal according to the connection relationship when transmitting the request information response information to the client in real time, and encrypts the request information response information before transmitting the request information response information in real time, including:

[0030] When the connection relationship is that the client and the server establish a connection relationship according to the first classification result, the ID of the client in the same classification result is obtained according to the first classification result, and the key of the client is determined based on the ID of the client. After the server obtains the request information in the digital pathology image diagnosis system according to the request information of the client and obtains the request information response information, it obtains the key of the client according to the request information, and uses the key of the client to encrypt the request information response information to obtain the encrypted request information response information, and then sends the encrypted request information response information to the client corresponding to the affiliated hospital in the form of a data stream;

[0031] When the connection relationship between the client and the server is established according to the second classification result, the client's affiliated hospital in the same regional division result is analyzed according to the second classification result, and the first encryption key is determined, and then the client's ID is obtained in the same client's affiliated hospital, and the second encryption key is determined based on the client's ID. After the server obtains the request information response information in the digital pathology image diagnosis system according to the client's request information, it uses the second encryption key to perform an initial encryption on the request information response information according to the source of the request information, and obtains the request information response information intermediate processing information, and then uses the first encryption key to encrypt the request information response information intermediate processing information again, and obtains the encrypted request information response information, and sends the encrypted request information response information to the client corresponding to the affiliated hospital in the form of a data stream.

[0032] Furthermore, when the client monitors the message transmitted by the server, the key is used to decrypt the received data stream, and the message successfully decrypted in the data stream is extracted to obtain the message of the request information and the response information.

[0033] The present invention adopts SSE to realize the real-time transmission of messages between the server and the client, and by respectively monitoring the server and the client, the server can obtain response information according to the request information in time after receiving the request information from the client, and respond to the request information of the client in time, thereby reducing the delay of the client to the request information, and at the same time, it can also avoid the server side from processing based on the request information for a long time, resulting in the occupation of server resources, and the client can perform logical processing on the request information and response information messages in time, thereby realizing real-time update of image and data display, so that the doctor can obtain the information in the digital pathology image diagnosis system on the client in time for diagnosis, thereby improving the doctor's diagnosis efficiency.

[0034] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0035] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0037] Figure 1 It is a schematic diagram of the steps of the message push method of the digital pathological image diagnosis system based on SSE according to the present invention;

[0038] Figure 2 A schematic diagram of step 2 of the message push method for a digital pathological image diagnosis system based on SSE according to the present invention;

[0039] Figure 3 It is a schematic diagram of step S3 of step 2 in the message push method of the digital pathology image diagnosis system based on SSE according to the present invention;

[0040] Figure 4 This is another schematic diagram of step 2 in the message pushing method for the digital pathology image diagnosis system based on SSE described in the present invention. DETAILED DESCRIPTION

[0041] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0042] like Figure 1 As shown, an embodiment of the present invention provides a message push method for a digital pathological image diagnosis system based on SSE, comprising:

[0043] Step 1: Build the SSE service on the server side, obtain the SSE architecture, and create an EventSource object on the client side;

[0044] Step 2: Establish the connection relationship between the SSE architecture and the EventSource object based on the relationship between the server and the client;

[0045] Step 3: Based on the connection relationship, the server monitors the request information transmitted by the client, obtains the request information of the client, obtains the response information in the digital pathology image diagnosis system according to the request information of the client, obtains the request information response information, and transmits the request information response information to the client in real time;

[0046] Step 4: Based on the connection relationship, the client monitors the messages transmitted by the server, receives the messages of the request information response information, parses the messages of the request information response information, and updates the image and data display according to the request information response information.

[0047] In the above technical solution, when building the SSE service on the server side, an SSE library can also be built, so as to establish a connection with the EventSource object in the client based on the SSE library.

[0048] In the above technical solution, the client receives the message of request information response information, parses the message of request information response information, and updates the image and data display according to the request information response information, and uses JavaScript or other related front-end technologies to implement the SSE message receiving and processing logic.

[0049] In the above technical solution, the digital pathology image diagnosis system includes: a server and a client, wherein the server is used to obtain response information according to the request information of the client, and the client is set up in the hospital to present data information to the doctor. The doctor can directly send a request instruction or request information to the server on the client to obtain response information.

[0050] The above technical solution adopts SSE to realize the real-time transmission of messages between the server and the client, and by monitoring the server and the client respectively, the server can obtain the response information according to the request information in time after receiving the request information from the client, and respond to the request information of the client in time, thereby reducing the delay of the client to the request information. At the same time, it can also avoid the server side from processing based on the request information for a long time, resulting in the occupation of server resources, and the client can perform logical processing on the request information and response information messages in time, thereby realizing real-time update of image and data display, so that doctors can obtain the information in the digital pathology image diagnosis system on the client in time for diagnosis, thereby improving the doctor's diagnosis efficiency.

[0051] like Figure 2 As shown, in one embodiment provided by the present invention, when establishing a connection relationship between the SSE architecture and the EventSource object according to the relationship between the server and the client, it includes:

[0052] S1, the server monitors the client;

[0053] S2. The client sends an SSE connection request;

[0054] S3. When the SSE connection request is monitored, the client's EventSource object is connected to the SSE architecture according to the business needs of the server, and a connection relationship between the SSE architecture and the EventSource object is established.

[0055] In the above technical solution, the client sends an SSE connection request only after creating an EventSource object.

[0056] In the above technical solution, the server side identifies the client side before monitoring the client side to determine whether the user side matches the server side and obtains the identification result. When the identification result is that the user side matches the server side, the client side is monitored.

[0057] The above technical solution realizes the SSE connection between the SSE architecture and the EventSource object, so that messages can be sent between the client and the server in real time. Moreover, the server identifies the client before monitoring it and only monitors the matching clients, thereby avoiding the waste of server resources caused by the server monitoring any client.

[0058] In an embodiment provided by the present invention, when the server transmits the request information response information to the client in real time, the server uses the SSE protocol to send messages to the client in real time, and the sent message is obtained based on the request information response information.

[0059] In the above technical solution, the request information response information includes: image URL, image description, diagnosis results and other text information.

[0060] In the above technical solution, the SSE protocol is a long connection based on HTTP.

[0061] The above technical solution realizes continuous connection and message sending between the server and the user by adopting the SSE protocol, so that the server can continuously send messages of request information and response information to the client, so that the client can obtain the request information and response information in time for the doctor to make a medical diagnosis. In addition, the SSE protocol can maintain a persistent connection state without the need to frequently establish and close the connection, thereby improving the stability and reliability of the digital pathology image diagnosis system, and enabling continuous message transmission and interaction to be maintained during a long diagnosis process.

[0062] In an embodiment provided by the present invention, when a message is sent to a client in real time using the SSE protocol, the message is sent in JSON format, and the message is converted into JSON format and then sent to the client.

[0063] In the above technical solution, when the server transmits the request information response information to the client in real time, it creates a JSON standard format based on the sent message, and determines the format form based on the JSON standard format, and then when converting the sent message into the JSON format, a first judgment is made on the sent message to determine whether the sent message is a plurality of groups of request information response information, and a first judgment result is obtained; the sent message is split according to the first judgment result to obtain a plurality of messages to be sent; the message to be sent is analyzed to determine whether the message to be sent is a simple message, and when the message to be sent is not a simple message, the message to be sent is parsed into a main message to be converted and a slave message to be converted, and the main message to be converted and the slave message to be converted are parsed and written into the format form respectively to obtain a first format form and a second format form, and then the first format form and the second format form are spliced ​​and merged based on the relationship between the main message to be converted and the slave message to be converted to obtain a target format form, and then the message to be sent in the JSON format is obtained based on the target format form, thereby converting the sent message into the JSON format; when the message to be sent is a simple message, the message to be sent is directly parsed and written into the format form to obtain an updated format form, and then the message to be sent in the JSON format is obtained based on the updated format form, thereby converting the sent message into the JSON format.

[0064] The above technical solution sends the message in JSON format, which makes it easier for the client to parse and process the message after receiving the request information response information, thereby improving the client's processing efficiency of the message. The JSON format has wide compatibility, which can effectively avoid the problem that the message is incompatible with the processing configuration and cannot be processed. In addition, when converting the sent message into JSON format, with the help of the JSON standard format and the format form, the message sent in JSON format can be obtained by updating the format form for the sent message, thereby enabling the automatic update of the format form by monitoring whether the request information response information in the server is obtained, and realizing automatic format conversion. Moreover, by making a first judgment, when there are multiple request information response information at the same time, it can be performed simultaneously, thereby improving the efficiency of JSON format conversion, and by analyzing the message to be sent, determining whether the message to be sent is a simple message, enabling the main message to be converted and the slave message to be converted to obtain the format form at the same time, improving the parsing efficiency, avoiding the message to be sent being too complex and requiring a long time to parse and update the format form or making an error when updating the format form, thereby ensuring the efficiency of JSON format conversion and the accuracy of JSON format conversion.

[0065] In an embodiment provided by the present invention, after establishing a connection relationship between an SSE architecture and an EventSource object according to the relationship between a server and a client, the connection relationship is monitored to obtain connection monitoring information, and the connection monitoring information is analyzed to determine whether the connection relationship is disconnected to obtain an analysis result, and then, according to the analysis result, a disconnection and reconnection mechanism is used to restore the connection relationship when the connection relationship is disconnected.

[0066] In the above technical solution, when a disconnection and reconnection mechanism is used to restore the connection relationship, the reconnection time interval and number of attempts are set in the disconnection and reconnection mechanism, so that when the connection is detected to be disconnected, reconnection attempts are made multiple times according to the time interval until the connection relationship is restored. When the number of attempts is used up and the connection relationship is not restored, the connection relationship is re-established for the client and the server.

[0067] In the above technical solution, when attempting to reconnect, the connection is restored based on the data information when the disconnected connection relationship was established.

[0068] The above technical solution monitors the connection relationship so that it can automatically reconnect when the connection is disconnected, ensuring the stability and continuity of the connection, eliminating the need for the client to frequently send SSE connection requests, and reducing the resource overhead on the server side. In addition, setting the reconnection time interval and number of attempts in the disconnection and reconnection mechanism can avoid the confusion of reconnection data caused by adjacent attempts being too close, and can also avoid the waste of time and resources caused by the failure to terminate the reconnection attempt in time when the reconnection attempt is successful. Multiple attempts can provide multiple opportunities to restore the connection relationship, so that the disconnected connection relationship can be automatically restored as much as possible.

[0069] like Figure 3 As shown, in one embodiment provided by the present invention, connecting the EventSource object of the client to the SSE architecture includes:

[0070] A1. Parse the SSE request and obtain SSE request information;

[0071] A2. Determine the port to be connected according to the monitoring situation in the SSE architecture;

[0072] A3. Extract characteristic information of the EventSource object in the SSE request information, bind the EventSource object to the port to be connected according to the characteristic information of the EventSource object, match the EventSource object with the port to be connected, and obtain a first processing connection port;

[0073] A4. Extract the ID in the SSE request information, and perform message sending configuration in the first processing connection port according to the ID, limit the target client sent by the connection port, clarify the message characteristics sent by the connection port to the target client, determine the connection relationship between the SSE architecture and the EventSource object, and complete the connection between the client and the server.

[0074] In the above technical solution, when determining the port to be connected according to the monitoring situation in the SSE framework, a connection port with an undetermined connection relationship in the SSE framework is randomly selected as the port to be connected.

[0075] In the above technical solution, the port to be connected is initialized before binding.

[0076] The above technical solution includes the client's ID in the SSE connection request so that when establishing a connection relationship, the connection relationship can be based on the ID, so that the connection relationship can only be sent to the corresponding client, and by binding with the port to be connected according to the characteristic information of the EventSource object, the port to be connected is occupied, and by configuring the message sending in the first processing connection port according to the ID, the connection port can only send the target, thereby avoiding the connection port being occupied and affecting the real-time transmission of the request information and response information, and also avoiding the transmission confusion of the connection port that transmits the request information and response information to the wrong client, thereby improving the accuracy of the message sending of the connection port, and also ensuring the security of the request information and response information, avoiding the leakage of patient information.

[0077] In one embodiment provided by the present invention, the number of the clients is not unique. When the server side monitors SSE connection requests issued by multiple clients, the number of the monitored SSE requests is determined, and the number of ports to be connected on the server side is obtained; the number of SSE requests is compared with the number of ports to be connected to obtain a number comparison result; a connection relationship is established according to the number comparison result. When the number comparison result is that the number of SSE requests is less than or equal to the number of ports to be connected, the EventSource object of the client is directly connected to the SSE architecture, and a connection relationship between the SSE architecture and the EventSource object is established. When the number comparison result is that the number of SSE requests is greater than the number of ports to be connected, classification processing is performed on the SSE requests to obtain the classification results of the SSE requests, and the EventSource objects of the clients in the same classification result are connected to the SSE architecture according to the classification results of the SSE requests, and a connection relationship between the SSE architecture and the EventSource object is established.

[0078] In the above technical solution, the number of clients can be one or more.

[0079] When the EventSource objects in multiple clients establish a connection relationship with the SSE architecture in the server, the above technical solution compares the number of SSE requests with the number of ports to be connected. When the number of SSE requests is greater than the number of ports to be connected, the connection relationship is established according to the classification result of the SSE requests. This allows the server to have a connection relationship with multiple clients at the same time and send messages in real time, avoiding the busy server affecting the connection failure between the client and the server and affecting the doctor's use of the digital pathology image diagnosis system, thereby improving the doctor's user experience.

[0080] like Figure 4 As shown, in one embodiment provided by the present invention, classification processing is performed on SSE requests, including:

[0081] B1. Extract the ID of the SSE request to obtain the ID of the SSE request;

[0082] B2. Analyze the client source according to the ID, determine the client's location information and device identification, determine the client's affiliated hospital according to the client's location information, and classify the SSE requests according to the affiliated hospital to obtain a first classification result;

[0083] B3, analyzing the relationship between the number of categories included in the first classification result and the number of ports to be connected, to obtain a first classification judgment result;

[0084] B4. When the first classification judgment result is that the number of classifications is less than or equal to the number of ports to be connected, the EventSource object of the client in the same classification result is connected to the SSE architecture according to the first classification result, and a connection relationship between the SSE architecture and the EventSource object is established;

[0085] B5. When the first classification judgment result is that the number of classifications is greater than the number of ports to be connected, the location of the client's affiliated hospital is further obtained, regional division is performed according to the location of the client, and the SSE request is classified according to the regional division result to obtain a second classification result;

[0086] B6. According to the second classification result, the EventSource object of the client in the same classification result is connected to the SSE architecture, and a connection relationship between the SSE architecture and the EventSource object is established.

[0087] In the above technical solution, each doctor who performs diagnosis in the hospital corresponds to a user terminal.

[0088] The above technical solution establishes a connection relationship between the server and multiple clients by classifying SSE requests, so that multiple clients can simultaneously obtain response information in the digital pathology image diagnosis system, thereby realizing the sharing of the digital pathology image diagnosis system. When classifying SSE requests, the client source is analyzed according to the ID in the SSE request, so that clients from the same source can send messages based on the same connection port, which is convenient for the server to send messages after receiving the request information response information.

[0089] In one embodiment provided by the present invention, the server sends a signal according to a connection relationship when transmitting the request information response information to the client in real time, and encrypts the request information response information before transmitting the request information response information in real time, including:

[0090] When the connection relationship is that the client and the server establish a connection relationship according to the first classification result, the ID of the client in the same classification result is obtained according to the first classification result, and the key of the client is determined based on the ID of the client. After the server obtains the request information in the digital pathology image diagnosis system according to the request information of the client and obtains the request information response information, it obtains the key of the client according to the request information, and uses the key of the client to encrypt the request information response information to obtain the encrypted request information response information, and then sends the encrypted request information response information to the client corresponding to the affiliated hospital in the form of a data stream;

[0091] When the connection relationship between the client and the server is established according to the second classification result, the client's affiliated hospital in the same regional division result is analyzed according to the second classification result, and the first encryption key is determined, and then the client's ID is obtained in the same client's affiliated hospital, and the second encryption key is determined based on the client's ID. After the server obtains the request information response information in the digital pathology image diagnosis system according to the client's request information, it uses the second encryption key to perform an initial encryption on the request information response information according to the source of the request information, and obtains the request information response information intermediate processing information, and then uses the first encryption key to encrypt the request information response information intermediate processing information again, and obtains the encrypted request information response information, and sends the encrypted request information response information to the client corresponding to the affiliated hospital in the form of a data stream.

[0092] In the above technical solution, the key of each client is different, and different keys can only decrypt different information.

[0093] In the above technical solution, when the encrypted request information response information is sent to the client corresponding to the affiliated hospital in the form of a data stream, the connection port sends the data stream to all the clients connected to the connection port.

[0094] The above technical solution realizes the simultaneous transmission of request information and response information of multiple clients through encryption processing, thereby improving the server-side sending efficiency and avoiding the client from waiting for a long time for a response to the request information. At the same time, it ensures the security of the request information and response information, so that only the client corresponding to the request information can obtain the request information and response information in the data stream that responds to the request information, thereby avoiding the leakage of patient condition data.

[0095] In an embodiment provided by the present invention, when the client monitors the message transmitted by the server, the key is used to decrypt the received data stream, and the message successfully decrypted in the data stream is extracted to obtain the message of the request information response information.

[0096] In the above technical solution, the client is only used for the key related to itself or the first key and the second key.

[0097] In the above technical solution, the key in the client can only successfully decrypt the relevant part of the content in the data stream.

[0098] The above technical solution uses a key to enable the client to filter out information related to the request issued by itself in the data stream when listening to the messages transmitted by the server. This can not only avoid the appearance of patient information involving other clients in the client, thereby ensuring the security of patient information, but also quickly obtain request information response information related to the request issued by itself, thereby avoiding long waiting times.

[0099] Those skilled in the art should understand that the first and second in the present invention merely refer to different application stages.

[0100] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0101] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A message push method for a digital pathological image diagnosis system based on SSE, characterized in that: The method comprises: Build the SSE service on the server side, obtain the SSE architecture, and create an EventSource object on the client side; Establish the connection relationship between the SSE architecture and the EventSource object based on the relationship between the server and the client; Based on the connection relationship, the server monitors the request information transmitted by the client, obtains the request information of the client, obtains the response information in the digital pathology image diagnosis system according to the request information of the client, obtains the request information response information, and transmits the request information response information to the client in real time; Based on the connection relationship, the client listens to the messages transmitted by the server, receives the messages requesting the response information, parses the messages requesting the response information, and updates the image and data display according to the requesting the response information.

2. The method according to claim 1, characterized in that When establishing the connection relationship between the SSE architecture and the EventSource object based on the relationship between the server and the client, it includes: The server monitors the client; The client sends an SSE connection request; When an SSE connection request is monitored, the client's EventSource object is connected to the SSE architecture according to the business needs of the server, and a connection relationship between the SSE architecture and the EventSource object is established.

3. The method according to claim 1, characterized in that When the server transmits the request information response information to the client in real time, the server uses the SSE protocol to send a message to the client in real time, and the sent message is obtained based on the request information response information.

4. The method according to claim 3, characterized in that When the SSE protocol is used to send messages to the client in real time, the messages are sent in JSON format. The messages are converted into JSON format and then sent to the client.

5. The method according to claim 1, characterized in that After establishing the connection relationship between the SSE architecture and the EventSource object based on the relationship between the server and the client, the connection relationship is monitored to obtain connection monitoring information, and the connection monitoring information is analyzed to determine whether the connection relationship is disconnected and obtain the analysis results. Then, based on the analysis results, a disconnection and reconnection mechanism is used to restore the connection relationship when the connection relationship is disconnected.

6. The method according to claim 2, characterized in that Connect the client's EventSource object to the SSE architecture, including: Parse the SSE request and obtain SSE request information; In the SSE architecture, the port to be connected is determined according to the monitoring situation; Extracting characteristic information of the EventSource object in the SSE request information, binding the EventSource object with the port to be connected according to the characteristic information of the EventSource object, matching the EventSource object with the port to be connected, and obtaining a first processing connection port; Extract the ID identifier in the SSE request information, and configure the message sending in the first processing connection port according to the ID identifier, limit the target client sent by the connection port, clarify the message characteristics sent by the connection port to the target client, determine the connection relationship between the SSE architecture and the EventSource object, and complete the connection between the client and the server.

7. The method according to claim 6, characterized in that The number of the clients is not unique. When the server monitors SSE connection requests from multiple clients, the number of monitored SSE requests is determined, and the number of ports to be connected on the server is obtained; the number of SSE requests is compared with the number of ports to be connected to obtain a number comparison result; A connection relationship is established based on the number comparison result. When the number comparison result is that the number of SSE requests is less than or equal to the number of ports to be connected, the client's EventSource object is directly connected to the SSE architecture, and a connection relationship between the SSE architecture and the EventSource object is established. When the number comparison result is that the number of SSE requests is greater than the number of ports to be connected, classification processing is performed on the SSE requests, the classification results of the SSE requests are obtained, and the client's EventSource objects in the same classification results are connected to the SSE architecture according to the classification results of the SSE requests, and a connection relationship between the SSE architecture and the EventSource object is established.

8. The method according to claim 7, characterized in that SSE requests are classified and processed, including: Extract the ID of the SSE request and obtain the ID of the SSE request; Analyze the client source according to the ID identifier to determine the client's location information, determine the client's affiliated hospital according to the client's location information, and classify the SSE requests according to the affiliated hospital to obtain a first classification result; Analyze the size relationship between the number of categories included in the first classification result and the number of ports to be connected, and obtain a first classification judgment result; When the first classification judgment result is that the number of classifications is less than or equal to the number of ports to be connected, the EventSource object of the client in the same classification result is connected to the SSE architecture according to the first classification result, and a connection relationship between the SSE architecture and the EventSource object is established; When the first classification judgment result is that the number of classifications is greater than the number of ports to be connected, the location of the client's affiliated hospital is further obtained, regional division is performed according to the location of the client, and the SSE request is classified according to the regional division result to obtain a second classification result; According to the second classification result, the EventSource object of the client in the same classification result is connected to the SSE architecture, and a connection relationship between the SSE architecture and the EventSource object is established.

9. The method according to claim 8, characterized in that The server sends a signal according to the connection relationship when transmitting the request information response information to the client in real time, and encrypts the request information response information before transmitting the request information response information in real time, including: When the connection relationship is that the client and the server establish a connection relationship according to the first classification result, the ID of the client in the same classification result is obtained according to the first classification result, and the key of the client is determined based on the ID of the client. After the server obtains the request information in the digital pathology image diagnosis system according to the request information of the client and obtains the request information response information, it obtains the key of the client according to the request information, and uses the key of the client to encrypt the request information response information to obtain the encrypted request information response information, and then sends the encrypted request information response information to the client corresponding to the affiliated hospital in the form of a data stream; When the connection relationship between the client and the server is established according to the second classification result, the client's affiliated hospital in the same regional division result is analyzed according to the second classification result, and the first encryption key is determined, and then the client's ID is obtained in the same client's affiliated hospital, and the second encryption key is determined based on the client's ID. After the server obtains the request information response information in the digital pathology image diagnosis system according to the client's request information, it uses the second encryption key to perform an initial encryption on the request information response information according to the source of the request information, and obtains the request information response information intermediate processing information, and then uses the first encryption key to encrypt the request information response information intermediate processing information again, and obtains the encrypted request information response information, and sends the encrypted request information response information to the client corresponding to the affiliated hospital in the form of a data stream.

10. The method according to claim 9, characterized in that When the client monitors the message transmitted by the server, the key is used to decrypt the received data stream, and the message successfully decrypted in the data stream is extracted to obtain the message of the request information and the response information.