Method and device for obtaining custom instruction template

By obtaining signal quality detection of the standstill period and instruction entry period in the furniture intelligent system, screening out environmental interference, ensuring high-quality entry and update of custom instruction templates, the problem of the influence of the entry methods in the existing technology is solved, and the accuracy of instruction recognition and user experience are improved.

CN120217014BActive Publication Date: 2025-09-02AIMENG SMART HOME (ZHUHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510685907.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-02
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

In the existing furniture intelligent system, the custom interactive instruction template entry method is susceptible to environmental factors and user operating habits, resulting in poor command recognition and execution results, reducing the user experience and equipment intelligence level.

Method used

By obtaining the target signals of the standstill period and the instruction entry period, performing signal quality detection, screening out environmental interference, and only performing feature extraction and similarity matching when the signal quality meets the preset conditions, realizing forward or reverse update of the custom instruction template.

Benefits of technology

It improves the quality and accuracy of custom instruction template entry, optimizes users' personalized interactive experience in furniture intelligent scenarios, and enhances the device's response accuracy and execution effect to user instructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217014B_ABST
    Figure CN120217014B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for obtaining a custom instruction template. The method includes: obtaining a custom instruction template entry request sent by a target user; based on the custom instruction template entry request, collecting a static period target signal and an instruction entry period target signal; performing quality detection on the static period target signal and the instruction entry period target signal to obtain a signal quality detection result; if the quality detection result meets a preset quality condition, performing feature extraction on the instruction entry period target signal to obtain a signal feature; performing similarity matching between the signal feature and the corresponding signal feature of a pre-stored custom instruction template; if the similarity meets the preset similarity condition, the custom instruction template entry is successful; otherwise, the custom instruction template entry fails and a prompt message is output. The method can effectively screen out low-quality signals due to environmental factors, improve the quality of custom instruction template entry, optimize the personalized interactive experience, and enhance the device response accuracy and execution effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human-computer interaction technology, 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 of the furniture industry continues to accelerate. Today, furniture products are not only becoming increasingly intelligent, but also increasingly versatile. Against this backdrop, users are placing higher demands on the convenience and personalized experience of furniture-related functions. Ensuring convenient operation while fully meeting users' personalized needs has become a core issue that is being focused on and addressed during the development and optimization of major products.

[0003] Currently, there are two main implementations of custom interaction command templates in intelligent furniture systems. The first is to construct a command template directly based on user input information. Common input methods include keyboard input, mouse clicks, and joystick swing control. The system will arrange and combine this series of input information to generate specific interaction commands. The second form is to extract features from the user input information, analyze and process the relevant features, and then form interaction commands. In the customized setting state, users can bind these interaction commands to the relevant functions of the furniture, so that the device can accurately execute the corresponding function when receiving the corresponding command.

[0004] However, existing methods for entering interactive command templates have significant limitations. Typically, existing command templates are entered once. Once a command template is entered into the system, it is permanently stored and updated only the next time it is re-entered. During the command entry process, the quality of the command template is often difficult to ensure due to various factors, including environmental factors (such as electromagnetic interference, operating space limitations, etc.) and user operating habits. These factors can cause errors or incompleteness in the command entry, affecting subsequent device recognition and execution, reducing the user experience and the device's intelligence level. Summary of the Invention

[0005] Based on this, it is necessary to provide a method and device for obtaining a custom instruction template in order to solve at least one problem existing in the above-mentioned prior art.

[0006] In a first aspect, a method for obtaining a custom instruction template is provided, comprising:

[0007] Get the custom instruction template entry request sent by the target user;

[0008] Based on the custom instruction template entry request, obtaining a quiet period target signal and an instruction entry period target signal, wherein the quiet period refers to a time threshold for the target user to keep the device quiet, and the instruction entry period refers to the duration of prompting the target user to enter the custom instruction template after the quiet period;

[0009] Performing quality detection on the target signal during the static period and the target signal during the command input period to obtain a signal quality detection result;

[0010] If the quality detection result meets the preset quality condition, feature extraction is performed on the target signal during the instruction input period to obtain signal features;

[0011] Determining the similarity between the signal characteristics and the signal characteristics corresponding to the pre-stored custom instruction template;

[0012] If the similarity meets the preset similarity condition, the custom instruction template is successfully entered; otherwise, the custom instruction template fails to be entered and a prompt message is output, wherein the custom instruction template is updated positively or reversely based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.

[0013] In one embodiment, the performing quality detection on the target signal during the static period and the target signal during the command input period to obtain the signal quality detection result includes:

[0014] determining a signal-to-noise ratio based on the target signal during the rest period and the target signal during the instruction input period;

[0015] Based on the target signal during the instruction entry period, a signal complexity is determined.

[0016] In one embodiment, determining the signal-to-noise ratio based on the target signal during the rest period and the target signal during the instruction input period includes:

[0017] performing baseline removal processing on the target signal during the rest period, and calculating the energy intensity of the target signal during the rest period after the baseline removal;

[0018] performing baseline removal processing on the target signal during the instruction recording period, and calculating the energy intensity of the target signal during the instruction recording period after the baseline removal;

[0019] determining an energy intensity ratio between the energy intensity during the instruction input period and the energy intensity during the rest period;

[0020] The signal-to-noise ratio is determined based on the energy intensity ratio.

[0021] In one embodiment, determining the signal complexity based on the target signal during the instruction entry period includes:

[0022] Determine the initial signal complexity;

[0023] performing differential processing on the target signal during the instruction input period to obtain a differential signal;

[0024] Determining whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold;

[0025] If so, a preset value is added to the initial signal complexity to obtain a final signal complexity.

[0026] In one embodiment, the quality detection result includes a signal-to-noise ratio, signal complexity, and energy intensity during a static period. If the quality detection result meets a preset quality condition, feature extraction is performed on the target signal during the instruction input period, including:

[0027] 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, feature extraction is performed on the target signal.

[0028] In one embodiment, extracting features from the target signal to obtain signal features includes:

[0029] performing differential processing on the target signal during the instruction input period to obtain a differential signal;

[0030] performing filtering processing on the differential signal to obtain a filtered signal;

[0031] Performing sliding window processing on the filtered signal to obtain a signal after sliding window processing;

[0032] Calculating, based on the signal after sliding window processing, a first time interval between adjacent effective maximum values, a second time interval between adjacent effective minimum values, and a third time interval between adjacent effective maximum values ​​and effective minimum values;

[0033] The first time interval, the second time interval, and the third time interval are combined into a signal feature array of the target signal.

[0034] In one embodiment, the method further includes:

[0035] Obtaining a current instruction and determining a similarity between the current instruction and each pre-stored instruction template;

[0036] If the similarity is greater than a preset similarity threshold, obtaining a command feedback status;

[0037] If the instruction feedback status is positive feedback, the corresponding instruction template will be positively updated;

[0038] If the instruction feedback state is negative feedback, the corresponding instruction template will be updated in the reverse direction.

[0039] In one embodiment, if the instruction feedback status is positive feedback, performing a positive update on the corresponding instruction template includes:

[0040] Acquire first status information of the current instruction;

[0041] Obtaining the second state information of the most recent template forward update from the forward update record;

[0042] Based on the first state information and the second state information, parameters of the template feature array corresponding to the current function are updated.

[0043] In one embodiment, if the instruction feedback state is negative feedback, the corresponding instruction template is updated in reverse, including:

[0044] Acquire third state information of the current instruction;

[0045] Acquire fourth status information of the most recent template forward update from the forward update record, wherein the status information includes the number of reverse updates and the instruction template before the most recent update;

[0046] Obtaining fifth status information of the penultimate forward update instruction from the forward update record;

[0047] If the reverse update number is greater than a preset threshold, the instruction template before the most recent update is set as the instruction template bound to the current function, and the template forward update information is updated;

[0048] If the number of template reverse updates is not greater than a preset threshold, parameters of the template feature array corresponding to the current function are updated based on the third state information, the fourth state information, and the fifth state information.

[0049] In a second aspect, a device for obtaining a custom instruction template is provided, comprising:

[0050] The indicator template custom request unit is used to obtain the custom instruction template entry request sent by the target user;

[0051] a signal acquisition unit, configured to acquire, based on the custom instruction template entry request, a quiet period target signal and an instruction entry period target signal, wherein the quiet period refers to a time threshold for the target user to keep the device quiet, and the instruction entry period refers to a duration of time after the quiet period for prompting the target user to enter the custom instruction template;

[0052] a signal quality detection unit, configured to perform quality detection on the target signal during the static period and the target signal during the command input period to obtain a signal quality detection result;

[0053] a feature extraction unit, configured to extract features of the target signal during the instruction input period to obtain signal features if the quality detection result meets a preset quality condition;

[0054] a similarity matching unit, configured to determine the similarity between the signal feature and a signal feature corresponding to a pre-stored custom instruction template;

[0055] A custom instruction template processing unit is used to successfully enter the custom instruction template if the similarity meets the preset similarity condition; otherwise, the custom instruction template entry fails and a prompt message is output, wherein the custom instruction template is positively updated or reversely updated based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.

[0056] The above-mentioned method and device for obtaining a custom instruction template, and its implementation includes: obtaining a custom instruction template entry request sent by a target user; obtaining a quiet period target signal and an instruction entry period target signal based on the custom instruction template entry request, wherein the quiet period refers to the time threshold for the target user to keep the device quiet, and the instruction entry period refers to the duration of time after the quiet period for prompting the target user to enter the custom instruction template; performing quality detection on the quiet period target signal and the instruction entry period target signal to obtain a signal quality detection result; if the quality detection result meets a preset quality condition, performing feature extraction on the instruction entry period target signal to obtain a signal feature; determining the similarity between the signal feature and the signal feature corresponding to a pre-stored custom instruction template; 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, wherein the custom instruction template is positively updated or reversely updated based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback. The embodiment of the present application collects target signals during the static period and the instruction entry period and performs quality inspection on them, which can effectively screen out low-quality signals that are interfered with by environmental factors and other factors, thereby 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 that the newly entered template has a high degree of similarity with the existing template at the feature level, thereby improving the accuracy of instruction recognition. If the similarity meets the standard, the entry is successful, otherwise a prompt message is output to avoid the entry of erroneous or low-quality instruction templates, greatly improving the quality of custom instruction template entry, optimizing the user's personalized interactive experience in the intelligent furniture scenario, and enhancing the device's response accuracy and execution effect to user instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. 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 any creative labor.

[0058] Figure 1 This is a schematic diagram of an application environment of a method for obtaining a custom instruction template in one embodiment of the present invention;

[0059] Figure 2 This is a flow chart of a method for obtaining a custom instruction template according to an embodiment of the present invention;

[0060] Figure 3 is a network architecture diagram of a feature extraction model in one embodiment of the present invention;

[0061] Figure 4 is a flow chart of a template updating method according to an embodiment of the present invention;

[0062] Figure 5 It is a structural diagram of a device for obtaining a custom instruction template in one embodiment of the present invention;

[0063] Figure 6 FIG. 1 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0065] The method for obtaining a custom instruction template provided in this embodiment can be applied in the following situations: Figure 1 In the application environment, S1 cloud service end is mainly used for user information storage and information distribution, etc. The information includes but is not limited to user personal information and user instruction information. The instruction information includes default interactive instruction information, user-defined instruction templates and template update record information; S2 user end (with APP pre-installed), which is mainly used for launching customized instruction entry, customized instruction entry process prompts, customized instruction entry result prompts, storage of instruction information entered by the device end and uploading to the server, etc.; S3 device end, whose main function is to execute customized instruction entry actions, mainly includes signal acquisition module, signal quality judgment module, feature extraction module, instruction detection module, instruction feedback module and instruction update module.

[0066] The user end communicates with the cloud server, and the device end communicates with both the user end and the cloud server. User ends include, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The cloud server can be implemented as a standalone server or a server cluster consisting of multiple servers. The device end can be a smart home device such as a smart bed or a smart mattress.

[0067] In one embodiment, if Figure 2 As shown, a custom instruction template acquisition method is provided, which is applied in Figure 1 The device side in the example is used as an example to illustrate the process, including the following steps:

[0068] In step S110, a custom instruction template entry request sent by a target user is obtained;

[0069] Alternatively, users can initiate the custom command template entry function on the user side through a pre-installed app. For example, they can click a specific control (such as a button, switch, or other interface element) on a specific app page to bind the custom command template to the function. After the app completes the function binding, the user side sends a command to start custom command entry to the device side, informing the device side to begin accepting user-defined command entry operations.

[0070] It's important to note that custom command templates allow users to set specific command rules based on their needs and habits. Through these templates, users can bind specific operations or functions to their custom commands to achieve a personalized interactive experience. For example, in lighting control, users can customize commands to adjust the lights; for smart beds, they can set commands to raise the headboard to a preset angle or lay it flat; and for multimedia device control, they can customize commands such as turning on the TV.

[0071] In step S120, based on the custom instruction template entry request, a target signal for the static period and a target signal for the instruction entry period are obtained;

[0072] It should be noted that the quiet period refers to the time threshold TH1 for the target user to keep the device still, 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 of the time when the target user is prompted to enter the custom instruction template after the quiet period, and the duration is the time threshold TH2. It can be understood that after the quiet period, the target user can be prompted to enter the custom instruction template, and the time 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 pre-set time threshold TH2. For example, if TH2 is set to 5 minutes, then after the quiet period, the target user will be prompted to enter the custom instruction template, and the next 5 minutes is the instruction entry period, and the user needs to complete the relevant entry operation within these 5 minutes.

[0073] Optionally, when the device receives a request from the user to enter a custom instruction template, it can activate or start a signal acquisition module to collect target signals. This signal acquisition module is primarily used for collecting sensor signals. For example, a sensor can be placed in a target area on the device (such as the end of a smart mattress that contacts the human body) and connected to the device via a wired (e.g., USB, Ethernet cable, etc.) or wireless (e.g., Wi-Fi, Bluetooth, ZigBee, etc.) connection. Ensure that the device is correctly configured with the driver and parameters required to communicate with the sensor, such as the sensor's address and communication protocol. When the user opens the corresponding smart home app, accesses the relevant page, and enters a request to enter a custom instruction template, the smart device can be triggered to start or activate the signal acquisition module to receive the target signal collected by the sensor.

[0074] The sensor signal includes, but is not limited to, one or more of a ballistocardiogram (BCG) signal, a pressure sensor signal, an array pressure sensor signal, an audio signal, and a video signal.

[0075] It should be noted that the user end can provide prompts for the instruction entry process, which includes the instruction template entry process. The instruction template entry process includes a static period and an instruction entry period, so as to collect sensor signals in the static period and sensor signals in the instruction entry period respectively.

[0076] In step S130, the target signal during the static period and the target signal during the command input period are subjected to quality detection to obtain a signal quality detection result;

[0077] Optionally, a signal quality detection module may be entered to perform quality detection on the target signal during the static period and the target signal during the instruction input period, calculate the signal-to-noise ratio and signal complexity of the signal, and determine the quality detection result based on the signal-to-noise ratio and signal complexity.

[0078] It should be noted that if the signal-to-noise ratio is too low, it may be that the recorded user's action characteristics are not obvious or the background noise is too large; if the signal complexity is too high, it indicates that the user input command is too complex, which may be caused by too many action combinations or the environment is too noisy; if the signal complexity is too low, it indicates that the user input command is too simple, which may be caused by too few actions or the sensor's low sensitivity to actions.

[0079] In step S140, if the quality detection result meets the preset quality condition, feature extraction is performed on the target signal during the instruction input period to obtain signal features;

[0080] Optionally, the quality detection result may include a signal-to-noise ratio , signal complexity And the energy intensity during the rest period, if the signal-to-noise ratio Greater than the preset threshold TH4, signal complexity If the value is greater than the preset threshold TH5 and less than the preset threshold TH6, and the energy intensity during the rest period is less than the preset threshold TH7, it means that the preset quality conditions are met. At this time, the feature extraction module can be entered to extract features of the target signal during the instruction template input period. For example, feature extraction can be performed using a pre-trained model, such as a signal processing model or a neural network model.

[0081] It should be noted that if the preset quality conditions are not met, a corresponding prompt message may 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, a prompt will be given: "Please keep the environment quiet and do not touch the device before entering the command." If the signal-to-noise ratio does not meet the requirements, that is, the signal-to-noise ratio If the signal complexity is not greater than the preset threshold TH4, a prompt will be given: "The command 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, a prompt will be given: "The command input action is too simple or too complex."

[0082] like Figure 3As shown, taking a neural network model as an example, this neural network model can be a pre-trained basic interactive instruction recognition network with the last fully connected layer removed. It can sequentially include convolution 1, linear rectification function 1, convolution 2, linear rectification function 2, and maximum pooling. The first convolution layer 1 consists of 32 convolution kernels of size 3*3, with a stride of 2 and padding of 1. This is then input into the second layer of linear rectification function 1 for processing. The third convolution layer 2 consists of 32 convolution kernels of size 3*3, i.e., neurons, with a stride of 2 and padding of 1. This is then input into the fourth layer, processed by linear rectification function 2, and finally downsampled through a pooling layer of size 3*3, with a stride of 2 and padding of 0 to extract signal features.

[0083] In step S150, the similarity between the signal feature and the signal feature corresponding to the pre-stored custom instruction template is determined;

[0084] Optionally, all pre-stored custom instruction template data can be obtained, which may include feature arrays corresponding to each custom instruction template. Similarity can then be calculated between the extracted signal feature array and the feature array corresponding to each custom instruction template. For example, the correlation coefficient between the two can be calculated using 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, i.e., a high similarity; when it is close to -1, it indicates a high negative correlation; and when it is close to 0, it indicates a weak linear correlation between the two, resulting in a low similarity. Alternatively, the Euclidean distance between the two can be calculated using a Euclidean distance algorithm, for example. 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.

[0085] In step S160 , if the similarity meets the preset similarity condition, the custom instruction template is successfully entered; otherwise, the custom instruction template fails to be entered and a prompt message is output. The custom instruction template is updated positively or negatively based on the instruction feedback status, which includes positive feedback or negative feedback.

[0086] Optionally, if the similarity meets a preset similarity condition, for example, if it is greater than a preset threshold value TH11, a prompt indicating successful entry may pop 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 side; the cloud server side detects whether a custom instruction template associated with the bound function already exists, and if so, clears the historical custom instruction template information related to the function. If the preset similarity condition is not met, for example, if it is less than or equal to the preset threshold value TH11, a prompt message, such as "There are instructions that are too similar," is output, and the name of the instruction bound function with the maximum similarity is popped up.

[0087] When a related instruction with a similarity to a custom instruction template greater than a preset threshold is detected, the device triggers a response function and enters the instruction feedback module to obtain the instruction feedback status. The instruction feedback module is designed to obtain user feedback after triggering the related function. Instruction feedback status can include positive and negative feedback. Within a time threshold after the user triggers the corresponding function via a custom instruction, the device monitors in real time specific function stop instructions and whether the function is actively stopped by the user. The function stop instruction is a basic interactive instruction, a fixed preset action that can be a simple, repeated tapping of a designated part of the device, such as the headboard of a smart bed. If a function stop instruction is detected or the user actively stops the function, the execution of this custom instruction is considered negative feedback. The device then enters the instruction update module to reversely update the custom instruction template. The corresponding instruction template is the custom instruction template with the highest similarity to the current instruction. If no function stop instruction is detected or the user does not actively stop the function, the execution of this custom instruction is considered positive feedback. The device then enters the instruction update module to positively update the custom instruction template with the highest similarity to the current instruction (i.e., the corresponding instruction template). By setting up the instruction template forward update and template reverse update mechanism, the instruction template can be changed according to the user's usage habits, etc., reducing the possibility of the user re-entering a single instruction template multiple times.

[0088] The similarity can be calculated using the Pearson correlation coefficient to determine the correlation between the feature array and the pre-stored template. When the correlation coefficient is close to 1, it indicates a high positive correlation between the feature array and the pre-stored template, meaning the similarity is very high. 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. Alternatively, the Euclidean distance between the two can be calculated using a Euclidean distance algorithm. 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. Finally, the maximum similarity value can be selected to determine whether it is greater than a preset similarity threshold TH12, such as 0.8. If so, the match is considered successful, and the current instruction is used as the related instruction for the custom instruction template with the highest similarity.

[0089] In an embodiment of the present application, a method for obtaining a custom instruction template is provided, comprising: obtaining a custom instruction template entry request sent by a target user; obtaining a quiet period target signal and an instruction entry period target signal based on the custom instruction template entry request, wherein the quiet period refers to a time threshold for the target user to keep the device quiet, and the instruction entry period refers to the duration of time after the quiet period for prompting the target user to enter the custom instruction template; performing quality detection on the quiet period target signal and the instruction entry period target signal to obtain a signal quality detection result; if the quality detection result meets a preset quality condition, performing feature extraction on the instruction entry period target signal to obtain a signal feature; determining a similarity between the signal feature and a signal feature corresponding to a pre-stored custom instruction template; if the similarity meets the preset similarity condition, the custom instruction template is successfully entered; otherwise, the custom instruction template is failed to be entered, and a prompt message is output, wherein the custom instruction template is positively updated or reversely updated based on an instruction feedback state, and the instruction feedback state includes positive feedback or negative feedback. The embodiment of the present application collects target signals during the static period and the instruction entry period and performs quality inspection on them, which can effectively screen out low-quality signals that are interfered with by environmental factors and other factors, thereby 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 that the newly entered template has a high degree of similarity with the existing template at the feature level, thereby improving the accuracy of instruction recognition. If the similarity meets the standard, the entry is successful, otherwise a prompt message is output to avoid the entry of erroneous or low-quality instruction templates, greatly improving the quality of custom instruction template entry, optimizing the user's personalized interactive experience in the intelligent furniture scenario, and enhancing the device's response accuracy and execution effect to user instructions.

[0090] In one embodiment of the present application, the quality detection of the target signal during the static period and the target signal during the command input period to obtain the signal quality detection result includes:

[0091] determining a signal-to-noise ratio based on the target signal during the rest period and the target signal during the instruction input period;

[0092] Based on the target signal during the instruction entry period, a signal complexity is determined.

[0093] Optionally, the signal-to-noise ratio and signal complexity of the target signals collected during the rest period and the instruction input period can be calculated. The signal-to-noise ratio can be the ratio of the energy intensity during the instruction input period to the energy intensity during the rest period. The signal complexity can be determined by performing differential processing on the signal during the instruction input period and then comparing the maximum value point of the differential signal with the 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.

[0094] It should be noted that if the signal-to-noise ratio is too low, it may indicate that the recorded user action characteristics are not obvious or the background noise is too large; if the signal complexity is too high, it indicates that the user input command is too complex, which may be caused by too many action combinations or the environment is too noisy; if the signal complexity is too low, it indicates that the user input command is too simple, which may be caused by too few actions or the sensor's response to the action is too small.

[0095] In one embodiment of the present application, determining the signal-to-noise ratio based on the static period target signal and the command input period target signal includes:

[0096] performing baseline removal processing on the target signal during the rest period, and calculating the energy intensity of the target signal during the rest period after the baseline removal;

[0097] performing baseline removal processing on the target signal during the instruction recording period, and calculating the energy intensity of the target signal during the instruction recording period after the baseline removal;

[0098] determining an energy intensity ratio between the energy intensity during the instruction input period and the energy intensity during the rest period;

[0099] The signal-to-noise ratio is determined based on the energy intensity ratio.

[0100] Optionally, the baseline generally refers to a slowly changing trend or DC component in a signal. In many actual signals, the existence of such a baseline may interfere with the analysis of useful information in the signal. Therefore, after obtaining the target small signal of the static period and the target signal of the instruction recording period, baseline removal processing can be performed separately, such as high-pass filtering, empirical mode decomposition algorithm, wavelet transform, etc. Then, the energy intensity of the static period and the energy intensity of the instruction recording period after baseline removal can be calculated respectively. Among them, the energy intensity of the static period can be the sum of the absolute values ​​of the signal of the static period time threshold TH1 / TH1. The energy intensity of the instruction recording period can be the sum of the absolute values ​​of the signal of the instruction recording period time threshold TH2 / TH2. Then, the ratio of the energy intensity of the instruction recording period to the energy intensity of the static period can be calculated. Then the signal-to-noise ratio .

[0101] In one embodiment of the present application, determining the signal complexity based on the target signal during the instruction input period includes:

[0102] Determine the initial signal complexity;

[0103] performing differential processing on the target signal during the instruction input period to obtain a differential signal;

[0104] Determining whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold;

[0105] If so, a preset value is added to the initial signal complexity to obtain a final signal complexity.

[0106] Optionally, the initial signal complexity Set to 0, then, the target signal of the instruction input period can be differentially processed, such as first-order differential, second-order differential, to obtain the differential signal, perform maximum value search on the differential signal, and judge whether the maximum value amplitude searched is greater than the preset threshold TH3. If so, the signal complexity Add 1, otherwise, it is still set to 0, so that the signal complexity can be obtained.

[0107] The preset amplitude threshold is strongly related to the sensor characteristics and can be obtained by having the device perform a preset action, collecting signals through relevant sensors, calculating the maximum signal amplitude caused by different actions, and then calculating the lower quartile of the amplitude of all tested actions. The threshold is then obtained by multiplying the lower quartile by a certain coefficient, such as 0.75.

[0108] In one embodiment of the present application, the quality detection result includes a signal-to-noise ratio, signal complexity, and energy intensity during a static period. If the quality detection result meets a preset quality condition, feature extraction is performed on the target signal during the instruction input period, including:

[0109] 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, feature extraction is performed on the target signal.

[0110] Optionally, the quality detection result may include a signal-to-noise ratio , signal complexity And the energy intensity during the rest period, if the signal-to-noise ratio Greater than the preset threshold TH4, signal complexity If the signal complexity is greater than a first preset signal complexity threshold TH5 (which can be obtained from experience and used to limit the number of actions, with a value of 3, for example), and less than a second preset signal complexity threshold TH6 (which can be obtained from experience and used to limit the number of actions, with a value of 15, for example), and the energy intensity during the rest period is less than a preset energy intensity threshold TH7, then the preset quality conditions are met. At this point, the feature extraction module can be entered, and feature extraction can be performed on the target signal during the instruction template input period. For example, feature extraction can be performed using a trained model, such as a signal processing model or a neural network model.

[0111] Among them, the preset energy intensity threshold TH7 is strongly correlated with the sensor characteristics and can be determined in the following way: the relevant sensors can be placed in different environments, including strong electromagnetic sources, strong vibration sources, preset motion interference, etc., and the energy intensity during the static time is calculated. The upper quartile of the energy intensity in all environments is counted. The threshold is the upper quartile * a certain coefficient, for example, 1.25.

[0112] In an embodiment of the present application, extracting features from the target signal to obtain signal features includes:

[0113] performing differential processing on the target signal during the instruction input period to obtain a differential signal;

[0114] performing filtering processing on the differential signal to obtain a filtered signal;

[0115] Performing sliding window processing on the filtered signal to obtain a signal after sliding window processing;

[0116] Calculating, based on the signal after sliding window processing, a first time interval between adjacent effective maximum values, a second time interval between adjacent effective minimum values, and a third time interval between adjacent effective maximum values ​​and effective minimum values;

[0117] The first time interval, the second time interval, and the third time interval are combined into a signal feature array of the target signal.

[0118] Alternatively, the target signal during the instruction entry phase can be subjected to differential processing, such as first-order differential processing, to obtain a differential signal. This differential signal can then be low-pass filtered to obtain a low-pass filtered signal. A sliding window operation is then performed on the low-pass filtered signal, sliding a fixed-size window sequentially along the low-pass filtered signal with a sliding window step of one sampling point. The window duration can be a preset time threshold TH8. For the signal data within the window, the absolute value of each data point is first taken (i.e., negative numbers are converted to positive numbers). The absolute values ​​of all data points within the window are then summed to produce a series of calculation results. These results, arranged in the order of the window sliding, constitute the processed signal. Compared to the original low-pass filtered signal, the processed signal exhibits altered physical meaning and characteristics, focusing more on reflecting the comprehensive amplitude of the signal within local time ranges at different times, making it suitable for subsequent analysis, such as feature extraction and signal detection.

[0119] 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 can be calculated. The above time intervals are used as the feature array corresponding to the target signal of the instruction entry period.

[0120] Here, a valid maximum threshold and a valid minimum threshold are set. If the maximum value is greater than the valid maximum threshold, it is considered a valid maximum value; if the minimum value is less than the valid minimum threshold, it is considered a valid minimum value. Specifically, a valid maximum value means that the maximum value amplitude must be greater than the preset threshold TH9, and a valid minimum value means that the minimum value must be less than the preset threshold TH10.

[0121] In one embodiment of the present application, the method further includes:

[0122] Obtaining a current instruction and determining a similarity between the current instruction and each pre-stored instruction template;

[0123] If the similarity is greater than a preset similarity threshold, obtaining a command feedback status;

[0124] If the instruction feedback status is positive feedback, the corresponding instruction template will be positively updated;

[0125] If the instruction feedback state is negative feedback, the corresponding instruction template will be updated in the reverse direction.

[0126] Optionally, command detection can be performed in real time. For example, a configurable command detection period can be set to a preset window time length TH2. Sensor signals within the preset window time length TH2 can be intercepted in real time, and a signal feature array of the sensor signals collected during the command detection period can be extracted. For example, the sensor signals can be differentially processed to obtain a differential signal, the differential signal can be low-pass filtered to obtain a low-pass filtered signal, and the low-pass filtered signal can be subjected to sliding window processing to calculate the sum of the absolute values ​​of the signals within the window to obtain a processed signal. Then, in the processed signal, valid maxima and valid minima can be found, and the time intervals between adjacent valid maxima, the time interval between adjacent valid minima, and the time interval between adjacent valid maxima and valid minima can be calculated, with the aforementioned time intervals forming a feature array. It should be noted that a valid maximum refers to a maximum amplitude greater than a preset threshold value TH9, and a valid minimum refers to a minimum amplitude less than a preset threshold value TH10.

[0127] Next, the command detection module is entered. In this module, the similarity between the sensor signal's signal features and the pre-stored signal feature arrays corresponding to each custom command template can be calculated. For example, the correlation between the two can be calculated using 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, indicating a high degree of similarity; when it is close to -1, it indicates a high degree of negative correlation; and when it is close to 0, it indicates a weak linear correlation between the two and a low degree of similarity. Alternatively, the Euclidean distance between the two can be calculated using a Euclidean distance algorithm. 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.

[0128] Finally, the maximum similarity value is selected to determine whether it exceeds a preset similarity threshold TH12, such as 0.8. If so, the match is considered successful, and the current command is used as the corresponding command of the custom command template with the highest similarity. If this corresponding command is detected, the device can trigger a response function and enter the command feedback module to obtain the command feedback status. The command feedback module is used to obtain user feedback after triggering the relevant function.

[0129] In an implementation of the present application, if the instruction feedback status is negative feedback, the corresponding instruction template is updated in reverse, including:

[0130] Acquire third state information of the current instruction;

[0131] Acquire fourth status information of the most recent template forward update from the forward update record, wherein the status information includes the number of reverse updates and the instruction template before the most recent update;

[0132] Obtaining fifth status information of the penultimate forward update instruction from the forward update record;

[0133] If the reverse update number is greater than a preset threshold, the instruction template before the most recent update is set as the instruction template bound to the current function, and the template forward update information is updated;

[0134] If the number of template reverse updates is not greater than a preset threshold, parameters of the template feature array corresponding to the current function are updated based on the third state information, the fourth state information, and the fifth state information.

[0135] Optionally, the instruction feedback status may include positive feedback and negative feedback. Within the 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 interactive instruction, which is a fixed preset action. It can be a simple multiple consecutive taps on a designated part of the device, such as the headboard position of a smart bed. If a function stop instruction is detected or the user actively stops the function, the function execution status of this custom instruction is considered to be negative feedback. At this time, the instruction update module can be entered to reversely update the corresponding instruction template. The corresponding instruction template refers to the custom instruction template with the highest similarity to the current instruction.

[0136] When performing a reverse update, the state information of the recognition instruction can be obtained first, and the state information may 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 update record, including the signal-to-noise ratio of the recognition instruction. , identify the similarity between instructions and templates , feature array for identifying instructions , instruction template before update , Template reverse update times . And the signal-to-noise ratio of the penultimate recognition instruction obtained from the forward update record , the similarity between the recognition instruction and the corresponding template If the template is updated in reverse If the value is greater than the preset threshold TH15, which can be obtained from the experience value and used to limit the number of incorrect updates, for example, 3, the instruction template before the most recent update will be Set as the instruction template bound to the current function, update the template to update the information. The update method can be referred to the following example:

[0137] Assume that there is a forward update message The update records, their signal-to-noise ratio, similarity, feature array, and instruction template before update are:

[0138]

[0139]

[0140]

[0141] like If it is greater than 1, the most recent forward update record will be deleted and Set to 0;

[0142] If the template is updated in reverse If it is not greater than the preset threshold TH15, the state information of the recognition instruction and the state information of the most recent template forward update are used to generate the template feature array corresponding to the current function. The parameters of Taking linear update as an example, the update process can be referred to:

[0143] ;

[0144] in, The updated step size of the modified instruction template can be calculated as follows:

[0145] ;

[0146] in and is a fixed update threshold, is the penalty term, where The calculation method is as follows:

[0147] ;

[0148] In one embodiment of the present application, if the instruction feedback status is positive feedback, the corresponding instruction template is positively updated, including:

[0149] Acquire first status information of the current instruction;

[0150] Obtaining the second state information of the most recent template forward update from the forward update record;

[0151] Based on the first state information and the second state information, parameters of the template feature array corresponding to the current function are updated.

[0152] Optionally, the instruction feedback status may include positive and negative feedback. Within the 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 during this time are monitored in real time. The function stop instruction is a basic interactive instruction. It is a fixed preset action and can be three consecutive taps on the device housing. If the function stop instruction is not detected or the user does not actively stop the function, the function execution status of this custom instruction is considered to be 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).

[0153] When performing a forward update, the state information of the recognition instruction can be obtained first, which includes the signal-to-noise ratio of the recognition instruction. , the similarity between the recognition instruction and the corresponding template , feature array for identifying instructions Then, the second state 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. , identify the similarity between instructions and templates The status information of the recognition instruction, the status information of the most recent template forward update, and the template feature array corresponding to the current function can be used. , update the parameters to Taking linear update as an example, the update process can refer to the following formula:

[0154] ;

[0155] in, For the updated , The instruction template update step size can be calculated by referring to:

[0156] ;

[0157] After the forward update, the forward update record can be updated. The specific update process is as follows: first, the current signal-to-noise ratio , the similarity between the recognition instruction and the corresponding template , feature array for identifying instructions , the template feature array corresponding to the function before updating , Current template reverse update times Set to 0 and use the above information as the forward update information. If the number of forward update records is less than the preset threshold TH16, a forward update information is directly inserted. If the number of forward update records is not less than the preset threshold TH16, the N+1th historical information will overwrite the previous N historical information, until N starts from 1 to N = TH16-2, and then the current forward update information will overwrite the most recent forward update information.

[0158] Finally, after the forward update or reverse update, the updated custom instruction template and the forward update information can be synchronized to the cloud server.

[0159] It is understandable that if the instruction template is not updated, the instruction recognition rate may decrease after slight changes in the user's physiological condition or usage habits, resulting in the need to re-enter the interactive instruction template. Therefore, by updating the instruction template forward or reversely in the above manner, the instruction template can be changed according to the user's usage habits, reducing the possibility of the user re-entering a single instruction template multiple times.

[0160] In the embodiment of the present application, by collecting target signals during the static period and the instruction entry period and performing quality inspection on them, low-quality signals that are interfered with by environmental factors and other factors can be effectively screened out, thereby 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 that the newly entered template has a high degree of similarity with the existing template at the feature level, thereby improving the accuracy of instruction recognition. If the similarity meets the standard, the entry is successful, otherwise a prompt message is output to avoid the entry of erroneous or low-quality instruction templates, greatly improving the quality of custom instruction template entry, optimizing the user's personalized interactive experience in the intelligent furniture scene, and enhancing the device's response accuracy and execution effect to user instructions.

[0161] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0162] In one embodiment, a device for obtaining a custom instruction template is provided, which corresponds to the method for obtaining a custom instruction template in the above embodiment. Figure 5 As shown, the customized instruction template acquisition device includes an indicator template customized 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 customized instruction template processing unit 60. The functional modules are described in detail as follows:

[0163] The indicator template customization request unit 10 is used to obtain the customized instruction template entry request sent by the target user;

[0164] a signal acquisition unit 20 configured to acquire, based on the custom instruction template entry request, a quiet period target signal and an instruction entry period target signal, wherein the quiet period refers to a time threshold for the target user to keep the device quiet, and the instruction entry period refers to a duration of time after the quiet period for prompting the target user to enter the custom instruction template;

[0165] a signal quality detection unit 30, configured to perform quality detection on the target signal during the static period and the target signal during the command input period to obtain a signal quality detection result;

[0166] A feature extraction unit 40 is configured to extract features of the target signal during the instruction input period to obtain signal features if the quality detection result meets a preset quality condition;

[0167] A similarity matching unit 50 is used to determine the similarity between the signal feature and the signal feature corresponding to the pre-stored custom instruction template;

[0168] The custom instruction template processing unit 60 is used to successfully enter the custom instruction template if the similarity meets the preset similarity condition; otherwise, the custom instruction template entry fails and a prompt message is output, wherein the custom instruction template is positively updated or reversely updated based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback.

[0169] In one embodiment of the present application, the signal quality detection unit 30 is further configured to:

[0170] determining a signal-to-noise ratio based on the target signal during the rest period and the target signal during the instruction input period;

[0171] Based on the target signal during the instruction entry period, a signal complexity is determined.

[0172] In one embodiment of the present application, the signal quality detection unit 30 is further configured to:

[0173] performing baseline removal processing on the target signal during the rest period, and calculating the energy intensity of the target signal during the rest period after the baseline removal;

[0174] performing baseline removal processing on the target signal during the instruction recording period, and calculating the energy intensity of the target signal during the instruction recording period after the baseline removal;

[0175] determining an energy intensity ratio between the energy intensity during the instruction input period and the energy intensity during the rest period;

[0176] The signal-to-noise ratio is determined based on the energy intensity ratio.

[0177] In one embodiment of the present application, the signal quality detection unit 30 is further configured to:

[0178] Determine the initial signal complexity;

[0179] performing differential processing on the target signal during the instruction input period to obtain a differential signal;

[0180] Determining whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold;

[0181] If so, a preset value is added to the initial signal complexity to obtain a final signal complexity.

[0182] In one embodiment of the present application, the quality detection result includes a signal-to-noise ratio, signal complexity, and static period energy intensity. The signal feature extraction unit 40 is further configured to:

[0183] 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, feature extraction is performed on the target signal.

[0184] In one embodiment of the present application, the signal feature extraction unit 40 is further configured to:

[0185] performing differential processing on the target signal during the instruction input period to obtain a differential signal;

[0186] performing filtering processing on the differential signal to obtain a filtered signal;

[0187] Performing sliding window processing on the filtered signal to obtain a signal after sliding window processing;

[0188] Calculating, based on the signal after sliding window processing, a first time interval between adjacent effective maximum values, a second time interval between adjacent effective minimum values, and a third time interval between adjacent effective maximum values ​​and effective minimum values;

[0189] The first time interval, the second time interval, and the third time interval are combined into a signal feature array of the target signal.

[0190] In one embodiment of the present application, the apparatus further includes: an instruction template updating unit, configured to:

[0191] Obtaining a current instruction and determining a similarity between the current instruction and each pre-stored instruction template;

[0192] If the similarity is greater than a preset similarity threshold, obtaining a command feedback status;

[0193] If the instruction feedback status is positive feedback, the corresponding instruction template will be positively updated;

[0194] If the instruction feedback state is negative feedback, the corresponding instruction template will be updated in the reverse direction.

[0195] In one embodiment of the present application, the instruction template updating unit is further configured to:

[0196] Acquire first status information of the current instruction;

[0197] Obtaining the second state information of the most recent template forward update from the forward update record;

[0198] Based on the first state information and the second state information, parameters of the template feature array corresponding to the current function are updated.

[0199] In one embodiment of the present application, the instruction template updating unit is further configured to:

[0200] Acquire third state information of the current instruction;

[0201] Acquire fourth status information of the most recent template forward update from the forward update record, wherein the status information includes the number of reverse updates and the instruction template before the most recent update;

[0202] Obtaining fifth status information of the penultimate forward update instruction from the forward update record;

[0203] If the reverse update number is greater than a preset threshold, the instruction template before the most recent update is set as the instruction template bound to the current function, and the template forward update information is updated;

[0204] If the number of template reverse updates is not greater than a preset threshold, parameters of the template feature array corresponding to the current function are updated based on the third state information, the fourth state information, and the fifth state information.

[0205] In the embodiment of the present application, by collecting target signals during the static period and the instruction entry period and performing quality inspection on them, low-quality signals that are interfered with by environmental factors and other factors can be effectively screened out, thereby 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 that the newly entered template has a high degree of similarity with the existing template at the feature level, thereby improving the accuracy of instruction recognition. If the similarity meets the standard, the entry is successful, otherwise a prompt message is output to avoid the entry of erroneous or low-quality instruction templates, greatly improving the quality of custom instruction template entry, optimizing the user's personalized interactive experience in the intelligent furniture scene, and enhancing the device's response accuracy and execution effect to user instructions.

[0206] For the specific definition of the custom instruction template acquisition device, please refer to the definition of the custom instruction template acquisition method above, which will not be repeated here. The various modules in the above-mentioned custom instruction template acquisition device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0207] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. 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 via a network connection. When the computer-readable instructions are executed by the processor, a method for obtaining a custom instruction template is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0208] In an embodiment 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 above-mentioned custom instruction template acquisition method are implemented.

[0209] In an embodiment of the application, a readable storage medium is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the steps of the above-mentioned custom instruction template acquisition method are implemented.

[0210] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related 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 embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0211] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0212] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for obtaining a custom instruction template, characterized in that: The method comprises: Get the custom instruction template entry request sent by the target user; Based on the custom instruction template entry request, obtaining a quiet period target signal and an instruction entry period target signal, wherein the quiet period refers to a time threshold for the target user to keep the device quiet, and the instruction entry period refers to the duration of prompting the target user to enter the custom instruction template after the quiet period; Performing quality detection on the target signal during the static period and the target signal during the command input period to obtain a signal quality detection result; If the quality detection result meets the preset quality condition, feature extraction is performed on the target signal during the instruction input period to obtain signal features; Determining the similarity between the signal characteristics and the signal characteristics corresponding to the pre-stored custom instruction template; If the similarity meets the preset similarity condition, the custom instruction template is successfully entered; otherwise, the custom instruction template fails to be entered and a prompt message is output, wherein the custom instruction template is positively updated or reversely updated based on the instruction feedback status, and the instruction feedback status includes positive feedback or negative feedback; When the instruction feedback state is positive feedback, the parameters of the template feature array corresponding to the current function are updated by obtaining the first state information of the current instruction and the second state information of the most recent template forward update in the forward update record; When the instruction feedback status is negative feedback, obtain the third status information of the current instruction and the status information of the two most recent forward updates in the forward update record. If the number of reverse updates is greater than the threshold, restore the template before the most recent forward update and update the record. Otherwise, combine the three status information to update the template feature array parameters.

2. The method for obtaining a custom instruction template according to claim 1, wherein: The performing quality detection on the target signal during the static period and the target signal during the instruction input period to obtain a signal quality detection result includes: determining a signal-to-noise ratio based on the target signal during the rest period and the target signal during the instruction input period; Based on the target signal during the instruction entry period, a signal complexity is determined.

3. The method for obtaining a custom instruction template according to claim 2, wherein: The determining of the signal-to-noise ratio based on the target signal during the static period and the target signal during the instruction input period includes: performing baseline removal processing on the target signal during the rest period, and calculating the energy intensity of the target signal during the rest period after the baseline removal; performing baseline removal processing on the target signal during the instruction recording period, and calculating the energy intensity of the target signal during the instruction recording period after the baseline removal; determining an energy intensity ratio between the energy intensity during the instruction input period and the energy intensity during the rest period; The signal-to-noise ratio is determined based on the energy intensity ratio.

4. The method for obtaining a custom instruction template according to claim 2, wherein: The determining of signal complexity based on the target signal during the instruction input period includes: Determine the initial signal complexity; performing differential processing on the target signal during the instruction input period to obtain a differential signal; Determining whether the maximum amplitude of the differential signal is greater than a preset amplitude threshold; If so, a preset value is added to the initial signal complexity to obtain a final signal complexity.

5. The method for obtaining a custom instruction template according to any one of claims 1 to 4, wherein: The quality detection result includes a signal-to-noise ratio, signal complexity, and energy intensity during a static period. If the quality detection result meets a preset quality condition, feature extraction is performed on the target signal during the instruction input period, including: 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, feature extraction is performed on the target signal.

6. The method for obtaining a custom instruction template according to claim 1, wherein: The extracting features of 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; Calculating, based on the signal after sliding window processing, a first time interval between adjacent effective maximum values, a second time interval between adjacent effective minimum values, and a third time interval between adjacent effective maximum values ​​and effective minimum values; The first time interval, the second time interval, and the third time interval are combined into a signal feature array of the target signal.

7. The method for obtaining a custom instruction template according to claim 1, wherein: The method further comprises: Obtaining a current instruction and determining a similarity between the current instruction and each pre-stored instruction template; If the similarity is greater than a preset similarity threshold, obtaining a command feedback status; If the instruction feedback status is positive feedback, the corresponding instruction template will be positively updated; If the instruction feedback state is negative feedback, the corresponding instruction template will be updated in the reverse direction.

8. The method for obtaining a custom instruction template according to claim 7, wherein: If the instruction feedback status is positive feedback, the corresponding instruction template is positively updated, including: Acquire first status information of the current instruction; Obtaining the second state information of the most recent template forward update from the forward update record; Based on the first state information and the second state information, parameters of the template feature array corresponding to the current function are updated.

9. The method for obtaining a custom instruction template according to claim 7, wherein: If the instruction feedback state is negative feedback, the corresponding instruction template is updated in reverse, including: Acquire third state information of the current instruction; Acquire fourth status information of the most recent template forward update from the forward update record, wherein the status information includes the number of reverse updates and the instruction template before the most recent update; Obtaining fifth status information of the penultimate forward update instruction from the forward update record; If the reverse update number is greater than a preset threshold, the instruction template before the most recent update is set as the instruction template bound to the current function, and the template forward update information is updated; If the number of template reverse updates is not greater than a preset threshold, parameters of the template feature array corresponding to the current function are updated based on the third state information, the fourth state information, and the fifth state information.

10. A device for obtaining a custom instruction template, characterized in that: The device comprises: The indicator template custom request unit is used to obtain the custom instruction template entry request sent by the target user; a signal acquisition unit, configured to acquire, based on the custom instruction template entry request, a quiet period target signal and an instruction entry period target signal, wherein the quiet period refers to a time threshold for the target user to keep the device quiet, and the instruction entry period refers to a duration of time after the quiet period for prompting the target user to enter the custom instruction template; a signal quality detection unit, configured to perform quality detection on the target signal during the static period and the target signal during the command input period to obtain a signal quality detection result; a feature extraction unit, configured to extract features of the target signal during the instruction input period to obtain signal features if the quality detection result meets a preset quality condition; a similarity matching unit, configured to determine the similarity between the signal feature and a signal feature corresponding to a pre-stored custom instruction template; a custom instruction template processing unit, configured to: if the similarity meets a preset similarity condition, successfully enter the custom instruction template; otherwise, fail to enter the custom instruction template and output a prompt message; wherein the custom instruction template is positively updated or reversely updated based on an instruction feedback status, wherein the instruction feedback status includes positive feedback or negative feedback; When the instruction feedback state is positive feedback, the parameters of the template feature array corresponding to the current function are updated by obtaining the first state information of the current instruction and the second state information of the most recent template forward update in the forward update record; When the instruction feedback status is negative feedback, obtain the third status information of the current instruction and the status information of the two most recent forward updates in the forward update record. If the number of reverse updates is greater than the threshold, restore the template before the most recent forward update and update the record. Otherwise, combine the three status information to update the template feature array parameters.

Citation Information

Patent Citations

  • 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