Representation model training method and device, human-machine identification method and device

By training the characterization model, using terminal device sensors to collect and perform slight modification calculations, the problem of human-computer recognition in accessible scenarios is solved, effectively identifying the attacker's modified data, and improving the recognition accuracy.

CN116881651BActive Publication Date: 2025-08-19ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310757321.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2025-08-19
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively perform human-machine recognition in accessible scenarios, especially for blind or one-handed users, who cannot use traditional drag patterns or click specific characters to perform human-machine recognition.

Method used

By training and characterizing the model, the terminal device's sensors collect user behavior data, and perform slight changes calculations, adjust the model parameters until the loss function converges, to simulate the behavioral characteristics of the attacker in the accessible scenario, and learn that the slightly modified data characteristics should be the same or similar.

Benefits of technology

It realizes more effective human-machine identification in accessible scenarios, and can identify data generated by attackers through slight changes, improving identification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116881651B_ABST
    Figure CN116881651B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a training method and device for a representation model used for human-machine recognition in barrier-free scenarios, and a human-machine recognition method and device. The training method includes: receiving data generated by the user's behavior and collected by the sensor on the terminal device side; performing at least two modification calculations on the data received from the same sensor; wherein the magnitude of the modification calculation for each modification is less than a preset magnitude threshold; using the representation model to be trained to obtain each representation of the data after at least two modification calculations; calculating the loss based on each representation of the data after at least two modification calculations; using the loss to adjust the parameters of the representation model to be trained until the loss function converges; wherein, when the distance between each position of each representation of the data after at least two modification calculations in the feature space of the representation model is less than a first preset distance threshold, the loss function converges. The embodiments of this specification can more effectively perform human-machine recognition in barrier-free scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to electronic information technology, and in particular, to training methods and devices for representation models used for human-machine recognition, and methods and devices for human-machine recognition in barrier-free scenarios. Background Art

[0002] Human-machine authentication technology is used to distinguish between computers and humans. Specifically, it distinguishes whether an operation is generated by a machine or a human, thereby protecting the system from machine attacks. Human-machine authentication technology has been widely used in various business systems.

[0003] Current human-machine recognition technology is usually applied in scenes with obstacles, that is, it requires the use of certain tools such as graphics or text for human-machine recognition. For example, a missing graphic is displayed, and the user is required to drag the missing piece of the graphic to the missing position within a certain time. Another example is that the user is required to click specific characters in sequence within a certain time. The above methods are all human-machine recognition in scenes with obstacles. However, in many cases, human-machine recognition is also required in scenes without obstacles. For example, for blind people, it is impossible to use the above-mentioned methods such as dragging patterns or clicking specific characters for human-machine recognition; for users who can only hold a mobile phone with one hand, one hand needs to hold the phone, and the other hand is occupied, so it is impossible to use the above-mentioned methods such as dragging patterns or clicking specific characters for human-machine recognition.

[0004] Therefore, there is an urgent need for a human-machine recognition method in barrier-free scenarios. Summary of the Invention

[0005] One or more embodiments of this specification describe a training method and device for a representation model for human-machine identification in barrier-free scenarios, and a method and device for human-machine identification in barrier-free scenarios, which can more effectively perform human-machine identification in barrier-free scenarios.

[0006] According to a first aspect, a method for training a representation model for human-machine recognition is provided, wherein the method comprises:

[0007] When a user performs an action on a terminal device, the data generated by the user's action and collected by the sensor on the terminal device is received;

[0008] For the same sensor data received, perform at least two modification calculations; wherein the modification magnitude of each modification calculation is less than a preset magnitude threshold;

[0009] Using the representation model to be trained, respectively obtain representations of the data after at least two changes and calculations;

[0010] Calculating a loss value loss of a loss function of a representation model to be trained based on each representation of the data after the at least two modifications;

[0011] The loss value loss of the loss function is used to adjust the parameters of the representation model to be trained until the loss function converges; wherein, for the data of the same sensor, the loss function converges when the distance between the positions of the representations of the data after at least two changes and calculations in the feature space of the representation model is less than a first preset distance threshold.

[0012] The method further comprises:

[0013] For data from different pen sensors, the loss function converges when the distances between the positions of the representations of the data after at least two modified calculations in the feature space of the representation model are greater than a second preset distance threshold.

[0014] The distance between each position of each representation of the data after at least two changes are calculated in the feature space of the representation model is less than a first preset distance threshold, including: each representation of the data after at least two changes are calculated is located at the same position in the feature space of the representation model.

[0015] The modification calculation includes at least one of the following: randomly intercepting a section of data; randomly repeating a section of data; and randomly modifying a section of data.

[0016] The behavior includes: user behavior in accessibility scenarios.

[0017] According to a second aspect, a human-machine identification method is provided, wherein the method comprises:

[0018] The terminal device prompts that human-machine verification is required;

[0019] Receive each piece of data collected and sent by the sensor;

[0020] Inputting the data of each sensor into a pre-trained representation model to obtain a representation of the data of each sensor output by the representation model; wherein the representation model is trained using any of the representation model training methods in the embodiments of this specification;

[0021] Calculate whether the distance between the representations of each data of each sensor is less than a third preset distance threshold. If so, determine that the data collected by the sensor in this human-machine identification is generated by the machine; otherwise, determine that the data collected by the sensor in this human-machine identification is generated by human behavior.

[0022] According to a third aspect, a training device for a representation model used in human-machine recognition is provided, the device comprising:

[0023] A sensor data receiving module configured to receive data generated by a user's behavior collected by a sensor on the terminal device when the user performs an action on the terminal device;

[0024] The change calculation module is configured to perform at least two change calculations on the same sensor data received; wherein the change amplitude of each change calculation is less than a preset amplitude threshold;

[0025] a representation acquisition module configured to obtain representations of the data after at least two changes and calculations using the representation model to be trained;

[0026] A parameter adjustment module is configured to calculate the loss value loss of the loss function of the representation model to be trained based on the respective representations of the data after the at least two modifications are calculated; and use the loss value loss of the loss function to adjust the parameters of the representation model to be trained until the loss function converges; wherein, for the data of the same sensor, when the distance between the respective positions of the respective representations of the data after the at least two modifications are calculated in the feature space of the representation model is less than a first preset distance threshold, the loss function converges.

[0027] According to a fourth aspect, a human-machine identification device is provided, wherein the device comprises:

[0028] A prompt module configured to prompt a terminal device to perform human-machine verification processing;

[0029] A data receiving module is configured to receive each piece of data collected and sent by the sensor;

[0030] a representation output module configured to input the data of each sensor into a pre-trained representation model to obtain a representation of each sensor data output by the representation model; wherein the representation model is trained using the representation model training device described in the embodiments of this specification;

[0031] The judgment module is configured to calculate whether the distance between the representations of each data of each sensor is less than a third preset distance threshold. If so, it is determined that the data collected by the sensor in this human-machine recognition is generated by the machine; otherwise, it is determined that the data collected by the sensor in this human-machine recognition is generated by human behavior.

[0032] According to a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in any embodiment of this specification.

[0033] According to a sixth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in any embodiment of this specification is implemented.

[0034] The training method and apparatus for the representation model, and the human-machine identification method and apparatus in barrier-free scenarios provided in the embodiments of this specification, when training the representation model, also train the representation model based on the same user behavior data (i.e., the same sensor data transmitted at the same time), perform at least two slight modification calculations on the same sensor data, and simulate the attacker's approach in barrier-free scenarios through at least two slight modification calculations. At the same time, in order for the representation model to learn the characteristics of the attacker's approach, the convergence condition of the loss function of the representation model is: for the same sensor data, when the distance between the respective positions of the representations of the data after at least two modification calculations in the feature space of the representation model is less than a first preset distance threshold, the loss function converges. In other words, for the representation model, its optimization effect is equivalent to bringing the respective representations of the data of the same sensor obtained after the modification calculation closer in the feature space of the representation model, such as dragging them to the same position, so that the representation model learns the following knowledge: the respective representations of the data obtained after the slight modification calculation based on the same data should be the same or similar. In this way, during human-machine identification, even if an attacker generates attack data by making slight modifications to data that has previously passed system verification, the trained representation model is capable of identifying such modifications and mapping the various data modified by the attacker to the same or similar positions in the feature space. In other words, the same or similar features are obtained for the various data modified by the attacker. This allows subsequent human-machine identification decisions to be made, and if the features of the various sensor data are the same or similar, it indicates that the data collected by the sensor is likely generated by machine operation rather than human behavior, thus making human-machine identification more effective. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 1 It is a schematic diagram of a system architecture applied in one embodiment of this specification.

[0037] Figure 2This is a flowchart of a method for training a representation model for human-machine recognition in an accessible scenario in one embodiment of this specification.

[0038] Figure 3 This is a schematic diagram of the training effect of a representation model applied to human-machine recognition in an accessibility scenario in one embodiment of this specification.

[0039] Figure 4 This is a flowchart of a human-machine identification method in an accessible scenario in one embodiment of this specification.

[0040] Figure 5 This is a structural diagram of a training device for a representation model used for human-machine recognition in an accessible scenario in one embodiment of this specification.

[0041] Figure 6 This is a structural diagram of a human-machine identification device in an accessible scenario in an embodiment of this specification. DETAILED DESCRIPTION

[0042] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0043] First, it should be noted that the terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. As used in the embodiments of the present invention and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise.

[0044] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0045] In order to facilitate the understanding of the method provided in this manual, the system architecture involved and applicable to this manual is first described. Figure 1 As shown in , the system architecture mainly includes three types of network nodes: terminal devices, sensors, and servers.

[0046] Among them, terminal devices may include but are not limited to: smart mobile terminals, smart home devices, network devices, wearable devices, smart medical devices, PCs (personal computers), etc. Among them, smart mobile devices may include mobile phones, tablets, laptops, PDAs (personal digital assistants), Internet cars, etc. Smart home devices may include smart home appliances, such as smart TVs, smart air conditioners, smart water heaters, smart refrigerators, smart air purifiers, etc. Smart home devices may also include smart door locks, smart sockets, smart lights, smart cameras, etc. Network devices may include switches, wireless APs, servers, etc. Wearable devices may include smart watches, smart glasses, smart bracelets, virtual reality devices, augmented reality devices, mixed reality devices (i.e., devices that can support virtual reality and augmented reality), etc. Smart medical devices may include smart thermometers, smart blood pressure meters, smart blood glucose meters, etc.

[0047] As for the location of the sensor, the sensor may be integrated into the terminal device, that is, a part of the terminal device, or may be independent of the terminal device but arranged on the terminal device side.

[0048] The server can be a single server or a server group consisting of multiple servers. It is responsible for training the representation model and using the representation model to achieve human-machine recognition.

[0049] It should be understood that Figure 1 The number of terminal devices, sensors, and servers in the example is only for reference. Any number can be selected and deployed according to implementation needs.

[0050] In the embodiments of this specification, a representation model is first trained, and the trained representation model is more suitable for extracting data representations in the human-machine recognition method in barrier-free scenarios. Afterwards, this data representation can be used to perform human-machine recognition in barrier-free scenarios.

[0051] Figure 2 This is a flowchart of a method for training a representation model for human-machine recognition in an accessible scene in one embodiment of this specification. The execution subject of this method is a training device for a representation model for human-machine recognition in an accessible scene. The device can be located in Figure 1 It is understood that the method can also be performed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 2 , the method comprising:

[0052] Step 201: When a user performs an action on a terminal device, data generated by the user's action and collected by a sensor on the terminal device is received.

[0053] Step 203: Perform at least two modification calculations on the same piece of received sensor data; wherein the modification amplitude of each modification calculation is smaller than a preset amplitude threshold.

[0054] Step 205: Using the representation model to be trained, respectively obtain representations of the data after at least two changes and calculations.

[0055] Step 207: For the same sensor data, calculate the loss value of the loss function of the representation model to be trained based on the representations of the data after the at least two changes and calculations.

[0056] Step 209: Use the loss value loss of the loss function to adjust the parameters of the representation model to be trained until the loss function converges; wherein, for the data of the same sensor, the loss function converges when the distance between the positions of the representations of the data after at least two changes in calculation in the feature space of the representation model is less than a first preset distance threshold.

[0057] When performing human-machine identification in an accessible scenario, it is not possible to use third-party tools such as graphics or text displayed on the terminal device for identification. Therefore, in the embodiments of this specification, it is analyzed that in an accessible scenario, human-machine judgment can be performed by asking the user to perform specified actions, such as shaking the phone or nodding, and collecting sensor data during the user's actions. If an attacker needs to imitate the user's behavior in an accessible scenario to implement an attack, it is necessary to imitate the user's continuous behavior, such as imitating the user's continuous behavior of shaking the phone, or imitating the user's continuous behavior of nodding. In order to imitate the user's continuous behavior, the attacker will imitate the user's continuous behavior by making various slight changes to the historical behavior data instead of repeatedly entering it. The existing retrieval mechanism cannot identify this type of attack, resulting in the failure of human-machine identification.

[0058] Analysis found that when attackers make slight changes to historical behavior data, they usually do so based on the same data (that is, data that has been verified by the system in the past). Figure 2In the process shown, when training the representation model, the representation model is also trained based on the same user behavior data (i.e., the same sensor data transmitted at the same time). The same sensor data is slightly modified at least twice. The attacker's approach in human-machine identification in an accessible scenario is simulated by at least two slight modification calculations. At the same time, in order for the representation model to learn the characteristics of the attacker's approach, the convergence condition of the loss function of the representation model is: for the same sensor data, when the distance between the respective positions of the representations of the data after at least two modification calculations in the feature space of the representation model is less than a first preset distance threshold, the loss function converges. In other words, for the representation model, its optimization effect is equivalent to bringing the respective representations of the same sensor data obtained after the modification calculation closer in the feature space of the representation model, such as dragging them to the same position, so that the representation model learns the following knowledge: the respective representations of the data obtained after slight modification calculations based on the same data should be the same or similar. In this way, during human-machine identification, even if an attacker generates attack data by making slight modifications to data that has previously passed system verification, the trained representation model is capable of identifying such modifications and mapping the various data modified by the attacker to the same or similar positions in the feature space. In other words, the same or similar features are obtained for the various data modified by the attacker. This allows subsequent human-machine identification decisions to be made, and if the features of the various sensor data are the same or similar, it indicates that the data collected by the sensor is likely generated by machine operation rather than human behavior, thus making human-machine identification more effective.

[0059] The following combination Figure 3 ,right Figure 2 The training method of the representation model shown is described in detail.

[0060] First, regarding step 201: when a user performs an action on the terminal device side, data generated by the user's action and collected by the sensor on the terminal device side is received.

[0061] During the training phase, real user behavior data is needed to train the representation model.

[0062] In the embodiments of this specification, the user's actions on the terminal device side are user actions in an accessible scenario, that is, actions that can be performed without the use of third-party tools such as graphics or text displayed on the terminal device, such as shaking the phone or nodding. The sensors on the terminal device side collect data generated by such actions.

[0063] The sensor will transmit the data generated by the user's behavior to the server on the network side. The data collected by the sensor is transmitted to the server in multiple transactions / multiple times.

[0064] Next, in step 203 , at least two modification calculations are performed on the same piece of received sensor data; wherein the modification amplitude of each modification calculation is smaller than a preset amplitude threshold.

[0065] As mentioned above, performing at least two slightly modified calculations on the same sensor data is intended to simulate the attacker's approach in human-machine identification in accessible scenarios so that the representation model can learn this feature.

[0066] In the embodiment of the present specification, the modification calculation includes at least one of the following: randomly intercepting a section of data from the same sensor data; randomly repeating a section of data; and randomly modifying a section of data.

[0067] For example, in human-machine recognition, the user is required to shake the phone left and right for human-machine recognition. The sensor in the phone can then collect motion data from the user shaking the phone left and right, for example, recorded as sensor data A. In this step 203, for example, three modification calculations are performed on sensor data A received during the same transmission process: the server can copy a small segment of sensor data A and add the copied data to sensor data A to obtain modified sensor data A1; at the same time, the server can modify a small segment of sensor data A to obtain modified sensor data A2; at the same time, the server can intercept a small segment of sensor data A and delete the intercepted data from sensor data A to obtain modified sensor data A3.

[0068] Because the user's actions are continuous, such as shaking the phone left and right, the data collected by the sensor should be continuous. Therefore, in this step 203, the change amplitude calculated for each change is smaller than the preset amplitude threshold.

[0069] Next, in step 205 , the representation model to be trained is used to obtain representations of the data after at least two changes are calculated.

[0070] For example, the sensor data A1, sensor data A2, and sensor data A3 obtained in step 203 are input into the representation model to be trained, and the representation model obtains the representation obtained for sensor data A1 (denoted as s1), the representation obtained for sensor data A2 (denoted as s2), and the representation obtained for sensor data A3 (denoted as s3).

[0071] Next, in step 207 , for the same piece of sensor data, the loss value loss of the loss function of the representation model to be trained is calculated based on the representations of the data after at least two changes and calculations.

[0072] The input to the loss function of the representation model to be trained is the data representations calculated for at least two modifications of the same sensor data, namely s1, s2, and s3. The loss function calculates the loss value based on s1, s2, and s3, and then uses this loss value to optimize the parameters of the representation model to be trained. This process is repeated until the loss function of the representation model to be trained converges, for example, the loss falls below a preset threshold.

[0073] Step 209: Use the loss value loss of the loss function to adjust the parameters of the representation model to be trained until the loss function converges; wherein, for the data of the same sensor, the loss function converges when the distance between the positions of the representations of the data after at least two changes in calculation in the feature space of the representation model is less than a first preset distance threshold.

[0074] According to the convergence condition of the above-mentioned loss function, it can be obtained that the effect of training the representation model is equivalent to: for each representation of the data of the same sensor, the representations are brought closer in the feature space of the representation model to be trained, so that the distance between the positions of the representations in the feature space of the representation model to be trained is less than the first preset distance threshold, such as being located at the same position, or at a similar position.

[0075] In order to make the representation model learn the attacker's practice of making slight changes to the same data, the training effect of the representation model is to bring the representations of each data obtained after the modification calculation closer in the feature space, such as dragging them to the same position, so that the representation model learns the following knowledge: the representations of each data obtained after making slight changes to the same data should be the same or similar. Figure 3 For example, it is equivalent to pulling s1, s2, and s3 to the same position, or to very close positions in the feature space representing the model.

[0076] Furthermore, based on the convergence condition of the aforementioned loss function, the loss function converges when, for data from different pen sensors, the distance between the respective positions of the representations of the data after at least two modifications is greater than a second preset distance threshold in the feature space of the representation model. In other words, the training effect of the representation model is equivalent to: for the representations of data from different pen sensors, the representations of the data from different pen sensors are pushed further away in the feature space of the representation model to be trained, so that the distance between the positions of the representations of the data from different pen sensors in the feature space of the representation model to be trained is greater than the second preset distance threshold.

[0077] In other words, the training effect of the representation model is equivalent to: bringing the representation of data from the same sensor closer in the feature space, and pushing the representation of data from different sensors further away in the feature space, so that the representation model can more specifically learn the representation capabilities that should be possessed in the human-machine recognition process in barrier-free scenarios.

[0078] At this point, a representation model suitable for human-computer recognition in barrier-free scenarios has been trained.

[0079] The representation model trained by the method of any embodiment of this specification can realize human-machine recognition in barrier-free scenarios. Figure 4 , the human-machine recognition method in this barrier-free scenario includes:

[0080] Step 401: The terminal device prompts that human-machine verification processing is required.

[0081] In the embodiments of this specification, when logging into a business system, human-machine authentication is required. For example, when logging into a mailbox or accessing a database, a prompt will be provided on the terminal device indicating that human-machine authentication is required.

[0082] Step 403: Receive each piece of data collected and sent by the sensor.

[0083] The sensors on the terminal device side will continuously collect data and transmit the collected data to the server in multiple batches.

[0084] If the person currently logging into the business system is a real person, that is, a user, then the user will perform specified actions according to the prompts, such as shaking the phone, and the phone will collect sensor data generated by the user in the process of shaking the phone.

[0085] If the machine currently logging into the business system is an attacking machine, that is, the machine is trying to log into the business system through continuous attempts, then the machine will try to generate a series of data, such as that generated by the user shaking the phone, by making various slight changes to a piece of data that has been authenticated in the past.

[0086] Step 405: Input the data of each sensor into a pre-trained representation model to obtain a representation of each sensor data output by the representation model; wherein the representation model is trained using the representation model training method of any embodiment of this specification.

[0087] In step 405, if a real person is performing human-machine authentication, the data from each sensor is not generated based on the same data modification, but rather on the actions of the real person. Therefore, the representations of the data from each sensor will be far apart. If, on the other hand, a machine is launching an attack to attempt human-machine authentication, the data from each sensor is generated based on the same data modification. Therefore, the representation model trained using the methods of the embodiments of this specification will map the representations of the data from each sensor to similar or identical locations. In other words, the distance between the representations of the data from each sensor will be less than the third predetermined distance threshold.

[0088] Step 407 : Calculate whether the distance between the representations of the data of each pen sensor is less than a third preset distance threshold. If yes, execute step 409 ; otherwise, execute step 411 .

[0089] For example, in a human-machine authentication process, there are a total of 10 sensor data, and the distances between the representations of at least most of them, such as 7 consecutive sensor data, are respectively less than the third preset distance threshold, then step 409 can be executed, and if the distances between the representations of at least most of them, such as 6 consecutive sensor data, are respectively greater than the third preset distance threshold, then step 411 can be executed.

[0090] Step 409: It is determined that an attack has occurred, that is, the data collected by the sensor in this human-machine recognition is generated by the machine, and the current process ends.

[0091] Step 411: Determine that no attack has occurred, that is, the data collected by the sensor in this human-machine identification is generated by human behavior.

[0092] In one embodiment of this specification, a training device for a representation model used in human-machine recognition in an accessible scenario is provided. Figure 5 , the device comprises:

[0093] The sensor data receiving module 501 is configured to receive data generated by the user's behavior collected by the sensor on the terminal device when the user performs an action on the terminal device side;

[0094] The change calculation module 502 is configured to perform at least two change calculations on the same piece of received sensor data; wherein the change magnitude of each change calculation is less than a preset magnitude threshold;

[0095] A representation acquisition module 503 is configured to obtain representations of the data after at least two changes and calculations using the representation model to be trained;

[0096] The parameter adjustment module 504 is configured to calculate the loss value loss of the loss function of the representation model to be trained based on the respective representations of the data after the at least two modifications are calculated; and use the loss value loss of the loss function to adjust the parameters of the representation model to be trained until the loss function converges; wherein, for the data of the same sensor, when the distance between the respective positions of the respective representations of the data after the at least two modifications are calculated in the feature space of the representation model is less than a first preset distance threshold, the loss function converges.

[0097] In one embodiment of the device of the present specification, for data from different pen sensors, the loss function converges when the distance between the positions of the representations of the data after at least two modified calculations in the feature space of the representation model is greater than a second preset distance threshold.

[0098] In one embodiment of the device of the present specification, the distance between each position of each representation of the data after at least two changes are calculated in the feature space of the representation model is less than a first preset distance threshold, including: each representation of the data after at least two changes are calculated is located at the same position in the feature space of the representation model.

[0099] In one embodiment of the device of this specification, when performing the change calculation, the change calculation module 502 specifically performs at least one of the following: randomly intercepting a piece of data; randomly repeating a piece of data; and randomly modifying a piece of data.

[0100] In one embodiment of the device of this specification, the behavior includes: user behavior in an accessibility scenario.

[0101] In one embodiment of the device of this specification, a human-machine identification device in an accessible scenario is proposed, see Figure 6 , the device comprises:

[0102] Prompt module 601, configured to prompt the terminal device to perform human-machine verification processing;

[0103] The data receiving module 602 is configured to receive each piece of data collected and sent by the sensor;

[0104] The representation output module 603 is configured to input the data of each sensor into a pre-trained representation model to obtain a representation of each sensor data output by the representation model; wherein the representation model is trained using the representation model training device described in the embodiments of this specification;

[0105] The judgment module 604 is configured to calculate whether the distance between the representations of each data of each sensor is less than a third preset distance threshold. If so, it is determined that the data collected by the sensor in this human-machine recognition is generated by the machine; otherwise, it is determined that the data collected by the sensor in this human-machine recognition is generated by human behavior.

[0106] It should be noted that the aforementioned devices are typically implemented on a server. They can be installed on separate servers, or some or all of them can be installed on the same server. The server can be a single server or a server cluster consisting of multiple servers. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in a cloud computing service system. The aforementioned devices can also be implemented on a computer terminal with strong computing capabilities.

[0107] One embodiment of the present specification provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the method in any one of the embodiments of the present specification.

[0108] An embodiment of the present specification provides a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method of any embodiment of the present specification is implemented.

[0109] It should be understood that the structures illustrated in the embodiments of this specification do not constitute specific limitations on the devices of the embodiments of this specification. In other embodiments of the specification, the above-mentioned devices may include more or fewer components than shown in the figure, or combine or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0110] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0111] Those skilled in the art will appreciate that, in one or more of the above examples, the functions described in the present invention may be implemented using hardware, software, widgets, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0112] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A training method for representation models used in human-machine recognition, where: The method includes: When a user performs an action on a terminal device, the data generated by the user's action and collected by the sensor on the terminal device is received; Perform at least two modification calculations on the same sensor data received, and input the data obtained from the at least two modification calculations using the same sensor data into the representation model to be trained; wherein the magnitude of the modification calculated in each modification is less than a preset magnitude threshold; Using the representation model to be trained, respectively obtain representations of the data after at least two changes and calculations; Calculating a loss value of a loss function of a representation model to be trained based on the representations of the at least two modified data obtained from the same sensor data; The parameters of the representation model to be trained are adjusted using the loss value loss of the loss function until the loss function converges; wherein, when the distance between the positions of the representations of the data calculated after at least two modifications obtained using the same sensor data in the feature space of the representation model is less than a first preset distance threshold, the loss function converges, so that the trained representation model can map the various modified data obtained by the attacker for the same data to the same or similar positions in the feature space.

2. The method according to claim 1, wherein The method further comprises: For data from different pen sensors, the loss function converges when the distances between the positions of the representations of the data after at least two modified calculations in the feature space of the representation model are greater than a second preset distance threshold.

3. The method according to claim 1, wherein The distance between each position of each representation of the data after at least two changes are calculated in the feature space of the representation model is less than a first preset distance threshold, including: each representation of the data after at least two changes are calculated is located at the same position in the feature space of the representation model.

4. The method according to claim 1, wherein The modification calculation includes at least one of the following: randomly intercepting a section of data; randomly repeating a section of data; and randomly modifying a section of data.

5. The method according to claim 1, wherein The behavior includes: user behavior in accessibility scenarios.

6. Human-machine identification method, wherein: The method includes: The terminal device prompts that human-machine verification is required; Receive each piece of data collected and sent by the sensor; Inputting the data of each sensor into a pre-trained representation model to obtain a representation of the data of each sensor output by the representation model; wherein the representation model is trained using the method of any one of claims 1 to 5; Calculate whether the distance between the representations of each data of each sensor is less than a third preset distance threshold. If so, determine that the data collected by the sensor in this human-machine identification is generated by the machine; otherwise, determine that the data collected by the sensor in this human-machine identification is generated by human behavior.

7. A training device for a representation model used in human-machine recognition, the device comprising: A sensor data receiving module configured to receive data generated by a user's behavior collected by a sensor on the terminal device when the user performs an action on the terminal device; The change calculation module is configured to perform at least two change calculations on the same sensor data received; wherein the change amplitude of each change calculation is less than a preset amplitude threshold; a representation acquisition module configured to obtain representations of at least two modified data using the representation model to be trained; wherein the at least two modified data obtained using the same sensor data are input into the representation model to be trained; A parameter adjustment module is configured to calculate the loss value loss of the loss function of the representation model to be trained based on the respective representations of the data calculated after at least two modifications obtained from the same sensor data; and adjust the parameters of the representation model to be trained using the loss value loss of the loss function until the loss function converges; wherein, when the distance between the respective positions in the feature space of the representation model of the data calculated after at least two modifications obtained from the same sensor data is less than a first preset distance threshold, the loss function converges, so that the trained representation model can map the various modified data obtained by the attacker for the same data to the same or similar positions in the feature space.

8. A human-machine identification device, wherein: The device includes: A prompt module configured to prompt a terminal device to perform human-machine verification processing; A data receiving module is configured to receive each piece of data collected and sent by the sensor; a representation output module configured to input the data of each sensor into a pre-trained representation model to obtain a representation of the data of each sensor output by the representation model; wherein the representation model is trained using the training device for a representation model for human-machine recognition according to claim 7; The judgment module is configured to calculate whether the distance between the representations of each data of each sensor is less than a third preset distance threshold. If so, it is determined that the data collected by the sensor in this human-machine recognition is generated by the machine; otherwise, it is determined that the data collected by the sensor in this human-machine recognition is generated by human behavior.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.

10. A computing device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Expression recognition model training method, device and equipment

    CN111611852A