Testing Method and Equipment for Saturated Water Absorption Rate of Chinese Herbal Pieces Based on Water Content Identification
By using watermark point recognition model and ultrasonic immersion technology in the saturation water absorption detection of Chinese herbal decoctions, the problem of unconsidered water content is solved, and the accuracy and reliability of the test are improved.
Patent Information
- Application Number
- CN202411390559.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The existing method for detecting saturation water absorption of Chinese herbal medicines fails to effectively consider the initial water content of the sample, resulting in the existence of test errors.
Using a test method based on water content recognition, the images of Chinese herbal medicines were extracted, the watermark points were identified using the trained watermark point recognition model, and the saturated water absorption rate was calculated by combining ultrasonic immersion technology.
This method can accurately identify the initial water content of Chinese herbal medicines without relying on manual experience, and improve the accuracy of saturation water absorption test, reducing test errors.
Smart Images

Figure CN118896874B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of traditional Chinese medicine decoction pieces analysis, and in particular, to a method and device for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification. Background Art
[0002] The decoction of traditional Chinese medicine decoction pieces is one of the important links in the preparation process of traditional Chinese medicine. Some traditional Chinese medicine decoction pieces need to be soaked before decoction, and the soaking time usually determines the efficiency of traditional Chinese medicine decoction. In order to make the traditional Chinese medicine decoction pieces play their medicinal effects better through soaking, it is necessary to detect the saturated water absorption rate of traditional Chinese medicine decoction pieces in combination with the characteristics of different traditional Chinese medicine decoction pieces. The current method for detecting the saturated water absorption rate by soaking is to completely immerse the sample in water to ensure that the sample is completely covered by water. At regular time intervals, the sample is taken out and the excess water on the surface is gently dried with absorbent paper or soft cloth, and then the weight of the sample is immediately weighed. The above steps are repeated until the water absorption of the sample no longer increases significantly, that is, it reaches the saturated state. However, this method does not take into account the initial water content of the sample. Some traditional Chinese medicine decoction pieces have a low initial water content, and it is difficult to observe the water mark points on the surface with the naked eye, so they are misjudged as dry traditional Chinese medicine decoction pieces. If the initial water content is not considered, test errors will occur. Therefore, developing a method and device for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification, which can effectively overcome the defects in the above-mentioned related technologies, has become an urgent technical problem in the industry. Summary of the Invention
[0003] In view of the above problems existing in the prior art, the embodiments of the present invention provide a method and device for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification.
[0004] In a first aspect, an embodiment of the present invention provides a method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification, including: extracting an image of the traditional Chinese medicine decoction piece, and identifying the image by using a trained water mark point identification model; if water mark points are identified on the traditional Chinese medicine decoction piece, drying the traditional Chinese medicine decoction piece to obtain the weight of the dried traditional Chinese medicine decoction piece; placing the traditional Chinese medicine decoction piece on a filter, and placing the filter in water in an ultrasonic environment for soaking multiple times to obtain the weight after soaking, and removing the weight of the filter from the weight after soaking to obtain the saturated water absorption weight of the traditional Chinese medicine decoction piece; and obtaining the saturated water absorption rate of the traditional Chinese medicine decoction piece according to the weight of the dried traditional Chinese medicine decoction piece and the saturated water absorption weight of the traditional Chinese medicine decoction piece.
[0005] Based on the content of the above method embodiments, the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiments of the present invention, the structure of the watermark point identification model includes: a first CBS-2 layer, connected to the input layer Input and the first CBS-3 layer; a second CBS-2 layer, connected to the first CBS-3 layer and the second CBS-3 layer; a first ELAN-1 layer, connected to the second CBS-3 layer and the first MP layer; a second ELAN-1 layer, connected to the first MP layer and the second MP layer; a third ELAN-1 layer, connected to the second MP layer, the third MP layer and the first CBS-1 layer, and the first CBS-1 layer is connected to the first Concat layer; a fourth ELAN-1 layer, connected to the third MP layer and the STCBS layer; a second CBS-1 layer, connected to the STCBS layer and the UPSample layer, and the UPSample layer is connected to the first Concat layer; a first ELAN-2 layer, connected to the first Concat layer and the fourth MP layer; a second ELAN-2 layer, connected to the fourth MP layer and the DCZ layer; a REP layer, connected to the DCZ layer and the CBM layer, and the CBM layer is connected to the output layer Output.
[0006] Based on the content of the above method embodiments, the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiments of the present invention, the structures of the first MP layer, the second MP layer, the third MP layer and the fourth MP layer include: a first Maxpool layer, connected to the third CBS-1 layer and the fourth CBS-1 layer, and the third CBS-1 layer is connected to the second Concat layer; a third CBS-3 layer, connected to the fourth CBS-1 layer and the second Concat layer.
[0007] Based on the content of the above method embodiments, the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiments of the present invention, the STCBS layer includes: a fifth CBS-1 layer, connected to the sixth CBS-1 layer and the third Concat layer; a third CBS-2 layer, connected to the sixth CBS-1 layer and the second Maxpool layer; a fourth CBS-2 layer, connected to the second Maxpool layer and the fourth CBS-3 layer, and the fourth CBS-3 layer is connected to the third Concat layer.
[0008] Based on the content of the above method embodiments, the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiments of the present invention, the DCZ layer includes: a ZDX layer, connected to the Conv layer and the LN layer, and is used to reduce the calculation amount when processing image data exceeding a predetermined quantity threshold; an MLP layer, connected to the LN layer and the fourth Concat layer, and is used to transform non-linear features into linear features, and the LN layer is connected to the fourth Concat layer.
[0009] Based on the content of the above method embodiments, in the embodiments of the present invention, a method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification is provided. The ZDX layer includes: a CL layer, connected to the JL layer, ZL layer, and the first Multi layer, for obtaining a query tensor, and the first Multi layer is used for matrix multiplication; a Norm layer, connected to the first Multi layer and the TZX layer, for normalizing the matrix after multiplication; a TZX layer, connected to the second Multi layer, for selecting eigenvectors; a JL layer, connected to the CL layer, the first Multi layer, and the ZL layer, for obtaining a key-value tensor; a ZL layer, connected to the JL layer and the second Multi layer, for obtaining a value tensor.
[0010] Based on the content of the above method embodiments, in the embodiments of the present invention, a method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification, obtaining the saturated water absorption rate of traditional Chinese medicine decoction pieces according to the weight of the dried traditional Chinese medicine decoction pieces and the saturated water absorption weight of the traditional Chinese medicine decoction pieces, includes:
[0011] , ,
[0012] wherein, is the saturated water absorption rate of traditional Chinese medicine decoction pieces; is the weight of the filter; is the weight of the dried traditional Chinese medicine decoction pieces; is the weight of the traditional Chinese medicine decoction pieces after saturated water absorption; is the weight of the traditional Chinese medicine decoction pieces after saturated water absorption plus the weight of the filter.
[0013] In a second aspect, an embodiment of the present invention provides a device for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification, including: a first main module, for extracting an image of the traditional Chinese medicine decoction pieces and identifying the image using a trained watermark point recognition model; a second main module, for drying the traditional Chinese medicine decoction pieces to obtain the weight of the dried traditional Chinese medicine decoction pieces if watermark points are identified on the traditional Chinese medicine decoction pieces; a third main module, for placing the traditional Chinese medicine decoction pieces on a filter and soaking the filter in water in an ultrasonic environment multiple times to obtain the soaked weight, and removing the weight of the filter from the soaked weight to obtain the saturated water absorption weight of the traditional Chinese medicine decoction pieces; a fourth main module, for obtaining the saturated water absorption rate of the traditional Chinese medicine decoction pieces according to the weight of the dried traditional Chinese medicine decoction pieces and the saturated water absorption weight of the traditional Chinese medicine decoction pieces.
[0014] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0015] at least one processor, at least one memory, and a communication interface; wherein,
[0016] the processor, memory, and communication interface communicate with each other;
[0017] The memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided by any one of the various implementations of the first aspect.
[0018] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided by any one of the various implementations of the first aspect.
[0019] The method and device for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided by the embodiments of the present invention identify the watermark points on the traditional Chinese medicine decoction pieces by using a trained watermark point identification model, and dry the traditional Chinese medicine decoction pieces to obtain the weight of the dried traditional Chinese medicine decoction pieces; the traditional Chinese medicine decoction pieces are placed on a filter and soaked in water multiple times to obtain the weight after soaking, and the weight of the filter is excluded from the weight after soaking to obtain the saturated water absorption weight of the traditional Chinese medicine decoction pieces. Finally, the saturated water absorption rate of the traditional Chinese medicine decoction pieces is obtained accordingly. It is possible to identify the water content of a large number of traditional Chinese medicine decoction pieces without relying on manual experience, and perform corresponding saturated water absorption rate tests on the identified traditional Chinese medicine decoction pieces with water content, improving the accuracy of the test for the saturated water absorption rate of traditional Chinese medicine decoction pieces. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0021] Figure 1 It is a schematic flowchart of the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided by the embodiments of the present invention;
[0022] Figure 2 It is a schematic structural diagram of the device for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided by the embodiments of the present invention;
[0023] Figure 3 It is a schematic physical structure diagram of the electronic device provided by the embodiments of the present invention;
[0024] Figure 4 It is a schematic network structure diagram of the watermark point identification model provided by the embodiments of the present invention;
[0025] Figure 5 It is a schematic network structure diagram of the CBS layer provided by the embodiments of the present invention;
[0026] Figure 6 Schematic diagram of the ELAN-1 network structure provided by the embodiment of the present invention;
[0027] Figure 7 Schematic diagram of the ELAN-2 network structure provided by the embodiment of the present invention;
[0028] Figure 8 Schematic diagram of the MP layer network structure provided by the embodiment of the present invention;
[0029] Figure 9 Schematic diagram of the STCBS layer network structure provided by the embodiment of the present invention;
[0030] Figure 10 Schematic diagram of the REP layer network structure provided by the embodiment of the present invention;
[0031] Figure 11 Schematic diagram of the DCZ layer network structure provided by the embodiment of the present invention;
[0032] Figure 12 Schematic diagram of the ZDX layer network structure provided by the embodiment of the present invention;
[0033] Figure 13 Schematic diagram of the CBM layer network structure provided by the embodiment of the present invention;
[0034] Figure 14 Schematic diagram of the effect of the watermark point recognition model provided by the embodiment of the present invention for recognizing the extracted Chinese herbal medicine slice image. Detailed implementation manners
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention. In addition, the technical features in each embodiment or a single embodiment provided by the present invention can be combined with each other arbitrarily to form a feasible technical solution. This combination is not restricted by the order of steps and / or the structural composition mode, but must be based on what can be achieved by those of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention. If there are step numbers in the following embodiments, they are only set for the convenience of explanation and illustration, and no limitation is imposed on the order between steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0036] An embodiment of the present invention provides a method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification. Refer to Figure 1 , the method includes: extracting an image of the traditional Chinese medicine decoction pieces, and identifying the image using a trained watermark point recognition model; if watermark points are identified on the traditional Chinese medicine decoction pieces, drying the traditional Chinese medicine decoction pieces to obtain the weight of the dried traditional Chinese medicine decoction pieces; placing the traditional Chinese medicine decoction pieces on a filter, and placing the filter in water in an ultrasonic environment for multiple soakings to obtain the soaked weight, and removing the weight of the filter from the soaked weight to obtain the saturated water absorption weight of the traditional Chinese medicine decoction pieces; obtaining the saturated water absorption rate of the traditional Chinese medicine decoction pieces according to the weight of the dried traditional Chinese medicine decoction pieces and the saturated water absorption weight of the traditional Chinese medicine decoction pieces.
[0037] It should be noted that all CBSs involved in the specification are convolutional layer plus batch normalization layer plus Silu activation function layer; the Concat layer is specifically a feature splicing layer; ELAN is an elastic local aggregation layer; the STCBS layer, DCZ layer, and ZDX layer are self-constructed layers, and the subsequent embodiments provide their specific structures; the UPSample layer is an upsampling layer; the REP layer is a layer for time series prediction; the MP layer is a fully connected layer.
[0038] Refer to Figure 4 , based on the content of the above method embodiment, as an optional embodiment, for the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiment of the present invention, the structure of the watermark point recognition model includes: a first CBS-2 layer, connected to the input layer Input and the first CBS-3 layer; a second CBS-2 layer, connected to the first CBS-3 layer and the second CBS-3 layer; a first ELAN-1 layer, connected to the second CBS-3 layer and the first MP layer; a second ELAN-1 layer, connected to the first MP layer and the second MP layer; a third ELAN-1 layer, connected to the second MP layer, the third MP layer and the first CBS-1 layer, and the first CBS-1 layer is connected to the first Concat layer; a fourth ELAN-1 layer, connected to the third MP layer and the STCBS layer; a second CBS-1 layer, connected to the STCBS layer and the UPSample layer, and the UPSample layer is connected to the first Concat layer; a first ELAN-2 layer, connected to the first Concat layer and the fourth MP layer; a second ELAN-2 layer, connected to the fourth MP layer and the DCZ layer; a REP layer, connected to the DCZ layer and the CBM layer, and the CBM layer is connected to the output layer Output.
[0039] It should be noted that a large amount of Chinese herbal medicine pieces are required for large-scale production of Chinese medicine preparations. Therefore, if only manual experience is relied on to screen dried Chinese herbal medicine pieces, it is not only time-consuming and laborious, but also has low reliability. The computing power of traditional recognition models is also difficult to handle such large-scale calculations. Therefore, by using the watermark point recognition model designed in the embodiments of the present invention, the initial water content of a large number of Chinese herbal medicine pieces can be recognized more accurately, reducing the economic cost of recognition and improving the reliability of recognition.
[0040] The structures of various CBS layers can be referred to Figure 5 , which is composed of a Conv layer (convolution layer, the same below), a BN layer and a SiLU layer connected. The BN layer is used for batch normalization of data, and its expression is as follows:
[0041] (1)
[0042] Among them, is the output after normalization and scaling; and are learnable scaling and offset parameters, is the input value, is the mean of the mini-batch, is the variance of the mini-batch, is a constant for numerical stability.
[0043] The expression of the SiLU layer is as follows:
[0044] (2)
[0045] Among them, c is the input; exp is the exponential function.
[0046] The characteristic of the SiLU function is that when the input value is close to 0, its output is close to the input value, and when the input value is far from 0, its output is close to the sign of the input value. This characteristic makes SiLU perform very well when dealing with small input values. All Concat layers in the embodiments of the present invention are fusion layers, which merge and stack channels of the same size but with inconsistent parameters. The structures of all CBS-1, CBS-2 and CBS-3 are as Figure 5 , and the only difference is that the convolutional layer of CBS-1 is 1*1 , step size is 1; The volume layer of CBS-2 is 3* 3, with a stride of 1; the convolutional layer of CBS-3 is 3* 3, with a stride of 2.
[0047] The various ELAN-1 layers can be referred to Figure 6 , which is composed of two CBS-1 layers, four CBS-2 layers and one Concat layer. The various ELAN-2 layers can be referred to Figure 7, which is also composed of two CBS-1 layers, four CBS-2 layers and one Concat layer. The only difference between the ELAN-1 layer and the ELAN-2 layer lies in the different number of merged CBS-2 in the Concat layer (the latter merges two more CBS-2 than the former). It should be noted that any Concat layer in all embodiments of the present invention is a fusion layer for merging and stacking channels of the same size but with inconsistent parameters.
[0048] See Figure 8 , based on the content of the above method embodiments, as an optional embodiment, in the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiments of the present invention, the structures of the first MP layer, the second MP layer, the third MP layer and the fourth MP layer include: a first Maxpool layer connected to the third CBS-1 layer and the fourth CBS-1 layer, and the third CBS-1 layer is connected to the second Concat layer; a third CBS-3 layer connected to the fourth CBS-1 layer and the second Concat layer.
[0049] Specifically, the MP module has two branches, and its function is to perform downsampling. The first branch first passes through a first Maxpool layer, that is, a max pooling layer. The function of this max pooling is to perform downsampling, and then passes through a 1x1 CBS-1 layer to change the number of channels. The second branch first passes through a 1x1 CBS-1 layer to change the number of channels, and then passes through a CBS-3 layer to perform downsampling. Finally, the results of the first branch and the second branch are added together to obtain the result of super downsampling.
[0050] See Figure 9 , based on the content of the above method embodiments, as an optional embodiment, in the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification provided in the embodiments of the present invention, the STCBS layer includes: a fifth CBS-1 layer connected to the sixth CBS-1 layer and the third Concat layer; a third CBS-2 layer connected to the sixth CBS-1 layer and the second Maxpool layer; a fourth CBS-2 layer connected to the second Maxpool layer and the fourth CBS-3 layer, and the fourth CBS-3 layer is connected to the third Concat layer.
[0051] Specifically, the function of the lower-branch second Maxpool layer and the preceding CBS-1 layer and CBS-2 layer is to enhance the receptive field for small targets, enabling the algorithm to adapt to images with a predetermined threshold resolution (a relatively small resolution). For example, for the Chinese herbal medicine pieces and the watermark points on their surfaces in an image, their scales are different. Through the second Maxpool layer, it is possible to better distinguish small targets from large targets. The upper branch performs conventional processing, and the remaining part of the lower branch processes the small-resolution targets (such as watermark points) recognized by the second Maxpool layer. Finally, these two parts are combined, which can reduce the computational amount by half, increase the calculation speed, and improve the recognition granularity and accuracy. The structure of the REP layer can be seen in Figure 10 , which consists of a 3*3 Conv layer and a BN layer.
[0052] See Figure 11 , based on the content of the above method embodiments, as an alternative embodiment, the method for testing the saturated water absorption rate of Chinese herbal medicine pieces based on water content identification provided in the embodiments of the present invention, the DCZ layer includes: a ZDX layer, connected to the Conv layer and the LN layer, for reducing the computational amount when processing image data exceeding a predetermined quantity threshold; an MLP layer, connected to the LN layer and the fourth Concat layer, for transforming non-linear features into linear features, and the LN layer is connected to the fourth Concat layer. It should be noted that the ZDX layer adopts a value pair selection mechanism, which can have better performance in identifying small-resolution targets (such as watermark points) and further reduce the computational amount. The LN layer is a normalization layer for stabilizing the training process. The MLP layer is a multi-layer perceptron for non-linear feature transformation.
[0053] See Figure 12 , based on the content of the above method embodiments, as an alternative embodiment, the method for testing the saturated water absorption rate of Chinese herbal medicine pieces based on water content identification provided in the embodiments of the present invention, the ZDX layer includes: a CL layer, connected to the JL layer, the ZL layer, and the first Multi layer, for obtaining a query tensor, and the first Multi layer is used for matrix multiplication; a Norm layer, connected to the first Multi layer and the TZX layer, for normalizing the matrix after multiplication; a TZX layer, connected to the second Multi layer, for selecting feature vectors; a JL layer, connected to the CL layer, the first Multi layer, and the ZL layer, for obtaining a key-value tensor; a ZL layer, connected to the JL layer and the second Multi layer, for obtaining a value tensor.
[0054] Specifically, the expression of the CL layer is: Q = p * zQ; the expression of the JL layer is: K = p * zK; the expression of the ZL layer is: V = p * zV; where Q is the value of the query tensor; K is the value of the key-value tensor; V is the value of the value tensor; p is the eigenvalue of the reshaped image; zQ is the corresponding weight of the query tensor; zK is the corresponding weight of the key-value tensor; zV is the weight of the value tensor. The TZX layer selection strategy is to select the first u maximum or minimum elements. In this embodiment, the first u maximum elements of the normalized matrix are selected using this strategy. The structure of the CBM layer is as Figure 13 shown, including a Conv layer, a BN layer and a Sigmoid function layer. The effect of using the trained watermark point recognition model to recognize the extracted traditional Chinese medicine decoction pieces image can be seen in Figure 14 , and the boxed part in the figure is the area of the watermark points of the recognized traditional Chinese medicine decoction pieces. It can be seen that using the watermark point recognition model provided in the embodiment of the present invention, the watermark points on the surface of the traditional Chinese medicine decoction pieces can be recognized more comprehensively and meticulously.
[0055] Based on the content of the above method embodiment, as an optional embodiment, in the method for testing the saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content recognition provided in the embodiment of the present invention, obtaining the saturated water absorption rate of the traditional Chinese medicine decoction pieces according to the weight of the traditional Chinese medicine decoction pieces after drying and the saturated water absorption weight of the traditional Chinese medicine decoction pieces includes:
[0056] (3)
[0057] (4)
[0058] Where, is the saturated water absorption rate of the traditional Chinese medicine decoction pieces; is the weight of the filter; is the weight of the traditional Chinese medicine decoction pieces after drying; is the weight of the traditional Chinese medicine decoction pieces after saturated water absorption; is the weight of the traditional Chinese medicine decoction pieces after saturated water absorption plus the weight of the filter.
[0059] Specifically, the test water meets the index requirements of GB17324, the test water temperature is 30 degrees, the same batch of traditional Chinese medicine decoction pieces is used, the weight of the traditional Chinese medicine decoction pieces is 100 g, 1 2000 mL experimental beaker, and 1 stainless steel filter are used. The traditional Chinese medicine decoction pieces with initial water content are dried by the drying method, and the weight is measured every 10 minutes until the weight change amount is within 0.1 g for three consecutive times, and the weight after drying is recorded , the purpose of this step is to remove the initial water content of the traditional Chinese medicine decoction pieces in order to obtain accurate saturated water absorption data. Prepare a stainless steel filter and weigh it to obtain a weight of , the dried Chinese herbal pieces are not placed in a stainless - steel filter. 1 liter of water is added to a beaker. The stainless - steel filter containing the Chinese herbal pieces is placed in the beaker and ultrasonically vibrated multiple times until no bubbles are generated. After 40 minutes, every 5 minutes, the water is extracted and drained for 30 seconds, and the weight is immediately weighed and recorded until the weight change amount is within 0.1 grams for three consecutive times, then the saturated water absorption state is reached, and the weight is obtained. , then the saturated water absorption weight is shown as in formula (4), and the final saturated water absorption rate is shown as in formula (3). The purpose of ultrasonic vibration is to expel the air inside the Chinese herbal pieces and enable the Chinese herbal pieces to be quickly and fully wetted by water.
[0060] The method for testing the saturated water absorption rate of Chinese herbal pieces based on water content recognition provided by the embodiments of the present invention identifies the water - mark points on the Chinese herbal pieces by using the trained water - mark point recognition model, and obtains the weight of the dried Chinese herbal pieces after drying the Chinese herbal pieces; the Chinese herbal pieces are placed on the filter and soaked in water multiple times to obtain the weight after soaking, and the weight of the filter is excluded from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal pieces. Finally, the saturated water absorption rate of the Chinese herbal pieces is obtained accordingly. It can identify the water content of a large number of Chinese herbal pieces without relying on manual experience, and perform corresponding saturated water absorption rate tests on the identified Chinese herbal pieces with water content, improving the accuracy of the saturated water absorption rate test of Chinese herbal pieces.
[0061] The implementation basis of each embodiment of the present invention is achieved through programmed processing by a device with a processor function. Therefore, in engineering practice, the technical solutions and their functions of each embodiment of the present invention can be packaged into various modules. Based on this actual situation, on the basis of the above - mentioned embodiments, the embodiments of the present invention provide a device for testing the saturated water absorption rate of Chinese herbal pieces based on water content recognition, and this device is used to execute the method for testing the saturated water absorption rate of Chinese herbal pieces based on water content recognition in the above - mentioned method embodiments. See Figure 2 , the device includes: a first main module for extracting an image of the Chinese herbal pieces and identifying the image by using the trained water - mark point recognition model; a second main module for drying the Chinese herbal pieces to obtain the weight of the dried Chinese herbal pieces if water - mark points are identified on the Chinese herbal pieces; a third main module for placing the Chinese herbal pieces on the filter and soaking the filter in water in an ultrasonic environment multiple times to obtain the weight after soaking, and excluding the weight of the filter from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal pieces; a fourth main module for obtaining the saturated water absorption rate of the Chinese herbal pieces according to the weight of the dried Chinese herbal pieces and the saturated water absorption weight of the Chinese herbal pieces.
[0062] The device for testing the saturated water absorption rate of Chinese herbal pieces based on water content recognition provided by the embodiments of the present invention adopts Figure 2Among several modules, the watermark points on the Chinese herbal pieces are identified by using a trained watermark point recognition model, and the Chinese herbal pieces are dried to obtain the weight of the dried Chinese herbal pieces; the Chinese herbal pieces are placed on a filter and soaked in water multiple times to obtain the soaked weight, and the weight of the filter is removed from the soaked weight to obtain the saturated water absorption weight of the Chinese herbal pieces. Finally, the saturated water absorption rate of the Chinese herbal pieces is obtained accordingly. It is possible to identify the water content of a large number of Chinese herbal pieces without relying on manual experience, and conduct corresponding saturated water absorption rate tests on the identified Chinese herbal pieces with water content, improving the accuracy of the saturated water absorption rate test of Chinese herbal pieces.
[0063] It should be noted that the device in the device embodiment provided by the present invention can be used not only to implement the method in the above method embodiment, but also to implement the methods in other method embodiments provided by the present invention. The difference lies only in setting corresponding functional modules. Its principle is basically the same as the principle of the above device embodiment provided by the present invention. As long as those skilled in the art, based on the above device embodiment, refer to the specific technical solutions in other method embodiments, obtain corresponding technical means by combining technical features, and the technical solutions composed of these technical means, on the premise of ensuring the practicability of the technical solutions, the device in the above device embodiment can be improved to obtain corresponding device type embodiments for implementing the methods in other method type embodiments. For example:
[0064] Based on the content of the above device embodiment, as an optional embodiment, the device for testing the saturated water absorption rate of Chinese herbal pieces based on water content identification provided in the embodiment of the present invention further includes: a first sub-module for implementing the structure of the watermark point recognition model, including: a first CBS-2 layer connected to the input layer Input and the first CBS-3 layer; a second CBS-2 layer connected to the first CBS-3 layer and the second CBS-3 layer; a first ELAN-1 layer connected to the second CBS-3 layer and the first MP layer; a second ELAN-1 layer connected to the first MP layer and the second MP layer; a third ELAN-1 layer connected to the second MP layer, the third MP layer and the first CBS-1 layer, and the first CBS-1 layer is connected to the first Concat layer; a fourth ELAN-1 layer connected to the third MP layer and the STCBS layer; a second CBS-1 layer connected to the STCBS layer and the UPSample layer, and the UPSample layer is connected to the first Concat layer; a first ELAN-2 layer connected to the first Concat layer and the fourth MP layer; a second ELAN-2 layer connected to the fourth MP layer and the DCZ layer; a REP layer connected to the DCZ layer and the CBM layer, and the CBM layer is connected to the output layer Output.
[0065] Based on the content of the above device embodiments, as an alternative embodiment, the Chinese herbal medicine slice saturated water absorption rate testing device based on water content identification provided in the embodiments of the present invention further includes: a second sub-module for implementing the structures of the first MP layer, the second MP layer, the third MP layer, and the fourth MP layer, including: a first Maxpool layer connected to the third CBS-1 layer and the fourth CBS-1 layer, and the third CBS-1 layer connected to the second Concat layer; a third CBS-3 layer connected to the fourth CBS-1 layer and the second Concat layer.
[0066] Based on the content of the above device embodiments, as an alternative embodiment, the Chinese herbal medicine slice saturated water absorption rate testing device based on water content identification provided in the embodiments of the present invention further includes: a third sub-module for implementing the STCBS layer, including: a fifth CBS-1 layer connected to the sixth CBS-1 layer and the third Concat layer; a third CBS-2 layer connected to the sixth CBS-1 layer and the second Maxpool layer; a fourth CBS-2 layer connected to the second Maxpool layer and the fourth CBS-3 layer, and the fourth CBS-3 layer connected to the third Concat layer.
[0067] Based on the content of the above device embodiments, as an alternative embodiment, the Chinese herbal medicine slice saturated water absorption rate testing device based on water content identification provided in the embodiments of the present invention further includes: a fourth sub-module for implementing the DCZ layer, including: a ZDX layer connected to the Conv layer and the LN layer, which is used to reduce the calculation amount when processing image data exceeding a predetermined quantity threshold; an MLP layer connected to the LN layer and the fourth Concat layer, which is used to transform non-linear features into linear features, and the LN layer is connected to the fourth Concat layer.
[0068] Based on the content of the above device embodiments, as an alternative embodiment, the Chinese herbal medicine slice saturated water absorption rate testing device based on water content identification provided in the embodiments of the present invention further includes: a fifth sub-module for implementing the ZDX layer, including: a CL layer connected to the JL layer, the ZL layer, and the first Multi layer, which is used to obtain a query tensor, and the first Multi layer is used to perform matrix multiplication; a Norm layer connected to the first Multi layer and the TZX layer, which is used to normalize the matrix after multiplication; a TZX layer connected to the second Multi layer, which is used to select feature vectors; a JL layer connected to the CL layer, the first Multi layer, and the ZL layer, which is used to obtain a key-value tensor; a ZL layer connected to the JL layer and the second Multi layer, which is used to obtain a value tensor.
[0069] Based on the content of the above device embodiments, as an alternative embodiment, the Chinese herbal medicine decoction pieces saturation water absorption rate testing device based on water content identification provided in the embodiments of the present invention further includes: a sixth sub-module, configured to implement obtaining the saturation water absorption rate of the Chinese herbal medicine decoction pieces according to the weight of the Chinese herbal medicine decoction pieces after drying and the saturation water absorption weight of the Chinese herbal medicine decoction pieces, including:
[0070] , ,
[0071] wherein, is the saturation water absorption rate of the Chinese herbal medicine decoction pieces; is the weight of the filter; is the weight of the Chinese herbal medicine decoction pieces after drying; is the weight of the Chinese herbal medicine decoction pieces after saturation water absorption; is the weight of the Chinese herbal medicine decoction pieces after saturation water absorption plus the weight of the filter.
[0072] The method of the embodiments of the present invention is implemented relying on an electronic device. Therefore, it is necessary to introduce the relevant electronic device. For this purpose, the embodiments of the present invention provide an electronic device, as shown in Figure 3 . The electronic device includes: at least one processor, a communication interface, at least one memory, and a communication bus. Among them, at least one processor, the communication interface, and at least one memory complete mutual communication through the communication bus. The at least one processor can call the logical instructions in the at least one memory to execute all or part of the steps of the methods provided in the foregoing method embodiments.
[0073] In addition, when the logical instructions in the foregoing at least one memory are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the method embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.
[0075] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0076] The flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of systems, methods, and computer program products according to multiple embodiments of the present invention. Based on this understanding, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0077] It should be noted that the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, elements defined by the statement "comprising..." do not preclude the presence of additional identical elements in the process, method, article or device comprising said elements. For any similar expressions such as "predetermined threshold" or "preset threshold", if no specific value is indicated, a person of ordinary skill in the art can determine its specific value through simple experiments or corresponding debugging.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for testing the saturated water absorption rate of Chinese herbal medicine slices based on water content identification, characterized in that: include: Extracting images of Chinese herbal medicine pieces, and using a trained watermark point recognition model to recognize the images; If a watermark point is identified on the Chinese herbal medicine slice, the Chinese herbal medicine slice is dried to obtain the weight of the dried Chinese herbal medicine slice; the Chinese herbal medicine slice is placed on a filter, and the filter is soaked in water in an ultrasonic environment for multiple times to obtain the weight after soaking, and the weight of the filter is removed from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal medicine slice; According to the weight of the Chinese herbal medicine slices after drying and the saturated water absorption weight of the Chinese herbal medicine slices, the saturated water absorption rate of the Chinese herbal medicine slices is obtained; The structure of the watermark point recognition model includes: a first CBS-2 layer, connected to the input layer Input and the first CBS-3 layer; a second CBS-2 layer, connected to the first CBS-3 layer and the second CBS-3 layer; a first ELAN-1 layer, connected to the second CBS-3 layer and the first MP layer; a second ELAN-1 layer, connected to the first MP layer and the second MP layer; a third ELAN-1 layer, connected to the second MP layer, the third MP layer and the first CBS-1 layer, and the first CBS-1 layer is connected to the first Concat layer; a fourth ELAN-1 layer, connected to the third MP layer and the STCBS layer; the second CBS-1 layer, connected to the STCBS layer and The UPSample layer is connected, and the UPSample layer is connected to the first Concat layer; the first ELAN-2 layer is connected to the first Concat layer and the fourth MP layer; the second ELAN-2 layer is connected to the fourth MP layer and the DCZ layer; the REP layer is connected to the DCZ layer and the CBM layer, and the CBM layer is connected to the output layer Output; the DCZ layer includes: a ZDX layer, connected to the Conv layer and the LN layer, and used to reduce the amount of calculation when processing image data exceeding a predetermined number threshold; an MLP layer, connected to the LN layer and the fourth Concat layer, and used to transform nonlinear features into linear features, and the LN layer is connected to the fourth Concat layer; The STCBS layer includes: a fifth CBS-1 layer connected to a sixth CBS-1 layer and a third Concat layer; a third CBS-2 layer connected to a sixth CBS-1 layer and a second Maxpool layer; a fourth CBS-2 layer connected to a second Maxpool layer and a fourth CBS-3 layer, and a fourth CBS-3 layer connected to a third Concat layer; The ZDX layer includes: a CL layer, connected to the JL layer, the ZL layer and the first Multi layer, for obtaining a query tensor, and the first Multi layer is used for matrix multiplication; a Norm layer, connected to the first Multi layer and the TZX layer, for normalizing the matrix after multiplication; a TZX layer, connected to the second Multi layer, for selecting feature vectors; a JL layer, connected to the CL layer, the first Multi layer and the ZL layer, for obtaining a key value tensor; and a ZL layer, connected to the JL layer and the second Multi layer, for obtaining a value tensor. The TZX layer selects the first u largest elements of the normalized matrix.
2. The method for testing saturated water absorption of Chinese herbal medicine slices based on water content identification according to claim 1, characterized in that: The structures of the first MP layer, the second MP layer, the third MP layer and the fourth MP layer include: a first Maxpool layer, connected to the third CBS-1 layer and the fourth CBS-1 layer, the third CBS-1 layer is connected to the second Concat layer; a third CBS-3 layer, connected to the fourth CBS-1 layer and the second Concat layer.
3. A saturated water absorption rate testing device for Chinese herbal medicine slices based on water content identification, characterized in that: include: The first main module is used to extract the image of the Chinese herbal medicine slices and recognize the image using the trained watermark point recognition model; The second main module is used to realize that if the watermark point is identified on the Chinese herbal medicine slice, the Chinese herbal medicine slice is dried to obtain the weight of the dried Chinese herbal medicine slice; the third main module is used to realize that the Chinese herbal medicine slice is placed on the filter, and the filter is immersed in water in an ultrasonic environment for multiple times to obtain the weight after immersion, and the weight of the filter is removed from the weight after immersion to obtain the saturated water absorption weight of the Chinese herbal medicine slice; the fourth main module is used to realize the saturated water absorption rate of the Chinese herbal medicine slice according to the weight of the dried Chinese herbal medicine slice and the saturated water absorption weight of the Chinese herbal medicine slice; The structure of the watermark point recognition model includes: a first CBS-2 layer, connected to the input layer Input and the first CBS-3 layer; a second CBS-2 layer, connected to the first CBS-3 layer and the second CBS-3 layer; a first ELAN-1 layer, connected to the second CBS-3 layer and the first MP layer; a second ELAN-1 layer, connected to the first MP layer and the second MP layer; a third ELAN-1 layer, connected to the second MP layer, the third MP layer and the first CBS-1 layer, and the first CBS-1 layer is connected to the first Concat layer; a fourth ELAN-1 layer, connected to the third MP layer and the STCBS layer; the second CBS-1 layer, connected to the STCBS layer and The UPSample layer is connected, and the UPSample layer is connected to the first Concat layer; the first ELAN-2 layer is connected to the first Concat layer and the fourth MP layer; the second ELAN-2 layer is connected to the fourth MP layer and the DCZ layer; the REP layer is connected to the DCZ layer and the CBM layer, and the CBM layer is connected to the output layer Output; the DCZ layer includes: a ZDX layer, connected to the Conv layer and the LN layer, and used to reduce the amount of calculation when processing image data exceeding a predetermined number threshold; an MLP layer, connected to the LN layer and the fourth Concat layer, and used to transform nonlinear features into linear features, and the LN layer is connected to the fourth Concat layer; The STCBS layer includes: a fifth CBS-1 layer connected to a sixth CBS-1 layer and a third Concat layer; a third CBS-2 layer connected to a sixth CBS-1 layer and a second Maxpool layer; a fourth CBS-2 layer connected to a second Maxpool layer and a fourth CBS-3 layer, and a fourth CBS-3 layer connected to a third Concat layer; The ZDX layer includes: a CL layer, connected to the JL layer, the ZL layer and the first Multi layer, for obtaining a query tensor, and the first Multi layer is used for matrix multiplication; a Norm layer, connected to the first Multi layer and the TZX layer, for normalizing the matrix after multiplication; a TZX layer, connected to the second Multi layer, for selecting feature vectors; a JL layer, connected to the CL layer, the first Multi layer and the ZL layer, for obtaining a key value tensor; and a ZL layer, connected to the JL layer and the second Multi layer, for obtaining a value tensor. The TZX layer selects the first u largest elements of the normalized matrix.
4. An electronic device, characterized in that: include: At least one processor, at least one memory and a communication interface; wherein, The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 2.
5. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause a computer to execute the method of any one of claims 1 to 2.
Citation Information
Patent Citations
Litter water absorbing and water releasing characteristic test system and test method thereof
CN108827816A
Device and method for automatically measuring apparent density of sandstone
CN116593346A
Silicon wafer drying improvement method and device based on D-LKA network model
CN117781661A
Leukocyte classification method based on improved YOLOv7
CN118537853A