CN115979611A - Key quality detection method and device - Google Patents

Key quality detection method and device Download PDF

Info

Publication number
CN115979611A
CN115979611A CN202310007108.2A CN202310007108A CN115979611A CN 115979611 A CN115979611 A CN 115979611A CN 202310007108 A CN202310007108 A CN 202310007108A CN 115979611 A CN115979611 A CN 115979611A
Authority
CN
China
Prior art keywords
data
key
displacement
pressing force
network model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310007108.2A
Other languages
Chinese (zh)
Inventor
王学强
张一凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Inc
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN202310007108.2A priority Critical patent/CN115979611A/en
Publication of CN115979611A publication Critical patent/CN115979611A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Force Measurement Appropriate To Specific Purposes (AREA)

Abstract

The disclosure relates to a method and a device for detecting key quality, belonging to the technical field of key detection, wherein the method comprises the following steps: when the key is stressed to move, acquiring pressing force data from a sensor and displacement data of the key; acquiring first pressing force time sequence data and first displacement time sequence data for detecting the quality of the key according to the pressing force data and the displacement data; establishing a first network model, generating first input data adapted to the first network model according to the first pressing force time sequence data and the first displacement time sequence data, establishing a second network model, and generating second input data adapted to the second network model according to the first pressing force time sequence data and the first displacement time sequence data; inputting the first input data and the second input data into a first network model and a second network model respectively for training to obtain a first training result and a second training result; and obtaining a detection result of the key quality by using the first training result and the second training result according to a set judgment strategy.

Description

Key quality detection method and device
Technical Field
The embodiment of the disclosure relates to the technical field of key detection, and more particularly, to a key quality detection method and device.
Background
Currently, with the rapid development of electronic devices, users can press keys on electronic devices such as a remote controller, a game pad, and a smart watch to output corresponding control commands. The tactile feedback given to the user by the keys in the key pressing process of the user affects the actual operation experience of the user, so that the quality of the keys needs to be detected. The detection of the quality of the key usually sets a threshold value for the peak-to-valley value of the pressing force applied to the key, but the material, environment and other conditions change, the response of the key to the pressing force also changes, and the peak-to-valley value of the pressing force applied to the key also changes correspondingly.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a new technical solution for a key quality detection method and apparatus.
According to a first aspect of the present disclosure, a key quality detection method is provided, the method including: when the key is stressed to move, acquiring pressing force data from a sensor and displacement data of the key; acquiring first pressing force time sequence data and first displacement time sequence data for detecting the quality of the key according to the pressing force data and the displacement data; the first pressing force time sequence data is data reflecting the change of the pressing force of the key in the detection period along with the time, and the first displacement time sequence data is data reflecting the change of the displacement of the key in the detection period along with the time; establishing a first network model, generating first input data suitable for the first network model according to the first pressing force time sequence data and the first displacement time sequence data, establishing a second network model, generating second input data suitable for the second network model according to the first pressing force time sequence data and the first displacement time sequence data, and inputting the first input data and the second input data into the first network model and the second network model respectively for training to obtain a first training result and a second training result; and obtaining a detection result of the key quality by using the first training result and the second training result according to a set judgment strategy.
Optionally, the first input data reflects information of a correspondence between a pressing force applied to the key, a displacement generated by the key, and a key motion phase, where the key motion phase includes a pressing phase and a lifting phase.
Optionally, the first network model is a deep network model, and the first network model further includes a first dimension channel, a second dimension channel, and a third dimension channel; generating first input data adapted to a first network model from the first pressing force temporal data and the first displacement temporal data, comprising: inputting the first pressing force time sequence data, the first displacement time sequence data and a numerical value representing a key movement stage to the first dimension channel, the second dimension channel and the third dimension channel respectively, and generating image data suitable for a first network model as first input data; the pressing stage corresponds to a first numerical value, and the lifting stage corresponds to a second numerical value.
Optionally, the second input data reflects at least one of extreme value information of the pressing force applied to the key and the displacement generated by the key, and mean value information of the pressing force applied to the key and the displacement generated by the key in a plurality of compression time periods.
Optionally, the second network model is an ensemble learning model; generating second input data adapted to a second network model from the first pressing force temporal data and the first displacement temporal data, comprising: extracting at least one kind of extremum information for the first pressing-force time series data and the first displacement time series data, and extracting mean value information for the first pressing-force time series data and the first displacement time series data; forming first sequence data by time-series at least one of extreme value information and mean value information for the first pressing-force time-series data, and forming second sequence data by time-series at least one of extreme value information and mean value information for the first displacement time-series data; the first sequence data and the second sequence data are used as second input data suitable for a second network model.
Optionally, the at least one extreme value includes a global extreme value of the pressing force applied to the key and the displacement generated by the key in the detection period, and a local extreme value in different phases of the detection period.
Optionally, the acquiring, according to the pressing force data and the displacement data, first pressing force time series data and first displacement time series data for performing quality detection on the key includes: dividing the detection cycle into a plurality of sampling periods; obtaining a pressing force value of the key in each sampling time period in the plurality of sampling time periods as second pressing force time sequence data according to the pressing force data; obtaining a displacement value of the key in each sampling period of the plurality of sampling periods as second displacement time sequence data according to the displacement data; and obtaining the first pressing force time sequence data and the first displacement time sequence data according to the second pressing force time sequence data and the second displacement time sequence data.
Optionally, the obtaining, according to the set judgment policy, a detection result of the key quality by using the first training result and the second training result includes: screening out the maximum probability values of the probability values respectively represented by the first training result and the second training result through a set judgment strategy; and comparing the maximum probability value with a set threshold value, and obtaining the detection result according to the comparison result.
According to a second aspect of the present disclosure, there is also provided a key quality detection apparatus, the apparatus including: the data acquisition module is used for acquiring pressing force data from the sensor and displacement data of the key when the key is stressed to move; the data acquisition module is used for acquiring first pressing force time sequence data and first displacement time sequence data for detecting the quality of the key according to the pressing force data and the displacement data; the first pressing force time sequence data is data reflecting the change of the pressing force of the key in the detection period along with the time, and the first displacement time sequence data is data reflecting the change of the displacement of the key in the detection period along with the time; the data generating module is used for establishing a first network model, generating first input data suitable for the first network model according to the first pressing force time sequence data and the first displacement time sequence data, establishing a second network model, generating second input data suitable for the second network model according to the first pressing force time sequence data and the first displacement time sequence data, and training a training result obtaining module, and the training result obtaining module is used for inputting the first input data and the second input data into the first network model and the second network model respectively to carry out training to obtain a first training result and a second training result; and the detection result obtaining module is used for obtaining a detection result of the key quality by using the first training result and the second training result according to a set judgment strategy.
According to a third aspect of the present disclosure, there is also provided a key quality detection apparatus comprising a memory for storing a computer program and a processor; the processor is adapted to execute the computer program to implement the method according to the first aspect of the present disclosure.
According to a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to the first aspect of the present disclosure.
The key quality detection method and the key quality detection device have the advantages that the first pressing force time sequence data and the first displacement time sequence data are obtained through key quality detection, the first pressing force time sequence data and the first displacement time sequence data are processed respectively to obtain first input data and second input data, the first input data can be input into the first network model to obtain a first training result, the second input data is input into the second network model to obtain a second training result, and therefore detection results related to key quality are obtained. The first network model and the second network model are used for detecting the pressing force and the displacement of the key, so that the accuracy of detecting the quality of the key can be improved.
Other features of embodiments of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which is to be read in connection with the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the embodiments of the disclosure.
FIG. 1 is a schematic diagram of a key quality detection system to which a key quality detection method according to an embodiment can be applied;
FIG. 2 is a schematic flow chart diagram of a key quality detection method according to another embodiment;
FIG. 3 is a block schematic diagram of an electronic device according to another embodiment;
fig. 4 is a hardware configuration diagram of an electronic device according to another embodiment.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be discussed further in subsequent figures.
< System embodiment >
Fig. 1 is a schematic diagram of a configuration of a key quality detection system to which a key quality detection method according to an embodiment can be applied. As shown in fig. 1, the system includes a key quality detecting device, a controller 200, a motor 300, a force sensor 400, a displacement sensor 500, and a pressing head 600. The key quality detection device can be the upper computer 100, the motor 300 can be a voice coil motor, and the displacement sensor 500 can be a grating sensor. The system can be applied to a human-computer interaction scene.
The upper computer 100 may be, but is not limited to, various smart phones, personal computers, notebook computers, and tablet computers. The upper computer 100 can control the controller 200 to open, close, reset and other actions, and meanwhile, the upper computer 100 can also send an operation instruction to the controller 200 to enable the motor 300 to open, close, reset and other actions.
The controller 200 may be directly electrically connected to the upper computer 100, or may be connected through wireless communication, such as bluetooth, without limitation. The output end of the controller 200 is connected to the motor 300, and drives the motor 300 to move so as to control the pressing force of the motor 300 on the key 1000.
The motor 300 may be a voice coil motor, a moving end of the voice coil motor has a good response speed, and the moving end of the motor 300 may move to a corresponding position according to a command output from the controller 200.
The pressing head 600 is located between the force sensor 400 and the key 1000 and is fixedly connected with the force sensor 400. The pressing head 600 is in contact with the key 1000, and when the key 1000 is subjected to a force applied by a user, the pressing head 600 may transmit its deformation amount to the force sensor 400.
The force sensor 400 is electrically connected to the controller 200, and an end of the force sensor 400 remote from the pressing head may be installed at a moving end of the motor 300. The force sensor 400 may convert the force transmitted from the pressing head 600 into an electrical signal and output the electrical signal to the controller 200 through the amplifier 410.
The displacement sensor 500 is electrically connected to the controller 200, and the displacement sensor 500 may be a grating sensor, which can obtain the moving distance of the key 1000 and output the moving distance to the controller 200 as an electrical signal.
The system may further include a limit switch 700, and the limit switch 700 may be an electro-optical switch as shown in fig. 1, which detects whether the moving end of the motor 300 moves to the limit position. When the upper computer 100 detects that the moving end of the motor 300 reaches the limit position, the feedback is given to the controller 200, and the controller 200 controls the motor 300 to stop moving or to exit in the opposite direction, so that the limiting effect is achieved on the motor 300.
In the embodiments of the present disclosure, the memory of the key quality detection apparatus is used for storing a computer program for controlling the processor of the key quality detection apparatus to operate to implement the key quality detection method according to any of the embodiments. A skilled person can design a computer program according to the solution of the embodiments of the present disclosure. How the computer program controls the operation of the processor is well known in the art and will not be described in detail here.
< method examples >
FIG. 2 is a flow diagram of a key quality detection method according to one embodiment. In this embodiment, the key quality detection apparatus is used as an execution main body.
As shown in fig. 2, the key quality detection method of the present embodiment may include the following steps S201 to S205:
step S201, when the key is forced to move, the pressing force data from the sensor and the displacement data of the key are collected.
The force sensor can be disposed on the key to convert the pressing force into data, namely pressing force data, and the displacement sensor can be disposed on the key to convert the moving distance of the key into data, namely displacement data.
Specifically, when the user presses the key, the key moves under the pressure applied by the user, the force sensor can output the collected pressing force data, and the displacement sensor can output the collected displacement data to the key quality detection device.
Step S202, according to the pressing force data and the displacement data, first pressing force time sequence data and first displacement time sequence data for detecting the quality of the key are obtained; the first pressing force time sequence data is data reflecting the change of the pressing force of the key in the detection period along with the time, and the first displacement time sequence data is data reflecting the change of the displacement of the key in the detection period along with the time.
Specifically, the whole process of the movement change of the key when the user presses the pressing head can be used as a detection period. In the detection period, the pressing head can transmit the received force to the force sensor, and meanwhile, the displacement sensor can obtain the moving distance of the pressing head. The corresponding key quality detection device can obtain data reflecting the change of the pressing force of the key in the detection period along with time, and the data is first pressing force time sequence data. The key quality detection device can also obtain data reflecting the change of the displacement of the key in the detection period along with the time, wherein the data is the first displacement time sequence data.
In one embodiment, step S202 specifically includes the following: dividing a detection cycle into a plurality of sampling periods; obtaining a pressing force value of the key in each sampling period in a plurality of sampling periods according to the pressing force data to serve as second pressing force time sequence data; obtaining a displacement value of the key in each sampling period in a plurality of sampling periods as second displacement time sequence data according to the displacement data; and obtaining first pressing force time sequence data and first displacement time sequence data according to the second pressing force time sequence data and the second displacement time sequence data.
Specifically, the detection cycle is divided into a plurality of sampling periods such that the length of each sampling period is the same. From the pressing force data and the displacement data, a pressing force value and a displacement value corresponding to each sampling period in the detection cycle are determined. And under the condition that a plurality of pressure values or displacement values exist in a certain sampling period, taking the average value of the pressure values or the displacement values, so that the sampling period and the corresponding average value can be used as second pressing force time sequence data or second displacement time sequence data. And under the condition that the pressing force value or the displacement value does not exist in a certain sampling time sequence, taking the average value of the pressing force values or the displacement average values of two adjacent sampling time periods, so that the average value and the corresponding sampling time sequence can be used as second pressing force time sequence data or second displacement time sequence data. The second pressing force time sequence data and the second displacement time sequence data in the same sampling period are screened out, so that the pressing force mean value and the displacement mean value in multiple sampling periods can be obtained, and the data volume required to be processed by the key quality detection device is effectively reduced under the condition that data is not distorted.
Similarly, the second pressing-force time series data or the second displacement time series data may be normalized, specifically, for example: setting the maximum value and the minimum value of the press pressure value and the maximum value and the minimum value of the displacement value of the key. Normalizing the pressing force average value in the second pressing force time series data by using a maximum and minimum normalization method based on the maximum value and the minimum value of the pressing force values; and normalizing the displacement mean value in the second displacement time series data by using a maximum and minimum normalization method based on the maximum value and the minimum value of the displacement. And then obtaining the normalized pressing force data and displacement data, wherein the normalized pressing force data and displacement data can be in one-to-one correspondence with corresponding acquisition time periods. In other words, the normalized data specification is uniform, so as to reduce the difficulty of subsequently constructing the first model or the second network model.
Step S203, building a first network model, generating first input data adapted to the first network model according to the first pressing force time series data and the first displacement time series data, building a second network model, and generating second input data adapted to the second network model according to the first pressing force time series data and the first displacement time series data.
The first network model and the second network model can be probability measurement models which are different from each other, so that corresponding probability data can be obtained in two different modes. Accordingly, the first compression force timing data and the first displacement timing data need to be processed for different network models to adapt the corresponding network models.
Specifically, the first pressing force time series data and the first displacement time series data are processed, and the specific processing may be to classify pressing forces and displacements in the first pressing force time series data and the first displacement time series data according to different key movement phases and different times, so that the processed first pressing force time series data and first displacement time series data may be input into the first network model. The first pressing-force time-series data and the first displacement time-series data are processed, and specific processing may be to extract characteristic values such as a start value, a final value, a maximum value, and a minimum value. So that the feature value extracted in the first pressing-force time-series data and the feature value extracted in the first displacement time-series data can be input into the second network model.
Step S204, inputting the first input data and the second input data into the first network model and the second network model respectively for training to obtain a first training result and a second training result.
Specifically, probability data obtained by outputting the first input data to the first network model is used as a first training result. And outputting the second input data to the second network model to obtain probability data serving as a second training result. In other words, the probability data output by the two different network models can effectively improve the accuracy of subsequent key quality judgment.
In one embodiment, the first input data may reflect a pressing force applied to the key, a displacement generated by the key, and information about a correspondence relationship between key motion phases, where the key motion phases include a pressing phase and a lifting phase.
The key movement phase can include a pressing phase and a lifting phase, because the key is pressed and rebounded under different forces.
Specifically, the first pressing force time sequence data is divided into different data according to a pressing stage and a lifting stage, and the first displacement time sequence data is divided into different data according to the pressing stage and the lifting stage, so that the corresponding relation among the pressing force applied to the key, the displacement generated by the key and different key motion stages can be obtained, and the first pressing force time sequence data and the first displacement time sequence data of the different key motion stages can be classified and processed. In other words, for different variation trends of the pressing force and the displacement in different key movement stages, the first model can process the first input data in a case-by-case manner, so that the degree of reality of the output first training result is higher.
In one embodiment, the first network model is a deep neural network model, the first network model further comprising a first dimension channel, a second dimension channel, and a third dimension channel. The process of generating first input data adapted to the first network model specifically comprises: and respectively inputting the first pressing force time sequence data, the first displacement time sequence data and the numerical value representing the key movement stage into the first dimension channel, the second dimension channel and the third dimension channel, and generating image data suitable for the first network model as first input data. The pressing stage corresponds to a first numerical value, and the lifting stage corresponds to a second numerical value.
Specifically, the detection period may be divided into N sampling periods, N > 0 and N being an integer. Each sampling period corresponds to a pressure value and a displacement value respectively. And determining the key motion phase corresponding to each sampling period according to the variation trend of the pressure value and the displacement value of each sampling period, wherein the two key motion phases respectively correspond to different numerical values, specifically, for example, the first value corresponding to the pressing-down phase may be 1.2, and the second value corresponding to the lifting-up phase may be 1. Therefore, a three-dimensional matrix is constructed according to the numerical values of the press pressure value, the displacement value and the key motion stage corresponding to the N sampling time periods. The first input data may include a numerical value corresponding to the first dimension, a numerical value corresponding to the second dimension, and a numerical value corresponding to the third dimension. The first dimension may be represented as a pressing force value, the second dimension may be represented as a displacement value, and the third dimension may be represented as a numerical value of a pressing motion phase. Inputting first input data into a first model, wherein the first network model is a deep neural network model and comprises a first dimension channel input numerical value corresponding to a first dimension, a second dimension channel input numerical value corresponding to a second dimension and a third dimension channel input numerical value corresponding to a third dimension. The first network model may set different key motion phases input to the third dimension channel to different colors, for example: the press-down stage corresponds to blue and the press-up stage corresponds to red. And constructing an N multiplied by N plane image by taking the pressing force value of each sampling time period as a vertical axis coordinate, taking the displacement value as a horizontal axis coordinate and setting a numerical value corresponding to the key movement stage at the corresponding coordinate position. And sampling all sampling periods, inputting the samples into the first network model for training to obtain a first training result, namely confidence matrix data. The expression for specifically generating the confidence matrix data may be as follows:
D image =f matrix (D sensor ) Formula (1)
In the formula (1), D sensor Representing pressing and displacement values for different sampling periods, D image Representing confidence matrix data, f matrix () A matrix conversion algorithm is shown, and the matrix conversion algorithm is not described in the prior art.
Optionally, the first network model is a pre-trained deep neural network model, wherein the deep neural network may be implemented based on convolutional neural network construction. Inputting the three-dimensional matrix data into the deep neural network model may obtain a first training result, which may be expressed as a confidence matrix P 1 Confidence matrix P 1 A prediction probability that the deep neural network model is good for key quality may be included. In other words, the accuracy of judging the excellent quality of the keys can be effectively improved through the confidence matrix data output by the deep neural network model.
In one embodiment, the second input data may reflect at least one of extreme value information of the pressing force applied to the key and the displacement generated by the key, and average value information of the pressing force applied to the key and the displacement generated by the key in a plurality of compression periods.
Specifically, the extreme value information of the pressing force applied to the key and the displacement generated by the key in the detection period can be determined. The extreme value information includes a pressing force extreme value and a displacement extreme value in the detection period, the pressing force extreme value may include a maximum value and a minimum value in the pressing force values, and the displacement extreme value may include a maximum value and a minimum value in the displacement values. And determining a plurality of pressure values and a plurality of displacement values between the extreme values, respectively compressing the plurality of pressure values and the plurality of displacement values through a data compression algorithm to obtain corresponding average values, and further obtaining average value information of the pressing force applied to the key and the displacement generated by the key in a plurality of compression time periods. In other words, the pressing force extreme value and the displacement extreme value can reflect the trend of the change of the pressing force and the displacement to a greater extent, and the obtained mean value of the pressing force value and the displacement value can reflect the change degree of the pressing force and the displacement in the change process, so that the memory occupation can be reduced under the condition of ensuring that the data is not distorted by obtaining corresponding second input data through the screened extreme value and mean value.
In one embodiment, the second network model is an ensemble learning model; the process of generating the second input data specifically includes the following: extracting at least one kind of extremum information for the first pressing-force time series data and the first displacement time series data, and extracting mean value information for the first pressing-force time series data and the first displacement time series data; forming first sequence data by time sequence of at least one kind of extremum information and mean value information for the first pressing-force time sequence data, and forming second sequence data by time sequence of at least one kind of extremum information and mean value information for the first displacement time sequence data; the first sequence data and the second sequence data are used as second input data for a second network model.
Specifically, the extreme value information and the mean value information for the first pressing-force time series data are functionally connected and output to obtain first series data, the extreme value information and the mean value information for the first displacement time series data are functionally connected and output to obtain second series data, and the first series data and the second series data are used as second input data. Wherein the function may be a concatenate function. The expression for the specific sequence data may be as follows:
D sequence =concatenate(f feature (D sensor ),f compress (D sensor ) Equation (2)
In the formula (2), D sensor Representing the above-selected extreme and mean values, D sequence Representing sequence data, f feature () Expression feature extraction algorithm, f compress () The data compression algorithm is shown, and the feature extraction algorithm and the data compression algorithm are not specifically described in the prior art.
In one embodiment, the at least one extreme value may include a global extreme value of the pressing force applied to the key and the displacement generated by the key during the detection period, and a local extreme value during different phases of the detection period.
Specifically, the at least one extreme value may include a pressing force value and a displacement value at which the pressing force reaches a maximum value within the detection period, a local maximum value and a local minimum value corresponding to the pressing force and the displacement, respectively, in a pressing stage within the detection period, and a local maximum value and a local minimum value corresponding to the pressing force and the displacement, respectively, in a lifting stage within the detection period. In other words, the extreme values of the whole detection period and different key motion phases are screened, and the obtained extreme points can be increased, so that the accuracy of the second input data is further improved.
Further, the second network model is an ensemble learning model.
Wherein the second input data is input into the ensemble learning model. The ensemble learning model may employ the series method XGBOOST or the parallel method random forest. The training parameters of the ensemble learning model can be used for searching corresponding optimal configuration by adopting a Bayesian optimization method.
Specifically, inputting the second input data into the ensemble learning model may obtain a second training result, and the second training result may be represented as the confidence matrix P 2 Confidence matrix P 2 A prediction probability that the ensemble learning model is good for key quality may be included. In other words, by inputting the sequence data to the ensemble learning model, the accuracy of the determination of the key-press excellence can be effectively improved.
More particularly, in order to improve the accuracy of the training results output by the deep neural network model and the ensemble learning model, pressing force time series data and displacement time series data in the key detection process can be collected, and the key quality can be judged according to the pressing force time series data and the displacement time series data. And generating a data label according to the judgment quality result. The process of training the deep neural network model and the ensemble learning model using the data labels is not specifically set forth herein for the prior art. Through the trained deep neural network model and the integrated learning model, the accuracy of a first training result and a second training result output by the deep neural network model and the integrated learning model respectively can be improved.
And step S205, obtaining a detection result of the key quality by using the first training result and the second training result according to the set judgment strategy.
Specifically, when the first training result and the second training result are obtained, the key quality detection device may obtain the detection result related to the key quality by taking an average value of the first training result and the second training result or comparing the first training result and the second training result, so that the user may determine whether the key quality is good or not according to the detection result.
In one embodiment, step S205 specifically includes the following: screening out the maximum probability values of the probability values respectively represented by the first training result and the second training result through a set judgment strategy; and comparing the maximum probability value with a set threshold value, and obtaining a detection result according to a comparison result.
First, a judgment policy may be preset, and an expression of the judgment policy is specifically as follows:
Figure BDA0004035880280000121
in formula (3), R represents the maximum probability value, max () represents the maximum value taken,. Ndex represents the corresponding sampling period taken, P 1 Represents the first training result, P 2 Representing the second training result.
Accordingly, the first training result output by the first network model may be a probability value, and the second training result output by the second network model may also be a probability value. The first training result and the second training result are input into equation (3). When the probability values respectively represented by the first training result and the second training result are equal, P is taken 1 I.e. the first training result. And when the probability values respectively represented by the first training result and the second training result are not equal, taking the larger value, wherein the value output by the formula (3) is the obtained maximum probability value. Comparing the obtained maximum probability value with a preset threshold value to obtain a comparison result, and comparing the comparison result with the preset threshold valueAnd comparing the result to obtain a detection result. Specific examples thereof include: when the maximum probability value is smaller than a preset threshold value, the comparison result may be "0", and the corresponding detection result may be that the key is unqualified. When the maximum probability value is not less than the preset threshold value, the comparison result may be "1", and the corresponding detection result may be that the key is qualified.
< first embodiment of the apparatus >
FIG. 3 is a functional block diagram of an electronic device according to one embodiment. As shown in fig. 4, the key quality detecting apparatus 310 may include a data acquiring module 311, a data acquiring module 312, a data generating module 313, a training result obtaining module 314, and a detection result obtaining module 315.
The data acquisition module 311 is used for acquiring pressing force data from the sensor and displacement data of the key when the key is forced to move; a data obtaining module 312, configured to obtain, according to the pressing force data and the displacement data, first pressing force time sequence data and first displacement time sequence data for performing quality detection on the key; the first pressing force time sequence data is data reflecting the change of the pressing force of the key in the detection period along with the time, and the first displacement time sequence data is data reflecting the change of the displacement of the key in the detection period along with the time; a data generating module 313, configured to establish a first network model, generate first input data adapted to the first network model according to the first pressing force time sequence data and the first displacement time sequence data, establish a second network model, and generate second input data adapted to the second network model according to the first pressing force time sequence data and the first displacement time sequence data; a training result obtaining module 314, configured to input the first input data and the second input data into the first network model and the second network model, respectively, for training to obtain a first training result and a second training result; and a detection result obtaining module 315, configured to obtain a detection result of the key quality by using the first training result and the second training result according to the set judgment policy.
Optionally, the data generating module 313 is further configured to input the first pressing force time series data, the first displacement time series data, and a numerical value representing a key movement stage to the first dimension channel, the second dimension channel, and the third dimension channel, respectively, and generate image data adapted to the first network model as first input data; the pressing stage corresponds to a first value, and the lifting stage corresponds to a second value.
Optionally, the data obtaining module 312 is further configured to divide the detection cycle into a plurality of sampling periods; obtaining a pressing force value of the key in each sampling period in a plurality of sampling periods according to the pressing force data to serve as second pressing force time sequence data; obtaining a displacement value of the key in each sampling period of a plurality of sampling periods as second displacement time sequence data according to the displacement data; and obtaining first pressing force time sequence data and first displacement time sequence data according to the second pressing force time sequence data and the second displacement time sequence data.
Optionally, the detection result obtaining module 315 is further configured to obtain a maximum probability value for determining that the quality of the key is qualified by using the first training result and the second training result according to a set judgment policy; and comparing the maximum probability value with a set threshold value, and obtaining a detection result according to a comparison result.
The key quality detection device 310 may be the upper computer 100 in fig. 1.
< second device embodiment >
Fig. 4 is a hardware configuration diagram of a key quality detection apparatus according to another embodiment.
As shown in fig. 4, the key quality detection apparatus 420 comprises a processor 421 and a memory 422, the memory 422 is used for storing an executable computer program, and the processor 421 is used for executing the method according to any of the above method embodiments according to the control of the computer program.
The key quality detecting device 420 may be the upper computer 100 in fig. 1.
The modules of the key quality detection apparatus 310 may be implemented by the processor 421 in the present embodiment executing a computer program stored in the memory 422, or may be implemented by other structures, which is not limited herein.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be interpreted as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. A key quality detection method is characterized by comprising the following steps:
when the key is stressed to move, acquiring pressing force data from a sensor and displacement data of the key;
acquiring first pressing force time sequence data and first displacement time sequence data for detecting the quality of the key according to the pressing force data and the displacement data; the first pressing force time sequence data is data reflecting the change of the pressing force of the key in the detection period along with the time, and the first displacement time sequence data is data reflecting the change of the displacement of the key in the detection period along with the time;
establishing a first network model, generating first input data suitable for the first network model according to the first pressing force time sequence data and the first displacement time sequence data, establishing a second network model, and generating second input data suitable for the second network model according to the first pressing force time sequence data and the first displacement time sequence data;
inputting the first input data and the second input data into a first network model and a second network model respectively for training to obtain a first training result and a second training result;
and obtaining a detection result of the key quality by using the first training result and the second training result according to a set judgment strategy.
2. The method of claim 1, wherein the first input data reflects a pressing force applied to the key, a displacement generated by the key, and information about correspondence between key motion phases, wherein the key motion phases include a pressing phase and a lifting phase.
3. The method of claim 2, wherein the first network model is a deep neural network model, the first network model further comprising a first dimension channel, a second dimension channel, and a third dimension channel;
the generating first input data adapted to a first network model from the first pressing force timing data and the first displacement timing data includes:
inputting the first pressing force time sequence data, the first displacement time sequence data and a numerical value representing a key movement stage into the first dimension channel, the second dimension channel and the third dimension channel respectively, and generating image data suitable for a first network model as first input data;
the pressing stage corresponds to a first numerical value, and the lifting stage corresponds to a second numerical value.
4. The method according to claim 1, wherein the second input data reflects at least one of extremal information of the pressing force applied to the key and the displacement of the key, and a mean value of the pressing force applied to the key and the displacement of the key over a plurality of compression periods.
5. The method of claim 4, wherein the second network model is an ensemble learning model;
generating second input data adapted to a second network model from the first pressing force temporal data and the first displacement temporal data, comprising:
extracting at least one kind of extremum information for the first pressing-force time series data and the first displacement time series data, and extracting mean value information for the first pressing-force time series data and the first displacement time series data;
forming first sequence data by time-series at least one of extreme value information and mean value information for the first pressing-force time-series data, and forming second sequence data by time-series at least one of extreme value information and mean value information for the first displacement time-series data;
the first sequence data and the second sequence data are used as second input data suitable for a second network model.
6. The method of claim 4, wherein the at least one extreme comprises a global extreme of the pressing force applied to the key and the displacement of the key during the detection period, and a local extreme during different phases of the detection period.
7. The method according to any one of claims 1 to 6, wherein the obtaining of the first pressing force time series data and the first displacement time series data for quality detection of the key based on the pressing force data and the displacement data comprises:
dividing the detection cycle into a plurality of sampling periods;
obtaining a pressing force value of the key in each sampling time period in the plurality of sampling time periods as second pressing force time sequence data according to the pressing force data;
obtaining a displacement value of the key in each sampling period of the plurality of sampling periods as second displacement time sequence data according to the displacement data;
and obtaining the first pressing force time sequence data and the first displacement time sequence data according to the second pressing force time sequence data and the second displacement time sequence data.
8. The method according to any one of claims 1 to 6, wherein the obtaining the detection result of the key press quality by using the first training result and the second training result according to the set judgment strategy comprises:
screening out the maximum probability value of the probability values respectively represented by the first training result and the second training result through a set judgment strategy;
and comparing the maximum probability value with a set threshold value, and obtaining the detection result according to the comparison result.
9. A key quality detection apparatus, the apparatus comprising:
the data acquisition module is used for acquiring pressing force data from the sensor and displacement data of the key when the key is stressed to move;
the data acquisition module is used for acquiring first pressing force time sequence data and first displacement time sequence data for detecting the quality of the key according to the pressing force data and the displacement data; the first pressing force time sequence data is data reflecting the change of the pressing force of the key in the detection period along with the time, and the first displacement time sequence data is data reflecting the change of the displacement of the key in the detection period along with the time;
the data generation module is used for establishing a first network model, generating first input data suitable for the first network model according to the first pressing force time sequence data and the first displacement time sequence data, establishing a second network model, and generating second input data suitable for the second network model according to the first pressing force time sequence data and the first displacement time sequence data;
a training result obtaining module, configured to input the first input data and the second input data into a first network model and a second network model respectively for training to obtain a first training result and a second training result;
and the detection result obtaining module is used for obtaining the detection result of the key quality by utilizing the first training result and the second training result according to a set judgment strategy.
10. A key quality detection device is characterized by comprising a memory and a processor, wherein the memory is used for storing a computer program; the processor is configured to execute the computer program to implement the key quality detection method according to any one of claims 1 to 8.
CN202310007108.2A 2023-01-03 2023-01-03 Key quality detection method and device Pending CN115979611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310007108.2A CN115979611A (en) 2023-01-03 2023-01-03 Key quality detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310007108.2A CN115979611A (en) 2023-01-03 2023-01-03 Key quality detection method and device

Publications (1)

Publication Number Publication Date
CN115979611A true CN115979611A (en) 2023-04-18

Family

ID=85966530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310007108.2A Pending CN115979611A (en) 2023-01-03 2023-01-03 Key quality detection method and device

Country Status (1)

Country Link
CN (1) CN115979611A (en)

Similar Documents

Publication Publication Date Title
US10515627B2 (en) Method and apparatus of building acoustic feature extracting model, and acoustic feature extracting method and apparatus
KR100943792B1 (en) A device and a method for identifying movement pattenrs
US8793621B2 (en) Method and device to control touchless recognition
CN110517685B (en) Voice recognition method and device, electronic equipment and storage medium
JP2019003700A (en) Automatic fitting of haptic effects
KR20220009965A (en) Network training method and apparatus, target detection method and apparatus, and electronic device
EP4273742A1 (en) Handwriting recognition method and apparatus, electronic device, and medium
JP2020532020A (en) Application preloading methods, terminal devices, and media
CN105354560A (en) Fingerprint identification method and device
CN107993651B (en) Voice recognition method and device, electronic equipment and storage medium
KR20210052036A (en) Apparatus with convolutional neural network for obtaining multiple intent and method therof
JP2022533065A (en) Character recognition methods and devices, electronic devices and storage media
CN104992715A (en) Interface switching method and system of intelligent device
CN110349577B (en) Man-machine interaction method and device, storage medium and electronic equipment
CN112286360A (en) Method and apparatus for operating a mobile device
CN114333804A (en) Audio classification identification method and device, electronic equipment and storage medium
US20200204365A1 (en) Apparatus, system and method for application-specific biometric processing in a computer system
CN115979611A (en) Key quality detection method and device
CN111816211B (en) Emotion recognition method and device, storage medium and electronic equipment
CN110691016B (en) Interactive method realized based on audio equipment and audio equipment
CN111831116A (en) Intelligent equipment interaction method based on PPG information
US20230169395A1 (en) Artificial intelligence based methods and systems for quantifying confidence in insights of an input dataset
CN110929767B (en) Font processing method, system, device and medium
CN112948763B (en) Piece quantity prediction method and device, electronic equipment and storage medium
KR102045417B1 (en) Apparatus for recognizing fingerprint for elderly and method thereof

Legal Events

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