Doctor-patient platform instant messaging method and system

By performing identity authentication and data encryption in the instant doctor-patient communication system, the problems of failure of authentication and insufficient security in the dynamic network environment are solved, and efficient and secure doctor-patient communication is achieved.

CN119675969AActive Publication Date: 2025-03-21RESVENT MEDICAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411880018.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-21
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

When facing dynamic network environments or large-scale data interactions, traditional doctor-patient instant communication systems are prone to authentication failure, data delay and insufficient security, which makes it difficult to guarantee the security and privacy of doctor-patient communication.

Method used

Through authentication based on MQTT client and MQTT server, ensure that the user identity is authentic and reliable, and encrypted and signed and generated before data transmission, ensuring the confidentiality and integrity of the data. At the same time, the transmission delay is calculated and adaptive adjustment is performed to improve the speed and reliability of data transmission.

Benefits of technology

It improves the security and privacy of doctor-patient communication, prevents data from being stolen and tampered on the network, and ensures the accuracy and reliability of communication data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119675969A_ABST
    Figure CN119675969A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of instant messaging, in particular to a doctor-patient platform instant messaging method and system, and the method comprises the steps: starting a doctor-patient instant messaging application, carrying out the identity verification, obtaining a verification parameter, judging whether the identity verification succeeds or not according to the verification parameter, and if the identity verification succeeds, defining an identification content field and a message content field, and pulling historical data; the method comprises the following steps of: constructing a display format set, updating data, obtaining updated data, sending real-time data, encrypting the data, generating a signature, obtaining encrypted data, verifying a signature packet, sending the data, calculating transmission delay, judging whether the transmission delay is in a delay range or not, and if the transmission delay is not in the delay range, sending the signature packet. If the transmission delay is within the delay range, self-adaptive adjustment is carried out, verification is carried out according to the verification signature packet to obtain verification data, and if the transmission delay is within the delay range, verification is carried out according to the verification signature packet to obtain verification data to complete communication. According to the invention, the security and privacy of doctor-patient communication can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of instant messaging technology, and in particular to an instant messaging method and system for a doctor-patient platform. Background Art

[0002] With the rapid development of the Internet, instant messaging has become an indispensable part of people's daily life and work. Instant messaging systems based on the lightweight protocol MQTT are widely used in medical, industrial, smart home and other fields. In the medical field, the doctor-patient instant messaging system can significantly improve the efficiency of real-time information transmission and provide patients with timely medical service support.

[0003] Traditional instant messaging solutions are subject to the control of third-party platforms. According to the growth of traffic, a high service fee needs to be paid every year. The data will be shared with other platforms, which cannot guarantee the security and privacy of patient treatment data. The chat scene is single and cannot meet the needs of information exchange such as reports and prescriptions between doctors and patients. In addition, traditional instant messaging solutions usually rely on simple identity authentication and data transmission mechanisms. When facing dynamic network environments or large-scale data interactions, they are prone to authentication failures, data delays, and insufficient security. Therefore, how to improve the security and privacy of doctor-patient communication is an urgent problem to be solved. Summary of the invention

[0004] The present invention provides a doctor-patient platform instant communication method and system, the main purpose of which is to improve the security and privacy of doctor-patient communication.

[0005] To achieve the above purpose, the present invention provides a doctor-patient platform instant communication method, comprising:

[0006] Start the doctor-patient instant messaging application, and perform identity authentication based on the pre-built MQTT client, MQTT server, and doctor-patient instant messaging application to obtain verification parameters;

[0007] Determine whether the identity authentication is successful based on the verification parameters;

[0008] If the authentication fails, return to the above steps of authentication based on the pre-built MQTT client and MQTT server;

[0009] If the identity authentication is successful, the identification content field and the message content field are defined;

[0010] Pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data;

[0011] Sending real-time data based on the update data, encrypting the real-time data and generating a signature to obtain encrypted data and a verification signature package;

[0012] Sending data based on the encrypted data and the verification signature package, and calculating the transmission delay;

[0013] Determining whether the transmission delay is within a preset delay range;

[0014] If the transmission delay is not within the delay range, adaptive adjustment is performed and verification is performed according to the verification signature package to obtain verification data;

[0015] If the transmission delay is within the delay range, verification is performed according to the verification signature package to obtain verification data and complete the communication.

[0016] Optionally, the definition identification content field and the message content field include:

[0017] Set the identification field id and identification field type, where the identification field id is msgType, and the identification field types include: type 1, type 2, type 3, type 4, and type 5;

[0018] Based on the type 1, type 2, type 3, type 4 and type 5, the message types include: text message, voice message, picture message, treatment suggestion and treatment report, and type 1 corresponds to the text message, type 2 corresponds to the voice message, type 3 corresponds to the picture message, type 4 corresponds to the treatment suggestion, and type 5 corresponds to the treatment report;

[0019] Define identification content fields based on the identification fields id, msgType, identification field type, type 1, type 2, type 3, type 4, type 5, message type, text message, voice message, picture message, treatment suggestion and treatment report;

[0020] Set the message field id and message field type id, where the message field id is msgContent and the message field type ids include: text, audioFile, imgFile, suggest and reportData;

[0021] The message content fields are defined based on the message fields id, msgContent, message field type id, text, audioFile, imgFile, suggest and reportData.

[0022] Optionally, constructing a display format set based on the identification content field includes:

[0023] Setting a text limit, and constructing a text representation format based on the identified content field and the text limit, wherein the text representation format is a text box that supports inputting multiple lines of text, and will automatically wrap when a single line of input text exceeds the text limit;

[0024] Set the audio length limit and construct the audio representation format based on the identification content field and the audio length limit. The audio representation format is a horizontal bar frame in blue color. The audio time is displayed on the bar frame, and the time is not greater than the audio length limit.

[0025] A picture representation format is constructed based on the identification content field, and the doctor's name and doctor's portrait are set. The doctor's name and doctor's portrait are used to construct a suggestion representation format, wherein the suggestion representation format is a long strip module, which includes the doctor's name, doctor's portrait and treatment suggestions;

[0026] Obtaining average usage time, treatment report date, average evaluation index and average treatment index, and constructing a report presentation format based on the average usage time, treatment report date, average evaluation index and average treatment index;

[0027] A display format set is constructed based on the text representation format, audio representation format, picture representation format, suggestion representation format and report representation format.

[0028] Optionally, the encrypting the real-time data and generating a signature to obtain the encrypted data and the verification signature package includes:

[0029] Perform message type judgment based on the real-time data to obtain the real-time data type;

[0030] When the real-time data type is a picture message, the real-time data is encrypted to obtain encrypted picture data, and the encrypted picture data is converted into encrypted data using a preset data conversion method;

[0031] When the real-time data type is a text message, a voice message, a treatment suggestion, and a treatment report, the real-time data is converted into encrypted data using the data conversion method;

[0032] A signature is generated based on the encrypted data to obtain a verification signature package.

[0033] Optionally, encrypting the real-time data to obtain encrypted image data includes:

[0034] Obtaining a real-time picture based on the real-time data, and acquiring a picture size of the real-time picture, wherein the picture size includes: picture height and picture width;

[0035] Determining whether the real-time image is a square based on the real-time image and the image size;

[0036] If the real-time picture is not a square, the edge is adjusted based on the picture height and the picture width to obtain an adjusted picture, the adjusted size of the adjusted picture is obtained, the real-time picture is updated using the adjusted picture, the picture size is updated by adjusting the size, and the process of returning to the above step of determining whether the real-time picture is a square based on the real-time picture and the picture size is performed;

[0037] If the real-time image is a square, equalization is performed on the real-time image to obtain an enhanced image;

[0038] Establishing a coordinate system, setting an initial segmentation size, and dividing the enhanced image based on the initial segmentation size to obtain a tile set, wherein the tile set consists of non-overlapping rectangular tiles;

[0039] Performing random processing based on the tile set to obtain a random block set, setting a tile horizontal index and a tile vertical index, extracting a pixel horizontal coordinate and a pixel vertical coordinate based on a coordinate system, calculating texture complexity based on the random block set and the rectangular tile, and calculating logarithmic distribution based on the tile horizontal index, the tile vertical index, the pixel horizontal coordinate, the pixel vertical coordinate and the texture complexity:

[0040]

[0041] Among them, y(α, β) refers to the logarithmic distribution with the pixel horizontal coordinate as α and the pixel vertical coordinate as β. Points to the upper integer symbol, U (h,j) Refers to the texture complexity of the tile with horizontal index h and vertical index j;

[0042] Calculate the minimum segmentation size based on the logarithmic distribution and set the segmentation texture threshold;

[0043] Determine whether the texture complexity is greater than the segmentation texture threshold;

[0044] If the texture complexity is greater than the segmentation texture threshold, segmentation is performed based on the minimum segmentation size to obtain segmented blocks, segmentation complexity is calculated based on the segmented blocks, texture complexity is updated using the segmentation complexity, and the process returns to the above step of determining whether the texture complexity is greater than the segmentation texture threshold;

[0045] If the texture complexity is not greater than the segmentation texture threshold, the segmented image blocks are encrypted to obtain encrypted image data.

[0046] Optionally, the calculating the minimum segmentation size based on the logarithmic distribution includes:

[0047] Calculate the minimum segmentation size based on the initial segmentation size and logarithmic distribution:

[0048]

[0049] Wherein, a refers to the minimum segmentation size with the pixel horizontal coordinate as α and the pixel vertical coordinate as β, and s refers to the initial segmentation size.

[0050] Optionally, encrypting the segmented image blocks to obtain encrypted image data includes:

[0051] Get the dynamic key, tile identifier, original pixel horizontal index and original pixel vertical index, and generate an encrypted random number based on the dynamic key, tile identifier, original pixel horizontal index, original pixel vertical index, preset pseudo-random algorithm and random function:

[0052]

[0053] Among them, G refers to the encrypted random number with the original pixel horizontal index x and the original pixel vertical index x, H refers to the pseudo-random algorithm, and J refers to the dynamic key. refers to the XOR operation, W refers to the random function, and K refers to the tile identifier;

[0054] Get the original pixel value, and build an encryption function based on the encrypted random number and the original pixel value:

[0055]

[0056] Wherein, L′ refers to the encryption function with the original pixel horizontal index z and the original pixel vertical index x, L refers to the original pixel value with the original pixel horizontal index z and the original pixel vertical index x, and mod refers to the modulus operation;

[0057] The segmented image blocks are encrypted based on the encryption function to obtain encrypted image data.

[0058] Optionally, the generating a signature based on the encrypted data to obtain a verification signature package includes:

[0059] Set the encryption prefix and calculate the data summary based on the encryption prefix, random function and encrypted data:

[0060] Q=W(Pre+E)

[0061] Among them, Q refers to the data summary, Pre refers to the encryption prefix, and E refers to the encrypted data;

[0062] Set the salt value length threshold to dynamically generate a random salt value based on the preset random number generator and salt value length threshold;

[0063] Obtain the encryption function and the encryption private key, and generate a verification signature based on the random salt value, data digest, encryption function and encryption private key:

[0064] Q1=R key (Q+T)

[0065] Among them, Q1 refers to the verification signature, R refers to the encryption function, key refers to the encryption private key, and T refers to the random salt value;

[0066] Construct a verification signature package based on the random salt value and verification signature:

[0067] Q2={Q1,T}

[0068] Among them, Q2 refers to the verification signature package.

[0069] Optionally, calculating the transmission delay includes:

[0070] Get the processing time and confirmation time, and calculate the protocol delay based on the processing time and confirmation time:

[0071] V=V1+V -

[0072] Among them, V refers to the protocol delay, V1 refers to the processing time, and V2 refers to the confirmation time;

[0073] Obtain network delay, data size and decryption rate, and calculate transmission delay based on the protocol delay, network delay, data size and decryption rate:

[0074]

[0075] Among them, M' refers to the transmission delay, B refers to the network delay, S' refers to the data size, R' refers to the decryption rate, f' refers to the sending delay, and d' refers to the receiving delay.

[0076] To achieve the above object, the present invention also provides a doctor-patient platform instant messaging system, comprising:

[0077] The identity authentication module is used to receive the torque adjustment instruction and start the pre-built system adjustment unit based on the torque adjustment instruction, wherein the system adjustment unit includes: a data acquisition unit, a data transmission unit, an interference estimation unit and a data analysis unit; the data acquisition unit is used to collect the side swing angle and side swing angular velocity of the electric power-assisted bicycle to obtain a transmission data packet set;

[0078] a data updating module, for determining whether the transmission delay is within a preset delay range; if the transmission delay is not within the delay range, setting a data packet size threshold, screening a transmission data packet set based on the data packet size threshold to obtain a standard data packet set and an over-limit data packet set, splitting the over-limit data packets in the over-limit data packet set to obtain an adjusted data packet set, integrating the standard data packet set and the adjusted data packet set to obtain an integrated data packet set, updating the transmission data packet set using the integrated data packet set, and returning to the above step of calculating the transmission delay of the data transmission unit using the transmission data packet set;

[0079] a delay calculation module, configured to transmit the roll angle and the roll angular velocity to the interference estimation unit and calculate an external interference estimation value if the transmission delay is within the delay range;

[0080] The signature verification module is used to use the data transmission unit to transmit the external interference estimation value to the data analysis unit and use the external interference estimation value to calculate the roll angle acceleration; calculate the roll torque based on the roll angle acceleration, and control the torque according to the roll torque and the roll instant communication, and complete the torque adaptive control according to the control torque.

[0081] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0082] A memory storing at least one instruction;

[0083] The processor executes the instructions stored in the memory to implement the above-mentioned doctor-patient platform instant communication method.

[0084] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned doctor-patient platform instant communication method.

[0085] In order to solve the problems described in the background technology, the present invention firstly performs identity authentication based on the MQTT client and the MQTT server, ensures the authenticity of the user's identity by verifying parameters, prevents unauthorized users from entering the system, effectively prevents malicious attackers from obtaining communication permissions, improves the security of the initial connection stage, and provides a basic guarantee for subsequent data encryption and transmission; secondly, determines whether the identity authentication is successful. If the identity authentication fails, the identity authentication process is re-executed. Through the mechanism of multiple verifications, the probability of verification failure due to network fluctuations or incorrect input is reduced, and the system is guaranteed to only allow verified users to perform subsequent operations, thereby fundamentally ensuring the security of user identity; thereafter, defines the identification content field and the message content field, improves the accuracy of message classification management and the scalability of the system, facilitates the subsequent rapid identification and processing of different types of messages, and reduces processing delays; then, pulls historical data, and constructs a The display format set is combined with the message content field to complete the data update, providing a unified and clear data display format, improving the user interaction experience, and the loading of historical data enables doctors and patients to refer to past communication records, improving the continuity and accuracy of communication; then, the real-time data is encrypted before sending it, and a verification signature package is generated. Data encryption ensures the confidentiality of the transmission content and prevents the data from being stolen in the network. The verification signature package ensures the integrity and non-tamperability of the data and avoids attacks by middlemen; further, the transmission delay is calculated and it is determined whether it is within the delay range. If it is not within the delay range, adaptive adjustment is performed to improve the data transmission rate; finally, verification is performed according to the verification signature package to obtain verification data and complete the communication. The verification of the verification signature package further ensures the security, accuracy and privacy of the communication data and prevents malicious tampering; therefore, the present invention can improve the security and privacy of doctor-patient communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 A schematic diagram of a flow chart of an instant communication method for a doctor-patient platform provided by an embodiment of the present invention;

[0087] Figure 2 A functional module diagram of a doctor-patient platform instant messaging system provided by an embodiment of the present invention;

[0088] Figure 3 A schematic diagram of the structure of an electronic device for implementing the instant communication method of the doctor-patient platform provided by an embodiment of the present invention;

[0089] Figure 4 A schematic diagram of message types for implementing the instant communication method of the doctor-patient platform provided by an embodiment of the present invention;

[0090] Figure 5 A schematic diagram of a message content field for implementing the instant communication method of the doctor-patient platform provided by an embodiment of the present invention;

[0091] Figure 6 A schematic diagram of the interface of a doctor-patient instant messaging application for implementing the doctor-patient platform instant messaging method provided in one embodiment of the present invention.

[0092] Description of reference numerals:

[0093] 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.

[0094] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0095] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0096] The embodiment of the present application provides an instant communication method for a medical-patient platform. The execution subject of the instant communication method for the medical-patient platform includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the instant communication method for the medical-patient platform can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0097] Reference Figure 1 FIG. 1 is a flow chart of an instant communication method for a doctor-patient platform provided by an embodiment of the present invention. In this embodiment, the instant communication method for a doctor-patient platform includes:

[0098] S1. Start the doctor-patient instant messaging application, and perform identity authentication based on the pre-built MQTT client, MQTT server and doctor-patient instant messaging application to obtain verification parameters.

[0099] Explainably, the doctor-patient instant communication application refers to an instant communication application for doctors and patients that can realize one-to-many communication, aiming to improve the instant communication service between doctors and patients. The doctor-patient instant communication application includes the doctor side and the patient side. The doctor side refers to the port used by the doctor, and the patient side refers to the port used by the patient. The MQTT client refers to the protocol component used in the doctor-patient instant communication application, which is responsible for connecting to the MQTT server and exchanging information. In the doctor-patient instant communication application, both the patient side and the doctor side need to initialize the MQTT client when the application starts, and use mqtt.connect to establish a connection with the MQTT server. Authentication refers to the MQTT server authenticating through the username and login password provided by the MQTT client. The username and login password are the information set by the user when registering an account in the doctor-patient instant communication application. Verification parameters Refers to the parameter generated after the MQTT server verifies the username and login password. This parameter has four representation forms, namely "wrong username", "wrong login password", "both username and login password are wrong", and "successful login". "Wrong username" means that the username entered when logging into the doctor-patient instant messaging application is different from the username recorded in the MQTT server. "Wrong login password" means that the login password entered when logging into the doctor-patient instant messaging application is different from the login password recorded in the MQTT server. "Both username and login password are wrong" means that the username and login password entered when logging into the doctor-patient instant messaging application are different from the username and login password recorded in the MQTT server. "Successful login" means that the username and login password entered when logging into the doctor-patient instant messaging application are the same as the username and login password recorded in the MQTT server, and the doctor-patient instant messaging application is successfully logged in.

[0100] S2. Determine whether the identity authentication is successful based on the verification parameters.

[0101] It can be understood that when the verification parameter is "login successful", the identity authentication is judged to be successful, and when the verification parameter is "wrong user name", "wrong login password" and "both user name and login password are wrong", the identity authentication is judged to be unsuccessful.

[0102] If authentication fails, return to the above steps to authenticate based on the pre-built MQTT client and MQTT server.

[0103] If the identity authentication is successful, execute S3 and define the identification content field and the message content field.

[0104] It can be explained that the identification content field refers to a field that defines the type of the message, and the message content field refers to a field that defines the content of the message;

[0105] In detail, the definition identification content field and the message content field include:

[0106] Set the identification field id and identification field type, where the identification field id is msgType, and the identification field types include: type 1, type 2, type 3, type 4, and type 5;

[0107] Based on the type 1, type 2, type 3, type 4 and type 5, the message types include: text message, voice message, picture message, treatment suggestion and treatment report, and type 1 corresponds to the text message, type 2 corresponds to the voice message, type 3 corresponds to the picture message, type 4 corresponds to the treatment suggestion, and type 5 corresponds to the treatment report;

[0108] Define identification content fields based on the identification fields id, msgType, identification field type, type 1, type 2, type 3, type 4, type 5, message type, text message, voice message, picture message, treatment suggestion and treatment report;

[0109] Set the message field id and message field type id, where the message field id is msgContent and the message field type ids include: text, audioFile, imgFile, suggest and reportData;

[0110] The message content fields are defined based on the message fields id, msgContent, message field type id, text, audioFile, imgFile, suggest and reportData.

[0111] Explanable, identification field id refers to the name of the identification content field, identification field type refers to the field indicating the message type, including type 1, type 2, type 3, type 4 and type 5, type 1 represents the text message in the message type, message type refers to the parameter describing the form of the message, such as: text message, voice message, etc., text message refers to an ordinary text message, the content is expressed in pure text, type 2 represents voice message, voice message refers to information containing audio content, audio content refers to voice, type 3 represents picture message, picture message refers to information containing pictures, type 4 represents treatment advice, treatment advice refers to the treatment plan given by the doctor, treatment plan refers to the plan given by the doctor after diagnosing the patient, type 5 represents treatment report, treatment report refers to the treatment information related to the patient, you can refer to Figure 4 ,and Figure 4 The 1, 2, 3, 4, and 5 in the table correspond to type 1, type 2, type 3, type 4, and type 5, respectively.

[0112] It can be understood that the message field id refers to the name of the message content field, and the message field type id refers to the field representing the specific content of the message. The message field type id includes: text, audioFile, imgFile, suggest and reportData. Text means that when the identification field type is type 1, the text field in the message content field contains plain text content, which is the text message sent by the user. AudioFile means that when the identification field type is type 2, the audioFile field in the message content field contains the link to the audio file. ImgFile means that when the identification field type is type 3, the imgFile field in the message content field contains the file path of the picture, and the front end displays the picture. Suggest means that when the identification field type is type 4, the suggest field in the message content field contains the doctor's plan and suggestions. ReportData means that when the identification field type is type 5, the reportData field in the message content field contains the patient's treatment data. The identification content field defines the type of message and determines the form of the message. The message content field specifically defines the content of the type defined by the identification content field and provides specific format and information. You can refer to Figure 5 .

[0113] S4. Pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data.

[0114] Explainably, historical data refers to the data of historical communication between doctors and patients in the doctor-patient instant messaging application. For example, the current date is October 20, 2024. On October 18, 2024, the patient Xiao Zhang communicated with the doctor in the doctor-patient instant messaging application. On October 20, 2024, the information on October 18, 2024 is historical data. The display format set refers to a set of display methods. The display method refers to the method of displaying information. Update data refers to unread information sent by doctors or patients. For example, when a doctor sends a message to a patient, the information that occurs is unread information. The patient starts the doctor-patient instant messaging application, and the doctor-patient instant messaging application will update the data to obtain updated data.

[0115] In detail, the constructing of the display format set based on the identification content field includes:

[0116] Setting a text limit, and constructing a text representation format based on the identified content field and the text limit, wherein the text representation format is a text box that supports inputting multiple lines of text, and will automatically wrap when a single line of input text exceeds the text limit;

[0117] Set the audio length limit and construct the audio representation format based on the identification content field and the audio length limit. The audio representation format is a horizontal bar frame in blue color. The audio time is displayed on the bar frame, and the time is not greater than the audio length limit.

[0118] A picture representation format is constructed based on the identification content field, and the doctor's name and doctor's portrait are set. The doctor's name and doctor's portrait are used to construct a suggestion representation format, wherein the suggestion representation format is a long strip module, which includes the doctor's name, doctor's portrait and treatment suggestions;

[0119] Obtaining average usage time, treatment report date, average evaluation index and average treatment index, and constructing a report presentation format based on the average usage time, treatment report date, average evaluation index and average treatment index;

[0120] A display format set is constructed based on the text representation format, audio representation format, picture representation format, suggestion representation format and report representation format.

[0121] Explanatory: text limit refers to the limit on the number of words. When the number in a line exceeds the text limit, it will automatically wrap. Text representation format refers to the format for representing messages whose message type is text message. Audio length limit refers to the limit on the duration of audio information, which is 60s. For example, the duration of an audio message is 59s. Audio representation format refers to the format for representing messages whose message type is voice message. Picture representation format refers to the format for representing messages whose message type is picture message. Doctor name refers to the name of the doctor. Doctor avatar refers to the avatar of the doctor in the doctor-patient instant messaging application. It is recommended to represent Format refers to the format for presenting messages with the message type of treatment advice, average usage duration refers to the average daily treatment duration in the treatment report date, and the treatment report date refers to the treatment time, such as October 21, 2018 to October 27, 2018. Average evaluation index refers to the index for evaluating the disease, for example, the disease is sleep apnea hypopnea syndrome, and the average evaluation index is AHI. Average treatment index refers to the index for evaluating the treatment effect, for example, the average treatment index is the average leakage volume. Report presentation format refers to the format for presenting messages with the message type of treatment report. For details, please refer to Figure 6 .

[0122] S5. Send real-time data based on the updated data, encrypt the real-time data and generate a signature to obtain encrypted data and a verification signature package.

[0123] Interpretable, real-time data refers to the information currently sent by the doctor or patient, data format refers to the format of real-time data, format judgment of real-time data refers to judging the format of real-time data, and the format is the message type, including: text message, voice message, picture message, treatment advice and treatment report, data encryption and signature generation based on data format refers to encrypting real-time data according to the data format obtained after format judgment, signature generation refers to generating a signature for verifying the integrity and authenticity of real-time data, encrypted data refers to data obtained after format conversion of real-time data, and the converted format is Base64 encoding format, verification signature package refers to a set formed by verification signature and random salt value, verification signature refers to a signature for verifying the integrity and authenticity of real-time data, random salt value refers to a random value generated according to the salt value length threshold and the random number generator, salt value length threshold refers to a value that limits the length of the generated random salt value, the salt value length threshold is 16 bytes, and the random number generator refers to SecureRandom.

[0124] In detail, the real-time data is encrypted and a signature is generated to obtain an encrypted data and a verification signature package, including:

[0125] Perform message type judgment based on the real-time data to obtain the real-time data type;

[0126] When the real-time data type is a picture message, the real-time data is encrypted to obtain encrypted picture data, and the encrypted picture data is converted into encrypted data using a preset data conversion method;

[0127] When the real-time data type is a text message, a voice message, a treatment suggestion, and a treatment report, the real-time data is converted into encrypted data using the data conversion method;

[0128] A signature is generated based on the encrypted data to obtain a verification signature package.

[0129] Explainable, the real-time data type refers to the message type of the real-time data, the encrypted picture data refers to the data obtained by encrypting the real-time data type when the real-time data type is a picture message, and the data conversion method refers to the btoa (Binary to ASCII) method.

[0130] In detail, the real-time data is encrypted to obtain encrypted picture data, including:

[0131] Obtaining a real-time picture based on the real-time data, and acquiring a picture size of the real-time picture, wherein the picture size includes: picture height and picture width;

[0132] Determining whether the real-time image is a square based on the real-time image and the image size;

[0133] If the real-time picture is not a square, the edge is adjusted based on the picture height and the picture width to obtain an adjusted picture, the adjusted size of the adjusted picture is obtained, the real-time picture is updated using the adjusted picture, the picture size is updated by adjusting the size, and the process of returning to the above step of determining whether the real-time picture is a square based on the real-time picture and the picture size is performed;

[0134] If the real-time image is a square, equalization is performed on the real-time image to obtain an enhanced image;

[0135] Establishing a coordinate system, setting an initial segmentation size, and dividing the enhanced image based on the initial segmentation size to obtain a tile set, wherein the tile set consists of non-overlapping rectangular tiles;

[0136] Performing random processing based on the tile set to obtain a random block set, setting a tile horizontal index and a tile vertical index, extracting a pixel horizontal coordinate and a pixel vertical coordinate based on a coordinate system, calculating texture complexity based on the random block set and the rectangular tile, and calculating logarithmic distribution based on the tile horizontal index, the tile vertical index, the pixel horizontal coordinate, the pixel vertical coordinate and the texture complexity:

[0137]

[0138] Among them, y(α, β) refers to the logarithmic distribution with the pixel horizontal coordinate as α and the pixel vertical coordinate as β. Points to the upper integer symbol, U (h,j) Refers to the texture complexity of the tile with horizontal index h and vertical index j;

[0139] Calculate the minimum segmentation size based on the logarithmic distribution and set the segmentation texture threshold;

[0140] Determine whether the texture complexity is greater than the segmentation texture threshold;

[0141] If the texture complexity is greater than the segmentation texture threshold, segmentation is performed based on the minimum segmentation size to obtain segmented blocks, segmentation complexity is calculated based on the segmented blocks, texture complexity is updated using the segmentation complexity, and the process returns to the above step of determining whether the texture complexity is greater than the segmentation texture threshold;

[0142] If the texture complexity is not greater than the segmentation texture threshold, the segmented image blocks are encrypted to obtain encrypted image data.

[0143] Explainable, real-time picture refers to the picture when the real-time data type is picture message, picture size refers to the size of the real-time picture, picture size includes: picture height and picture width, picture height refers to the height of the real-time picture, picture width refers to the width of the real-time picture, adjusted picture refers to the picture obtained by edge adjustment of a real-time picture that is not a square, edge adjustment of a real-time picture that is not a square refers to filling a real-time picture that is not a square so that the picture size of the real-time picture is a square, enhanced picture refers to the picture obtained by histogram equalization of the real-time picture, coordinate system refers to a plane coordinate system established based on the enhanced picture, established with the upper left vertex of the enhanced picture as the origin, initial segmentation size refers to the pre-set size for dividing the enhanced picture, which is a fixed value, tile set refers to a set formed by rectangular tiles, rectangular tiles refer to tiles obtained by dividing the enhanced picture, and random block set refers to the tile set obtained by random processing Set, shuffle refers to randomly shuffling the rectangular tiles in the tile set, tile horizontal index and tile vertical index both refer to parameters used to traverse the rectangular tiles, pixel horizontal coordinate refers to the horizontal coordinate in the coordinate system, pixel vertical coordinate refers to the vertical coordinate in the coordinate system, texture complexity refers to the complexity of pixel distribution in the rectangular tile, logarithmic distribution refers to a value calculated by texture complexity, which is an integer rounded up and is used to represent the complexity of pixels, minimum segmentation size refers to the minimum size required to capture the pixel distribution of a rectangular tile, segmentation texture threshold refers to the pre-set texture complexity for segmenting a rectangular tile, if the texture complexity of a rectangular tile is greater than the segmentation texture threshold, it means that the complexity of the pixel distribution in the rectangular tile is too complex and can still be segmented, segmented tile refers to the tile obtained by segmenting a rectangular tile whose texture complexity is greater than the segmentation texture threshold, and segmentation complexity refers to the texture complexity of the segmented tile.

[0144] In detail, the calculating the minimum segmentation size based on the logarithmic distribution includes:

[0145] Calculate the minimum segmentation size based on the initial segmentation size and logarithmic distribution:

[0146]

[0147] Wherein, a refers to the minimum segmentation size with the pixel horizontal coordinate as α and the pixel vertical coordinate as β, and s refers to the initial segmentation size.

[0148] In detail, the step of encrypting the segmented image blocks to obtain encrypted image data includes:

[0149] Get the dynamic key, tile identifier, original pixel horizontal index and original pixel vertical index, and generate an encrypted random number based on the dynamic key, tile identifier, original pixel horizontal index, original pixel vertical index, preset pseudo-random algorithm and random function:

[0150]

[0151] Among them, G refers to the encrypted random number with the original pixel horizontal index z and the original pixel vertical index x, H refers to the pseudo-random algorithm, and J refers to the dynamic key. refers to the XOR operation, W refers to the random function, and K refers to the tile identifier;

[0152] Get the original pixel value, and build an encryption function based on the encrypted random number and the original pixel value:

[0153]

[0154] Wherein, L′ refers to the encryption function with the original pixel horizontal index z and the original pixel vertical index x, L refers to the original pixel value with the original pixel horizontal index z and the original pixel vertical index x, and mod refers to the modulus operation;

[0155] The segmented image blocks are encrypted based on the encryption function to obtain encrypted image data.

[0156] Explainable, dynamic key refers to the key obtained by texture complexity calculation, tile identifier refers to the symbol for identifying the segmented tile, generated by UUID, original pixel horizontal index refers to the horizontal coordinate for traversing the pixels of the segmented tile, original pixel vertical index refers to the vertical coordinate for traversing the pixels of the segmented tile, pseudo-random algorithm refers to PRNG, random function refers to the hash function SHA-256, encrypted random number refers to a pseudo-random number generated by the pseudo-random algorithm PRNG and used to encrypt the segmented tile, original pixel value refers to the original pixel value of the segmented tile, encryption function refers to the function for encrypting the segmented tile.

[0157] In detail, the generating of a signature based on the encrypted data to obtain a verification signature package includes:

[0158] Set the encryption prefix and calculate the data summary based on the encryption prefix, random function and encrypted data:

[0159] Q=W(Pre+E)

[0160] Among them, Q refers to the data summary, Pre refers to the encryption prefix, and E refers to the encrypted data;

[0161] Set the salt value length threshold to dynamically generate a random salt value based on the preset random number generator and salt value length threshold;

[0162] Obtain the encryption function and the encryption private key, and generate a verification signature based on the random salt value, data digest, encryption function and encryption private key:

[0163] Q1=R key (Q+T)

[0164] Among them, Q1 refers to the verification signature, R refers to the encryption function, key refers to the encryption private key, and T refers to the random salt value;

[0165] Construct a verification signature package based on the random salt value and verification signature:

[0166] Q2={Q1,T}

[0167] Among them, Q2 refers to the verification signature package.

[0168] It can be explained that the encryption prefix refers to the prefix indicating the data type, the data summary refers to a unique identifier of a fixed length generated by the summary function, which is used to identify the encrypted data, the encryption function refers to RSA, and the encryption private key refers to an asymmetric encryption private key, which is used to encrypt the data summary and generate the verification signature.

[0169] S6. Send data based on the encrypted data and the verification signature package, and calculate the transmission delay.

[0170] To explain, transmission delay refers to the delay in sending data.

[0171] In detail, the calculation of the transmission delay includes:

[0172] Get the processing time and confirmation time, and calculate the protocol delay based on the processing time and confirmation time:

[0173] V=V1+V2

[0174] Among them, V refers to the protocol delay, V1 refers to the processing time, and V2 refers to the confirmation time;

[0175] Obtain network delay, data size and decryption rate, and calculate transmission delay based on the protocol delay, network delay, data size and decryption rate:

[0176]

[0177] Among them, M' refers to the transmission delay, B refers to the network delay, S' refers to the data size, R' refers to the decryption rate, f' refers to the sending delay, and d' refers to the receiving delay.

[0178] To explain, processing time refers to the time it takes for the MQTT client to send encrypted data to the MQTT server, confirmation time refers to the time it takes for the MQTT server to process the encrypted data after receiving it, network latency refers to the time it takes for the encrypted data to travel from the sender to the receiver, sender refers to the port that sends data, receiver refers to the port that receives data, data size refers to the size of the encrypted data, and decryption rate refers to the rate at which the encrypted data is decrypted.

[0179] S7. Determine whether the transmission delay is within a preset delay range.

[0180] It can be explained that the delay range refers to a pre-set range of transmission delays.

[0181] If the transmission delay is not within the delay range, execute S8, perform adaptive adjustment and perform verification according to the verification signature package to obtain verification data.

[0182] It can be explained that adaptive adjustment refers to dynamically selecting a network path for transmitting data, selecting a network path based on network conditions, a network path refers to a series of network nodes and links from the sender to the receiver in the network, the network condition refers to the delay, bandwidth and packet loss rate of the network path, and verification data refers to data obtained after verification based on the verification signature package.

[0183] If the transmission delay is within the delay range, S9 is executed to perform verification according to the verification signature package to obtain verification data and complete the communication.

[0184] In order to solve the problems described in the background technology, the present invention firstly performs identity authentication based on the MQTT client and the MQTT server, ensures the authenticity of the user's identity by verifying parameters, prevents unauthorized users from entering the system, effectively prevents malicious attackers from obtaining communication permissions, improves the security of the initial connection stage, and provides a basic guarantee for subsequent data encryption and transmission; secondly, determines whether the identity authentication is successful. If the identity authentication fails, the identity authentication process is re-executed. Through the mechanism of multiple verifications, the probability of verification failure due to network fluctuations or incorrect input is reduced, and the system is guaranteed to only allow verified users to perform subsequent operations, thereby fundamentally ensuring the security of user identity; thereafter, defines the identification content field and the message content field, improves the accuracy of message classification management and the scalability of the system, facilitates the subsequent rapid identification and processing of different types of messages, and reduces processing delays; then, pulls historical data, and constructs a The display format set is combined with the message content field to complete the data update, providing a unified and clear data display format, improving the user interaction experience, and the loading of historical data enables doctors and patients to refer to past communication records, improving the continuity and accuracy of communication; then, the real-time data is encrypted before sending it, and a verification signature package is generated. Data encryption ensures the confidentiality of the transmission content and prevents the data from being stolen in the network. The verification signature package ensures the integrity and non-tamperability of the data and avoids attacks by middlemen; further, the transmission delay is calculated and it is determined whether it is within the delay range. If it is not within the delay range, adaptive adjustment is performed to improve the data transmission rate; finally, verification is performed according to the verification signature package to obtain verification data and complete the communication. The verification of the verification signature package further ensures the security, accuracy and privacy of the communication data and prevents malicious tampering; therefore, the present invention can improve the security and privacy of doctor-patient communication.

[0185] like Figure 2, which is a functional module diagram of a doctor-patient platform instant messaging system provided by an embodiment of the present invention.

[0186] The instant communication system 100 for the medical-patient platform of the present invention can be installed in an electronic device. According to the functions to be implemented, the instant communication system 100 for the medical-patient platform can include an identity authentication module 101, a data update module 102, a delay calculation module 103 and a signature verification module 104. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.

[0187] The identity authentication module 101 is used to start the doctor-patient instant communication application, and perform identity authentication based on the pre-built MQTT client, MQTT server and doctor-patient instant communication application to obtain verification parameters; determine whether the identity authentication is successful based on the verification parameters; if the identity authentication fails, return to the above-mentioned step of performing identity authentication based on the pre-built MQTT client and MQTT server; if the identity authentication is successful, define the identification content field and the message content field;

[0188] The data update module 102 is used to pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data;

[0189] The delay calculation module 103 is used to send real-time data based on the update data, encrypt the real-time data and generate a signature to obtain encrypted data and a verification signature package; send data based on the encrypted data and the verification signature package, and calculate the transmission delay;

[0190] The signature verification module 104 is used to determine whether the transmission delay is within a preset delay range; if the transmission delay is not within the delay range, adaptive adjustment is performed and verification is performed according to the verification signature package to obtain verification data; if the transmission delay is within the delay range, verification is performed according to the verification signature package to obtain verification data and complete the communication.

[0191] In detail, the modules in the instant messaging system 100 for the medical platform described in the embodiment of the present invention are used in the same manner as described above. Figure 1 The technical means are the same as the instant communication method of the medical-patient platform described in, and can produce the same technical effects, so I will not go into details here.

[0192] like Figure 3 , which is a schematic diagram of the structure of an electronic device for implementing an instant communication method between a doctor and a patient platform provided by an embodiment of the present invention.

[0193] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a doctor-patient platform instant communication method program.

[0194] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 11 can be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 can also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the doctor-patient platform instant communication method program, etc., but also can be used to temporarily store data that has been output or is to be output.

[0195] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as doctor-patient platform instant communication method programs, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0196] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0197] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0198] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0199] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0200] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0201] The doctor-patient platform instant communication method program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0202] Start the doctor-patient instant messaging application, and perform identity authentication based on the pre-built MQTT client, MQTT server, and doctor-patient instant messaging application to obtain verification parameters;

[0203] Determine whether the identity authentication is successful based on the verification parameters;

[0204] If the authentication fails, return to the above steps of authentication based on the pre-built MQTT client and MQTT server;

[0205] If the identity authentication is successful, the identification content field and the message content field are defined;

[0206] Pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data;

[0207] Sending real-time data based on the update data, encrypting the real-time data and generating a signature to obtain encrypted data and a verification signature package;

[0208] Sending data based on the encrypted data and the verification signature package, and calculating the transmission delay;

[0209] Determining whether the transmission delay is within a preset delay range;

[0210] If the transmission delay is not within the delay range, adaptive adjustment is performed and verification is performed according to the verification signature package to obtain verification data;

[0211] If the transmission delay is within the delay range, verification is performed according to the verification signature package to obtain verification data and complete the communication.

[0212] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0213] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0214] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0215] Start the doctor-patient instant messaging application, and perform identity authentication based on the pre-built MQTT client, MQTT server, and doctor-patient instant messaging application to obtain verification parameters;

[0216] Determine whether the identity authentication is successful based on the verification parameters;

[0217] If the authentication fails, return to the above steps of authentication based on the pre-built MQTT client and MQTT server;

[0218] If the identity authentication is successful, the identification content field and the message content field are defined;

[0219] Pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data;

[0220] Sending real-time data based on the update data, encrypting the real-time data and generating a signature to obtain encrypted data and a verification signature package;

[0221] Sending data based on the encrypted data and the verification signature package, and calculating the transmission delay;

[0222] Determining whether the transmission delay is within a preset delay range;

[0223] If the transmission delay is not within the delay range, adaptive adjustment is performed and verification is performed according to the verification signature package to obtain verification data;

[0224] If the transmission delay is within the delay range, verification is performed according to the verification signature package to obtain verification data and complete the communication.

[0225] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.

[0226] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0227] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0228] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0229] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A doctor-patient platform instant communication method, characterized in that: The method comprises: Start the doctor-patient instant messaging application, and perform identity authentication based on the pre-built MQTT client, MQTT server, and doctor-patient instant messaging application to obtain verification parameters; Determine whether the identity authentication is successful based on the verification parameters; If the authentication fails, return to the above steps of authentication based on the pre-built MQTT client and MQTT server; If the identity authentication is successful, the identification content field and the message content field are defined; Pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data; Sending real-time data based on the update data, encrypting the real-time data and generating a signature to obtain encrypted data and a verification signature package; Sending data based on the encrypted data and the verification signature package, and calculating the transmission delay; Determining whether the transmission delay is within a preset delay range; If the transmission delay is not within the delay range, adaptive adjustment is performed and verification is performed according to the verification signature package to obtain verification data; If the transmission delay is within the delay range, verification is performed according to the verification signature package to obtain verification data and complete the communication.

2. The doctor-patient platform instant communication method according to claim 1, characterized in that: The definition identification content field and the message content field include: Set the identification field id and identification field type, where the identification field id is msgType, and the identification field types include: type 1, type 2, type 3, type 4, and type 5; Based on the type 1, type 2, type 3, type 4 and type 5, the message types include: text message, voice message, picture message, treatment suggestion and treatment report, and type 1 corresponds to the text message, type 2 corresponds to the voice message, type 3 corresponds to the picture message, type 4 corresponds to the treatment suggestion, and type 5 corresponds to the treatment report; Define identification content fields based on the identification fields id, msgType, identification field type, type 1, type 2, type 3, type 4, type 5, message type, text message, voice message, picture message, treatment suggestion and treatment report; Set the message field id and message field type id, where the message field id is msgContent and the message field type ids include: text, audioFile, imgFile, suggest and reportData; The message content fields are defined based on the message fields id, msgContent, message field type id, text, audioFile, imgFile, suggest and reportData.

3. The doctor-patient platform instant communication method according to claim 2, characterized in that: The constructing of a display format set based on the identification content field includes: Setting a text limit, and constructing a text representation format based on the identified content field and the text limit, wherein the text representation format is a text box that supports inputting multiple lines of text, and will automatically wrap when a single line of input text exceeds the text limit; Set the audio length limit and construct the audio representation format based on the identification content field and the audio length limit. The audio representation format is a horizontal bar frame in blue color. The audio time is displayed on the bar frame, and the time is not greater than the audio length limit. A picture representation format is constructed based on the identification content field, and the doctor's name and doctor's portrait are set. The doctor's name and doctor's portrait are used to construct a suggestion representation format, wherein the suggestion representation format is a long strip module, which includes the doctor's name, doctor's portrait and treatment suggestions; Obtaining average usage time, treatment report date, average evaluation index and average treatment index, and constructing a report presentation format based on the average usage time, treatment report date, average evaluation index and average treatment index; A display format set is constructed based on the text representation format, audio representation format, picture representation format, suggestion representation format and report representation format.

4. The doctor-patient platform instant communication method according to claim 3, characterized in that: The method of encrypting the real-time data and generating a signature to obtain the encrypted data and the verification signature package includes: Perform message type judgment based on the real-time data to obtain the real-time data type; When the real-time data type is a picture message, the real-time data is encrypted to obtain encrypted picture data, and the encrypted picture data is converted into encrypted data using a preset data conversion method; When the real-time data type is a text message, a voice message, a treatment suggestion, and a treatment report, the real-time data is converted into encrypted data using the data conversion method; A signature is generated based on the encrypted data to obtain a verification signature package.

5. The doctor-patient platform instant communication method according to claim 4, characterized in that: The step of encrypting the real-time data to obtain encrypted picture data includes: Obtaining a real-time picture based on the real-time data, and acquiring a picture size of the real-time picture, wherein the picture size includes: picture height and picture width; Determining whether the real-time image is a square based on the real-time image and the image size; If the real-time picture is not a square, the edge is adjusted based on the picture height and the picture width to obtain an adjusted picture, the adjusted size of the adjusted picture is obtained, the real-time picture is updated using the adjusted picture, the picture size is updated by adjusting the size, and the process of returning to the above step of determining whether the real-time picture is a square based on the real-time picture and the picture size is performed; If the real-time image is a square, equalization is performed on the real-time image to obtain an enhanced image; Establishing a coordinate system, setting an initial segmentation size, and dividing the enhanced image based on the initial segmentation size to obtain a tile set, wherein the tile set consists of non-overlapping rectangular tiles; Performing random processing based on the tile set to obtain a random block set, setting a tile horizontal index and a tile vertical index, extracting a pixel horizontal coordinate and a pixel vertical coordinate based on a coordinate system, calculating texture complexity based on the random block set and the rectangular tile, and calculating logarithmic distribution based on the tile horizontal index, the tile vertical index, the pixel horizontal coordinate, the pixel vertical coordinate and the texture complexity: Among them, y(α, β) refers to the logarithmic distribution with the pixel horizontal coordinate as α and the pixel vertical coordinate as β. Points to the upper integer symbol, U (h,j) Refers to the texture complexity of the tile with horizontal index h and vertical index j; Calculate the minimum segmentation size based on the logarithmic distribution and set the segmentation texture threshold; Determine whether the texture complexity is greater than the segmentation texture threshold; If the texture complexity is greater than the segmentation texture threshold, segmentation is performed based on the minimum segmentation size to obtain segmented blocks, segmentation complexity is calculated based on the segmented blocks, texture complexity is updated using the segmentation complexity, and the process returns to the above step of determining whether the texture complexity is greater than the segmentation texture threshold; If the texture complexity is not greater than the segmentation texture threshold, the segmented image blocks are encrypted to obtain encrypted image data.

6. The doctor-patient platform instant communication method according to claim 5, characterized in that: The calculating the minimum segmentation size based on the logarithmic distribution includes: Calculate the minimum segmentation size based on the initial segmentation size and logarithmic distribution: Wherein, A refers to the minimum segmentation size with the pixel horizontal coordinate as α and the pixel vertical coordinate as β, and s refers to the initial segmentation size.

7. The doctor-patient platform instant communication method according to claim 6, characterized in that: The step of encrypting the segmented image blocks to obtain encrypted image data includes: Get the dynamic key, tile identifier, original pixel horizontal index and original pixel vertical index, and generate an encrypted random number based on the dynamic key, tile identifier, original pixel horizontal index, original pixel vertical index, preset pseudo-random algorithm and random function: G z,x =H(J⊕W(K)) Wherein, G refers to the encrypted random number with the original pixel horizontal index z and the original pixel vertical index x, H refers to the pseudo-random algorithm, J refers to the dynamic key, ⊕ refers to the XOR operation, W refers to the random function, and K refers to the tile identifier; Get the original pixel value, and build an encryption function based on the encrypted random number and the original pixel value: L' z,x =(L z,x ⊕G z,x )mod256 Wherein, L′ refers to the encryption function with the original pixel horizontal index z and the original pixel vertical index x, L refers to the original pixel value with the original pixel horizontal index z and the original pixel vertical index x, and mod refers to the modulus operation; The segmented image blocks are encrypted based on the encryption function to obtain encrypted image data.

8. The doctor-patient platform instant communication method according to claim 7, characterized in that: The generating of a signature based on the encrypted data to obtain a verification signature package includes: Set the encryption prefix and calculate the data summary based on the encryption prefix, random function and encrypted data: Q=W(Pre+E) Among them, Q refers to the data summary, Pre refers to the encryption prefix, and E refers to the encrypted data; Set the salt value length threshold to dynamically generate a random salt value based on the preset random number generator and salt value length threshold; Obtain the encryption function and the encryption private key, and generate a verification signature based on the random salt value, data digest, encryption function and encryption private key: Q1=R key (Q+T) Among them, Q1 refers to the verification signature, r refers to the encryption function, key refers to the encryption private key, and T refers to the random salt value; Construct a verification signature package based on the random salt value and verification signature: Q2={Q1,T} Among them, Q2 refers to the verification signature package.

9. The doctor-patient platform instant communication method according to claim 8, characterized in that: The calculating of the transmission delay comprises: Get the processing time and confirmation time, and calculate the protocol delay based on the processing time and confirmation time: V=V1+V2 Among them, V refers to the protocol delay, V1 refers to the processing time, and V2 refers to the confirmation time; Obtain network delay, data size and decryption rate, and calculate transmission delay based on the protocol delay, network delay, data size and decryption rate: Among them, M' refers to the transmission delay, B refers to the network delay, S' refers to the data size, R' refers to the decryption rate, f' refers to the sending delay, and d' refers to the receiving delay.

10. A doctor-patient platform instant messaging system, characterized in that: The system comprises: The identity authentication module is used to start the doctor-patient instant communication application, and perform identity authentication based on the pre-built MQTT client, MQTT server and doctor-patient instant communication application to obtain verification parameters; determine whether the identity authentication is successful based on the verification parameters; if the identity authentication fails, return to the above-mentioned steps of performing identity authentication based on the pre-built MQTT client and MQTT server; if the identity authentication is successful, define the identification content field and the message content field; A data update module, used to pull historical data, build a display format set based on the identification content field, and update data based on the display format set and the message content field to obtain updated data; A delay calculation module, used to send real-time data based on the update data, encrypt the real-time data and generate a signature to obtain encrypted data and a verification signature package; send data based on the encrypted data and the verification signature package, and calculate the transmission delay; The signature verification module is used to determine whether the transmission delay is within a preset delay range; if the transmission delay is not within the delay range, adaptive adjustment is performed and verification is performed according to the verification signature package to obtain verification data; if the transmission delay is within the delay range, verification is performed according to the verification signature package to obtain verification data and complete the communication.

Citation Information

Patent Citations

  • Medical orders releasing and querying method and system thereof

    CN103093083A

  • Telemedicine system authentication method

    CN108959873A

  • Instant message encryption system based on commercial cryptographic algorithm in medical field

    CN115001713A

  • Medical data management method based on Internet of Things

    CN116825259A

  • First-aid management system and method for multi-terminal cooperation video real-time interaction

    CN117352156A