Medical list text tampering detection method and device, equipment and medium
By annotating the medical list text training set and training a neural network model, the problem of misidentification in case list images was solved, and accurate identification of tampered areas and special cases was achieved, thus improving detection accuracy.
Patent Information
- Application Number
- CN202411524343.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-10
AI Technical Summary
Existing image tampering detection methods have problems with false recognition in medical record list images, especially false detection of doctors' handwritten signatures, hospital logos, barcodes, QR codes, etc.
An artificial intelligence-based approach was adopted, which involved acquiring a pre-made medical list text training set, including images of both tampered and untampered medical records, and labeling tampered and special cases separately. A neural network model was then used for training, and the resulting neural network model included an encoder and two decoders, which was able to identify tampered and special cases.
This improved the recognition accuracy of the neural network model, avoided false recognition, and ensured accurate detection of tampering in medical list texts.
Smart Images

Figure CN119295906A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based medical list text tampering detection method, device, equipment and medium. Background Art
[0002] When making insurance reimbursements, some customers will tamper with the text of the medical list, especially the names, dates, etc. If the tampered medical list can be effectively identified, user behavior can be regulated to prevent insurance fraud.
[0003] Existing image tampering can be roughly divided into three types: (1) erasing part of the content on the image; (2) inserting new content into the erased content or inserting new content into the blank space of the image; (3) copying and pasting the new content over the original content of the image.
[0004] The existing image tampering detection method is applied to the recognition of case list pictures, and there is a misrecognition problem: for example, the doctor's handwritten signature in the case list picture is copied and pasted, and the hospital logo icon, QR code, and barcode are inserted into the case list picture; when the neural network model is performing detection, it will detect it as the case list picture that has been tampered with, resulting in misrecognition. Summary of the invention
[0005] The present invention provides a method, device, computer equipment and medium for detecting tampering of medical list text based on artificial intelligence, so as to solve the technical problem of misidentification of tampering in case list images.
[0006] In a first aspect, a method for detecting medical list text tampering based on artificial intelligence is provided, comprising:
[0007] Obtain a pre-made medical list text training set, the medical list text training set includes a tampered case list picture and an untampered case list picture, the tampered case list picture is provided with a tampered area annotation, the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, the tampered case list picture and the untampered case list picture are provided with a special case area annotation, the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture;
[0008] Inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained by the training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders;
[0009] The medical list text image to be detected is input into the trained neural network model for tampering identification, and the tampering identification result of the medical list text is obtained.
[0010] In a second aspect, a medical list text tampering detection device based on artificial intelligence is provided, comprising:
[0011] A training set acquisition module is used to acquire a pre-made medical list text training set, wherein the medical list text training set includes a tampered case list picture and an untampered case list picture, wherein the tampered case list picture is provided with a tampered area annotation, wherein the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, and wherein the tampered case list picture and the untampered case list picture are provided with a special case area annotation, wherein the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture;
[0012] A model training module, used for inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained through training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders;
[0013] The tampering identification module is used to input the medical list text image to be detected into the trained neural network model for tampering identification, and obtain the tampering identification result of the medical list text.
[0014] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned artificial intelligence-based medical list text tampering detection method are implemented.
[0015] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned artificial intelligence-based medical list text tampering detection method are implemented.
[0016] In the scheme implemented by the above-mentioned artificial intelligence-based medical list text tampering detection method, device, computer equipment and storage medium, a pre-made medical list text training set is obtained, and the medical list text training set includes a tampered case list picture and an untampered case list picture. The tampered case list picture is provided with a tampered area annotation, and the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content. The tampered case list picture and the untampered case list picture are provided with special case area annotations, and the special case area annotations include doctor's signature, hospital seal, QR code, barcode, and inserted picture; The medical list text training set is input into the neural network model for model training, and the weight parameters obtained by the training are saved to obtain a trained neural network model, wherein the neural network model includes an encoder and two decoders; the medical list text image to be detected is input into the trained neural network model for tampering identification to obtain the tampering identification result of the medical list text. In the present invention, in order to prevent some normally processed special case areas of the medical list text from being misidentified, the tampered areas and the special case areas can be marked separately, so that the two decoders of the trained neural network model have the ability to distinguish the tampered areas and the special case areas, which can effectively improve the recognition accuracy of the neural network model and avoid misidentification. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0018] Figure 1 It is a schematic diagram of an application environment of a medical list text tampering detection method in one embodiment of the present invention;
[0019] Figure 2 It is a flow chart of a method for detecting tampering of a medical list text in one embodiment of the present invention;
[0020] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S20;
[0021] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S30;
[0022] Figure 5 is a schematic diagram of a medical list text tampering detection device in one embodiment of the present invention;
[0023] Figure 6 is a structural schematic diagram of a neural network model in one embodiment of the present invention;
[0024] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0025] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] The medical list text tampering detection method based on artificial intelligence provided by the embodiment of the present invention can be applied in the following aspects: Figure 1 In an application environment, the client communicates with the server through a network. The client can view the artificial intelligence-based medical list text tampering detection results from the server, and the server can obtain a pre-made medical list text training set, which includes tampered case list pictures and non-tampered case list pictures. The tampered case list pictures are provided with tampered area annotations, and the tampered area annotations include erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content. The tampered case list pictures and non-tampered case list pictures are provided with special case area annotations, and the special case area annotations include doctor's signatures, hospital seals, QR codes, bar codes, and inserted pictures; the medical list The text training set is input into the neural network model for model training, and the weight parameters obtained by training are saved to obtain a trained neural network model, wherein the neural network model includes an encoder and two decoders; the medical list text image to be detected is input into the trained neural network model for tampering identification, and the tampering identification result of the medical list text is obtained. In the present invention, some special case areas of the medical list text that are normally processed are prevented from being misidentified. The tampered area and the special case area can be marked separately, so that the two decoders of the trained neural network model have the ability to distinguish the tampered area and the special case area, which can effectively improve the recognition accuracy of the neural network model and avoid misidentification. Among them, the client can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0028] See also Figure 2 As shown, Figure 2 A flowchart of a medical list text tampering detection method based on artificial intelligence provided by an embodiment of the present invention includes the following steps:
[0029] S10. Obtain a pre-made medical list text training set, wherein the medical list text training set includes a tampered case list picture and an untampered case list picture, wherein the tampered case list picture is provided with a tampered area annotation, wherein the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the content of the case list, and wherein the tampered case list picture and the untampered case list picture are provided with a special case area annotation, wherein the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture.
[0030] The artificial intelligence-based medical list text tampering detection method provided by the present invention is applied to the recognition of various case list images, which is usually implemented through a server. The neural network model is deployed on the server. When training, a medical list text training set needs to be obtained. The medical list text training set contains tampered case list images and non-tampered case list images.
[0031] Due to the lack of real case list samples as training data, the code can be used to generate case-related documents, such as hospitalization certificates, discharge summaries, diagnosis certificates, outpatient cases, etc. The format of the case list can refer to the real format of each hospital to make a template, or directly specify some common formats of templates, such as table format or ordinary text format, and then automatically fill in the name, gender, age, home address, department, condition and other information. For condition information: according to keywords, a large language generation model can be used to generate detailed condition descriptions, treatment steps, diagnostic conclusions, detection methods, etc. For example, the treatment process of cataract surgery and post-treatment nursing advice can be automatically generated. For hospital seals: it is necessary to combine image technology and use code to generate seals, such as generating png format. The fourth channel of the seal needs to be transparent so that it does not cover the text. The hospital name in the seal is consistent with the hospital name generated by the document. After the seal is generated, the seal can be rotated, scaled, and placed in the case list document at a random position. The types of seals should not only include round seals, but also square seals, long seals, chamfered seals and other styles. Different styles need to be made separately. Seal color, seals are not only set to red, blue, gray and black. Doctor's signature: Most of the doctor's signature is handwritten, and some are printed, so the doctor's signature needs to be adjusted with a handwritten font, especially the cursive font, which is more suitable. Some of the doctor's signature parts are the real signatures of the scanned doctors. In this case, the doctor's name needs to be output to the picture with a shading using a handwritten font, and then output to the document of the medical list by copying and pasting. When outputting, it is necessary to pay attention to the position of the doctor's signature coordinate position reserved in the template. For QR codes and barcodes: Generate QR codes of different sizes, shapes, and colors, and insert them into the coordinate position reserved in the template. For the font, font size, and color of the entire document: There needs to be a random change function within an acceptable range. Name, age, ID number, bed number, etc. must be randomly generated without duplication. Generate as many different documents as possible.
[0032] After the document is generated, it needs to be converted into an image format. After converting it into a case list image, it is necessary to simulate the external scene and process the case list image. The important thing is to add noise and processing angle. During the shooting process, the noise of different mobile phones will be different. Simulate the noise of different mobile phones, add noise to the case list image, or randomly add Gaussian noise, IOS noise, etc.; you can also randomly increase brightness, dimming, light spots, contrast, snowflakes, grayscale, sharpening, etc.; randomly add general blur, such as image compression, Gaussian blur, motion blur, median blur, etc.; random deformation processing, random rotation angle, projection transformation and other angle processing.
[0033] After the above case list images are generated, they can be used as the original data for training data. In the process of generating case list images, the coordinate positions of the doctor's signature, hospital seal, QR code, barcode, and inserted image area should be recorded and used as annotation data in the subsequent training process.
[0034] Generate tampered case list images: For case list documents generated using code, the generated text content, coordinate position, font, font size, color, etc. have been determined when the document is generated. And the coordinates of the doctor's signature, hospital seal, QR code, barcode, inserted picture and other areas that need to be paid attention to have also been determined.
[0035] If it is an actual case list image, you need to use general OCR recognition to identify the text and coordinates in the case list image, and the doctor's signature, hospital seal, QR code, barcode, inserted pictures, etc. need to be manually marked with coordinate positions.
[0036] The following tampering operations are performed based on the above-mentioned known case list images, the text content of the case list images and the corresponding coordinate position information.
[0037] 1. Erasing: To erase text, you can use the Fast Marching Method, highly fuzzy or neural network model erasing methods to erase the text in the above-obtained coordinate position and obtain the coordinate mark of the tampered position.
[0038] 2. Insert: Match the appropriate font, size, color, etc. according to the document font, size, color, etc., and insert new text content according to the coordinate position. If there is already text in the area, you can erase it first and then insert the text. If it is a blank area, you can directly insert the text. The coordinate position of the inserted text needs to be recorded for use in training.
[0039] 3. Copy and paste: You can choose to copy and paste the content in the same document or other documents. When copying and pasting, scale the image, feather the edges, and then copy and paste it to the target location based on the known original coordinates and target coordinates. The coordinates of the target location need to be recorded for neural network model training.
[0040] In the process of generating the tampered document, if the length and width of the coordinates of the tampered position are too large, it can be cropped or cut off.
[0041] In the process of making the above tampered samples, a tampered area mask is generated according to the recorded coordinate position of the tampered content. The value of the non-tampered part is 0, and the value of the tampered part can be set to 1, 2, 3, etc. according to the different types of tampering, and is used as a prediction label during the training process.
[0042] Mask refers to a matrix with the same size as the image. For example, if the image is h high and w long, then mask is an h*w matrix, for example:
[0043] [[0,0,0,0,1,1,1,0],
[0044] [0,0,1,1,1,1,1,0],
[0045] [0,0,2,2,2,2,2,0],
[0046] [0,0,0,0,3,3,3,3]].
[0047] S20, inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained through training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders;
[0048] After obtaining the medical list text training set, the tampered case list pictures and non-tampered case list pictures in the medical list text training set are input into the neural network model for training. The neural network model includes an encoder and two decoders, and the two decoders share one encoder; one is a decoder for the tampered area, and the other is a decoder for the special case area. After the training is completed, a fixed weight parameter is obtained to obtain a trained neural network model, so that the neural network model has the ability to distinguish tampered areas and special case areas, improve the accuracy of tampering recognition, and prevent misrecognition. Figure 6 The figure shows the structure of the neural network model. Encoder is the encoder and Decoder is the decoder. The encoder is shared and there are two decoders, one of which is a tampered decoder and the other is a special decoder.
[0049] See also Figure 3 As shown, in step S20, the medical list text training set is input into the neural network model for model training, and the weight parameters obtained by training are saved to obtain the trained neural network model, which includes the following steps:
[0050] S21, performing dimensionality reduction processing on the tampered case list image and the untampered case list image through an encoder of a neural network model;
[0051] S22, passing the tampered case list picture and the non-tampered case list picture after dimensionality reduction through the first decoder of the neural network model, and obtaining the tampered area mask of the tampered case list picture and the non-tampered case list picture by upsampling, wherein the tampered area mask is an h*w matrix, where h is the height of the picture and w is the length of the picture;
[0052] S23, calculating a loss function of the tampered area according to the values in the tampered area mask of the tampered case list image and the untampered case list image;
[0053] S24, passing the tampered case list picture and the non-tampered case list picture after dimensionality reduction through the second decoder of the neural network model, and obtaining the special case region mask of the tampered case list picture and the non-tampered case list picture by upsampling, wherein the special case region mask is an h*w matrix, where h is the height of the picture and w is the length of the picture;
[0054] S25, calculating a loss function of the special case region according to the values in the special case region mask of the tampered case list image and the untampered case list image;
[0055] S26. Add the loss function of the tampered area and the loss function of the special area, save the total loss function, and complete the neural network model training.
[0056] In steps S21-S26, the case list is used as the input of the neural network, with a size of 3*h*w, including the tampered case list pictures and the untampered case list pictures. First, it passes through the encoder, and after continuous dimensionality reduction processing, the features after dimensionality reduction are then passed through the first decoder of upsampling to obtain the tampered area mask. The h and w of the tampered area mask are the same as the input h and w. The output is C*h*w, where h is the height of the picture, w is the length of the picture, and C is the number of tampering categories. If there are only four types of no tampering, erasure, insertion, and copy and paste, then C=4 (the marked values are 0, 1, 2, and 3 respectively). According to the value in the marked mask, the tampered area loss function loss_c is calculated.
[0057] Similarly, after the tampered case list images and the untampered case list images are processed by the encoder for dimensionality reduction, the second decoder that has been upsampled calculates the special case area loss function loss_t.
[0058] After training, the parameters of the first decoder and the second decoder are different, resulting in different output results in the subsequent reasoning stage. Mask training of the tampered area and the special area shares the neural network of the encoder part, saving computational effort.
[0059] In step S23, according to the values in the tampered area mask of the tampered case list image and the untampered case list image, the loss function of the tampered area is calculated as:
[0060]
[0061] Among them, y c To tamper with the classification value, p c is the cth prediction value, and C is the number of tampered classifications.
[0062] During the training process of the neural network model, the loss function of the tampered area is calculated so that the neural network model can identify the tampered area.
[0063] In step S25, based on the values in the special case area mask of the tampered case list image and the untampered case list image, the loss function of the special case area is calculated as:
[0064]
[0065] Among them, y t is the classification value of the special case classification, p t is the tth predicted value, T is the total number of special case classifications plus 1. For example, there are 5 special case classifications plus the normal classification, T=6.
[0066] During the training process of the neural network model, the loss function of the special case area is calculated so that the neural network model can identify the special case area.
[0067] In step S21, the tampered case list image and the untampered case list image are subjected to dimensionality reduction processing by an encoder of a neural network model, including:
[0068] S211, using a convolution or transform structure to repeatedly calculate the tampered case list image and the untampered case list image;
[0069] S212, performing multiple dimensionality reduction processes on the tampered case list images and the non-tampered case list images that have been repeatedly calculated using average pooling, maximum pooling, or convolution with a stride greater than 1;
[0070] S213. Repeat steps S211 to S212 until the tampered case list image and the untampered case list image are reduced in dimension to a preset feature size.
[0071] Steps S211 to S213, by using convolution or transform structure, after repeated calculations on the tampered case list images and the non-tampered case list images, perform dimensionality reduction processing (using average pooling, maximum pooling, convolution with stride greater than 1, etc. can achieve dimensionality reduction processing), and then continue to use convolution or transform structure for calculation, and then continue to use dimensionality reduction module for dimensionality reduction processing, and then continue to calculate and continue to reduce dimensionality until the predefined feature size is obtained and the dimensionality reduction processing is completed.
[0072] S30, inputting the obtained medical list text image to be detected into the trained neural network model for tampering identification, and obtaining the tampering identification result of the medical list text.
[0073] The trained neural network model has the ability to detect tampering of medical list text images. After the medical list text image to be detected passes through the encoder, the tampered area is identified by the first decoder, and the special area is identified by the second decoder. By excluding the special area from the tampered area, the tampering identification result is obtained.
[0074] See also Figure 4 As shown, in step S30, the medical list text image to be detected is input into the trained neural network model for tampering identification to obtain the tampering identification result of the medical list text, including the following steps:
[0075] S31, obtaining a medical list text image to be detected and inputting it into the trained neural network model, and outputting a tampered area mask and a special area mask;
[0076] S32, set the value of the special case area mask greater than 0 to 0, and set the value equal to 0 to 1, and obtain a new special case area sep_mask01;
[0077] S33, set the value of the tampered area mask greater than 0 to 1, and the value equal to 0 remains unchanged, and obtain a new special area tam_mask10;
[0078] S34, multiplying sep_mask01 and tam_mask10 to obtain mask_inter, wherein the portion of mask_inter that belongs to the tampered area and the special case area is set to 0, and the portion that belongs to the tampered area and does not belong to the special case area is set to 1;
[0079] S35. Output tam_mask_last of the tampered area excluding the special area, tam_mask_last = tam_mask*mask_inter, where tam_mask is the original tampered area mask output by the neural network.
[0080] In steps S31 to S35, a picture of a case list is input, and the tampered area mask and the special case area mask are output. The values of the special case area mask greater than 0 are set to 0, and the values equal to 0 are set to 1, and a new sep_mask01 is obtained. The tampered area mask is the opposite, the values greater than 0 are set to 1, and the values equal to 0 remain unchanged, and a new tam_mask10 is obtained. Multiply sep_mask01 and tam_mask10 to obtain mask_inter. The area in mask_inter that is the tampered area and also the special case is set to 0, and the part of the tampered area is set to 1.
[0081] The special case area mask value is set to 0 and 1 because during the calculation process, the part multiplied by 0 will disappear and become 0, such as 1*0=0; the part multiplied by 1 will retain the original value, such as 1*1=1, and the value remains unchanged. This operation is to take the intersection of the tampered area mask and the special case area mask (negation), and the part that is 1 in the end will be retained.
[0082] Tampered area mask: the tampered area is 1, and the rest is 0; special case area mask: the special case area is 1, and the rest is 0. The special case area mask is negated, and the special case area is 0, and the rest is 1. After multiplication, based on the tampered area, the special case area is also set to 0, and only the tampered area that is not a special case is obtained as 1.
[0083] mask_inter=sep_mask01*tam_mask10
[0084] Output the tam_mask_last of the tampered area without the special case area:
[0085] tam_mask_last=tam_mask*mask_inter, where tam_mask is the original tampered area mask output by the neural network.
[0086] In step S35, when outputting tam_mask_last of the tampered area excluding the special area, the part of tam_mask_last with an area smaller than a preset threshold is removed to avoid misjudgment of some minimum values.
[0087] It can be seen that in the above scheme, by separately marking the tampered area and the special case area, the two decoders of the trained neural network model have the ability to distinguish the tampered area and the special case area, which can effectively improve the recognition accuracy of the neural network model and avoid misrecognition.
[0088] See also Figure 5 As shown, in one embodiment, a medical list text tampering detection device based on artificial intelligence is provided, comprising:
[0089] The training set acquisition module 10 is used to acquire a pre-made medical list text training set, wherein the medical list text training set includes a tampered case list picture and an untampered case list picture, wherein the tampered case list picture is provided with a tampered area annotation, wherein the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, and wherein the tampered case list picture and the untampered case list picture are provided with a special case area annotation, wherein the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture;
[0090] The model training module 20 is used to input the medical list text training set into the neural network model for model training, save the weight parameters obtained by training, and obtain the trained neural network model, wherein the neural network model includes an encoder and two decoders;
[0091] The tampering identification module 30 is used to input the medical list text image to be detected into the trained neural network model for tampering identification, and obtain the tampering identification result of the medical list text.
[0092] In one embodiment, the model training module 20 is specifically used to:
[0093] The tampered case list images and the untampered case list images are processed by the encoder of the neural network model for dimensionality reduction;
[0094] Passing the tampered case list image and the non-tampered case list image after dimensionality reduction through the first decoder of the neural network model, and obtaining the tampered area mask of the tampered case list image and the non-tampered case list image through upsampling, wherein the tampered area mask is an h*w matrix, where h is the height of the image and w is the length of the image;
[0095] Calculate the loss function of the tampered area based on the values in the tampered area mask of the tampered case list image and the untampered case list image;
[0096] The tampered case list image and the untampered case list image after dimensionality reduction are passed through the second decoder of the neural network model, and the special case region mask of the tampered case list image and the untampered case list image is obtained by upsampling, wherein the special case region mask is an h*w matrix, where h is the height of the image and w is the length of the image;
[0097] Calculate the loss function of the special case area according to the values in the special case area mask of the tampered case list image and the untampered case list image;
[0098] Add the loss function of the tampered area and the loss function of the special area, save the total loss function, and complete the neural network model training.
[0099] In a specific embodiment, in the model training module 20, based on the values in the tampered area mask of the tampered case list image and the untampered case list image, the loss function of the tampered area is calculated as:
[0100]
[0101] Among them, y c To tamper with the classification value, p cis the cth prediction value, and C is the number of tampered classifications.
[0102] In a specific embodiment, in the model training module 20, based on the values in the special case area mask of the tampered case list image and the untampered case list image, the loss function of the special case area is calculated as:
[0103]
[0104] Among them, y t is the classification value of the special case classification, p t is the tth predicted value, and T is the total number of special case classifications plus 1.
[0105] In a specific embodiment, in the model training module 20, the tampered case list image and the untampered case list image are subjected to dimensionality reduction processing by an encoder of a neural network model, including:
[0106] Use convolution or transform structures to repeatedly calculate the tampered case list images and the untampered case list images;
[0107] For the tampered case list images and the non-tampered case list images that have been repeatedly calculated, multiple dimensionality reduction processes are performed using average pooling, maximum pooling, or convolution with a stride greater than 1;
[0108] Repeat the above two steps until the tampered case list images and the untampered case list images are reduced to the preset feature size.
[0109] In a specific embodiment, the tamper identification module 30 is specifically used for:
[0110] Get a medical list text image to be tested and input it into the trained neural network model, and output the tampered area mask and the special area mask;
[0111] Set the values of the special area mask greater than 0 to 0, and the values equal to 0 to 1, and obtain the new special area sep_mask01;
[0112] Set the values of the tampered area mask greater than 0 to 1, and keep the values equal to 0 unchanged, and obtain the new special area tam_mask10;
[0113] Multiply sep_mask01 and tam_mask10 to obtain mask_inter, set the part of mask_inter that belongs to the tampered area and the special area to 0, and set the part that belongs to the tampered area and does not belong to the special area to 1;
[0114] Output tam_mask_last of the tampered area excluding the special area, tam_mask_last = tam_mask*mask_inter, where tam_mask is the original tampered area mask output by the neural network.
[0115] In a specific embodiment, in the tampering identification module 30, when outputting tam_mask_last of the tampered area excluding the special area, the part of tam_mask_last with an area smaller than a preset threshold is removed.
[0116] For the specific limitations of the medical list text tampering detection device based on artificial intelligence, please refer to the limitations of the medical list text tampering detection method based on artificial intelligence above, which will not be repeated here. Each module in the above-mentioned medical list text tampering detection device based on artificial intelligence can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0117] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of a service-side method for detecting medical list text tampering based on artificial intelligence.
[0118] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a medical list text tampering detection method based on artificial intelligence.
[0119] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0120] Obtain a pre-made medical list text training set, the medical list text training set includes a tampered case list picture and an untampered case list picture, the tampered case list picture is provided with a tampered area annotation, the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, the tampered case list picture and the untampered case list picture are provided with a special case area annotation, the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture;
[0121] Inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained by the training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders;
[0122] The medical list text image to be detected is input into the trained neural network model for tampering identification, and the tampering identification result of the medical list text is obtained.
[0123] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0124] Obtain a pre-made medical list text training set, the medical list text training set includes a tampered case list picture and an untampered case list picture, the tampered case list picture is provided with a tampered area annotation, the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, the tampered case list picture and the untampered case list picture are provided with a special case area annotation, the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture;
[0125] Inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained by the training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders;
[0126] The medical list text image to be detected is input into the trained neural network model for tampering identification, and the tampering identification result of the medical list text is obtained.
[0127] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0129] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0130] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for detecting medical list text tampering based on artificial intelligence, characterized in that: include: Obtain a pre-made medical list text training set, the medical list text training set includes a tampered case list picture and an untampered case list picture, the tampered case list picture is provided with a tampered area annotation, the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, the tampered case list picture and the untampered case list picture are provided with a special case area annotation, the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture; Inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained by the training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders; The medical list text image to be detected is input into the trained neural network model for tampering identification, and the tampering identification result of the medical list text is obtained.
2. The artificial intelligence-based medical list text tampering detection method according to claim 1, characterized in that: The medical list text training set is input into the neural network model for model training, and the weight parameters obtained by training are saved to obtain the trained neural network model, including: The tampered case list images and the untampered case list images are processed by the encoder of the neural network model for dimensionality reduction; Passing the tampered case list image and the non-tampered case list image after dimensionality reduction through the first decoder of the neural network model, and obtaining the tampered area mask of the tampered case list image and the non-tampered case list image through upsampling, wherein the tampered area mask is an h*w matrix, where h is the height of the image and w is the length of the image; Calculate the loss function of the tampered area based on the values in the tampered area mask of the tampered case list image and the untampered case list image; The tampered case list image and the untampered case list image after dimensionality reduction are passed through the second decoder of the neural network model, and the special case region mask of the tampered case list image and the untampered case list image is obtained by upsampling, wherein the special case region mask is an h*w matrix, where h is the height of the image and w is the length of the image; Calculate the loss function of the special case area according to the values in the special case area mask of the tampered case list image and the untampered case list image; Add the loss function of the tampered area and the loss function of the special area, save the total loss function, and complete the neural network model training.
3. The artificial intelligence-based medical list text tampering detection method as claimed in claim 2, characterized in that: The loss function of the tampered area is calculated based on the values in the tampered area mask of the tampered case list picture and the untampered case list picture: Among them, y c To tamper with the classification value, p c is the cth prediction value, and C is the number of tampered classifications.
4. The artificial intelligence-based medical list text tampering detection method as claimed in claim 2, characterized in that: The loss function of the special case area is calculated based on the values in the special case area mask of the tampered case list picture and the untampered case list picture, Among them, y t is the classification value of the special case classification, p t is the tth predicted value, and T is the total number of special case classifications plus 1.
5. The artificial intelligence-based medical list text tampering detection method according to any one of claim 2, characterized in that: The tampered case list images and the untampered case list images are subjected to dimensionality reduction processing through the encoder of the neural network model, including: S211, using a convolution or transform structure to repeatedly calculate the tampered case list image and the untampered case list image; S212, performing multiple dimensionality reduction processes on the tampered case list images and the non-tampered case list images that have been repeatedly calculated using average pooling, maximum pooling, or convolution with a stride greater than 1; Steps S211 to S212 are repeatedly executed until the tampered case list image and the non-tampered case list image are reduced in dimension to a preset feature size.
6. The artificial intelligence-based medical list text tampering detection method according to claim 1, characterized in that: The step of inputting the medical list text image to be detected into the trained neural network model for tampering identification to obtain the tampering identification result of the medical list text includes: Get a medical list text image to be tested and input it into the trained neural network model, and output the tampered area mask and the special area mask; Set the values of the special area mask greater than 0 to 0, and the values equal to 0 to 1, and obtain the new special area sep_mask01; Set the values of the tampered area mask greater than 0 to 1, and keep the values equal to 0 unchanged, and obtain the new special area tam_mask10; Multiply sep_mask01 and tam_mask10 to obtain mask_inter, set the part of mask_inter that belongs to the tampered area and the special area to 0, and set the part that belongs to the tampered area and does not belong to the special area to 1; Output tam_mask_last of the tampered area excluding the special area, tam_mask_last = tam_mask*mask_inter, where tam_mask is the original tampered area mask output by the neural network.
7. The artificial intelligence-based medical list text tampering detection method according to claim 6, characterized in that: When outputting tam_mask_last of the tampered area excluding the special area, the portion of tam_mask_last whose area is smaller than a preset threshold is removed.
8. An artificial intelligence-based medical list text tampering detection device, characterized in that: include: A training set acquisition module is used to acquire a pre-made medical list text training set, wherein the medical list text training set includes a tampered case list picture and an untampered case list picture, wherein the tampered case list picture is provided with a tampered area annotation, wherein the tampered area annotation includes erasing part of the case list content, inserting part of the new content on the case list, copying the content of other documents and pasting to cover part of the case list content, and wherein the tampered case list picture and the untampered case list picture are provided with a special case area annotation, wherein the special case area annotation includes a doctor's signature, a hospital seal, a QR code, a barcode, and an inserted picture; A model training module, used for inputting the medical list text training set into the neural network model for model training, saving the weight parameters obtained through training, and obtaining a trained neural network model, wherein the neural network model includes an encoder and two decoders; The tampering identification module is used to input the medical list text image to be detected into the trained neural network model for tampering identification, and obtain the tampering identification result of the medical list text.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the medical checklist text tampering detection method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the medical checklist text tampering detection method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.