Verification method and model training method, device, equipment and storage medium
By integrating multiple sensors into electronic devices to collect user movement data and classifying it using pre-trained models, combined with transfer learning and lightweight network training, a personalized verification model is generated, which solves the problem of reduced CAPTCHA security and achieves higher-security user verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2022-03-24
- Publication Date
- 2026-04-28
AI Technical Summary
In existing electronic device security verification methods, the security of CAPTCHAs has been reduced due to advancements in image and voice recognition technologies, resulting in insecure verification.
By integrating multiple sensors into electronic devices, data is collected on the user's mobile device activity. A pre-trained verification model is used for classification, and a personalized verification model is generated by combining transfer learning and lightweight network training to achieve verification of user trajectory and character matching.
It improves the security and accuracy of user verification, reduces the verification load on the server, and enhances the ability to recognize complex characters.
Smart Images

Figure CN114722368B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of information security or finance, and more specifically, to a verification method, model training method, apparatus, equipment, medium, and program product. Background Technology
[0002] Considering factors such as user property security or data security, users are generally verified before using electronic devices or applications within those devices.
[0003] Existing electronic device security verification methods typically employ a combination of verification approaches, including CAPTCHAs and biometric identification. CAPTCHAs generally use graphic or audio verification codes, while biometric identification includes facial recognition, fingerprint recognition, and voiceprint recognition.
[0004] In scenarios involving combined security verification, CAPTCHAs, as the first layer of verification, require a high level of security. However, with advancements in image and voice recognition technologies, existing image or voice CAPTCHA cracking techniques are becoming increasingly sophisticated, leading to a continuous decrease in CAPTCHA security. CAPTCHAs may be technically cracked during security verification, rendering them unable to achieve their intended security purpose. Therefore, developing a more secure user verification method has become a pressing issue. Summary of the Invention
[0005] In view of the above problems, this disclosure provides verification methods, model training methods, apparatus, devices, media and program products to improve user verification security.
[0006] One aspect of this disclosure provides a verification method for an electronic device, the electronic device including N types of sensors. The verification method includes: in response to an operation by a first user, determining information to be verified, wherein the information to be verified includes M characters, and N and M are integers greater than or equal to 1; during a first time period in which the first user moves the electronic device based on the M characters, collecting first verification data from the N types of sensors, wherein the collection of the verification data is authorized by the first user; classifying the first verification data using a pre-trained verification model and outputting a classification result; and verifying that the verification is successful if the classification result indicates that the trajectory of the first user moving the electronic device matches the M characters.
[0007] According to an embodiment of this disclosure, the verification model includes a first verification model. The step of classifying the first verification data using the pre-trained verification model and outputting the classification result includes: classifying the first verification data of the N types of sensors using the first verification model and outputting the classification result; wherein, the first verification model is trained based on the historical verification information of the first user, and the historical verification information includes historical data of the N types of sensors collected when the first user moves the electronic device.
[0008] According to an embodiment of this disclosure, the verification model further includes a second verification model. Before obtaining the first verification model, classifying the first verification data using a pre-trained verification model and outputting the classification result includes: classifying the first verification data of the N types of sensors using the second verification model and outputting the classification result. The second verification model includes a pre-trained model received by the electronic device from the server, and the second verification model is a general verification model. The method further includes: if the verification passes, using the first verification data of the N types of sensors collected this time as the historical data.
[0009] According to an embodiment of this disclosure, the first verification model is obtained by training a model based on the historical verification information of the first user, which includes: training a model based on the second verification model and the historical verification information to obtain the first verification model.
[0010] According to embodiments of this disclosure, the method includes: training the transfer learning model in the electronic device to obtain the first verification model.
[0011] According to embodiments of this disclosure, the method further includes training the second verification model in the server, specifically including: obtaining S training samples, wherein each of the S training samples includes second verification data collected by the N sensors by a second user moving an electronic device based on an image of any character, and the character label corresponding to the second verification data, where S is an integer greater than or equal to 1; inputting the S training samples into a lightweight network, so that the lightweight network outputs a prediction result based on the second verification data in each training sample; and updating the parameters in the lightweight network according to the degree of difference between the prediction result and the corresponding character label, to obtain the second verification model.
[0012] According to an embodiment of this disclosure, obtaining S training samples includes obtaining second verification data for N types of sensors corresponding to each training sample. Specifically, this includes: obtaining data for each of the N types of sensors during a second time period when the second user moves the electronic device based on an image of any character; obtaining an N-dimensional matrix based on the data for each of the N types of sensors; and performing a dimensionality reduction operation on the N-dimensional matrix to obtain the second verification data.
[0013] According to an embodiment of this disclosure, the N types of sensors include a first sensor. Before classifying the first verification data using a pre-trained verification model, the method further includes: setting M corresponding data windows for each of the M characters; segmenting the first verification data based on inflection point data and the M data windows to obtain third verification data corresponding to each character, wherein the inflection point data includes data from the first sensor at the i-th moment within the first time period, where i is an integer greater than or equal to 1.
[0014] According to an embodiment of this disclosure, segmenting the first verification data includes: determining the length of the m-th data window based on sample data of the m-th character among the M characters, wherein the sample data of the m-th character includes data collected by the first sensor during the process of at least one second user moving the electronic device according to the information of the m-th character; determining the starting position of the m-th data window, wherein the starting position includes the position at any moment within the first time period; determining the ending position based on the starting position and the length for the data of the first sensor if there are a preset number of inflection point data within the length; and segmenting the first verification data based on the starting position and the ending position to obtain the third verification data of the m-th character.
[0015] According to an embodiment of this disclosure, determining the starting position of the m-th data window includes: if the m-th character is the first character, the starting position is the position of the starting time of the first time period; if the m-th character is not the first character, determining the ending position of the (m-1)-th character and the first inflection point data after the ending position of the (m-1)-th character; and taking the position of the time of the first inflection point data as the starting position.
[0016] According to an embodiment of this disclosure, classifying the first verification data using a pre-trained verification model and outputting the classification result includes: drawing a trajectory image of the first user moving the electronic device based on the first verification data; performing text recognition on the trajectory image to output M predicted characters; and outputting the M predicted characters as the classification result.
[0017] Another aspect of this disclosure provides a model training method for a server. The method includes: obtaining S training samples, wherein each of the S training samples includes second verification data collected by a second user moving an electronic device based on an image of any character, and character labels corresponding to the second verification data collected by the second user; the electronic device includes the N types of sensors, and S is an integer greater than or equal to 1; inputting the S training samples into a lightweight network, causing the lightweight network to output a prediction result based on the second verification data in each training sample; updating the parameters in the lightweight network according to the degree of difference between the prediction result and the corresponding character label to obtain a second verification model; and sending the second verification model to the electronic device, causing the electronic device to use the second verification model to verify a first user.
[0018] According to an embodiment of this disclosure, after the second verification model is sent to the electronic device, the electronic device is configured to: train a model based on the second verification model and historical verification information through transfer learning to obtain a first verification model, so as to perform verification using the first verification model; wherein, the historical verification information includes historical data of the N types of sensors collected when the first user moves the electronic device.
[0019] Another aspect of this disclosure provides a verification device for an electronic device. The electronic device includes N types of sensors. The device includes: an information determination module, configured to determine information to be verified in response to an operation by a first user, wherein the information to be verified includes M characters, and N and M are integers greater than or equal to 1; a data acquisition module, configured to acquire first verification data from the N types of sensors during a first time period in which the first user moves the electronic device based on the M characters, wherein the acquisition of the verification data is authorized by the first user; a data classification module, configured to classify the first verification data using a pre-trained verification model and output a classification result; and a user verification module, configured to verify the device if the classification result indicates that the trajectory of the first user moving the electronic device matches the M characters.
[0020] Another aspect of this disclosure provides a model training apparatus for a server. The model training apparatus includes: a training sample module for obtaining S training samples, wherein each of the S training samples includes second verification data collected by a second user moving an electronic device based on an image of any character, and a character label corresponding to the second verification data; the electronic device includes the N types of sensors; a prediction result module for inputting the S training samples into a lightweight network, so that the lightweight network outputs a prediction result based on the second verification data in each training sample; a parameter update module for updating the parameters in the lightweight network according to the degree of difference between the prediction result and the corresponding character label, to obtain a second verification model; and a model deployment module for sending the second verification model to the electronic device, so that the electronic device uses the second verification model to verify a first user.
[0021] Another aspect of this disclosure provides an electronic device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the method as described above.
[0022] Another aspect of this disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method described above.
[0023] Another aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0024] The above one or more embodiments have the following beneficial effects:
[0025] 1) The verification method of this disclosure can use M characters as the information to be verified to classify the first verification data generated by N sensors during the movement of the first user's electronic device. If the trajectory of the first user's electronic device matches the M characters, the verification is successful. Thus, using sensor data generated by the movement of the electronic device as the basis for verification in a dimension different from image or sound recognition, and further classifying and processing the first verification data, the effect of security verification is achieved.
[0026] 2) The model training method of this disclosure provides a second verification model that is easy to deploy in electronic devices and can run in electronic devices to improve verification speed and reduce server pressure. Furthermore, by training the second verification model on a server using a large number of training samples, the verification accuracy of the second verification model for more complex characters can be improved. Attached Figure Description
[0027] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0028] Figure 1 The illustration shows an application scenario diagram of the verification method and model training method according to embodiments of the present disclosure;
[0029] Figure 2 A flowchart illustrating a verification method according to an embodiment of the present disclosure is shown schematically.
[0030] Figure 3 A flowchart illustrating the classification of first verification data according to an embodiment of the present disclosure is shown schematically;
[0031] Figure 4 A flowchart illustrating a model training method according to an embodiment of the present disclosure is shown schematically.
[0032] Figure 5 A flowchart illustrating the process of obtaining second verification data according to an embodiment of the present disclosure is shown schematically;
[0033] Figure 6 A flowchart illustrating the process of obtaining third verification data according to an embodiment of the present disclosure is shown schematically;
[0034] Figure 7 A flowchart illustrating the segmentation of first verification data according to an embodiment of the present disclosure is shown schematically;
[0035] Figure 8 A flowchart illustrating the process of obtaining a first verification model according to an embodiment of the present disclosure is shown schematically;
[0036] Figure 9 A flowchart illustrating a verification method according to another embodiment of the present disclosure is shown schematically;
[0037] Figure 10 A schematic block diagram of a verification apparatus according to an embodiment of the present disclosure is shown.
[0038] Figure 11 A schematic block diagram of a model training apparatus according to an embodiment of the present disclosure is shown.
[0039] Figure 12A block diagram schematically illustrates an electronic device suitable for implementing a verification method and a model training method according to embodiments of the present disclosure. Detailed Implementation
[0040] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0041] In this document, electronic devices may include portable devices such as smartphones, tablet PCs, mobile phones, video phones, e-book readers, portable / mobile medical devices, cameras, and wearable devices such as smart glasses, head-mounted devices (HMDs), electronic clothing, electronic bracelets, electronic necklaces, smart mirrors, and smartwatches.
[0042] According to some embodiments of this disclosure, the electronic device may be a smart home appliance, such as a TV box (e.g., Samsung HomeSync™, Apple TV™, or Google TV™), a game console (e.g., Xbox™ and PlayStation™), an electronic dictionary, a portable camera, and an electronic photo frame, etc.
[0043] In embodiments of this disclosure, the electronic device may be one or a combination of the devices described above, may be flexible, and may include novel electronic devices to be developed in the future.
[0044] In this disclosure, the term "user" may refer to a person using an electronic device or a device using an electronic device (e.g., an artificial intelligence electronic device).
[0045] In the technical solutions disclosed herein, user authorization or consent is obtained before acquiring or collecting user personal information. The collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with relevant laws and regulations, necessary confidentiality measures are taken, and they do not violate public order and good morals.
[0046] It should be noted that the verification methods, model training methods, devices, equipment, media, and program products provided in the embodiments of this disclosure can be used in the financial field for user verification, and can also be used in any field other than the financial field, such as the field of information security. The application fields of the verification methods, model training methods, devices, equipment, media, and program products provided in the embodiments of this disclosure are not limited.
[0047] Figure 1 The illustration shows an application scenario of the verification method and model training method according to embodiments of the present disclosure.
[0048] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101 and 102, server 103, and network 104. Network 104 is used as a medium to provide a communication link between terminal devices 101 and 102 and server 103. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0049] Users (such as user A 105 and user B 106) can use terminal devices 101 and 102 to interact with server 103 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101 and 102, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0050] Terminal devices 101 and 102 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and other portable devices.
[0051] Server 103 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101 and 102 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0052] It should be noted that the verification method provided in this embodiment can generally be executed by terminal devices 101 and 102. Accordingly, the verification device provided in this embodiment can generally be located in terminal devices 101 and 102. The model training method provided in this embodiment can generally be executed by server 103. Accordingly, the model training device provided in this embodiment can generally be located in server 103.
[0053] It should be understood that Figure 1The number of terminal devices, networks, users, and servers shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, networks, users, and servers.
[0054] The following will be based on Figure 1 The described scene, through Figures 2-9 The verification and training methods of the embodiments of this disclosure will be described in detail.
[0055] Figure 2 A flowchart illustrating a verification method according to an embodiment of the present disclosure is shown schematically.
[0056] like Figure 2 As shown, the verification method of this embodiment is used in an electronic device, which includes N types of sensors, and may specifically include operations S210 to S240.
[0057] In operation S210, in response to the operation of the first user, the information to be verified is determined, wherein the information to be verified includes information of M characters, where N and M are integers greater than or equal to 1.
[0058] The M characters can be characters with a preset number of strokes. The characters disclosed herein can include letters, numbers, graphic symbols, Chinese characters, or other symbols. For example, letters can include A to Z, numbers can include 0 to 9, and graphic symbols can include polygons or circles, etc. The preset number of strokes can be flexibly set according to the classification effect during model training and validation. For example, the information of the M characters can include images or speech representing the M characters.
[0059] The first user can be a user of the electronic device. The operation can be using the electronic device itself; for example, if the electronic device is locked, the first user performs verification during the unlocking process. In this case, the information to be verified can be M characters pre-set by the first user. Alternatively, the operation can be using any application on the electronic device, or a function within that application. For example, if the electronic device is a smartphone, and the user is using mobile banking to make a payment, verification can be performed before payment. In this case, the information to be verified can be pre-set by the user or randomly determined from a character set for verification.
[0060] In operation S220, during a first time period when the first user moves the electronic device based on information of M characters, first verification data from N types of sensors is collected, wherein the collection of the first verification data is authorized by the first user.
[0061] Taking smartphones as an example, the N types of sensors can include at least one of gravity sensors, acceleration sensors, magnetic sensors, and gyroscopes, and can also include orientation sensors, linear acceleration sensors, rotation vector sensors, etc.
[0062] The first time period refers to the time from the start to the end of data collection by the first user. This period can be determined by issuing a power on / off command to the first user, or by the first user controlling the switch. For example, the first user presses the power button to start the data collection process, and then presses the power button again to stop the process after completing the data collection.
[0063] The first user can hold a smartphone and move it in the air to create an aerial gesture trajectory. After obtaining user authorization, data is collected at several points during the smartphone's movement within a first time period. At each point, the following data can be collected: acceleration values along the x, y, and z axes from an accelerometer; ambient magnetic field data along the x, y, and z axes from a magnetometer; angular acceleration values along the x, y, and z axes from a gyroscope; gravity data from a gravity sensor; and angle data along the x, y, and z axes (e.g., azimuth, the angle between the x-axis and the horizontal plane, and the angle between the y-axis and the horizontal plane) from an orientation sensor. The first verification data may include the aforementioned acceleration values, ambient magnetic field data, angular acceleration values, gravity data, or angle data.
[0064] In operation S230, the pre-trained validation model is used to classify the first validation data and output the classification results.
[0065] In operation S240, the verification is successful if the classification result characterizes the trajectory of the first user's mobile electronic device and matches M characters.
[0066] A successful verification can be achieved for example, if the M characters are "1, 2, 3, 4", the pre-trained verification model classifies the first verification data. If the classification result is also "1, 2, 3, 4", then it indicates a match, and the verification is successful.
[0067] According to embodiments of this disclosure, M characters of information can be used as verification information to classify the first verification data generated by N types of sensors during the movement of the first user's electronic device. If the trajectory of the first user's electronic device matches the M characters of information, the verification is successful. Thus, using sensor data generated by the movement of the electronic device as the basis for verification—a dimension different from image or sound recognition—and further classifying the first verification data, a secure verification effect is achieved.
[0068] It should be noted that when each character has multiple strokes, or when multiple characters are involved, it is more difficult to obtain a single gesture trajectory from the first user compared to obtaining only one gesture trajectory. Furthermore, the verification method of this disclosure embodiment cannot be derived solely from a single gesture trajectory. For example, this disclosure embodiment can consider the relationships between strokes and between adjacent characters. Additionally, factors such as data volume and data noise will also increase significantly. This will be discussed in further detail below.
[0069] In some embodiments, classifying the first verification data may involve processing the data matrix returned by N sensors and classifying it according to the data change characteristics between different times in the data matrix.
[0070] In other embodiments, classifying the first verification data can convert the data matrix returned by N sensors into an image, and then classify it using image recognition methods. See below. Figure 3 Let me introduce it.
[0071] Figure 3 The flowchart illustrating the classification of the first verification data in operation S230 according to an embodiment of the present disclosure is shown in the illustration.
[0072] like Figure 3 As shown, operation S230 uses a pre-trained validation model to classify the first validation data and outputs the classification result, which may include operations S310 to S330.
[0073] In operation S310, a trajectory image of the first user's mobile electronic device is drawn based on the first verification data.
[0074] For example, at the start of the first time period, the initial position of the electronic device is determined. Then, based on the acceleration values, ambient magnetic field data, angular acceleration values, gravity data, or angle data at each moment, the displacement and relative position of the electronic device relative to the initial position are calculated. Finally, a trajectory image of the electronic device can be plotted.
[0075] When operating the S320, text recognition is performed on the trajectory image to output M predicted characters.
[0076] In operation S330, M predicted characters are output as classification results.
[0077] According to embodiments of this disclosure, by converting numerical values into images, rich image information can be obtained, and numerical classification can be transformed into image classification, thereby improving classification accuracy.
[0078] According to embodiments of this disclosure, the pre-trained validation model may include a first validation model and a second validation model. In operation S230, either the first validation model or the second validation model can be selected for classification. The process of obtaining the first and second validation models, and the circumstances under which the corresponding validation model is selected, are described in detail below.
[0079] Figure 4 A flowchart illustrating a model training method according to an embodiment of the present disclosure is shown schematically.
[0080] like Figure 4As shown, the model training method of this embodiment includes training a second verification model in a server, which may specifically include operations S410 to S440.
[0081] In operation S410, S training samples are obtained. Each of the S training samples includes second verification data collected by the second user from N types of sensors based on the image of any character when moving the electronic device, and the character label corresponding to the second verification data. The electronic device includes the N types of sensors, and S is an integer greater than or equal to 1.
[0082] For example, there may be one or more second users, and the second verification data may be sensor data of the same category as the first verification data.
[0083] For example, during the data acquisition phase, for each number from 0 to 9, a large amount of data from second users is collected. Each second user holds their phone and traces the path of the corresponding number in the air. Since the readings from the gravity sensor, accelerometer, magnetometer, gyroscope, etc., change during the phone's movement, data from these sensors is collected for each number. Each type of data is treated as a dimension, and these data are concatenated to generate an N-dimensional sensor sequence matrix. The median matching problem is solved by padding with zeros. Through extensive data collection, a large amount of feature data about the numbers 0 to 9 can be gathered, with each feature vector corresponding to a number label. The collection of training samples for letters, Chinese characters, or graphic symbols is the same as described above and will not be repeated here.
[0084] In operation S420, the S training samples are input into the lightweight network so that the lightweight network outputs a prediction result based on the second validation data in each training sample.
[0085] For example, lightweight networks refer to neural networks that further reduce the number of model parameters and complexity while maintaining model accuracy. Examples include networks such as MobileNet-v1, MobileNet-v2, MobileNet-v3, ShuffleNet-v1, or ShuffleNet-v2.
[0086] For example, the Mobilenet-v3 network is used in the model training phase. A large amount of feature data from 0 to 9 generated in the data acquisition phase is used as samples for training to obtain a classification model. The input of the model is the one-dimensional features of the original sensor data after preprocessing. The output of the model is the label and probability of each category, such as the probability of classifying it as the number 9 is 95.53%, the probability of classifying it as the number 8 is 3.62%, etc. (for example only).
[0087] In operation S430, the parameters in the lightweight network are updated based on the degree of difference between the prediction results and the corresponding character labels to obtain a second validation model.
[0088] For example, any loss function such as cross-entropy loss, exponential loss, or hinge loss can be used to calculate the degree of difference between the predicted result and the corresponding character label. The parameters in the lightweight network are updated iteratively until the loss function converges, thus obtaining the second validation model.
[0089] In operation S440, the second verification model is sent to the electronic device so that the electronic device can use the second verification model to verify the first user.
[0090] For example, during the model deployment phase, the trained model is deployed on a mobile device using a machine learning framework on an electronic device, while the second validation model is pruned and quantized to reduce the model size while minimizing accuracy loss.
[0091] The electronic device uses a second verification model to verify the first user, for example, by launching on a mobile phone and replacing the graphic or voice verification code with an air gesture verification code. In the verification code scenario, the user is prompted to use their mobile phone to draw the corresponding verification code character trajectory in the air, such as "1234". Sensor data is collected during the user's drawing of the numbers, and after preprocessing, it is transmitted to the local model deployed on the client side for real-time prediction. The prediction result is returned, and the user is prompted by voice whether it is correct, thereby enhancing the security of the verification code process.
[0092] According to embodiments of this disclosure, due to the characteristics of lightweight networks, the second verification model trained on a lightweight network is easy to deploy in electronic devices. The second verification model can be run on electronic devices to improve verification speed, reduce the pressure on the server to verify each user, and, having been trained on a server using a large number of training samples, the second verification model can improve its accuracy in verifying more complex characters.
[0093] Figure 5 A flowchart illustrating the process of obtaining second verification data according to an embodiment of the present disclosure is shown.
[0094] like Figure 5 As shown, obtaining the second verification data in this embodiment includes obtaining the second verification data of N sensors corresponding to each training sample in operation S410, which may include operations S510 to S530.
[0095] During operation S510, data from each of the N sensors is obtained during a second time period when the second user moves the electronic device based on an image of any character.
[0096] The electronic devices used to collect training samples can be the same model or category as the electronic devices actually used by the first user, in order to improve the consistency of the verification data.
[0097] For example, the second time period includes time T1 to time T10. Taking an accelerometer as an example, at time T1, the collected data is [x1, y1, z1]. At time T2, the collected data is [x1, y1, z1, x2, y2, z2]. And so on, the data from the 10 times within the second time period are stitched together to obtain one-dimensional data.
[0098] When operating the S520, an N-dimensional matrix is obtained based on data from each of the N types of sensors.
[0099] An N-dimensional matrix can be considered as having N rows of data. Each row of data corresponds to a type of sensor.
[0100] In the S530 operation, a dimensionality reduction operation is performed on the N-dimensional matrix to obtain the second verification data.
[0101] For example, any dimensionality reduction technique such as PCA, Kpca, Tsne, or Lda can be used to reduce the dimensionality of an N-dimensional matrix. For instance, data from four types of sensors—gravity sensor, accelerometer, magnetometer, and gyroscope—can be collected, with each type of data representing a dimension. These data are then concatenated to generate a four-dimensional sensor sequence matrix. The median matching problem is solved by padding with zeros. Finally, PCA dimensionality reduction is applied to obtain a one-dimensional feature vector.
[0102] According to embodiments of this disclosure, dimensionality reduction can minimize information loss while compressing data, thereby reducing the amount of training samples and improving training efficiency.
[0103] Figure 6 A flowchart illustrating the process of obtaining third verification data according to an embodiment of the present disclosure is shown.
[0104] like Figure 6 As shown, obtaining verification data in this embodiment may include operations S610 to S620, which can be performed before operation S230. The N types of sensors in the electronic device include a first sensor.
[0105] In operating S610, M data windows are set up for each of the M characters.
[0106] The length of a data window refers to the length of the data. Specifically, for example, for each sensor, data from 10 moments within the first time period are stitched together to obtain one-dimensional data. The length of this one-dimensional data is the data length.
[0107] In operation S620, based on inflection point data and M data windows, the first verification data is segmented to obtain the third verification data corresponding to each character. The inflection point data includes the data of the first sensor at the i-th moment in the first time period, where i is an integer greater than or equal to 1.
[0108] According to embodiments of this disclosure, the term "first verification data" can refer to the total data of M characters obtained by the first user during actual use. The term "third verification data" can refer to the data of the m-th character in the first verification data. The term "second verification data" can refer to the data of any single character corresponding to each training sample. In other embodiments, during training, the second user may be instructed to continuously swipe multiple characters and perform operations S610 to S620 for segmentation.
[0109] According to embodiments of this disclosure, inflection point data can refer to a set of abnormal data corresponding to a certain moment, determined by comparing data with adjacent moments. For example, a user holds a smartphone and swipes horizontally in the air to count "1, 2, 3, 4". At the end of any number, there will be a noticeable pause. At this time, if the value returned by the accelerometer changes significantly, either positively or negatively, or decreases to near 0, a clear inflection point can be seen graphically. When swiping to the beginning of the next number, there will also be a noticeable pause, and an inflection point data is returned at the moment of the pause (i.e., the i-th moment). Therefore, the trajectory between the two inflection point data can be determined as an invalid trajectory.
[0110] According to embodiments of this disclosure, when a user continuously swipes multiple characters, a large amount of data is generated, in which invalid and valid data are mixed together, making it difficult to distinguish the data corresponding to a specific character. Therefore, inflection point data and data windows can be used to obtain the third verification data for each character before classification, thereby improving the classification effect.
[0111] It should be noted that the first verification data in this embodiment has not undergone dimensionality reduction. During the verification of the first user, dimensionality reduction can be performed on the third verification data to improve classification efficiency.
[0112] Figure 7 The flowchart illustrating the segmentation of the first verification data in operation S620 according to an embodiment of the present disclosure is shown in the illustration.
[0113] like Figure 7 As shown, in operation S620, the verification data is segmented based on the inflection point data and M data windows to obtain the verification data corresponding to each character, which may include operations S710 to S730.
[0114] In operation S710, the length of the m-th data window is determined based on the sample data of the m-th character among the M characters, wherein the sample data of the m-th character includes data from the first sensor collected by at least one second user during the movement of the electronic device according to the information of the m-th character.
[0115] For example, taking the m-th character as the digit "1", 100 (for example only) second users hold smartphones and swipe "1" in the air. These 100 users can include children, youths, middle-aged people, and the elderly, resulting in 100 sample data points. The longest length among these 100 sample data points is determined as the length of the m-th data window. Its purpose is to provide high redundancy, increasing the probability of including complete data within this length.
[0116] In operation S720, the starting position of the m-th data window is determined, where the starting position includes the position at any time within the first time period.
[0117] In some embodiments of this disclosure, when the m-th character is the first character, the starting position is the position of the starting time of the first time period.
[0118] In some other embodiments of this disclosure, when the m-th character is not the first character, the end position of the (m-1)-th character and the first inflection point data after the end position of the (m-1)-th character are determined. The position of the first inflection point data is taken as the starting position.
[0119] For example, at the moment when the first user finishes swiping the (m-1)th character, an inflection point is generated, and the position of this moment is the end position of the (m-1)th character. The moment when the first inflection point appears after this can be considered the moment when swiping the mth character begins.
[0120] In operation S730, given the data from the first sensor and a preset number of inflection point data points within the window length, the end position is determined based on the start position and the length.
[0121] For example, the preset number can be determined based on the number of strokes of a specific character. Taking the number "7" as an example, after the first user draws a horizontal stroke, there may be a pause, resulting in an inflection point. Therefore, during the first user's drawing of the "7", there may be three inflection points: at the beginning, middle, and end. The position corresponding to the first inflection point is the starting position, and the preset number within its corresponding window length is 3. The position corresponding to the third inflection point is taken as the ending position.
[0122] According to embodiments of this disclosure, when the number of inflection point data within the data window is not equal to a preset number, the ending position can be dynamically adjusted. Taking the digit "7" as the first sorted character as an example, firstly, the data window length is set to the maximum data length among the sample data of "7". Then, starting from the data corresponding to the initial time, if the data length collected by the first sensor when the current user swipes the digit "7" is less than the data window length, then the window contains not only the three inflection point data of the digit "7" but also other inflection point data beyond those three. At this time, the right boundary of the data window is set as the position of the third inflection point. Finally, classification prediction is performed using the data within the window. If the correct "7" is predicted, the process continues; otherwise, it returns to a halt, and classification stops. After a correct prediction, the left boundary of the data window is set as the next inflection point data position, and the window length is set to the maximum length corresponding to the next character, and classification prediction is performed sequentially.
[0123] In operation S740, the first verification data is divided according to the start and end positions to obtain the third verification data of the m-th character.
[0124] According to embodiments of this disclosure, considering how to handle boundary issues between adjacent characters, in practical use, such as in a verification code scenario where four numbers are displayed at once, the user operates their phone to draw the four numbers sequentially in the air. However, this process includes not only the features of the four numbers but also invalid trajectory data during the connection between the numbers. By using a digital window and combining it with the characteristics of sensor "inflection points," invalid trajectory data can be skipped, improving the accuracy of air gesture recognition.
[0125] Figure 8 A flowchart illustrating the process of obtaining a first verification model according to an embodiment of the present disclosure is shown.
[0126] like Figure 8 As shown, before obtaining the first verification model, a second verification model can be used for verification, and historical data can be obtained. Specifically, this can include operations S810 to S820. After obtaining a preset amount of historical data, operation S830 can be executed to obtain the first verification model.
[0127] When operating S810, the first verification data of N types of sensors is classified using the second verification model, and the classification results are output. The second verification model includes a pre-trained model received by the electronic device from the server, which is a general verification model.
[0128] The universal verification model means that, regardless of the differences between individual first users, as long as the trajectory of the mobile electronic device matches the information of M characters, the verification is successful.
[0129] When operating the S820, if the verification is successful, the first verification data of the N types of sensors collected this time will be used as historical data.
[0130] For example, when the first user C initially uses the smartphone, due to a lack of valid data, the server sends and deploys a second verification model on the smartphone. Upon successful verification and with the consent of the first user C, data can be collected as historical data. This historical data serves as positive samples, while in cases of failed verification, the server can collect the first verification data as negative samples.
[0131] In operation of S830, a model is trained based on the second verification model and historical verification information through transfer learning to obtain the first verification model.
[0132] For example, transfer learning is a machine learning method that uses a second validation model as an initial point and reuses it during the training of the first validation model. Historical validation information may include a certain amount of historical data.
[0133] Optionally, the first validation model can be trained multiple times in a progressive manner. For example, after collecting 100 historical data points, a transfer learning model can be trained based on the second validation model and the 100 historical data points. After the first validation model is trained, it can be put into use. After collecting another 1000 historical data points, a transfer learning model can be trained based on the previously trained first validation model and the 1000 historical data points. After training, it can be put into use. It should be noted that the above examples of 100 and 1000 historical data points are only examples and can be set according to the actual situation.
[0134] According to embodiments of this disclosure, different people will exhibit unique trajectory characteristics during the process of forming air gestures on a mobile electronic device. For example, the stroke order of each stroke in a character, the stroke time of each stroke, and the connection trajectory between strokes can further improve the security verification effect for the user of the electronic device. Even if the electronic device is obtained by another user, it can be accurately identified through the first verification model, preventing property loss. Furthermore, a second verification model can be trained using transfer learning methods to improve training efficiency and effectiveness.
[0135] According to embodiments of this disclosure, a first verification model is obtained by training a transfer learning model in an electronic device. The purpose of training in an electronic device is twofold: firstly, since historical data is part of user data, its leakage is prevented within the electronic device, thus protecting user privacy; secondly, since the first verification model uses historical data as training samples, leakage is prevented, thus avoiding hacking.
[0136] Figure 9A flowchart illustrating a verification method according to another embodiment of the present disclosure is shown schematically.
[0137] like Figure 9 As shown, the verification method of this embodiment may include operation S210, operation S230 and operation S240, and may also include operation S910.
[0138] In operation S210, in response to the operation of the first user, the information to be verified is determined, wherein the information to be verified includes information of M characters, where N and M are integers greater than or equal to 1.
[0139] In operation S220, during a first time period when the first user moves the electronic device based on information of M characters, first verification data from N types of sensors is collected, wherein the collection of verification data is authorized by the first user.
[0140] When operating the S910, the first verification model is used to classify the verification data of N types of sensors and output the classification results.
[0141] In operation S240, the verification is successful if the classification result characterizes the trajectory of the first user's mobile electronic device and matches M characters.
[0142] According to embodiments of this disclosure, during the classification prediction process using the first verification model, it is possible not only to verify whether the first user has drawn the correct M characters, but also to further verify whether it is the user's own operation, thereby improving the reliability and security of the verification process.
[0143] Based on the above verification and model training methods, this disclosure also provides a verification device and a model training device. The following will be combined with... Figure 10 and Figure 11 Provide a detailed description.
[0144] Figure 10 A schematic block diagram of a verification apparatus according to an embodiment of the present disclosure is shown.
[0145] like Figure 10 As shown, the verification device 1000 of this embodiment includes an information determination module 1010, a data acquisition module 1020, a data classification module 1030, and a user verification module 1040. The verification device 1000 can be used in electronic devices including N types of sensors.
[0146] The information determination module 1010 can perform operation S210 to determine the information to be verified in response to the operation of the first user. The information to be verified includes M characters of information, where N and M are integers greater than or equal to 1.
[0147] The data acquisition module 1020 can perform operation S220 to collect first verification data from N types of sensors during a first time period when the first user moves the electronic device based on information of M characters, wherein the collection of verification data is authorized by the first user.
[0148] The data classification module 1030 can perform operation S230, which is used to classify the first validation data using a pre-trained validation model and output the classification result. The data classification module 1030 can also perform operations S310 to S330, which will not be described in detail here.
[0149] User verification module 1040 can perform operation S240 to verify that the trajectory of the first user's mobile electronic device, as represented by the classification result, matches M characters.
[0150] The verification device 1000 may also include a segmentation module for performing operations S610 to S620 and operations S710 to S740, which will not be described in detail here.
[0151] The verification device 1000 may also include a training module for performing operations S410 to S440, S510 to S530, and S810 to S830, which will not be described in detail here.
[0152] According to embodiments of this disclosure, the verification device 1000 can perform air gesture verification, reducing the risk of image and voice verification codes being compromised by image recognition and voice recognition technologies, thus improving security. Furthermore, it can be combined with other biometric methods to enhance user security and reduce risk. Moreover, being driven by user operation data ensures the legitimacy of the verification process.
[0153] Figure 11 A schematic block diagram of a model training apparatus according to an embodiment of the present disclosure is shown.
[0154] like Figure 11 As shown, the model training device 1100 for the server in this embodiment includes a training sample module 1110, a prediction result module 1120, a parameter update module 1130, and a model deployment module 1140.
[0155] The training sample module 1110 can perform operation S410 to obtain S training samples, wherein each of the S training samples includes second verification data collected by the second user moving the electronic device according to the image of any character, and the character label corresponding to the second verification data, and the electronic device includes N types of sensors.
[0156] The prediction result module 1120 can perform operation S420 to input S training samples into the lightweight network so that the lightweight network outputs a prediction result based on the second validation data in each training sample.
[0157] The parameter update module 1130 can perform operation S430 to update the parameters in the lightweight network based on the degree of difference between the prediction result and the corresponding character label, so as to obtain a second validation model.
[0158] The model deployment module 1140 can perform operation S440 to send the second verification model to the electronic device so that the electronic device can use the second verification model to verify the first user.
[0159] It should be noted that the implementation methods, technical problems solved, functions achieved, and technical effects of each module / unit / subunit in the device embodiments are the same as or similar to the implementation methods, technical problems solved, functions achieved, and technical effects of the corresponding steps in the method embodiments, and will not be repeated here.
[0160] According to embodiments of this disclosure, any plurality of modules in the verification device 1000 or the model training device 1100 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least some of the functionality of one or more of these modules may be combined with at least some of the functionality of other modules and implemented in one module.
[0161] According to embodiments of this disclosure, at least one module of the verification device 1000 or the model training device 1100 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable method of integrating or packaging circuitry, or implemented in any one of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one module of the verification device 1000 or the model training device 1100 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0162] Figure 12 A block diagram schematically illustrates an electronic device suitable for implementing a verification method and a model training method according to embodiments of the present disclosure.
[0163] like Figure 12As shown, an electronic device 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage portion 1208 into a random access memory (RAM) 1203. The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0164] RAM 1203 stores various programs and data required for the operation of electronic device 1200. Processor 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Processor 1201 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1202 and / or RAM 1203. It should be noted that programs may also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0165] According to embodiments of this disclosure, the electronic device 1200 may further include an input / output (I / O) interface 1205, which is also connected to a bus 1204. The electronic device 1200 may also include one or more of the following components connected to the I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1210 as needed so that computer programs read from it can be installed into the storage section 1208 as needed.
[0166] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0167] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 1202 and / or RAM 1203 and / or one or more memories other than ROM 1202 and RAM 1203 described above.
[0168] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.
[0169] When the computer program is executed by the processor 1201, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0170] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1209, and / or installed from the removable medium 1211. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0171] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0172] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0173] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A verification method for an electronic device, the electronic device comprising N types of sensors, the method comprising: In response to the operation of the first user, the information to be verified is determined, wherein the information to be verified includes M characters of information, where N and M are integers greater than or equal to 1; During a first time period when the first user moves the electronic device based on the information of the M characters, first verification data from the N types of sensors is collected, wherein the collection of the verification data is authorized by the first user; the N types of sensors include the first sensor; The first verification data is classified using a pre-trained verification model, and the classification result is output. Before classifying the first verification data using the pre-trained verification model, the method further includes: setting M corresponding data windows for each of the M characters; segmenting the first verification data based on the inflection point data and the M data windows to obtain the third verification data corresponding to each character, wherein the inflection point data includes the data of the first sensor at the i-th moment in the first time period, where i is an integer greater than or equal to 1. The verification is successful if the classification result indicates that the trajectory of the first user moving the electronic device matches the M characters.
2. The method according to claim 1, wherein, The verification model includes a first verification model, and the process of classifying the first verification data using the pre-trained verification model and outputting the classification result includes: The first verification model is used to classify the first verification data of the N types of sensors, and the classification results are output. The first verification model is trained based on the historical verification information of the first user, which includes historical data from the N sensors collected when the first user moves the electronic device.
3. The method according to claim 2, wherein, The verification model further includes a second verification model. Before obtaining the first verification model, the step of classifying the first verification data using the pre-trained verification model and outputting the classification result includes: The first verification data of the N types of sensors is classified using the second verification model, and the classification result is output. The second verification model includes a pre-trained model received by the electronic device from the server, and the second verification model is a general verification model. The method further includes: If the verification is successful, the first verification data collected from the N types of sensors will be used as the historical data.
4. The method according to claim 3, wherein, The first verification model, trained based on the first user's historical verification information, includes: The first verification model is obtained by training a model based on the second verification model and the historical verification information through transfer learning.
5. The method according to claim 4, wherein, include: The transfer learning model is trained in the electronic device to obtain the first verification model.
6. The method according to claim 3, wherein, It also includes training the second verification model in the server, specifically including: S training samples are obtained, wherein each of the S training samples includes the second verification data of the N sensors collected by the second user moving the electronic device according to the image of any character, and the character label corresponding to the second verification data, and S is an integer greater than or equal to 1. The S training samples are input into a lightweight network so that the lightweight network outputs a prediction result based on the second validation data in each training sample. The parameters in the lightweight network are updated based on the degree of difference between the prediction results and the corresponding character labels to obtain the second verification model.
7. The method according to claim 6, wherein, Obtaining S training samples includes obtaining second verification data from N sensors corresponding to each training sample, specifically including: During the second time period when the second user moves the electronic device based on the image of any one character, data from each of the N sensors is obtained; Based on the data from each of the N types of sensors, an N-dimensional matrix is obtained; The second verification data is obtained by performing a dimensionality reduction operation on the N-dimensional matrix.
8. The method according to claim 1, wherein, Segmenting the first verification data includes: The length of the m-th data window is determined based on the sample data of the m-th character among the M characters, wherein the sample data of the m-th character includes data from the first sensor collected by at least one second user during the process of moving the electronic device according to the information of the m-th character; Determine the starting position of the m-th data window, wherein the starting position includes the position at any time within the first time period; For the data from the first sensor, if there are a preset number of inflection point data within the length, the end position is determined based on the start position and the length; The first verification data is segmented based on the start position and the end position to obtain the third verification data for the m-th character.
9. The method according to claim 8, wherein, Determining the starting position of the m-th data window includes: When the m-th character is the first character, the starting position is the position of the starting time of the first time period; If the m-th character is not the first character, determine the end position of the (m-1)-th character and the first inflection point data after the end position of the (m-1)-th character; take the position of the first inflection point data as the starting position.
10. The method according to claim 1, wherein, The process of classifying the first verification data using a pre-trained verification model and outputting the classification result includes: Based on the first verification data, draw a trajectory image of the first user moving the electronic device; The trajectory image is subjected to text recognition to output M predicted characters; The M predicted characters are output as the classification result.
11. A model training method, based on the verification method according to claim 1, for use on a server, comprising: S training samples are obtained, wherein each of the S training samples includes second verification data collected by the second user from N types of sensors based on the image of any character moving the electronic device, and the character label corresponding to the second verification data. The electronic device includes the N types of sensors, and S is an integer greater than or equal to 1. The S training samples are input into a lightweight network so that the lightweight network outputs a prediction result based on the second validation data in each training sample. The parameters in the lightweight network are updated based on the degree of difference between the prediction results and the corresponding character labels to obtain a second validation model. The second verification model is sent to the electronic device so that the electronic device can use the second verification model to verify the first user.
12. The method according to claim 11, wherein, After the second verification model is sent to the electronic device, the electronic device is configured to: The first verification model is obtained by training a transfer learning model based on the second verification model and historical verification information, and then the first verification model is used for verification. The historical verification information includes historical data from the N types of sensors collected when the first user moves the electronic device.
13. A verification device for an electronic device, the electronic device comprising N types of sensors, the device comprising: The information determination module is used to determine the information to be verified in response to the operation of the first user, wherein the information to be verified includes information of M characters, and N and M are integers greater than or equal to 1; The data acquisition module is used to acquire first verification data from the N types of sensors during a first time period when the first user moves the electronic device based on the information of the M characters, wherein the acquisition of the verification data is authorized by the first user; the N types of sensors include the first sensor; The data classification module is used to classify the first verification data using a pre-trained verification model and output the classification result. Before classifying the first verification data using the pre-trained verification model, the module includes: setting M corresponding data windows for each of the M characters; and segmenting the first verification data based on inflection point data and the M data windows to obtain third verification data corresponding to each character. The inflection point data includes data from the first sensor at the i-th moment within the first time period, where i is an integer greater than or equal to 1. The user verification module is used to verify the data if the classification result indicates that the trajectory of the first user moving the electronic device matches the M characters.
14. A model training apparatus for a server, implementing the model training method according to claim 11, comprising: The training sample module is used to obtain S training samples, wherein each of the S training samples includes second verification data collected by the second user from N types of sensors based on the image of any character moving the electronic device, and the character label corresponding to the second verification data, and the electronic device includes the N types of sensors; The prediction result module is used to input the S training samples into the lightweight network so that the lightweight network outputs a prediction result based on the second validation data in each training sample. The parameter update module is used to update the parameters in the lightweight network according to the degree of difference between the prediction result and the corresponding character label, so as to obtain the second verification model; The model deployment module is used to send the second verification model to the electronic device so that the electronic device can use the second verification model to verify the first user.
15. An electronic device comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 12.
16. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 12.
17. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Security verification method and apparatus of mobile device
CN106778201A
Air writing track recognition method and device, storage medium and electronic equipment
CN113052078A