Custom instruction template acquisition method and device
By obtaining and detecting the target signals of the standstill period and the instruction input period in the furniture intelligent system, performing quality detection and feature extraction, the limitations of the custom interactive instruction template entry method in the existing technology are solved, and high-quality instruction template entry and equipment response accuracy are improved.
Patent Information
- Application Number
- CN202510685907.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-05-27
AI Technical Summary
In the existing furniture intelligent system, the custom interactive instruction template entry method has limitations and is easily affected by environmental factors and user operating habits, which makes it difficult to guarantee the quality of the instruction template and affects the identification and execution effect of the equipment.
Provide a custom instruction template acquisition method. By obtaining the target signals of the standstill period and the instruction input period, quality detection and feature extraction are performed, and after ensuring that the signal quality meets the preset conditions, similarity matching and instruction template entry are performed, and forward or reverse updates are performed based on the instruction feedback status.
Effectively screen out low-quality signals interfered by factors such as the environment, ensure the reliability of entering the instruction template, improve the accuracy of instruction recognition and user experience, and reduce the possibility of users re-entering the instruction template.
Smart Images

Figure CN120217014A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of human-computer interaction, and in particular, to a method and device for obtaining a custom instruction template. Background Art
[0002] With the rapid development and continuous innovation of science and technology, the intelligentization process in the furniture field has been accelerating continuously. Nowadays, not only the degree of intelligentization of furniture products is increasing day by day, but also their functions are becoming more and more diverse. Against this background, users have put forward higher requirements for the convenience and personalized experience of using furniture-related functions. How to ensure convenient operation while fully meeting the personalized needs of users has become one of the core issues that need to be focused on and solved during the research and optimization of major products.
[0003] Currently, in the furniture intelligent system, there are mainly two implementation forms for the existing custom interaction instruction templates. The first form is to directly construct an instruction template based on the input information of the user. Common input methods include keyboard input, mouse click operation, and joystick swing control, etc. The system will arrange and combine this series of input information to generate specific interaction instructions. The second form is to extract features from the information input by the user, and form interaction instructions through analysis and processing of relevant features. In the custom setting state, the user can bind these interaction instructions to the relevant functions of the furniture, so that when the device receives the corresponding instruction, it can accurately execute the corresponding function.
[0004] However, the existing input methods for interaction instruction templates have obvious limitations. Basically, the existing instruction templates all adopt a single-entry mode. Once the instruction template is entered into the system, it will be fixedly stored. Only when it is re-entered next time will the instruction template be updated. During the process of instruction entry, due to various factors such as environmental factors (such as electromagnetic interference, operation space limitation, etc.) and user operation habits, the quality of the instruction template is often difficult to be effectively guaranteed. These factors may cause deviations or incompleteness in the instruction entry, thus affecting the subsequent recognition and execution effects of the instruction by the device, reducing the user experience and the intelligent level of the device. Summary of the Invention
[0005] Based on this, it is necessary to provide a method and device for obtaining a custom instruction template for the above technical problems, so as to solve at least one of the problems existing in the above prior art.
[0006] In the first aspect, a method for obtaining a custom instruction template is provided, including: Obtain a custom instruction template entry request sent by a target user; Based on the custom instruction template entry request, obtain the target signal during the static period and the target signal during the instruction entry period, where the static period refers to the time threshold for the target user to keep the device static, and the instruction entry period refers to the duration after the static period to prompt the target user to enter the custom instruction template; Perform quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; If the quality detection result meets the preset quality conditions, extract features from the target signal during the instruction entry period to obtain signal features; Determine the similarity between the signal features and the corresponding signal features of the pre-stored custom instruction template; If the similarity meets the preset similarity conditions, the custom instruction template entry is successful; otherwise, the custom instruction template entry fails, and a prompt message is output, where the custom instruction template is updated positively or negatively based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.
[0007] In one embodiment, the performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result includes: Based on the target signal during the static period and the target signal during the instruction entry period, determine the signal-to-noise ratio; Based on the target signal during the instruction entry period, determine the signal complexity.
[0008] In one embodiment, the determining the signal-to-noise ratio based on the target signal during the static period and the target signal during the instruction entry period includes: Perform baseline removal on the target signal during the static period and calculate the energy intensity during the static period of the target signal after baseline removal; Perform baseline removal on the target signal during the instruction entry period and calculate the energy intensity during the instruction entry period of the target signal after baseline removal; Determine the energy intensity ratio between the energy intensity during the instruction entry period and the energy intensity during the static period; Based on the energy intensity ratio, determine the signal-to-noise ratio.
[0009] In one embodiment, the determining the signal complexity based on the target signal during the instruction entry period includes: Determine the initial signal complexity; Perform differential processing on the target signal during the instruction entry period to obtain a differential signal; Determine whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold; If so, increase the initial signal complexity by a preset value to obtain the final signal complexity.
[0010] In one embodiment, the quality inspection results include signal-to-noise ratio, signal complexity, and energy intensity during the static period. If the quality inspection results meet the preset quality conditions, feature extraction is performed on the target signal during the instruction input period, including: If the signal-to-noise ratio is greater than the preset signal-to-noise ratio threshold, the signal complexity is greater than the first preset signal complexity threshold and less than the second preset signal complexity threshold, and the energy intensity during the static period is less than the preset energy intensity threshold, then feature extraction is performed on the target signal.
[0011] In one embodiment, performing feature extraction on the target signal to obtain signal features includes: Performing differential processing on the target signal during the instruction input period to obtain a differential signal; Performing filtering processing on the differential signal to obtain a filtered signal; Performing sliding window processing on the filtered signal to obtain a signal after sliding window processing; Based on the signal after sliding window processing, calculating a first time interval between adjacent valid maxima, a second time interval between adjacent valid minima, and a third time interval between adjacent valid maxima and valid minima; Composing the first time interval, the second time interval, and the third time interval into a signal feature array of the target signal.
[0012] In one embodiment, the method further includes: Obtaining the current instruction and determining the similarity between the current instruction and each pre-stored instruction template; If the similarity is greater than the preset similarity threshold, obtaining the instruction feedback status; If the instruction feedback status is positive feedback, performing forward update on the corresponding instruction template; If the instruction feedback status is negative feedback, performing reverse update on the corresponding instruction template.
[0013] In one embodiment, when the instruction feedback status is positive feedback, performing forward update on the corresponding instruction template includes: Obtaining the first status information of the current instruction; Obtaining the second status information of the most recent template forward update from the forward update record; Based on the first status information and the second status information, performing parameter update on the template feature array corresponding to the current function.
[0014] In one embodiment, when the instruction feedback status is negative feedback, performing reverse update on the corresponding instruction template includes: Obtaining the third status information of the current instruction; Obtain the fourth status information of the most recent forward update of the template from the forward update record, where the status information includes the number of reverse updates and the instruction template before the most recent update; Obtain the fifth status information of the penultimate forward update instruction from the forward update record; If the number of reverse updates is greater than a preset threshold, set the instruction template before the most recent update as the instruction template bound to the current function, and update the template forward update information; If the number of reverse updates of the template is not greater than the preset threshold, update the parameters of the template feature array corresponding to the current function based on the third status information, the fourth status information, and the fifth status information.
[0015] In a second aspect, a custom instruction template acquisition device is provided, including: An index template custom request unit for obtaining a custom instruction template entry request sent by a target user; A signal acquisition unit for obtaining a target signal during the static period and a target signal during the instruction entry period based on the custom instruction template entry request, where the static period refers to the time threshold for the target user to keep the device static, and the instruction entry period refers to the duration after the static period to prompt the target user to enter a custom instruction template; A signal quality detection unit for performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; A feature extraction unit for extracting features from the target signal during the instruction entry period if the quality detection result meets a preset quality condition to obtain signal features; A similarity matching unit for determining the similarity between the signal features and the signal features corresponding to the pre-stored custom instruction template; A custom instruction template processing unit for determining that the custom instruction template entry is successful if the similarity meets a preset similarity condition, otherwise, the custom instruction template entry fails and a prompt message is output, where the custom instruction template is updated forward or backward based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.
[0016] The above-mentioned method and device for obtaining a custom instruction template, the implementation of the method includes: obtaining a custom instruction template entry request sent by a target user; based on the custom instruction template entry request, obtaining a target signal during a static period and a target signal during an instruction entry period, where the static period refers to a time threshold for the target user to keep the device static, and the instruction entry period refers to the duration after the static period for prompting the target user to enter a custom instruction template; performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; if the quality detection result meets a preset quality condition, extracting features from the target signal during the instruction entry period to obtain signal features; determining the similarity between the signal features and the corresponding signal features of a pre-stored custom instruction template; if the similarity meets a preset similarity condition, the entry of the custom instruction template is successful, otherwise, the entry of the custom instruction template fails, and a prompt message is output, where the custom instruction template is updated positively or negatively based on an instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback. In the embodiments of the present application, by collecting target signals during the static period and the instruction entry period and performing quality detection on them, low-quality signals interfered by factors such as the environment can be effectively filtered out, ensuring the reliability of the entered instruction template. Only signals that meet the preset quality conditions will have their features extracted and matched with the features of the pre-stored template, thereby ensuring a high similarity between the newly entered template and the existing template at the feature level, improving the accuracy of instruction recognition. If the similarity meets the standard, the entry is successful, otherwise a prompt message is output, avoiding the entry of incorrect or low-quality instruction templates, greatly improving the quality of custom instruction template entry, optimizing the personalized interaction experience of users in the furniture intelligent scenario, and enhancing the response accuracy and execution effect of the device to user instructions. Brief Description of the Drawings
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments of the present invention. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 It is a schematic diagram of an application environment of a method for obtaining a custom instruction template in an embodiment of the present invention; Figure 2 It is a schematic flowchart of a method for obtaining a custom instruction template in an embodiment of the present invention; Figure 3 It is a network architecture diagram of a feature extraction model in an embodiment of the present invention; Figure 4 It is a schematic flowchart of a template update method in an embodiment of the present invention; Figure 5 It is a schematic structural diagram of a custom instruction template acquisition device in an embodiment of the present invention; Figure 6 It is a schematic diagram of a computer device in an embodiment of the present invention. Detailed implementation manners
[0019] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0020] The custom instruction template acquisition method provided in this embodiment can be applied to an application environment such as Figure 1 S1 cloud server, which is mainly used for user information storage and information distribution, etc. The information includes but is not limited to the personal information of the user, the instruction information of the user. The instruction information includes default interaction instruction information, user-defined instruction templates and template update record information; S2 user terminal (pre-installed with an APP), which is mainly used for pulling up custom instruction entry, prompting during the custom instruction entry process, prompting the result of custom instruction entry, storing the instruction information entered by the device terminal and uploading it to the server, etc.; S3 device terminal, whose main function is to execute the custom instruction entry action, and mainly includes a signal acquisition module, a signal quality judgment module, a feature extraction module, an instruction detection module, an instruction feedback module, and an instruction update module.
[0021] Among them, the user terminal communicates with the cloud server, and the device terminal communicates with the user terminal and the cloud server respectively. Among them, the user terminal includes but is not limited to various personal computers, laptop computers, smart phones, tablet computers and portable wearable devices. The cloud server can be implemented by an independent server or a server cluster composed of multiple servers. The device terminal can be a smart home device such as a smart bed or a smart mattress.
[0022] In an embodiment, as Figure 2 shown, a custom instruction template acquisition method is provided. Taking the method applied to the Figure 1 device terminal as an example, the method includes the following steps: In step S110, obtain a custom instruction template entry request sent by a target user; Optionally, the user can initiate the custom instruction template entry function on the user side through a pre-installed APP. For example, the user can click on a specified control (such as button, switch and other interface elements) on a specific page of the APP to bind the custom instruction template to the function. After the APP completes the function binding, the user side will send the instruction for custom instruction entry to the device side, informing the device side to start receiving the custom instruction entry operation of the user.
[0023] It should be noted that the custom instruction template is a mode that allows users to set specific instruction rules according to their own needs and habits. Through this template, users can bind specific operations or functions to the instructions they define to achieve a personalized interaction experience. For example, in terms of lighting control, users can customize instructions to adjust the lights; for a smart bed, instructions for raising the head of the bed to a preset angle or laying it flat can be set; in the control of multimedia devices, instructions such as turning on the TV can be customized.
[0024] In step S120, based on the custom instruction template entry request, obtain the target signal during the static period and the target signal during the instruction entry period; It should be noted that the static period refers to the time threshold TH1 during which the target user keeps the device static, such as 15 seconds, that is, the time when no operation is performed and the device is in a relatively static state. The instruction entry period refers to the duration after the static period to prompt the target user to enter the custom instruction template. The duration is the time threshold TH2. It can be understood that after the static period ends, the target user can be prompted to enter the custom instruction template, and the time length from the start of the prompt to the end of the entry operation is the instruction entry period, and this time length is determined by the preset time threshold TH2. For example, if TH2 is set to 5 minutes, then after the static period ends, the target user will be prompted to enter the custom instruction template, and the next 5 minutes will be the instruction entry period, during which the user needs to complete the relevant entry operation.
[0025] Optionally, when the device side receives a custom instruction template entry request sent by the user side, the device side can activate or start the signal acquisition module to perform target signal acquisition. The signal acquisition module is mainly used for signal acquisition of sensors. For example, sensors can be set in the target area of the device side (such as one end of the smart mattress in contact with the human body), and the sensors are connected to the device side in a wired manner (such as USB, network cable, etc.) or wirelessly (such as Wi-Fi, Bluetooth, ZigBee, etc.), ensuring that the device side has been correctly configured with the driver programs and parameters required for communicating with the sensors, such as the address of the sensor, communication protocol, etc. When the user opens the corresponding smart home APP, enters the relevant page, and enters a custom instruction template entry request, it can trigger the smart device to start or activate the signal acquisition module to receive the target signals collected by the sensors.
[0026] Among them, the sensor signals include, but are not limited to, one or more of ballistocardiogram (BCG), pressure sensor signals, array pressure sensor signals, audio signals, and video signals.
[0027] It should be noted that the user side can provide instruction entry process prompts. The process prompts include the instruction template entry process, which includes a static period and an instruction entry period, so as to collect the sensor signals during the static period and the sensor signals during the instruction entry period respectively.
[0028] In step S130, quality detection is performed on the target signals during the static period and the target signals during the instruction entry period to obtain a signal quality detection result; Optionally, it can enter the signal quality detection module, and the signal quality detection module performs quality detection on the target signals during the static period and the target signals during the instruction entry period, calculates the signal-to-noise ratio and signal complexity of the signals, and determines the quality detection result based on the signal-to-noise ratio and signal complexity.
[0029] It should be noted that if the signal-to-noise ratio is too low, it may be due to the unclear action characteristics of the input user or excessive background noise; if the signal complexity is too high, it indicates that the user input instruction is too complex, which may be due to too many action combinations or a too noisy environment; if the signal complexity is too low, it indicates that the user input instruction is too simple, which may be due to too few actions or low sensitivity of the sensor to actions.
[0030] In step S140, if the quality detection result meets the preset quality conditions, feature extraction is performed on the target signals during the instruction entry period to obtain signal features; Optionally, the quality detection result may include the signal-to-noise ratio and signal complexity and the energy intensity during the static period. If the signal-to-noise ratio is greater than the preset threshold TH4, and the signal complexity is greater than the preset threshold TH5, less than the preset threshold TH6, and the energy intensity during the static period is less than the preset threshold TH7. It indicates that the preset quality conditions are met. At this time, the feature extraction module can be entered, and the feature extraction module extracts features from the target signal during the instruction template input period. For example, the features can be extracted through a pre-trained model, such as a signal processing model, a neural network model, etc.
[0031] It should be noted that if the preset quality conditions are not met, corresponding prompt information can be output. For example, if the energy intensity during the static period does not meet the requirements, that is, the energy intensity during the static period is not less than the preset threshold TH7, then prompt "Please keep the environment quiet and do not touch the device before entering the instruction". If the signal-to-noise ratio does not meet the requirements, that is, the signal-to-noise ratio is not greater than the preset threshold TH4, then prompt "The instruction input action is too light or the sensor device is abnormal". If the signal complexity does not meet the requirements, that is, the signal complexity is not greater than the preset threshold TH5, then prompt "The instruction input action is too simple or too complex".
[0032] As Figure 3 shown, taking the neural network model as an example, this neural network model can be the basic interaction instruction recognition network obtained by removing the last fully connected layer after pre-training. It can sequentially include Convolution 1, Rectified Linear Unit 1, Convolution 2, Rectified Linear Unit 2, and Max Pooling. Among them, the first layer of Convolution 1 consists of 32 convolution kernels with a size of 3*3, a stride of 2, and a padding of 1. Then it is input into the second layer of Rectified Linear Unit 1 for processing. The third layer of Convolution 2 consists of 32 convolution kernels with a size of 3*3, that is, neurons, a stride of 2, and a padding of 1. It is input into the fourth layer and processed through Rectified Linear Unit 2. Finally, it undergoes downsampling processing through a pooling layer with a size of 3*3, a stride of 2, and a padding of 0 to extract the signal features.
[0033] In step S150, determine the similarity between the signal features and the signal features corresponding to the pre-stored custom instruction template; Optionally, all pre-stored custom instruction template data can be obtained, which may include feature arrays corresponding to respective custom instruction templates. Then, the extracted signal feature array can be calculated for similarity with the feature arrays corresponding to respective custom instruction templates. For example, the correlation coefficient between the two can be calculated through the Pearson correlation coefficient; when the correlation coefficient is close to 1, it indicates that the feature array has a high positive correlation with the pre-stored template, that is, a high similarity; when it is close to -1, it indicates a high negative correlation; when it is close to 0, it indicates a weak linear correlation between the two and a low similarity. Or the Euclidean distance between the two can be calculated through the Euclidean distance algorithm, etc. The smaller the distance, the more similar the feature array is to the pre-stored template in terms of features; the larger the distance, the lower the similarity.
[0034] In step S160, if the similarity meets the preset similarity condition, the custom instruction template is successfully entered; otherwise, the custom instruction template entry fails, and a prompt message is output. Among them, the custom instruction template is updated forward or backward based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.
[0035] Optionally, if the similarity meets the preset similarity condition, for example, is greater than the preset threshold TH11, a successful entry prompt can be popped up on the user side; the device side synchronizes the custom instruction template to the user side, and the user side uploads the custom instruction template and the bound function to the cloud server; the cloud server detects whether there is already a custom instruction template associated with the bound function. If so, the historical custom instruction template information related to this function is cleared. If the preset similarity condition is not met, for example, is less than or equal to the preset threshold TH11, a prompt message is output, such as "There are instructions that are too similar", and the bound function name of the instruction with the highest similarity is popped up.
[0036] When relevant instructions with a similarity greater than a preset threshold to the custom instruction template are detected, the device side can trigger the response function and enter the instruction feedback module to obtain the instruction feedback status. Among them, this instruction feedback module is for obtaining the user feedback after triggering the relevant function. Among them, the instruction feedback status can include positive feedback and negative feedback. Within the time threshold after the user triggers the corresponding function through the custom instruction, monitor in real time the specific function stop instruction and whether the function is actively stopped by the user. The function stop instruction is a basic interaction instruction, which is a fixed preset action and can be a simple multiple consecutive taps on the specified part of the device, such as the head position of the smart bed. If the function stop instruction or the user actively stops the function is detected, the function execution situation of this custom instruction is considered negative feedback. At this time, it can enter the instruction update module, and the custom instruction template is updated in reverse. The corresponding instruction template refers to the custom instruction template with the highest similarity to the current instruction. If the function stop instruction or the user does not actively stop the function is not detected, it is considered that the function execution situation of this custom instruction is positive feedback. At this time, it can enter the instruction update module and perform a forward update on the custom instruction template with the highest similarity to the current instruction (i.e., the corresponding instruction template). By setting the forward update and reverse update mechanisms of the instruction template, the instruction template can change following the user's usage habits, etc., reducing the possibility of the user re-entering a single instruction template multiple times.
[0037] Among them, the similarity can calculate the correlation between the feature array and the pre-stored template through the Pearson correlation coefficient. When the correlation coefficient is close to 1, it indicates a high positive correlation between the feature array and the pre-stored template, that is, a high similarity; when it is close to -1, it indicates a high negative correlation; when it is close to 0, it indicates a weak linear correlation between the two and a low similarity. Or calculate the Euclidean distance between the two through the Euclidean distance algorithm, etc. The smaller the distance, the more similar the feature array and the pre-stored template are in features; the larger the distance, the lower the similarity. Finally, the maximum similarity value can be selected to determine whether the maximum similarity value is greater than the preset similarity threshold TH12, such as 0.8. If so, it is considered that the match is successful, and the current instruction is used as the relevant instruction of the custom instruction template with the highest similarity.
[0038] In an embodiment of the present application, a method for obtaining a custom instruction template is provided, including: obtaining a custom instruction template entry request sent by a target user; based on the custom instruction template entry request, obtaining a target signal during the static period and a target signal during the instruction entry period, where the static period refers to the time threshold for the target user to keep the device static, and the instruction entry period refers to the duration after the static period for prompting the target user to enter a custom instruction template; performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; if the quality detection result meets a preset quality condition, extracting features from the target signal during the instruction entry period to obtain signal features; determining the similarity between the signal features and the corresponding signal features of the pre-stored custom instruction template; if the similarity meets a preset similarity condition, the custom instruction template entry is successful, otherwise, the custom instruction template entry fails, and a prompt message is output, where the custom instruction template is updated positively or negatively based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback. In the embodiment of the present application, by collecting the target signals during the static period and the instruction entry period and performing quality detection on them, low-quality signals interfered by factors such as the environment can be effectively filtered out, ensuring the reliability of the entered instruction template. Only signals that meet the preset quality conditions will have their features extracted and matched with the features of the pre-stored template, thereby ensuring a high similarity between the newly entered template and the existing template at the feature level and improving the accuracy of instruction recognition. If the similarity meets the standard, the entry is successful, otherwise, a prompt message is output, avoiding the entry of incorrect or low-quality instruction templates, greatly improving the quality of custom instruction template entry, optimizing the personalized interaction experience of users in the furniture intelligent scenario, and enhancing the response accuracy and execution effect of the device to user instructions.
[0039] In an embodiment of the present application, the performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result includes: Based on the target signal during the static period and the target signal during the instruction entry period, determining the signal-to-noise ratio; Based on the target signal during the instruction entry period, determining the signal complexity.
[0040] Optionally, the signal-to-noise ratio and the signal complexity of the target signals collected during the static period and the instruction entry period can be calculated. The signal-to-noise ratio can be the difference between the ratio of the energy intensity during the instruction entry period to the energy intensity during the static period and 1. The signal complexity can be determined by performing differential processing on the signals during the instruction entry period and then determining the maximum value points of the differential signals and a preset threshold TH3. For example, if the maximum value is greater than the preset threshold TH3, the signal complexity is set to 1, otherwise it is set to 0. The difference between the ratio of the energy intensity during the instruction entry period to the energy intensity during the static period and 1. The signal complexity can be determined by performing differential processing on the signals during the instruction entry period and then determining the maximum value points of the differential signals and a preset threshold TH3. For example, if the maximum value is greater than the preset threshold TH3, the signal complexity is set to 1, otherwise it is set to 0.
[0041] It should be noted that if the signal-to-noise ratio is too low, it may indicate that the action characteristics of the input user are not obvious or the background noise is too high; if the signal complexity is too high, it indicates that the user input instruction is too complex, which may be caused by too many action combinations or too noisy environment; if the signal complexity is too low, it indicates that the user input instruction is too simple, which may be caused by too few actions or too small response of the sensor to the action.
[0042] In an embodiment of the present application, determining the signal-to-noise ratio based on the target signal in the static period and the target signal in the instruction input period includes: Perform baseline removal processing on the target signal in the static period, and calculate the energy intensity in the static period of the target signal after baseline removal; Perform baseline removal processing on the target signal in the instruction input period, and calculate the energy intensity in the instruction input period of the target signal after baseline removal; Determine the energy intensity ratio between the energy intensity in the instruction input period and the energy intensity in the static period; Determine the signal-to-noise ratio based on the energy intensity ratio.
[0043] Optionally, the baseline usually refers to a slow-changing trend or DC component in the signal. In many actual signals, the existence of this baseline may interfere with the analysis of useful information in the signal. Therefore, after obtaining the target small signal in the static period and the target signal in the instruction input period, baseline removal processing can be performed respectively, such as high-pass filtering, empirical mode decomposition algorithm, wavelet transform, etc. Then, the energy intensity in the static period and the energy intensity in the instruction input period after baseline removal can be calculated respectively. Among them, the energy intensity in the static period can be the sum of the absolute values of the signals of the time threshold TH1 in the static period / TH1. The energy intensity in the instruction input period can be the sum of the absolute values of the signals of the time threshold TH2 in the instruction input period / TH2. Then, the ratio of the energy intensity in the instruction input period to the energy intensity in the static period can be calculated . Then the signal-to-noise ratio .
[0044] In an embodiment of the present application, determining the signal complexity based on the target signal in the instruction input period includes: Determine the initial signal complexity; Perform differential processing on the target signal in the instruction input period to obtain a differential signal; Determine whether the amplitude of the maximum value of the differential signal is greater than a preset amplitude threshold; If so, increase the initial signal complexity by a preset value to obtain the final signal complexity.
[0045] Optionally, the initial signal complexity can be Set it to 0. Then, the target signal in the instruction input period can be differentially processed, such as first-order difference or second-order difference, to obtain a differential signal. Perform a maximum value search on the differential signal and determine whether the amplitude of the searched maximum value is greater than the preset threshold TH3. If so, the signal complexity is incremented by 1; otherwise, it remains set to 0, thereby obtaining the signal complexity.
[0046] Among them, the preset amplitude threshold is strongly related to the sensor characteristics and can be obtained in the following way: Let the device perform a preset action, collect signals through relevant sensors, calculate the maximum value of the signal amplitude caused by different actions, and then statistically calculate the lower quartile of the amplitudes of all the tested actions. Then, this threshold is the lower quartile * a certain coefficient, such as 0.75.
[0047] In an embodiment of the present application, the quality detection result includes the signal-to-noise ratio, signal complexity, and energy intensity during the static period. If the quality detection result meets the preset quality conditions, feature extraction is performed on the target signal in the instruction input period, including: If the signal-to-noise ratio is greater than the preset signal-to-noise ratio threshold, the signal complexity is greater than the first preset signal complexity threshold and less than the second preset signal complexity threshold, and the energy intensity during the static period is less than the preset energy intensity threshold, then feature extraction is performed on the target signal.
[0048] Optionally, the quality detection result may include the signal-to-noise ratio , signal complexity and energy intensity during the static period. If the signal-to-noise ratio is greater than the preset threshold TH4, the signal complexity is greater than the first preset signal complexity threshold TH5, which can be obtained from an empirical value and is used to limit the number of actions, with a value such as 3, and less than the second preset signal complexity threshold TH6, which is obtained from experience and is used to limit the number of actions, with a value such as 15, and the energy intensity during the static period is less than the preset energy intensity threshold TH7. Then, it indicates that the preset quality conditions are met. At this time, the feature extraction module can be entered, and feature extraction is performed on the target signal in the instruction template input period through the feature extraction module. For example, feature extraction can be performed through a trained model, such as a signal processing model, a neural network model, etc.
[0049] Among them, the preset energy intensity threshold TH7 is strongly related to the sensor characteristics and can be determined in the following way: The relevant sensor can be placed statically in different environments, including strong electromagnetic sources, strong vibration sources, preset action interferences, etc., calculate the energy intensity during the static time, and statistically calculate the upper quartile of the energy intensities in all environments. This threshold is the upper quartile * a certain coefficient, such as 1.25.
[0050] In an embodiment of the present application, the feature extraction of the target signal to obtain signal features includes: Performing differential processing on the target signal in the instruction input period to obtain a differential signal; Performing filtering processing on the differential signal to obtain a filtered signal; Performing a sliding window process on the filtered signal to obtain a signal after the sliding window process; Based on the signal after the sliding window process, calculating a first time interval between adjacent valid maxima, a second time interval between adjacent valid minima, and a third time interval between adjacent valid maxima and valid minima; Composing the first time interval, the second time interval, and the third time interval into a signal feature array of the target signal.
[0051] Optionally, differential processing can be performed on the target signal in the instruction input period, such as first-order differential processing, to obtain a differential signal. Then, low-pass filtering processing can be performed on the differential signal to obtain a low-pass filtered signal. A sliding window operation is performed on the low-pass filtered signal, and a window of a fixed size is slid to move along the low-pass filtered signal in turn. The sliding window step size is 1 sampling point, and the window time length can be a preset time threshold TH8. For the signal data within the window, first take the absolute value of each data point (that is, change negative numbers to positive numbers), and then add up the absolute values of all data points within the window, and a series of calculation results will be obtained. These results are arranged in the order of window sliding to form the processed signal. Compared with the original low-pass filtered signal, the physical meaning and characteristics of the processed signal have changed, and it is more focused on reflecting the amplitude synthesis situation of the signal in different local time ranges, and can be used for subsequent further analysis, such as feature extraction, signal detection, etc.
[0052] Finally, based on the processed signal, all valid maxima and valid minima can be found, and the time intervals between adjacent valid maxima, the time intervals between adjacent valid minima, and the time intervals between adjacent valid maxima and valid minima are calculated, and the above time intervals are used as the feature array corresponding to the target signal in the instruction input period.
[0053] Among them, an effective maximum threshold and an effective minimum threshold are set. If the maximum value is greater than the effective maximum threshold, then the maximum value is considered an effective maximum; if the minimum value is less than the effective minimum threshold, then the minimum value is considered an effective minimum. Specifically, an effective maximum refers to that the amplitude of the maximum value needs to satisfy being greater than the preset threshold TH9, and an effective minimum refers to that the minimum value needs to be less than the preset threshold TH10.
[0054] In an embodiment of the present application, the method further includes: Obtain the current instruction and determine the similarity between the current instruction and each pre-stored instruction template; If the similarity is greater than the preset similarity threshold, obtain the instruction feedback status; If the instruction feedback status is positive feedback, update the corresponding instruction template positively; If the instruction feedback status is negative feedback, update the corresponding instruction template negatively.
[0055] Optionally, instruction detection can be performed in real time. For example, the instruction detection period can be configured. The instruction detection period can be the preset window time length TH2. The sensor signals of the preset window time length TH2 can be intercepted in real time, and the signal feature array of the sensor signals collected during the instruction detection period can be extracted. For example, the sensor signals can be differentially processed to obtain differential signals, the differential signals can be low-pass filtered to obtain low-pass filtered signals, and the low-pass filtered signals can be windowed to calculate the sum of the absolute values of the signals within the window to obtain the processed signals. Then, the effective maximum value and the effective minimum value are searched for in the processed signals, and the time intervals between adjacent effective maximum values, the time intervals between adjacent effective minimum values, and the time intervals between adjacent effective maximum values and effective minimum values are calculated. The above time intervals form a feature array. It should be noted that the effective maximum value refers to the maximum value amplitude greater than the preset threshold TH9, and the effective minimum value refers to the minimum value less than the preset threshold TH10.
[0056] Then, the instruction detection module can be entered. In the instruction detection module, the similarity between the signal features of the sensor signals and the signal feature arrays corresponding to the pre-stored respective defined instruction templates can be calculated respectively. For example, the correlation between the two can be calculated through the Pearson correlation coefficient. When the correlation coefficient is close to 1, it means that the feature array and the pre-stored template are highly positively correlated, that is, the similarity is very high; when it is close to -1, it means highly negative correlation; when it is close to 0, it means that the linear correlation between the two is very weak and the similarity is low. Or the Euclidean distance between the two can be calculated through the Euclidean distance algorithm, etc. The smaller the distance, the more similar the feature array and the pre-stored template are in terms of features; the larger the distance, the lower the similarity.
[0057] Finally, the maximum similarity value can be selected, and it is determined whether the maximum similarity value is greater than the preset similarity threshold TH12, such as 0.8. If so, it is considered that the matching is successful, and the current instruction is used as the corresponding instruction of the custom instruction template with the highest similarity. If the corresponding instruction is detected, the device side can activate the response function and enter the instruction feedback module to obtain the instruction feedback status. Among them, the instruction feedback module is for obtaining the user feedback after triggering the relevant function.
[0058] In one embodiment of the present application, when the instruction feedback status is negative feedback, reverse-updating the corresponding instruction template includes: Obtaining third status information of the current instruction; Obtaining fourth status information of the most recent template forward update from the forward update record, where the status information includes the number of reverse updates and the instruction template before the most recent update; Obtaining fifth status information of the instruction of the second-to-last forward update from the forward update record; If the number of reverse updates is greater than a preset threshold, setting the instruction template before the most recent update as the instruction template bound to the current function, and updating the template forward update information; If the number of template reverse updates is not greater than the preset threshold, updating the parameters of the template feature array corresponding to the current function based on the third status information, the fourth status information, and the fifth status information.
[0059] Optionally, the instruction feedback status may include positive feedback and negative feedback. Within a time threshold TH13 after the user triggers the corresponding function through a custom instruction, the specific function stop instruction and whether the function is actively stopped by the user are monitored in real time. The function stop instruction is a basic interaction instruction, which is a fixed preset action, and can be a simple multiple consecutive tapping on a specified part of the device, such as the head position of a smart bed. If a function stop instruction or the user actively stops the function is detected, the function execution situation of the current custom instruction is considered negative feedback. At this time, the instruction update module can be entered to reverse-update the corresponding instruction template, and the corresponding instruction template refers to the custom instruction template with the highest similarity to the current instruction.
[0060] When performing reverse update, the status information of the recognition instruction can be obtained first, and the status information can include the signal-to-noise ratio of the recognition instruction , the similarity between the recognition instruction and the corresponding template . Then, the status information of the most recent template forward update can be obtained from the forward update record, including the signal-to-noise ratio of the recognition instruction , the similarity between the recognition instruction and the template , the feature array of the recognition instruction , the instruction template before the update , the number of template reverse updates . And the signal-to-noise ratio of the second-to-last recognition instruction is obtained from the forward update record , the similarity between the recognition instruction and the corresponding template . If the number of template reverse updates is greater than a preset threshold TH15, which can be obtained from empirical values and is used to limit the number of incorrect updates, such as 3, then the instruction template before the most recent update Set the instruction template bound to the current function and update the forward update information of the template. The specific update method can be referred to the following example: Assume there are forward update records in the forward update information, and their signal-to-noise ratio, similarity, feature array, and instruction template before update are respectively:
[0061]
[0062]
[0063] If is greater than 1, delete the most recent forward update record, and at the same time set to 0; If the number of reverse updates of the template is not greater than the preset threshold TH15, then use the status information of the recognition instruction and the status information of the most recent template forward update to perform parameter update on the template feature array corresponding to the current function. Taking linear update as an example, its update process can be referred to: ; Among them, is the updated step size of the corrected instruction template, and its calculation method can be referred to: ; Among them and are fixed update thresholds, is the penalty term, among which the calculation method is referred to as follows: ; In an embodiment of the present application, when the instruction feedback state is positive feedback, the corresponding instruction template is forward updated, including: Obtain the first state information of the current instruction; Obtain the second state information of the most recent template forward update from the forward update records; Based on the first state information and the second state information, perform parameter update on the template feature array corresponding to the current function.
[0064] Optionally, the instruction feedback status may include positive feedback and negative feedback. Within a time threshold TH13 after the user triggers the corresponding function through a custom instruction, the specific function stop instruction and whether the function is actively stopped by the user within this time are monitored in real time. The function stop instruction is a basic interaction instruction, which is a fixed preset action and can be continuously tapping the shell of the device three times. If no function stop instruction is detected or the user does not actively stop the function, the function execution status of this custom instruction is considered positive feedback. At this time, the instruction update module can be entered to perform a positive update on the custom instruction template with the highest similarity to the current instruction (i.e., the corresponding instruction template).
[0065] When performing a positive update, the status information of the recognition instruction can be obtained first. This status information includes the signal-to-noise ratio of the recognition instruction , the similarity between the recognition instruction and the corresponding template , and the feature array of the recognition instruction . Then, the second status information of the most recent template positive update can be obtained from the positive update record, including the signal-to-noise ratio of the recognition instruction , the similarity between the recognition instruction and the template . The status information of the recognition instruction, the status information of the most recent template positive update, and the template feature array corresponding to the current function can be used to perform parameter updates. Taking linear update as an example, its update process can refer to the following formula: ; ; where is the updated , is the instruction template update step size, and its calculation method can refer to: ; After performing a positive update, the positive update record can be updated. The specific update process can be as follows: First, set the current signal-to-noise ratio , the similarity between the recognition instruction and the corresponding template , the feature array of the recognition instruction , the template feature array corresponding to this function before the update , and the current template reverse update times to 0, and use the above information as the positive update information. If the number of positive update records is less than the preset threshold TH16, a positive update information can be directly inserted. If the number of positive update records is not less than the preset threshold TH16, the (N + 1)-th historical information is used to overwrite the previous N historical information until N starts from 1 to N = TH16 - 2, and then the current positive update information is used to overwrite the most recent positive update information.
[0066] Finally, after the forward update or the reverse update, the updated custom instruction template and the forward update information can be synchronized to the cloud server.
[0067] It can be understood that if the instruction template is not updated, there may be a problem that the instruction recognition rate decreases after subtle changes in the user's physiological conditions or usage habits, resulting in the need to re-enter the interactive instruction template. Therefore, by performing the forward update or the reverse update on the instruction template in the above manner, the instruction template can change following the user's usage habits, etc., reducing the possibility of the user re-entering a single instruction template multiple times.
[0068] In the embodiment of the present application, by collecting the target signals in the static period and the instruction input period and performing quality detection on them, low-quality signals interfered by factors such as the environment can be effectively screened out, ensuring the reliability of the input instruction template. Only signals that meet the preset quality conditions will have their features extracted and matched with the features of the pre-stored template, thereby ensuring a high similarity between the newly input template and the existing template at the feature level and improving the accuracy of instruction recognition. If the similarity meets the standard, the input is successful; otherwise, a prompt message is output, avoiding the input of incorrect or low-quality instruction templates, greatly improving the quality of custom instruction template input, optimizing the user's personalized interaction experience in the furniture intelligent scenario, and enhancing the response accuracy and execution effect of the device to the user's instructions.
[0069] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0070] In one embodiment, a custom instruction template acquisition device is provided. The custom instruction template acquisition device corresponds one-to-one to the custom instruction template acquisition method in the above embodiment. As Figure 5 shown, the custom instruction template acquisition device includes an index template custom request unit 10, a signal acquisition unit 20, a signal quality detection unit 30, a feature extraction unit 40, a similarity matching unit 50, and a custom instruction template processing unit 60. The detailed description of each functional module is as follows: The index template custom request unit 10 is used to obtain a custom instruction template input request sent by a target user; The signal acquisition unit 20 is used to obtain the target signal in the static period and the target signal in the instruction input period based on the custom instruction template input request, where the static period refers to the time threshold for the target user to keep the device static, and the instruction input period refers to the duration after the static period to prompt the target user to input the custom instruction template; A signal quality detection unit 30 is configured to perform quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; A feature extraction unit 40 is configured to extract features from the target signal during the instruction entry period to obtain signal features if the quality detection result meets a preset quality condition; A similarity matching unit 50 is configured to determine the similarity between the signal features and the signal features corresponding to a pre-stored custom instruction template; A custom instruction template processing unit 60 is configured to, if the similarity meets a preset similarity condition, the custom instruction template is successfully entered, otherwise, the custom instruction template entry fails, and a prompt message is output, where the custom instruction template is updated forward or backward based on an instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.
[0071] In an embodiment of the present application, the signal quality detection unit 30 is further configured to: Determine a signal-to-noise ratio based on the target signal during the static period and the target signal during the instruction entry period; Determine the signal complexity based on the target signal during the instruction entry period.
[0072] In an embodiment of the present application, the signal quality detection unit 30 is further configured to: Perform baseline removal processing on the target signal during the static period and calculate the static period energy intensity of the target signal after baseline removal; Perform baseline removal processing on the target signal during the instruction entry period and calculate the instruction entry period energy intensity of the target signal after baseline removal; Determine an energy intensity ratio between the instruction entry period energy intensity and the static period energy intensity; Determine the signal-to-noise ratio based on the energy intensity ratio.
[0073] In an embodiment of the present application, the signal quality detection unit 30 is further configured to: Determine an initial signal complexity; Perform differential processing on the target signal during the instruction entry period to obtain a differential signal; Determine whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold; If so, increase the initial signal complexity by a preset value to obtain a final signal complexity.
[0074] In an embodiment of the present application, the quality detection result includes a signal-to-noise ratio, a signal complexity, and a static period energy intensity, and the signal feature extraction unit 40 is further configured to: If the signal-to-noise ratio is greater than a preset signal-to-noise ratio threshold, the signal complexity is greater than a first preset signal complexity threshold and less than a second preset signal complexity threshold, and the energy intensity during the stationary period is less than a preset energy intensity threshold, then feature extraction is performed on the target signal.
[0075] In an embodiment of the present application, the signal feature extraction unit 40 is further configured to: Perform differential processing on the target signal during the instruction input period to obtain a differential signal; Perform filtering processing on the differential signal to obtain a filtered signal; Perform sliding window processing on the filtered signal to obtain a signal after sliding window processing; Based on the signal after sliding window processing, calculate a first time interval between adjacent effective maxima, a second time interval between adjacent effective minima, and a third time interval between an adjacent effective maximum and an effective minimum; Form a signal feature array of the target signal with the first time interval, the second time interval, and the third time interval.
[0076] In an embodiment of the present application, the device further includes: an instruction template update unit, configured to: Obtain a current instruction and determine the similarity between the current instruction and each pre-stored instruction template; If the similarity is greater than a preset similarity threshold, obtain an instruction feedback status; If the instruction feedback status is a positive feedback, perform a forward update on the corresponding instruction template; If the instruction feedback status is a negative feedback, perform a reverse update on the corresponding instruction template.
[0077] In an embodiment of the present application, the instruction template update unit is further configured to: Obtain first status information of the current instruction; Obtain second status information of the most recent template forward update from the forward update record; Based on the first status information and the second status information, perform parameter update on the template feature array corresponding to the current function.
[0078] In an embodiment of the present application, the instruction template update unit is further configured to: Obtain third status information of the current instruction; Obtain fourth status information of the most recent template forward update from the forward update record, where the status information includes the number of reverse updates and the instruction template before the most recent update; Obtain fifth status information of the instruction of the second most recent forward update from the forward update record; If the number of reverse updates is greater than a preset threshold, set the instruction template before the most recent update as the instruction template bound to the current function, and update the template forward update information; If the number of reverse updates of the template is not greater than the preset threshold, update the parameters of the template feature array corresponding to the current function based on the third state information, the fourth state information, and the fifth state information.
[0079] In the embodiments of the present application, by collecting the target signals during the static period and the instruction input period and performing quality detection on them, low-quality signals interfered by factors such as the environment can be effectively screened out, ensuring the reliability of the input instruction template. Only signals that meet the preset quality conditions will have their features extracted and matched with the pre-stored template features, thereby ensuring a high similarity between the newly input template and the existing templates at the feature level and improving the accuracy of instruction recognition. If the similarity meets the standard, the input is successful; otherwise, a prompt message is output, avoiding the input of incorrect or low-quality instruction templates, greatly improving the quality of custom instruction template input, optimizing the user's personalized interaction experience in the furniture intelligent scenario, and enhancing the response accuracy and execution effect of the device to user instructions.
[0080] For the specific limitations of the custom instruction template acquisition device, reference can be made to the limitations on the custom instruction template acquisition method in the above text, which will not be elaborated here. Each module in the above custom instruction template acquisition device can be implemented in whole or in part by software, hardware, and their combinations. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0081] In one embodiment, a computer device is provided. The computer device can be a terminal device, and its internal structure diagram can be as Figure 6 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a custom instruction template acquisition method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0082] In the embodiments of the present application, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the custom instruction template acquisition method as described above are implemented.
[0083] In an application embodiment, a readable storage medium is provided. The readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the above-mentioned custom instruction template acquisition method are implemented.
[0084] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the above-mentioned method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or an external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0085] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0086] The above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for obtaining a custom instruction template, characterized in that, The method includes: Obtaining a custom instruction template entry request sent by a target user; Based on the custom instruction template entry request, obtaining a target signal during the static period and a target signal during the instruction entry period, where the static period refers to the time threshold for the target user to keep the device static, and the instruction entry period refers to the duration after the static period to prompt the target user to enter a custom instruction template; Performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; If the quality detection result meets the preset quality conditions, performing feature extraction on the target signal during the instruction entry period to obtain signal features; Determining the similarity between the signal features and the corresponding signal features of the pre-stored custom instruction template; If the similarity meets the preset similarity conditions, the custom instruction template entry is successful; otherwise, the custom instruction template entry fails, and a prompt message is output, where the custom instruction template is updated positively or negatively based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.
2. The custom instruction template acquisition method according to claim 1, wherein The performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result includes: Based on the target signal during the static period and the target signal during the instruction entry period, determining the signal-to-noise ratio; Based on the target signal during the instruction entry period, determining the signal complexity; 3. The custom instruction template acquisition method according to claim 2, wherein The based on the target signal during the static period and the target signal during the instruction entry period, determining the signal-to-noise ratio includes: Performing baseline removal processing on the target signal during the static period and calculating the energy intensity during the static period of the target signal after baseline removal; Performing baseline removal processing on the target signal during the instruction entry period and calculating the energy intensity during the instruction entry period of the target signal after baseline removal; Determining the energy intensity ratio between the energy intensity during the instruction entry period and the energy intensity during the static period; Based on the energy intensity ratio, determining the signal-to-noise ratio; 4. The custom instruction template acquisition method according to claim 2, wherein The based on the target signal during the instruction entry period, determining the signal complexity includes: Determining the initial signal complexity; Performing differential processing on the target signal during the instruction entry period to obtain a differential signal; Determining whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold; If so, increasing the initial signal complexity by a preset value to obtain the final signal complexity; 5. The custom instruction template acquisition method according to any one of claims 1-4, characterized in that The quality detection result includes the signal-to-noise ratio, the signal complexity, and the energy intensity during the static period. The if the quality detection result meets the preset quality conditions, performing feature extraction on the target signal during the instruction entry period includes: If the signal-to-noise ratio is greater than a preset signal-to-noise ratio threshold, the signal complexity is greater than a first preset signal complexity threshold and less than a second preset signal complexity threshold, and the energy intensity during the static period is less than a preset energy intensity threshold, then performing feature extraction on the target signal; 6. The custom instruction template acquisition method according to claim 1, wherein The performing feature extraction on the target signal to obtain signal features includes: Performing differential processing on the target signal during the instruction entry period to obtain a differential signal; Performing filtering processing on the differential signal to obtain a filtered signal; Performing sliding window processing on the filtered signal to obtain the signal after sliding window processing; Based on the signal after sliding window processing, calculate the first time interval between adjacent valid maxima, the second time interval between adjacent valid minima, and the third time interval between adjacent valid maxima and valid minima; Form a signal feature array of the target signal with the first time interval, the second time interval, and the third time interval.
7. The custom instruction template acquisition method according to claim 1, wherein The method further includes: Obtain the current instruction and determine the similarity between the current instruction and each pre-stored instruction template; If the similarity is greater than a preset similarity threshold, obtain the instruction feedback status; If the instruction feedback status is positive feedback, perform a forward update on the corresponding instruction template; If the instruction feedback status is negative feedback, perform a reverse update on the corresponding instruction template.
8. The custom instruction template acquisition method according to claim 7, wherein, The step of performing a forward update on the corresponding instruction template when the instruction feedback status is positive feedback includes: Obtain the first status information of the current instruction; Obtain the second status information of the most recent template forward update from the forward update record; Based on the first status information and the second status information, perform parameter update on the template feature array corresponding to the current function.
9. The custom instruction template acquisition method according to claim 7, wherein The step of performing a reverse update on the corresponding instruction template when the instruction feedback status is negative feedback includes: Obtain the third status information of the current instruction; Obtain the fourth status information of the most recent template forward update from the forward update record, where the status information includes the number of reverse updates and the instruction template before the most recent update; Obtain the fifth status information of the penultimate forward update instruction from the forward update record; If the number of reverse updates is greater than a preset threshold, set the instruction template before the most recent update as the instruction template bound to the current function and update the template forward update information; If the number of template reverse updates is not greater than the preset threshold, perform parameter update on the template feature array corresponding to the current function based on the third status information, the fourth status information, and the fifth status information.
10. A custom instruction template acquisition device, characterized in that The device includes: An index template custom request unit for obtaining a custom instruction template entry request sent by a target user; A signal acquisition unit for obtaining a target signal during the static period and a target signal during the instruction entry period based on the custom instruction template entry request, where the static period refers to the time threshold for the target user to keep the device static, and the instruction entry period refers to the duration after the static period to prompt the target user to enter a custom instruction template; A signal quality detection unit for performing quality detection on the target signal during the static period and the target signal during the instruction entry period to obtain a signal quality detection result; A feature extraction unit for performing feature extraction on the target signal during the instruction entry period to obtain signal features if the quality detection result meets the preset quality conditions; A similarity matching unit for determining the similarity between the signal features and the signal features corresponding to the pre-stored custom instruction templates; A custom instruction template processing unit, which is used to, if the similarity meets the preset similarity condition, successfully enter the custom instruction template, otherwise, fail to enter the custom instruction template and output a prompt message. Among them, the custom instruction template is updated forward or backward based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.
Citation Information
Patent Citations
Information inputting method, equipment, smart lock and storage medium
CN108022349A
Oral cavity cleaning area identification method and device, electronic equipment and storage medium
CN114360020A
Fingerprint input and identification method and apparatus, and electronic device
CN115376163A
Method for obtaining fingerprint template and related device
WO2020168861A1