Method, device, electronic device and readable medium for sending traditional Chinese medicine form information

By collecting, processing and identifying the order number of the Chinese medicine list image, and combining the pre-trained recognition model to generate and send Chinese medicine form information, the problems of high error rate and low recognition accuracy in the existing technology are solved, and the error rate of outbound order number input in the existing technology is achieved. More efficient sending of traditional Chinese medicine form information, reducing the waste of printing paper resources.

CN117746435BActive Publication Date: 2025-02-07海南榕树家信息科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311764338.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2025-02-07
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

In the prior art, when generating Chinese medicine form information and sending operations, the error rate of inputting outbound order numbers is high, resulting in wasted printing paper resources and low image recognition accuracy.

Method used

The associated image acquisition device collects the drug list image, performs image interpolation and cropping, combines the pre-trained order area recognition model and the Chinese medicine order number recognition model, performs binary processing and feature extraction, and finally generates and sends Chinese medicine Form information.

Benefits of technology

It improves the accuracy of identification of outbound order numbers, reduces the number of errors in printing order numbers, and thus reduces the waste of printing paper resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117746435B_ABST
    Figure CN117746435B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method, device, electronic device and readable medium for sending Chinese medicine form information. A specific implementation of the method includes: collecting a Chinese medicine list image; performing image interpolation processing on the Chinese medicine list image; inputting the enhanced Chinese medicine list image into the order area recognition model to obtain target frame information; performing image cropping processing on the enhanced Chinese medicine list image according to the target frame information to obtain an order number image; binarizing the order number image; inputting the grayscale order number image into the spatial feature extraction layer; inputting the Chinese medicine order number feature map set into the feature fusion layer; inputting the fused feature map set into the bidirectional recurrent network layer; inputting the sequence feature tensor into the weight feature extraction layer; inputting the weight feature tensor into the transcription layer; generating Chinese medicine form information according to the order number recognition result information; and sending the Chinese medicine form information to the printing terminal. This implementation can reduce the waste of printing paper resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and readable medium for sending traditional Chinese medicine form information. Background Art

[0002] Pharmaceutical products are related to human life safety. In order to effectively control the storage quality of traditional Chinese medicines, when storing traditional Chinese medicines (such as Chinese medicinal materials and traditional Chinese medicine beverages), corresponding storage warehouses (usually divided into waiting inspection warehouse area, qualified product warehouse area, delivery warehouse area, unqualified product warehouse area and return warehouse area, etc.) should be set according to the nature of traditional Chinese medicines. And set up the corresponding traditional Chinese medicine outbound process (including picking, inspection and delivery, etc.). Each procedural step in the outbound process of traditional Chinese medicines requires relevant personnel to print the form of the corresponding procedural step according to the outbound order number of the item (usually the outbound order number is unique and long, such as 25 digits) to check the shipment of traditional Chinese medicines. At present, when generating traditional Chinese medicine form information and sending operations, the commonly used methods are: 1) manually input the outbound order number, and generate the form of the corresponding procedural step according to the manually input outbound order number. 2) Take a photo of the entire form before the procedural step, and use a general order number recognition model (such as a transformer model) to identify the outbound order number, and generate the form of the corresponding procedural step according to the identified outbound order number. Finally, the generated form is sent to the relevant printing device for relevant personnel to conduct outbound verification.

[0003] However, when using the above method to generate Chinese medicine form information and send it, the following technical problems often occur:

[0004] First, since the outbound order number is long, manual input is prone to input errors in the outbound order number, resulting in a waste of printing paper resources, and manual input takes a long time; the entire form before the program step is photographed and recognized, and the feature extraction capability is limited (the complexity and number of parameters of each model are limited, resulting in limited feature extraction capability of the model), resulting in less feature extraction of the outbound order number area in the form (that is, more feature extraction of other non-outbound order number areas in the form, and the proportion of other non-outbound order number areas in the form is relatively large relative to the entire form), the recognition accuracy of the outbound order number is low, and the number of printing order number errors increases, resulting in a waste of printing paper resources.

[0005] Continuing, in the process of adopting technical solutions to solve the above technical problem 1, there are further technical problems as follows:

[0006] Second, in the process of image recognition of outbound order numbers, in order to increase the distinction between foreground and background, the conventional solution is to set a preset grayscale threshold (e.g., 128) based on prior knowledge, and binarize the image based on the preset grayscale threshold. However, due to the influence of different shooting factors, the brightness, contrast, and texture structure of the image are different. Using a unified preset grayscale threshold for binarization of the entire image results in a high probability of misjudgment or distortion of the binarized image, and poor segmentation of the foreground and background of the image, resulting in a low recognition accuracy of the outbound order number, an increase in the number of errors in printing the order number, and a waste of printing paper resources.

[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0008] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0009] Some embodiments of the present disclosure propose a method, device, electronic device and computer-readable medium for sending Chinese medicine form information to solve one or more of the technical problems mentioned in the above background technology section.

[0010] In a first aspect, some embodiments of the present disclosure provide a method for sending Chinese medicine form information, the method comprising: acquiring a Chinese medicine list image through an associated image acquisition device, wherein the Chinese medicine list image includes a Chinese medicine order number; performing image interpolation processing on the Chinese medicine list image to obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image; inputting the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain target frame information corresponding to the Chinese medicine order number; performing image cropping processing on the enhanced Chinese medicine list image according to the target frame information to obtain the enhanced Chinese medicine list image after image cropping processing as an order number image; performing binarization processing on the order number image to obtain the binarization processing order number image as a grayscale image. Order number image; input the grayscale order number image into the spatial feature extraction layer of the pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps, wherein the traditional Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer; input the traditional Chinese medicine order number feature map set into the feature fusion layer to obtain a fused feature map set; input the fused feature map set into the bidirectional recurrent network layer to obtain a sequence feature tensor; input the sequence feature tensor into the weight feature extraction layer to obtain a weight feature tensor; input the weight feature tensor into the transcription layer to obtain order number recognition result information; generate traditional Chinese medicine form information according to the order number recognition result information; send the traditional Chinese medicine form information to the associated printing terminal for printing.

[0011] In a second aspect, some embodiments of the present disclosure provide a device for sending Chinese medicine form information, the device comprising: an acquisition unit, configured to acquire a Chinese medicine list image through an associated image acquisition device, wherein the Chinese medicine list image includes a Chinese medicine order number; an interpolation processing unit, configured to perform image interpolation processing on the Chinese medicine list image, and obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image; a first input unit, configured to input the enhanced Chinese medicine list image into a pre-trained order area recognition model, and obtain target frame information corresponding to the Chinese medicine order number; a cropping processing unit, configured to perform image cropping processing on the enhanced Chinese medicine list image according to the target frame information, and obtain the enhanced Chinese medicine list image after image cropping processing as an order number image; a binarization processing unit, configured to perform binarization processing on the order number image, and obtain the binarization processing order number image as a grayscale order number image; a second input The input unit is configured to input the grayscale order number image into the spatial feature extraction layer of the pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps, wherein the traditional Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer; the third input unit is configured to input the traditional Chinese medicine order number feature map set into the feature fusion layer to obtain a fused feature map set; the fourth input unit is configured to input the fused feature map set into the bidirectional recurrent network layer to obtain a sequence feature tensor; the fifth input unit is configured to input the sequence feature tensor into the weight feature extraction layer to obtain a weight feature tensor; the sixth input unit is configured to input the weight feature tensor into the transcription layer to obtain order number recognition result information; the generating unit is configured to generate traditional Chinese medicine form information according to the order number recognition result information; the sending unit is configured to send the traditional Chinese medicine form information to the associated printing terminal for printing.

[0012] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0013] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0014] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the Chinese medicine form information sending method of some embodiments of the present disclosure, the waste of printing paper resources can be reduced. Specifically, the reason for the waste of printing paper resources is that: due to the long outbound order number, the manual input method is easy to cause the outbound order number input error, thereby causing the waste of printing paper resources, and the manual input takes a long time; the form before the program step is photographed and recognized as a whole, and the feature extraction ability is limited (the complexity and number of parameters of each model are limited, resulting in the limited feature extraction ability of the model), resulting in less feature extraction of the outbound order number area in the form (that is, more feature extraction of other non-outbound order number areas in the form, and the proportion of other non-outbound order number areas in the form relative to the entire form is large), the recognition accuracy of the outbound order number is low, and the number of printing order number errors is increased, thereby causing the waste of printing paper resources. Based on this, the Chinese medicine form information sending method of some embodiments of the present disclosure, first, collects the Chinese medicine list image through the associated image acquisition device. Among them, the above-mentioned Chinese medicine list image includes the Chinese medicine order number. Thus, a Chinese medicine list image with a Chinese medicine order number can be obtained. Thus, it can be used to identify the Chinese medicine order number. Then, the Chinese medicine list image is subjected to image interpolation processing to obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image. Thus, an enhanced Chinese medicine list image after image interpolation processing can be obtained, thereby improving the resolution of the image and improving the clarity of the image. Afterwards, the enhanced Chinese medicine list image is input into a pre-trained order area recognition model to obtain the target frame information corresponding to the Chinese medicine order number. Thus, the target frame information can be obtained, thereby determining the image area corresponding to the Chinese medicine order number. Subsequently, according to the target frame information, the enhanced Chinese medicine list image is subjected to image cropping processing to obtain the enhanced Chinese medicine list image after image cropping processing as an order number image. Thus, an order number image representing the order number area can be obtained. Next, the order number image is subjected to binarization processing to obtain the binarized order number image as a grayscale order number image. Thus, a grayscale order number image that distinguishes the foreground and background of the order number image can be obtained, thereby improving the accuracy of order number recognition. Then, the grayscale order number image is input into the spatial feature extraction layer of the pre-trained Chinese medicine order number recognition model to obtain a set of Chinese medicine order number feature maps. The Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer, and a transcription layer. Thus, a set of Chinese medicine order number feature maps that characterize the spatial features of the Chinese medicine order number can be obtained. Secondly, the set of Chinese medicine order number feature maps is input into the feature fusion layer to obtain a set of fused feature maps.Thus, a fusion feature graph set for feature fusion can be obtained, which can be used to improve the feature extraction capability. Then, the above-mentioned fusion feature graph set is input into the above-mentioned bidirectional recurrent network layer to obtain a sequence feature tensor. Thus, a sequence feature tensor with time series features can be obtained. Afterwards, the above-mentioned sequence feature tensor is input into the above-mentioned weight feature extraction layer to obtain a weight feature tensor. Thus, a weight feature tensor can be obtained, so that different weights can be assigned to features according to the importance of the features. Subsequently, the above-mentioned weight feature tensor is input into the above-mentioned transcription layer to obtain the order number recognition result information. Thus, the order number recognition result information can be obtained. Then, according to the above-mentioned order number recognition result information, the Chinese medicine form information is generated. Thus, the Chinese medicine form information corresponding to the shipping procedure step can be obtained. Finally, the above-mentioned Chinese medicine form information is sent to the associated printing terminal for printing. Thus, the Chinese medicine form information can be printed for relevant personnel to check the shipment. Also because the order number area in the Chinese medicine list image can be first determined and cropped, a regional image with only the order number can be obtained. Also, by identifying the order number in the area image that only contains the order number, the feature extraction capability of the order number can be improved, the recognition accuracy of the outbound order number can be improved, and the number of errors in printing the order number can be reduced, thereby reducing the waste of printing paper resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0016] Figure 1 It is a flowchart of some embodiments of the method for sending Chinese medicine form information according to the present disclosure;

[0017] Figure 2 It is a schematic diagram of the structure of some embodiments of the Chinese medicine form information sending device according to the present disclosure;

[0018] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0020] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0024] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0025] Figure 1 The process 100 of some embodiments of the method for sending Chinese medicine form information according to the present disclosure is shown. The method for sending Chinese medicine form information includes the following steps:

[0026] Step 101: Capture an image of a list of medicines in Chinese medicines through an associated image acquisition device.

[0027] In some embodiments, the execution subject (e.g., a computing device) of the method for sending information of a Chinese medicine form may collect a Chinese medicine list image through a wired connection or a wireless connection and through an associated image acquisition device. Among them, the Chinese medicine list image includes a Chinese medicine order number. The associated image acquisition device may be a device capable of acquiring images. For example, the associated image acquisition device may be an industrial camera. The Chinese medicine list image may be an image of a Chinese medicine list in a certain procedure step in the Chinese medicine outbound process. The above-mentioned certain procedure step is not specifically limited here. For example, the above-mentioned certain procedure step may be a picking step. The Chinese medicine list image may be an image of a printed picking list. The Chinese medicines in the above-mentioned Chinese medicine list may include, but are not limited to: Polygonatum odoratum (Chinese medicine decoction piece), Poria cocos (Chinese medicine decoction piece), Jujube (Chinese medicine decoction piece), Vinegar Schisandra chinensis (Chinese medicine decoction piece) and donkey-hide gelatin. The above-mentioned Chinese medicine order number may be the order number of the Chinese medicine list corresponding to the above-mentioned Chinese medicine list image. For example, the above-mentioned Chinese medicine order number may be SE2309161333038791792. It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0028] Step 102, performing image interpolation processing on the Chinese medicine list image, and obtaining the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image.

[0029] In some embodiments, the execution entity may perform image interpolation processing on the TCM list image, and obtain the TCM list image after image interpolation processing as an enhanced TCM list image. The image interpolation processing may include but is not limited to: nearest neighbor interpolation processing, bilinear interpolation processing, bicubic interpolation processing, cubic interpolation processing, and spline interpolation processing. Here, the interpolation processing may be bilinear interpolation processing. In practice, the execution entity may perform bilinear interpolation processing on the TCM list image, and obtain the TCM list image after bilinear interpolation processing as an enhanced TCM list image.

[0030] Optionally, before performing image interpolation processing on the above-mentioned traditional Chinese medicine list image to obtain the traditional Chinese medicine list image after image interpolation processing as the enhanced traditional Chinese medicine list image, the above-mentioned execution subject may further perform the following steps:

[0031] The first step is to grayscale the above-mentioned Chinese medicine list image, and obtain the grayscale Chinese medicine list image as a grayscale Chinese medicine list image. The grayscale processing method may include but is not limited to: maximum method, average method and weighted average method. Here, the grayscale processing method may be a weighted average method. In practice, the execution entity may use the weighted average method to grayscale the above-mentioned Chinese medicine list image, and obtain the grayscale Chinese medicine list image as a grayscale Chinese medicine list image.

[0032] The second step is to perform straight line detection processing on the grayscale drug list image to obtain a detection straight line. In practice, the execution subject can use Hough transform to perform straight line detection processing on the grayscale drug list image to obtain a detection straight line.

[0033] The third step is to determine the tilt angle of the above-mentioned Chinese medicine list image based on the above-mentioned detection straight line. In practice, the above-mentioned execution entity can determine the angle between the above-mentioned detection straight line and the horizontal straight line as the tilt angle of the above-mentioned Chinese medicine list image. Here, the above-mentioned horizontal straight line can be any horizontal straight line that intersects with the detection straight line.

[0034] In the fourth step, the Chinese medicine list image is rotated according to the tilt angle to obtain the rotated Chinese medicine list image as the rotated Chinese medicine list image. In practice, the execution subject can rotate the Chinese medicine list image in a clockwise direction at a corresponding tilt angle to obtain the rotated Chinese medicine list image as the rotated Chinese medicine list image.

[0035] The fifth step is to determine the above-mentioned rotated Chinese medicine list image as the Chinese medicine list image to update the above-mentioned Chinese medicine list image.

[0036] Step 103: input the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain target frame information corresponding to the Chinese medicine order number.

[0037] In some embodiments, the execution subject may input the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain the target frame information corresponding to the Chinese medicine order number. The order area recognition model may be a neural network model that takes the enhanced Chinese medicine list image as input and the target frame information as output. The order area recognition model may include: a backbone network layer, a feature fusion layer, and a detection head layer. The backbone network layer may be a network layer that extracts features from input data. The feature fusion layer may be a network layer that fuses the underlying position features and high-level semantic features of the features. The detection head layer may be a network layer that locates the position of the Chinese medicine order number. The target frame information may include the center point coordinates of the prediction frame, the height of the prediction frame, and the width of the prediction frame. Here, the prediction frame may be the regional border corresponding to the Chinese medicine order number. In practice, the execution subject may input the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain the target frame information corresponding to the Chinese medicine order number.

[0038] Step 104 , performing image cropping processing on the enhanced Chinese medicine list image according to the target frame information, and obtaining the enhanced Chinese medicine list image after image cropping processing as the order number image.

[0039] In some embodiments, according to the target frame information, the execution subject may perform image cropping on the enhanced Chinese medicine list image, and obtain the enhanced Chinese medicine list image after image cropping as the order number image. In practice, the execution subject may perform region cropping on the enhanced Chinese medicine list image with the center point coordinates of the prediction frame as the center, the height of the prediction frame as the region height, and the width of the prediction frame as the region width, and obtain the cropped region image as the order number image.

[0040] Step 105 , binarize the order number image to obtain the binarized order number image as a grayscale order number image.

[0041] In some embodiments, the execution entity may perform binarization on the order number image to obtain the binarized order number image as a grayscale order number image.

[0042] In some optional implementations of some embodiments, the execution subject may perform binarization processing on the order number image through the following steps to obtain the binarized order number image as a grayscale order number image:

[0043] In the first step, each grayscale value corresponding to each order number pixel in the above order number image is determined as an order number grayscale value set.

[0044] In the second step, the grayscale value of the order number with the largest grayscale value in the above order number grayscale value set is determined as the maximum grayscale value.

[0045] In the third step, the grayscale value of the order number with the smallest grayscale value in the above order number grayscale value set is determined as the minimum grayscale value.

[0046] In the fourth step, the absolute value of the difference between the maximum grayscale value and the minimum grayscale value is determined as the difference grayscale value.

[0047] Step 5. For each order number pixel in the above order number image, perform the following steps:

[0048] In the first sub-step, the grayscale value corresponding to the order number pixel is determined as the target grayscale value.

[0049] The second sub-step is to determine the difference between the target grayscale value and the minimum grayscale value as the target grayscale difference.

[0050] The third sub-step is to determine the ratio of the target grayscale difference to the difference grayscale value as grayscale ratio information.

[0051] The fourth sub-step is to generate an updated grayscale value according to the grayscale ratio information, the first preset coefficient and the second preset coefficient. In practice, first, the execution subject may determine the product of the grayscale ratio information and the first preset coefficient as the first value. Then, the difference between the first value and the second preset coefficient may be determined as the updated grayscale value. Here, the first preset coefficient may be 2. The second preset coefficient may be 1.

[0052] In the sixth step, the generated image composed of each updated gray value is determined as the updated order number image.

[0053] In the seventh step, the updated order number image is binarized using a preset image binarization model to obtain the updated order number image after binarization as a grayscale order number image. The preset image binarization model may be:

[0054]

[0055] Wherein, the above v can be a constant. I can be an updated order number image. u can be a grayscale order number image, and u=u(t, x, y), t represents the time variable, x represents the horizontal coordinate of the updated order number pixel in the updated order number image. y represents the vertical coordinate of the updated order number pixel in the updated order number image. It can be an edge stop function. Here, k>0, and k is a constant. is the fidelity term of the data. It makes the grayscale order number image as close as possible to the updated order number image at infinity. Among them, yes The gradient descent flow equation of . Where Ω represents the definition area of ​​the updated order number image. If u>I (or u<I), that is, Iu<0 (or Iu>0), then during the evolution process, u(t, x, y) decreases (or increases) as time t increases. Therefore, uI can be used to measure the closeness of the updated order number image to the grayscale order number image. The above is a binarization term. Its purpose is to start from updating the order number image. When t→∞, the grayscale order number image u will tend to -1 and 1. Let I(x, y) = u0(x, y) be the initialization function, u0(x, y)∈[-1, 1], when -1<u0(x, y)<0, When 0<u0(x, y)<1, Therefore, this It has a binarization effect. When the gradient is large, it corresponds to the edge, tends to 0, the fidelity term plays a major role. When the gradient is small, it corresponds to the flat area, The binarization term tends to 0, and the binarization term plays a major role, causing the target and background to tend to binary. The above vΔu is a regularization term, which is introduced because the image is inevitably affected by other noises.

[0056] The above-mentioned first to seventh steps and their related contents serve as an inventive point of an embodiment of the present disclosure, and solve the technical problem mentioned in the background technology: "In the process of image recognition of the outbound order number, in order to increase the distinction between the foreground and the background, the conventional technical solution is to set a preset grayscale threshold (for example, 128) according to a priori knowledge, and binarize the image according to the preset grayscale threshold. However, affected by different shooting factors, the brightness, contrast and texture structure of the image are different. The entire image is binarized with a unified preset grayscale threshold, resulting in a high probability of misjudgment or distortion of the binarized image, and the foreground and background segmentation effect of the image is poor, resulting in a low recognition accuracy of the outbound order number, an increase in the number of errors in printing the order number, and a waste of printing paper resources." As a result, in the process of image recognition of the outbound order number, in order to increase the distinction between the foreground and the background, the conventional technical solution is to set a preset grayscale threshold (for example, 128) according to a priori knowledge, and binarize the image according to the preset grayscale threshold. However, due to the influence of different shooting factors, the brightness, contrast and texture structure of the image are different. The use of a unified preset grayscale threshold for binarization of the entire image leads to a high probability of misjudgment or distortion of the binarized image, and a poor effect of segmenting the foreground and background of the image, which results in a low recognition accuracy of the outbound order number, an increase in the number of errors in printing the order number, and a waste of printing paper resources. The factors are often as follows: In the process of image recognition of the outbound order number, in order to increase the distinction between the foreground and the background, the conventional solution is to set a preset grayscale threshold (for example, 128) based on prior knowledge, and binarize the image according to the preset grayscale threshold. However, due to the influence of different shooting factors, the brightness, contrast and texture structure of the image are different. The use of a unified preset grayscale threshold for binarization of the entire image leads to a high probability of misjudgment or distortion of the binarized image, and a poor effect of segmenting the foreground and background of the image, which results in a low recognition accuracy of the outbound order number, an increase in the number of errors in printing the order number, and a waste of printing paper resources. If the above factors are solved, the probability of misjudgment or distortion of the binarized image can be reduced, the foreground and background segmentation effect of the image can be enhanced, the recognition accuracy of the outbound order number can be improved, the number of errors in printing the order number can be reduced, and the waste of printing paper resources can be reduced. In order to achieve this effect, the present invention can enhance the contrast of the image and eliminate the dimensional influence between different features by scaling the grayscale values ​​in the order number image to the same range, thereby improving the accuracy of binarization. The data fidelity term and the binarization term are weighted by introducing an edge stop function, so that the fidelity term and the binarization term can adaptively preserve or binarize the original image according to the image's own characteristics, and the regularization term is added to suppress multiplicative noise.This reduces the probability of misjudgment or distortion of the binarized image, enhances the foreground and background segmentation effect of the image, reduces the recognition accuracy of the outbound order number, reduces the number of errors in printing order numbers, and thus reduces the waste of printing paper resources.

[0057] Optionally, before binarizing the order number image to obtain the binarized order number image as the grayscale order number image, the execution subject may further perform the following steps:

[0058] In the first step, the order number image is subjected to histogram equalization processing to obtain the order number image after the histogram equalization processing as the histogram order number image. Thus, by performing histogram equalization processing on the order number image, the contrast and details of the image can be increased, and the distinguishability of the image can be improved.

[0059] In the second step, the histogram order number image is smoothed to obtain the histogram order number image after image smoothing as the smoothed order number image. In practice, the execution subject can use a filter (such as a Gaussian filter) to smooth the histogram order number image to obtain the histogram order number image after image smoothing as the smoothed order number image. In this way, the noise and details of the image can be removed and the image texture can be smoothed.

[0060] In the third step, the smoothed order number image is subjected to contrast stretching processing to obtain the smoothed order number image after contrast stretching processing as the contrast stretched order number image, thereby enhancing the visual effect and recognizability of the image.

[0061] In the fourth step, the contrast stretched order number image is subjected to morphological operation processing to obtain the contrast stretched order number image after morphological operation processing as the morphological order number image. Here, the morphological processing includes corrosion processing and dilation processing. Thus, by performing morphological processing on the image, noise can be removed, holes can be filled, and edges can be smoothed.

[0062] In the fifth step, the morphological order number image is edge enhanced to obtain the order number image after edge enhancement as the edge enhanced order number image. In practice, the execution subject can use an edge enhancement algorithm (such as Sobel and Canny) to perform edge enhancement on the morphological order number image to obtain the morphological order number image after edge enhancement as the edge enhanced order number image. In this way, the edge information in the image can be highlighted and the effect of edge detection can be improved.

[0063] In the sixth step, the edge-enhanced order number image is determined as the order number image to update the order number image.

[0064] Step 106, input the grayscale order number image into the spatial feature extraction layer of the pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps.

[0065] In some embodiments, the execution subject may input the grayscale order number image into the spatial feature extraction layer of the pre-trained Chinese medicine order number recognition model to obtain a set of Chinese medicine order number feature maps. The Chinese medicine order number recognition model may be a network model that takes the grayscale order number image as input and the order number recognition result information as output. The order number recognition result information may be the result information corresponding to the Chinese medicine order number obtained by recognition. The Chinese medicine order number recognition model may further include: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer, and a transcription layer. The spatial feature extraction layer may be a network layer that can extract spatial features from the input data. The spatial features may characterize the size, shape, position, direction of the object in the image, and the relationship between different points in the image. Specifically, the input data may be subjected to spatial feature extraction by a preset convolution module. The preset convolution module may be a module that is pre-set to perform convolution feature extraction. The feature fusion layer may be a network layer that performs up and down sampling by layer-by-layer fusion, and introduces cross-layer lateral connections and multi-scale longitudinal connections to perform feature fusion. The bidirectional recurrent network layer may be a network layer that can perform bidirectional feature extraction on data with time series features. The weighted feature extraction layer can be a network layer that assigns different weights to different features of the input, so that the model can better capture important features in the data. The transcription layer can be a network layer that can convert the predicted sequence into a labeled sequence. Thus, the final recognition result can be obtained. Here, the labeled sequence can be the result of labeling the input sequence, which can be understood as a label sequence for each element of the input. In practice, the execution entity can input the grayscale order number image into the spatial feature extraction layer of the pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps.

[0066] In some optional implementations of some embodiments, the above-mentioned Chinese medicine order number recognition model can be trained in the following way:

[0067] The first step is to obtain a sample set. The samples in the sample set include a sample grayscale order number image and sample order number recognition result information corresponding to the sample grayscale order number image. The sample order number recognition result information may be a sample label corresponding to the sample grayscale order number image. It should be noted that the execution subject of training the traditional Chinese medicine order number recognition model may be the execution subject or other computing devices.

[0068] In the second step, the following training steps are performed based on the sample set:

[0069] In the first training step, the sample grayscale order number image of at least one sample in the sample set is respectively input into the initial Chinese medicine order number recognition model to obtain the order number recognition result information corresponding to each sample in the at least one sample. Among them, the initial Chinese medicine order number recognition model can be an initial neural network that can obtain the order number recognition result information according to the grayscale order number image. The initial neural network can be a neural network to be trained. Specifically, the initial neural network can include a spatial feature extraction layer, a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer.

[0070] In the second training step, the order number recognition result information corresponding to each sample in the at least one sample is compared with the corresponding sample order number recognition result information. Here, the comparison can be whether the order number recognition result information corresponding to each sample in the at least one sample is the same as the corresponding sample order number recognition result information.

[0071] The third training step is to determine whether the initial Chinese medicine order number recognition model has achieved a preset optimization goal based on the comparison result. The above-mentioned optimization goal may be that the loss function value of the initial Chinese medicine order number recognition model is less than or equal to a preset loss threshold. The above-mentioned preset loss threshold may be a pre-set loss threshold. For example, the above-mentioned preset loss threshold may be 0.1. The loss function corresponding to the above-mentioned initial Chinese medicine order number recognition model may be a cross entropy loss function.

[0072] In a fourth training step, in response to determining that the initial Chinese medicine order number recognition model achieves the above-mentioned optimization goal, the initial Chinese medicine order number recognition model is determined as a trained Chinese medicine order number recognition model.

[0073] Optionally, the step of training the above-mentioned Chinese medicine order number recognition model may also include: a fifth training step, in response to determining that the initial Chinese medicine order number recognition model does not achieve the above-mentioned optimization goal, adjusting the network parameters of the initial Chinese medicine order number recognition model, and using unused samples to form a sample set, using the adjusted initial Chinese medicine order number recognition model as the initial Chinese medicine order number recognition model, and performing the above-mentioned training step again. As an example, the network parameters of the above-mentioned initial Chinese medicine order number recognition model can be adjusted by using a back propagation algorithm (BP algorithm) and a gradient descent method (such as a small batch gradient descent algorithm).

[0074] Step 107, input the Chinese medicine order number feature map set into the feature fusion layer to obtain a fused feature map set.

[0075] In some embodiments, the execution entity may input the set of feature graphs of the Chinese medicine order number into the feature fusion layer to obtain a set of fused feature graphs. The set of feature graphs of the Chinese medicine order number may include: a first-size feature graph of the Chinese medicine order number, a second-size feature graph of the Chinese medicine order number, a third-size feature graph of the Chinese medicine order number, a fourth-size feature graph of the Chinese medicine order number, and a fifth-size feature graph of the Chinese medicine order number. The data dimension of the first-size feature graph of the Chinese medicine order number is greater than that of the second-size feature graph of the Chinese medicine order number. The data dimension of the second-size feature graph of the Chinese medicine order number is greater than that of the third-size feature graph of the Chinese medicine order number. The data dimension of the third-size feature graph of the Chinese medicine order number is greater than that of the fourth-size feature graph of the Chinese medicine order number. The data dimension of the fourth-size feature graph of the Chinese medicine order number is greater than that of the fifth-size feature graph of the Chinese medicine order number.

[0076] Furthermore, in the process of adopting technical solutions to solve the technical problems mentioned in the background technology, the inventors found that users have a high demand for the accuracy of order number recognition. To meet the user's demand for order number recognition accuracy, the conventional technical solution can be to fuse shallow features and deep features of the same scale to improve the feature extraction ability of the image, thereby improving the accuracy of order number recognition. However, this method does not take into account the problem of feature fusion of feature maps of different scales, resulting in fewer dimensions during feature fusion, resulting in less information on the extracted features. Therefore, the inventors considered meeting the user's demand for order number recognition accuracy and increasing the feature fusion of feature maps of different scales to increase the information of the extracted features. It was decided to adopt a method of up and down sampling through layer-by-layer fusion, and introduce cross-layer horizontal connections and multi-scale vertical connections to perform feature fusion, so as to improve the feature extraction ability of feature maps, thereby improving the accuracy of order number recognition, reducing the number of errors in printing order numbers, and thus reducing the waste of printing paper resources.

[0077] In some optional implementations of some embodiments, the execution subject may input the Chinese medicine order number feature map set into the feature fusion layer through the following steps to obtain a fused feature map set:

[0078] In the first step, upsampling is performed on the fifth-size TCM order number feature map to obtain the fifth-size TCM order number feature map after upsampling as the fourth-size upsampling feature map.

[0079] The second step is to combine the fourth-size TCM order number feature map and the fourth-size upsampled feature map to obtain a fourth-size fused feature map. The combination process may be to first perform concatenation (addition or multiplication of corresponding elements of the two feature maps) and then perform convolution (3*3 convolution).

[0080] In the third step, upsampling is performed on the fourth-size fused feature map to obtain the upsampled fourth-size fused feature map as the third-size upsampled feature map.

[0081] The fourth step is to combine the third-size TCM order number feature map and the third-size upsampled feature map to obtain a third-size fused feature map. The combination process can be performed by first concatenating (adding or multiplying the corresponding elements of the two feature maps) and then performing convolution (3*3 convolution).

[0082] In the fifth step, upsampling is performed on the third-size fused feature map to obtain the upsampled third-size fused feature map as the second-size upsampled feature map.

[0083] Step 6: Combine the second-size TCM order number feature map and the second-size upsampled feature map to obtain a second-size fused feature map. The combination process may be to first perform concatenation (addition or multiplication of corresponding elements of the two feature maps) and then perform convolution (3*3 convolution).

[0084] In the seventh step, upsampling is performed on the second-size fused feature map to obtain the upsampled second-size fused feature map as the first-size upsampled feature map.

[0085] In the eighth step, a first-size updated fused feature map is generated based on the first-size TCM order number feature map and the first-size upsampled feature map. In practice, first, the execution subject may perform splicing processing on the first-size TCM order number feature map and the first-size upsampled feature map to obtain a first-size spliced ​​feature map. Then, the first-size spliced ​​feature map may be convolved to obtain the first-size spliced ​​feature map after the convolution processing as the first-size updated fused feature map.

[0086] In the ninth step, pooling is performed on the first-size updated fused feature map to obtain the first-size updated fused feature map after pooling as the second-size pooling feature map.

[0087] In the tenth step, a second-size updated fused feature map is generated based on the second-size pooled feature map, the second-size fused feature map, and the second-size Chinese medicine order number feature map. In practice, the execution subject may add corresponding elements of the second-size pooled feature map, the second-size fused feature map, and the second-size Chinese medicine order number feature map to obtain the second-size updated fused feature map.

[0088] In the eleventh step, pooling is performed on the second-size updated fused feature map to obtain the second-size updated fused feature map after pooling as the third-size pooling feature map.

[0089] Step 12: Generate a third-size updated fused feature map based on the third-size pooled feature map, the third-size fused feature map, and the third-size Chinese medicine order number feature map. In practice, the execution subject may add corresponding elements of the third-size pooled feature map, the third-size fused feature map, and the third-size Chinese medicine order number feature map to obtain the third-size updated fused feature map.

[0090] In the thirteenth step, pooling is performed on the third-size updated fused feature map to obtain the third-size updated fused feature map after pooling as a fourth-size pooling feature map.

[0091] Step 14: Generate a fourth-size updated fused feature map based on the fourth-size pooled feature map, the fourth-size fused feature map, and the fourth-size Chinese medicine order number feature map. In practice, the execution subject may add corresponding elements of the fourth-size pooled feature map, the fourth-size fused feature map, and the fourth-size Chinese medicine order number feature map to obtain a fourth-size updated fused feature map.

[0092] In the fifteenth step, pooling is performed on the fourth-size updated fused feature map to obtain the fourth-size updated fused feature map after pooling as the fifth-size pooling feature map.

[0093] Step 16: Generate a fifth-size updated fused feature map based on the fifth-size pooled feature map and the fifth-size Chinese medicine order number feature map. In practice, first, the execution subject may perform splicing processing on the fifth-size pooled feature map and the fifth-size Chinese medicine order number feature map to obtain a fifth-size spliced ​​feature map. Then, the fifth-size spliced ​​feature map may be convolved to obtain the fifth-size spliced ​​feature map after the convolution processing as the fifth-size updated fused feature map.

[0094] In the seventeenth step, the first-size updated fused feature map, the second-size updated fused feature map, the third-size updated fused feature map, the fourth-size updated fused feature map and the fifth-size updated fused feature map are determined as a fused feature map set.

[0095] The above-mentioned first to seventeenth steps and their related contents serve as an inventive point of an embodiment of the present disclosure, and solve the technical problem that "the user has a high demand for the accuracy of order number recognition, and when extracting features, the problem of feature fusion of feature maps of different scales is not considered, resulting in fewer dimensions during feature fusion, and thus less information of the extracted features". The factors that lead to fewer dimensions during feature fusion and thus less information of the extracted features are often as follows: the user has a high demand for the accuracy of order number recognition, and when extracting features, the problem of feature fusion of feature maps of different scales is not considered, resulting in fewer dimensions during feature fusion, and thus less information of the extracted features. If the above-mentioned factors are solved, it is possible to meet the user's demand for a higher accuracy of order number recognition, and when extracting features, the fusion dimension during feature fusion is increased, the information of the extracted features is increased, and the feature extraction capability of the feature map is improved, thereby improving the accuracy of order number recognition, reducing the number of errors in printing order numbers, and further reducing the waste of printing paper resources. In order to achieve this effect, the present invention adopts the method of upsampling and downsampling through layer-by-layer fusion, and introduces cross-layer horizontal connection and multi-scale vertical connection to perform feature fusion (for example, the fourth size fusion feature map is upsampled to obtain the third size upsampled feature map, and multi-scale cross-layer top-down vertical connection is realized, the second size updated fusion feature map is pooled to obtain the third size pooled feature map, and multi-scale bottom-up cross-layer vertical connection is realized, the third size pooled feature map, the third size fusion feature map and the third size Chinese medicine order number feature map are fused to realize horizontal cross-layer jump connection to obtain the third size updated fusion feature map) to improve the feature extraction capability of the feature map, thereby improving the accuracy of order number recognition, reducing the number of errors in printing order numbers, and thereby reducing the waste of printing paper resources.

[0096] Step 108, input the fused feature map set into the bidirectional recurrent network layer to obtain a sequence feature tensor.

[0097] In some embodiments, the execution entity may input the fused feature graph set into the bidirectional recurrent network layer to obtain a sequence feature tensor. In practice, the execution entity may input the fused feature graph set into the bidirectional recurrent network layer to obtain a sequence feature tensor.

[0098] Step 109, input the sequence feature tensor into the weight feature extraction layer to obtain the weight feature tensor.

[0099] In some embodiments, the execution subject may input the sequence feature tensor into the weight feature extraction layer to obtain the weight feature tensor. In practice, the execution subject may input the sequence feature tensor into the weight feature extraction layer to obtain the weight feature tensor.

[0100] Step 110, input the weight feature tensor into the transcription layer to obtain the order number recognition result information.

[0101] In some embodiments, the execution entity may input the weighted feature tensor into the transcription layer to obtain the number recognition result information. In practice, the execution entity may input the weighted feature tensor into the transcription layer to obtain the number recognition result information.

[0102] Step 111, generating Chinese medicine form information according to the order number recognition result information.

[0103] In some embodiments, based on the order number recognition result information, the execution entity may generate Chinese medicine form information. The Chinese medicine form information may be information of the Chinese medicine form required for the next program step of the program step corresponding to the Chinese medicine list image. For example, the program step corresponding to the Chinese medicine list image may be a picking step. The next program step corresponding to the picking step is an inspection step. The Chinese medicine form information may be form information corresponding to an inspection form that needs to be printed.

[0104] In some optional implementations of some embodiments, according to the order number recognition result information, the execution entity may generate Chinese medicine form information:

[0105] The first step is to send the order number recognition result information to the associated Chinese medicine information server so that the Chinese medicine information server can search for the Chinese medicine form information corresponding to the order number recognition result information. The associated Chinese medicine information server can be a server that stores the Chinese medicine information corresponding to the order number recognition result information.

[0106] The second step is to receive the traditional Chinese medicine form information sent by the traditional Chinese medicine information server.

[0107] Step 112, sending the Chinese medicine form information to the associated printing terminal for printing.

[0108] In some embodiments, the execution entity may send the Chinese medicine form information to an associated printing terminal for printing. The associated printing terminal may be a device capable of printing a Chinese medicine form. For example, the associated printing terminal may be an inkjet printer. In practice, the execution entity may send the Chinese medicine form information to an associated printing terminal for printing.

[0109] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the Chinese medicine form information sending method of some embodiments of the present disclosure, the waste of printing paper resources can be reduced. Specifically, the reason for the waste of printing paper resources is that: due to the long outbound order number, the manual input method is easy to cause the outbound order number input error, thereby causing the waste of printing paper resources, and the manual input takes a long time; the form before the program step is photographed and recognized as a whole, and the feature extraction ability is limited (the complexity and number of parameters of each model are limited, resulting in the limited feature extraction ability of the model), resulting in less feature extraction of the outbound order number area in the form (that is, more feature extraction of other non-outbound order number areas in the form, and the proportion of other non-outbound order number areas in the form relative to the entire form is large), the recognition accuracy of the outbound order number is low, and the number of printing order number errors is increased, thereby causing the waste of printing paper resources. Based on this, the Chinese medicine form information sending method of some embodiments of the present disclosure, first, collects the Chinese medicine list image through the associated image acquisition device. Among them, the above-mentioned Chinese medicine list image includes the Chinese medicine order number. Thus, a Chinese medicine list image with a Chinese medicine order number can be obtained. Thus, it can be used to identify the Chinese medicine order number. Then, the Chinese medicine list image is subjected to image interpolation processing to obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image. Thus, an enhanced Chinese medicine list image after image interpolation processing can be obtained, thereby improving the resolution of the image and improving the clarity of the image. Afterwards, the enhanced Chinese medicine list image is input into a pre-trained order area recognition model to obtain the target frame information corresponding to the Chinese medicine order number. Thus, the target frame information can be obtained, thereby determining the image area corresponding to the Chinese medicine order number. Subsequently, according to the target frame information, the enhanced Chinese medicine list image is subjected to image cropping processing to obtain the enhanced Chinese medicine list image after image cropping processing as an order number image. Thus, an order number image representing the order number area can be obtained. Next, the order number image is subjected to binarization processing to obtain the binarized order number image as a grayscale order number image. Thus, a grayscale order number image that distinguishes the foreground and background of the order number image can be obtained, thereby improving the accuracy of order number recognition. Then, the grayscale order number image is input into the spatial feature extraction layer of the pre-trained Chinese medicine order number recognition model to obtain a set of Chinese medicine order number feature maps. The Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer, and a transcription layer. Thus, a set of Chinese medicine order number feature maps that characterize the spatial features of the Chinese medicine order number can be obtained. Secondly, the set of Chinese medicine order number feature maps is input into the feature fusion layer to obtain a set of fused feature maps.Thus, a fusion feature graph set for feature fusion can be obtained, which can be used to improve the feature extraction capability. Then, the above-mentioned fusion feature graph set is input into the above-mentioned bidirectional recurrent network layer to obtain a sequence feature tensor. Thus, a sequence feature tensor with time series features can be obtained. Afterwards, the above-mentioned sequence feature tensor is input into the above-mentioned weight feature extraction layer to obtain a weight feature tensor. Thus, a weight feature tensor can be obtained, so that different weights can be assigned to features according to the importance of the features. Subsequently, the above-mentioned weight feature tensor is input into the above-mentioned transcription layer to obtain the order number recognition result information. Thus, the order number recognition result information can be obtained. Then, according to the above-mentioned order number recognition result information, the Chinese medicine form information is generated. Thus, the Chinese medicine form information corresponding to the shipping procedure step can be obtained. Finally, the above-mentioned Chinese medicine form information is sent to the associated printing terminal for printing. Thus, the Chinese medicine form information can be printed for relevant personnel to check the shipment. Also because the order number area in the Chinese medicine list image can be first determined and cropped, a regional image with only the order number can be obtained. Also, by identifying the order number in the area image that only contains the order number, the feature extraction capability of the order number can be improved, the recognition accuracy of the outbound order number can be improved, and the number of errors in printing the order number can be reduced, thereby reducing the waste of printing paper resources.

[0110] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a Chinese medicine form information sending device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0111] like Figure 2As shown, the Chinese medicine form information sending device 200 of some embodiments includes: a collection unit 201, an interpolation processing unit 202, a first input unit 203, a cropping processing unit 204, a binarization processing unit 205, a second input unit 206, a third input unit 207, a fourth input unit 208, a fifth input unit 209, a sixth input unit 210, a generation unit 211 and a sending unit 212. Among them, the acquisition unit 201 is configured to acquire a Chinese medicine list image through an associated image acquisition device, wherein the Chinese medicine list image includes a Chinese medicine order number; the interpolation processing unit 202 is configured to perform image interpolation processing on the Chinese medicine list image, and obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image; the first input unit 203 is configured to input the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain the target frame information corresponding to the Chinese medicine order number; the cropping processing unit 204 is configured to perform image cropping processing on the enhanced Chinese medicine list image according to the target frame information, and obtain the enhanced Chinese medicine list image after image cropping processing as an order number image; the binarization processing unit 205 is configured to perform binarization processing on the order number image, and obtain the binarized order number image as a grayscale order number image; the second input unit 206 is configured to input the grayscale order number into a pre-trained order area recognition model. The number image is input into the spatial feature extraction layer of the pre-trained Chinese medicine order number recognition model to obtain a set of Chinese medicine order number feature maps, wherein the above-mentioned Chinese medicine order number recognition model also includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer; the third input unit 207 is configured to input the above-mentioned Chinese medicine order number feature map set into the above-mentioned feature fusion layer to obtain a fusion feature map set; the fourth input unit 208 is configured to input the above-mentioned fusion feature map set into the above-mentioned bidirectional recurrent network layer to obtain a sequence feature tensor; the fifth input unit 209 is configured to input the above-mentioned sequence feature tensor into the above-mentioned weight feature extraction layer to obtain a weight feature tensor; the sixth input unit 210 is configured to input the above-mentioned weight feature tensor into the above-mentioned transcription layer to obtain order number recognition result information; the generating unit 211 is configured to generate Chinese medicine form information according to the above-mentioned order number recognition result information; the sending unit 212 is configured to send the above-mentioned Chinese medicine form information to the associated printing terminal for printing.

[0112] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.

[0113] Reference below Figure 3, which shows a structural schematic diagram of an electronic device (eg, a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0114] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0115] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0116] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0117] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0118] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0119] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being installed in the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a Chinese medicine list image through an associated image acquisition device, wherein the above-mentioned Chinese medicine list image includes a Chinese medicine order number; performs image interpolation processing on the above-mentioned Chinese medicine list image to obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image; inputs the above-mentioned enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain the target frame information corresponding to the above-mentioned Chinese medicine order number; performs image cropping processing on the above-mentioned enhanced Chinese medicine list image according to the above-mentioned target frame information to obtain the enhanced Chinese medicine list image after image cropping processing as the order number image; performs binarization processing on the above-mentioned order number image to obtain the order number after binarization processing. The order number image is used as a grayscale order number image; the grayscale order number image is input into the spatial feature extraction layer of a pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps, wherein the traditional Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer; the traditional Chinese medicine order number feature map set is input into the feature fusion layer to obtain a fused feature map set; the fused feature map set is input into the bidirectional recurrent network layer to obtain a sequence feature tensor; the sequence feature tensor is input into the weight feature extraction layer to obtain a weight feature tensor; the weight feature tensor is input into the transcription layer to obtain order number recognition result information; according to the order number recognition result information, traditional Chinese medicine form information is generated; the traditional Chinese medicine form information is sent to an associated printing terminal for printing.

[0120] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, an interpolation processing unit, a first input unit, a cropping processing unit, a binarization processing unit, a second input unit, a third input unit, a fourth input unit, a fifth input unit, a sixth input unit, a generation unit, and a sending unit. The names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the acquisition unit may also be described as a "unit for acquiring images of a drug list through an associated image acquisition device".

[0123] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0124] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A method for sending Chinese medicine form information, comprising: Capturing a Chinese medicine list image through an associated image acquisition device, wherein the Chinese medicine list image includes a Chinese medicine order number; Performing image interpolation processing on the traditional Chinese medicine list image to obtain the traditional Chinese medicine list image after image interpolation processing as an enhanced traditional Chinese medicine list image; Inputting the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain target frame information corresponding to the Chinese medicine order number; According to the target frame information, the enhanced Chinese medicine list image is cropped to obtain the enhanced Chinese medicine list image after the image cropping as the order number image; Binarizing the order number image to obtain a binarized order number image as a grayscale order number image; Input the grayscale order number image into the spatial feature extraction layer of a pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps, wherein the traditional Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer; Inputting the Chinese medicine order number feature map set into the feature fusion layer to obtain a fused feature map set; Inputting the fused feature graph set into the bidirectional recurrent network layer to obtain a sequence feature tensor; Inputting the sequence feature tensor into the weight feature extraction layer to obtain a weight feature tensor; Inputting the weighted feature tensor into the transcription layer to obtain the number recognition result information; Generate Chinese medicine form information according to the order number recognition result information; Sending the Chinese medicine form information to an associated printing terminal for printing; The Chinese medicine order number feature graph set includes: a first-size Chinese medicine order number feature graph, a second-size Chinese medicine order number feature graph, a third-size Chinese medicine order number feature graph, a fourth-size Chinese medicine order number feature graph, and a fifth-size Chinese medicine order number feature graph; and The step of inputting the Chinese medicine order number feature graph set into the feature fusion layer to obtain a fused feature graph set includes: Performing upsampling processing on the fifth-size Chinese medicine order number feature graph to obtain the fifth-size Chinese medicine order number feature graph after upsampling processing as the fourth-size upsampling feature graph; Combining the fourth-size TCM order number feature map and the fourth-size upsampling feature map to obtain a fourth-size fusion feature map; Performing upsampling processing on the fourth-size fused feature map to obtain the up-sampled fourth-size fused feature map as the third-size upsampling feature map; Combining the third-size TCM order number feature map and the third-size upsampling feature map to obtain a third-size fusion feature map; Performing upsampling processing on the third-size fused feature map to obtain the up-sampled third-size fused feature map as the second-size upsampling feature map; Combining the second-size Chinese medicine order number feature map and the second-size upsampling feature map to obtain a second-size fusion feature map; Performing upsampling processing on the second-size fused feature map to obtain the up-sampled second-size fused feature map as the first-size upsampled feature map; Generate a first-size updated fusion feature map according to the first-size Chinese medicine order number feature map and the first-size upsampled feature map; Performing pooling processing on the first-size updated fused feature map to obtain the first-size updated fused feature map after pooling processing as the second-size pooling feature map; Generate a second-size updated fused feature map according to the second-size pooled feature map, the second-size fused feature map, and the second-size Chinese medicine order number feature map; Performing pooling processing on the second-size updated fused feature map to obtain the second-size updated fused feature map after pooling processing as a third-size pooling feature map; Generate a third-size updated fused feature map according to the third-size pooled feature map, the third-size fused feature map and the third-size Chinese medicine order number feature map; Performing pooling processing on the third-size updated fused feature map to obtain the third-size updated fused feature map after pooling processing as a fourth-size pooling feature map; Generate a fourth-size updated fused feature map according to the fourth-size pooled feature map, the fourth-size fused feature map, and the fourth-size Chinese medicine order number feature map; Performing pooling processing on the fourth-size updated fused feature map to obtain the fourth-size updated fused feature map after pooling processing as a fifth-size pooling feature map; Generate a fifth-size updated fusion feature map according to the fifth-size pooled feature map and the fifth-size Chinese medicine order number feature map; The first-size updated fused feature map, the second-size updated fused feature map, the third-size updated fused feature map, the fourth-size updated fused feature map and the fifth-size updated fused feature map are determined as a fused feature map set.

2. The method according to claim 1, wherein: Before performing image interpolation processing on the Chinese medicine list image to obtain the Chinese medicine list image after image interpolation processing as the enhanced Chinese medicine list image, the method further includes: grayscale the traditional Chinese medicine list image to obtain the grayscale traditional Chinese medicine list image as a grayscale traditional Chinese medicine list image; Performing straight line detection processing on the grayscale drug list image to obtain a detection straight line; Determining the tilt angle of the Chinese medicine list image according to the detection straight line; According to the tilt angle, the traditional Chinese medicine list image is rotated to obtain the rotated traditional Chinese medicine list image as a rotated traditional Chinese medicine list image; The rotated Chinese medicine list image is determined as the Chinese medicine list image to update the Chinese medicine list image.

3. The method according to claim 1, wherein: Before binarizing the order number image to obtain the binarized order number image as a grayscale order number image, the method further includes: Performing histogram equalization processing on the order number image to obtain the order number image after the histogram equalization processing as a histogram order number image; Performing image smoothing processing on the histogram order number image to obtain the histogram order number image after image smoothing processing as a smoothed order number image; Performing contrast stretching processing on the smoothed order number image to obtain the smoothed order number image after contrast stretching processing as a contrast stretched order number image; Performing morphological operation processing on the contrast-stretched order number image to obtain the contrast-stretched order number image after morphological operation processing as the morphological order number image; Performing edge enhancement processing on the morphological order number image to obtain the order number image after edge enhancement processing as the edge enhanced order number image; The edge-enhanced order number image is determined as the order number image to update the order number image.

4. The method according to claim 1, wherein: The traditional Chinese medicine order number recognition model is trained in the following way: Acquire a sample set, wherein the samples in the sample set include a sample grayscale order number image and sample order number recognition result information corresponding to the sample grayscale order number image; Perform the following training steps based on the sample set: Inputting the sample grayscale order number image of at least one sample in the sample set into the initial Chinese medicine order number recognition model respectively, and obtaining the order number recognition result information corresponding to each sample in the at least one sample; Compare the order number recognition result information corresponding to each sample in the at least one sample with the corresponding sample order number recognition result information; Determine whether the initial Chinese medicine order number recognition model reaches the preset optimization goal based on the comparison result; In response to determining that the initial Chinese medicine order number recognition model achieves the optimization goal, the initial Chinese medicine order number recognition model is determined as a trained Chinese medicine order number recognition model.

5. The method according to claim 4, wherein: The step of training the traditional Chinese medicine order number recognition model also includes: In response to determining that the initial Chinese medicine order number recognition model does not achieve the optimization goal, the network parameters of the initial Chinese medicine order number recognition model are adjusted, and a sample set is composed of unused samples, and the adjusted initial Chinese medicine order number recognition model is used as the initial Chinese medicine order number recognition model, and the training step is performed again.

6. The method according to claim 1, wherein: The generating of the Chinese medicine form information according to the order number recognition result information includes: Sending the order number identification result information to the associated traditional Chinese medicine information server, so that the traditional Chinese medicine information server can search for the traditional Chinese medicine form information corresponding to the order number identification result information; Receive the traditional Chinese medicine form information sent by the traditional Chinese medicine information server.

7. A device for sending information of a traditional Chinese medicine form, comprising: A collection unit is configured to collect a Chinese medicine list image through an associated image collection device, wherein the Chinese medicine list image includes a Chinese medicine order number; an interpolation processing unit configured to perform image interpolation processing on the Chinese medicine list image to obtain the Chinese medicine list image after image interpolation processing as an enhanced Chinese medicine list image; A first input unit is configured to input the enhanced Chinese medicine list image into a pre-trained order area recognition model to obtain target frame information corresponding to the Chinese medicine order number; A cropping processing unit is configured to perform image cropping processing on the enhanced Chinese medicine list image according to the target frame information, and obtain the enhanced Chinese medicine list image after image cropping processing as the order number image; A binarization processing unit is configured to perform binarization processing on the order number image to obtain the binarized order number image as a grayscale order number image; The second input unit is configured to input the grayscale order number image into the spatial feature extraction layer of the pre-trained traditional Chinese medicine order number recognition model to obtain a set of traditional Chinese medicine order number feature maps, wherein the traditional Chinese medicine order number recognition model further includes: a feature fusion layer, a bidirectional recurrent network layer, a weight feature extraction layer and a transcription layer; A third input unit is configured to input the Chinese medicine order number feature map set into the feature fusion layer to obtain a fused feature map set; A fourth input unit is configured to input the fused feature map set into the bidirectional recurrent network layer to obtain a sequence feature tensor; a fifth input unit, configured to input the sequence feature tensor into the weight feature extraction layer to obtain a weight feature tensor; A sixth input unit is configured to input the weight feature tensor into the transcription layer to obtain the number recognition result information; A generating unit, configured to generate Chinese medicine form information according to the order number recognition result information; A sending unit, configured to send the Chinese medicine form information to an associated printing terminal for printing; The Chinese medicine order number feature graph set includes: a first-size Chinese medicine order number feature graph, a second-size Chinese medicine order number feature graph, a third-size Chinese medicine order number feature graph, a fourth-size Chinese medicine order number feature graph, and a fifth-size Chinese medicine order number feature graph; The third input unit is further configured to: Performing upsampling processing on the fifth-size Chinese medicine order number feature graph to obtain the fifth-size Chinese medicine order number feature graph after upsampling processing as the fourth-size upsampling feature graph; Combining the fourth-size TCM order number feature map and the fourth-size upsampling feature map to obtain a fourth-size fusion feature map; Performing upsampling processing on the fourth-size fused feature map to obtain the up-sampled fourth-size fused feature map as the third-size upsampling feature map; Combining the third-size TCM order number feature map and the third-size upsampling feature map to obtain a third-size fusion feature map; Performing upsampling processing on the third-size fused feature map to obtain the up-sampled third-size fused feature map as the second-size upsampling feature map; Combining the second-size Chinese medicine order number feature map and the second-size upsampling feature map to obtain a second-size fusion feature map; Performing upsampling processing on the second-size fused feature map to obtain the up-sampled second-size fused feature map as the first-size upsampled feature map; Generate a first-size updated fusion feature map according to the first-size Chinese medicine order number feature map and the first-size upsampled feature map; Performing pooling processing on the first-size updated fused feature map to obtain the first-size updated fused feature map after pooling processing as the second-size pooling feature map; Generate a second-size updated fused feature map according to the second-size pooled feature map, the second-size fused feature map, and the second-size Chinese medicine order number feature map; Performing pooling processing on the second-size updated fused feature map to obtain the second-size updated fused feature map after pooling processing as a third-size pooling feature map; Generate a third-size updated fused feature map according to the third-size pooled feature map, the third-size fused feature map and the third-size Chinese medicine order number feature map; Performing pooling processing on the third-size updated fused feature map to obtain the third-size updated fused feature map after pooling processing as a fourth-size pooling feature map; Generate a fourth-size updated fused feature map according to the fourth-size pooled feature map, the fourth-size fused feature map, and the fourth-size Chinese medicine order number feature map; Performing pooling processing on the fourth-size updated fused feature map to obtain the fourth-size updated fused feature map after pooling processing as a fifth-size pooling feature map; Generate a fifth-size updated fusion feature map according to the fifth-size pooled feature map and the fifth-size Chinese medicine order number feature map; The first-size updated fused feature map, the second-size updated fused feature map, the third-size updated fused feature map, the fourth-size updated fused feature map and the fifth-size updated fused feature map are determined as a fused feature map set.

8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • OCR business card information identification improvement method based on multiple comparison and correction

    CN110490185A

  • Medical diagnosis result verification method and device, electronic equipment and storage medium

    CN112908443A

  • Text recognition method based on multi-scale fusion CRNN model

    CN114821563A