A classification and storage method and system for Chinese herbal medicine pieces based on big data

Through multi-angle and multi-state video collection of traditional Chinese medicine pieces, combined with similarity index analysis and image recognition models, the problem of recognition bias caused by messy data sources in the classification and storage of traditional Chinese medicine pieces is solved, and more accurate classification and refined storage are achieved. The environment improves the quality management of traditional Chinese medicine pieces.

CN118552876BActive Publication Date: 2024-10-29BEIJING CHUNFENG PHARMACEUTICAL CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410755727.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-29
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

In the existing classification and storage methods of traditional Chinese medicine pieces, the image recognition results are easily affected by cluttered data sources, resulting in a high frequency of deviations in the recognition results.

Method used

Multiple videos of traditional Chinese medicine pieces are shot by the camera at a constant speed, the similarity index is calculated to select key video frames, and the trained image recognition classification model is used for identification. The storage environment is judged based on the recognition results, and the camera rotation speed is adjusted to control the image collection density and speed.

Benefits of technology

It realizes the unification of data sources, reduces the probability of deviation in image recognition results, ensures the accurate classification of Chinese medicine pieces and refines the storage environment, and reduces the interaction between different quality Chinese medicine pieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552876B_ABST
    Figure CN118552876B_ABST
Patent Text Reader

Abstract

The present invention discloses a classification and storage method and system for Chinese herbal medicine slices based on big data. The classification and storage method for Chinese herbal medicine slices based on big data comprises the following steps: using a camera to uniformly surround the same Chinese herbal medicine slice to shoot multiple videos; extracting video frames from the video at specified frame intervals, comparing the two frames before and after, and calculating the similarity index; screening out key video frames according to the similarity index; preprocessing the key video frames, and recognizing the Chinese herbal medicine slice images acquired in real time based on a trained image recognition classification model, and judging the storage environment according to the recognition results. The present invention screens out key video frames by continuously comparing the previous and next frames of the same Chinese herbal medicine slice, so as to train the image recognition classification model, unify the data source, reduce the probability of deviation of the image recognition result, and solve the problem that the current classification and storage of Chinese herbal medicine slices has a high frequency of deviation in the image recognition result due to the excessively messy data source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traditional Chinese medicine image data processing, and in particular to a method and system for classifying and storing traditional Chinese medicine pieces based on big data. Background Art

[0002] Traditionally, the classification and storage of Chinese herbal medicines mainly rely on the meridian classification method in traditional Chinese medicine theory, which classifies Chinese herbal medicines according to their properties, flavors, meridians, etc., and then stores them according to certain rules. However, with the increase in the types of Chinese herbal medicines and the changes in market demand, the traditional classification method can no longer meet the needs of modern management. Therefore, a classification and storage method and system for Chinese herbal medicines based on big data came into being.

[0003] The existing classification and storage methods of Chinese herbal medicines use big data technology to collect, store, process and analyze a large amount of data on Chinese herbal medicines, so that Chinese herbal medicines can be classified and stored more scientifically. By deeply exploring and analyzing the properties of Chinese herbal medicines such as taste, meridians, and efficacy, more accurate and effective guidance can be provided for the classification and storage of Chinese herbal medicines. At the same time, combined with artificial intelligence and machine learning technologies, automatic classification and intelligent management of Chinese herbal medicines can be achieved, improving the utilization efficiency and quality of Chinese herbal medicines.

[0004] For example, the patent application with publication number: CN110866547A discloses an automatic classification system and method for Chinese herbal medicines based on multiple features and random forests, which includes: a data reading unit, an image preprocessing unit, a feature collection and processing unit, and an automatic classification storage unit which are sequentially signal-connected; the image preprocessing unit is signal-connected to the automatic classification storage unit.

[0005] For example, the patent application with publication number: CN113361564A discloses a method and system for identifying Chinese herbal medicines based on a deep residual network, which includes: S1: data acquisition: collecting common Chinese herbal medicine images; S2: data processing: processing the collected original images; S3: model training: training the network model with a training set; S4: data recognition: identifying Chinese herbal medicines using a Chinese herbal medicine classification network.

[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:

[0007] In the existing technology, a single image recognition method or image classification method is currently used, and the data source used for image recognition and classification modeling is too messy, which may lead to omission of certain key features and deviation in image recognition results. Therefore, the current classification and storage of Chinese herbal medicines has a high frequency of deviation in image recognition results due to the excessively messy data source. Summary of the invention

[0008] The embodiments of the present application provide a method and system for classifying and storing Chinese herbal medicines based on big data, thereby solving the problem that the current classification and storage of Chinese herbal medicines has a high frequency of deviations in image recognition results due to excessively complex data sources, unifying data sources, and reducing the probability of deviations in image recognition results.

[0009] The embodiment of the present application provides a method for classifying and storing Chinese herbal medicines based on big data, comprising the following steps: shooting multiple videos of the same Chinese herbal medicine by a camera at a uniform speed around the same Chinese herbal medicine; extracting video frames from the video at specified frame intervals, comparing the two frames before and after, and calculating the similarity index; screening out key video frames according to the similarity index; pre-processing the key video frames, identifying the Chinese herbal medicine images acquired in real time based on a trained image recognition and classification model, and judging the storage environment according to the recognition results.

[0010] Furthermore, the camera uniformly circles around the same Chinese herbal medicine to shoot multiple videos, including the following steps: obtaining the characteristics of each Chinese herbal medicine; obtaining the degree of influence of each characteristic of each Chinese herbal medicine; adjusting the rotation speed of the camera according to the characteristics of each Chinese herbal medicine and the degree of influence of the characteristics to control the density and speed of image acquisition.

[0011] Furthermore, the specific steps of screening out key video frames are: subjecting the two previous and next video frames to a similarity index analysis model to obtain a similarity index; the similarity index is used to reflect the degree of similarity between the two previous and next video frames; judging whether the two previous and next video frames belong to the same video frame based on the similarity index: if not, both the previous and next video frames are recorded as key video frames; if they do, discarding the latter video frame, and then comparing the similarity indexes of the two previous and next video frames in the remaining video frames, until all video frames of the multiple videos are traversed, and multiple groups of key video frames extracted from multiple videos of the same Chinese herbal medicine are obtained; repeating the above method to extract key video frames for other types of Chinese herbal medicines.

[0012] Furthermore, the camera has a 360-degree rotation shooting function, and also has an upward and downward shooting function; after determining the rotation speed of the camera, multiple groups of videos are shot according to different pitch angles, and when shooting multiple groups of videos, after the previous group of videos is shot, wait for the Chinese herbal medicine pieces to be turned over, and when the Chinese herbal medicine pieces are turned over, continue to shoot the next video.

[0013] Furthermore, the steps for constructing the similarity index analysis model are as follows: extracting features from all video frames to obtain feature vectors; calculating the similarity of the feature vectors between the previous and next video frames based on a similarity measurement method to obtain a similarity measurement result; verifying the similarity of the feature vectors between the previous and next video frames based on a cosine similarity method to obtain a similarity measurement verification result; establishing a similarity index analysis model based on the feature vectors, the similarity measurement results and the similarity measurement verification results to obtain a similarity index to reflect the degree of similarity of the images.

[0014] Furthermore, the specific formula of the similarity index is:

[0015]

[0016] Where L represents the similarity index, A1 represents the feature vector in the previous video frame, A2 represents the feature vector in the next video frame, and S represents the covariance matrix.

[0017] Furthermore, the training steps of the image recognition classification model are: preprocessing all key video frames extracted from multiple videos of multiple groups of Chinese herbal medicine pieces; dividing all the preprocessed key video frames into a training set and a test set; training the image recognition classification model based on the key video frames in the training set; evaluating the image recognition classification model based on the test set; based on the trained image recognition classification model, recognizing the Chinese herbal medicine pieces images acquired in real time to obtain recognition results.

[0018] Furthermore, the step of judging the storage environment according to the recognition result is as follows: obtaining the instruction manual information of the Chinese herbal medicine slices and performing text preprocessing; performing keyword extraction based on the instruction manual information of the Chinese herbal medicine slices after text preprocessing to obtain the characteristic keywords of the herbal medicine slices; obtaining a matching list of the characteristic keywords of the herbal medicine slices and the storage environment; determining the storage environment according to the characteristic words of the herbal medicine slices and the matching list; analyzing the quality evaluation index of the Chinese herbal medicine slices according to the key video frames, wherein the quality evaluation index of the Chinese herbal medicine slices is used to judge the quality of the appearance of the Chinese herbal medicine slices; dividing the quality grade of the Chinese herbal medicine slices into N levels according to the quality evaluation index of the Chinese herbal medicine slices, where N is a natural number; dividing the determined storage environment into N parts, where N is a natural number, corresponding one to one to the quality grade of the Chinese herbal medicine slices; according to the quality grade of the Chinese herbal medicine slices corresponding to the quality evaluation index of the Chinese herbal medicine slices, storing the Chinese herbal medicine slices in the storage environment corresponding to the quality grade of the Chinese herbal medicine slices.

[0019] Furthermore, the analysis process of the quality evaluation index of Chinese herbal medicine pieces is as follows: obtaining actual quality grade data of Chinese herbal medicine pieces; extracting appearance feature data of Chinese herbal medicine pieces from key video frames, the appearance feature data including color feature values, shape feature values, and texture feature values; assigning weights to the appearance feature data by an objective weighting method; constructing a Chinese herbal medicine piece quality evaluation index analysis formula based on the appearance feature data and the assigned weights, and calculating the Chinese herbal medicine piece quality evaluation index by the formula;

[0020] QI=C1*(e OC -1)+C2*MS+C3*IT;

[0021] Wherein, QI is the quality evaluation index of Chinese herbal medicine pieces, e is a natural constant, OC is the color eigenvalue, MS is the shape eigenvalue, IT is the texture eigenvalue, C1 is the weight of the color eigenvalue in the quality evaluation index of Chinese herbal medicine pieces, C2 is the weight of the shape eigenvalue in the quality evaluation index of Chinese herbal medicine pieces, and C3 is the weight of the texture eigenvalue in the quality evaluation index of Chinese herbal medicine pieces.

[0022] The embodiment of the present application provides a Chinese herbal medicine classification and storage system based on big data, comprising: a Chinese herbal medicine data acquisition module, a similarity index analysis module, a key video frame screening module and a storage environment determination module; wherein the Chinese herbal medicine data acquisition module is used to shoot multiple videos of the same Chinese herbal medicine by using a camera to uniformly surround the same Chinese herbal medicine; the similarity index analysis module is used to extract video frames from the video every specified number of frames, compare the two frames before and after, and calculate the similarity index; the key video frame screening module is used to screen out key video frames according to the similarity index; the storage environment determination module is used to pre-process the key video frames, identify the Chinese herbal medicine images acquired in real time based on the trained image recognition and classification model, and judge its storage environment according to the recognition results.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0024] 1. By continuously comparing the previous and next frames of the same kind of Chinese herbal medicine, the similarity index is obtained, and the key video frames are screened out according to the similarity index for training the image recognition classification model, which realizes the unification of data sources and reduces the probability of deviation in image recognition results. It effectively solves the problem of high frequency of deviation in image recognition results caused by too messy data sources in the current classification and storage of Chinese herbal medicines.

[0025] 2. By shooting multiple videos from different angles for the same Chinese herbal medicine, and adding the action of flipping the Chinese herbal medicine between different angles, and then continuously comparing the front and back video frames of the same Chinese herbal medicine, the data source for each Chinese herbal medicine of the same type of Chinese herbal medicine can be more comprehensive, thereby enriching the data source and reducing the probability of missing key features during recognition.

[0026] 3. Determine the storage environment based on the recognition results, combined with the characteristic words of the herbal medicines and the matching list, divide the quality grade of the herbal medicines into N levels according to the quality evaluation index of the herbal medicines, and divide the determined storage environment into N parts, which correspond to the quality grade of the herbal medicines one by one. Therefore, according to the quality grade of the herbal medicines corresponding to the quality evaluation index of the herbal medicines, the herbal medicines are stored in the storage environment corresponding to the quality grade of the herbal medicines, thereby realizing the refinement of the storage environment, so that the herbal medicines of different qualities are stored separately, and the mutual influence between the herbal medicines of different qualities is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A flow chart of a method for classifying and storing Chinese herbal medicine pieces based on big data provided in an embodiment of the present application;

[0028] Figure 2 This is an example graph of similarity index;

[0029] Figure 3 A schematic diagram of the structure of a Chinese herbal medicine classification and storage system based on big data provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The embodiment of the present application provides a method and system for classifying and storing Chinese herbal medicines based on big data, thereby solving the problem that the current classification and storage of Chinese herbal medicines has a high frequency of deviations in image recognition results due to excessively cluttered data sources. By continuously comparing the previous and next frames of the same Chinese herbal medicine, a similarity index is obtained, and key video frames are screened out according to the similarity index for training the image recognition classification model, thereby achieving the unification of data sources and reducing the probability of deviation in image recognition results.

[0031] The technical solution in the embodiment of the present application is to solve the problem that the current classification and storage of Chinese herbal medicine pieces has a high frequency of deviation in image recognition results due to the excessively messy data sources. The overall idea is as follows:

[0032] By shooting multiple videos from different angles for the same kind of Chinese herbal medicine, and adding the action of turning the Chinese herbal medicine between different angles, and then continuously comparing the front and back video frames of the same kind of Chinese herbal medicine, screening the key video frames according to the similarity index, training the image recognition and classification model based on the screened key video frames, and using the image recognition and classification model to recognize the Chinese herbal medicine images acquired in real time to obtain the recognition results, and finally judging the storage environment of the Chinese herbal medicine according to the recognition results, it is achieved that the data source comes from different video data of the same Chinese herbal medicine after turning over, and at the same time extracts the key video frames to reduce the frequency of deviations in image recognition results.

[0033] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0034] like Figure 1 As shown, it is a flow chart of a method for classifying and storing Chinese herbal medicines based on big data provided by an embodiment of the present application. The method is applied to a system for classifying and storing Chinese herbal medicines based on big data. The method includes the following steps: shooting multiple videos of the same Chinese herbal medicine by a camera at a uniform speed around the same Chinese herbal medicine; extracting video frames from the video at intervals of a specified number of frames, comparing the two frames before and after, and calculating the similarity index; selecting key video frames according to the similarity index; preprocessing the key video frames, identifying the Chinese herbal medicine images acquired in real time based on a trained image recognition and classification model, and judging the storage environment according to the recognition results.

[0035] Furthermore, the camera uniformly circles around the same Chinese herbal medicine to shoot multiple videos, including the following steps: obtaining the characteristics of each Chinese herbal medicine; obtaining the degree of influence of each characteristic of each Chinese herbal medicine; adjusting the rotation speed of the camera according to the characteristics of each Chinese herbal medicine and the degree of influence of the characteristics, so as to control the density and speed of image acquisition.

[0036] In this embodiment, the characteristics include ingredient content and appearance characteristics, and the degree of influence of the characteristics includes the degree of influence of ingredient content and the degree of influence of appearance characteristics. If the sum of the degree of influence of the characteristics is smaller, the acquisition density is lower and the acquisition speed is faster; if the sum of the degree of influence of the characteristics is larger, the acquisition density is higher and the acquisition speed is slower. For example, Chinese herbal medicines contain a variety of ingredients, and as a recognition data source, more details need to be obtained, so the camera needs to adjust the rotation speed to smoothly and comprehensively capture its image. For example, Chinese herbal medicines with higher freshness may present brighter colors and clearer textures, so the camera needs to take this into account when capturing images to reflect the impact of the freshness of Chinese herbal medicines on the appearance characteristics as much as possible. Adjust the rotation speed of the camera according to the sum of the degree of influence of the characteristics to control the density and speed of image acquisition.

[0037] The smaller the sum of the influence degrees of the characteristics, the smaller the influence of the characteristics of the Chinese herbal medicines on image acquisition. In this case, the rotation speed of the camera can be increased to improve the acquisition efficiency. On the contrary, if the sum of the influence degrees of the characteristics is larger, the greater the influence of the characteristics of the Chinese herbal medicines on image acquisition, the greater the influence of the characteristics of the Chinese herbal medicines on image acquisition. In this case, the rotation speed of the camera needs to be reduced to ensure the acquisition quality and accuracy.

[0038] Furthermore, the specific steps for screening out key video frames are as follows: the similarity index is obtained by analyzing the previous and next two video frames through a similarity index analysis model; the similarity index is used to reflect the similarity degree between the previous and next two video frames; according to the similarity index, whether the previous and next two video frames belong to the same video frame is determined: if not, both the previous and next two video frames are recorded as key video frames; if they do, the latter video frame is discarded, and then the similarity index of the previous and next two video frames in the remaining video frames is compared, until all video frames of multiple videos are traversed, and multiple groups of key video frames extracted from multiple videos of the same Chinese herbal medicine are obtained; repeat the above method to extract key video frames for other types of Chinese herbal medicines.

[0039] In this embodiment, the similarity index analysis model can be used to more accurately evaluate the similarity between video frames, thereby screening out the real key video frames and reducing the possibility of misjudgment. By quickly processing a large amount of video data in an automated screening process, the extraction efficiency of key video frames is improved, saving labor costs and time costs. After multiple iterative processes, it is ensured that multiple groups of key video frames are extracted from multiple videos, covering the dynamic changes of different types of Chinese herbal medicine pieces, and improving the comprehensiveness and representativeness of the data.

[0040] Furthermore, the camera has a 360-degree rotating shooting function, as well as an upward and downward shooting function; after determining the rotation speed of the camera, multiple groups of videos are shot according to different pitch angles, and when shooting multiple groups of videos, after the previous group of videos is shot, wait for the Chinese herbal medicines to be turned over, and when the Chinese herbal medicines are turned over, continue shooting the next video.

[0041] In this embodiment, adjusting the rotation speed: By adjusting the rotation speed of the camera, the density and speed of image acquisition can be controlled. A slower rotation speed can better capture details, while a faster speed can complete image acquisition faster. According to actual conditions and needs, the speed can be adjusted according to the characteristics of each Chinese herbal medicine piece and the degree of detail of the required features.

[0042] Adjust the surround angle: The surround angle of the camera determines the ability to obtain images from different perspectives. By adjusting the surround angle, you can obtain more image information, thereby increasing the accuracy of image classification. You can try different surround angles, such as a full 360-degree surround or more top-down and top-down angles to cover a wider range of features.

[0043] During the shooting process, waiting for the Chinese herbal medicine to flip is to obtain images at different angles and states, so as to more comprehensively show the characteristics of the Chinese herbal medicine. The step of waiting for flipping includes observing whether the Chinese herbal medicine is fully unfolded or rotated to ensure that different forms and characteristics are captured during the shooting process. The waiting time can be set or the state of the Chinese herbal medicine can be detected by using sensors to determine when to take the next shot.

[0044] By capturing images of Chinese herbal medicines from different angles and states, richer and more comprehensive feature information can be obtained, which helps to improve the accuracy and robustness of image classification.

[0045] Capturing images of Chinese herbal medicines at different angles and states can help reduce classification errors and biases, improve the generalization ability of classification models, and thus improve classification accuracy.

[0046] Multi-angle and multi-state image acquisition can increase the diversity of data, thereby enhancing the robustness of the image recognition model, enabling it to accurately recognize images under different conditions.

[0047] Furthermore, the steps for constructing the similarity index analysis model are as follows: extract features from all video frames to obtain feature vectors; calculate the similarity of the feature vectors between the previous and next video frames based on the similarity measurement method to obtain a similarity measurement result; verify the similarity of the feature vectors between the previous and next video frames based on the cosine similarity method to obtain a similarity measurement verification result; establish a similarity index analysis model based on the feature vectors, similarity measurement results and similarity measurement verification results to obtain a similarity index to reflect the degree of similarity of the images.

[0048] In this embodiment, similarity measurement methods include Euclidean distance, Manhattan distance, etc., which are used to calculate the similarity of feature vectors between the previous and next two video frames to obtain similarity measurement results. Automatically judge the similarity of video frames, improve work efficiency, and reduce manual intervention. By using the similarity measurement method, the accuracy of similarity judgment is improved and misjudgment is reduced. Cosine similarity is a similarity measurement method, which is simple and efficient, and has a fast calculation speed, so that similarity measurement can be completed more efficiently on large-scale video data sets. The cosine similarity method can effectively measure the similarity between two vectors. The cosine similarity method has a solid mathematical theoretical foundation, and its geometric meaning in the vector space is clear and definite. Therefore, by using the cosine similarity method to verify the similarity of feature vectors, it is more reliable and interpretable when verifying the similarity of feature vectors.

[0049] Furthermore, the specific formula of the similarity index is:

[0050]

[0051] Where L represents the similarity index, A1 represents the feature vector in the previous video frame, A2 represents the feature vector in the next video frame, and S represents the covariance matrix.

[0052] In this embodiment, the similarity index can also be obtained by spectral analysis technology, which can detect the spectral characteristics reflected or emitted by objects, and evaluate their similarity by comparing the spectral information of different images. Feature vectors can be extracted from video frames by image processing technology. Common methods include using convolutional neural networks (CNN) for feature extraction, or using traditional image processing techniques to extract pixel values, color histograms, texture features, etc. The covariance matrix S is used to reflect the correlation between feature vectors. The covariance matrix is ​​obtained by performing statistical analysis on the extracted feature vectors, or it is estimated based on the distribution of the feature vectors. The closer the similarity index is to 0, the more similar the two video frames are. Table 1 is an example table of similarity index, and the example table of similarity index is shown in the following table:

[0053] Table 1 Example of Similarity Index

[0054]

[0055]

[0056] like Figure 2 As shown in Table 1 and Figure 2 It can be seen that when the difference between the eigenvectors is larger, the similarity index is smaller, and when the difference between the eigenvectors is very small, the similarity index is larger and closer to 0.

[0057] Furthermore, the training steps of the image recognition classification model are as follows: preprocessing all key video frames extracted from multiple videos of multiple types of Chinese herbal medicines; dividing all preprocessed key video frames into a training set and a test set; training the image recognition classification model based on the key video frames in the training set; evaluating the image recognition classification model based on the test set; based on the trained image recognition classification model, recognizing the Chinese herbal medicine images acquired in real time to obtain recognition results.

[0058] In this embodiment, preprocessing is performed on all extracted key video frames, including image resizing, graying, denoising and other operations, so as to facilitate subsequent feature extraction and model training. The preprocessed key video frames are divided into training sets and test sets according to a certain ratio. The training set is used for training the image recognition classification model, and the test set is used to evaluate the performance and generalization ability of the image recognition classification model. Feature extraction is performed on the key video frames in the training set, for example, using a convolutional neural network (CNN) to extract the feature representation of the image. At the same time, data enhancement operations are performed, including random cropping, flipping, rotation, etc., to increase the diversity of data samples and improve the generalization ability of the model. The image recognition classification model is trained using the key video frames in the training set and their corresponding labels. The selectable deep learning models include convolutional neural networks (CNN), recurrent neural networks (RNN), etc., and the model parameters are optimized by the back propagation algorithm so that it can accurately classify the images of Chinese herbal medicine pieces. The trained model is evaluated using the key video frames in the test set, and the accuracy, precision, recall and other indicators of the model are calculated to evaluate the performance and generalization ability of the model. Based on the trained image recognition and classification model, the images of Chinese herbal medicines acquired in real time are recognized to obtain the recognition results. Through the model recognition results, the Chinese herbal medicines are quickly and accurately classified, and then the subsequent storage environment judgment and other operations are carried out. Through sufficient training and evaluation, a high-accuracy image recognition and classification model is obtained to improve the accuracy of Chinese herbal medicine classification. Using modern deep learning technology, an efficient image recognition and classification model can be quickly trained to improve processing speed and recognition efficiency. By establishing a good model to realize automatic recognition of Chinese herbal medicine images, manual intervention can be reduced and production and management efficiency can be improved. The trained model is deployed to the real-time system to realize the rapid recognition of real-time Chinese herbal medicine images to meet the needs of real-time monitoring and recognition.

[0059] Furthermore, the steps of judging the storage environment according to the recognition results are as follows: obtaining the instruction manual information of the Chinese herbal medicine slices and performing text preprocessing; performing keyword extraction based on the instruction manual information of the Chinese herbal medicine slices after text preprocessing to obtain the characteristic keywords of the herbal medicine slices; obtaining a matching list of the characteristic keywords of the herbal medicine slices and the storage environment; determining the storage environment according to the characteristic words of the herbal medicine slices and the matching list; analyzing the quality evaluation index of the Chinese herbal medicine slices according to the key video frames, and the quality evaluation index of the Chinese herbal medicine slices is used to judge the quality of the appearance of the Chinese herbal medicine slices; dividing the quality grade of the Chinese herbal medicine slices into N levels according to the quality evaluation index of the Chinese herbal medicine slices, where N is a natural number; dividing the determined storage environment into N parts, where N is a natural number, which corresponds one to one to the quality grade of the Chinese herbal medicine slices; according to the quality grade of the Chinese herbal medicine slices corresponding to the quality evaluation index of the Chinese herbal medicine slices, storing the Chinese herbal medicine slices in the storage environment corresponding to the quality grade of the Chinese herbal medicine slices.

[0060] In this embodiment, N is determined according to actual needs. For example, for a certain volume of Chinese herbal medicine, the corresponding storage environment can only support being divided into 3 parts at most, then N is set to 3. The limit value of the quality evaluation index of Chinese herbal medicine corresponding to the specific quality is obtained according to the actual situation. The user first manually judges the storage environment corresponding to the quality of different Chinese herbal medicine quality evaluation indexes, and then divides the quality grade of Chinese herbal medicine after finding the limit value. The system obtains the storage environment corresponding to the quality grade of the Chinese herbal medicine subsequently tested according to the limit value.

[0061] By analyzing the characteristics and quality grades of Chinese herbal medicines, the appropriate storage environment can be accurately determined to ensure that the quality and efficacy of Chinese herbal medicines are not affected. Text preprocessing and keyword extraction technology can be used to accurately extract key information related to the storage environment, avoid improper storage environment selection due to incomplete information acquisition or misjudgment, and reduce the misjudgment rate. Automated text processing and matching processes can greatly improve work efficiency, save human resource costs, reduce the occurrence of human errors, and improve work efficiency. The storage environment is divided into multiple levels according to the quality grade of Chinese herbal medicines, and the storage environment can be customized according to the requirements of different levels to meet the storage needs of Chinese herbal medicines of different quality grades. Ensuring the quality of Chinese herbal medicines during storage can not only improve user satisfaction after purchase, but also enhance user trust and loyalty to the brand and improve user experience.

[0062] Furthermore, the analysis process of the quality evaluation index of Chinese herbal medicine pieces is as follows: obtaining the actual quality grade data of Chinese herbal medicine pieces; extracting the appearance feature data of Chinese herbal medicine pieces from the key video frames, the appearance feature data including color feature values, shape feature values, and texture feature values; assigning weights to the appearance feature data by an objective weighting method; constructing a Chinese herbal medicine piece quality evaluation index analysis formula based on the appearance feature data and the assigned weights, and calculating the Chinese herbal medicine piece quality evaluation index by the formula;

[0063] QI=C1*(e OC -1)+C2*MS+C3*IT;

[0064] Wherein, QI is the quality evaluation index of Chinese herbal medicine pieces, e is a natural constant, OC is the color eigenvalue, MS is the shape eigenvalue, IT is the texture eigenvalue, C1 is the weight of the color eigenvalue in the quality evaluation index of Chinese herbal medicine pieces, C2 is the weight of the shape eigenvalue in the quality evaluation index of Chinese herbal medicine pieces, and C3 is the weight of the texture eigenvalue in the quality evaluation index of Chinese herbal medicine pieces.

[0065] In this embodiment, the quality evaluation index of Chinese herbal medicine slices can also use chemical analysis techniques, such as high performance liquid chromatography (HPLC), gas chromatography-mass spectrometry (GC-MS), infrared spectroscopy (IR), etc., to analyze the chemical composition of Chinese herbal medicine slices. By measuring the content of active ingredients in Chinese herbal medicine slices, their quality and efficacy can be evaluated. Appearance feature data can be extracted by image processing technology, such as using a digital camera to take pictures of Chinese herbal medicine slices, and then extracting features such as color, shape, and texture through image processing algorithms. The color features of Chinese herbal medicine slices can be obtained using image processing technology, such as color space conversion, color histogram and other methods to obtain the color features of Chinese herbal medicine slices, and the change in color may reflect the degree of oxidation of Chinese herbal medicine slices. The shape features of Chinese herbal medicine slices can be obtained using image processing technology, such as edge detection, shape descriptors and other methods to obtain the shape features of Chinese herbal medicine slices, and the change in shape may reflect the degree of moisture of Chinese herbal medicine slices. The texture features of Chinese herbal medicines can be obtained using image processing technology, such as texture feature extraction, texture analysis and other methods. The change in texture may reflect the integrity of the Chinese herbal medicines. After obtaining the appearance feature value, the RGB value of the color can be used to evaluate the degree of oxidation of the Chinese herbal medicines. The depth of the color may be related to the degree of oxidation; the shape feature can reflect the integrity of the Chinese herbal medicines. Irregular shapes may indicate a high degree of damage; the texture feature can reflect the moisture level of the Chinese herbal medicines to a certain extent, such as observing the clarity and uniformity of the texture.

[0066] like Figure 3 As shown, it is a structural schematic diagram of a Chinese herbal medicine classification and storage system based on big data provided by an embodiment of the present application. The Chinese herbal medicine classification and storage system based on big data provided by an embodiment of the present application includes: a Chinese herbal medicine data acquisition module, a similarity index analysis module, a key video frame screening module and a storage environment determination module; wherein, the Chinese herbal medicine data acquisition module is used to shoot multiple videos of the same Chinese herbal medicine by using a camera to uniformly surround the same Chinese herbal medicine; the similarity index analysis module is used to extract video frames from the video every specified number of frames, compare the two frames before and after, and calculate the similarity index; the key video frame screening module is used to screen out key video frames according to the similarity index; the storage environment determination module is used to pre-process the key video frames, recognize the Chinese herbal medicine images acquired in real time based on the trained image recognition and classification model, and judge its storage environment according to the recognition results.

[0067] In summary, the embodiment of the present application obtains a similarity index by continuously comparing the previous and next frames of the same kind of Chinese herbal medicine, and selects key video frames based on the similarity index for training the image recognition classification model, thereby achieving the unification of data sources and reducing the probability of deviation in image recognition results.

[0068] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0069] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0070] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0071] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0072] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0073] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A classification and storage method for Chinese herbal medicine pieces based on big data. It is characterized in that The following steps are involved: Use a camera to uniformly circle the same Chinese herbal medicine to shoot multiple videos; Extract video frames from the video at specified frame intervals, compare the previous and next frames, and calculate the similarity index; Filter out key video frames based on the similarity index; Preprocess the key video frames, identify the real-time acquired images of Chinese herbal medicine pieces based on the trained image recognition and classification model, and determine their storage environment based on the recognition results; The specific steps of filtering out key video frames are: The similarity index of the two video frames is obtained by using a similarity index analysis model; The similarity index is used to reflect the similarity between two previous and next video frames; Determine whether the two video frames belong to the same video frame based on the similarity index: If it does not belong to, then both the preceding and following video frames are recorded as key video frames; If yes, discard the next video frame, and then compare the similarity indexes of the two previous and next video frames in the remaining video frames, until all video frames of the multiple videos are traversed, and multiple groups of key video frames extracted from multiple videos of the same Chinese medicine decoction piece are obtained; Repeat the above method to extract key video frames for other types of Chinese herbal medicine pieces; The steps for constructing the similarity index analysis model are as follows: Perform feature extraction on all video frames to obtain feature vectors; Based on the similarity measurement method, the similarity of the feature vectors between the previous and next two video frames is calculated to obtain the similarity measurement result; The similarity of the feature vectors between the previous and next video frames is verified based on the cosine similarity method, and the similarity measurement verification result is obtained; According to the feature vector, similarity measurement results and similarity measurement verification results, a similarity index analysis model is established to obtain a similarity index to reflect the degree of similarity of the images; The specific formula of the similarity index is: In the formula, L represents the similarity index, A 1 Represents the feature vector in the previous video frame, A 2 represents the feature vector in the next video frame, and S represents the covariance matrix; The step of determining the storage environment according to the recognition result is as follows: Obtain the instructions for Chinese herbal medicines and perform text preprocessing; Keywords are extracted based on the information of the instructions for Chinese herbal medicine pieces after text preprocessing to obtain the characteristic keywords of the pieces; Obtain a matching list of the characteristic keywords of medicinal materials and the storage environment; Determine the storage environment based on the characteristic keywords and matching list of medicinal pieces; Analyzing the quality evaluation index of Chinese herbal medicine slices according to the key video frames, wherein the quality evaluation index of Chinese herbal medicine slices is used to judge the quality of the appearance of the Chinese herbal medicine slices; According to the quality evaluation index of Chinese herbal medicine pieces, the quality grade of Chinese herbal medicine pieces is divided into N grades, where N is a natural number; Divide the determined storage environment into N parts, where N is a natural number corresponding to the quality grade of Chinese herbal medicine slices; According to the quality grade of Chinese herbal medicine pieces corresponding to the quality evaluation index of Chinese herbal medicine pieces, the Chinese herbal medicine pieces are stored in a storage environment corresponding to the quality grade of Chinese herbal medicine pieces; The analysis process of the quality evaluation index of Chinese herbal medicine pieces is as follows: Obtain actual quality grade data of Chinese herbal medicine pieces; Extracting appearance feature data of Chinese herbal medicine pieces from key video frames, the appearance feature data including color feature values, shape feature values, and texture feature values; Assign weights to appearance feature data through an objective weighting method; According to the appearance feature data and the assigned weights, a quality evaluation index analysis formula for Chinese herbal medicine pieces is constructed, and the quality evaluation index for Chinese herbal medicine pieces is calculated by the formula; QI=C 1 *(e OC -1)+C 2 *MS+C 3 *IT; Where QI is the quality evaluation index of Chinese herbal medicine pieces, e is the natural constant, OC is the color feature value, MS is the shape feature value, IT is the texture feature value, C 1 is the weight of color feature value in the quality evaluation index of Chinese herbal medicine pieces, C 2 is the weight of the shape feature value in the quality evaluation index of Chinese herbal medicine pieces, C 3 is the weight of texture feature value in the quality evaluation index of Chinese herbal medicine pieces.

2. A method for classifying and storing Chinese herbal medicine pieces based on big data as claimed in claim 1, It is characterized in that The camera uniformly surrounds the same Chinese herbal medicine slice to shoot multiple videos, including the following steps: Get the characteristics of each Chinese herbal medicine piece; Obtain the degree of influence of each characteristic of each Chinese herbal medicine piece; The rotation speed of the camera is adjusted according to the characteristics of each Chinese herbal medicine piece and the degree of influence of the characteristics to control the density and speed of image acquisition.

3. A method for classifying and storing Chinese herbal medicine pieces based on big data as claimed in claim 1, Features: The camera has a 360-degree rotating shooting function, and also has upward and downward shooting functions; After the rotation speed of the camera is determined, multiple groups of videos are shot according to different pitch angles. When shooting multiple groups of videos, after the previous group of videos is shot, wait for the Chinese herbal medicine pieces to be turned over. After the Chinese herbal medicine pieces are turned over, continue shooting the next video.

4. A method for classifying and storing Chinese herbal medicine pieces based on big data as claimed in claim 1, Features: The training steps of the image recognition classification model are: Preprocessing all key video frames extracted from multiple videos of multiple groups of Chinese herbal medicine pieces; Divide all preprocessed key video frames into training sets and test sets; Train the image recognition classification model based on the key video frames in the training set; Evaluate image recognition classification models based on a test set; Based on the trained image recognition and classification model, the real-time acquired images of Chinese herbal medicine pieces are recognized to obtain the recognition results.

5. A Chinese herbal medicine classification and storage system based on big data using any one of the methods of claims 1 to 4, It is characterized in that The Chinese medicine pieces classification storage system based on big data comprises: a Chinese medicine pieces data acquisition module, a similarity index analysis module, a key video frame screening module and a storage environment determination module; The Chinese herbal medicine data acquisition module is used to shoot multiple videos of the same Chinese herbal medicine at a uniform speed by using a camera; The similarity index analysis module is used to extract video frames from the video at specified frame intervals, compare the previous and next frames, and calculate the similarity index; The key video frame screening module is used to screen out key video frames according to the similarity index; The storage environment determination module is used to pre-process the key video frames, identify the real-time acquired Chinese herbal medicine images based on the trained image recognition and classification model, and determine the storage environment according to the recognition results.

Citation Information

Patent Citations

  • Traditional Chinese medicine decoction piece automatic classification system and method based on multiple features and random forest

    CN110866547A

  • Traditional Chinese medicine decoction piece identification method and system based on deep residual network

    CN113361564A

  • Automatic identification method and device for traditional Chinese medicine decoction piece image

    CN118657990A