Method and equipment for testing saturated water absorption rate of traditional Chinese medicine decoction pieces based on water content identification
Through the trained watermark point recognition model and ultrasonic immersion technology, the accuracy of the initial water content recognition and saturation water absorption test of Chinese herbal medicines was solved, and efficient and accurate water content recognition and saturation water absorption measurement of Chinese herbal medicines were achieved.
Patent Information
- Application Number
- CN202411390559.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-11-05
- 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 testing errors, especially Chinese herbal medicines with low initial water content, which are difficult to accurately identify.
Using a test method based on water content recognition, the image of Chinese herbal medicine is extracted through the trained watermark dot recognition model, the watermark dots are identified and dried. Combined with ultrasonic immersion technology, the saturation water absorption rate is calculated, and the filter weight is removed to obtain accurate saturation. Water absorption.
It improves the accuracy of saturation water absorption test of Chinese herbal medicines, and can conduct water content identification and saturation water absorption test on a large number of Chinese herbal medicines without relying on manual experience, reducing the identification cost and time and improving reliability.
Smart Images

Figure CN118896874A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of Chinese herbal medicine slice material analysis, and in particular to a method and device for testing the saturated water absorption rate of Chinese herbal medicine slices based on water content identification. Background Art
[0002] Decoction of Chinese herbal medicine slices is one of the important links in the preparation process of Chinese medicine. Some Chinese herbal medicine slices need to be soaked before decoction. The soaking time usually determines the efficiency of Chinese herbal medicine decoction. In order to make Chinese herbal medicine slices better exert their efficacy through soaking, it is necessary to combine the characteristics of different Chinese herbal medicine slices to detect the saturated water absorption rate of Chinese herbal medicine slices. The current saturated water absorption rate detection soaking method is to completely immerse the sample in water, ensure that the sample is completely covered with water, take out the sample within a specified time interval and gently wipe the excess water on the surface with absorbent paper or soft cloth, and then weigh the sample immediately, and repeat the above steps until the water absorption of the sample no longer increases significantly, that is, it reaches a saturated state. However, this method does not take into account the initial water content of the sample. Due to the low initial water content of some Chinese herbal medicine slices, it is difficult to observe the watermark points on the surface with the naked eye, so that they are misjudged as dry Chinese herbal medicine slices. If the initial water content is not considered, test errors will occur. Therefore, developing a saturated water absorption rate test method and equipment for Chinese herbal medicine slices based on water content recognition can effectively overcome the defects in the above-mentioned related technologies, which has become a technical problem that needs to be solved urgently 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 Chinese herbal medicine pieces based on water content identification.
[0004] In the first aspect, an embodiment of the present invention provides a method for testing the saturated water absorption rate of Chinese herbal medicine pieces based on water content identification, comprising: extracting an image of the Chinese herbal medicine piece, and using a trained watermark point recognition model to identify the image; if it is identified that the Chinese herbal medicine piece has a watermark point, drying the Chinese herbal medicine piece to obtain the weight of the dried Chinese herbal medicine piece; placing the Chinese herbal medicine piece on a filter, and soaking the filter in water in an ultrasonic environment for 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 Chinese herbal medicine piece; obtaining the saturated water absorption rate of the Chinese herbal medicine piece based on the weight of the dried Chinese herbal medicine piece and the saturated water absorption weight of the Chinese herbal medicine piece.
[0005] Based on the content of the above method embodiment, the saturated water absorption rate testing method of Chinese herbal medicine slices based on water content recognition 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, the first CBS-1 layer is connected to the first Concat layer; the fourth ELAN-1 layer is connected to the third MP layer and the STCBS layer; the second CBS-1 layer is connected to the STCBS layer and the UPSample layer, 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.
[0006] Based on the contents of the above method embodiments, the saturated water absorption rate testing method of Chinese herbal medicine 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, the third CBS-1 layer is connected to the second Concat layer; the third CBS-3 layer, connected to the fourth CBS-1 layer and the second Concat layer.
[0007] On the basis of the contents of the above method embodiments, a method for testing saturated water absorption of Chinese herbal medicine pieces based on water content identification is provided in an embodiment of the present invention, wherein the STCBS layer comprises: 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 contents of the above method embodiments, a method for testing the saturated water absorption rate of Chinese herbal medicine pieces based on water content identification is provided in an embodiment of the present invention, wherein the DCZ layer comprises: a ZDX layer connected to the Conv layer and the LN layer, for reducing 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, for transforming nonlinear features into linear features, and the LN layer is connected to the fourth Concat layer.
[0009] Based on the content of the above method embodiment, the saturated water absorption rate testing method of Chinese herbal medicine pieces based on water content identification provided in the embodiment 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 the 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 the key value tensor; and a ZL layer, connected to the JL layer and the second Multi layer, for obtaining the value tensor.
[0010] Based on the content of the above method embodiment, the saturated water absorption rate test method of Chinese herbal medicine pieces based on water content identification provided in the embodiment of the present invention, the saturated water absorption rate of the Chinese herbal medicine pieces is obtained according to the weight of the Chinese herbal medicine pieces after drying and the saturated water absorption weight of the Chinese herbal medicine pieces, including: , , in, is the saturated water absorption rate of Chinese herbal medicine pieces; is the filter weight; It is the weight of the Chinese herbal medicine pieces after drying; It is the weight of the Chinese herbal medicine slices after saturation with water; The weight of the filter added after the Chinese herbal medicine pieces are saturated with water.
[0011] In the second aspect, an embodiment of the present invention provides a saturated water absorption rate testing device for Chinese herbal medicine pieces based on water content identification, comprising: a first main module, used to extract images of Chinese herbal medicine pieces, and use a trained watermark point recognition model to identify the image; a second main module, used to dry the Chinese herbal medicine pieces to obtain the weight of the dried Chinese herbal medicine pieces if watermark points are identified on the Chinese herbal medicine pieces; a third main module, used to place the Chinese herbal medicine pieces on a filter, and soak the filter in water in an ultrasonic environment for multiple times to obtain the weight after soaking, and remove the weight of the filter from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal medicine pieces; a fourth main module, used to obtain the saturated water absorption rate of the Chinese herbal medicine pieces based on the weight of the dried Chinese herbal medicine pieces and the saturated water absorption weight of the Chinese herbal medicine pieces.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including: 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 saturated water absorption rate testing method of Chinese herbal medicine pieces based on water content identification provided by any one of the various implementation methods of the first aspect.
[0013] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute a saturated water absorption rate testing method for Chinese herbal medicine pieces based on water content identification provided by any one of the various implementation methods of the first aspect.
[0014] The method and device for testing the saturated water absorption rate of Chinese herbal medicine slices based on water content identification provided by the embodiment of the present invention use a trained watermark point identification model to identify watermark points on the Chinese herbal medicine slices, dry the Chinese herbal medicine slices to obtain the weight of the dried Chinese herbal medicine slices; place the Chinese herbal medicine slices on a filter and soak them in water for multiple times to obtain the weight after soaking, remove the filter weight from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal medicine slices, and finally obtain the saturated water absorption rate of the Chinese herbal medicine slices based on this. The water content of a large number of Chinese herbal medicine slices can be identified without relying on manual experience, and the corresponding saturated water absorption rate test can be performed on the Chinese herbal medicine slices identified to have water content, thereby improving the accuracy of the saturated water absorption rate test of the Chinese herbal medicine slices. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 A schematic flow chart of a method for testing saturated water absorption rate of Chinese herbal medicine pieces based on water content identification provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a saturated water absorption rate testing device for Chinese herbal medicine pieces based on water content identification provided by an embodiment of the present invention; Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention; Figure 4 A schematic diagram of the network structure of a watermark point recognition model provided by an embodiment of the present invention; Figure 5 A schematic diagram of the CBS layer network structure provided by an embodiment of the present invention; Figure 6 A schematic diagram of the ELAN-1 network structure provided in an embodiment of the present invention; Figure 7 A schematic diagram of the ELAN-2 network structure provided by an embodiment of the present invention; Figure 8 A schematic diagram of the MP layer network structure provided by an embodiment of the present invention; Fig. 9 A schematic diagram of the STCBS layer network structure provided by an embodiment of the present invention; Fig.10 A schematic diagram of the REP layer network structure provided by an embodiment of the present invention; Fig.11 A schematic diagram of the DCZ layer network structure provided by an embodiment of the present invention; Fig.12 A schematic diagram of the ZDX layer network structure provided by an embodiment of the present invention; Fig.13 A schematic diagram of a CBM layer network structure provided in an embodiment of the present invention; Fig.14 A schematic diagram of the effect of the watermark point recognition model provided in an embodiment of the present invention on identifying the extracted Chinese herbal medicine pieces image. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical scheme and advantages of the embodiment of the present invention clearer, the technical scheme in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be combined with each other arbitrarily to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in the field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that the combination of such technical solutions does not exist and is not within the scope of protection required by the present invention. If there are step numbers in the following embodiments, they are only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0018] The embodiment of the present invention provides a method for testing the saturated water absorption rate of Chinese herbal medicine pieces based on water content identification, see Figure 1The method comprises: extracting an image of a Chinese herbal medicine piece, and using a trained watermark point recognition model to recognize the image; if a watermark point is recognized on the Chinese herbal medicine piece, drying the Chinese herbal medicine piece to obtain the weight of the dried Chinese herbal medicine piece; placing the Chinese herbal medicine piece on a filter, and soaking the filter in water in an ultrasonic environment for 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 Chinese herbal medicine piece; and obtaining the saturated water absorption rate of the Chinese herbal medicine piece according to the weight of the dried Chinese herbal medicine piece and the saturated water absorption weight of the Chinese herbal medicine piece.
[0019] It should be noted that all CBS mentioned in the specification are convolutional layers plus batch normalization layers plus Silu activation function layers; 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 their specific structures are provided in subsequent embodiments; the UPSample layer is an upsampling layer; the REP layer is a time series prediction layer; and the MP layer is a fully connected layer.
[0020] See also Figure 4 Based on the content of the above method embodiment, as an optional embodiment, the saturated water absorption rate testing method of Chinese herbal medicine slices based on water content recognition 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 is connected to the first CBS-1 layer, and the first CBS-1 layer is connected to the first Concat layer; the fourth ELAN-1 layer is connected to the third MP layer and the STCBS layer; the second CBS-1 layer is connected to the STCBS layer and the UPSample layer, 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.
[0021] It should be noted that a large number of Chinese herbal medicine slices are required for large-scale production of Chinese herbal preparations. Therefore, if the dried Chinese herbal medicine slices are screened only by manual experience, it will not only be time-consuming and labor-intensive, but also have low reliability. The computing power of the traditional recognition model is also difficult to cope with such large-scale calculations. Therefore, by using the watermark point recognition model designed in the embodiment of the present invention, the initial water content of a large number of Chinese herbal medicine slices can be identified more accurately, reducing the economic cost of identification and improving the reliability of identification.
[0022] The structures of various CBS layers can be found in Figure 5 , which is composed of a Conv layer (convolutional layer, the same below), a BN layer and a SiLU layer. The BN layer is used to perform batch normalization on the data. Its expression is as follows: (1) in, is the normalized and scaled output; 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 used for numerical stability.
[0023] The expression of the SiLU layer is as follows: (2) Among them, c is the input; exp is the exponential function.
[0024] The characteristic of 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 processing small input values. All Concat layers in various embodiments of the present invention are fusion layers, which merge and superimpose channels of the same size but inconsistent parameters. The structures of all CBS-1, CBS-2 and CBS-3 are as follows Figure 5 The only difference is that the volume base of CBS-1 is 1*1 , step length 1; CBS-2 volume base is 3* 3, step size is 1; the volume base of CBS-3 is 3* 3, with a step size of 2.
[0025] The various ELAN-1 layers can be found at Figure 6 , which consists of two CBS-1 layers, four CBS-2 layers, and one Concat layer. The various ELAN-2 layers can be found in Figure 7 , also consists of two CBS-1 layers, four CBS-2 layers and one Concat layer. The difference between the ELAN-1 layer and the ELAN-2 layer is only the number of CBS-2 merged 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, which is used to merge and superimpose channels of the same size but inconsistent parameters.
[0026] See also Figure 8Based on the content of the above method embodiment, as an optional embodiment, the saturated water absorption rate testing method of Chinese herbal medicine pieces based on water content identification provided in the embodiment of the present invention, the structure of the first MP layer, the second MP layer, the third MP layer and the fourth MP layer includes: 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; the third CBS-3 layer, connected to the fourth CBS-1 layer and the second Concat layer.
[0027] Specifically, the MP module has two branches for downsampling. The first branch first passes through the first Maxpool layer, which is the maximum pooling layer. The function of this maximum pooling is 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 for downsampling. Finally, the results of the first and second branches are added together to obtain the super downsampling result.
[0028] See also Fig. 9 Based on the content of the above method embodiment, as an optional embodiment, the saturated water absorption rate testing method of Chinese herbal medicine pieces based on water content identification provided in the embodiment 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.
[0029] Specifically, the role of the second Maxpool layer of the lower branch and the CBS-1 layer and CBS-2 layer in front of it is to enhance the receptive field of small targets, so that the algorithm can adapt to the predetermined threshold resolution image (smaller resolution). For example, the scales of the Chinese herbal medicine pieces in an image and the watermark points on their surface are different. Through the second Maxpool layer, small targets and large targets can be better distinguished. The upper branch performs conventional processing, and the remaining part of the lower branch processes the small resolution targets identified by the second Maxpool layer (such as watermark points). Finally, the two parts are merged together. This can reduce the amount of calculation by half, making the calculation speed faster and improving the recognition granularity and accuracy. The structure of the REP layer can be seen in Fig.10 , consisting of a 3*3Conv layer and a BN layer.
[0030] See also Fig.11Based on the content of the above method embodiment, as an optional embodiment, the saturated water absorption rate test method of Chinese herbal medicine slices based on water content recognition provided in the embodiment of the present invention, the DCZ layer includes: a ZDX layer, connected to the Conv layer and the LN layer, 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, used to transform nonlinear 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 amount of calculation. The LN layer is a regularization layer used to stabilize the training process. The MLP layer is a multi-layer perceptron used for nonlinear feature transformation.
[0031] See also Fig.12 Based on the content of the above method embodiment, as an optional embodiment, the saturated water absorption rate testing method of Chinese herbal medicine slices based on water content identification provided in the embodiment 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 the 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 the key value tensor; and a ZL layer, connected to the JL layer and the second Multi layer, for obtaining the value tensor.
[0032] 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 largest or smallest elements. In this embodiment, this strategy is used to select the first u largest elements of the normalized matrix. The structure of the CBM layer is as follows Fig.13 As shown in Figure 1, it includes 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 Chinese herbal medicine pieces can be seen in Fig.14 The boxed part in the figure is the area of the watermark points of the identified Chinese herbal medicine slices. It can be seen that the watermark point recognition model provided by the embodiment of the present invention can be used to more comprehensively and meticulously recognize the watermark points on the surface of the Chinese herbal medicine slices.
[0033] Based on the content of the above method embodiment, as an optional embodiment, the method for testing the saturated water absorption rate of Chinese herbal medicine slices based on water content identification provided in the embodiment of the present invention, wherein the saturated water absorption rate of the Chinese herbal medicine slices is obtained according to the weight of the Chinese herbal medicine slices after drying and the saturated water absorption weight of the Chinese herbal medicine slices, comprises: (3) (4) in, is the saturated water absorption rate of Chinese herbal medicine pieces; is the filter weight; It is the weight of the Chinese herbal medicine pieces after drying; It is the weight of the Chinese herbal medicine slices after saturation with water; The weight of the filter added after the Chinese herbal medicine pieces are saturated with water.
[0034] Specifically, the test water meets the index requirements of GB17324, the test water temperature is 30 degrees, the same batch of Chinese herbal medicine pieces are used, the weight of the Chinese herbal medicine pieces is 100g, 1 2000mL experimental beaker, and 1 stainless steel filter. The Chinese herbal medicine pieces with initial water content are dried by the drying method, and the weight is measured every 10 minutes until the weight change is within 0.1g 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 Chinese herbal medicine slices in order to obtain accurate saturated water absorption data. Prepare a stainless steel filter and weigh it to obtain a weight of , put the dried Chinese medicine pieces into the stainless steel filter, add 1 liter of water into the beaker, put the stainless steel filter with the Chinese medicine pieces into the beaker and vibrate ultrasonically for several times until no bubbles are generated. After 40 minutes, extract and drain water for 30 seconds every 5 minutes, weigh and record the weight immediately, until the weight change is within 0.1 gram for three consecutive times, it reaches the saturated water absorption state, and the weight is obtained. , then the saturated water absorption weight is shown in formula (4), and the final saturated water absorption rate is shown in formula (3). The purpose of ultrasonic vibration is to expel the air inside the Chinese herbal medicine slices so that the Chinese herbal medicine slices can be quickly and fully infiltrated with water.
[0035] The method for testing the saturated water absorption rate of Chinese herbal medicine slices based on water content identification provided by the embodiment of the present invention uses a trained watermark point identification model to identify watermark points on the Chinese herbal medicine slices, dries the Chinese herbal medicine slices to obtain the weight of the dried Chinese herbal medicine slices; places the Chinese herbal medicine slices on a filter and soaks them in water for multiple times to obtain the weight after soaking, removes the weight of the filter from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal medicine slices, and finally obtains the saturated water absorption rate of the Chinese herbal medicine slices based on this. The water content of a large number of Chinese herbal medicine slices can be identified without relying on manual experience, and the corresponding saturated water absorption rate test can be performed on the Chinese herbal medicine slices identified to have water content, thereby improving the accuracy of the saturated water absorption rate test of the Chinese herbal medicine slices.
[0036] The implementation basis of each embodiment of the present invention is to implement programmed processing through a device with a processor function. Therefore, in engineering practice, the technical solutions and functions of each embodiment of the present invention can be encapsulated into various modules. Based on this reality, on the basis of the above embodiments, the embodiment of the present invention provides a saturated water absorption rate testing device for Chinese herbal medicine slices based on water content identification, which is used to execute the saturated water absorption rate testing method for Chinese herbal medicine slices based on water content identification in the above method embodiment. Figure 2 The device includes: a first main module, which is used to extract the image of the Chinese herbal medicine slices and use a trained watermark point recognition model to recognize the image; a second main module, which is used to dry the Chinese herbal medicine slices to obtain the weight of the dried Chinese herbal medicine slices if watermark points are recognized on the Chinese herbal medicine slices; a third main module, which is used to place the Chinese herbal medicine slices on a filter and soak the filter in water in an ultrasonic environment for multiple times to obtain the weight after soaking, and remove the weight of the filter from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal medicine slices; a fourth main module, which is used to obtain the saturated water absorption rate of the Chinese herbal medicine slices according to the weight of the dried Chinese herbal medicine slices and the saturated water absorption weight of the Chinese herbal medicine slices.
[0037] The saturated water absorption rate testing device of Chinese herbal medicine slices based on water content recognition provided by the embodiment of the present invention adopts Figure 2 The invention relates to several modules in the invention, which recognizes the watermark points on the Chinese herbal medicine slices by using the trained watermark point recognition model, dries the Chinese herbal medicine slices to obtain the weight of the dried Chinese herbal medicine slices; places the Chinese herbal medicine slices on the filter and soaks them in water for multiple times to obtain the weight after soaking, removes the weight of the filter from the weight after soaking to obtain the saturated water absorption weight of the Chinese herbal medicine slices, and finally obtains the saturated water absorption rate of the Chinese herbal medicine slices. The invention can identify the water content of a large number of Chinese herbal medicine slices without relying on manual experience, and perform corresponding saturated water absorption rate tests on the Chinese herbal medicine slices with water content, thereby improving the accuracy of the saturated water absorption rate test of the Chinese herbal medicine slices.
[0038] It should be noted that the device in the device embodiment provided by the present invention can be used to implement the method in the above method embodiment as well as the method in other method embodiments provided by the present invention. The only difference is that the corresponding functional modules are set, and the principle is basically the same as the principle of the above device embodiment provided by the present invention. As long as the technical personnel in the field refer to the specific technical solutions in other method embodiments on the basis of the above device embodiment, obtain the corresponding technical means and the technical solutions composed of these technical means by combining technical features, the device in the above device embodiment can be improved on the premise of ensuring the practicality of the technical solution, thereby obtaining the corresponding device class embodiment, which is used to implement the methods in other method class embodiments. For example: Based on the content of the above device embodiment, as an optional embodiment, the saturated water absorption rate testing device of Chinese herbal medicine slices based on water content recognition provided in the embodiment of the present invention also includes: a first submodule, which is used to implement 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, It is 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; the fourth ELAN-1 layer is connected to the third MP layer and the STCBS layer; the second CBS-1 layer is connected to the STCBS layer and the UPSample layer, 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.
[0039] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the Chinese herbal medicine saturated water absorption rate testing device based on water content identification provided in the embodiment of the present invention also includes: a second sub-module, used to realize the structure 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, the third CBS-1 layer is connected to the second Concat layer; the third CBS-3 layer, connected to the fourth CBS-1 layer and the second Concat layer.
[0040] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the saturated water absorption rate testing device of Chinese herbal medicine pieces based on water content identification provided in the embodiment of the present invention also includes: a third submodule, used to implement 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 is connected to the third Concat layer.
[0041] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the Chinese herbal medicine saturated water absorption rate testing device based on water content recognition provided in the embodiment of the present invention also includes: a fourth submodule, used to implement the DCZ layer, including: a ZDX layer, connected to the Conv layer and the LN layer, 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, used to transform nonlinear features into linear features, and the LN layer is connected to the fourth Concat layer.
[0042] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the saturated water absorption rate testing device of Chinese herbal medicine slices based on water content identification provided in the embodiment of the present invention also includes: a fifth submodule, used to implement the ZDX layer, including: a CL layer, connected to the JL layer, the ZL layer and the first Multi layer, used to obtain the query tensor, the first Multi layer is used to perform matrix multiplication; a Norm layer, connected to the first Multi layer and the TZX layer, used to normalize the matrix after multiplication; a TZX layer, connected to the second Multi layer, used to select feature vectors; a JL layer, connected to the CL layer, the first Multi layer and the ZL layer, used to obtain a key value tensor; a ZL layer, connected to the JL layer and the second Multi layer, used to obtain a value tensor.
[0043] Based on the content of the above device embodiment, as an optional embodiment, the Chinese herbal medicine slice saturated water absorption rate testing device based on water content identification provided in the embodiment of the present invention further includes: a sixth submodule, which is used to obtain the saturated water absorption rate of the Chinese herbal medicine slice according to the weight of the Chinese herbal medicine slice after drying and the saturated water absorption weight of the Chinese herbal medicine slice, including: , , in, is the saturated water absorption rate of Chinese herbal medicine pieces; is the filter weight; It is the weight of the Chinese herbal medicine pieces after drying; It is the weight of the Chinese herbal medicine slices after saturation with water; The weight of the filter added after the Chinese herbal medicine pieces are saturated with water.
[0044] The method of the embodiment of the present invention is implemented by relying on electronic devices, so it is necessary to introduce the relevant electronic devices. Based on this purpose, the embodiment of the present invention provides an electronic device, such as Figure 3 As shown, the electronic device includes: at least one processor, a communication interface, at least one memory, and a communication bus, wherein at least one processor, the communication interface, and at least one memory communicate with each other through the communication bus. At least one processor can call the logic instructions in at least one memory to execute all or part of the steps of the method provided by the aforementioned various method embodiments.
[0045] In addition, the logic instructions in the at least one memory mentioned above can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each method embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0046] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0047] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0048] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. Based on this understanding, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and sometimes in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0049] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. Any "predetermined threshold", "preset threshold" and other similar expressions that do not indicate specific values can be determined by a person of ordinary skill in the art through simple experiments or corresponding debugging.
[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present 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 watermarks are identified on the Chinese herbal medicine slices, the Chinese herbal medicine slices are dried to obtain the weight of the dried Chinese herbal medicine slices; the Chinese herbal medicine slices are 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 slices; the saturated water absorption rate of the Chinese herbal medicine slices is obtained based on the weight of the dried Chinese herbal medicine slices and the saturated water absorption weight of the Chinese herbal medicine slices.
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 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, 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.
3. The method for testing saturated water absorption of Chinese herbal medicine slices based on water content identification according to claim 2, 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.
4. The method for testing saturated water absorption of Chinese herbal medicine slices based on water content identification according to claim 3, characterized in that: 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 connected to the third Concat layer.
5. The method for testing saturated water absorption of Chinese herbal medicine slices based on water content identification according to claim 4, characterized in that: The DCZ layer includes: a ZDX layer connected to the Conv layer and the LN layer, 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, used to transform nonlinear features into linear features, and the LN layer is connected to the fourth Concat layer.
6. The method for testing saturated water absorption of Chinese herbal medicine slices based on water content identification according to claim 5, characterized in that: 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.
7. The method for testing saturated water absorption of Chinese herbal medicine slices based on water content identification according to claim 6, characterized in that: The method of obtaining the saturated water absorption rate of the Chinese herbal medicine slices according to the weight of the dried Chinese herbal medicine slices and the saturated water absorption weight of the Chinese herbal medicine slices comprises: , , in, is the saturated water absorption rate of Chinese herbal medicine pieces; is the filter weight; It is the weight of the Chinese herbal medicine pieces after drying; It is the weight of the Chinese herbal medicine slices after saturation with water; The weight of the filter added after the Chinese herbal medicine pieces are saturated with water.
8. A saturated water absorption rate testing device for Chinese herbal medicine pieces 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 watermark points are identified on the Chinese herbal medicine slices, the Chinese herbal medicine slices are dried to obtain the weight of the dried Chinese herbal medicine slices; the third main module is used to realize that the Chinese herbal medicine slices are placed on the 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 slices; the fourth main module is used to realize that the saturated water absorption rate of the Chinese herbal medicine slices is obtained according to the weight of the Chinese herbal medicine slices after drying and the saturated water absorption weight of the Chinese herbal medicine slices.
9. 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 7.
10. 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 7.
Citation Information
Patent Citations
Method for detecting quality of traditional Chinese medicine decoction by means of relative density
CN106408129A
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
Cultivated land protection early warning method and device based on deep learning
CN116895036A
Silicon wafer drying improvement method and device based on D-LKA network model
CN117781661A
