Voice control method of voice control insulin injection pen based on reinforcement learning

By decomposing and extremum point analysis of the voice signal, calculating the filter weight and using the LMS algorithm for adaptive denoising, the problem of LMS filter over-adaptation is solved, and more thorough denoising and more accurate voice control is achieved.

CN119418697AInactive Publication Date: 2025-02-11XIEHE HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI & TECH UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411544537.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, LMS filters are susceptible to transient noise when processing voice signals, resulting in over-adaptation and over-processing of signals, and even mistakenly treating signals as noise.

Method used

By decomposing the original voice signal, multiple component signals are obtained, the extreme value points of each component signal are obtained, the possible degree of reference points of the data point is determined according to the amplitude of the extreme value points, the reference points are selected, and each reference is calculated. The significant value of the point is obtained according to the significant value and the amplitude of the data point, and then the filter weight of each data point is used to adaptively denoising using the LMS algorithm.

Benefits of technology

Through adaptive filtering technology, it is possible to denoise more thoroughly, while protecting useful information in the original voice signal, improving the recognition accuracy of voice signals, thereby achieving accurate voice control of the insulin injection pen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418697A_ABST
    Figure CN119418697A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence applied to medical equipment, in particular to a voice control method of a voice control insulin injection pen based on reinforcement learning, which comprises the following steps: acquiring a voice signal; decomposing the original voice signal to obtain a plurality of component signals of the original voice signal, and obtaining an extreme point of each component signal; obtaining the possible degree of each data point as a reference point according to the amplitude change of the extreme point of each component signal; obtaining all reference points in the original voice signal; then obtaining a saliency value of each reference point; obtaining the filtering weight of each data point according to the amplitude of each data point in the original voice signal and the saliency value of the reference point; denoising the original voice signal according to the filtering weight of each data point; and performing voice control on the insulin injection pen according to the de-noised voice signal. The original voice signal is denoised, so that the voice command is recognized more accurately, and the insulin injection pen can be subjected to voice control accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology applied to medical equipment, and in particular to a voice control method for a voice-controlled insulin injection pen based on reinforcement learning. Background Art

[0002] With the change of lifestyle and the aging of the population, the number of patients with diabetes is increasing. This has led to a rising demand for more convenient and controllable insulin injection methods. Diabetic patients usually need to inject insulin multiple times a day, so the ease of use and patient-friendliness of injection equipment are crucial to patients' treatment compliance and quality of life. In order to improve patients' injection experience and treatment convenience, with the continuous development of voice recognition technology and smart devices, voice control is introduced into insulin injection equipment. The research and development of voice-controlled insulin injection pens will make it easier for diabetic patients to manage their disease and improve their quality of life. The voice-controlled insulin injection pen is equipped with an intelligent control unit that can process voice commands and convert them into control signals for the insulin injection pen. However, because when acquiring voice signals, the acquired voice signals are affected by the surrounding environment and the device itself, and there is noise in the acquired voice signals, it is necessary to denoise the acquired voice signals.

[0003] In the prior art, the LMS (least mean square) filter is a commonly used denoising algorithm, which minimizes the mean square error between the filter output and the desired signal by continuously adjusting the filter weights. The update rule of the LMS algorithm is based on the principle of gradient descent, and the weights are updated according to the product of the error signal and the input signal. However, because the noise in the speech signal is random, and when the speech signal is collected, the speech signal obtained is not stable due to the change in the voice pitch. The LMS filter is easily affected by transient noise in the signal, which may lead to over-adaptation, which means that the filter may over-adjust its own weights when trying to adapt to short-term changes in noise, resulting in excessive processing of the signal, or even mistakenly treating the signal as noise. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a voice control method for a voice-controlled insulin injection pen based on reinforcement learning.

[0005] The voice control method of a voice-controlled insulin injection pen based on reinforcement learning of the present invention adopts the following technical solution:

[0006] An embodiment of the present invention provides a voice control method for a voice-controlled insulin injection pen based on reinforcement learning, the method comprising the following steps:

[0007] Acquire an original speech signal, wherein the original speech signal includes a plurality of data points, each data point corresponding to a time and an amplitude;

[0008] Decomposing the original speech signal to obtain multiple component signals of the original speech signal, obtaining the extreme value point of each component signal; obtaining the possibility that each data point in the original speech signal is a reference point according to the amplitude of the extreme value point of each component signal; and selecting a number of reference points from all data points according to the possibility that each data point in the original speech signal is a reference point;

[0009] Obtaining the significance value of each reference point according to the possibility that each reference point is a reference point and the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal; obtaining the filtering weight of each data point according to the amplitude of each data point in the original speech signal and the significance value of the reference point;

[0010] According to the filter weight of each data point, the original speech signal is denoised using the LMS algorithm to obtain a denoised speech signal; the insulin injection pen is voice-controlled according to the denoised speech signal.

[0011] Furthermore, the method of obtaining the possibility of each data point in the original speech signal being a reference point according to the amplitude of the extreme point of each component signal includes the following specific steps:

[0012] The time corresponding to the extreme points of all component signals is recorded as the standard time; based on the amplitude of the data points in the original speech signal and different component signals corresponding to the standard time and the distance between the data points, the possibility of the data point corresponding to each standard time in the original speech signal being the reference point is obtained.

[0013] Furthermore, the method of obtaining the possibility that each data point corresponding to the standard time in the original speech signal is a reference point according to the amplitude of the data points in the original speech signal and the different component signals and the distance between the data points, comprises the following specific steps:

[0014] The first feature is obtained according to the amplitude difference of data points at standard time in different component signals; the second feature is obtained according to the amplitude difference of different data points in the same component signal and the Euclidean distance between different data points in the same component signal; based on the first feature and the second feature, the possibility of the data point corresponding to each standard time in the original speech signal being a reference point is obtained.

[0015] Furthermore, the possibility that the data point corresponding to each standard time in the original speech signal is a reference point is obtained according to the first feature and the second feature, and the calculation formula is as follows:

[0016]

[0017] In the formula, p iIndicates the possibility that the data point corresponding to the i-th standard time in the original speech signal is the reference point, F li represents the amplitude of the data point corresponding to the i-th standard time in the l-th component signal, F fi represents the amplitude of the data point corresponding to the fth component signal at the i-th standard time, F l(i+1) represents the amplitude of the data point corresponding to the lth component signal at the i-1th standard time, F l(i-1) represents the amplitude of the data point corresponding to the lth component signal at the i-1th standard time, d l (i,i+1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the l-th component signal and the data point corresponding to the i+1-th standard time in the l-th component signal, d l (i,i-1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the l-th component signal and the data point corresponding to the i-1-th standard time in the l-th component signal, n represents the number of component signals, and norm{} represents the linear normalization function; is the first feature of the data point corresponding to the i-th standard time in the original speech signal; is the second feature of the data point corresponding to the i-th standard time in the original speech signal, and || is the absolute value function.

[0018] Furthermore, the method of selecting a plurality of reference points from all data points according to the possibility that each data point in the original speech signal is a reference point includes the following specific steps:

[0019] A threshold T1 is preset. When the probability that the ith data point in the time series is a reference point is greater than or equal to T1, the ith data point is recorded as a reference point.

[0020] Furthermore, the step of obtaining the significance value of each reference point according to the possibility that each reference point is a reference point and the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal includes the following specific steps:

[0021] Obtaining the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal and the variance of the probability that the reference point and surrounding reference points are reference points;

[0022] The significance value of each reference point is obtained according to the probability that the reference point in the original speech signal is the reference point, the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal, and the variance of the probability that the reference point and the surrounding reference points are the reference points.

[0023] Furthermore, the step of obtaining the significance value of each reference point according to the possibility that the reference point in the original speech signal is the reference point, the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal, and the variance of the possibility that the reference point and surrounding reference points are the reference points includes the following specific steps:

[0024]

[0025] In the formula, q j represents the significance value of the jth reference point, p j Indicates the possibility that the jth reference point is the reference point, maxF indicates the maximum amplitude of the data point in the original speech signal, F j represents the amplitude of the jth reference point, p j-r Indicates the possibility that the jrth reference point is the reference point, F j-r represents the amplitude of the jrth reference point, m is the number of preset neighborhood reference points, s[p(jr,j)] represents the variance of the possible degree that all reference points between the jrth reference point and the jth reference point are reference points, and T(jr,j) represents the time series length between the jrth reference point and the jth reference point.

[0026] Furthermore, the filtering weight of each data point is obtained according to the amplitude of each data point in the original speech signal and the significance value of the reference point, and the specific steps include the following:

[0027] The number of preset reference points is a. In the original speech signal, the number of reference points before the i-th data point is reference points and the i-th data point reference point, recorded as the target reference point of the i-th data point;

[0028] The weight of each data point is obtained according to the saliency value of the target reference point of the ith data point, the amplitude of the ith data point, and the distance from the ith data point to the target reference point of the xth data point.

[0029] Furthermore, the weight of each data point is obtained according to the saliency value of the target reference point of the i-th data point, the amplitude of the i-th data point, and the distance from the i-th data point to the target reference point of the x-th data point, and the calculation formula is as follows:

[0030]

[0031] Where W x represents the filter weight of the xth data point in the original speech signal, q x,y represents the saliency value of the yth target reference point of the xth data point in the original speech signal, F xrepresents the amplitude of the xth data point in the original speech signal, d(x,y) represents the maximum value of the distance from the xth data point to all target reference points of the xth data point in the original speech signal, and Z x represents the number of target reference points for the xth data point in the original speech signal, and norm[] represents the linear normalization function.

[0032] Furthermore, the voice control of the insulin injection pen according to the denoised voice signal includes the following specific steps:

[0033] Get the command operation library corresponding to the voice-controlled insulin injection pen;

[0034] The ASR speech recognition technology is used to identify the speech content in the denoised speech signal to obtain keywords, and the keywords are matched in the command operation library through the Aho-Corasick algorithm to obtain voice commands, which are sent to the voice-controlled insulin injection pen, and the voice-controlled insulin injection pen executes the voice commands.

[0035] The beneficial effect of the technical solution of the present invention is that when the speech signal is denoised by the LMS algorithm, because the noise in the speech signal is random in the present invention, and when the speech signal is collected, the acquired speech signal is not stable due to the change of the speech pitch. The LMS filter is easily affected by the transient noise in the signal, which may lead to over-adaptation. Therefore, by analyzing the original speech signal and adapting the filter weight of the original speech signal according to the change of the data point, the change characteristics of the original speech signal can be better used, so that the denoising is more thorough and the useful information contained in the original speech signal will not be destroyed.

[0036] When obtaining the weight of the data point in the speech signal, the original speech signal is decomposed to obtain multiple component signals, and the possibility of the corresponding data point in the original speech signal being a reference point is obtained according to the change of the extreme point in the component signal, and then the significance value of each reference point is obtained according to the possibility of the reference point, and then the filtering weight of each data point is obtained according to the significance value of the reference point and the amplitude of the data point, and then the original speech signal is adaptively denoised according to the weight of each data point, so that the denoised speech signal can be accurately identified, and then the insulin injection pen can be accurately controlled.

[0037] When the collected voice signal is in dialect, the dialect voice signal is pre-processed through reinforcement learning technology to screen out the dialect voice features, which can more accurately identify the user's voice commands, thereby improving the accuracy of voice recognition; when the voice instructions for the injection dose are sent to the voice-controlled insulin injection pen, the voice-controlled insulin injection pen can better understand the user's language needs when executing the voice instructions for the injection dose through reinforcement learning technology, thereby more accurately controlling the injection dose within the corresponding safety threshold; in addition, the dialogue process can also be managed through reinforcement learning technology to improve the fluency of human-computer dialogue. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 The present invention is a flowchart of the steps of a voice control method for a voice-controlled insulin injection pen based on reinforcement learning. DETAILED DESCRIPTION

[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the voice control method of a voice-controlled insulin injection pen based on reinforcement learning proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0042] The following is a detailed description of a specific solution of a voice control method for a voice-controlled insulin injection pen based on reinforcement learning provided by the present invention in conjunction with the accompanying drawings.

[0043] See also Figure 1 , which shows a flowchart of a voice control method for a voice-controlled insulin injection pen based on reinforcement learning provided by an embodiment of the present invention, the method comprising the following steps:

[0044] Step S001: collect and obtain a voice signal, and pre-process the voice signal;

[0045] This embodiment is mainly for denoising the voice signal of the voice-controlled insulin injection pen, so it is necessary to obtain the original voice signal first. Because the voice-controlled insulin injection pen is integrated with a voice signal acquisition unit and a processing control unit, the user's voice signal is collected by the voice signal acquisition unit, and then transmitted to the voice signal processing control unit for preprocessing. Because the signal acquisition unit collects the user's voice signal through a voice sensor, the acquisition frequency may change due to voltage fluctuations during the acquisition process, resulting in the acquisition of some data points missing from the acquired voice signal. Therefore, it is necessary to interpolate the acquired voice signal. Here, a linear interpolation algorithm is used to interpolate the acquired voice signal. This algorithm is a known technology and will not be described in detail here. The interpolated voice signal is obtained, which is recorded as the original voice signal. The original voice signal contains several data points, each of which corresponds to a time and an amplitude.

[0046] At this point, the original speech signal is obtained.

[0047] Step S002, performing EMD decomposition on the original speech signal, obtaining reference points according to the changes of each component signal, and then obtaining the significance value of each reference point in combination with the original speech signal;

[0048] It should be noted that because the voice-controlled insulin injection pen is designed to provide a convenient, accurate, and less painful insulin injection experience, patients control the insulin injection pen through voice commands instead of manually operating the device, which is particularly convenient for patients with hand dysfunction or other physical disabilities such as visual impairment. However, because patients need to inject frequently, the injection environment may not be fixed. When controlled by voice, the collected voice signal is noisy due to the influence of the surrounding environmental noise. Therefore, it is necessary to denoise the voice signal so that the voice command can be accurately recognized. And because there are heavy and light sounds in the voice during voice control, if the heavy sound is not processed and denoised directly, it may be filtered out as noise, so that there is a lack of information in the denoised signal. Therefore, it is necessary to adaptively filter it according to the changes in the original voice signal to obtain the filtering weight of each data point.

[0049] It should be further explained that when the original speech signal is denoised by LMS, it continuously adjusts the weight of the filter so that the mean square error between the output of the filter and the expected signal is minimized. The update rule of the LMS algorithm is based on the principle of gradient descent, and the weight is updated according to the product of the error signal and the input signal. However, because the noise in the speech signal is random, and when the speech signal is collected, the speech signal obtained is not stable due to the change of the voice pitch. The LMS filter is easily affected by the transient noise in the signal, which may lead to over-adaptation, which means that the filter may over-adjust its own weight when trying to adapt to the short-term change of the noise, resulting in excessive processing of the signal, or even mistakenly treating the signal as noise. Therefore, this embodiment analyzes the original speech signal and adapts the filter weight of the original speech signal according to the change of the data point, so that the change characteristics of the original speech signal can be better used, so that the denoising is more thorough and the useful information contained in the original speech signal will not be destroyed.

[0050] Specifically, the original speech signal is first decomposed by the EMD algorithm to obtain multiple component signals of the original speech signal. The EMD algorithm (empirical mode decomposition) is a well-known technology and will not be described in detail here. The EMD algorithm is decomposed according to different frequencies in the original speech signal. Because the original speech signal contains both noise and prominent data points formed by changes in speech stress, the component signals obtained by decomposition contain signals of different frequencies. Therefore, the reference points in the different component signals are obtained according to the changes in the component signals obtained by decomposition. The reference points may be noise data points or prominent data points.

[0051] Furthermore, the extreme value points of each component signal are obtained. The extreme value points are obtained by the first-order derivative method, which is well known. The extreme value points include maximum value points and minimum value points. Since the extreme value points represent points where a large degree of mutation occurs in the signal, they may be noise data points or prominent data points. The time corresponding to the extreme value points is recorded as the standard time, and then the reference point is obtained according to the changes of the extreme value points in each component signal and other component signals. The calculation formula is as follows:

[0052]

[0053] In the formula, p i Indicates the possibility that the data point corresponding to the i-th standard time in the original speech signal is the reference point, F li represents the amplitude of the data point corresponding to the i-th standard time in the l-th component signal, F fi represents the amplitude of the data point corresponding to the fth component signal at the i-th standard time, F l(i+1)represents the amplitude of the data point corresponding to the lth component signal at the i-1th standard time, F l(i-1) represents the amplitude of the data point corresponding to the lth component signal at the i-1th standard time, d l (i,i+1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the l-th component signal and the data point corresponding to the i+1-th standard time in the l-th component signal, d l (i,i-1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the l-th component signal and the data point corresponding to the i-1-th standard time in the l-th component signal, n represents the number of component signals, and norm{} represents the linear normalization function; is the first feature of the data point corresponding to the i-th standard time in the original speech signal; is the second feature of the data point corresponding to the i-th standard time in the original speech signal, and || is the absolute value function.

[0054] Specifically, |F li -F fi | represents the difference between the amplitude of the data point corresponding to the lth component signal at the i-th standard time and the amplitude of the data point corresponding to the f-th component signal. Because the EMD algorithm decomposes the original signal according to different frequencies, the larger the amplitude of a component signal among the different component signals, the greater the abnormality of the extreme point under the frequency, and therefore the greater the possibility of using it as a reference point. It should be noted that the component signals obtained by the EMD algorithm to decompose the original speech signal contain the same number of data points; It indicates the difference between each component signal and other component signals. The greater the difference, the greater the possibility of using it as a reference point. Therefore, the mean value of the difference between the lth component signal and other component signals is calculated here. |F li -F l(i-1) | represents the difference between the amplitude of the data point corresponding to the i-th standard time in the l-th component signal and the amplitude of the data point corresponding to the i-th standard time in the l-th component signal. The purpose of calculating the difference between the extreme point and the neighborhood extreme point is to obtain the prominence of the extreme point. The greater the prominence, the greater the abnormality of the extreme point; d l (i,i-1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the f-th component signal and the data point corresponding to the i-1-th standard time in the l-th component signal. The closer the distances are, the greater the difference is, which means that the data point has changed more, and therefore the more likely it is to be used as a reference point.

[0055] Furthermore, based on the possibility that the data point corresponding to the i-th standard time in the original speech signal is a reference point, a preset threshold value T1=0.63 is used. When the possibility that the data point corresponding to the i-th standard time in the original speech signal is a reference point is greater than or equal to T1, the data point is a reference point; when the possibility that the data point corresponding to the i-th standard time in the original speech signal is a reference point is less than T1, the data point is not a reference point, and all reference points are obtained.

[0056] It should be noted that the original speech signal is analyzed based on the obtained reference points. In the original signal, the reference points represent data points with a large degree of change, and the noise data points and the prominent data points have a large degree of change. However, since the noise data points in the speech signal are caused by the external environment, and the prominent data points are caused by the stress during language expression, the noise data points have continuity, so the reference points in the time series also have a certain degree of continuity, and the continuity of the prominent data points is small, so the continuity of the reference points in the time series is also small. Therefore, the significance value of the reference point is obtained according to the continuity of the reference point, and its calculation formula is as follows:

[0057]

[0058] In the formula, q j represents the significance value of the jth reference point, p j Indicates the possibility that the jth reference point is the reference point, maxF indicates the maximum amplitude of the data point in the original speech signal, F j represents the amplitude of the jth reference point, p j-r Indicates the possibility that the jrth reference point is the reference point, F j-r represents the amplitude of the jr-th reference point, m is the number of preset neighborhood reference points, and in this embodiment, m is 5. This is used as an example for description. In other implementation modes, it can be set to other values, which are not limited in this embodiment. s[p(jr,j)] represents the variance of the possible degree that all reference points between the jr-th reference point and the j-th reference point are reference points, and T(jr,j) represents the time series length between the jr-th reference point and the j-th reference point.

[0059] Specifically, It represents the prominence value of the jth reference point, which represents the amplitude change of the reference point. The greater the degree and the smaller the difference with the maximum amplitude point, the more prominent it is. Indicates the prominence of the neighborhood reference point jr of the jth reference point, Represents the mean value of the prominence of the neighborhood reference points of the jth reference point; It indicates the degree of change of the neighborhood reference points of the j-th reference point in time series. The larger the variance, the greater the degree of change of the reference point, and the shorter the time, the more continuous it is. Therefore, the greater the significance value of the j-th reference point.

[0060] At this point, the significance value of each reference point is obtained.

[0061] Step S003: Perform neighborhood analysis on each data point, and obtain the filtering weight of each data point according to the significant value of each data point;

[0062] According to the obtained saliency value of each reference point, a neighborhood analysis is then performed on each data point to obtain the filtering weight of each data point.

[0063] It should be noted that the reference points in the original speech signal are used to describe the degree of change of noise and stress. If the degree of change of data in a certain data segment is large and the more reference points there are, the more likely the data segment is to be affected by noise, and therefore the larger the required filtering weight is.

[0064] The number of reference points contained in the neighborhood range of each data point in the preset original speech signal is a=4, wherein the reference points are evenly distributed on the left and right sides of the data point, with two reference points on the left and two reference points on the right; this is used as an example for description, and other implementations may be set to other values, which are not limited in this embodiment; in particular, when there are less than two reference points on the left and right sides, as many as possible are counted.

[0065] Taking the i-th data point in the original speech signal as an example, the data before the i-th data point reference points and the i-th data point reference point, recorded as the target reference point of the i-th data point;

[0066] The weight of each data point is obtained according to the significance value of the target reference point of the i-th data point, the amplitude of the i-th data point, and the Euclidean distance between the reference points farthest in time series within the neighborhood of the i-th data point;

[0067] The calculation formula is as follows:

[0068]

[0069] Where W x represents the filter weight of the xth data point in the original speech signal, q x,y represents the saliency value of the yth target reference point of the xth data point in the original speech signal, F x represents the amplitude of the xth data point in the original speech signal, d(x,y) represents the maximum value of the distance from the xth data point to all target reference points of the xth data point in the original speech signal, and Zx represents the number of target reference points for the xth data point in the original speech signal, and norm[] represents the linear normalization function.

[0070] Specifically, It represents the average significance value of the reference points of the neighborhood data points of the ith data point. When the number of reference points in the neighborhood data points of the ith data point is greater and the significance value is greater, it means that the degree of change of the data in the segment is greater, which means that the data segment is more affected by noise, so the filtering weight is greater. It should be noted that in this embodiment, two reference points on the left and right of each data point are selected as the neighborhood range of the data point. d(j,i) represents the distance between the ith data point and the jth reference point farthest in the time series within the neighborhood range of the ith data point. Because there are multiple selected reference points, when calculating here, the Euclidean distance of the reference point with the largest time series distance from the ith data point is calculated. The greater the distance, the smaller the continuity between the reference point and the data point in the data segment, so the current data point is less affected by noise. On the contrary, the smaller the distance, the greater the degree of noise influence on the data point.

[0071] At this point, the filtering weight of each data point is obtained.

[0072] Step S004: Adaptively filter and denoise the original speech signal according to the filter weight of each data point, and control the insulin injection pen according to the denoised speech signal.

[0073] According to the obtained filtering weight of each data point, the original speech signal is then denoised by the LMS algorithm to obtain a denoised speech signal, which is recorded as a denoised speech signal. The LMS algorithm is a well-known technology and will not be described in detail here.

[0074] Then the insulin injection pen is controlled according to the denoised speech signal. The control process is as follows:

[0075] Get the command operation library corresponding to the voice-controlled insulin injection pen; when the insulin injection pen receives the denoised voice signal, it uses ASR speech recognition technology to identify the voice content in the denoised voice signal, obtains keywords, and then uses Aho-

[0076] The Corasick algorithm matches the keywords identified in the denoised voice signal with the keywords in the operation library; after a successful match, the corresponding voice command is obtained. What needs to be explained is that the voice commands in the command operation library are "start", "stop", etc., taking this as an example, other embodiments can be limited by themselves; then the voice command is sent to the voice-controlled insulin injection pen, and the voice-controlled insulin injection pen executes the voice command; when the keyword in the voice signal is not recognized during voice recognition, the voice-controlled insulin injection pen reminds the patient to re-send the voice signal required to implement the corresponding function through voice broadcast, and performs voice recognition again. Thereby completing the voice control of the insulin injection pen. The above-mentioned ASR speech recognition technology and Aho-Corasick algorithm are both existing well-known technologies and will not be repeated here.

[0077] As a specific implementation method, multiple dialect information data are collected in advance, the voice features of each dialect are screened out, and a dialect information database is generated. When the collected voice signal is a dialect, the dialect voice signal is pre-processed by reinforcement learning technology to screen out the dialect voice features, which can more accurately recognize the user's voice command, thereby improving the accuracy of voice recognition; the dialect voice features to be recognized are compared with the dialect information database, the dialect is recognized and converted into Mandarin voice features.

[0078] As another specific implementation, multiple commonly used injection dosage data are collected in advance, safety thresholds for each commonly used injection dosage data are set, and an information database of injection dosage and corresponding safety thresholds is generated. When the voice instruction of the injection dosage is sent to the voice-controlled insulin injection pen, the voice-controlled insulin injection pen can better understand the user's language needs when executing the voice instruction of the injection dosage through reinforcement learning technology, so as to more accurately control the injection dosage within the corresponding safety threshold; in addition, the dialogue process can be managed through reinforcement learning technology to improve the fluency of human-computer dialogue.

[0079] Through the above steps, a voice control method for a voice-controlled insulin injection pen based on reinforcement learning is completed.

[0080] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A voice control method for a voice-controlled insulin injection pen based on reinforcement learning, characterized in that: The method comprises the following steps: Acquire an original speech signal, wherein the original speech signal includes a plurality of data points, each data point corresponding to a time and an amplitude; Decomposing the original speech signal to obtain multiple component signals of the original speech signal, obtaining the extreme value point of each component signal; obtaining the possibility that each data point in the original speech signal is a reference point according to the amplitude of the extreme value point of each component signal; and selecting a number of reference points from all data points according to the possibility that each data point in the original speech signal is a reference point; Obtaining the significance value of each reference point according to the possibility that each reference point is a reference point and the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal; obtaining the filtering weight of each data point according to the amplitude of each data point in the original speech signal and the significance value of the reference point; According to the filter weight of each data point, the original speech signal is denoised using the LMS algorithm to obtain a denoised speech signal; the insulin injection pen is voice-controlled according to the denoised speech signal.

2. According to claim 1, a voice control method for a voice-controlled insulin injection pen based on reinforcement learning is characterized in that: The method of obtaining the possibility of each data point in the original speech signal being a reference point according to the amplitude of the extreme point of each component signal includes the following specific steps: The time corresponding to the extreme points of all component signals is recorded as the standard time; based on the amplitude of the data points in the original speech signal and different component signals corresponding to the standard time and the distance between the data points, the possibility of the data point corresponding to each standard time in the original speech signal being the reference point is obtained.

3. The voice control method for a voice-controlled insulin injection pen based on reinforcement learning according to claim 2, characterized in that: The method of obtaining the possibility that each data point corresponding to the standard time in the original speech signal is a reference point according to the amplitude of the data points in the original speech signal and the different component signals and the distance between the data points according to the standard time includes the following specific steps: The first feature is obtained according to the amplitude difference of data points at standard time in different component signals; the second feature is obtained according to the amplitude difference of different data points in the same component signal and the Euclidean distance between different data points in the same component signal; based on the first feature and the second feature, the possibility of the data point corresponding to each standard time in the original speech signal being a reference point is obtained.

4. The voice control method for a voice-controlled insulin injection pen based on reinforcement learning according to claim 3 is characterized in that: According to the first feature and the second feature, the probability that the data point corresponding to each standard time in the original speech signal is a reference point is obtained, and the calculation formula is as follows: In the formula, p i Indicates the possibility that the data point corresponding to the i-th standard time in the original speech signal is the reference point, F li represents the amplitude of the data point corresponding to the i-th standard time in the l-th component signal, F fi represents the amplitude of the data point corresponding to the fth component signal at the i-th standard time, F l(i+1) represents the amplitude of the data point corresponding to the lth component signal at the i-1th standard time, F l(i-1) represents the amplitude of the data point corresponding to the lth component signal at the i-1th standard time, d l (i,i+1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the l-th component signal and the data point corresponding to the i+1-th standard time in the l-th component signal, d l (i,i-1) represents the Euclidean distance between the data point corresponding to the i-th standard time in the l-th component signal and the data point corresponding to the i-1-th standard time in the l-th component signal, n represents the number of component signals, and norm{} represents the linear normalization function; is the first feature of the data point corresponding to the i-th standard time in the original speech signal; is the second feature of the data point corresponding to the i-th standard time in the original speech signal, and || is the absolute value function.

5. The voice control method for a voice-controlled insulin injection pen based on reinforcement learning according to claim 1, characterized in that: The specific steps of selecting a plurality of reference points from all data points according to the possibility that each data point in the original speech signal is a reference point are as follows: A threshold T1 is preset. When the probability that the ith data point in the time series is a reference point is greater than or equal to T1, the ith data point is recorded as a reference point.

6. The voice control method for a voice-controlled insulin injection pen based on reinforcement learning according to claim 1, characterized in that: The specific steps of obtaining the significant value of each reference point according to the possibility that each reference point is a reference point and the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal are as follows: Obtaining the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal and the variance of the probability that the reference point and surrounding reference points are reference points; The significance value of each reference point is obtained according to the probability that the reference point in the original speech signal is the reference point, the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal, and the variance of the probability that the reference point and the surrounding reference points are the reference points.

7. The method for voice control of a voice-controlled insulin injection pen based on reinforcement learning according to claim 6, characterized in that: The method of obtaining the significance value of each reference point according to the possibility that the reference point in the original speech signal is the reference point, the difference between the amplitude of the reference point and the maximum amplitude in the original speech signal, and the variance of the possibility that the reference point and surrounding reference points are the reference points comprises the following specific steps: In the formula, q j represents the significance value of the jth reference point, p j Indicates the possibility that the jth reference point is the reference point, maxF Indicates the maximum amplitude of the data point in the original speech signal, F j represents the amplitude of the jth reference point, p j-r Indicates the possibility that the jrth reference point is the reference point, F j-r represents the amplitude of the jrth reference point, m is the number of preset neighborhood reference points, s[p(jr,j)] represents the variance of the possible degree that all reference points between the jrth reference point and the jth reference point are reference points, and T(jr,j) represents the time series length between the jrth reference point and the jth reference point.

8. The voice control method for a voice-controlled insulin injection pen based on reinforcement learning according to claim 1, characterized in that: The specific steps of obtaining the filtering weight of each data point according to the amplitude of each data point in the original speech signal and the significant value of the reference point are as follows: The number of preset reference points is a. In the original speech signal, the number of reference points before the i-th data point is reference points and the i-th data point reference point, recorded as the target reference point of the i-th data point; The weight of each data point is obtained according to the saliency value of the target reference point of the ith data point, the amplitude of the ith data point, and the distance from the ith data point to the target reference point of the xth data point.

9. The method for voice control of a voice-controlled insulin injection pen based on reinforcement learning according to claim 8, characterized in that: The weight of each data point is obtained according to the saliency value of the target reference point of the i-th data point, the amplitude of the i-th data point, and the distance from the i-th data point to the target reference point of the x-th data point. The calculation formula is as follows: Where W x represents the filter weight of the xth data point in the original speech signal, q x,y represents the saliency value of the yth target reference point of the xth data point in the original speech signal, F x represents the amplitude of the xth data point in the original speech signal, d(x,y) represents the maximum value of the distance from the xth data point to all target reference points of the xth data point in the original speech signal, and Z x represents the number of target reference points for the xth data point in the original speech signal, and norm[] represents the linear normalization function.

10. The voice control method for a voice-controlled insulin injection pen based on reinforcement learning according to claim 1, characterized in that: The specific steps of voice controlling the insulin injection pen according to the denoised voice signal are as follows: Get the command operation library corresponding to the voice-controlled insulin injection pen; ASR speech recognition technology is used to identify the speech content in the denoised speech signal and obtain keywords. The Corasick algorithm matches the keywords in the command operation library, obtains the voice command, sends the voice command to the voice-controlled insulin injection pen, and the voice-controlled insulin injection pen executes the voice command.

Citation Information

Patent Citations

  • Voice enhancement method and device, computer device and storage medium

    CN108682429A

  • Audio data optimization and noise reduction method and system

    CN117373471A

  • Sound data processing method and system

    CN118609586A