Medical record classification method, system and device

By determining the rule configuration information and dynamic allocation task threads for text recognition in the electronicization of medical records, the problem of low OCR recognition efficiency is solved, and efficient medical record recognition and classification is achieved.

CN119107657BActive Publication Date: 2025-04-18JIANGXI WEITAI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411585474.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-04-18
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

In the prior art, OCR recognition is inefficient in the electronicization of medical records, and it is impossible to effectively utilize the recognition function when the number of medical records is large.

Method used

By determining the rule configuration information and the original medical record image of the medical record file, the original image is intercepted based on these rules, dynamically allocated to the task thread for text recognition, and finally determining the classification information of the medical record file based on the identification information.

Benefits of technology

It improves the efficiency of medical record identification and resource utilization, realizes efficient utilization of OCR, and can process a large number of medical record files in a short time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107657B_ABST
    Figure CN119107657B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of medical record information technology, and in particular to a medical record classification method, system and device, the method comprising: providing data support for subsequent medical record classification by determining rule configuration information and the original medical record image of the medical record file; intercepting the original medical record image based on the rule configuration information to obtain the medical record intercepted image to be identified, reducing unnecessary identification and improving identification efficiency; determining the number of tasks for each initialized task thread, and dynamically allocating the medical record intercepted image to be identified to different task threads according to the number of tasks, improving efficiency and resource utilization; in the task thread, performing text recognition on the medical record intercepted image according to the rule configuration information to obtain the text recognition information of the medical record intercepted image, providing a direct basis for subsequent classification; determining the classification information of the medical record file according to the text recognition information of the medical record intercepted image and the rule configuration information, realizing efficient use of OCR and improving medical record recognition efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of medical record information technology, and in particular, relates to a medical record classification method, system and device. Background Art

[0002] With the rapid development of information construction, the construction of hospital information systems has gradually become more complete, but there are many difficulties in converting historical archived medical records to electronic form. The stock of historical paper medical records is large, and the existing electronic technology is backward. It mainly relies on manual methods to copy and classify and identify, resulting in a large amount of labor and high construction costs. The electronicization of historical medical records can not only improve patient satisfaction, but also save hospital costs (warehouse costs, independent copy window costs), and also help improve the efficiency of medical record research and learning in the hospital.

[0003] In the current medical record electronicization, OCR recognition takes 6 seconds to recognize one page of medical records on an ordinary PC (Intel(R) Xeon(R) CPU E5-2690 v4 @2.60GHz) when all resources are occupied. Only 10 pages can be recognized per minute. If business programs are run, the recognition efficiency will be even lower. Ordinary scanners can scan 40-60 pages per minute, and the recognition efficiency is far lower than the scanning efficiency. When the number of medical records is large (about 8 million pages per year in ordinary tertiary hospitals), the recognition function cannot be fully utilized and the recognition technology is inefficient. Summary of the invention

[0004] The embodiments of the present application provide a medical record classification method, system and device, which can solve the problem in OCR recognition technology that the recognition function cannot be fully utilized and the recognition technology is inefficient when the number of electronic medical records to be recognized is large.

[0005] In a first aspect, an embodiment of the present application provides a medical record classification method, comprising:

[0006] Determine rule configuration information and original medical record images of medical record files;

[0007] Based on the rule configuration information, the original medical record image is intercepted to obtain a medical record intercepted image to be identified;

[0008] Determine the task quantity of each initialized task thread, and dynamically allocate the medical record intercepted images to be identified to different task threads according to the task quantity;

[0009] In the task thread, text recognition is performed on the medical record screenshot according to the rule configuration information to obtain text recognition information of the medical record screenshot;

[0010] The classification information of the medical record file is determined according to the text recognition information and the rule configuration information of the medical record screenshot.

[0011] The above technical solutions in the embodiments of the present application have at least the following technical effects:

[0012] The medical record classification method provided in the embodiment of the present application provides data support for subsequent medical record classification by determining the rule configuration information and the original medical record image of the medical record file. The original medical record image is intercepted based on the rule configuration information to obtain the medical record intercepted image to be identified, thereby reducing unnecessary identification and improving recognition efficiency. The number of tasks for each initialized task thread is determined, and the medical record intercepted images to be identified are dynamically allocated to different task threads based on the number of tasks to improve efficiency and resource utilization. In the task thread, text recognition is performed on the medical record intercept image based on the rule configuration information to obtain the text recognition information of the medical record intercept image, providing a direct basis for subsequent classification. Based on the text recognition information of the medical record intercept image and the rule configuration information, the classification information of the medical record file is determined to achieve efficient use of OCR and improve medical record recognition efficiency.

[0013] In a second aspect, an embodiment of the present application provides a medical record classification system, including:

[0014] A configuration unit, used to determine rule configuration information and an original medical record image of a medical record file;

[0015] A capture unit, configured to capture the original medical record image based on the rule configuration information to obtain a captured medical record image to be identified;

[0016] A task unit, used for determining the number of tasks of each initialized task thread, and dynamically allocating the medical record intercepted images to be identified to different task threads according to the number of tasks;

[0017] A recognition unit, configured to perform text recognition on the medical record screenshot according to the rule configuration information in the task thread to obtain text recognition information of the medical record screenshot;

[0018] A classification unit is used to determine the classification information of the medical record file according to the text recognition information of the medical record screenshot and the rule configuration information.

[0019] In a third aspect, an embodiment of the present application provides a medical record classification device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method as described in any one of the above aspects when executing the computer program.

[0020] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method of any one of the above aspects.

[0021] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the above aspects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a flowchart of a medical record classification method provided in one embodiment of the present application;

[0024] Figure 2 It is a schematic diagram of the operation flow of the medical record classification method provided in one embodiment of the present application;

[0025] Figure 3 is a flowchart of step S100 in the medical record classification method provided in one embodiment of the present application;

[0026] Figure 4 is a flowchart of step S300 in the medical record classification method provided in one embodiment of the present application;

[0027] Figure 5 is a flowchart of step S400 in the medical record classification method provided in one embodiment of the present application;

[0028] Figure 6 is a structural diagram of a medical record classification system provided by an embodiment of the present application;

[0029] Figure 7 It is a structural schematic diagram of a medical record classification device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if the described condition or event is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce the described condition or event is detected" or "in response to detecting the described condition or event" depending on the context.

[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0035] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0036] In the current medical record electronicization, OCR recognition takes 6 seconds to recognize one page of medical records on an ordinary PC (Intel(R) Xeon(R) CPU E5-2690 v4 @2.60GHz) when all resources are occupied. Only 10 pages can be recognized per minute. If business programs are run, the recognition efficiency will be even lower. Ordinary scanners can scan 40-60 pages per minute, and the recognition efficiency is far lower than the scanning efficiency. When the number of medical records is large (about 8 million pages per year in ordinary tertiary hospitals), the recognition function cannot be fully utilized and the recognition technology is inefficient.

[0037] To solve the above problems, the embodiments of the present application provide a medical record classification method, system and device. In this method, by determining the rule configuration information and the original medical record image of the medical record file, data support is provided for the subsequent medical record classification. The original medical record image is intercepted based on the rule configuration information to obtain the medical record intercepted image to be identified, thereby reducing unnecessary identification and improving the recognition efficiency. The number of tasks for each initialized task thread is determined, and the medical record intercepted images to be identified are dynamically allocated to different task threads according to the number of tasks to improve efficiency and resource utilization. In the task thread, text recognition is performed on the medical record intercept image according to the rule configuration information to obtain the text recognition information of the medical record intercept image, which provides a direct basis for subsequent classification. According to the text recognition information of the medical record intercept image and the rule configuration information, the classification information of the medical record file is determined to achieve efficient use of OCR and improve the efficiency of medical record recognition.

[0038] The medical record classification method provided in the embodiment of the present application can be applied to a terminal device. In this case, the terminal device is the executor of the medical record classification method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0039] For example, the terminal device may be an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a desktop computer, a computer, a laptop computer, a communication device, a computing device, a satellite wireless device, etc.

[0040] In order to better understand the medical record classification method provided in the embodiment of the present application, the specific implementation process of the medical record classification method provided in the embodiment of the present application is exemplarily introduced below.

[0041] Figure 1 A schematic flow chart of a medical record classification method provided in an embodiment of the present application is shown. Figure 2 The schematic diagram of the operation flow of the medical record classification method provided in the embodiment of the present application is shown in FIG. Figure 1 and Figure 2 , medical record classification methods include:

[0042] S100, determining rule configuration information and an original medical record image of a medical record file.

[0043] It can be understood that the rule configuration required for processing the original medical record image can be obtained and defined. A series of rule configurations can be received, including image capture definition values, block number definition values, and classification recognition definition values, which determine the subsequent image processing method. The image capture definition value includes specific parameters of how to capture the image, such as coordinates, size, and scale, while the block number definition value determines the number of text blocks that need to be recognized during recognition. The text block is a text area with coherent semantics recognized by OCR (optical character recognition). The classification recognition definition value indicates how to classify the medical record image, which can be a specific keyword or format requirement. The original medical record image can be obtained from a specified data source or through a scanner, camera, or other device.

[0044] In one possible implementation, see Figure 3 , S100, determining the rule configuration information and the original medical record image of the medical record file, including:

[0045] S110, receiving rule configuration definition values ​​and obtaining the original medical record image of the medical record file; wherein the rule configuration definition values ​​include image capture definition values, block number definition values, and classification recognition definition values.

[0046] It is understood that the rule configuration definition value may be received by receiving user input or reading a configuration file. The received rule configuration definition value includes an image capture definition value, a block number definition value, and a classification recognition definition value. The original medical record image may be obtained from a specified data source through an API link or through a scanner, camera, or other device.

[0047] S120: Determine image capture rule configuration information according to the image capture definition value.

[0048] It is understood that specific image capture rule configuration information can be determined based on the received image capture definition value. The image capture definition value can be parsed, including the coordinates of the target area, the capture size, and the possible scaling ratio. The capture parameters are set according to the image capture definition value, and the corresponding rule configuration is generated, which helps the subsequent image processing to accurately identify and extract the specified image area.

[0049] For example, the height, x, and width values ​​captured by OpenCV can be defined by parsing the image and capturing the definition values.

[0050] S130, determining the block number recognition rule configuration information according to the block number definition value; wherein the block number definition value is used to determine the number of text blocks that need to be recognized in the medical record, and the text blocks are used to reflect text words and sentences with coherent semantics.

[0051] It can be understood that the block number definition value can be parsed, and the block number definition value can specify the number of text blocks that need to be recognized during recognition, or the size, position and processing order of each block. A text block is a text phrase in a medical record that reflects the existence of coherent semantics, such as "medical record homepage", "discharge record", "patient name: xxx", etc., all of which belong to a text block. The block number definition value helps to effectively identify and process each text block in subsequent processing, thereby improving the efficiency and accuracy of overall recognition.

[0052] Optionally, before determining the block number identification rule configuration information according to the block number definition value in step S130, the method further includes:

[0053] S150, comparing the block number definition value with a preset default block number definition value.

[0054] It is understood that the current block number definition value can be compared with the preset default block number definition value, so that the recognition process is based on reasonable parameter settings, and then it is determined whether the current block number definition value needs to be adjusted to adapt to different image features and recognition requirements. The default block number definition value predetermines a value for judging the block number definition value and determining whether the block number definition value is reasonable.

[0055] S160: If the preset default block number definition value is greater than the block number definition value, calculate a block number redefinition value, and determine the block number redefinition value as the block number definition value.

[0056] It can be understood that if the preset default block number definition value is greater than the current block number definition value, the block number definition value is considered unreasonable and needs to be redefined. This can be achieved by calculating and adjusting the existing value, calculating the block number redefinition value by a specific method, and using the calculated block number redefinition value as the new block number definition value, so that when the block number definition value is unreasonable, the block number definition value can be automatically set reasonably to improve the classification accuracy. Since there is a dividing solid line in all medical records, which separates the classification header information of the medical record from the medical record diagnosis content, the block number redefinition value can be determined by finding this dividing solid line.

[0057] Optionally, in step S160, calculating a block number redefinition value and determining the block number redefinition value as a block number definition value includes:

[0058] S161, randomly select an original medical record image, and perform edge detection on the original medical record image to determine all horizontal lines in the original medical record image and the line lengths and line positions corresponding to the horizontal lines.

[0059] It can be understood that an original medical record image can be randomly selected from the medical record file through a random algorithm. For the selected original medical record image, an OpenCV edge detection algorithm (such as Canny edge detection) can be used to identify all horizontal lines in the image, and the length and position coordinates of each horizontal line can be recorded.

[0060] S162, determine the width of the original medical record image, and compare the corresponding line lengths of all horizontal lines in the original medical record image with the width of the original medical record image to obtain all standard horizontal lines and standard horizontal line positions in the original medical record image.

[0061] It can be understood that the width of the original medical record image can be calculated and determined by an image processing algorithm, and the length of each horizontal line can be compared with the image width. Since the length of the solid line separating the classification header information and the content in all medical records is the longest solid line in the medical record, the horizontal lines that meet the preset standards can be screened out by means of a preset length range, and the horizontal lines that meet the standards and their positions can be recorded, and the horizontal lines that meet the standards can be used as standard horizontal lines.

[0062] For example, assuming that the image width is A pixels, horizontal lines with a length between pixels (0.8A, A) are screened out as standard horizontal lines, and the positions of these lines are recorded.

[0063] S163, obtaining the block number definition lines and the line positions of the block number definition lines in the original medical record image according to all the standard horizontal lines and the line positions of the standard horizontal lines.

[0064] It can be understood that in the medical record image, the classification header information of the medical record is at the top of the medical record. Therefore, the position of the dividing line can be determined by the position of the standard horizontal line. The dividing line will be determined as the block number definition line, and the position of the block number definition line will be recorded. The block number definition line is the dividing line between the classification header information and the content, and is used to determine the appropriate text recognition cutoff block number.

[0065] Exemplarily, S163, obtaining the block number definition lines and the line positions of the block number definition lines in the original medical record image according to all the standard horizontal lines and the line positions of the standard horizontal lines, includes:

[0066] S1631, determining a first ordinate value of each standard horizontal line according to all standard horizontal lines and their line positions.

[0067] It can be understood that all standard horizontal lines and the line positions of standard horizontal lines have been acquired and recorded through edge detection. The vertical coordinate value of each standard horizontal line can be obtained by extracting and identifying the recorded standard horizontal lines and the line positions of standard horizontal lines. The vertical coordinate value is the Y coordinate position of the first non-blank row below the line, and the value of the first row with a non-zero pixel value below the current line. The vertical coordinate value of each standard horizontal line is called a first vertical coordinate value.

[0068] S1632, comparing the first ordinate value of each standard horizontal line, determining the standard horizontal line with the largest first ordinate value as the block number definition line, and obtaining the block number definition line and the line position of the block number definition line in the original medical record image.

[0069] It can be understood that after determining the first ordinate value of each standard horizontal line, all the first ordinate values ​​can be compared through a sorting algorithm or a quotient method to determine the standard horizontal line corresponding to the largest first ordinate value, thereby determining the segmentation of the medical record header classification information and content. That is, the standard horizontal line corresponding to the largest first ordinate value can be determined as the block number definition line, thereby determining the dividing line between the classification header information and content.

[0070] S164, calculating a block number redefinition value based on the block number definition line and the line position of the block number definition line in the original medical record image and determining the block number redefinition value as the block number definition value.

[0071] It can be understood that according to the position of the block number definition line, the corresponding area in the image can be intercepted, and the text block recognition is performed on the intercepted image to count the number of text blocks. According to the number of recognized text blocks, the block number redefinition value is determined through linear change, and the calculated block number redefinition value is used as the new block number definition value, so that when the block number definition value is unreasonable, the block number definition value can be automatically set reasonably.

[0072] Exemplarily, S164, calculating a block number redefinition value according to a block number definition line and a line position of the block number definition line in the original medical record image and determining the block number redefinition value as the block number definition value, includes:

[0073] S1641, intercepting the original medical record image according to the block number definition line and the line position of the block number definition line in the original medical record image, to obtain a block number definition image corresponding to the original medical record image.

[0074] It can be understood that in the medical record image, the classification header information of the medical record is at the top of the dividing solid line, so the position of the line (dividing solid line) can be defined by the number of blocks to determine the area where the classification header information of the medical record needs to be intercepted.

[0075] Exemplarily, according to the position (x, y) of the block number definition line, the area in the original medical record image where the y value is greater than the block number definition line can be determined as the cut-off area, and the cut-off area in the image can be cut off, and the cut-off image can be used as the block number definition image.

[0076] Exemplarily, S1641, the original medical record image is intercepted according to the block number definition lines and the line positions of the block number definition lines in the original medical record image to obtain a block number definition image corresponding to the original medical record image.

[0077] S16411, based on the block number definition line and the line position of the block number definition line in the original medical record image, determine the horizontal coordinate range and the second vertical coordinate value corresponding to the block number definition line.

[0078] It can be understood that, through the block number definition line and the recorded line position of the block number definition line, its valid X coordinate range and ordinate value in the image can be extracted, that is, the X coordinate position of the first and last non-zero pixels on the line is found, and the Y coordinate position of the first non-blank row below the block number definition line is determined, that is, the value of the first row with non-zero pixel value below the current line.

[0079] S16412, based on the number of blocks defining the horizontal coordinate range and the second vertical coordinate value corresponding to the line, calculate the interception coordinate value.

[0080] It can be understood that the horizontal coordinate range and the second vertical coordinate value obtained previously can be used to determine the boundary coordinates of the intercepted image, which can include the horizontal coordinate range of the current block number definition line, and the position from the maximum vertical coordinate value of the image to the end position of the second vertical coordinate value, that is, the interception coordinate value is obtained. The interception coordinate value is used to intercept the original medical record image, thereby obtaining the subsequent block number definition image.

[0081] S16413, intercepting the original medical record image according to the interception coordinate value to obtain a block number definition image corresponding to the original medical record image.

[0082] It can be understood that after the interception coordinate values ​​are obtained, a specific image can be intercepted from the original image using the calculated interception coordinate values, and this specific image is the block number definition image.

[0083] S1642, identifying the block number definition image corresponding to the original medical record image, and obtaining the number of text block areas of the block number definition image; wherein the number of text block areas is used to reflect the number of text block areas with coherent semantics.

[0084] It can be understood that OCR can be used to perform text block recognition on the block number definition image, and the number of recognized text blocks can be counted, that is, the number of text block areas of the block number definition image can be obtained.

[0085] S1643, linearly calculate the number of text block areas of the block number definition image to obtain a block number redefinition value and determine the block number redefinition value as the block number definition value.

[0086] It can be understood that according to the number of identified text block areas, the number of text block areas can be judged to determine the algorithm mapping interval, and according to the result of the size judgment, a preset linear algorithm is obtained through mapping, and a linear calculation is performed on the number of text block areas to determine the block number redefinition value, and the calculated block number redefinition value is used as the new block number definition value, so that the block number definition value always maintains an appropriate value.

[0087] For example, assuming that 3 text block areas are identified, the linear calculation of the mapping determined by judging the number of text block areas is y=2n-1, and the new block number redefinition value is 5, then 5 is used as the new block number definition value; assuming that 8 text block areas are identified, the linear calculation of the mapping determined by judging the number of text block areas is y=(n / 2)+2, and the new block number redefinition value is 6, then 6 is used as the new block number definition value.

[0088] S140, determining the classification identification rule configuration information according to the classification identification definition value.

[0089] It can be understood that the classification recognition definition value can be parsed to determine how to classify the content in the image. The classification recognition definition value can be to determine specific keywords, patterns or format requirements, which will guide the subsequent classification recognition process, and generate corresponding classification recognition rule configuration information based on the classification recognition definition value, which will help to accurately classify the medical record image in the subsequent processing, and make the classification results traceable and accurate.

[0090] S200, intercepting the original medical record image based on the rule configuration information to obtain a medical record intercepted image to be identified.

[0091] It is understood that the interception area can be determined according to the image interception rule configuration information, which can be through image processing algorithms, such as edge detection and image segmentation. After the target area is identified, the original image can be cropped according to the image interception rule configuration information to generate a medical record interception image to be identified, and only the required content can be identified, reducing noise and interference and improving recognition efficiency.

[0092] In a possible implementation, S200, based on the rule configuration, the original medical record image is intercepted to obtain a medical record interception image to be identified, including:

[0093] S210, intercepting the original medical record image based on the image interception rule configuration information to obtain a medical record intercepted image to be identified.

[0094] Optionally, S210, intercepting the original medical record image based on the image interception rule configuration information to obtain the medical record intercepted image to be identified, includes:

[0095] S211, determining an image capture area of ​​the original medical record image based on the image capture rule configuration.

[0096] It is understood that the relevant image capture rule configuration can be parsed, and the image capture rule configuration can include specific coordinates, area size, and possible scaling information. Through the image capture rule configuration, one or more target areas can be identified in the original medical record image. Image processing techniques, such as edge detection or feature matching, can be used to optimize the positioning process. The determined image capture area is recorded for use in subsequent capture operations.

[0097] S212, the original medical record image is intercepted according to the image interception area of ​​the original medical record image to obtain a medical record intercepted image to be identified.

[0098] It will be appreciated that an image cropping algorithm may be applied to extract the identified region from the original image to generate a new image file containing the specified cropped region.

[0099] For example, the open source OpenCV library can be used to effectively capture images, and the cv2.imread() function of OpenCV can be used to read the original medical record image. According to the determined image capture area, a rectangular frame is defined, which can be specified by the coordinates (x, y) and width and height (width, height) obtained in the image capture rule configuration. After the capture area is determined, the NumPy array slice is used to capture the specified area.

[0100] S300, determining the task quantity of each initialized task thread, and dynamically allocating the medical record intercepted images to be identified to different task threads according to the task quantity.

[0101] It can be understood that the recognition efficiency can be improved through parallel processing. A dynamic task queue can be maintained to determine the number of tasks for each task thread that has been initialized, and the status of each thread can be monitored in real time. Based on the number of tasks for each task thread, the medical record images to be recognized are dynamically allocated to the thread with the least number of tasks. Load balancing algorithms, such as polling or minimum number of connections, can be used to ensure efficient use of resources and maximize processing speed and efficiency.

[0102] In one possible implementation, see Figure 4 , S300, determining the number of tasks of each initialized task thread, and dynamically allocating the medical record intercepted images to be identified to different task threads according to the number of tasks, including:

[0103] S311, determining the number of tasks of each initialized task thread.

[0104] It is understood that the number of tasks assigned to each thread can be calculated and determined by checking the status of each thread. The number of tasks for each thread can be tracked through thread management tools or data structures (such as task queues). Based on the complexity of the tasks and resource requirements, the allocation of tasks can be dynamically adjusted to avoid overloading or idling any one thread, thereby improving overall processing efficiency.

[0105] S312, based on the number of tasks of each task thread, allocating the medical record screenshot to be identified to the task thread with the least number of tasks.

[0106] It can be understood that after determining the number of tasks for each initialized task thread, the least number of connections method (Least Connections) can be used to select a thread with the least number of tasks to assign the medical record interception image to be identified to the thread for execution. The least number of connections method assigns new tasks to the thread with the least number of current connections, achieving dynamic load balance, strong adaptability, and improving overall response speed.

[0107] S400, in the task thread, performing text recognition on the medical record screenshot according to the rule configuration information to obtain text recognition information of the medical record screenshot.

[0108] It can be understood that text recognition can be performed on the captured medical record image in the task thread. The task thread determines the number of text blocks to be recognized based on the block number recognition rule. The captured image is processed by OCR (optical character recognition) technology, the recognized text block information is recorded, and the number of recognized text blocks is calculated. According to the recognized number and the preset number, the recognition is stopped and all the recognized information is sorted to ensure the integrity and accuracy of the final result.

[0109] In one possible implementation, see Figure 5 , S400, in the task thread, performing text recognition on the medical record screenshot according to the rule configuration information to obtain text recognition information of the medical record screenshot, including:

[0110] S410, in the task thread, performing text recognition on the medical record screenshot according to the block number recognition rule configuration information to obtain text recognition information of the medical record screenshot.

[0111] Optionally, S410, performing text recognition on the medical record screenshot according to the block number recognition rule configuration information to obtain text recognition information of the medical record screenshot, including:

[0112] S411, determining the number of preset text blocks required to be identified in the medical record capture image according to the block number identification rule configuration information; wherein the text blocks include text words and sentences with coherent semantics.

[0113] It is understood that the block number recognition rule configuration information can be read. The block number recognition rule configuration information may include parameters such as the preset number of text blocks, the minimum size of each text block, and the maximum size. The number of text blocks to be recognized is determined according to the preset value in the block number recognition rule configuration information. For example, the block number recognition rule configuration information may specify that the number of text blocks to be recognized for each medical record intercept image is 5.

[0114] S412, in the task thread, performing text block recognition on the medical record screenshot image, determining the text block information and calculating the number of recognized text blocks.

[0115] It can be understood that in the task thread, OCR technology can be applied to the medical record screenshot image to perform actual text block recognition, process the text blocks in the image one by one, and extract the content and location information of each block. During the OCR recognition process, the number of text blocks that have been successfully recognized can be recorded, and this information can be stored in a specified data structure for subsequent analysis and processing.

[0116] S413, judging based on the number of recognized text blocks and the preset number of text blocks, stopping the recognition of the medical record screenshot image, and determining all recognized text block information as the text recognition information of the medical record screenshot image.

[0117] It is understood that the number of recognized text blocks can be compared with the preset number of text blocks to determine whether the recognition process should be stopped. If the number of recognized text blocks reaches the preset number of text blocks, the recognition process is terminated to ensure the efficiency and accuracy of the processing.

[0118] Exemplarily, in step S413, judging based on the number of recognized text blocks and the preset number of text blocks, stopping the recognition of the medical record interception image includes:

[0119] S4131, when the number of recognized text blocks is equal to the preset number of text blocks, stop recognizing the medical record capture image.

[0120] It can be understood that when it is detected that the number of recognized text blocks is equal to the preset number, the recognition will be stopped immediately. This can be done through conditional judgment statements. Through this mechanism, not only can the processing efficiency be improved, but also unnecessary calculations and resource consumption can be reduced, ensuring the accuracy of the recognition results.

[0121] S500, determining classification information of the medical record file according to the text recognition information and rule configuration information of the medical record screenshot.

[0122] It is understood that the text recognition information extracted from the medical record clipped image can be used in combination with the classification recognition rule configuration information to judge and determine the classification information of the medical record file. The classification recognition rule configuration information can be a specific term, keyword or pattern, which is used to effectively map the recognized information to a preset classification. By analyzing and processing the recognized text so as to classify it into predefined categories, such as outpatient records, hospitalization records or test results, efficient classification of medical records is achieved.

[0123] In a possible implementation, S500, according to the text recognition information and rule configuration information of the medical record screenshot, the classification information of the medical record file is determined, including:

[0124] S510, determining classification information of the medical record file according to the text recognition information of the medical record screenshot and the classification recognition rule configuration information.

[0125] Optionally, S510, determining classification information of the medical record file according to the text recognition information of the medical record intercepted image and the classification recognition rule configuration information, including:

[0126] S511, matching the text recognition information of the medical record capture image with the classification recognition rule configuration information to determine the classification information corresponding to the text recognition information.

[0127] It is understandable that the text recognition information of the medical record screenshot image can be matched in detail to find the corresponding relationship with the classification recognition rule configuration information, for example, by comparing the recognized text information with the keywords or features in the rule to determine the classification information corresponding to the text.

[0128] S512, based on the classification information corresponding to the text recognition information, obtain the classification information of the medical record file.

[0129] It can be understood that based on the corresponding classification information identified in the text recognition information, the final classification result of the medical record file is obtained, thereby improving the efficiency of medical record classification.

[0130] Exemplarily, the classification recognition rule configuration information includes configuration keywords. S511, matching the text recognition information of the medical record intercepted image with the classification recognition rule configuration information to determine the classification information corresponding to the text recognition information, including:

[0131] S5111, compare the text recognition information of the medical record screenshot image with the configuration keyword to obtain the classification matching keyword corresponding to the text recognition information.

[0132] It is understood that all recognized text block information can be extracted from the medical record screenshot image, and a preset keyword list can be obtained from the classification recognition rule configuration information. The content of each text block in the extracted text recognition information is compared with the configured keywords one by one. If the content of a text block completely matches or partially matches the configured keyword (for example, contains the keyword), the keyword is recorded as the classification matching keyword.

[0133] S5112, determining the classification information corresponding to the text recognition information based on the classification matching keywords corresponding to the text recognition information.

[0134] It can be understood that the classification information corresponding to each matching keyword can be determined based on the mapping relationship between the configured keywords and the classification information. The classification information corresponding to all matching keywords is summarized to generate the final classification information. Through automatic text recognition and classification, the time and workload of manual classification are greatly reduced, and a large number of medical records can be processed in a short time and the efficient use of OCR is achieved. The efficiency of OCR recognition and medical record classification is improved, and hospital costs (warehouse costs, independent copy window costs) are saved. It is also beneficial to improve the efficiency of medical record research and learning in the hospital, realize intelligent recognition and classification, and reduce the difficulty of promoting medical record electronicization.

[0135] For example, it is assumed that the mapping relationship between the configuration keywords and the classification information is as follows:

[0136] "Medical Records Home" -> Medical Records Home

[0137] "Discharge Record" -> Discharge Record

[0138] The matched keyword is ["medical record homepage"], so the classified information is the medical record homepage.

[0139] Corresponding to the medical record classification method of the above embodiment, the embodiment of the present application also provides a medical record classification system, and each unit of the system can implement each step of the medical record classification method. Figure 6 A structural block diagram of a medical record classification system provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0140] Reference Figure 6 , the medical record classification system includes:

[0141] A configuration unit, used to determine rule configuration information and an original medical record image of a medical record file;

[0142] A capture unit, configured to capture the original medical record image based on the rule configuration information to obtain a captured medical record image to be identified;

[0143] A task unit, used for determining the number of tasks of each initialized task thread, and dynamically allocating the medical record intercepted images to be identified to different task threads according to the number of tasks;

[0144] A recognition unit, configured to perform text recognition on the medical record screenshot according to the rule configuration information in the task thread to obtain text recognition information of the medical record screenshot;

[0145] A classification unit is used to determine the classification information of the medical record file according to the text recognition information of the medical record screenshot and the rule configuration information.

[0146] It should be noted that the information interaction, execution process, etc. between the above-mentioned systems / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0147] The technicians in the relevant field 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 for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit module can exist physically separately, or two or more unit modules can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0148] The present application also provides a medical record classification device. Figure 7 This is a schematic diagram of the structure of a medical record classification device provided in one embodiment of the present application. Figure 7 As shown, the medical record classification device 6 of this embodiment includes: at least one processor 60 ( Figure 7 Only one is shown), at least one memory 61 ( Figure 7 Only one is shown) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the medical record classification device 6 implements the steps in any of the above-mentioned medical record classification method embodiments, or implements the functions of each unit in the above-mentioned system embodiments.

[0149] Exemplarily, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the medical record classification 6.

[0150] The medical record classification device 6 can be a computing device or terminal device such as a desktop computer, a notebook, a PDA, and a cloud server. The medical record classification device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that Figure 7 It is only an example of the medical record classification device 6 and does not constitute a limitation of the medical record classification device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, buses, etc.

[0151] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0152] In some embodiments, the memory 61 may be an internal storage unit of the medical record classification device 6, such as a hard disk or memory of the medical record classification device 6. In other embodiments, the memory 61 may also be an external storage device of the medical record classification device 6, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the medical record classification device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the medical record classification device 6. The memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0153] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0154] An embodiment of the present application provides a computer program product. When the computer program product runs on a medical record classification device, the medical record classification device implements the steps in any of the above-mentioned method embodiments.

[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the medical record classification device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0157] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0158] In the embodiments provided in the present application, it should be understood that the disclosed medical record classification system / medical record classification device and method can be implemented in other ways. For example, the medical record classification system / medical record classification device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

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

[0160] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person 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 application, and should all be included in the protection scope of the present application.

Claims

1. A medical record classification method, characterized in that: include: Determine rule configuration information and original medical record images of medical record files; Based on the rule configuration information, the original medical record image is intercepted to obtain a medical record intercepted image to be identified; Determine the task quantity of each initialized task thread, and dynamically allocate the medical record intercepted images to be identified to different task threads according to the task quantity; In the task thread, text recognition is performed on the medical record screenshot according to the rule configuration information to obtain text recognition information of the medical record screenshot; Determining classification information of the medical record file according to the text recognition information of the medical record screenshot and the rule configuration information; The determination rule configuration information and the original medical record image of the medical record file include: Receiving a rule configuration definition value; wherein the rule configuration definition value includes a block number definition value; The method further comprises: Comparing the block number definition value with a preset default block number definition value; If the preset default block number definition value is greater than the block number definition value, calculating a block number redefinition value, and determining the block number redefinition value as the block number definition value; The calculating the block number redefinition value and determining the block number redefinition value as the block number definition value includes: Randomly select an original medical record image, and perform edge detection on the original medical record image to determine all horizontal lines in the original medical record image and the line lengths and line positions corresponding to the horizontal lines; Determine the width of the original medical record image, and compare the line lengths corresponding to all horizontal lines in the original medical record image with the width of the original medical record image to obtain all standard horizontal lines in the original medical record image and the line positions of the standard horizontal lines; Obtaining the block number definition lines and the line positions of the block number definition lines in the original medical record image according to all the standard horizontal lines and the line positions of the standard horizontal lines; Calculating a block number redefinition value according to a block number definition line in the original medical record image and a line position of the block number definition line and determining the block number redefinition value as the block number definition value comprises: The original medical record image is intercepted according to the block number definition line in the original medical record image and the line position of the block number definition line to obtain a block number definition image corresponding to the original medical record image; Identify the block number definition image corresponding to the original medical record image to obtain the number of text block areas of the block number definition image; wherein the number of text block areas is used to reflect the number of text block areas with coherent semantics; A linear calculation is performed on the number of the text block areas of the block number definition image to obtain a block number redefinition value and the block number redefinition value is determined as the block number definition value.

2. The medical record classification method according to claim 1, characterized in that: The determination rule configuration information and the original medical record image of the medical record file include: Obtaining an original medical record image of a medical record file; wherein the rule configuration definition value includes an image capture definition value and a classification recognition definition value; Determining image capture rule configuration information according to the image capture definition value; Determining block number recognition rule configuration information according to the block number definition value; wherein the block number definition value is used to determine the number of text blocks that need to be recognized in the medical record, and the text blocks are used to reflect text words and sentences with coherent semantics; Determining classification identification rule configuration information according to the classification identification definition value; The method of intercepting the original medical record image based on the rule configuration to obtain a medical record interception image to be identified includes: Based on the image capture rule configuration information, the original medical record image is captured to obtain a medical record capture image to be identified; In the task thread, performing text recognition on the medical record screenshot according to the rule configuration information to obtain text recognition information of the medical record screenshot includes: In the task thread, text recognition is performed on the medical record screenshot according to the block number recognition rule configuration information to obtain text recognition information of the medical record screenshot; The step of determining the classification information of the medical record file according to the text recognition information of the medical record screenshot and the rule configuration information includes: The classification information of the medical record file is determined according to the text recognition information and the classification recognition rule configuration information of the medical record screenshot.

3. The medical record classification method according to claim 1, characterized in that: The step of obtaining the block number definition lines and the line positions of the block number definition lines in the original medical record image according to all the standard horizontal lines and the line positions of the standard horizontal lines comprises: Determine a first ordinate value of each standard transverse line according to all standard transverse lines and the line positions of the standard transverse lines; The first ordinate value of each of the standard horizontal lines is compared, and the standard horizontal line with the largest first ordinate value is determined as the block number definition line, so as to obtain the block number definition line in the original medical record image and the line position of the block number definition line.

4. The medical record classification method according to claim 1, characterized in that: The method of intercepting the original medical record image according to the block number definition line in the original medical record image and the line position of the block number definition line to obtain the block number definition image corresponding to the original medical record image includes: Determine the horizontal coordinate range and the second vertical coordinate value corresponding to the block number definition line according to the block number definition line in the original medical record image and the line position of the block number definition line; Calculate the interception coordinate value based on the horizontal coordinate range and the second vertical coordinate value corresponding to the block number definition line; The original medical record image is intercepted according to the interception coordinate values ​​to obtain a block number definition image corresponding to the original medical record image.

5. The medical record classification method according to claim 1, characterized in that: The step of determining the number of tasks of each initialized task thread and dynamically allocating the medical record intercepted images to be identified to different task threads according to the number of tasks includes: Determine the number of tasks for each task thread that has been initialized; Based on the number of tasks of each task thread, the medical record screenshot to be identified is allocated to the task thread with the least number of tasks.

6. The medical record classification method according to claim 2, characterized in that: In the task thread, performing text recognition on the medical record screenshot according to the block number recognition rule configuration information to obtain text recognition information of the medical record screenshot includes: Determining the number of preset text blocks required to be identified in the medical record intercepted image according to the block number identification rule configuration information; wherein the text blocks include text words and sentences with coherent semantics; In the task thread, the text blocks are recognized on the medical record screenshot, the text block information is determined and the number of recognized text blocks is calculated; A judgment is made based on the number of the identified text blocks and the preset number of text blocks, the identification of the medical record screenshot image is stopped, and all the identified text block information is determined as the text identification information of the medical record screenshot image.

7. The medical record classification method according to claim 2, characterized in that: The step of determining the classification information of the medical record file according to the text recognition information of the medical record intercepted image and the classification recognition rule configuration information includes: Matching the text recognition information of the medical record screenshot image with the classification recognition rule configuration information to determine the classification information corresponding to the text recognition information; Based on the classification information corresponding to the text recognition information, obtaining the classification information of the medical record file; And / or, the classification recognition rule configuration information includes a configuration keyword, and the text recognition information of the medical record screenshot image is matched with the classification recognition rule configuration information to determine the classification information corresponding to the text recognition information, including: Comparing the text recognition information of the medical record screenshot image with the configuration keyword to obtain a classification matching keyword corresponding to the text recognition information; According to the classification matching keyword corresponding to the text recognition information, the classification information corresponding to the text recognition information is determined.

Citation Information

Patent Citations

  • Intelligent medical record generation method and device, computer device and storage medium

    CN109872784A

  • Picture information identification method and device, computer equipment and storage medium

    CN110059687A