CN116310565A - Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination - Google Patents

Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination Download PDF

Info

Publication number
CN116310565A
CN116310565A CN202310288136.6A CN202310288136A CN116310565A CN 116310565 A CN116310565 A CN 116310565A CN 202310288136 A CN202310288136 A CN 202310288136A CN 116310565 A CN116310565 A CN 116310565A
Authority
CN
China
Prior art keywords
surface state
scale
training
feature vector
time sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310288136.6A
Other languages
Chinese (zh)
Inventor
莫琼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Zhongxiang Health Industry Co ltd
Original Assignee
Jiangxi Zhongxiang Health Industry Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Zhongxiang Health Industry Co ltd filed Critical Jiangxi Zhongxiang Health Industry Co ltd
Priority to CN202310288136.6A priority Critical patent/CN116310565A/en
Publication of CN116310565A publication Critical patent/CN116310565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61JCONTAINERS SPECIALLY ADAPTED FOR MEDICAL OR PHARMACEUTICAL PURPOSES; DEVICES OR METHODS SPECIALLY ADAPTED FOR BRINGING PHARMACEUTICAL PRODUCTS INTO PARTICULAR PHYSICAL OR ADMINISTERING FORMS; DEVICES FOR ADMINISTERING FOOD OR MEDICINES ORALLY; BABY COMFORTERS; DEVICES FOR RECEIVING SPITTLE
    • A61J3/00Devices or methods specially adapted for bringing pharmaceutical products into particular physical or administering forms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K35/00Medicinal preparations containing materials or reaction products thereof with undetermined constitution
    • A61K35/56Materials from animals other than mammals
    • A61K35/63Arthropods
    • A61K35/64Insects, e.g. bees, wasps or fleas
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/24Apocynaceae (Dogbane family), e.g. plumeria or periwinkle
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/25Araliaceae (Ginseng family), e.g. ivy, aralia, schefflera or tetrapanax
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/36Caryophyllaceae (Pink family), e.g. babysbreath or soapwort
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/42Cucurbitaceae (Cucumber family)
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/48Fabaceae or Leguminosae (Pea or Legume family); Caesalpiniaceae; Mimosaceae; Papilionaceae
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/70Polygonaceae (Buckwheat family), e.g. spineflower or dock
    • A61K36/704Polygonum, e.g. knotweed
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/185Magnoliopsida (dicotyledons)
    • A61K36/75Rutaceae (Rue family)
    • A61K36/758Zanthoxylum, e.g. pricklyash
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/88Liliopsida (monocotyledons)
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/88Liliopsida (monocotyledons)
    • A61K36/889Arecaceae, Palmae or Palmaceae (Palm family), e.g. date or coconut palm or palmetto
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K36/00Medicinal preparations of undetermined constitution containing material from algae, lichens, fungi or plants, or derivatives thereof, e.g. traditional herbal medicines
    • A61K36/18Magnoliophyta (angiosperms)
    • A61K36/88Liliopsida (monocotyledons)
    • A61K36/899Poaceae or Gramineae (Grass family), e.g. bamboo, corn or sugar cane
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61PSPECIFIC THERAPEUTIC ACTIVITY OF CHEMICAL COMPOUNDS OR MEDICINAL PREPARATIONS
    • A61P13/00Drugs for disorders of the urinary system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Health & Medical Sciences (AREA)
  • Natural Medicines & Medicinal Plants (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Medicinal Chemistry (AREA)
  • Medical Informatics (AREA)
  • Veterinary Medicine (AREA)
  • Animal Behavior & Ethology (AREA)
  • Chemical & Material Sciences (AREA)
  • Pharmacology & Pharmacy (AREA)
  • Epidemiology (AREA)
  • Biotechnology (AREA)
  • Mycology (AREA)
  • Alternative & Traditional Medicine (AREA)
  • Microbiology (AREA)
  • Botany (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Insects & Arthropods (AREA)
  • Zoology (AREA)
  • Organic Chemistry (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • General Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Urology & Nephrology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Animal Husbandry (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)

Abstract

A method and a device for preparing traditional Chinese medicine for frequent urination and urgent urination acquire a surface state monitoring video of a liquid medicine decocted by slow fire, which is acquired by a camera; by adopting an artificial intelligence technology based on deep learning, the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire is mined, so that the real-time control of the slow fire decoction is performed. Thus, the preparation process of the traditional Chinese medicine for frequent urination and urgent urination can be optimized, and the efficacy of the traditional Chinese medicine is ensured.

Description

Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination
Technical Field
The application relates to the technical field of intelligent manufacturing, and in particular relates to a method and a device for manufacturing traditional Chinese medicines for frequent urination and urgent urination.
Background
Along with the development of society, people inevitably cause various inflammations in life and work and urinary systems, and simultaneously along with the increase of age, various physiological functions of human bodies begin to decay and lose balance, so that the middle-aged and elderly people have frequent urination and urgent urination, and the middle-aged and elderly people have frequent getting up at night, so that sleep deficiency, cold caused by cold and influence on self and family rest are caused. At present, sedative hypnotics, anxiolytics or antidepressants are generally adopted to treat frequent urination and urgent urination type insomnia. However, the existing sedative drug treatment can produce more side effects, treat the symptoms but not the root cause, and hardly radically treat frequent urination and urgent urination type insomnia of middle-aged and elderly people.
Aiming at the problems, chinese patent CN102784318B discloses a preparation method of a traditional Chinese medicine for treating frequent urination and urgent urination type insomnia, which is characterized in that mole cricket, areca peel, oleander, chinese waxgourd peel, red bean, zanthoxylum bungeanum Maxim, corn silk, calabash, dayflower, polygonum aviculare, fringed pink, akebia stem, medulla Tetrapanacis and medulla Junci are decocted to prepare the traditional Chinese medicine for treating frequent urination and urgent urination type insomnia, so that the prepared traditional Chinese medicine has small toxic and side effects, short treatment course and high cure rate, and adverse reactions caused by western medicines can be avoided.
However, in the actual decocting process of the medicinal materials with slow fire, the traditional control of the decocting time is performed manually based on experience, which not only requires professional people to perform the decocting with slow fire and wastes a great deal of time and energy, but also causes difficulty in controlling the decocting time due to different decocting times of different medicinal materials, so that the medicinal effect cannot be fully exerted.
Therefore, an optimized traditional Chinese medicine preparation scheme for frequent urination and urgent urination is expected.
Disclosure of Invention
The present application has been made in order to solve the above technical problems. The embodiment of the application provides a method and a device for preparing traditional Chinese medicine for frequent urination and urgent urination, which are used for acquiring a surface state monitoring video of a liquid medicine decocted by slow fire, acquired by a camera; by adopting an artificial intelligence technology based on deep learning, the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire is mined, so that the real-time control of the slow fire decoction is performed. Thus, the preparation process of the traditional Chinese medicine for frequent urination and urgent urination can be optimized, and the efficacy of the traditional Chinese medicine is ensured.
In a first aspect, a device for preparing a traditional Chinese medicine for frequent urination and urgent urination is provided, which comprises:
the monitoring video acquisition module is used for acquiring a surface state monitoring video of the liquid medicine decocted by slow fire, which is acquired by the camera;
the surface state key frame extraction module is used for extracting a plurality of surface state monitoring key frames from the surface state monitoring video;
the surface state semantic feature extraction module is used for obtaining a plurality of surface state semantic feature vectors through a ViT model containing an image block embedding layer for the plurality of surface state monitoring key frames respectively;
a first scale surface state timing correlation module for passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing correlation feature vector;
the second scale surface state time sequence association module is used for obtaining a second scale surface state time sequence association feature vector through the multi-scale neighborhood feature extraction module after the plurality of surface state semantic feature vectors are arranged into one-dimensional feature vectors;
the multi-scale surface state time sequence correlation module is used for fusing the first scale surface state time sequence correlation feature vector and the second scale surface state time sequence correlation feature vector to obtain a classification feature vector; and
And the slow fire control module is used for enabling the classification feature vector to pass through a classifier to obtain a classification result, wherein the classification result is used for indicating whether slow fire decoction is stopped.
In the above-mentioned traditional Chinese medicine preparation device for frequent urination and urgent urination, the surface state semantic feature extraction module comprises: the image blocking unit is used for carrying out image blocking processing on the plurality of surface state monitoring key frames to obtain a sequence of image blocks; an embedding unit, configured to perform vector embedding on each image block in the sequence of image blocks by using an image block embedding layer of the ViT model to obtain a sequence of image block embedded vectors; and a conversion unit for inputting the sequence of image block embedding vectors into the converter of the ViT model to obtain the plurality of surface state semantic feature vectors.
In the above-mentioned traditional Chinese medicine preparation device for frequent urination and urgent urination, the first scale surface state time sequence association module comprises: a context semantic coding unit, configured to perform global context semantic coding on the plurality of surface state semantic feature vectors by using the context encoder based on the converter to obtain a plurality of surface state global feature vectors; and a cascading unit, configured to cascade the plurality of surface state global feature vectors to obtain the first scale surface state time sequence associated feature vector.
In the above-mentioned traditional chinese medicine preparation device of urgent urination frequently, the multiscale neighborhood characteristic draws the module, includes: and a multi-scale fusion layer connected with the first convolution layer and the second convolution layer, wherein the first convolution layer and the second convolution layer use one-dimensional convolution kernels with different scales.
In the above-mentioned traditional Chinese medicine preparation device for frequent urination and urgent urination, the second scale surface state time sequence association module comprises: a first feature extraction unit, configured to perform one-dimensional convolution encoding on the one-dimensional feature vector by using a first convolution layer of a multi-scale neighborhood feature extraction module including a plurality of parallel one-dimensional convolution layers according to the following first encoding formula to obtain a first surface state feature vector; wherein, the first coding formula is:
Figure BDA0004140415330000021
wherein a is the width of the first one-dimensional convolution kernel in the X direction, F (a) is a parameter vector of the first one-dimensional convolution kernel, G (X-a) is a local vector matrix operated by a first one-dimensional convolution kernel function, w is the size of the first one-dimensional convolution kernel, and X represents the one-dimensional feature vector; a second feature extraction unit, configured to perform one-dimensional convolution encoding on the one-dimensional feature vector by using a second convolution layer of a multi-scale neighborhood feature extraction module including a plurality of parallel one-dimensional convolution layers according to the following second encoding formula to obtain a second surface state feature vector; wherein, the second coding formula is:
Figure BDA0004140415330000022
Wherein b is the width of the second one-dimensional convolution kernel in the X direction, F (b) is a parameter vector of the second one-dimensional convolution kernel, G (X-b) is a local vector matrix calculated by a function of the second one-dimensional convolution kernel, m is the size of the second one-dimensional convolution kernel, and X represents the one-dimensional feature vector; and a cascading unit, configured to cascade the first surface state feature vector and the second surface state feature vector to obtain the second scale surface state time sequence correlation feature vector.
In the above-mentioned traditional Chinese medicine preparation device for frequent urination and urgent urination, the multi-scale surface state time sequence association module is used for: fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector by the following fusion formula to obtain a classification feature vector; wherein, the fusion formula is:
Figure BDA0004140415330000031
wherein V is the classification feature vector, V 1 For the first scale surface state time sequence associated feature vector, V 2 Time-sequentially associating feature vectors for the second scale surface state,
Figure BDA0004140415330000032
representing addition by position, λ and β are weighting parameters for controlling the balance between the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector.
The traditional Chinese medicine preparation device for frequent urination and urgent urination further comprises a training module for training the ViT model containing the image block embedding layer, the context encoder based on the converter, the multi-scale neighborhood characteristic extraction module and the classifier.
In the above-mentioned traditional chinese medicine preparation device of urgent urination frequently, training module includes: the training data acquisition module is used for acquiring training data, wherein the training data comprises a training surface state monitoring video of the liquid medicine decocted by slow fire and a true value of whether the slow fire decoction is stopped; the training surface state key frame extraction module is used for extracting a plurality of training surface state monitoring key frames from the training surface state monitoring video; the training surface state semantic feature extraction module is used for obtaining a plurality of training surface state semantic feature vectors through the ViT model containing the image block embedded layer for the plurality of training surface state monitoring key frames respectively; a training first scale surface state timing correlation module for passing the plurality of training surface state semantic feature vectors through the converter-based context encoder to obtain a training first scale surface state timing correlation feature vector; the training second scale surface state time sequence correlation module is used for arranging the plurality of training surface state semantic feature vectors into training one-dimensional feature vectors and then obtaining training second scale surface state time sequence correlation feature vectors through the multi-scale neighborhood feature extraction module; the training multi-scale surface state time sequence association module is used for fusing the training first-scale surface state time sequence association feature vector and the training second-scale surface state time sequence association feature vector to obtain a training classification feature vector; the classification loss module is used for passing the training classification feature vector through the classifier to obtain a classification loss function value; and a training module for training the ViT model including the image block embedding layer, the converter-based context encoder, the multi-scale neighborhood feature extraction module, and the classifier based on the classification loss function value and propagation through a gradient descent direction, wherein in each round of iteration of the training, a spatial regularization constraint iteration of a weight matrix of the classifier is performed on the weight matrix of the classifier.
In the device for preparing the traditional Chinese medicine for frequent urination and urgent urination, in each iteration of training, carrying out spatial regularization constraint iteration of a weight matrix of the classifier according to the following optimization formula; wherein, the optimization formula is:
Figure BDA0004140415330000033
wherein M is the weight matrix of the classifier, M T Is a transpose of the weight matrix of the classifier, I.I F Frobenius norms, M representing a matrix b Is a bias matrix that is configured to be biased,
Figure BDA0004140415330000034
representing matrix multiplication +.>
Figure BDA0004140415330000035
Represents matrix addition, wherein, the expression of the index is multiplied by position points, exp (,) represents the exponential operation of the matrix, the exponential operation of the matrix represents the calculation of the natural exponential function value which takes the eigenvalue of each position in the matrix as the power, and M' represents the weight matrix of the classifier after iteration.
In a second aspect, a method for preparing a traditional Chinese medicine for frequent urination and urgent urination is provided, which comprises the following steps:
acquiring a surface state monitoring video of the liquid medicine decocted by slow fire, which is acquired by a camera;
extracting a plurality of surface state monitoring key frames from the surface state monitoring video;
the plurality of surface state monitoring key frames are respectively processed through a ViT model containing an image block embedded layer to obtain a plurality of surface state semantic feature vectors;
Passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing related feature vector;
the plurality of surface state semantic feature vectors are arranged into one-dimensional feature vectors and then pass through a multi-scale neighborhood feature extraction module to obtain second-scale surface state time sequence associated feature vectors;
fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector to obtain a classification feature vector; and
and the classification feature vector is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the simmer decocting is stopped.
Compared with the prior art, the method and the device for preparing the traditional Chinese medicine for treating frequent urination and urgent urination, provided by the application, acquire the surface state monitoring video of the liquid medicine decocted by slow fire, which is acquired by the camera; by adopting an artificial intelligence technology based on deep learning, the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire is mined, so that the real-time control of the slow fire decoction is performed. Thus, the preparation process of the traditional Chinese medicine for frequent urination and urgent urination can be optimized, and the efficacy of the traditional Chinese medicine is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario diagram of a traditional Chinese medicine preparation device for frequent urination and urgent urination according to an embodiment of the present application.
Fig. 2 is a block diagram of a device for preparing Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application.
Fig. 3 is a block diagram of the surface state semantic feature extraction module in the device for preparing traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application.
Fig. 4 is a block diagram of the first scale surface state timing correlation module in the apparatus for preparing traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application.
Fig. 5 is a block diagram of the second scale surface state timing correlation module in the apparatus for preparing a traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application.
Fig. 6 is a block diagram of the training module in the apparatus for preparing Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application.
Fig. 7 is a flowchart of a method for preparing a traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application.
Fig. 8 is a schematic diagram of a system architecture of a method for preparing a traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Unless defined otherwise, all technical and scientific terms used in the examples of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present application.
In the description of the embodiments of the present application, unless otherwise indicated and defined, the term "connected" should be construed broadly, and for example, may be an electrical connection, may be a communication between two elements, may be a direct connection, or may be an indirect connection via an intermediary, and it will be understood by those skilled in the art that the specific meaning of the term may be understood according to the specific circumstances.
It should be noted that, the term "first\second\third" in the embodiments of the present application is merely to distinguish similar objects, and does not represent a specific order for the objects, it is to be understood that "first\second\third" may interchange a specific order or sequence where allowed. It is to be understood that the "first\second\third" distinguishing objects may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in sequences other than those illustrated or described herein.
As described above, the conventional control of the decocting time is performed manually based on experience, which not only requires a professional to perform the decocting with slow fire and wastes a lot of time and effort, but also makes the decocting time difficult to control due to different times of decocting different medicinal materials, so that the medicinal effect cannot be fully exerted. Therefore, an optimized traditional Chinese medicine preparation scheme for frequent urination and urgent urination is expected.
Accordingly, in the technical solution of the present application, it is desirable to detect the surface state of the liquid medicine in real time to determine whether the decocting is completed in consideration of the process of decocting with slow fire. However, since the surface state of the liquid medicine is hidden characteristic information of a small scale, it is difficult to extract and capture the hidden characteristic information of the surface state of the liquid medicine sufficiently and effectively, and the hidden characteristic information of the surface state of the liquid medicine also has a change rule in the time dimension, the time sequence of the Chinese medicinal materials is different along with different types, sizes and the like of the raw materials of the Chinese medicinal materials, so that different change characteristic information is generated on the time sequence, and the time control of decocting with slow fire is difficult. Therefore, in the process, the difficulty is how to dig out the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire, so as to control the decocting by slow fire in real time, optimize the preparation process of the traditional Chinese medicine for frequent urination and urgent urination, and ensure the efficacy of the traditional Chinese medicine.
In recent years, deep learning and neural networks have been widely used in the fields of computer vision, natural language processing, text signal processing, and the like. The development of deep learning and neural networks provides a new solution idea and scheme for mining the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire.
Specifically, in the technical scheme of the application, firstly, a surface state monitoring video of the decocted liquid medicine by slow fire, which is collected by a camera, is obtained. Then, considering that the time sequence change characteristic of the surface state of the liquid medicine can be represented by the difference between adjacent monitoring frames in the surface state monitoring video, namely, the surface state change condition of the simmer liquid medicine is represented by the image representation of the adjacent image frames. However, in view of the small difference between adjacent frames in the surface state monitoring video, there is a large amount of data redundancy, and therefore, in order to reduce the amount of computation and avoid adverse effects of data redundancy on detection, the surface state monitoring video is key frame-sampled at a predetermined sampling frequency to extract a plurality of surface state monitoring key frames from the surface state monitoring video.
Next, considering that for each of the surface state monitoring key frames, the surface state implicit feature of the medical liquid in each of the surface state monitoring key frames is feature information of a small scale, that is, the proportion occupied in the surface state monitoring key frames is small. Therefore, in order to improve the expression capability of the implicit characteristics of the surface state of the liquid medicine in the surface state monitoring key frame, so as to improve the accuracy of the slow fire decoction control, in the technical scheme of the application, the surface state monitoring key frame is subjected to image blocking processing to obtain a sequence of surface state monitoring image blocks. It should be appreciated that the dimensions of the individual surface state monitoring image blocks of the sequence of surface state monitoring image blocks are reduced compared to the original image, and therefore the surface state implicit features in the surface state monitoring key frames with respect to the medical fluid are no longer small-sized objects in the individual surface state monitoring image blocks in order to subsequently increase the expressive power of the surface state implicit features of the medical fluid.
The sequence of surface state monitoring image blocks is then input to an image block embedding layer to obtain a sequence of surface state monitoring image block embedding vectors, in particular, where the embedding layer linearly projects each surface state monitoring image block in the sequence of surface state monitoring image blocks as a one-dimensional embedding vector by a learnable embedding matrix. The embedding process is realized by firstly arranging pixel values of all pixel positions in each surface state monitoring image block into one-dimensional vectors, and then carrying out full-connection coding on the one-dimensional vectors by using a full-connection layer so as to realize embedding.
Further, considering that each surface state monitoring image block of the sequence of surface state monitoring image blocks is image data and has a correlation relationship between surface state implicit feature information about a medical liquid in each surface state monitoring image block, feature mining of each surface state monitoring image block is performed using a convolutional neural network model having excellent performance in terms of implicit feature extraction of images, but a pure CNN method has difficulty in learning explicit global and remote semantic information interactions due to inherent limitations of convolution operations. Therefore, in the technical scheme of the application, the sequence of the surface state monitoring image block embedded vector is encoded in the ViT model to extract the context semantic association feature information about the surface state hidden feature of the liquid medicine in each surface state monitoring image block, so as to obtain the surface state semantic feature vector. It should be appreciated that ViT may process the respective thermal distribution image block directly through a self-attention mechanism like a transfomer to extract the contextual semantic association feature information about the surface state hidden features of the medical fluid in the respective surface state monitoring image block, respectively.
Then, considering that the surface state characteristics of the liquid medicine are continuously changed in the time dimension, that is, the context semantic association characteristic information about the surface state hidden characteristics of the liquid medicine in each key frame has an association relationship in the time dimension, in the technical scheme of the application, the plurality of surface state semantic characteristic vectors are further encoded in a context encoder based on a converter so as to extract the context association characteristic distribution information about the surface state characteristics of the liquid medicine in each key frame based on the time sequence global, thereby obtaining the first-scale surface state time sequence association characteristic vector.
Then, it is also considered that the converter-based context encoder is capable of extracting dynamic change feature information of the surface state feature of the chemical liquid globally based on time series in a time dimension, but has weak extraction capability for local dynamic implicit features of the surface state of the chemical liquid. The surface state characteristics of the liquid medicine have different change conditions under different time period spans, so in order to accurately express the time sequence dynamic change characteristics of the surface state of the liquid medicine, the multi-scale dynamic change characteristic information of the liquid medicine under different time period spans needs to be captured and extracted. Therefore, in the technical scheme of the application, after the plurality of surface state semantic feature vectors are further arranged into one-dimensional feature vectors, feature mining is performed in a multi-scale neighborhood feature extraction module so as to extract multi-scale neighborhood associated feature distribution information of the surface state features of the liquid medicine under different time spans, and therefore a second-scale surface state time sequence associated feature vector is obtained.
Further, the first scale surface state time sequence related feature vector and the second scale surface state time sequence related feature vector are fused, so that the surface state feature of the liquid medicine is fused on the basis of time sequence global and multi-scale dynamic change feature information of different time span parts in the time dimension, the multi-scale dynamic change feature information is used as a classification feature vector to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether to stop decocting with slow fire.
That is, in the technical solution of the present application, the labels of the classifier include stopping the simmer (first label) and not stopping the simmer (second label), wherein the classifier determines to which classification label the classification feature vector belongs through a soft maximum function. It should be noted that the first tag p1 and the second tag p2 do not include a manually set concept, and in fact, during the training process, the computer model does not have a concept of "stop simmer" which is just two kinds of classification tags and outputs the probability that the feature is under the two classification tags, i.e., the sum of p1 and p2 is one. Therefore, the classification result of whether to stop simmer is actually that the classification label is converted into the classification probability distribution conforming to the natural rule, and the physical meaning of the natural probability distribution of the label is essentially used instead of the language text meaning of whether to stop simmer. It should be understood that, in the technical scheme of the application, the classification label of the classifier is a control strategy label for stopping decocting with slow fire, so after the classification result is obtained, the real-time control of decocting with slow fire can be performed based on the classification result so as to optimize the preparation process of the traditional Chinese medicine for frequent urination and urgent urination and ensure the efficacy of the traditional Chinese medicine.
In particular, in the technical solution of the present application, when the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector are fused to obtain the classification feature vector, in order to fully utilize the context image semantic association features of the surface state monitoring keyframes of different scales expressed by the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector, the classification feature vector is preferably obtained by directly cascading the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector, but this may result in a high dispersion of global feature distribution of the classification feature vector, so that the convergence speed of the weight matrix of the classifier is slow in the training process, which affects the overall training speed of the model.
Therefore, in the technical solution of the present application, the applicant of the present application performs spatial regularization constraint of the weight matrix at each iteration of the weight matrix of the classifier, expressed as:
Figure BDA0004140415330000081
m is the weight matrix of the classifier, I.I F Frobenius norms, M representing a matrix b Is a bias matrix and may be initially set as an identity matrix, for example.
The spatial regularization constraint of the weight matrix is based on an endophytic correlation matrix obtained by spatial embedding the weight matrix with the transpose of the weight matrix, and L2 regularization based on endophytic correlation distribution of European space of the weight matrix is carried out on the weight matrix, so that the semantic dependency degree of the weight space on a specific mode expressed by the feature is reflected irrespective of the numerical distribution of the feature to be weighted and the numerical value according to the position, the transmission effect of the intrinsic knowledge of the extracted feature is reflected by the weight space, the convergence of the weight matrix is accelerated, and the overall training speed of the model is improved. Thus, the control of decocting with slow fire can be accurately performed in real time, so as to optimize the preparation process of the traditional Chinese medicine for frequent urination and urgent urination and ensure the efficacy of the traditional Chinese medicine.
Fig. 1 is an application scenario diagram of a traditional Chinese medicine preparation device for frequent urination and urgent urination according to an embodiment of the present application. As shown in fig. 1, in the application scenario, first, a surface state monitoring video (e.g., C as illustrated in fig. 1) of a simmer liquid (e.g., M as illustrated in fig. 1) acquired by a camera is acquired; the acquired surface state monitoring video is then input into a server (e.g., S as illustrated in fig. 1) deployed with a frequent urgency traditional Chinese medicine preparation algorithm, wherein the server is capable of processing the surface state monitoring video based on the frequent urgency traditional Chinese medicine preparation algorithm to generate a classification result for indicating whether to stop simmer decoction.
Having described the basic principles of the present application, various non-limiting embodiments of the present application will now be described in detail with reference to the accompanying drawings.
In one embodiment of the present application, fig. 2 is a block diagram of a device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application. As shown in fig. 2, a device 100 for preparing a traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application includes: the monitoring video acquisition module 110 is used for acquiring a surface state monitoring video of the liquid medicine decocted by slow fire, which is acquired by the camera; a surface state keyframe extraction module 120, configured to extract a plurality of surface state monitoring keyframes from the surface state monitoring video; the surface state semantic feature extraction module 130 is configured to obtain a plurality of surface state semantic feature vectors for the plurality of surface state monitoring key frames through a ViT model including an image block embedding layer; a first scale surface state timing correlation module 140 for passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing correlation feature vector; a second scale surface state timing sequence association module 150, configured to arrange the plurality of surface state semantic feature vectors into one-dimensional feature vectors, and then obtain a second scale surface state timing sequence association feature vector through a multi-scale neighborhood feature extraction module; a multi-scale surface state timing correlation module 160 for fusing the first-scale surface state timing correlation feature vector and the second-scale surface state timing correlation feature vector to obtain a classification feature vector; and a mild fire control module 170, configured to pass the classification feature vector through a classifier to obtain a classification result, where the classification result is used to indicate whether to stop mild fire decoction.
Specifically, in the embodiment of the present application, the monitoring video acquisition module 110 is configured to acquire a surface state monitoring video of the decocted liquid medicine with slow fire, which is acquired by the camera. As described above, the conventional control of the decocting time is performed manually based on experience, which not only requires a professional to perform the decocting with slow fire and wastes a lot of time and effort, but also makes the decocting time difficult to control due to different times of decocting different medicinal materials, so that the medicinal effect cannot be fully exerted. Therefore, an optimized traditional Chinese medicine preparation scheme for frequent urination and urgent urination is expected.
Accordingly, in the technical solution of the present application, it is desirable to detect the surface state of the liquid medicine in real time to determine whether the decocting is completed in consideration of the process of decocting with slow fire. However, since the surface state of the liquid medicine is hidden characteristic information of a small scale, it is difficult to extract and capture the hidden characteristic information of the surface state of the liquid medicine sufficiently and effectively, and the hidden characteristic information of the surface state of the liquid medicine also has a change rule in the time dimension, the time sequence of the Chinese medicinal materials is different along with different types, sizes and the like of the raw materials of the Chinese medicinal materials, so that different change characteristic information is generated on the time sequence, and the time control of decocting with slow fire is difficult. Therefore, in the process, the difficulty is how to dig out the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire, so as to control the decocting by slow fire in real time, optimize the preparation process of the traditional Chinese medicine for frequent urination and urgent urination, and ensure the efficacy of the traditional Chinese medicine.
In recent years, deep learning and neural networks have been widely used in the fields of computer vision, natural language processing, text signal processing, and the like. The development of deep learning and neural networks provides a new solution idea and scheme for mining the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire.
Specifically, in the technical scheme of the application, firstly, a surface state monitoring video of the decocted liquid medicine by slow fire, which is collected by a camera, is obtained.
Specifically, in the embodiment of the present application, the surface state keyframe extracting module 120 is configured to extract a plurality of surface state monitoring keyframes from the surface state monitoring video. Then, considering that the time sequence change characteristic of the surface state of the liquid medicine can be represented by the difference between adjacent monitoring frames in the surface state monitoring video, namely, the surface state change condition of the simmer liquid medicine is represented by the image representation of the adjacent image frames. However, in view of the small difference between adjacent frames in the surface state monitoring video, there is a large amount of data redundancy, and therefore, in order to reduce the amount of computation and avoid adverse effects of data redundancy on detection, the surface state monitoring video is key frame-sampled at a predetermined sampling frequency to extract a plurality of surface state monitoring key frames from the surface state monitoring video.
Specifically, in the embodiment of the present application, the surface state semantic feature extraction module 130 is configured to obtain a plurality of surface state semantic feature vectors for the plurality of surface state monitoring key frames through a ViT model including an image block embedding layer, respectively. Next, considering that for each of the surface state monitoring key frames, the surface state implicit feature of the medical liquid in each of the surface state monitoring key frames is feature information of a small scale, that is, the proportion occupied in the surface state monitoring key frames is small.
Therefore, in order to improve the expression capability of the implicit characteristics of the surface state of the liquid medicine in the surface state monitoring key frame, so as to improve the accuracy of the slow fire decoction control, in the technical scheme of the application, the surface state monitoring key frame is subjected to image blocking processing to obtain a sequence of surface state monitoring image blocks. It should be appreciated that the dimensions of the individual surface state monitoring image blocks of the sequence of surface state monitoring image blocks are reduced compared to the original image, and therefore the surface state implicit features in the surface state monitoring key frames with respect to the medical fluid are no longer small-sized objects in the individual surface state monitoring image blocks in order to subsequently increase the expressive power of the surface state implicit features of the medical fluid.
The sequence of surface state monitoring image blocks is then input to an image block embedding layer to obtain a sequence of surface state monitoring image block embedding vectors, in particular, where the embedding layer linearly projects each surface state monitoring image block in the sequence of surface state monitoring image blocks as a one-dimensional embedding vector by a learnable embedding matrix. The embedding process is realized by firstly arranging pixel values of all pixel positions in each surface state monitoring image block into one-dimensional vectors, and then carrying out full-connection coding on the one-dimensional vectors by using a full-connection layer so as to realize embedding.
Further, considering that each surface state monitoring image block of the sequence of surface state monitoring image blocks is image data and has a correlation relationship between surface state implicit feature information about a medical liquid in each surface state monitoring image block, feature mining of each surface state monitoring image block is performed using a convolutional neural network model having excellent performance in terms of implicit feature extraction of images, but a pure CNN method has difficulty in learning explicit global and remote semantic information interactions due to inherent limitations of convolution operations. Therefore, in the technical scheme of the application, the sequence of the surface state monitoring image block embedded vector is encoded in the ViT model to extract the context semantic association feature information about the surface state hidden feature of the liquid medicine in each surface state monitoring image block, so as to obtain the surface state semantic feature vector. It should be appreciated that ViT may process the respective thermal distribution image block directly through a self-attention mechanism like a transfomer to extract the contextual semantic association feature information about the surface state hidden features of the medical fluid in the respective surface state monitoring image block, respectively.
Fig. 3 is a block diagram of the surface state semantic feature extraction module in the traditional Chinese medicine preparation device for frequent urination and urgent urination according to the embodiment of the present application, as shown in fig. 3, the surface state semantic feature extraction module 130 includes: an image blocking unit 131, configured to perform image blocking processing on the plurality of surface state monitoring key frames to obtain a sequence of image blocks; an embedding unit 132, configured to perform vector embedding on each image block in the sequence of image blocks by using an image block embedding layer of the ViT model to obtain a sequence of image block embedded vectors; and a conversion unit 133 for inputting the sequence of image block embedding vectors into the converter of the ViT model to obtain the plurality of surface state semantic feature vectors.
It should be understood that since the transducer structure proposed by Google in 2017, a wave of hot surge is rapidly initiated, and for the NLP field, the self-attention mechanism replaces the conventional cyclic neural network structure adopted when processing sequence data, so that not only is parallel training realized, but also the training efficiency is improved, and meanwhile, good results are obtained in application. In NLP, a sequence is input into a transducer, but in the field of vision, how to convert a 2d picture into a 1d sequence needs to be considered, and the most intuitive idea is to input pixels in the picture into the transducer, but the complexity is too high.
While the ViT model can reduce the complexity of input, the picture is cut into image blocks, each image block is projected as a fixed length vector into the transducer, and the operation of the subsequent encoder is identical to that of the original transducer. However, because the pictures are classified, a special mark is added into the input sequence, and the output corresponding to the mark is the final class prediction. ViT exhibits quite excellent performance over many visual tasks, but the lack of inductive biasing allows ViT to be applied to small data sets with very much dependence on model regularization (model regularization) and data augmentation (data augmentation) compared to CNN (Convolutional Neural Network ).
Specifically, in the embodiment of the present application, the first scale surface state timing correlation module 140 is configured to pass the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing correlation feature vector. Next, it is considered that since the surface state characteristics of the medical fluid are constantly changing in the time dimension, that is, the context semantic association characteristic information on the surface state hidden characteristics of the medical fluid in the respective key frames has an association relationship in the time dimension.
Therefore, in the technical scheme of the application, the plurality of surface state semantic feature vectors are further encoded in a context encoder based on a converter, so that context associated feature distribution information of the surface state features of the liquid medicine in each key frame based on time sequence global is extracted, and a first scale surface state time sequence associated feature vector is obtained.
Fig. 4 is a block diagram of the first-scale surface state timing correlation module in the apparatus for preparing traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application, as shown in fig. 4, the first-scale surface state timing correlation module 140 includes: a context semantic coding unit 141, configured to perform global context semantic coding on the plurality of surface state semantic feature vectors using the context encoder based on the converter to obtain a plurality of surface state global feature vectors; and a concatenation unit 142, configured to concatenate the plurality of surface state global feature vectors to obtain the first scale surface state time sequence correlation feature vector.
The context encoder aims to mine for hidden patterns between contexts in the word sequence, optionally the encoder comprises: CNN (Convolutional Neural Network ), recurrent NN (RecursiveNeural Network, recurrent neural network), language Model (Language Model), and the like. The CNN-based method has a better extraction effect on local features, but has a poor effect on Long-Term Dependency (Long-Term Dependency) problems in sentences, so Bi-LSTM (Long Short-Term Memory) based encoders are widely used. The repetitive NN processes sentences as a tree structure rather than a sequence, has stronger representation capability in theory, but has the weaknesses of high sample marking difficulty, deep gradient disappearance, difficulty in parallel calculation and the like, so that the repetitive NN is less in practical application. The transducer has a network structure with wide application, has the characteristics of CNN and RNN, has a better extraction effect on global characteristics, and has a certain advantage in parallel calculation compared with RNN (RecurrentNeural Network ).
Specifically, in the embodiment of the present application, the second scale surface state timing correlation module 150 is configured to arrange the plurality of surface state semantic feature vectors into one-dimensional feature vectors, and then obtain the second scale surface state timing correlation feature vectors through the multi-scale neighborhood feature extraction module. Then, it is also considered that the converter-based context encoder is capable of extracting dynamic change feature information of the surface state feature of the chemical liquid globally based on time series in a time dimension, but has weak extraction capability for local dynamic implicit features of the surface state of the chemical liquid. The surface state characteristics of the liquid medicine have different changes under different time period spans.
Therefore, in order to accurately express the time sequence dynamic change characteristics of the surface state of the liquid medicine, the multi-scale dynamic change characteristic information of the liquid medicine under different time period spans needs to be captured and extracted. Therefore, in the technical scheme of the application, after the plurality of surface state semantic feature vectors are further arranged into one-dimensional feature vectors, feature mining is performed in a multi-scale neighborhood feature extraction module so as to extract multi-scale neighborhood associated feature distribution information of the surface state features of the liquid medicine under different time spans, and therefore a second-scale surface state time sequence associated feature vector is obtained.
The multi-scale neighborhood feature extraction module 150 is configured to: and a multi-scale fusion layer connected with the first convolution layer and the second convolution layer, wherein the first convolution layer and the second convolution layer use one-dimensional convolution kernels with different scales.
Fig. 5 is a block diagram of the second-scale surface state timing correlation module in the apparatus for preparing traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application, as shown in fig. 5, the second-scale surface state timing correlation module 150 includes: a first feature extraction unit 151, configured to perform one-dimensional convolution encoding on the one-dimensional feature vector by using a first convolution layer of a multi-scale neighborhood feature extraction module including a plurality of parallel one-dimensional convolution layers according to the following first encoding formula to obtain a first surface state feature vector; wherein, the first coding formula is:
Figure BDA0004140415330000121
wherein a is the width of the first one-dimensional convolution kernel in the X direction, F (a) is a parameter vector of the first one-dimensional convolution kernel, G (X-a) is a local vector matrix operated by a first one-dimensional convolution kernel function, w is the size of the first one-dimensional convolution kernel, and X represents the one-dimensional feature vector; a second feature extraction unit 152, configured to perform one-dimensional convolution encoding on the one-dimensional feature vector with the following second encoding formula using a second convolution layer of the multi-scale neighborhood feature extraction module including a plurality of parallel one-dimensional convolution layers to obtain a second surface state feature vector; wherein, the second coding formula is:
Figure BDA0004140415330000122
Wherein b is the width of the second one-dimensional convolution kernel in the X direction, F (b) is a parameter vector of the second one-dimensional convolution kernel, G (X-b) is a local vector matrix calculated by a function of the second one-dimensional convolution kernel, m is the size of the second one-dimensional convolution kernel, and X represents the one-dimensional feature vector; and a concatenation unit 153, configured to concatenate the first surface state feature vector and the second surface state feature vector to obtain the second scale surface state time sequence correlation feature vector.
It should be noted that the multi-scale neighborhood feature extraction module is essentially a deep neural network model based on deep learning, which is capable of fitting any function by a predetermined training strategy and has a higher feature extraction generalization capability compared to the conventional feature engineering.
The multi-scale neighborhood feature extraction module comprises a plurality of parallel one-dimensional convolution layers, wherein in the process of feature extraction by the multi-scale neighborhood feature extraction module, the plurality of parallel one-dimensional convolution layers respectively carry out one-dimensional convolution coding on input data by one-dimensional convolution check with different scales so as to capture local implicit features of a sequence.
Specifically, in the embodiment of the present application, the multi-scale surface state timing correlation module 160 is configured to fuse the first-scale surface state timing correlation feature vector and the second-scale surface state timing correlation feature vector to obtain a classification feature vector. Further, the first scale surface state time sequence related feature vector and the second scale surface state time sequence related feature vector are fused, so that the surface state feature of the liquid medicine is fused on the basis of time sequence global and multi-scale dynamic change feature information of different time span parts in the time dimension, the multi-scale dynamic change feature information is used as a classification feature vector to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether to stop decocting with slow fire.
Wherein the multi-scale surface state timing correlation module 160 is configured to: fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector by the following fusion formula to obtain a classification feature vector; wherein, the fusion formula is:
Figure BDA0004140415330000123
wherein V is the classification feature vector, V 1 For the first scale surface state time sequence associated feature vector, V 2 Time-sequentially associating feature vectors for the second scale surface state,
Figure BDA0004140415330000131
representing addition by position, λ and β are weighting parameters for controlling the balance between the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector.
Specifically, in the embodiment of the present application, the simmer control module 170 is configured to pass the classification feature vector through a classifier to obtain a classification result, where the classification result is used to indicate whether simmer decocting is stopped. That is, in the technical solution of the present application, the labels of the classifier include stopping the simmer (first label) and not stopping the simmer (second label), wherein the classifier determines to which classification label the classification feature vector belongs through a soft maximum function.
It should be noted that the first tag p1 and the second tag p2 do not include a manually set concept, and in fact, during the training process, the computer model does not have a concept of "stop simmer" which is just two kinds of classification tags and outputs the probability that the feature is under the two classification tags, i.e., the sum of p1 and p2 is one. Therefore, the classification result of whether to stop simmer is actually that the classification label is converted into the classification probability distribution conforming to the natural rule, and the physical meaning of the natural probability distribution of the label is essentially used instead of the language text meaning of whether to stop simmer. It should be understood that, in the technical scheme of the application, the classification label of the classifier is a control strategy label for stopping decocting with slow fire, so after the classification result is obtained, the real-time control of decocting with slow fire can be performed based on the classification result so as to optimize the preparation process of the traditional Chinese medicine for frequent urination and urgent urination and ensure the efficacy of the traditional Chinese medicine.
The simmer control module 170 includes: the full-connection coding unit is used for carrying out full-connection coding on the classification characteristic vectors by using a plurality of full-connection layers of the classifier so as to obtain coded classification characteristic vectors; and the classification unit is used for passing the coding classification feature vector through a Softmax classification function of the classifier to obtain the classification result.
In a specific example of the present application, the classifier is used to process the classification feature vector to generate a classification result according to the following formula: o=softmax { (W) n ,B n ):…:(W 1 ,B 1 ) X, where X represents the classification feature vector, W 1 To W n Is a weight matrix, B 1 To B n Representing the bias vector.
The traditional Chinese medicine preparation device for frequent urination and urgent urination further comprises a training module for training the ViT model containing the image block embedding layer, the context encoder based on the converter, the multi-scale neighborhood characteristic extraction module and the classifier. Fig. 6 is a block diagram of the training module in the apparatus for preparing a traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application, as shown in fig. 6, the training module 180 includes: the training data acquisition module 181 is configured to acquire training data, where the training data includes a training surface state monitoring video of the liquid medicine decocted by slow fire, and a true value of whether to stop decocting by slow fire; a training surface state key frame extraction module 182 for extracting a plurality of training surface state monitoring key frames from the training surface state monitoring video; the training surface state semantic feature extraction module 183 is configured to obtain a plurality of training surface state semantic feature vectors for the plurality of training surface state monitoring key frames through the ViT model including the image block embedding layer, respectively; a training first scale surface state timing correlation module 184 for passing the plurality of training surface state semantic feature vectors through the converter-based context encoder to obtain a training first scale surface state timing correlation feature vector; a training second scale surface state timing sequence association module 185, configured to arrange the plurality of training surface state semantic feature vectors into training one-dimensional feature vectors, and then obtain training second scale surface state timing sequence association feature vectors through the multi-scale neighborhood feature extraction module; a training multi-scale surface state timing correlation module 186, configured to fuse the training first-scale surface state timing correlation feature vector and the training second-scale surface state timing correlation feature vector to obtain a training classification feature vector; a classification loss module 187 configured to pass the training classification feature vector through the classifier to obtain a classification loss function value; and a training module 188 for training the ViT model including the image block embedding layer, the converter-based context encoder, the multi-scale neighborhood feature extraction module, and the classifier based on the classification loss function values and traveling in a gradient descent direction, wherein in each round of the training, a spatial regularization constraint iteration of a weight matrix of the classifier is performed.
In particular, in the technical solution of the present application, when the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector are fused to obtain the classification feature vector, in order to fully utilize the context image semantic association features of the surface state monitoring keyframes of different scales expressed by the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector, the classification feature vector is preferably obtained by directly cascading the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector, but this may result in a high dispersion of global feature distribution of the classification feature vector, so that the convergence speed of the weight matrix of the classifier is slow in the training process, which affects the overall training speed of the model.
Therefore, in the technical solution of the present application, the applicant of the present application performs spatial regularization constraint of the weight matrix at each iteration of the weight matrix of the classifier, expressed as: in each iteration of the training, carrying out space regularization constraint iteration of a weight matrix of the classifier according to the following optimization formula; wherein, the optimization formula is:
Figure BDA0004140415330000141
Wherein M is the weight matrix of the classifier, M T Is a transpose of the weight matrix of the classifier, I.I F Frobenius norms, M representing a matrix b Is a bias matrix that is configured to be biased,
Figure BDA0004140415330000142
representing matrix multiplication +.>
Figure BDA0004140415330000143
Represents matrix addition, wherein, the expression of the index is multiplied by position points, exp (,) represents the exponential operation of the matrix, the exponential operation of the matrix represents the calculation of the natural exponential function value which takes the eigenvalue of each position in the matrix as the power, and M' represents the weight matrix of the classifier after iteration.
The spatial regularization constraint of the weight matrix is based on an endophytic correlation matrix obtained by spatial embedding the weight matrix with the transpose of the weight matrix, and L2 regularization based on endophytic correlation distribution of European space of the weight matrix is carried out on the weight matrix, so that the semantic dependency degree of the weight space on a specific mode expressed by the feature is reflected irrespective of the numerical distribution of the feature to be weighted and the numerical value according to the position, the transmission effect of the intrinsic knowledge of the extracted feature is reflected by the weight space, the convergence of the weight matrix is accelerated, and the overall training speed of the model is improved. Thus, the control of decocting with slow fire can be accurately performed in real time, so as to optimize the preparation process of the traditional Chinese medicine for frequent urination and urgent urination and ensure the efficacy of the traditional Chinese medicine.
In summary, the apparatus 100 for preparing a traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the present application is illustrated, which acquires a surface state monitoring video of a liquid medicine decocted with slow fire acquired by a camera; by adopting an artificial intelligence technology based on deep learning, the characteristic information of implicit change of the surface state time sequence of the liquid medicine in the surface state monitoring video of the liquid medicine decocted by slow fire is mined, so that the real-time control of the slow fire decoction is performed. Thus, the preparation process of the traditional Chinese medicine for frequent urination and urgent urination can be optimized, and the efficacy of the traditional Chinese medicine is ensured.
In one embodiment of the present application, fig. 7 is a flowchart of a method for preparing a traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application. As shown in fig. 7, the method for preparing the traditional Chinese medicine for frequent urination and urgent urination according to the embodiment of the application comprises the following steps: 210, acquiring a surface state monitoring video of the decocted liquid medicine by slow fire acquired by a camera; 220 extracting a plurality of surface state monitoring key frames from the surface state monitoring video; 230, respectively obtaining a plurality of surface state semantic feature vectors for the plurality of surface state monitoring key frames through a ViT model containing an image block embedded layer; 240 passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing associated feature vector; 250, arranging the plurality of surface state semantic feature vectors into one-dimensional feature vectors, and then obtaining a second-scale surface state time sequence associated feature vector through a multi-scale neighborhood feature extraction module; 260 fusing the first scale surface state time series associated feature vector and the second scale surface state time series associated feature vector to obtain a classification feature vector; and 270, passing the classification feature vector through a classifier to obtain a classification result, wherein the classification result is used for indicating whether to stop decocting with slow fire.
Fig. 8 is a schematic diagram of a system architecture of a method for preparing a traditional Chinese medicine for frequent urination and urgent urination according to an embodiment of the present application. As shown in fig. 8, in the system architecture of the method for preparing a traditional Chinese medicine for frequent urination and urgent urination, firstly, a surface state monitoring video of a liquid medicine decocted by slow fire, which is collected by a camera, is obtained; then, extracting a plurality of surface state monitoring key frames from the surface state monitoring video; then, the plurality of surface state monitoring key frames are respectively processed through a ViT model containing an image block embedded layer to obtain a plurality of surface state semantic feature vectors; then, passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing associated feature vector; then, the plurality of surface state semantic feature vectors are arranged into one-dimensional feature vectors and then pass through a multi-scale neighborhood feature extraction module to obtain second-scale surface state time sequence associated feature vectors; then, fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector to obtain a classification feature vector; and finally, the classification feature vector is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether to stop decocting with slow fire.
In a specific example, in the above method for preparing a traditional Chinese medicine for frequent urination and urgent urination, the step of obtaining a plurality of surface state semantic feature vectors from the plurality of surface state monitoring key frames through a ViT model including an image block embedding layer includes: performing image blocking processing on the plurality of surface state monitoring key frames to obtain a sequence of image blocks; using an image block embedding layer of the ViT model to carry out vector embedding on each image block in the sequence of the image blocks so as to obtain a sequence of image block embedding vectors; and inputting the sequence of image block embedding vectors into a converter of the ViT model to obtain the plurality of surface state semantic feature vectors.
In a specific example, in the above method for preparing a traditional Chinese medicine for frequent urination and urgent urination, the step of passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state time sequence correlation feature vector includes: performing global-based context semantic coding on the plurality of surface state semantic feature vectors by using the context encoder based on the converter to obtain a plurality of surface state global feature vectors; and cascading the plurality of surface state global feature vectors to obtain the first scale surface state time sequence associated feature vector.
In a specific example, in the above method for preparing a traditional Chinese medicine for frequent urination and urgent urination, the multi-scale neighborhood feature extraction module includes: and a multi-scale fusion layer connected with the first convolution layer and the second convolution layer, wherein the first convolution layer and the second convolution layer use one-dimensional convolution kernels with different scales.
In a specific example, in the method for preparing a traditional Chinese medicine for frequent urination and urgent urination, the step of arranging the plurality of surface state semantic feature vectors into one-dimensional feature vectors and then obtaining a second scale surface state time sequence associated feature vector through a multi-scale neighborhood feature extraction module includes: performing one-dimensional convolution encoding on the one-dimensional feature vector by using a first convolution layer of a multi-scale neighborhood feature extraction module comprising a plurality of parallel one-dimensional convolution layers according to the following first encoding formula to obtain a first surface state feature vector; wherein, the first coding formula is:
Figure BDA0004140415330000161
wherein a is the width of the first one-dimensional convolution kernel in the X direction, F (a) is a parameter vector of the first one-dimensional convolution kernel, G (X-a) is a local vector matrix operated by a first one-dimensional convolution kernel function, w is the size of the first one-dimensional convolution kernel, and X represents the one-dimensional feature vector; performing one-dimensional convolution encoding on the one-dimensional feature vector by using a second convolution layer of a multi-scale neighborhood feature extraction module comprising a plurality of parallel one-dimensional convolution layers according to the following second encoding formula to obtain a second surface state feature vector; wherein, the second coding formula is:
Figure BDA0004140415330000162
Wherein b is the width of the second one-dimensional convolution kernel in the X direction, F (b) is a parameter vector of the second one-dimensional convolution kernel, G (X-b) is a local vector matrix calculated by a function of the second one-dimensional convolution kernel, m is the size of the second one-dimensional convolution kernel, and X represents the one-dimensional feature vector; and cascading the first surface state feature vector and the second surface state feature vector to obtain the second scale surface state time sequence associated feature vector.
In a specific example, in the above method for preparing a traditional Chinese medicine for frequent urination and urgent urination, fusing the first scale surface state time-series correlation feature vector and the second scale surface state time-series correlation feature vector to obtain a classification feature vector includes: fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector by the following fusion formula to obtain a classification feature vector; wherein, the fusion formula is:
Figure BDA0004140415330000163
wherein V is the classification feature vector, V 1 For the first scale surface state time sequence associated feature vector, V 2 Time-sequentially associating feature vectors for the second scale surface state,
Figure BDA0004140415330000164
representing addition by position, λ and β are weighting parameters for controlling the balance between the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector.
In a specific example, in the method for preparing the traditional Chinese medicine for frequent urination and urgent urination, the method further comprises a training module for training the ViT model containing the image block embedding layer, the context encoder based on the converter, the multi-scale neighborhood feature extraction module and the classifier.
In a specific example, in the method for preparing a traditional Chinese medicine for frequent urination and urgent urination, the training the ViT model including the image block embedding layer, the context encoder based on the converter, the multi-scale neighborhood feature extraction module and the classifier includes: acquiring training data, wherein the training data comprises training surface state monitoring videos of the liquid medicine decocted by slow fire and a true value of whether to stop the decocting by slow fire; extracting a plurality of training surface state monitoring key frames from the training surface state monitoring video; respectively passing the training surface state monitoring key frames through the ViT model containing the image block embedded layer to obtain a plurality of training surface state semantic feature vectors; passing the plurality of training surface state semantic feature vectors through the converter-based context encoder to obtain a training first scale surface state timing-associated feature vector; the training surface state semantic feature vectors are arranged into training one-dimensional feature vectors, and then the training second-scale surface state time sequence associated feature vectors are obtained through the multi-scale neighborhood feature extraction module; fusing the training first scale surface state time sequence associated feature vector and the training second scale surface state time sequence associated feature vector to obtain a training classification feature vector; passing the training classification feature vector through the classifier to obtain a classification loss function value; and training the ViT model including the image block embedding layer, the converter-based context encoder, the multi-scale neighborhood feature extraction module, and the classifier based on the classification loss function values and traveling in a direction of gradient descent, wherein, in each round of iteration of the training, a spatial regularization constraint iteration of a weight matrix of the classifier is performed on the weight matrix of the classifier.
In a specific example, in the method for preparing the traditional Chinese medicine for frequent urination and urgent urination, in each iteration of the training, performing spatial regularization constraint iteration of a weight matrix of the classifier according to the following optimization formula; wherein, the optimization formula is:
Figure BDA0004140415330000171
wherein M is the weight matrix of the classifier, M T Is a transpose of the weight matrix of the classifier, I.I F Frobenius norms, M representing a matrix b Is a bias matrix that is configured to be biased,
Figure BDA0004140415330000172
representing matrix multiplication +.>
Figure BDA0004140415330000173
Represents matrix addition, wherein, the expression of the index is multiplied by position points, exp (,) represents the exponential operation of the matrix, the exponential operation of the matrix represents the calculation of the natural exponential function value which takes the eigenvalue of each position in the matrix as the power, and M' represents the weight matrix of the classifier after iteration.
It will be appreciated by those skilled in the art that the specific operations of the respective steps in the above-described method for producing a Chinese medicine for frequent urination and urgent urination have been described in detail in the above description of the system for producing a Chinese medicine for frequent urination and urgent urination with reference to fig. 1 to 6, and thus, repetitive descriptions thereof will be omitted.
The present application also provides a computer program product comprising instructions which, when executed, cause an apparatus to perform operations corresponding to the above-described methods.
In one embodiment of the present application, there is also provided a computer readable storage medium storing a computer program for executing the above-described method.
It should be appreciated that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the forms of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects may be utilized. Furthermore, the computer program product may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Methods, systems, and computer program products of embodiments of the present application are described in terms of flow diagrams and/or block diagrams. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The basic principles of the present application have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not intended to be limited to the details disclosed herein as such.
The block diagrams of the devices, apparatuses, devices, systems referred to in this application are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent to the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. A traditional Chinese medicine preparation device for frequent urination and urgent urination, which is characterized by comprising:
the monitoring video acquisition module is used for acquiring a surface state monitoring video of the liquid medicine decocted by slow fire, which is acquired by the camera;
the surface state key frame extraction module is used for extracting a plurality of surface state monitoring key frames from the surface state monitoring video;
the surface state semantic feature extraction module is used for obtaining a plurality of surface state semantic feature vectors through a ViT model containing an image block embedding layer for the plurality of surface state monitoring key frames respectively;
a first scale surface state timing correlation module for passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing correlation feature vector;
the second scale surface state time sequence association module is used for obtaining a second scale surface state time sequence association feature vector through the multi-scale neighborhood feature extraction module after the plurality of surface state semantic feature vectors are arranged into one-dimensional feature vectors;
the multi-scale surface state time sequence correlation module is used for fusing the first scale surface state time sequence correlation feature vector and the second scale surface state time sequence correlation feature vector to obtain a classification feature vector; and
And the slow fire control module is used for enabling the classification feature vector to pass through a classifier to obtain a classification result, wherein the classification result is used for indicating whether slow fire decoction is stopped.
2. The device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to claim 1, wherein the surface state semantic feature extraction module comprises:
the image blocking unit is used for carrying out image blocking processing on the plurality of surface state monitoring key frames to obtain a sequence of image blocks;
an embedding unit, configured to perform vector embedding on each image block in the sequence of image blocks by using an image block embedding layer of the ViT model to obtain a sequence of image block embedded vectors; and
a conversion unit, configured to input the sequence of the image block embedding vectors into the converter of the ViT model to obtain the plurality of surface state semantic feature vectors.
3. The device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to claim 2, wherein the first scale surface state time sequence correlation module comprises:
a context semantic coding unit, configured to perform global context semantic coding on the plurality of surface state semantic feature vectors by using the context encoder based on the converter to obtain a plurality of surface state global feature vectors; and
And the cascading unit is used for cascading the plurality of surface state global feature vectors to obtain the first scale surface state time sequence associated feature vector.
4. The device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to claim 3, wherein the multi-scale neighborhood feature extraction module comprises: and a multi-scale fusion layer connected with the first convolution layer and the second convolution layer, wherein the first convolution layer and the second convolution layer use one-dimensional convolution kernels with different scales.
5. The device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to claim 4, wherein the second scale surface state time sequence correlation module comprises:
a first feature extraction unit, configured to perform one-dimensional convolution encoding on the one-dimensional feature vector by using a first convolution layer of a multi-scale neighborhood feature extraction module including a plurality of parallel one-dimensional convolution layers according to the following first encoding formula to obtain a first surface state feature vector;
wherein, the first coding formula is:
Figure FDA0004140415320000021
wherein a is the width of the first one-dimensional convolution kernel in the X direction, F (a) is a parameter vector of the first one-dimensional convolution kernel, G (X-a) is a local vector matrix operated by a first one-dimensional convolution kernel function, w is the size of the first one-dimensional convolution kernel, and X represents the one-dimensional feature vector;
A second feature extraction unit, configured to perform one-dimensional convolution encoding on the one-dimensional feature vector by using a second convolution layer of a multi-scale neighborhood feature extraction module including a plurality of parallel one-dimensional convolution layers according to the following second encoding formula to obtain a second surface state feature vector;
wherein, the second coding formula is:
Figure FDA0004140415320000022
wherein b is the width of the second one-dimensional convolution kernel in the X direction, F (b) is a parameter vector of the second one-dimensional convolution kernel, G (X-b) is a local vector matrix calculated by a function of the second one-dimensional convolution kernel, m is the size of the second one-dimensional convolution kernel, and X represents the one-dimensional feature vector; and
and the cascading unit is used for cascading the first surface state characteristic vector and the second surface state characteristic vector to obtain the second scale surface state time sequence association characteristic vector.
6. The device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to claim 5, wherein the multi-scale surface state time sequence correlation module is used for: fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector by the following fusion formula to obtain a classification feature vector;
Wherein, the fusion formula is:
Figure FDA0004140415320000023
wherein V is the classification feature vector, V 1 For the first scale surface state time sequence associated feature vector, V 2 Time-sequentially associating feature vectors for the second scale surface state,
Figure FDA0004140415320000024
representing addition by position, λ and β are weighting parameters for controlling the balance between the first scale surface state time-series associated feature vector and the second scale surface state time-series associated feature vector.
7. The device of claim 6, further comprising a training module for training the ViT model including the image block embedding layer, the converter-based context encoder, the multi-scale neighborhood feature extraction module, and the classifier.
8. The device for preparing a traditional Chinese medicine for frequent urination and urgent urination according to claim 7, wherein the training module comprises:
the training data acquisition module is used for acquiring training data, wherein the training data comprises a training surface state monitoring video of the liquid medicine decocted by slow fire and a true value of whether the slow fire decoction is stopped;
the training surface state key frame extraction module is used for extracting a plurality of training surface state monitoring key frames from the training surface state monitoring video;
The training surface state semantic feature extraction module is used for obtaining a plurality of training surface state semantic feature vectors through the ViT model containing the image block embedded layer for the plurality of training surface state monitoring key frames respectively;
a training first scale surface state timing correlation module for passing the plurality of training surface state semantic feature vectors through the converter-based context encoder to obtain a training first scale surface state timing correlation feature vector;
the training second scale surface state time sequence correlation module is used for arranging the plurality of training surface state semantic feature vectors into training one-dimensional feature vectors and then obtaining training second scale surface state time sequence correlation feature vectors through the multi-scale neighborhood feature extraction module;
the training multi-scale surface state time sequence association module is used for fusing the training first-scale surface state time sequence association feature vector and the training second-scale surface state time sequence association feature vector to obtain a training classification feature vector;
the classification loss module is used for passing the training classification feature vector through the classifier to obtain a classification loss function value; and
The training module is used for training the ViT model containing the image block embedding layer, the context encoder based on the converter, the multi-scale neighborhood feature extraction module and the classifier based on the classification loss function value and through gradient descent direction propagation, wherein in each round of iteration of training, the spatial regularization constraint iteration of the weight matrix of the classifier is performed on the weight matrix of the classifier.
9. The device for preparing the traditional Chinese medicine for frequent urination and urgent urination according to claim 8, wherein in each iteration of the training, the weight matrix of the classifier is subjected to spatial regularization constraint iteration of the weight matrix according to the following optimization formula;
wherein, the optimization formula is:
Figure FDA0004140415320000031
wherein M is the weight matrix of the classifier, M T Is a transpose of the weight matrix of the classifier, I.I F Frobenius norms, M representing a matrix b Is a bias matrix that is configured to be biased,
Figure FDA0004140415320000041
representing matrix multiplication +.>
Figure FDA0004140415320000042
Represents matrix addition, by which, by position point multiplication, exp (), represents the exponential operation of the matrix, saidThe exponential operation of the matrix represents the calculation of natural exponential function values which are raised to the power of eigenvalues at each position in the matrix, and M' represents the weight matrix of the classifier after iteration.
10. A method for preparing a traditional Chinese medicine for frequent urination and urgent urination is characterized by comprising the following steps:
acquiring a surface state monitoring video of the liquid medicine decocted by slow fire, which is acquired by a camera;
extracting a plurality of surface state monitoring key frames from the surface state monitoring video;
the plurality of surface state monitoring key frames are respectively processed through a ViT model containing an image block embedded layer to obtain a plurality of surface state semantic feature vectors;
passing the plurality of surface state semantic feature vectors through a context encoder based on a converter to obtain a first scale surface state timing related feature vector;
the plurality of surface state semantic feature vectors are arranged into one-dimensional feature vectors and then pass through a multi-scale neighborhood feature extraction module to obtain second-scale surface state time sequence associated feature vectors;
fusing the first scale surface state time sequence associated feature vector and the second scale surface state time sequence associated feature vector to obtain a classification feature vector; and
and the classification feature vector is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the simmer decocting is stopped.
CN202310288136.6A 2023-03-23 2023-03-23 Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination Pending CN116310565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310288136.6A CN116310565A (en) 2023-03-23 2023-03-23 Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310288136.6A CN116310565A (en) 2023-03-23 2023-03-23 Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination

Publications (1)

Publication Number Publication Date
CN116310565A true CN116310565A (en) 2023-06-23

Family

ID=86781353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310288136.6A Pending CN116310565A (en) 2023-03-23 2023-03-23 Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination

Country Status (1)

Country Link
CN (1) CN116310565A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116657224A (en) * 2023-07-21 2023-08-29 佛山日克耐热材料有限公司 Control method and system for aerogel powder permeation device
CN117152152A (en) * 2023-10-31 2023-12-01 吉林瑞特生物科技有限公司 Production management system and method for detection kit
CN117138455A (en) * 2023-10-31 2023-12-01 克拉玛依曜诚石油科技有限公司 Automatic liquid filtering system and method
CN117598674A (en) * 2024-01-24 2024-02-27 吉林大学 Multi-parameter heart function monitoring system and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116657224A (en) * 2023-07-21 2023-08-29 佛山日克耐热材料有限公司 Control method and system for aerogel powder permeation device
CN116657224B (en) * 2023-07-21 2024-02-13 佛山日克耐热材料有限公司 Control method and system for aerogel powder permeation device
CN117152152A (en) * 2023-10-31 2023-12-01 吉林瑞特生物科技有限公司 Production management system and method for detection kit
CN117138455A (en) * 2023-10-31 2023-12-01 克拉玛依曜诚石油科技有限公司 Automatic liquid filtering system and method
CN117152152B (en) * 2023-10-31 2024-02-02 吉林瑞特生物科技有限公司 Production management system and method for detection kit
CN117138455B (en) * 2023-10-31 2024-02-27 克拉玛依曜诚石油科技有限公司 Automatic liquid filtering system and method
CN117598674A (en) * 2024-01-24 2024-02-27 吉林大学 Multi-parameter heart function monitoring system and method
CN117598674B (en) * 2024-01-24 2024-04-12 吉林大学 Multi-parameter heart function monitoring system and method

Similar Documents

Publication Publication Date Title
CN116310565A (en) Method and device for preparing traditional Chinese medicine for frequent urination and urgent urination
CN112183747B (en) Neural network training method, neural network compression method and related equipment
CN116504382B (en) Remote medical monitoring system and method thereof
CN116168352B (en) Power grid obstacle recognition processing method and system based on image processing
CN109460553A (en) A kind of machine reading understanding method based on thresholding convolutional neural networks
Wang et al. Sequential weakly labeled multiactivity localization and recognition on wearable sensors using recurrent attention networks
CN109801269B (en) Tongue fur physique classification method based on competitive extrusion and excitation neural network
Jiang et al. Video image defogging recognition based on recurrent neural network
CN116092701B (en) Control system and method based on health data analysis management platform
Abdellaoui et al. Human Action Recognition in Video Sequences Using Deep Belief Networks.
CN116046810B (en) Nondestructive testing method based on RPC cover plate damage load
Xu et al. Intelligent emotion detection method based on deep learning in medical and health data
CN115951883B (en) Service component management system of distributed micro-service architecture and method thereof
CN116245513A (en) Automatic operation and maintenance system and method based on rule base
CN117158923A (en) Remote home-care monitoring method based on meta universe
CN109408630A (en) A method of law court's viewpoint is automatically generated according to the description of crime fact
CN116143127A (en) Automatic quartz sand production system and method
CN116434123A (en) Control method and system for rose distillation processing
Mogan et al. Advances in vision-based gait recognition: From handcrafted to deep learning
Zhao et al. Multi‐mode neural network for human action recognition
Zhang et al. Cross-modal concept learning and inference for vision-language models
CN112216379A (en) Disease diagnosis system based on intelligent joint learning
Lan et al. Infrared dim and small targets detection via self-attention mechanism and pipeline correlator
CN116757773A (en) Clothing electronic commerce sales management system and method thereof
CN116595551A (en) Bank transaction data management method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination