Data encryption processing method and device for medical question and answer large model and medium

By constructing a large medical question-and-answer model and connecting it with the hospital's case database, and changing the desensitization parameters in real time and performing data security self-checks, the problem of simple data encryption and the inability to verify tampering in existing technologies is solved, thus achieving security and accuracy in data transmission and storage.

CN120910883BActive Publication Date: 2026-02-17SHANGHAI MEISI PHARM TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511042159.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-02-17
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

Existing medical Q&A big data encryption technologies are relatively simple in the de-identification process and cannot verify whether the data has been tampered with, which may lead to users receiving incorrect treatment plans and poses a serious security risk.

Method used

A large-scale medical question-and-answer model is built and connected to the hospital's case database. Sensitive data is identified and dynamically de-identified, and de-identification parameters are changed in real time. Combined with data security self-checks, the security of data transmission and storage is ensured.

Benefits of technology

This improves the security and effectiveness of encryption for large-scale medical question-answering models, prevents incorrect identity information from causing the models to output incorrect results, and ensures that data is not tampered with during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910883B_ABST
    Figure CN120910883B_ABST
Patent Text Reader

Abstract

The application discloses a data encryption processing method and device for a medical question and answer large model and a medium, relates to the technical field of data encryption, and comprises the following steps: constructing a medical question and answer large model; a user inputs question text to the medical question and answer large model, and the medical question and answer large model outputs answer text in combination with a hospital case database; sensitive data identification is performed on the identity information, question text and answer text of the user; dynamic desensitization processing is performed on the sensitive data, and the desensitization parameters in the dynamic desensitization processing are changed in real time based on the question text input by the user during the dynamic desensitization processing; the desensitized identity information, question text and answer text are transmitted and stored; and the application is used for solving the problems that the existing data encryption technology of the medical question and answer large model is relatively simple in the desensitization mode, the data is not verified whether it is tampered with, and the user is easily provided with incorrect guidance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of data encryption, and particularly relates to a data encryption processing method and device for a medical question and answer large model and a medium. BACKGROUND

[0002] Application of data encryption technology in a medical question and answer large model refers to full-process protection of medical data storage, transmission and calculation through a cryptography method, so that sensitive information is in a "available but invisible" state in model training and reasoning, and a technical system meeting medical compliance is ensured.

[0003] The medical question and answer large model is a big data model constructed for the convenience of patients to quickly query the best treatment plan according to their own symptoms, and involves personal information and current symptoms of patients. Such data is personal privacy of patients and needs to be protected through data encryption technology. The existing data encryption technology applied in the medical question and answer large model usually completes the security protection of private data in a sensitive data desensitization manner. However, in desensitization, private data is usually randomly replaced or hidden to achieve the effect of data desensitization. Such a method may affect the judgment of the medical question and answer large model when being transmitted to the medical question and answer large model, and cannot confirm whether the data is tampered with in the transmission process. If the data is tampered with, not only will the result output by the medical question and answer large model be wrong, but also the user will use medicine according to the wrong guidance. If the user uses medicine according to the wrong guidance, the consequences are unpredictable. Therefore, it is necessary to ensure the safety of data in the transmission and storage process. For example, in the patent application with the publication number CN119476490A, a "medical large language question and answer method based on diagnosis and treatment data desensitization" is disclosed. The scheme does not verify the transmitted data, and cannot guarantee that the received data is not tampered with. If the data is tampered with, very serious consequences will be caused. The existing data encryption technology of the medical question and answer large model also has the problems of simple desensitization manner and no verification of whether the data is tampered with, which leads to the problem that the user is easily provided with wrong guidance. SUMMARY

[0004] The present application aims to at least solve one of the technical problems in the prior art, by constructing a medical question and answer large model, establishing a data connection between the medical question and answer large model and a hospital case database, inputting question text to the medical question and answer large model by a user, outputting answer text by the medical question and answer large model in combination with the hospital case database, then performing sensitive data identification on the identity information, question text and answer text of the user, changing desensitization parameters in dynamic desensitization processing in real time based on the question text input by the user, performing dynamic desensitization processing on sensitive data through the desensitization parameters, finally transmitting and storing the desensitized identity information, question text and answer text, and when restoring the desensitized data, performing data security self-checking on the desensitized data, to solve the problems that the existing medical question and answer large model data encryption technology still has a relatively simple desensitization method and does not verify whether the data is tampered with, leading to the problem that incorrect guidance is easily provided for the user.

[0005] To achieve the above-mentioned purpose, in a first aspect, the present application provides a data encryption processing method for a medical question and answer large model, comprising the following steps:

[0006] Constructing a medical question and answer large model, and establishing a data connection between the medical question and answer large model and a hospital case database;

[0007] Inputting question text to the medical question and answer large model by a user, and outputting answer text by the medical question and answer large model in combination with the hospital case database;

[0008] Performing sensitive data identification on the identity information, question text and answer text of the user;

[0009] Performing dynamic desensitization processing on sensitive data, and changing desensitization parameters in dynamic desensitization processing in real time based on the question text input by the user during the dynamic desensitization processing;

[0010] Transmitting and storing the desensitized identity information, question text and answer text.

[0011] Further, after establishing a data connection between the medical question and answer large model and the hospital case database, the medical question and answer large model will read the case information of the user in the hospital case database according to the identity information of the user.

[0012] Further, the user inputs question text to the medical question and answer large model, and the medical question and answer large model outputs answer text in combination with the hospital case database, comprising the following sub-steps:

[0013] When the user inputs question text to the medical question and answer large model, the medical question and answer large model will synchronously acquire the identity information of the user, and the question text and identity information both need to be desensitized before being transmitted and stored;

[0014] After receiving the question text and identity information, the medical question-answering model extracts the user's medical case information from the hospital's medical case database based on the identity information. The medical case information includes current cases and historical cases. The medical question-answering model can combine the user's question text and medical case information to generate corresponding answer text for the user's question text.

[0015] The answer text must be de-identified before it can be transmitted and stored.

[0016] Furthermore, the sensitive data identification of the user's identity information, question text, and answer text includes the following sub-steps:

[0017] The question and answer texts are identified using a sensitive identification model, which marks medical and disease-related terms in the question and answer texts as sensitive data.

[0018] All of the identity information mentioned is sensitive data.

[0019] Furthermore, the dynamic desensitization processing of sensitive data, which involves changing the desensitization parameters in real time based on the user-inputted question text during the dynamic desensitization process, includes the following sub-steps:

[0020] The desensitization parameters in the dynamic desensitization process are changed in real time based on the user-input question text.

[0021] Sensitive data is dynamically desensitized using desensitization parameters.

[0022] Furthermore, the dynamic desensitization parameters in the desensitization process, which are changed in real time based on the user-input question text, include the following sub-steps:

[0023] Get the number of question texts sent by the user, and mark it as N1;

[0024] Get the number of sensitive data in the latest issue text and label it as N2;

[0025] Get the number of sensitive data in N1 question texts and mark it as N3;

[0026] Calculate [(N1+N2)×N3] 4 Name the calculation result the desensitization parameter;

[0027] Each time a user enters question text, N1, N2, and N3 are updated synchronously, and the desensitization parameters are recalculated.

[0028] Furthermore, the dynamic desensitization processing of sensitive data through desensitization parameters includes the following sub-steps:

[0029] Acquire the latest desensitization parameter, named as the latest key, name the sensitive data of the latest input question text and the sensitive data of the latest output answer text as the latest data;

[0030] For any latest data, convert the latest data into hexadecimal format after UTF-8 encoding and then into decimal format, and obtain data encoding;

[0031] Number the digits in the data encoding in the order from left to right, and represent by the symbol S i , wherein i is a non-zero natural number and i is the serial number of S, number the digits in the latest key in the order from left to right, and represent by the symbol P j , wherein j is a non-zero natural number and j is the serial number of P;

[0032] Calculate i%2, if the remainder is 0, calculate S i ×P i%max(j)+1 , wherein % is the modulus operator, max() is the maximum value operator, the calculation result is kept as two digits, and if the calculation result is less than two digits, add the number 0 in the first position; if the remainder is 1, calculate S i +P i%max(j)+1 , the calculation result is kept as two digits, and if the calculation result is less than two digits, add the number 0 in the first position, and mark the final calculation result as T i , combine T i in the order of i from small to large, and obtain half-way encoding, number the digits in the half-way encoding in the order from left to right, and represent by the symbol R y , wherein y is a non-zero natural number and y is the serial number of R;

[0033] Combine every two P j in the order from left to right into W m , m is a non-zero natural number and m is the serial number of W, start with y=1, take R y as the ten's place and R y+1 as the one's place to form a two-digit number, and mark as G y , combine y+1 repeatedly until y=max(y)-1, set the subscript h, which is a non-zero natural number and 1≤h≤max(y)-1, replace the serial number y of G y with h to obtain G h ;

[0034] Calculate G h +W h%max(m)+1 , mark the calculation result as F h , obtain the number of digits of F h , if F h is a three-digit number, keep F h unchanged, if Fh If it is a two-digit number, then in F h a confusing digit is randomly added at the first digit, and the confusing digit includes all single digits except 1;

[0035] F h is combined in ascending order of h to obtain desensitized data.

[0036] Further, the transmission and storage of the desensitized identity information, question text and answer text include the following sub-steps:

[0037] Sensitive data in the identity information, question text and answer text are replaced with corresponding desensitized data, and after the replacement is completed, the identity information, question text and answer text are transmitted and stored;

[0038] When the user or the medical question and answer large model receives the identity information, question text and answer text, the desensitized data is desensitized decoded, and the desensitized decoding is the inverse operation of the dynamic desensitization process;

[0039] During the desensitized decoding process, data security self-checking can be completed, and when G h is obtained by decoding, the ten digits and single digits of each G h are obtained, which are marked as G1 h and G2 h respectively, and it is judged whether G1 h is the same as G2 h-1 and whether G2 h is the same as G1 h+1 , if yes, a normal data signal is output, and if no, an abnormal data signal is output;

[0040] If the abnormal data signal is output, it is marked that the sensitive data has been tampered with.

[0041] In a second aspect, the application provides an electronic device, including a processor and a memory, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the steps in the above method are executed.

[0042] In a third aspect, the application provides a storage medium, which stores a computer program, when the computer program is executed by a processor, the steps in the above method are executed.

[0043] The beneficial effects of the present application are as follows: the present application constructs a medical question and answer large model, establishes a data connection between the medical question and answer large model and a hospital case database, inputs a question text to the medical question and answer large model by a user, the medical question and answer large model outputs an answer text in combination with the hospital case database, then sensitive data identification is performed on the identity information, the question text and the answer text of the user, the desensitization parameter in the dynamic desensitization process is changed in real time based on the question text input by the user, and the advantage is that the desensitization parameter is used for data encryption of sensitive data, and the desensitization parameter changes with the change of the question text of the user, so that the desensitization parameter changes every time the question text is input, and therefore the desensitization parameter used for each question text is different, thereby improving the security and effectiveness of data encryption of the medical question and answer large model.

[0044] The present application performs dynamic desensitization processing on sensitive data through the desensitization parameter, finally transmits and stores the desensitized identity information, question text and answer text, and performs data security self-checking on the desensitized data when restoring the desensitized data, and the advantage is that the sensitive data is desensitized through data encryption, the medical question and answer large model can still receive correct identity information, prevent incorrect identity information from causing the medical question and answer large model to retrieve incorrect past medical history for comprehensive analysis of the user, and perform data security self-checking when restoring the desensitized data, without the need for additional transmission of verification parameters and other auxiliary desensitized data to complete the verification of the data, thereby ensuring that the desensitized data does not have errors in the transmission process, and improving the security and rationality of data encryption of the medical question and answer large model. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 The step flowchart of the method of the present application is shown in the figure.

[0046] Figure 2 The step flowchart of the data encryption processing process of the medical question and answer large model of the present application is shown in the figure.

[0047] Figure 3 The structural schematic diagram of the electronic device of the present application is shown in the figure. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0049] Embodiment 1, please refer to Figure 1 The present application provides a data encryption processing method for a medical question and answer large model, which comprises the following steps:

[0050] Referring to Figure 2 As shown, in step S1, a medical question and answer large model is constructed, and the medical question and answer large model is connected with a hospital case database; after the medical question and answer large model is connected with the hospital case database, the medical question and answer large model reads case information of a user in the hospital case database according to identity information of the user;

[0051] In specific implementation, Figure 2 A step flowchart of a data encryption processing process of the medical question and answer large model is shown, after the medical question and answer large model is connected with the hospital case database, when the user asks some symptoms, the medical question and answer large model can extract past medical history of the user from the hospital case database according to personal information of the user, analyze whether the current symptoms of the user are related to the past medical history, and thus provide more comprehensive and accurate question and answer services for the user, but personal information and question and answer content belong to private data and need to be protected, but most private protection technologies directly replace the private data randomly, such as replacing Zhang San with Mr. Wang, and the medical question and answer large model cannot find the past medical history of the user through the personal information such as Mr. Wang, and thus an encryption and decryption method needs to be used to replace the traditional private protection technology, and the desensitization data may be tampered with by others during transmission or change due to channel fluctuations, at this time, the medical question and answer large model will receive incorrect symptoms or the user will receive incorrect treatment plans, which will lead to incorrect medication of the user according to the guidance, and the consequences are very serious, and thus it is more important to verify whether the desensitization data is tampered with or changed.

[0052] In step S2, the user inputs a question text to the medical question and answer large model, and the medical question and answer large model outputs an answer text in combination with the hospital case database; step S2 includes the following substeps:

[0053] In step S201, when the user inputs the question text to the medical question and answer large model, the medical question and answer large model synchronously acquires identity information of the user, and the question text and the identity information need to be desensitized before being transmitted and stored;

[0054] In step S202, after the medical question and answer large model receives the question text and the identity information, the medical question and answer large model extracts case information of the user in the hospital case database based on the identity information, the case information includes a current case and a historical case, and the medical question and answer large model can generate a corresponding answer text for the question text of the user in combination with the question text of the user and the case information;

[0055] In step S203, the answer text needs to be desensitized before being transmitted and stored;

[0056] In a specific implementation, all data that needs to be transmitted between the user and the medical question and answer large model needs to be desensitized. The current case represents the user's current inquiry in the hospital, and the historical case represents the user's past medical history.

[0057] Step S3, sensitive data identification is performed on the user's identity information, question text, and answer text; step S3 includes the following sub-steps:

[0058] Step S301, the question text and the answer text are identified by a sensitive identification model. The sensitive identification model marks medical terms and disease terms in the question text and the answer text as sensitive data;

[0059] Step S302, the identity information is sensitive data;

[0060] In a specific implementation, the sensitive identification model is an existing medical terminology identification model, which ensures that the question text and the answer text do not contain any medical-related terms during transmission and storage, and the identity information is sensitive data.

[0061] Step S4, dynamic desensitization is performed on the sensitive data. During the dynamic desensitization process, the desensitization parameters in the dynamic desensitization process are changed in real time based on the question text input by the user; step S4 includes the following sub-steps:

[0062] Step S401, the desensitization parameters in the dynamic desensitization process are changed in real time based on the question text input by the user;

[0063] Step S401 includes the following sub-steps:

[0064] Step S401.1, the number of question texts sent by the user is obtained and marked as N1;

[0065] Step S401.2, the number of sensitive data in the latest question text is obtained and marked as N2;

[0066] Step S401.3, the number of sensitive data in the N1 question texts is obtained and marked as N3;

[0067] Step S401.4, calculate [(N1+N2) x N3] 4 The calculation result is named as the desensitization parameter;

[0068] Step S401.5, when the user inputs the question text each time, N1, N2, and N3 are updated synchronously, and the desensitization parameter is recalculated;

[0069] In a specific implementation, in one session, if the user sends 3 question texts, N1 is 3, and the number of sensitive data in the last sent question text is obtained, for example, the third question text is "What is the problem of not having a cold, but having a cough and expectoration?", wherein, "cold", "cough" and "expectoration" all belong to the disease vocabulary, i.e. sensitive data, so the number of sensitive data in the latest question text is 3, i.e. N2 is 3, the number of sensitive data in N1=3 question texts is obtained, i.e. the number of all sensitive data in this session is counted, and N3 is 7 is counted, and finally the desensitization parameter is calculated as 3111696; N1, N2 and N will change with each input of the question text by the user, and the desensitization parameter will also change, the desensitization parameter is obtained by analyzing the question text, and is only used for dynamic desensitization processing of the question text and the answer text, the desensitization parameter for identity information is set by the administrator, and the use mode in the subsequent data encryption process is completely same;

[0070] In step S402, the sensitive data is dynamically desensitized by the desensitization parameter;

[0071] Step S402 includes the following sub-steps:

[0072] In step S402.1, the latest desensitization parameter is obtained, named as the latest key, and the sensitive data of the latest input question text and the sensitive data of the latest output answer text are named as the latest data;

[0073] In step S402.2, for any latest data, the latest data is converted into hexadecimal format and then into decimal format after being converted into UTF-8 encoding, and the data code is obtained;

[0074] In step S402.3, the numbers in the data code are numbered in the order from left to right, and the symbol S i is represented, wherein i is a non-zero natural number and i is the serial number of S, the numbers in the latest key are numbered in the order from left to right, and the symbol P j is represented, wherein j is a non-zero natural number and j is the serial number of P;

[0075] In step S402.4, i%2 is calculated, if the remainder is 0, S i *P i%max(j)+1 is calculated, wherein % is the modulus operator, max() is the maximum value operator, the calculation result is kept as two digits, and if the calculation result is less than two digits, the number 0 is added in the first position; if the remainder is 1, S i +P i%max(j)+1 is calculated, the calculation result is kept as two digits, and if the calculation result is less than two digits, the number 0 is added in the first position, the final calculation result is marked as T i , and T iThe combination is performed to obtain a half-encoding, the numbers in the half-encoding are numbered in a left-to-right order, and the numbers are represented by a symbol R y , wherein y is a non-zero natural number and y is the serial number of R;

[0076] In a specific implementation, the latest key is 3111696, and the latest data is taken as an example, the data code is converted to 253457292691090, and the number is obtained as S i and P j , wherein 1≤i≤15 and 1≤j≤7, S1 and S2 are taken as examples, S1 is 2, and S2 is 5, wherein for S1, i%2=1%2=1, the remainder is 1, S1+P is calculated 1%7+1 =2+P2=2+1=3, that is, T1 is 3, for S2, i%2=2%2=0, the remainder is 0, S2×P is calculated 2%7+1 =5×P3=5×1=5, that is, T2 is 5, and T3 to T 15 are obtained in the same way, and are 4, 24, 14, 42, 5, 9, 3, 6, 15, 9, 6, 27, and 1 in turn, since it is necessary to keep two digits, T1 to T 15 are finally obtained, and are 03, 05, 04, 24, 14, 42, 05, 09, 03, 06, 15, 09, 06, 27, and 01 in turn, the half-encoding is obtained by combination, and is 030504241442050903061509062701, and the number is obtained as R y , and 1≤y≤30;

[0077] Step S402.5, each two P j are combined as W m , m is a non-zero natural number and m is the serial number of W, y=1 is taken as an example, R y is taken as ten digits, and R y+1 is taken as individual digits to form a two-digit number, which is marked as G y , y+1 is combined repeatedly until y=max(y)-1, a subscript h is set, h is a non-zero natural number and 1≤h≤max(y)-1, the serial number y of G y is replaced by h to obtain G h ;

[0078] Step S402.6, G h +W h%max(m)+1 is calculated, and the calculation result is marked as F h , the number of digits of F h is obtained, if F h is a three-digit number, F h is kept unchanged, if F h is a two-digit number, F ha first random number is added to the first digit of the first number, the random number including all single digits except 1;

[0079] Step S402.7, F h are combined to obtain the desensitized data;

[0080] In a specific implementation, W1 to W4 are 31, 11, 69 and 60 in sequence, W4 is actually 6, which is less than two digits, and therefore 0 is added at the end of W4 to obtain W4 as 60, and G1 to G 29 are 03, 30, 05, 50, 04, 42, 24, 41, 14, 44, 42, 20, 05, 50, 09, 90, 03, 30, 06, 61, 15, 50, 09, 90, 06, 62, 27, 70 and 01 in sequence, and F1 to F 29 are 34, 41, 74, 110, 35, 53, 93, 101, 45, 55, 111, 80, 36, 61, 78, 150, 34, 41, 75, 121, 46, 61, 78, 150, 37, 73, 96, 130 and 32 in sequence, and since three digits need to be maintained, F1 to F 29 are 834, 441, 774, 110, 535, 453, 393, 101, 945, 255, 111, 080, 636, 361, 878, 150, 734, 941, 475, 121, 646, 961, 378, 150, 437, 073, 596, 130 and 232 in sequence, and the desensitized data obtained by combination is 834441774110535453393101945255111080636361878150734941475121646961378150437073596130232, where the desensitized information is the original desensitized information, and the manager can convert the desensitized data into an encoding in different formats based on requirements, such as converting the above desensitized data into a Base64 format to obtain bmXDv29QwpZ5wpZJwoLDqA==.

[0081] Step S5, transmitting and storing the desensitized identity information, question text and answer text; step S5 includes the following sub-steps:

[0082] Step S501, replacing the sensitive data in the identity information, question text and answer text with corresponding desensitized data, and transmitting and storing the identity information, question text and answer text after the replacement is completed;

[0083] Step S502, when the user or the medical question and answer large model receives the identity information, the question text and the answer text, the desensitization data is desensitized and decoded, and the desensitized decoding is the inverse operation program of the dynamic desensitization processing;

[0084] Step S503, during the desensitization decoding process, data security self-checking can be completed, and when G h is decoded, the tens digit and the unit digit of each G h are obtained, which are marked as G1 h and G2 h respectively, it is judged whether G1 h is the same as G2 h-1 and whether G2 h is the same as G1 h+1 , if yes, the data normal signal is output, if not, the data abnormal signal is output;

[0085] Step S504, if the data abnormal signal is output, it is marked that the sensitive data has been tampered with;

[0086] In a specific implementation, if "cold" is replaced by the desensitization data in Base64 format, the question text after replacement is "not bmXDv29QwpZ5wpZJwoLDqA== but alpha and beta are what questions?", the desensitization data of "cough" is temporarily replaced by alpha, and the desensitization data of "coughing" is temporarily replaced by beta, and the medical question and answer large model receives "not bmXDv29QwpZ5wpZJwoLDqA== but alpha and beta are what questions?", and the desensitization data in it is restored, since the restoration process is the inverse operation program of the dynamic desensitization processing, it only needs to be executed in reverse, and this embodiment will not be described in detail, but in the restoration process, when G h is parsed, it is necessary to ensure that the adjacent G h satisfy the "AB BC CD" format, otherwise it is determined that the desensitization data has changed in the transmission process and has deviated from the actual data, at this time, the data abnormal signal is output, which is used to remind the user that the data is unreliable or to prohibit the medical question and answer large model from answering, if there is a storage requirement, only the data after replacing the sensitive data with the desensitization data is stored.

[0087] Embodiment 2, please refer to Figure 3 , Figure 3An example of a structural diagram of an electronic device can include a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus. The memory stores computer readable instructions, and the processor can invoke the instructions in the memory. When the computer readable instructions are executed by the processor, the steps in the data encryption processing method for a medical question and answer large model are run to implement the following functions: constructing a medical question and answer large model; a user inputs question text to the medical question and answer large model, and the medical question and answer large model outputs answer text in combination with a hospital case database; sensitive data identification is performed on the user's identity information, question text, and answer text; dynamic desensitization processing is performed on the sensitive data, and the desensitization parameters in the dynamic desensitization processing are changed in real time based on the question text input by the user during the dynamic desensitization processing; and the desensitized identity information, question text, and answer text are transmitted and stored.

[0088] In addition, the logical instructions in the memory described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0089] In embodiment 3, the present application also provides a computer readable storage medium, and the present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the data encryption processing method for a medical question and answer large model described above are run to implement the following functions: constructing a medical question and answer large model; a user inputs question text to the medical question and answer large model, and the medical question and answer large model outputs answer text in combination with a hospital case database; sensitive data identification is performed on the user's identity information, question text, and answer text; dynamic desensitization processing is performed on the sensitive data, and the desensitization parameters in the dynamic desensitization processing are changed in real time based on the question text input by the user during the dynamic desensitization processing; and the desensitized identity information, question text, and answer text are transmitted and stored.

[0090] Through the description of the above embodiments, the embodiments of the present application can be provided as a method, a system or a computer program product. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

[0091] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other manners. The embodiments described above are merely schematic, and the division of the modules or units is merely logical function division, and there can be other division manners in actual implementation. For example, a plurality of modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different modules can be indirect couplings or communication connections through some interfaces, and there can be electric, mechanical or other forms.

[0092] Finally, it should be noted that: the above embodiments are merely used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data encryption processing method for a medical question and answer large model, characterized by, The method comprises the following steps: constructing a medical question and answer large model, establishing a data connection between the medical question and answer large model and a hospital case database; a user inputs a question text into the medical question and answer large model, and the medical question and answer large model outputs an answer text in combination with the hospital case database; sensitive data identification is performed on the user's identity information, question text and answer text; dynamic desensitization processing is performed on the sensitive data, and the desensitization parameters in the dynamic desensitization processing are changed in real time based on the question text input by the user during the dynamic desensitization processing; the desensitized identity information, question text and answer text are transmitted and stored; the dynamic desensitization processing of the sensitive data, and the desensitization parameters in the dynamic desensitization processing are changed in real time based on the question text input by the user during the dynamic desensitization processing comprises the following sub-steps: Real-time change of desensitization parameters in dynamic desensitization processing based on user input question text, comprising: obtaining the number of question texts sent by the user, marked as N1; obtaining the number of sensitive data in the latest question text, marked as N2; obtaining the number of sensitive data in N1 question texts, marked as N3; calculating , the calculation result is named as desensitization parameter; N1, N2 and N3 are updated synchronously every time the user inputs question text, and the desensitization parameter is recalculated again; The sensitive data is dynamically desensitized by a desensitization parameter, including: obtaining the latest desensitization parameter, named the latest key, and naming the sensitive data of the latest input question text and the sensitive data of the latest output answer text as the latest data; for any latest data, the latest data is converted into hexadecimal format and then into decimal format after being converted into hexadecimal format according to UTF-8 encoding, to obtain data coding; the numbers in the data coding are numbered in the order from left to right, and the symbol S i is represented, wherein i is a non-zero natural number and i is the serial number of S, the numbers in the latest key are numbered in the order from left to right, and the symbol P j is represented, wherein j is a non-zero natural number and j is the serial number of P; i%2 is calculated, if the remainder is 0, then is calculated, wherein % is the modulus operator, max() is the maximum value operator, the calculation result is kept as two digits, and if the calculation result is less than two digits, a number 0 is added in the first place; if the remainder is 1, then is calculated, the calculation result is kept as two digits, and if the calculation result is less than two digits, a number 0 is added in the first place, and the final calculation result is marked as T i , T i are combined in the order of i from small to large to obtain half-range coding, the numbers in the half-range coding are numbered in the order from left to right, and the symbol R y is represented, wherein y is a non-zero natural number and y is the serial number of R; every two P j is combined into W m , m is a non-zero natural number and m is the serial number of W, y=1 is started, R y is the ten's place, and R y+1 is the unit's place to form a two-digit number, marked as G y , y+1 is combined repeatedly until y=max(y)-1, and the subscript h is set, wherein the h is a non-zero natural number and 1≤h≤max(y)-1, the serial number y of G y is replaced by h to obtain G h ; F is calculated, and the calculation result is marked as F h ; the number of digits of F h is obtained, if F h is a three-digit number, F h is kept unchanged, if F h is a two-digit number, a confusing number is randomly added in the first place of F h , the confusing number includes all unit's numbers except 1; F h is combined in the order of h from small to large to obtain desensitized data.

2. The data encryption processing method for a medical Q & A large model according to claim 1, characterized in that, after the medical question and answer large model is connected with the hospital case database, the medical question and answer large model reads the user's case information in the hospital case database according to the user's identity information.

3. The data encryption processing method for a medical Q & A large model according to claim 2, characterized in that, the user inputs a question text into the medical question and answer large model, and the medical question and answer large model outputs an answer text in combination with the hospital case database comprises the following sub-steps: when the user inputs a question text into the medical question and answer large model, the medical question and answer large model synchronously acquires the user's identity information, and the question text and identity information need to be desensitized before being transmitted and stored; after the medical question and answer large model receives the question text and identity information, the user's case information in the hospital case database is extracted based on the identity information, the case information includes current case and historical case, and the medical question and answer large model can generate corresponding answer text for the user's question text in combination with the user's question text and case information; the answer text needs to be desensitized before being transmitted and stored.

4. The data encryption processing method for a medical Q & A large model according to claim 3, characterized in that, the sensitive data identification performed on the user's identity information, question text and answer text comprises the following sub-steps: the question text and answer text are identified by a sensitive identification model, and the medical terms and disease terms in the question text and answer text are marked as sensitive data by the sensitive identification model; the identity information is all sensitive data.

5. The data encryption processing method for a medical question and answer large model according to claim 4, characterized in that, the transmission and storage of the desensitized identity information, question text and answer text comprises the following sub-steps: the sensitive data in the identity information, question text and answer text are replaced by corresponding desensitized data, and the identity information, question text and answer text are transmitted and stored after the replacement is completed; the desensitized data is desensitized and decoded by the user or the medical question and answer large model when receiving the identity information, question text and answer text, and the desensitized and decoded data is the inverse operation of the dynamic desensitization processing; In the process of desensitization decoding, data security self-checking can be completed, and when G h is obtained by decoding, the ten digits and the unit digits of each G h are obtained, which are marked as G1 h and G2 h respectively. It is judged whether G1 h is same as G2 h-1 and whether G2 h is same as G1 h+1 . If yes, a normal data signal is output, and if no, an abnormal data signal is output. if an output data abnormal signal is output, it is marked that the sensitive data has been tampered with.

6. An electronic device, comprising: The computer program is executed by the processor to run the steps in the method of any one of claims 1-5.

7. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to run the steps in the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Medical big language question and answer method based on diagnosis and treatment data desensitization

    CN119476490A

  • Sensitive information desensitization and identification system

    CN116502258A

  • Medical record information extraction system based on AI large model

    CN120280065A