Data processing method and system for traditional Chinese medicine materials

Through multimodal recognition and image processing technology, the problems of low recognition accuracy and low sorting efficiency of traditional Chinese medicinal materials are solved, and the efficiency and quality consistency in the production process of traditional Chinese medicine beverages are achieved.

CN118552158BActive Publication Date: 2025-02-18ZHEJIANG CHINESE MEDICAL UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410906074.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-02-18
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

The identification accuracy and sorting efficiency of traditional Chinese medicinal materials in the prior art cannot meet the needs of large-scale production, affecting the final quality of traditional Chinese medicine beverages.

Method used

Using multimodal recognition, image segmentation and quality classification, automated adjustment and other technical means, the attribute data of traditional Chinese medicine materials can be obtained through multimodal recognition equipment, image segmentation and identification processing, quality information can be obtained, and Chinese medicine materials can be automatically adjusted according to the adjustment information. .

Benefits of technology

It improves the identification accuracy and sorting efficiency of traditional Chinese medicinal materials, ensures the efficiency and consistency of product quality in the production process of traditional Chinese medicine beverages, and meets the needs of large-scale production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552158B_ABST
    Figure CN118552158B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for processing data of traditional Chinese medicine materials, which are configured at a production line of traditional Chinese medicine beverages, and perform corresponding data processing of traditional Chinese medicine materials through the following steps, including: obtaining attribute data of traditional Chinese medicine materials at a target position based on a multimodal recognition device at a target position; extracting upward image information in the attribute data by a server, performing image segmentation and image recognition processing of the traditional Chinese medicine materials based on the upward image information, and obtaining quality information corresponding to the traditional Chinese medicine materials; if it is determined that the quality information meets preset requirements, statistical calculation is performed based on the quality information in the attribute data and the formula of the traditional Chinese medicine beverage, and adjustment information of the traditional Chinese medicine materials is obtained and fed back to a management end; the management end adjusts and processes the traditional Chinese medicine materials at the target position based on the adjustment information of the traditional Chinese medicine materials, and places all adjusted traditional Chinese medicine materials in the next production unit of the traditional Chinese medicine beverage production line for production processing after obtaining them.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to data processing technology, and in particular to a method and system for processing data of traditional Chinese medicine materials. Background Art

[0002] As an important part of Chinese traditional culture, Chinese medicine has a long history and significant curative effects in preventing and treating diseases and maintaining health. With the development of modern science and technology and the improvement of people's health awareness, Chinese medicine beverages have gradually become popular products on the market due to their naturalness, safety and versatility. However, in the production process of Chinese medicine beverages, the quality of Chinese medicinal materials directly affects the efficacy and taste of the products. Therefore, how to efficiently and accurately identify and classify the quality of Chinese medicinal materials on the production line has become an urgent problem for Chinese medicine beverage manufacturers.

[0003] In the prior art, Chinese medicinal materials are usually sorted and tested manually, which is not only inefficient but also prone to errors and cannot meet the needs of large-scale production. As a result, in practical applications, the accuracy of Chinese medicinal material identification and the effectiveness of sorting cannot be guaranteed, which in turn affects the final quality of Chinese medicinal beverages.

[0004] Therefore, how to intelligently process Chinese medicinal materials in a complex production environment to improve efficiency and accuracy has become an urgent problem that needs to be solved. Summary of the invention

[0005] The embodiment of the present invention provides a method and system for processing data of traditional Chinese medicine materials, which effectively solves the problems of low recognition accuracy and low sorting efficiency in the prior art through technical means such as multimodal recognition, image segmentation and quality classification, and automatic adjustment, and improves the efficiency in the production process of traditional Chinese medicine beverages and the consistency of product quality.

[0006] A first aspect of an embodiment of the present invention provides a method for processing data of a Chinese medicinal material, which is configured at a Chinese medicinal beverage production line and performs corresponding data processing of the Chinese medicinal material through the following steps, including:

[0007] Acquiring attribute data of the Chinese medicinal material at the target location based on a multimodal recognition device at the target location, wherein the multimodal recognition device includes at least an image acquisition device and a quality acquisition device;

[0008] The server extracts the top-view image information in the attribute data, performs image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtains the quality information corresponding to the traditional Chinese medicine material;

[0009] If it is determined that the quality information meets the preset requirements, statistical calculations are performed based on the quality information in the attribute data and the formula of the Chinese medicine beverage to obtain Chinese medicine material adjustment information and feed it back to the management end;

[0010] The management end adjusts and processes the Chinese medicinal materials at the target location based on the Chinese medicinal material adjustment information, and places the adjusted Chinese medicinal materials in the next production unit of the Chinese medicinal beverage production line for production processing after obtaining them.

[0011] Optionally, in a possible implementation of the first aspect, the multimodal recognition device based on the target position acquires the attribute data of the Chinese medicinal material at the target position, and the multimodal recognition device at least includes an image acquisition device and a quality acquisition device, including:

[0012] Determine that an image acquisition device in a multimodal recognition device acquires an image of a target area;

[0013] Recognize and process the first preset pixel value in the collected image to obtain a corresponding first recognition area image, where the first recognition area includes a target position of the multimodal recognition device, and the pixel value of the target position is the first preset pixel value;

[0014] The collected image is processed into coordinates, and the first identification area is segmented according to the pixel values ​​of the pixels in the first identification area to obtain the corresponding medicine area, and the attribute data of the traditional Chinese medicine material is obtained by identifying the medicine area.

[0015] Optionally, in a possible implementation of the first aspect, the coordinate processing of the acquired image, segmenting the first identification area according to the pixel values ​​of the pixels in the first identification area to obtain the corresponding medicine area, and identifying the medicine area to obtain the attribute data of the traditional Chinese medicine material, includes:

[0016] After identifying and processing the pixel points in the first identification area that are not the first preset pixel values, second identification coordinates of the identified pixel points are obtained;

[0017] Determine a corresponding coordinate fence based on all second recognition coordinates, and segment the first recognition area based on the coordinate fence to obtain a second recognition area;

[0018] Determine a pixel point in the second recognition area that is different from the first preset pixel value as a drug positioning pixel point, and obtain a corresponding drug area by counting all directly connected and indirectly connected drug positioning pixel points;

[0019] The medicine area is photographed and identified to obtain attribute data of the Chinese medicine material, wherein the attribute data at least includes the type of Chinese medicine.

[0020] Optionally, in a possible implementation manner of the first aspect, determining a corresponding coordinate fence based on all second identification coordinates, and segmenting the first identification area based on the coordinate fence to obtain the second identification area includes:

[0021] Compare the coordinate values ​​of all the second identified coordinates respectively to obtain the maximum horizontal coordinate value of the fence, the minimum horizontal coordinate value of the fence, the maximum vertical coordinate value of the fence, and the minimum vertical coordinate value of the fence;

[0022] Based on the maximum horizontal coordinate value of the fence, the minimum horizontal coordinate value of the fence, the maximum vertical coordinate value of the fence, and the minimum vertical coordinate value of the fence, construct a maximum horizontal coordinate segmentation line of the fence, a minimum horizontal coordinate segmentation line of the fence, a maximum vertical coordinate segmentation line, and a minimum vertical coordinate segmentation line of the fence in the second recognition area;

[0023] The areas corresponding to the maximum horizontal coordinate dividing line of the fence, the minimum horizontal coordinate dividing line of the fence, the maximum vertical coordinate dividing line and the minimum vertical coordinate dividing line of the fence are extracted as the second recognition area after segmentation, and the top view image information of the Chinese medicinal materials is obtained based on the image of the second recognition area.

[0024] Optionally, in a possible implementation manner of the first aspect, the server extracts the top-view image information in the attribute data, performs image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtains quality information and cross-section information corresponding to the traditional Chinese medicine material, including:

[0025] Obtaining corresponding standard images of Chinese medicinal materials based on the types of Chinese medicinal materials, and identifying image contours of all Chinese medicinal materials in the top-view image information based on the standard images of Chinese medicinal materials;

[0026] Determine the corresponding image analysis method according to the type of traditional Chinese medicine, wherein the image analysis method includes a complementary analysis method and a screening analysis method;

[0027] If the corresponding Chinese medicine type is determined to be a complementary analysis, the image contours of all Chinese medicinal materials are supplemented and screened based on the complementary analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials;

[0028] If the corresponding Chinese medicine type is determined to be a screening analysis method, the image contours of all Chinese medicinal materials are eliminated and screened based on the screening analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-sectional information of the Chinese medicinal materials.

[0029] Optionally, in a possible implementation of the first aspect, if the corresponding Chinese medicine type is determined to be a completion analysis, a completion screening process is performed on the image contours of all Chinese medicinal materials based on the completion analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials, including:

[0030] If the corresponding Chinese medicine type is determined to be a complete analysis, the image contour is classified based on the Chinese medicine standard image to obtain a complete contour and an incomplete contour, and the complete contour corresponds to the contour of the Chinese medicine standard image;

[0031] Extracting two points in the incomplete contour as filling reference points, and constructing a tangent for each filling reference point to obtain a filling tangent;

[0032] Determine the intersection of the perpendicular lines of the two padding tangents to obtain the padding center point, calculate the distance between the padding center point and each padding reference point to obtain multiple padding radii, perform mean calculation on the multiple padding radii to obtain the corresponding reference radius, and obtain the padding contour corresponding to the image contour based on the reference radius.

[0033] Optionally, in a possible implementation manner of the first aspect, extracting two points in the incomplete contour as padding reference points, and padding tangents corresponding to the reference points to obtain padding tangents, includes:

[0034] Traversing all contour points in sequence according to the incomplete contour;

[0035] The first contour point and the last contour point of the traversed contour points are determined as padding reference points, and a tangent is constructed for each padding reference point to obtain a padding tangent.

[0036] Optionally, in a possible implementation of the first aspect, if the corresponding Chinese medicine type is determined to be a screening analysis method, then based on the screening analysis method, the image contours of all Chinese medicinal materials are eliminated and screened, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials, including:

[0037] Classifying the image contour based on the Chinese medicinal material standard image to obtain a complete contour and an incomplete contour, wherein the complete contour corresponds to the contour of the Chinese medicinal material standard image;

[0038] Delete the incomplete contour to get the complete contour.

[0039] Optionally, in a possible implementation of the first aspect, performing corresponding image segmentation and image recognition to obtain corresponding quality information and cross-section information of the traditional Chinese medicine material includes:

[0040] The complete contour and the padded image contour are obtained to obtain the corresponding Chinese medicinal material radius, and the Chinese medicinal material radius is classified based on the preset radius quality interval to obtain the medicinal material specification quality of each independent Chinese medicinal material, and each radius quality interval has the preset medicinal material specification quality;

[0041] Segment the image contour after obtaining the complete contour and the padded image contour and identify the medicinal material color of each independent Chinese medicinal material, compare the medicinal material color with the quality color interval to obtain the medicinal material color quality of each independent Chinese medicinal material, and each quality color interval has a preset medicinal material color quality;

[0042] The quality information is obtained by calculating the mean values ​​of the specification quality and color quality of the medicinal materials according to the number of independent Chinese medicinal materials, and the cross-sectional information is obtained by performing cross-sectional identification on the positions occupied by all the Chinese medicinal materials in the above-viewed image information.

[0043] A second aspect of the embodiment of the present invention provides a Chinese medicine material data processing system, which is configured at a Chinese medicine beverage production line and performs corresponding Chinese medicine material data processing through the following modules, including:

[0044] An acquisition module, used for acquiring attribute data of the Chinese medicinal material at the target location based on a multimodal recognition device at the target location, wherein the multimodal recognition device at least includes an image acquisition device and a quality acquisition device;

[0045] An extraction module, used to enable the server to extract the top-view image information in the attribute data, perform image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtain the quality information corresponding to the traditional Chinese medicine material;

[0046] A statistical module, for, if it is determined that the quality information meets the preset requirements, performing statistical calculations based on the quality information in the attribute data and the formula of the Chinese medicine beverage, obtaining the Chinese medicine material adjustment information and feeding it back to the management end;

[0047] The production module is used to enable the management end to adjust the Chinese medicinal materials at the target location based on the Chinese medicinal material adjustment information, and after obtaining all the adjusted Chinese medicinal materials, place them in the next production unit of the Chinese medicinal beverage production line for production processing.

[0048] Beneficial effects:

[0049] The present invention uses a multimodal recognition device at the target position of the production line, combined with an image acquisition device and a quality acquisition device, to fully capture the appearance characteristics and quality information of Chinese medicinal materials. In the process, the image of the Chinese medicinal materials is firstly acquired, and the position of the Chinese medicinal materials is accurately located by identifying the preset pixel value area, and then the image is processed by coordinates, the Chinese medicinal material area is segmented, and the various attribute data of the Chinese medicinal materials (such as type, color, size, etc.) are identified. The application of this multimodal recognition greatly improves the accuracy and comprehensiveness of Chinese medicinal material identification, and ensures the integrity and reliability of Chinese medicinal material data during the production process.

[0050] The present invention extracts the top-view image information of Chinese medicinal materials through a server, performs image segmentation and recognition processing based on standard images, and identifies the image contours of Chinese medicinal materials. According to the type of Chinese medicinal materials, the image contours are processed respectively by using a completion analysis or a screening analysis method. For circular contours, the contours are completed by constructing a completion center point by completing reference points and completing tangents; for non-circular contours, incomplete contours are deleted. In this process, the system can accurately identify the morphological characteristics and cross-sectional information of Chinese medicinal materials, and classify the specifications and evaluate the color of Chinese medicinal materials according to preset quality intervals, thereby ensuring the quality consistency and high standards of the selected Chinese medicinal materials.

[0051] After identifying and classifying the quality information of Chinese medicinal materials, the present invention automatically adjusts the Chinese medicinal materials on the production line based on the feedback of the Chinese medicinal materials adjustment information by the management end. According to the statistical calculation results, the system automatically operates the mechanical equipment to sort, adjust and transmit, ensuring that the Chinese medicinal materials meet the production standards. Finally, the adjusted Chinese medicinal materials are placed in the next unit of the production line for further processing, such as mixing, decoction and packaging. This automated adjustment process not only reduces manual intervention and reduces the error rate, but also significantly improves production efficiency and product quality, meeting the needs of large-scale production. The present invention effectively solves the problems of low recognition accuracy and low sorting efficiency in the prior art through technical means such as multimodal recognition, image segmentation and quality classification, and automated adjustment, ensuring the high efficiency and consistency of product quality in the production process of Chinese medicine beverages. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of a method for processing data of traditional Chinese medicine materials provided by an embodiment of the present invention;

[0053] Figure 2 It is a structural schematic diagram of a traditional Chinese medicine material data processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] See also Figure 1 , is a flow chart of a method for processing data of traditional Chinese medicine materials provided by an embodiment of the present invention. The method is configured at a production line of traditional Chinese medicine beverages, and performs corresponding data processing of traditional Chinese medicine materials through the following steps, including:

[0056] S1, acquiring attribute data of the Chinese medicinal material at the target location based on a multimodal recognition device at the target location, wherein the multimodal recognition device at least includes an image acquisition device and a quality acquisition device.

[0057] This solution uses multimodal recognition equipment to capture the attribute data of Chinese medicine materials at the target location of the production line. "Multimodal" here means the use of a variety of different sensors or acquisition devices, including at least image acquisition devices and quality acquisition devices. Image acquisition devices are usually used to capture the appearance characteristics of Chinese medicine materials, such as shape, color, size, etc. Quality acquisition equipment is used to determine the weight or other quality-related physical properties of Chinese medicine materials.

[0058] In some embodiments, the multimodal recognition device based on the target position acquires the attribute data of the Chinese medicinal material at the target position, and the multimodal recognition device at least includes an image acquisition device and a quality acquisition device, including:

[0059] S11, determining that an image acquisition device in a multimodal recognition device acquires an image of a target area.

[0060] This solution uses an image acquisition device (such as a camera) to acquire an image of the target area. It is worth mentioning that when collecting information on Chinese herbal medicines, the Chinese herbal medicines need to be placed on a weighing device, and the weighing area of ​​the weighing device is the target area of ​​this solution. It is understandable that the target area should contain the Chinese herbal medicines to be tested. During the test, the Chinese herbal medicines can be placed in a bag with a top opening to be placed in the weighing area.

[0061] S12, identifying and processing a first preset pixel value in the collected image to obtain a corresponding first identification area image, wherein the first identification area includes a target position of the multimodal identification device, and the pixel value of the target position is a first preset pixel value.

[0062] It is worth mentioning that this solution requires the weighing area to be set with the color of the first preset pixel value, for example, red, so the captured image will include the red weighing area and the Chinese medicinal materials placed above the weighing area. It can be understood that by identifying the image area matching the first preset pixel value, the weighing area can be located in the first step.

[0063] S13, coordinate processing is performed on the collected image, and the first identification area is segmented according to the pixel values ​​of the pixel points in the first identification area to obtain the corresponding medicine area, and the attribute data of the traditional Chinese medicine material is obtained by identifying the medicine area.

[0064] This solution coordinates the images of the screened Chinese medicinal materials and further separates the image area of ​​the Chinese medicinal materials from the surrounding environment based on the pixel value. The purpose of this step is to accurately identify the boundaries of the Chinese medicinal materials. Subsequently, the specific attribute data of the Chinese medicinal materials, such as size, shape, color, etc., are identified and extracted from this determined medicine area. These data are very important for evaluating the quality of Chinese medicinal materials.

[0065] The coordinate processing of the collected image, segmentation of the first identification area according to the pixel values ​​of the pixels in the first identification area, obtaining the corresponding medicine area, and identifying the medicine area to obtain the attribute data of the traditional Chinese medicine material include:

[0066] S131, obtaining second recognition coordinates of the recognized pixel points after recognition processing of the pixel points that are not the first preset pixel values ​​in the first recognition area.

[0067] It is understandable that the pixel points other than the first preset pixel value are the pixel points of the Chinese medicinal materials, and this solution will obtain the second identification coordinates of such pixel points. The set of these coordinates reflects the position of the Chinese medicinal materials in the image.

[0068] S132, determining a corresponding coordinate fence based on all second recognition coordinates, and segmenting the first recognition area based on the coordinate fence to obtain a second recognition area.

[0069] This solution will use all the second identification coordinates to determine a coordinate fence, which further narrows down the area where the Chinese medicinal materials are located.

[0070] In some embodiments, the determining of the corresponding coordinate fence based on all the second recognition coordinates, and segmenting the first recognition area based on the coordinate fence to obtain the second recognition area includes:

[0071] S1321, compare the coordinate values ​​of all the second identified coordinates respectively to obtain the maximum horizontal coordinate value of the fence, the minimum horizontal coordinate value of the fence, the maximum vertical coordinate value of the fence, and the minimum vertical coordinate value of the fence.

[0072] First, the scheme will compare the coordinate values ​​of all second identified coordinates to determine the maximum and minimum horizontal and vertical coordinate values ​​of the fence. These values ​​will be used to construct a rectangular fence around the identified Chinese herbal medicine.

[0073] S1322, based on the fence maximum horizontal coordinate value, fence minimum horizontal coordinate value, fence maximum vertical coordinate value, and fence minimum vertical coordinate value, construct a fence maximum horizontal coordinate segmentation line, a fence minimum horizontal coordinate segmentation line, a maximum vertical coordinate segmentation line, and a fence minimum vertical coordinate segmentation line in the second recognition area.

[0074] These maximum and minimum coordinate values ​​define a rectangular frame, called a coordinate fence. Specifically, this scheme will construct four dividing lines on the image: the maximum horizontal coordinate dividing line of the fence, the minimum horizontal coordinate dividing line of the fence, the maximum vertical coordinate dividing line of the fence, and the minimum vertical coordinate dividing line of the fence, thereby forming a rectangular frame.

[0075] S1323, extracting the area corresponding to the maximum horizontal coordinate dividing line of the fence, the minimum horizontal coordinate dividing line of the fence, the maximum vertical coordinate dividing line and the minimum vertical coordinate dividing line of the fence as the second recognition area after segmentation, and obtaining the top view image information of the Chinese medicinal material based on the image of the second recognition area.

[0076] According to the above segmentation line, the system will extract a new area, called the second identification area. This area is exactly the part within the fence, that is, the image part containing the Chinese herbal medicine. Through this step, the system will obtain the top-view image information of the Chinese herbal medicine. It can be understood that when the image acquisition device is performing data acquisition, it uses a top-down perspective to shoot, so what is obtained is the top-view image information.

[0077] S133, determining the pixel points in the second recognition area that are different from the first preset pixel value as drug positioning pixel points, and obtaining the corresponding drug area by counting all directly connected and indirectly connected drug positioning pixel points.

[0078] This solution will identify those pixels that are different from the first preset pixel value as drug positioning pixels. These pixels represent the Chinese medicine material itself rather than the background. Then, all directly and indirectly connected drug positioning pixels will be counted, and the statistical set will form the actual drug area.

[0079] S134, taking a photo of the medicine area to identify and obtain attribute data of the Chinese medicine material, wherein the attribute data at least includes the type of Chinese medicine.

[0080] Once the drug area of ​​the Chinese herbal medicine material is determined, the system can identify the attribute data of the Chinese herbal medicine material by taking a photo or directly analyzing the image. The attribute data includes at least the type of Chinese herbal medicine. The morphological characteristics of the Chinese herbal medicine material, such as shape, texture and color, can be compared with the known Chinese herbal medicine type characteristics in the database using drug recognition in the prior art.

[0081] S2, the server extracts the top-view image information in the attribute data, performs image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtains the quality information corresponding to the traditional Chinese medicine material.

[0082] In some embodiments, the server extracts the top-view image information in the attribute data, performs image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtains quality information and cross-sectional information corresponding to the traditional Chinese medicine material, including:

[0083] S21, obtaining corresponding standard images of Chinese medicinal materials based on the types of Chinese medicinal materials, and identifying image contours of all Chinese medicinal materials in the top-view image information based on the standard images of Chinese medicinal materials.

[0084] The server first extracts the top-view image information of the Chinese medicinal materials, and then obtains the corresponding standard images of Chinese medicinal materials based on the known types of Chinese medicinal materials. These standard images are usually preset reference images of Chinese medicinal materials of known quality. The server then uses these standard images to identify the image contours of all Chinese medicinal materials in the top-view image information. This step is to compare the shape and structural features of the Chinese medicinal materials and compare them with the standard images to judge their quality. It is understandable that the contour of Chinese medicinal materials can be used as one aspect of evaluating their quality. For example, if the standard contour of a Chinese medicinal material is a circle, and the identified contour is a semicircle, it means that it may have quality problems.

[0085] S22, determining a corresponding image analysis method according to the type of traditional Chinese medicine, wherein the image analysis method includes a completion analysis method and a screening analysis method.

[0086] According to the different types of Chinese medicine, the server determines the applicable image analysis method. Two analysis methods are mentioned here: completion analysis and screening analysis. Completion analysis is mainly used to process missing or incomplete parts in the image, while screening analysis is used to remove the contour part in the image.

[0087] It is worth mentioning that the Chinese medicinal materials in the collected images may be superimposed on each other, causing some Chinese medicinal materials to be covered by other Chinese medicinal materials, so the contours of some Chinese medicinal materials collected by the collection device may be incomplete. Therefore, this solution requires further processing of the contours. Due to the different types of Chinese medicinal materials, the corresponding contours are also different. Some Chinese medicinal materials correspond to circular contours, so the corresponding image analysis method can be a filling analysis method, that is, filling the corresponding contours and increasing the amount of processable contours. If the Chinese medicinal material corresponds to a non-circular contour, it may be difficult to fill it in, and a screening analysis can be used, that is, deleting the corresponding contour.

[0088] S23, if it is determined that the corresponding Chinese medicine type is a completion analysis, then the image contours of all Chinese medicinal materials are completed and screened based on the completion analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials.

[0089] If the Chinese medicine type is suitable for completion analysis, the server will perform completion screening on the image contours of all Chinese medicine materials. This may involve using image processing technology to fill in the missing parts in order to obtain a complete contour. The server will then perform image segmentation and image recognition to obtain the quality information and cross-sectional information corresponding to the Chinese medicine material. It is understandable that for some Chinese medicines, generally speaking, the larger the cross-sectional information, the better the corresponding Chinese medicine.

[0090] S24, if it is determined that the corresponding Chinese medicine type is a screening analysis method, then based on the screening analysis method, the image contours of all Chinese medicinal materials are eliminated and screened, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials.

[0091] If the type of Chinese medicine is suitable for screening analysis, the server will perform a removal screening process on some incomplete image contours of the Chinese medicine materials. In this step, the contour parts that are irrelevant or not wanted to be included in the analysis will be removed. After the screening process, the server also performs image segmentation and image recognition to obtain the quality information and cross-section information of the Chinese medicine materials.

[0092] S3, if it is determined that the quality information meets the preset requirements, statistical calculations are performed based on the quality information in the attribute data and the formula of the Chinese medicine beverage to obtain the Chinese medicine material adjustment information and feed it back to the management end.

[0093] This solution aims to obtain and analyze the quality information of Chinese herbal medicine materials through image processing technology, and adjust the Chinese herbal medicine formula according to the quality information and the formula analysis of Chinese herbal medicine beverages to ensure the quality of Chinese herbal medicine beverages. After completing the image recognition and quality information analysis of Chinese herbal medicine materials, first determine whether these quality information meet the preset quality requirements. If the quality information meets the preset requirements, statistical calculations are performed using this information and the formula data of Chinese herbal medicine beverages. The result of the calculation is the adjustment information of the Chinese herbal medicine materials, which will be sent back to the management end for further processing and decision-making.

[0094] In some embodiments, if the corresponding Chinese medicine type is determined to be a complementary analysis, the image contours of all Chinese medicinal materials are supplemented and screened based on the complementary analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials, including:

[0095] A31, if the corresponding Chinese medicine type is determined to be a complete analysis, the image contour is classified based on the Chinese medicine standard image to obtain a complete contour and an incomplete contour, and the complete contour corresponds to the contour of the Chinese medicine standard image.

[0096] If the type of Chinese medicine needs to be analyzed by completion, the standard image of the type is used to classify the contour of the Chinese medicine material image currently being analyzed, and the contour is divided into a complete contour and an incomplete contour. The complete contour corresponds to the contour of the standard image of the Chinese medicine material, that is, the contour without missing parts. For example, if the standard image of the Chinese medicine material is a circle, then the complete contour is also a circle.

[0097] A32, extracting two points in the incomplete contour as filling reference points, and constructing a tangent for each filling reference point to obtain a filling tangent.

[0098] It is worth mentioning that this solution is for filling circular contours. Extract two key points from the incomplete contour as filling reference points, and these two key points can be a certain distance apart. Then determine the intersection of the perpendicular lines of the two filling tangents as the filling center point. Calculate the distance between the filling center point and each filling reference point, and use these distances as the filling radius. Use the reference radius to fill the image contour and obtain the filled contour.

[0099] The step of extracting two points from the incomplete contour as padding reference points and padding the tangents corresponding to the reference points to obtain padding tangents includes:

[0100] A321, traverse all contour points in sequence according to the incomplete contour. It can be understood that there are multiple contour points.

[0101] A322, determining the first contour point and the last contour point of the traversed contour points as the filling reference points, and constructing the tangent line for each filling reference point to obtain the filling tangent line.

[0102] This solution extracts two key points from the incomplete contour as the filling reference points, which are the starting point and end point of the contour. A tangent is constructed for each filling reference point to obtain a filling tangent.

[0103] A33, determine the intersection of the perpendicular lines of the two padding tangents to obtain the padding center point, calculate the distance between the padding center point and each padding reference point to obtain multiple padding radii, calculate the mean of the multiple padding radii to obtain the corresponding reference radius, and obtain the padding contour corresponding to the image contour based on the reference radius.

[0104] This solution determines the intersection of the two perpendicular lines of the padding tangents as the padding center point. Calculate the distance between the padding center point and each padding reference point, and use these distances as the padding radius. Use the reference radius to complete the image contour to obtain the padding contour. It should be noted that this embodiment is aimed at the padding of circular contours.

[0105] In other embodiments, if the corresponding Chinese medicine type is determined to be a complementary analysis, the image contours of all Chinese medicinal materials are supplemented and screened based on the complementary analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials, including:

[0106] B31, classifying the image contour based on the Chinese medicinal material standard image to obtain a complete contour and an incomplete contour, wherein the complete contour corresponds to the contour of the Chinese medicinal material standard image.

[0107] This scheme uses the standard image of Chinese herbal medicine as a reference to classify the contours of the image of the Chinese herbal medicine to be analyzed. The purpose of classification is to classify the image contours into two categories: complete contours and incomplete contours. Complete contours are those that match the contours of the standard image of the Chinese herbal medicine, that is, there are no missing or damaged parts.

[0108] B32, delete the incomplete contour and obtain the complete contour.

[0109] After all incomplete contours are identified, they are deleted. After deleting the incomplete contours, only the complete contours remain. Unlike the previously described completion analysis process (A31, A32, A33), there is no step of completing the incomplete contours here, but these contours are directly deleted to retain the complete image contours.

[0110] In the above embodiment, the corresponding image segmentation and image recognition to obtain the corresponding quality information and cross-section information of the traditional Chinese medicine material include:

[0111] The complete outline and the padded image outline are obtained to obtain the corresponding Chinese medicinal material radius. The Chinese medicinal material radius is classified based on the preset radius quality interval to obtain the medicinal material specification and quality of each independent Chinese medicinal material. Each radius quality interval has a preset medicinal material specification and quality. This solution uses image analysis technology to extract the radius information of Chinese medicinal materials from the complete outline and the padded image outline. According to the preset radius quality interval, the Chinese medicinal material radius is classified to obtain the medicinal material specification and quality of each independent Chinese medicinal material. Each radius quality interval corresponds to a preset medicinal material specification and quality.

[0112] The acquired complete outline and the padded image outline are segmented and the medicinal material color of each independent Chinese medicinal material is identified. The medicinal material color is compared with the quality color interval to obtain the medicinal material color quality of each independent Chinese medicinal material. Each quality color interval has a preset medicinal material color quality. The acquired complete outline and the padded image outline are segmented to isolate each independent Chinese medicinal material. The medicinal material color of each independent Chinese medicinal material is identified and compared with the quality color interval to obtain the medicinal material color quality of each independent Chinese medicinal material. Each quality color interval has a preset medicinal material color quality.

[0113] According to the number of independent Chinese medicinal materials, the mean values ​​of the medicinal material specifications and the medicinal material color quality are calculated to obtain quality information, and the cross-section information is obtained by performing cross-section identification on the positions occupied by all Chinese medicinal materials in the above image information. According to the number of independent Chinese medicinal materials, the mean values ​​of the medicinal material specifications and the medicinal material color quality are calculated to obtain the overall quality information. The cross-section information is obtained by performing cross-section identification on the positions occupied by all Chinese medicinal materials in the above image information.

[0114] This analytical process is automated in order to quickly and accurately assess the quality of TCM materials. In this way, TCM materials can be effectively sorted and screened to ensure the consistency and high quality of the final product. This is extremely valuable for the TCM production and processing industry because it can be used to improve production efficiency and can be used as part of quality control.

[0115] S4, the management end adjusts and processes the Chinese medicinal materials at the target location based on the Chinese medicinal material adjustment information, and after obtaining all the adjusted Chinese medicinal materials, places them in the next production unit of the Chinese medicinal beverage production line for production processing.

[0116] This solution is a process in which the management end adjusts the Chinese medicine materials according to the information after the Chinese medicine materials are processed by image segmentation, quality classification, and cross-sectional information extraction. The specific steps may include that the management end first receives detailed data on the quality and cross-sectional information of each Chinese medicine material provided by the image processing system. The management end analyzes these data to determine whether the Chinese medicine materials need to be adjusted to meet the production requirements. This may include sorting the materials according to the quality classification, or adjusting the placement order of the materials to maximize production efficiency. According to the analysis results, the management end operates the relevant mechanical equipment (such as sorting machines, conveyor belts, etc.) to actually adjust the Chinese medicine materials at the target position. All adjusted Chinese medicine materials are accurately placed in the next production unit of the Chinese medicine beverage production line for subsequent production processing, such as mixing, decoction, packaging and other steps. This process is essentially an optimization process, ensuring that only Chinese medicine materials that meet the standards are used to produce Chinese medicine beverages, while also ensuring the smoothness and efficiency of the production process. By combining image recognition with physical adjustment processing, the automation level of the entire production process can be improved, human intervention can be reduced, the error rate can be reduced, and the quality and output of the final product can be improved.

[0117] See also Figure 2 , is a schematic diagram of the structure of a Chinese medicine material data processing system provided by an embodiment of the present invention. The system is configured at a Chinese medicine beverage production line and performs corresponding Chinese medicine material data processing through the following modules, including:

[0118] An acquisition module, used for acquiring attribute data of the Chinese medicinal material at the target location based on a multimodal recognition device at the target location, wherein the multimodal recognition device at least includes an image acquisition device and a quality acquisition device;

[0119] An extraction module, used to enable the server to extract the top-view image information in the attribute data, perform image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtain the quality information corresponding to the traditional Chinese medicine material;

[0120] A statistical module, for, if it is determined that the quality information meets the preset requirements, performing statistical calculations based on the quality information in the attribute data and the formula of the Chinese medicine beverage, obtaining the Chinese medicine material adjustment information and feeding it back to the management end;

[0121] The production module is used to enable the management end to adjust the Chinese medicinal materials at the target location based on the Chinese medicinal material adjustment information, and after obtaining all the adjusted Chinese medicinal materials, place them in the next production unit of the Chinese medicinal beverage production line for production processing.

[0122] The present invention also provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the methods provided by the various embodiments described above.

[0123] Among them, the storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, the storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also exist in a communication device as discrete components. The storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0124] The present invention also provides a program product, which includes an execution instruction, which is stored in a storage medium. At least one processor of a device can read the execution instruction from the storage medium, and at least one processor executes the execution instruction so that the device implements the methods provided in the above various embodiments.

[0125] In the above-mentioned terminal or server embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing data of traditional Chinese medicine materials, characterized in that: Configured at the Chinese medicine beverage production line, the corresponding Chinese medicine material data processing is carried out through the following steps, including: Acquiring attribute data of the Chinese medicinal material at the target location based on a multimodal recognition device at the target location, wherein the multimodal recognition device includes at least an image acquisition device and a quality acquisition device; The server extracts the top-view image information in the attribute data, performs image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtains the quality information corresponding to the traditional Chinese medicine material; If it is determined that the quality information meets the preset requirements, statistical calculations are performed based on the quality information in the attribute data and the formula of the Chinese medicine beverage to obtain Chinese medicine material adjustment information and feed it back to the management end; The management end adjusts and processes the Chinese medicinal materials at the target location based on the Chinese medicinal material adjustment information, and places all adjusted Chinese medicinal materials in the next production unit of the Chinese medicinal beverage production line for production processing after obtaining them; The server extracts the top-view image information in the attribute data, performs image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtains quality information and cross-sectional information corresponding to the traditional Chinese medicine material, including: Obtaining corresponding standard images of Chinese medicinal materials based on the types of Chinese medicinal materials, and identifying image contours of all Chinese medicinal materials in the top-view image information based on the standard images of Chinese medicinal materials; Determine the corresponding image analysis method according to the type of traditional Chinese medicine, wherein the image analysis method includes a complementary analysis method and a screening analysis method; If the corresponding Chinese medicine type is determined to be a complementary analysis, the image contours of all Chinese medicinal materials are supplemented and screened based on the complementary analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials; If it is determined that the corresponding Chinese medicine type is a screening analysis method, the image contours of all Chinese medicinal materials are eliminated and screened based on the screening analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials; If the corresponding Chinese medicine type is determined to be a complementary analysis, the image contours of all Chinese medicinal materials are complementary and screened based on the complementary analysis method, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials, including: If the corresponding Chinese medicine type is determined to be a complete analysis, the image contour is classified based on the Chinese medicine standard image to obtain a complete contour and an incomplete contour, and the complete contour corresponds to the contour of the Chinese medicine standard image; Extracting two points in the incomplete contour as filling reference points, and constructing a tangent for each filling reference point to obtain a filling tangent; Determine the intersection of the perpendicular lines of the two padding tangents to obtain the padding center point, calculate the distance between the padding center point and each padding reference point to obtain multiple padding radii, calculate the mean of the multiple padding radii to obtain a corresponding reference radius, and obtain the padding contour corresponding to the image contour based on the reference radius; The step of extracting two points from the incomplete contour as padding reference points and padding the tangents corresponding to the reference points to obtain the padding tangents comprises: Traversing all contour points in sequence according to the incomplete contour; Determine the first contour point and the last contour point of the traversed contour points as the filling reference points, and construct the tangent line for each filling reference point to obtain the filling tangent line; Or if the corresponding Chinese medicine type is determined to be a screening analysis method, then based on the screening analysis method, the image contours of all Chinese medicinal materials are eliminated and screened, and corresponding image segmentation and image recognition are performed to obtain the corresponding quality information and cross-section information of the Chinese medicinal materials, including: Classifying the image contour based on the Chinese medicinal material standard image to obtain a complete contour and an incomplete contour, wherein the complete contour corresponds to the contour of the Chinese medicinal material standard image; Delete the incomplete contour to obtain the complete contour; The complete contour and the padded image contour are obtained to obtain the corresponding Chinese medicinal material radius, and the Chinese medicinal material radius is classified based on the preset radius quality interval to obtain the medicinal material specification quality of each independent Chinese medicinal material, and each radius quality interval has the preset medicinal material specification quality; Segment the image contour after obtaining the complete contour and the padded image contour and identify the medicinal material color of each independent Chinese medicinal material, compare the medicinal material color with the quality color interval to obtain the medicinal material color quality of each independent Chinese medicinal material, and each quality color interval has a preset medicinal material color quality; The quality information is obtained by calculating the mean values ​​of the specification quality and color quality of the medicinal materials according to the number of independent Chinese medicinal materials, and the cross-sectional information is obtained by performing cross-sectional identification on the positions occupied by all the Chinese medicinal materials in the above-viewed image information.

2. The method for processing data of traditional Chinese medicine materials according to claim 1, characterized in that: The multimodal recognition device based on the target position obtains the attribute data of the Chinese medicinal material at the target position, and the multimodal recognition device at least includes an image acquisition device and a quality acquisition device, including: Determine that an image acquisition device in a multimodal recognition device acquires an image of a target area; Recognize and process the first preset pixel value in the collected image to obtain a corresponding first recognition area image, where the first recognition area includes a target position of the multimodal recognition device, and the pixel value of the target position is the first preset pixel value; The collected image is processed into coordinates, and the first identification area is segmented according to the pixel values ​​of the pixels in the first identification area to obtain the corresponding medicine area, and the attribute data of the traditional Chinese medicine material is obtained by identifying the medicine area.

3. The method for processing data of traditional Chinese medicine materials according to claim 2, characterized in that: The coordinate processing of the collected image, segmenting the first identification area according to the pixel values ​​of the pixels in the first identification area to obtain the corresponding medicine area, and identifying the medicine area to obtain the attribute data of the traditional Chinese medicine material, includes: After identifying and processing the pixel points in the first identification area that are not the first preset pixel values, second identification coordinates of the identified pixel points are obtained; Determine a corresponding coordinate fence based on all second recognition coordinates, and segment the first recognition area based on the coordinate fence to obtain a second recognition area; Determine a pixel point in the second recognition area that is different from the first preset pixel value as a drug positioning pixel point, and obtain a corresponding drug area by counting all directly connected and indirectly connected drug positioning pixel points; The medicine area is photographed and identified to obtain attribute data of the Chinese medicine material, wherein the attribute data at least includes the type of Chinese medicine.

4. The method for processing data of traditional Chinese medicine materials according to claim 3, characterized in that: The step of determining a corresponding coordinate fence based on all second recognition coordinates, and segmenting the first recognition area based on the coordinate fence to obtain a second recognition area includes: Compare the coordinate values ​​of all the second identified coordinates respectively to obtain the maximum horizontal coordinate value of the fence, the minimum horizontal coordinate value of the fence, the maximum vertical coordinate value of the fence, and the minimum vertical coordinate value of the fence; Based on the maximum horizontal coordinate value of the fence, the minimum horizontal coordinate value of the fence, the maximum vertical coordinate value of the fence, and the minimum vertical coordinate value of the fence, construct a maximum horizontal coordinate segmentation line of the fence, a minimum horizontal coordinate segmentation line of the fence, a maximum vertical coordinate segmentation line, and a minimum vertical coordinate segmentation line of the fence in the second recognition area; The areas corresponding to the maximum horizontal coordinate dividing line of the fence, the minimum horizontal coordinate dividing line of the fence, the maximum vertical coordinate dividing line and the minimum vertical coordinate dividing line of the fence are extracted as the second recognition area after segmentation, and the top view image information of the Chinese medicinal materials is obtained based on the image of the second recognition area.

5. A Chinese medicinal material data processing system according to any one of claims 1 to 4, characterized in that: Configured at the Chinese medicine beverage production line, the following modules are used to process the corresponding Chinese medicine material data, including: An acquisition module, used for acquiring attribute data of the Chinese medicinal material at the target location based on a multimodal recognition device at the target location, wherein the multimodal recognition device at least includes an image acquisition device and a quality acquisition device; An extraction module, used to enable the server to extract the top-view image information in the attribute data, perform image segmentation and image recognition processing on the traditional Chinese medicine material based on the top-view image information, and obtain the quality information corresponding to the traditional Chinese medicine material; A statistical module, for, if it is determined that the quality information meets the preset requirements, performing statistical calculations based on the quality information in the attribute data and the formula of the Chinese medicine beverage, obtaining the Chinese medicine material adjustment information and feeding it back to the management end; The production module is used to enable the management end to adjust the Chinese medicinal materials at the target location based on the Chinese medicinal material adjustment information, and after obtaining all the adjusted Chinese medicinal materials, place them in the next production unit of the Chinese medicinal beverage production line for production processing.

Citation Information

Patent Citations

  • Efficient sterilizing and drying system for traditional Chinese medicine decoction pieces

    CN111951251A

  • Chinese herbal medicine recognition method and device based on multi-modal image recognition

    CN112102318A

  • Drug determining and sorting method and device based on image data processing

    CN114871120A