Method and device for identifying injection attack behavior

By using the sensor data and acquisition method data of mobile terminals in the eKYC system to identify injection attack behaviors during image acquisition, the problem of injection attacks that are difficult to identify artificial intelligence to generate fake images and videos is solved, and higher security and accuracy are achieved.

CN119814370APending Publication Date: 2025-04-11ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411780425.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the eKYC system, it is difficult for the prior art to effectively identify and defend against injection attacks caused by image and video forgery generated by artificial intelligence, especially when the defense measures of the images and video themselves are insufficient.

Method used

By acquiring the sensor data and acquisition method data of the mobile terminal during image acquisition, the degree of matching between the mobile terminal's motion during image acquisition and the user's acquisition behavior is identified, and whether the image acquisition process involves injection attack behavior.

Benefits of technology

It realizes accurate identification of injection attack behavior, improves the security of the eKYC system, and protects users' privacy information and property security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814370A_ABST
    Figure CN119814370A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an injection attack behavior identification method and device, and the method comprises the steps: obtaining first data corresponding to an image collection process of a mobile terminal aiming at a first object, the first data comprises sensor data and collection mode data, the sensor data corresponds to a sensor in the mobile terminal, and the collection mode data comprises the sensor data and the collection mode data; the sensor is used for sensing the movement of the mobile terminal, and the acquisition mode data is used for indicating a user to adopt a specific acquisition mode in an image acquisition process; and based on the first data, determining whether the image acquisition process relates to an injection attack behavior so as to realize identification of the injection attack behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for identifying injection attack behavior. Background Art

[0002] The eKYC (electronic Know Your Customer) system is a digital identity authentication solution based on artificial intelligence technology. Institutions in the fields of financial services, banking, insurance, telecommunications and e-commerce often use the eKYC system to authenticate their users.

[0003] In order to ensure the security of customer information and / or property of each institution, it is necessary to defend against image and / or video (image sequence) injection attacks in the eKYC system. At present, in the process of defending against image and / or video injection attacks, the defense is generally based on the image and / or video itself. However, with the continuous development of AIGC (Artificial Intelligence Generated Content) technology, the images and videos (i.e., image sequences) generated by AIGC technology are becoming more and more realistic. In the eKYC system, it is difficult to defend only from the image and / or video itself in the process of defending against image and / or video injection attacks. In order to ensure the security of customer information and / or property of each institution, it is crucial to provide a new method for identifying injection attack behaviors for defense. Summary of the invention

[0004] One or more embodiments of the present specification provide a method and device for identifying injection attack behaviors, so as to realize the identification of injection attack behaviors.

[0005] According to a first aspect, a method for identifying injection attack behavior is provided, comprising:

[0006] Acquire first data corresponding to an image acquisition process of a mobile terminal for a first object, wherein the first data includes sensor data and acquisition mode data, the sensor data corresponds to a sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition mode data is used to instruct a user to adopt a specific acquisition mode during the image acquisition process;

[0007] Based on the first data, it is determined whether the image acquisition process involves injection attack behavior.

[0008] According to a second aspect, a device for identifying injection attack behavior is provided, comprising:

[0009] an acquisition module, configured to acquire first data corresponding to an image acquisition process of a mobile terminal for a first object, wherein the first data includes sensor data and acquisition mode data, the sensor data corresponds to a sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition mode data is used to instruct a user to adopt a specific acquisition mode during the image acquisition process;

[0010] A determination module is configured to determine whether the image acquisition process involves injection attack behavior based on the first data.

[0011] According to a third 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 the first aspect.

[0012] According to a fourth 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 the first aspect is implemented.

[0013] According to the injection attack behavior identification method and device provided by the embodiment of this specification, first data corresponding to the image acquisition process of the mobile terminal for the first object is obtained, wherein the first data includes sensor data and acquisition mode data, the sensor data corresponds to the sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition mode data is used to instruct the user to adopt a specific acquisition mode during the image acquisition process; based on the first data, it is determined whether the image acquisition process involves injection attack behavior. In the above process, a new injection attack behavior identification method is provided, taking into account the obvious difference between the movement of the mobile terminal in the image acquisition process involving injection attack behavior and the real image acquisition process (i.e., the image acquisition process not involving injection attack behavior). Specifically, in the real image acquisition process, the mobile terminal generally moves following the user acquisition behavior in the acquisition process (i.e., the user controls the acquisition behavior of the mobile terminal according to the image acquisition instruction). Correspondingly, in the real image acquisition process, the movement of the mobile terminal is consistent with the user acquisition behavior; while in the image acquisition process involving injection attack behavior, the mobile terminal is generally flat and / or motionless, and accordingly, the consistency between the movement of the mobile terminal and the user acquisition behavior is insufficient. In view of the above situation, in this embodiment, by identifying the matching relationship between the first data corresponding to the image acquisition process, namely the sensor data and the acquisition method data, it is identified whether the image acquisition process involves injection attack behavior, thereby realizing the identification of injection attack behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 A schematic diagram of an implementation framework of an embodiment disclosed in this specification;

[0016] Figure 2 A flow chart of a method for identifying injection attack behavior provided by an embodiment;

[0017] Figure 3 A schematic diagram of the structure of a mobile terminal provided in an embodiment;

[0018] Figure 4 A schematic diagram of the identification process of injection attack behavior provided by the embodiment;

[0019] Figure 5 A schematic block diagram of a device for identifying injection attack behavior provided in an embodiment. DETAILED DESCRIPTION

[0020] The technical solutions of the embodiments of this specification will be described in detail below with reference to the accompanying drawings.

[0021] The embodiments of this specification disclose a method and device for identifying injection attack behaviors. The application scenarios and technical concepts of the method are first introduced as follows:

[0022] As mentioned above, with the continuous development of AIGC (Artificial Intelligence Generated Content) technology, the images and videos (i.e., image sequences) generated by AIGC technology are becoming more and more realistic. In the eKYC system, it is difficult to defend against image and / or video injection attacks only from the image and / or video itself. In order to ensure the security of customer information and / or property of each institution, it is crucial to provide a new method for identifying injection attack behaviors for defense.

[0023] In view of this, the inventor proposes a method for identifying injection attack behavior. Figure 1A schematic diagram of an implementation scenario according to an embodiment disclosed in this specification is shown. In this implementation scenario, when a user has a need to perform identity authentication, a mobile terminal can be used to collect images so as to use the collected images (sequences) for identity authentication. In the embodiment of this specification, in order to ensure the privacy information and / or property security of the user, before using the image (sequence) for identity authentication, it is necessary to identify the authenticity of the image (sequence), that is, to identify whether the image acquisition process involves injection attack behavior, so as to avoid the use of forged images (sequences) by the black industry, and through identity authentication, the privacy information and / or property of the corresponding user (the user corresponding to the forged image of the black industry) is lost.

[0024] Specifically, when the user triggers the identity authentication function (for example, triggering the image acquisition button), the injection attack behavior identification process provided in the embodiment of this specification is triggered. Specifically, the first data corresponding to the image acquisition process of the mobile terminal for the first object is obtained, wherein the first data includes sensor data and acquisition method data, the sensor data corresponds to the sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition method data is used to instruct the user to adopt a specific acquisition method during the image acquisition process; based on the first data, it is determined whether the image acquisition process involves injection attack behavior.

[0025] In the above process, a new method for identifying injection attack behavior is provided. Considering that there is an obvious difference in the movement of the mobile terminal between the image acquisition process involving injection attack behavior and the real image acquisition process (i.e., the image acquisition process not involving injection attack behavior), for example, in the real image acquisition process, the mobile terminal generally moves following the user's acquisition behavior in the acquisition process (i.e., the user controls the mobile terminal according to the image acquisition instruction). Accordingly, in the real image acquisition process, the movement of the mobile terminal is consistent with the user's acquisition behavior; while in the image acquisition process involving injection attack behavior, the mobile terminal is generally placed flat and / or motionless, and accordingly, the consistency between the movement of the mobile terminal and the user's acquisition behavior is insufficient. In view of the above situation, in this embodiment, by identifying the matching relationship between the first data corresponding to the image acquisition process, i.e., the sensor data, and the acquisition method data used to indicate that the user adopts a specific acquisition method, it is identified whether the image acquisition process involves injection attack behavior, thereby realizing the identification of injection attack behavior.

[0026] Moreover, in actual scenarios, the sensor data in the image acquisition process is often difficult to forge. Furthermore, the acquisition method data is used to instruct the user to adopt a specific acquisition method during the image acquisition process. It is generated by the mobile terminal (subsequent target program) and cannot be forged. It is relatively more difficult to forge sensor data that matches the acquisition method data that instructs the user to adopt a specific acquisition method during the image acquisition process. In view of this, the above process can better realize the accurate detection of whether the image acquisition process involves injection attack behavior, better improve the security of the identity authentication system, and thus improve the user's privacy information / or property security.

[0027] The following is a detailed description of the injection attack behavior identification method and device provided in this specification in conjunction with specific embodiments.

[0028] Figure 2 A flow chart of a method for identifying injection attack behavior in one embodiment of the present specification is shown. The method is executed by an electronic device, and the electronic device can be implemented by any device, equipment, platform, device cluster, etc. with computing and processing capabilities. In some examples, the electronic device can be a mobile terminal for capturing images of a first object, or a server that can communicate with a mobile terminal for capturing images of a first object. Exemplarily, the mobile terminal can be, but is not limited to, terminal devices such as mobile phones and tablet computers.

[0029] In the process of identifying injection attack behaviors, Figure 2 As shown, the method includes the following steps S210-S220:

[0030] In step S210, first data corresponding to the image acquisition process of the mobile terminal for the first object is obtained, wherein the first data includes sensor data and acquisition method data, the sensor data corresponds to a sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition method data is used to instruct the user to adopt a specific acquisition method during the image acquisition process.

[0031] It is understandable that in the current online identity authentication system (such as the eKYC system), the user's identity is generally verified by identifying the card and / or the face. In some examples of this specification, the first object may be, but is not limited to, a card and / or a face. The card may include, but is not limited to, a bank card, various types of identity documents, etc. The various types of identity documents may include, but are not limited to, an identity card, a driver's license, and a passport.

[0032] The following takes the example of an electronic device being a mobile terminal that performs image acquisition for a first object to introduce the method for identifying injection attack behavior provided in this embodiment. In the case where the electronic device is a server that can communicate with a mobile terminal that performs image acquisition for a first object, its implementation process is similar to the implementation process when the electronic device is a mobile terminal. The implementation process can refer to the implementation process when the electronic device is a mobile terminal, and will not be repeated here. Among them, when the electronic device is a server, the mobile terminal is required to send the acquired first data to the server through the network, so that the server can perform the action of using the first data to determine whether the image acquisition device involves injection attack behavior.

[0033] In the case where the electronic device is a mobile terminal for collecting images of the first object, the mobile terminal is installed with a target program, such as Figure 3 As shown, the target program runs on the processor of the mobile terminal to execute the identification process of injection attack behavior. Figure 3 As shown, the mobile terminal is also provided with an image acquisition device (such as a camera, etc.) for acquiring images when called by the target program. The mobile terminal is also provided with a sensor for sensing the movement of the mobile terminal.

[0034] Exemplarily, the motion sensor for sensing the mobile terminal may include multiple types of sensors, which may include but are not limited to: an acceleration sensor, a gyroscope, and a magnetometer, etc. The acceleration sensor may include a linear acceleration sensor and / or an angular acceleration sensor.

[0035] In some possible examples, the process of identifying injection attack behavior may include two stages, namely, an image acquisition stage (ie, a first data acquisition stage) and a specific identification stage.

[0036] It can be understood that the image acquisition phase is the image acquisition process of the mobile terminal for the first object. The image acquisition phase, that is, the image acquisition process of the mobile terminal for the first object, is first introduced below.

[0037] In some exemplary scenarios, after the target program installed in the mobile terminal is triggered, the image acquisition device of the mobile terminal can be triggered to start the image acquisition device, and then the image acquisition device is used to acquire images. During the image acquisition process, the target program can provide prompt information to the user to instruct the user to use a specific acquisition method to acquire images of the first object. Accordingly, in the real image acquisition process (i.e., the image acquisition process that does not involve injection attack behavior), the user will control the mobile terminal to move based on the prompt information of the target program, so that the image acquisition device of the mobile terminal can acquire images that meet the specific acquisition method for the first object. In the real image acquisition process, the movement of the mobile terminal is controlled by the user based on the prompt information of the target program (i.e., the indicated specific acquisition method). That is to say, in the real image acquisition process, the user controls the movement of the mobile terminal based on the prompt information of the target program (the user's behavior is the user's acquisition behavior) to use the mobile terminal to acquire images for the first object.

[0038] During the actual image acquisition process, the target program may obtain an image sequence for the first object that is actually acquired by the image acquisition device.

[0039] In the process of image acquisition involving injection attack behavior, after the target program installed on the mobile terminal is triggered, the image acquisition device of the mobile terminal is triggered to start the image acquisition device. In the process of image acquisition involving injection attack behavior, the mobile terminal is often stationary in a certain place, that is, it will not be moved by the user based on the prompt information of the target program (that is, the specific acquisition method indicated) to perform image acquisition. At this time, the black industry (for example, a program installed on the mobile terminal) will replace the image sequence actually collected by the image acquisition device with its forged image sequence, thereby transmitting the forged image sequence to the target program to achieve the injection attack. At this time, the target program obtains the image sequence forged by the black industry.

[0040] In the above-mentioned image acquisition process, the sensor in the mobile terminal can sense the movement of the mobile terminal in the process, and then measure and obtain corresponding data (hereinafter referred to as measurement data), which can characterize the movement of the mobile terminal in the process. Subsequently, the target program can obtain the data corresponding to the sensor in the mobile terminal.

[0041] Each time the target program acquires data corresponding to the sensor in the mobile terminal, it can simultaneously record the timestamp corresponding to the data corresponding to the sensor in the mobile terminal acquired each time. The timestamp can be the acquisition timestamp mentioned later. Accordingly, the first data includes sensor data corresponding to multiple acquisition timestamps in the image acquisition process. In some examples, the sensor data may be data for the period between the start and the end of the image acquisition process, or may be data for each timestamp of a preset duration at each interval between the start and the end of the image acquisition process.

[0042] When a mobile terminal has multiple sensors, the frequencies of data measurement between different sensors may be different. After the target program obtains the data corresponding to the multiple sensors, it can use any data alignment method in the relevant technology to align the data corresponding to the multiple sensors.

[0043] Accordingly, in some possible examples, the sensor data in the first data may include measurement data actually measured by multiple types of sensors in the mobile terminal during the image acquisition process of the mobile terminal for the first object. In some other possible examples, the sensor data in the first data may also include the posture data of the mobile terminal determined based on the measurement data actually measured by a sensor of a specified type among multiple types of sensors. The posture data may indicate the position and posture of the mobile terminal. Exemplarily, the posture data may be determined by the target program based on the acquired measurement data; the posture data may also be acquired by the target program from the first program, wherein the first program may determine the corresponding posture data based on the measurement data actually measured by the sensor in the mobile terminal during the image acquisition process of the mobile terminal for the first object, and then provide it to the target program.

[0044] The following introduces the determination of posture data by taking a specified type of sensor including a linear acceleration sensor and a gyroscope as an example. Among them, the linear acceleration sensor can measure the linear acceleration of the mobile terminal on the x, y, and z axes in three-dimensional space, and the gyroscope can measure the rotation speed of the mobile terminal rotating in the x, y, and z axes. By integrating the data measured by the linear acceleration sensor and the gyroscope in the first data, the posture change of the mobile terminal during the image acquisition process relative to the initial state (the position and posture of the mobile terminal when the image acquisition device of the mobile terminal starts to acquire images) can be estimated, so that a series of posture data of the mobile terminal during the image acquisition process can be determined according to the estimated posture change, that is, the posture data corresponding to each acquisition timestamp.

[0045] It can be understood that if the above-mentioned image acquisition process does not involve injection attack behavior, the target program can obtain the measurement data measured by the sensor in the mobile terminal. At this time, the measurement data measured by the sensor in the mobile terminal is consistent with the user's operational behavior of controlling the movement of the mobile terminal based on the prompt information of the target program (also referred to as the user's acquisition behavior), that is, it is consistent with the user's acquisition behavior corresponding to the specific acquisition method adopted by the user during the image acquisition process.

[0046] If the above-mentioned image acquisition process involves injection attack behavior, in one case, the target program can also obtain the measurement data measured by the sensor in the mobile terminal, but at this time, the measurement data measured by the sensor in the mobile terminal may not conform to the user's operation behavior of controlling the movement of the mobile terminal based on the prompt information of the target program, that is, it does not conform to the user's acquisition behavior corresponding to the specific acquisition method adopted by the user in the image acquisition process. For example, in the image acquisition process involving injection attack behavior, the mobile terminal may not be moved (that is, the user does not control the mobile terminal to move according to the prompt information of the target program, that is, the user's specific acquisition behavior), at this time, the data measured by the sensor in the mobile terminal may be 0, etc.

[0047] If the above-mentioned image acquisition process involves injection attack behavior, in another case, after the sensor in the mobile terminal obtains measurement data, in the process of transmitting the measurement data to the target program, the black industry may intercept the measurement data obtained by the sensor in the mobile terminal, and replace the measurement data transmitted by the sensor in the mobile terminal to the target program with the relevant data of the forged sensor, thereby transmitting the relevant data of the forged sensor to the target program. At this time, the target program obtains the relevant data of the sensor forged by the black industry, and uses it as the measurement data obtained by the sensor in the mobile terminal. In the latter implementation, the target program continues to determine the posture data of the mobile terminal based on the obtained relevant data of the sensor forged by the black industry; or, in another implementation, the relevant data of the sensor forged by the black industry includes the measurement data forged for the sensor in the mobile terminal and the corresponding posture data of the mobile terminal, and accordingly, the target program directly obtains the corresponding forged sensor data.

[0048] If the above-mentioned image acquisition process involves injection attack behavior, in another case, the target program cannot obtain the measurement data of the sensor. At this time, the target program can directly determine that the image acquisition process involves injection attack behavior and does not continue to execute subsequent processes.

[0049] The following introduces a collection method for instructing a user to collect an image during the image collection process and a process for obtaining collection method data during the image collection process:

[0050] In some examples, after the target program detects that the image acquisition device is started, it starts the image acquisition process for the first object. During the image acquisition process, the target program may first output a first prompt information to prompt the user to perform a frontal image acquisition for the first object (e.g., Figure 4 As shown), accordingly, in the actual image acquisition process, the user will control the movement of the mobile terminal based on the first prompt information, so that the image acquisition device of the mobile terminal can acquire the front image of the first object. After acquiring the front image of the first object, the target program records the end time of the front acquisition subprocess of the first object (hereinafter referred to as the first end time). Exemplarily, the first end time can be the time when the target program detects that the front image of the first object that meets the preset conditions has been acquired, or it can be the time when the user is detected to trigger the front acquisition end button.

[0051] Subsequently, the target program may generate acquisition mode data based on the start time and the first end time of the image acquisition device, and include it in the first data corresponding to the image acquisition process. Exemplarily, between the start time and the first end time of the image acquisition device (i.e., the front acquisition subprocess of the first object), the acquisition mode data includes data indicating the front acquisition mode. That is, the acquisition timestamps corresponding to the sensor data between the start time and the first end time of the image acquisition device include data indicating the front acquisition mode.

[0052] Among them, exemplarily, the aforementioned frontal acquisition may refer to a acquisition method in which the first object is not tilted, for example, the plane where the first object is located is parallel to the plane where the display screen of the mobile terminal is located. It can also be considered that the plane where the first object is located is parallel to the plane where the image acquisition device of the mobile terminal is located. The parallelism may refer to that the angle between the plane where the first object is located and the plane where the display screen of the mobile terminal is located is less than a preset angle threshold.

[0053] Considering that in the process of injection attack behavior (i.e., the image acquisition process involving injection attack behavior), the black industry may forge sensor data and inject the forged sensor data into the target program to deceive the target program, so that the target program thinks that the forged sensor data is the measurement data measured by the sensor of the mobile terminal during the image acquisition process (and / or the determined posture data of the mobile terminal); and considering that the acquisition method data is generated by the target program, the black industry cannot forge it. In view of this, in order to increase the complexity of the sensor data corresponding to the image acquisition process forged by the black industry, so that it is impossible to forge sensor data that can meet the user's specific acquisition method, so as to better improve the recognition detection rate and accuracy of injection attack behavior, and improve the defense against injection attack behavior, the embodiments of this specification design a more random and complex acquisition method, and / or a random vibration acquisition method.

[0054] In some possible examples, the aforementioned acquisition mode data includes: data indicating a frontal acquisition mode and / or data indicating a non-frontal acquisition mode, and the non-frontal acquisition mode includes: a random multi-tilt angle acquisition mode. Specifically, the random multi-tilt angle acquisition mode may include instructing the user to perform image acquisition with a specified tilt information for the first object (such as Figure 4 The designated tilt information is randomly generated.

[0055] Exemplarily, when the first object is a human face, the specified tilt information may include: information indicating that an image is captured for the left side of the face and / or that an image is captured for the right side of the face.

[0056] In another exemplary embodiment, when the first object is a card, the specified tilt information may include indicating the tilt direction and / or tilt angle of the card, and the tilt mode and / or tilt angle are randomly generated to ensure randomness, thereby better improving the difficulty and complexity of the sensor data corresponding to the image acquisition process of the black industry (i.e., improving the difficulty and complexity of the black industry to forge sensor data that can meet the user's specific acquisition method). Exemplarily, the tilt direction includes, but is not limited to, at least one of the following: tilting upward, tilting downward, tilting to the left, and tilting to the right. In another exemplary embodiment, the tilt angle includes, but is not limited to, at least one of the following: 15 degrees, 30 degrees, 40 degrees, etc.

[0057] Accordingly, in some possible examples, during the image acquisition process for the first object, after the target program detects that the front acquisition subprocess of the first object has ended, the target program may continue to output the second prompt information to prompt the user to perform non-front acquisition for the first object, i.e., to perform image acquisition in a non-front acquisition manner. The second prompt information may include randomly generated information instructing the user to perform non-front acquisition of the first object with a certain tilt information.

[0058] Accordingly, in the actual image acquisition process, the user can control the movement of the mobile terminal based on the second prompt information, so that the image acquisition device of the mobile terminal can acquire a non-frontal image of the first object that meets the second prompt information.

[0059] Subsequently, a non-frontal image of the first object that satisfies the second prompt information is acquired, and the target program records the end time of the non-frontal acquisition subprocess of the first object (hereinafter referred to as the second end time). The second end time may be the time when the target program detects that the non-frontal image of the first object that meets the preset conditions is acquired, or the time when the user triggers the non-frontal acquisition end button. Subsequently, the target program may generate acquisition mode data based on the startup time of the aforementioned image acquisition device, the first end time, the second end time, and the tilt information included in the second prompt information, and include it in the first data corresponding to the image acquisition process.

[0060] Exemplarily, between the first end time and the second end time of the image acquisition device (i.e., the non-frontal acquisition subprocess of the first object), the acquisition mode data includes data indicating the non-frontal acquisition mode, and may also include the aforementioned specified tilt information. That is, each corresponding acquisition timestamp of sensor data between the first end time and the second end time of the image acquisition device has its corresponding acquisition mode data including data indicating the non-frontal acquisition mode and / or specified tilt information.

[0061] Correspondingly, in the above example, the first data includes sensor data and acquisition mode data corresponding to multiple acquisition timestamps in the image acquisition process.

[0062] It is understandable that the non-frontal acquisition method is optional, that is, it can appear randomly, that is, in the image acquisition process for different first objects, the target program can randomly instruct the user whether to adopt the non-frontal acquisition method, so that the image acquisition device acquires the corresponding non-frontal image of the first object. In some other possible examples, considering that the mobile terminal is set with a preset vibrator, when the preset vibrator vibrates, it will have a certain impact on the measurement data obtained by the sensor measurement of the mobile terminal. In order to better improve the difficulty of the black industry to forge the sensor data corresponding to the image acquisition process, and improve the recognition detection rate and accuracy of injection attack behaviors, it can also include: during the image acquisition process, the mobile terminal randomly generates a first instruction, and the first instruction is used to instruct the preset vibrator in the mobile terminal to vibrate; accordingly, the aforementioned first data can also include: data indicating whether the mobile terminal vibrates. It is understandable that during the image acquisition process, the target program of the mobile terminal can randomly generate a first instruction to randomly instruct the preset vibrator in the mobile terminal to vibrate, so that the mobile terminal randomly vibrates (such as Figure 4 As shown), and the first instruction may carry information indicating the vibration duration, wherein the vibration duration may be randomly generated to indicate that a preset vibrator in the mobile terminal may vibrate for an indefinite period of time, so as to better improve the randomness and increase the complexity and difficulty of the sensor data corresponding to the black market counterfeit image acquisition process.

[0063] It can be understood that, in the above-mentioned image acquisition process, the sensor of the mobile terminal senses the movement of the mobile terminal and measures and obtains its measurement data (such as Figure 4 The “Sensor Measurement Data” shown is throughout the entire image acquisition process).

[0064] Correspondingly, in the above example, the first data includes sensor data corresponding to multiple acquisition timestamps in the image acquisition process, acquisition mode data, and data indicating whether the mobile terminal is vibrating.

[0065] After the first data corresponding to the image acquisition process is obtained, in step S320, based on the first data, it is determined whether the image acquisition process involves an injection attack behavior.

[0066] In the real image acquisition process, the movement of the mobile terminal is controlled by the user's acquisition behavior, and the user's acquisition behavior is carried out following the specific acquisition method used by the target program in the image acquisition process. Accordingly, in the real image acquisition process, the movement of the mobile terminal and the user's acquisition behavior (i.e., the specific acquisition method used by the target program) are correlated and matched with each other; while in the image acquisition process involving injection attack behavior, the relationship between the movement of the mobile terminal and the user's acquisition behavior (i.e., the specific acquisition method used by the target program) is insufficient. In view of this, the mobile terminal can determine the relationship between the sensor data (which can indicate the movement of the mobile terminal) and the acquisition method data (which can indicate the specific acquisition method used by the user in the image acquisition process, i.e., the acquisition behavior of the user) corresponding to each of the multiple acquisition timestamps in the first data based on the first data, and then determine whether the image acquisition process involves injection attack behavior based on the relationship between the determined sensor data and the acquisition method data.

[0067] In some possible examples, the mobile terminal may pre-store an injection attack identification network for identifying injection attack behaviors. The injection attack identification network is a network that is pre-trained based on sample data corresponding to each sample collection process and its corresponding label data. The sample data includes sample sensor data and sample collection method data corresponding to the corresponding sample collection process. The label data is used to indicate whether the corresponding sample collection process involves injection attack behaviors.

[0068] Exemplarily, the sample data includes positive sample data and negative sample data. Among them, the positive sample data is the real data in the real sample collection process (i.e., the sample collection process that does not involve injection attack behavior), which includes the sensor data obtained in the real sample collection process (including the sensor in the terminal that performs image collection in the sample collection process, the measurement data actually measured and / or the terminal posture data determined based on the measurement data) and the sample collection method data generated by the target program; the label data corresponding to the positive sample data indicates that the corresponding sample collection process is a collection process that does not involve injection attack behavior.

[0069] Negative sample data may be real data or forged data in the sample collection process involving injection attack behavior. For example, a single negative sample data may include sample sampling method data generated by the target program in the sample collection process involving injection attack behavior, and sensor data obtained in the sample collection process involving injection attack behavior (including the sensor in the terminal that performs image acquisition in the sample collection process, the measurement data obtained by real measurement and / or the terminal's posture data determined based on the measurement data). For another example, a single negative sample data may include sample sampling method data generated by the target program in the sample collection process involving injection attack behavior, and sensor data forged for the sample collection process.

[0070] After acquiring the first data, the mobile terminal can determine whether the image acquisition process involves injection attack behavior based on the first data through the injection attack identification network. Specifically, step S320 can include step 11: In step 11, using the first data, through the injection attack identification network, determine whether the image acquisition process involves injection attack behavior.

[0071] In this step, after the mobile terminal obtains the first data, the first data can be input into the injection attack recognition network to determine whether the image acquisition process involves injection attack behavior (such as Figure 4 As shown). Exemplarily, the injection attack recognition network can be any network that can process time series data. For example, the injection attack recognition network can be a recognition network based on a transformer structure, a recognition network based on a long short-term memory network, or a recognition network based on a convolutional neural network, or a recognition network based on an RNN (Recurrent Neural Network). In some possible examples, the aforementioned injection attack recognition network includes an extraction layer and a classification layer; in step 11, steps 111-112 may be included:

[0072] In step 111, an intermediate representation is obtained based on the first data through an extraction layer. In this step, the extraction layer can be any extraction layer that can process time series data. Exemplarily, the extraction layer can be an extraction layer based on a transformer structure, an extraction layer based on a long short-term memory network, an extraction layer based on a convolutional neural network, or an extraction layer based on an RNN.

[0073] In some possible implementations, the mobile terminal may input the first data into the extraction layer so as to perform feature extraction on the first data through the extraction layer to obtain an intermediate representation.

[0074] Then, in step 112, the aforementioned intermediate representation is input into the classification layer to obtain a classification result indicating whether the image acquisition process involves injection attack behavior. In this step, the mobile terminal (target program) can input the intermediate representation into the classification layer to process the intermediate representation through the classification layer to obtain a classification result indicating whether the image acquisition process involves injection attack behavior.

[0075] Exemplarily, the classification layer can be implemented by a multi-layer perceptron or other classifiers.

[0076] In some examples, the classification layer may output a probability value indicating that the image acquisition process involves an injection attack behavior, and the probability value may characterize the classification result of whether the image acquisition process involves an injection attack behavior. Exemplarily, if the probability value is greater than or equal to a preset probability threshold, it may be considered that the classification result indicates that the image acquisition process involves an injection attack behavior; if the probability value is less than the preset probability threshold, it may be considered that the classification result indicates that the image acquisition process involves an injection attack behavior.

[0077] In some further possible examples, the aforementioned injection attack identification network may include a time coding layer, an extraction layer, and a classification layer; the first data includes sensor data and collection method data corresponding to each of a plurality of collection timestamps;

[0078] In step 11, the following steps 11A-11D may be included:

[0079] In step 11A, each acquisition time stamp is input into the time coding layer to obtain the time coding data corresponding to each acquisition time stamp.

[0080] Among them, the time coding layer can encode each acquisition timestamp in the first data to convert each acquisition timestamp into a vector representation that can capture the complexity of the time dimension. Specifically, the mobile terminal can input each acquisition timestamp into the time coding layer, and process each acquisition timestamp through the time coding layer to obtain the time coding data corresponding to each acquisition timestamp. Exemplarily, the time coding layer can be implemented as a time2vec algorithm. The Time2Vec algorithm is a special encoding method that can capture the periodicity and pattern of time series data. It can encode the timestamp to capture the complexity of the time dimension therein and obtain time coding data (i.e., vector representation) that can characterize the complexity of the time dimension. Specifically, the time2vec algorithm can be expressed by the following formula:

[0081]

[0082] Wherein, t2v(τ) represents the time coding data corresponding to each acquisition timestamp τ; t2v(τ)[i] represents the i-th element in the time coding data corresponding to the acquisition timestamp τ, ω i and is a trainable network parameter; F(·) is a set periodic activation function, which can be set as a sine function, and exemplarily, the F(·) can also be set as a cosine function; k is a preset hyperparameter.

[0083] After the mobile terminal obtains the first data, it inputs each acquisition time stamp in the first data into the time coding layer, so that the time coding layer obtains the time coding data corresponding to each acquisition time stamp through the above formula (1). It can be understood that the time coding data corresponding to a single acquisition time stamp is a k+1-dimensional vector.

[0084] In some other examples, the time coding layer may also be implemented by other algorithms that can encode timestamp data, such as a coding algorithm based on a sine function and a coding algorithm based on a cosine function.

[0085] Next, in step 11B, the sensor data and acquisition mode data corresponding to each acquisition timestamp in the first data are combined with the time coding data corresponding to each acquisition timestamp to obtain an intermediate data sequence. For example, for any acquisition timestamp j among the acquisition timestamps in the first data, assuming that the corresponding sensor data is represented as x1j (wherein, x1j can be an array), the corresponding acquisition mode data is represented as x2j, and the time coding data is represented as x3j, the sensor data, acquisition mode data and time coding data corresponding to the acquisition timestamp j are combined, and the intermediate data corresponding to the acquisition timestamp j can be expressed as [x1j, x2j, x3j]. By analogy, the intermediate data corresponding to each acquisition timestamp is obtained to form an intermediate data sequence.

[0086] Then, in step 11C, the aforementioned intermediate data sequence is input into the extraction layer to obtain an intermediate representation. In this step, the aforementioned intermediate data sequence is input into the extraction layer, so that the intermediate data sequence is processed by the extraction layer to obtain an intermediate representation.

[0087] In some possible implementations, the extraction layer may be an extraction layer based on a transformer structure; the extraction layer is used to perform convolution processing and self-attention mechanism-based processing on the input;

[0088] In step 11C, the following step 11C1 may be included: in step 11C1, the intermediate data sequence is input into the extraction layer, so that the extraction layer performs convolution processing on the intermediate data sequence to obtain convolution processing result data, and processes the convolution processing result data based on the self-attention mechanism to obtain an intermediate representation.

[0089] In the above steps, the extraction layer performs convolution processing on the intermediate data sequence, which can realize the feature extraction of local context information in the intermediate data sequence. Afterwards, based on the self-attention mechanism, the convolution processing result data is processed to realize the extraction of the overall relationship of the data, and obtain an intermediate representation that is more helpful to improve the classification results, so as to better enhance the injection attack recognition network's modeling ability of local context information in time series data, thereby reducing the influence of abnormal data in the time series data (i.e., the intermediate data sequence) on subsequent classification results, and improving the accuracy of the classification results, that is, achieving the recognition accuracy of whether the image acquisition process involves injection attack behavior.

[0090] Next, in step 11D, the aforementioned intermediate representation is input into the classification layer to obtain a classification result indicating whether the image acquisition process involves injection attack behavior. In this step, the aforementioned intermediate representation is input into the classification layer so that the classification layer processes the intermediate representation to obtain a classification result indicating whether the image acquisition process involves injection attack behavior.

[0091] In the above process, the injection attack recognition network can encode the time information (i.e., each acquisition timestamp) into the intermediate representation through the time coding layer, so that the injection attack recognition network can better understand and process the time series data, i.e., the first data, so as to obtain a more accurate classification result based on the intermediate representation that is a collection of time information and feature information corresponding to each time information (i.e., sensor data and acquisition method data corresponding to each acquisition timestamp).

[0092] The above process provides a new method for identifying injection attack behaviors. Considering the obvious difference between the movement of the mobile terminal in the image acquisition process involving injection attack behaviors and the real image acquisition process (i.e., the image acquisition process not involving injection attack behaviors), specifically, in the real image acquisition process, the mobile terminal generally moves following the user acquisition behavior in the acquisition process (i.e., the user controls the acquisition behavior of the mobile terminal according to the image acquisition instruction). Accordingly, in the real image acquisition process, the movement of the mobile terminal is consistently associated with the user acquisition behavior; while in the image acquisition process involving injection attack behaviors, the mobile terminal is generally placed flat and / or motionless. Accordingly, the movement of the mobile terminal is not consistently associated with the user acquisition behavior. In view of the above situation, in this embodiment, by identifying the association between the first data corresponding to the image acquisition process, i.e., the sensor data, and the acquisition method data used to indicate that the user adopts a specific acquisition method, it is possible to identify whether the image acquisition process involves injection attack behaviors, thereby realizing the identification of injection attack behaviors.

[0093] The foregoing describes certain embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in an order different from that in the embodiments, and the desired results may still be achieved. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0094] Corresponding to the above method embodiment, the present specification embodiment provides an injection attack behavior identification device 500, whose schematic block diagram is as follows: Figure 5 As shown, including:

[0095] The acquisition module 510 is configured to acquire first data corresponding to an image acquisition process of a mobile terminal for a first object, wherein the first data includes sensor data and acquisition mode data, the sensor data corresponds to a sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition mode data is used to instruct a user to adopt a specific acquisition mode during the image acquisition process;

[0096] The determination module 520 is configured to determine whether the image acquisition process involves injection attack behavior based on the first data.

[0097] In some possible examples, the first data includes sensor data and acquisition method data corresponding to multiple acquisition timestamps in the image acquisition process.

[0098] In some possible examples, the first object is a card and / or a human face.

[0099] In some possible examples, the invention further includes: an instruction generation module (not shown in the figure), configured to randomly generate a first instruction during the image acquisition process, wherein the first instruction is used to instruct a preset vibrator in the mobile terminal to vibrate;

[0100] The first data also includes: data indicating whether the mobile terminal vibrates.

[0101] In some possible examples, the acquisition method data includes: data indicating a frontal acquisition method and / or data indicating a non-frontal acquisition method, and the non-frontal acquisition method includes: a random multi-tilt angle acquisition method.

[0102] In some possible examples, the mobile terminal is provided with multiple types of sensors;

[0103] In the case where the first data is real data corresponding to the image acquisition process, the sensor data includes data directly measured by the multiple types of sensors and / or posture data of the mobile terminal determined based on data measured by sensors of each specified type.

[0104] In some possible examples, the determination module 520 is specifically configured to use the first data to determine whether the image acquisition process involves injection attack behavior through an injection attack identification network, wherein the injection attack identification network is a network that is pre-trained based on sample data corresponding to each sample acquisition process and its corresponding label data, the sample data includes sample sensor data and sample acquisition method data corresponding to the corresponding sample acquisition process, and the label data is used to indicate whether the corresponding sample acquisition process involves injection attack behavior.

[0105] In some possible examples, the injection attack identification network includes an extraction layer and a classification layer; the determination module 520 includes: a first obtaining unit (not shown in the figure), configured to obtain an intermediate representation based on the first data through the extraction layer; a second obtaining unit (not shown in the figure), configured to input the intermediate representation into the classification layer to obtain a classification result indicating whether the image acquisition process involves injection attack behavior.

[0106] In some possible examples, the extraction layer is an extraction layer based on a transformer structure, an extraction layer based on a long short-term memory network, or an extraction layer based on a convolutional neural network.

[0107] In some possible examples, the first data includes sensor data and acquisition mode data corresponding to each of a plurality of acquisition timestamps; the injection attack identification network also includes a time coding layer;

[0108] The first obtaining unit is specifically configured to input each acquisition timestamp into the time coding layer to obtain time coding data corresponding to each acquisition timestamp; combine the sensor data and acquisition mode data corresponding to each acquisition timestamp in the first data with the time coding data corresponding to each acquisition timestamp to obtain an intermediate data sequence; input the intermediate data sequence into the extraction layer to obtain the intermediate representation.

[0109] In some possible examples, the extraction layer is an extraction layer based on a transformer structure; the extraction layer is used to perform convolution processing and self-attention mechanism-based processing on the input;

[0110] The first obtaining unit is specifically configured to input the intermediate data sequence into the extraction layer so that the extraction layer performs convolution processing on the intermediate data sequence to obtain convolution processing result data, and processes the convolution processing result data based on the self-attention mechanism to obtain the intermediate representation.

[0111] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0112] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the injection attack behavior identification method provided in the present specification.

[0113] The embodiment of the present specification also 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 for identifying injection attack behavior provided in the present specification is implemented.

[0114] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and computing device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0115] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present invention may be implemented using hardware, software, firmware, 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.

[0116] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present invention in detail. It should be understood that the above description is only a specific implementation method of the embodiments of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for identifying injection attack behavior, comprising: Acquire first data corresponding to an image acquisition process of a mobile terminal for a first object, wherein the first data includes sensor data and acquisition mode data, the sensor data corresponds to a sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition mode data is used to instruct a user to adopt a specific acquisition mode during the image acquisition process; Based on the first data, it is determined whether the image acquisition process involves injection attack behavior.

2. The method of claim 1, wherein: The first data includes sensor data and acquisition mode data corresponding to multiple acquisition timestamps in the image acquisition process.

3. The method of claim 1, wherein: The first object is a card and / or a human face.

4. The method of claim 1, further comprising: During the image acquisition process, randomly generating a first instruction, the first instruction being used to instruct a preset vibrator in the mobile terminal to vibrate; The first data also includes: data indicating whether the mobile terminal vibrates.

5. The method of claim 1, wherein: The acquisition mode data includes: data indicating a frontal acquisition mode and / or data indicating a non-frontal acquisition mode, and the non-frontal acquisition mode includes: a random multi-tilt angle acquisition mode.

6. The method of claim 1, wherein: The mobile terminal is provided with multiple types of sensors; In the case where the first data is real data corresponding to the image acquisition process, the sensor data includes data directly measured by the multiple types of sensors and / or posture data of the mobile terminal determined based on data measured by sensors of each specified type.

7. The method according to any one of claims 1 to 6, wherein: The determining whether the image acquisition process involves injection attack behavior includes: Utilizing the first data, an injection attack identification network is used to determine whether the image acquisition process involves injection attack behavior, wherein the injection attack identification network is a network that is pre-trained based on sample data corresponding to each sample acquisition process and its corresponding label data, the sample data including sample sensor data and sample acquisition method data corresponding to the corresponding sample acquisition process, and the label data is used to indicate whether the corresponding sample acquisition process involves injection attack behavior.

8. The method of claim 7, wherein: The injection attack identification network includes an extraction layer and a classification layer; The determining whether the image acquisition process involves injection attack behavior includes: Based on the first data, obtaining an intermediate representation through the extraction layer; The intermediate representation is input into the classification layer to obtain a classification result indicating whether the image acquisition process involves injection attack behavior.

9. The method of claim 8, wherein: The extraction layer is an extraction layer based on a transformer structure, an extraction layer based on a long short-term memory network, or an extraction layer based on a convolutional neural network.

10. The method of claim 8, wherein: The first data includes sensor data and collection mode data corresponding to each of a plurality of collection timestamps; The injection attack identification network also includes a time coding layer; The step of obtaining an intermediate representation based on the first data through the extraction layer includes: Input each acquisition time stamp into the time coding layer to obtain time coding data corresponding to each acquisition time stamp; Combining the sensor data and the acquisition mode data corresponding to each acquisition timestamp in the first data with the time coding data corresponding to each acquisition timestamp to obtain an intermediate data sequence; The intermediate data sequence is input into the extraction layer to obtain the intermediate representation.

11. The method of claim 10, wherein: The extraction layer is an extraction layer based on a transformer structure; The extraction layer is used to perform convolution processing and self-attention mechanism-based processing on the input; The obtaining of the intermediate representation comprises: The intermediate data sequence is input into the extraction layer so that the extraction layer performs convolution processing on the intermediate data sequence to obtain convolution processing result data, and processes the convolution processing result data based on the self-attention mechanism to obtain the intermediate representation.

12. A device for identifying injection attack behavior, comprising: an acquisition module, configured to acquire first data corresponding to an image acquisition process of a mobile terminal for a first object, wherein the first data includes sensor data and acquisition mode data, the sensor data corresponds to a sensor in the mobile terminal, the sensor is used to sense the movement of the mobile terminal, and the acquisition mode data is used to instruct a user to adopt a specific acquisition mode during the image acquisition process; A determination module is configured to determine whether the image acquisition process involves injection attack behavior based on the first data.

13. A computing device comprising a memory and a processor, wherein: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • Method and apparatus for identifying injection attack behavior

    WO2026118744A1