Deep Learning Accelerator Inference Monitoring Method

Through the analysis of the netlist structure of the FPGA deep learning accelerator and the design of the inference monitor, the vulnerability data during the inference process of the accelerator is monitored and verified in real time, which solves the vulnerability attack problems faced by the accelerator such as bit flip attacks and improves the accuracy of the inference results. sex and safety.

CN118228825BActive Publication Date: 2024-10-22NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410223935.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2024-10-22
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

The existing technology lacks an inference monitoring method for FPGA-based deep learning model accelerators, which makes it difficult to guarantee the accuracy of accelerator inference results, especially when faced with the hidden danger of vulnerability attacks such as bit flip attacks.

Method used

A deep learning accelerator inference monitoring method is designed. By analyzing the netlist structure of the accelerator, identifying the computing logic and data cache area, and designing the accelerator inference monitor and vulnerability detector, the vulnerability data in the accelerator inference process can be monitored and verified in real time. , to prevent aggressive behavior.

Benefits of technology

It achieves accurate positioning and real-time detection of accelerator vulnerability data, can promptly detect and interrupt potential attacks, and improves the security of deep learning accelerators and the accuracy of inference results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118228825B_ABST
    Figure CN118228825B_ABST
Patent Text Reader

Abstract

The present invention discloses a deep learning accelerator inference monitoring method, comprising the following steps: S1. analyzing the netlist structure of the accelerator, identifying the computing logic and data cache area inside the netlist structure, and classifying the main data paths; S2. mapping the inference process of the deep learning algorithm to the inference process of the accelerator, designing the accelerator inference monitor structure, and implanting the monitor into the accelerator to monitor the accelerator inference process; S3. based on bit flip attacks and key data routing paths, identifying the deep learning model vulnerability, locating the data path where the accelerator's inference vulnerability is located, designing a vulnerability detector and implanting it into the data path, and detecting and verifying the vulnerability data; the present invention realizes the positioning of the vulnerability of the deep learning accelerator, and the detection and verification of the vulnerability data, thereby avoiding the loss caused by the accelerator being attacked, with high accuracy and good timeliness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital circuit security, and more specifically to a deep learning accelerator inference monitoring method. Background Art

[0002] At present, deep learning technology has been widely used in image processing, speech recognition, autonomous driving, face recognition and other fields. Edge and mobile devices have also begun to deploy deep learning applications and use low-resource computing devices to accelerate deep learning inference, thereby improving inference speed and reducing computing power consumption.

[0003] Field Programmable Gate Array (FPGA) is the mainstream deep learning inference acceleration platform currently used. Deep learning accelerators implemented based on FPGA platform have the advantages of good inference concurrency and low power consumption. In the research of deep learning accelerators, in addition to technologies such as energy efficiency and inference speed, how to conduct security monitoring of the accelerator operation process is also one of the urgent problems to be solved.

[0004] The paper "Bit-Flip Attack: Crushing Neural Network with Progressive BitSearch" (Proceedings of the IEEE / CVF International Conference on Computer Vision, 2019, pp. 1211-1220) points out that by flipping a small number of bits in the weights of the deep learning model, the accuracy of deep learning model reasoning can be reduced; the paper "DeepHammer: Depleting the Intelligence of Deep Neural Networks through Targeted Chain of Bit Flips" (29th USENIX Security Symposium (USENIX Security 2020), 2020, pp. 1463-1480) uses the RowHammer attack method to flip the target bits of the deep learning model in the storage device within a few minutes. In particular, when this type of attack is launched against the key weights in the deep learning model, the harm caused by the attack is even greater.

[0005] Moreover, these attack methods targeting deep learning model weights are characterized by low overhead, fast speed, high efficiency, and strong concealment, and the attacks on deep learning model weights are also applicable to deep learning model accelerators with similar storage structures.

[0006] However, there is currently a lack of inference monitoring methods for FPGA-based deep learning model accelerators, making it difficult to ensure the correctness of the accelerator's inference results.

[0007] Therefore, how to design an inference monitoring method for the deep learning accelerator developed on the FPGA platform to detect attack behaviors against the vulnerabilities of the deep learning model and interrupt the inference calculation in time to protect the security of the deep learning accelerator is an urgent problem that technical personnel in this field need to solve. Summary of the invention

[0008] In view of this, the present invention provides a deep learning accelerator reasoning monitoring method with high accuracy and good timeliness to determine whether there is an attack on the deep learning accelerator to avoid losses caused by the attack.

[0009] In order to achieve the above object, the present invention adopts the following technical solution:

[0010] A deep learning accelerator inference monitoring method comprises the following steps:

[0011] S1. Analyze the netlist structure of the accelerator, identify the computing logic and data cache area inside the netlist structure, and classify the main data paths;

[0012] S2. Map the reasoning process of the deep learning algorithm to the accelerator reasoning process, design the accelerator reasoning monitor structure, and implant the monitor into the accelerator to monitor the accelerator reasoning process;

[0013] S3. Based on bit-flip attacks and key data routing paths, identify the vulnerabilities of deep learning models, locate the data path where the accelerator's inference vulnerabilities are located, design a vulnerability detector and implant it into the data path, and detect and verify the vulnerable data.

[0014] Preferably, the specific contents of step S1 include:

[0015] S11. Read a given accelerator netlist file;

[0016] S12. Distinguish the computing logic and data buffer in the accelerator netlist, identify the computing logic and the data buffer, obtain the computing function corresponding to each computing logic and the data category cached in each data buffer, the computing function is the computing category in the depth algorithm corresponding to the computing logic, and the data category includes feature data, weight data and bias data;

[0017] S13. Differentiate the logic pins of the computing logic, and identify the computing logic control pins, the handshake signal pins used for data reading and writing in the computing logic, and the data transmission pins.

[0018] Preferably, the specific contents of step S2 include:

[0019] S21. According to the computing function corresponding to the computing logic and the data transmitted at each moment by the handshake signal pins and data transmission pins used for data reading and writing in the computing logic, determine the mutual mapping relationship between the accelerator computing process and the deep learning model reasoning process, wherein any moment of the deep learning reasoning process corresponds to the specific moment and specific computing logic of the accelerator computing process;

[0020] S22. According to the obtained mutual mapping relationship between the accelerator computing process and the deep learning model reasoning process, an accelerator reasoning process monitor is designed. The accelerator reasoning process includes reasoning level judgment and reasoning stage judgment;

[0021] S23. Select each computing logic start pin and data input chip select pin, and connect them to the accelerator reasoning process monitor;

[0022] S24. Determine the current reasoning level of the accelerator according to the execution status of different computing logics in the accelerator;

[0023] S25. Determine the inference stage in the accelerator inference hierarchy according to the loading and unloading conditions of various types of data corresponding to the computing logic, wherein the various types of data include input features, model weights, and model biases.

[0024] Preferably, the specific content of step S24 is:

[0025] The monitor uses the control pin signals of each computing logic in the accelerator as a basis to record the current working times of each computing logic. Based on the current working times of each computing logic and the mapping relationship, it determines the specific network layer in which each computing logic currently participates in the deep learning algorithm.

[0026] Preferably, the specific content of step S25 is:

[0027] Combined with the feature data cache and weight data cache corresponding to each computing logic in the accelerator, the number of times the data input chip select pin of each computing logic in the accelerator is pulled high is counted, the loading status of the weight data and feature data during the working process of each computing logic is obtained, and the specific computing stage of each computing logic is determined.

[0028] Preferably, the specific contents of step S3 include:

[0029] S31. Search for vulnerabilities in the deep learning model, combine the information of the reasoning level and reasoning stage of the accelerator, and identify the transmission path of the vulnerable point data in the accelerator, where the vulnerable point data is the weight data of the algorithm;

[0030] S32. Design a vulnerability detector by using the law of reading data in the data buffer using the computational logic and combining the knowledge of the accelerator's reasoning level and reasoning stage obtained by the monitor;

[0031] S33. Implanting the vulnerable point detector into the vulnerable point data path: disconnecting the vulnerable point data path between the data output pin of the data buffer and the data input pin of the computing logic; connecting the data output pin of the data buffer to the data input pin of the vulnerable point detector, and connecting the vulnerable point data output pin to the data input pin of the computing logic;

[0032] S34. According to the transmission method of data from the data buffer to the computing logic, the vulnerable points in the transmitted data sequence are detected by the vulnerable point detector, and it is verified whether the value of the vulnerable point data has been tampered with.

[0033] Preferably, the specific content of step S34 is:

[0034] The transmission mode of transmitting data from the data buffer to the computing logic is the rule of the computing logic reading the data from the data buffer in step S32;

[0035] The serially transmitted data on the data path is counted from the time the first data is transmitted. When the vulnerable point data is transmitted, the current transmission data is read, that is, the vulnerable point data is obtained, and the obtained vulnerable point data is compared with the actual vulnerable point data. When the data values ​​are inconsistent, the vulnerable point is attacked by the outside world, otherwise the accelerator is not attacked.

[0036] Preferably, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the deep learning accelerator inference monitoring method.

[0037] Preferably, a processing terminal includes a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and the processor implements the deep learning accelerator inference monitoring method when executing the computer program.

[0038] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a deep learning accelerator reasoning monitoring method, which has the following advantages:

[0039] High accuracy: It can accurately locate the vulnerable point data in the accelerator and obtain the corresponding value. The real data of the vulnerable point is known, so it can accurately detect whether the vulnerable point data has been tampered with;

[0040] Strong timeliness: The accelerator inference process monitor and the vulnerable point detector both work in real time and only detect the data at the vulnerable point location to determine whether the value has been tampered with. Therefore, if the data at the vulnerable point is tampered with, it can be detected immediately. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0042] Figure 1 A schematic diagram of a deep learning accelerator inference monitoring method provided by the present invention;

[0043] Figure 2 A schematic diagram of the accelerator structure analysis provided by the present invention;

[0044] Figure 3 A schematic diagram of monitoring the accelerator reasoning process provided by the present invention;

[0045] Figure 4 A schematic diagram of accelerator vulnerable point positioning and detection provided by the present invention;

[0046] Figure 5 A schematic diagram of the hierarchical structure of the netlist provided by the present invention;

[0047] Figure 6 A schematic diagram of the computing logic and data buffer area in the netlist provided by the present invention;

[0048] Figure 7 The mapping relationship provided by the present invention is schematically represented;

[0049] Figure 8 A schematic diagram of the working process of the accelerator reasoning process monitor provided by the present invention;

[0050] Fig. 9 A schematic diagram of the design of an accelerator reasoning process monitor and an accelerator vulnerability detector provided by the present invention;

[0051] Fig.10 A schematic diagram of the data regularity of the data buffer area read by the computing logic provided by the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] The embodiment of the present invention discloses a deep learning accelerator reasoning monitoring method, such as Figure 1 , including the following steps:

[0054] S1. Accelerator structure analysis: Analyze the netlist structure of the accelerator, identify the computational logic and data cache within the netlist structure, and classify the main data paths;

[0055] S2. Accelerator reasoning process monitoring: Map the reasoning process of the deep learning algorithm to the accelerator reasoning process, design the accelerator reasoning monitor structure, and implant the monitor into the accelerator to monitor the accelerator reasoning process;

[0056] S3. Accelerator vulnerability location and monitoring: Based on bit flip attacks and key data routing paths, identify the vulnerabilities of deep learning models, locate the data path where the accelerator's inference vulnerabilities are located, design a vulnerability detector and implant it into the data path, and detect and verify the vulnerable data.

[0057] In order to further implement the above technical solution, Figure 2 The specific contents of step S1 include:

[0058] S11. Accelerator netlist reading: reading a given accelerator netlist file;

[0059] In this embodiment, the read accelerator netlist file Netlist has a hierarchical structure, such as Figure 3 As shown, it includes: the input / output port Port of the entire Netlist top-level logic, the basic unit Cell (including the lookup table, register, logic circuit, IO unit, etc.), the circuit connection network Nets between the basic units Cell, and the input / output pins Pins of the Cell;

[0060] S12. Identification of computing logic and data buffer: distinguish computing logic and data buffer in the accelerator netlist, identify computing logic and data buffer, obtain computing functions corresponding to each computing logic and data categories cached in each data buffer, the computing function is the computing category (convolution, pooling, etc.) in the depth algorithm corresponding to the computing logic, and the data category includes feature data, weight data, and bias data;

[0061] In this embodiment, if Figure 4 In the Netlist, the output pins of the data buffer area only include the data output pin "q", and the input part of the data buffer area includes the input address pin "addr", the chip select pin "ce", the data input pin "d" and the write enable pin "we". Figure 4 The pin diagram shows only one group. In reality, there may be multiple groups of pins in a single data buffer. Based on the pin characteristics, the data buffer in the Netlist can be identified. In the Netlist, the data input and output pins of the calculation logic are directly connected to the data buffer. Based on this feature, the calculation logic in the Netlist can be identified.

[0062] Obtain the calculation function of each calculation logic. The specific operation includes the following process:

[0063] First, obtain the parameters (weights and biases) of each network layer of the deep learning algorithm and the feature data output by each intermediate layer when inputting test data;

[0064] Then, add "Mark Debug" to the data input / output pins of each computing logic in the accelerator netlist, simulate the netlist with the test data of the input deep learning algorithm after synthesis, and record the data input / output of each computing logic in the whole process. By comparing the data, judge the computing function of each computing logic;

[0065] Obtaining the data types (feature data, weight data, bias data) inputted on each data input pin of the calculation logic and the loading / unloading status of each type of data when the calculation process is completed (the number of weight data and the number of bias data loaded when completing a calculation task) included in the calculation function of each calculation logic. The data types inputted on each data input pin of the calculation logic can be used to determine the data categories cached in the data buffer area connected to each data input pin;

[0066] S13. Computational logic pin identification: distinguish the logic pins of the computational logic, identify the computational logic control pins, the handshake signal pins used for data reading and writing in the computational logic, and the data transmission pins;

[0067] like Figure 4, the calculation logic includes logic control pins, data input and its handshake signal pins and data output and its handshake signal pins, specifically: logic control pin "ap_start", data input and its handshake signal pins (data address pin "data_r_addr", data chip select pin "data_r_ce", input data pin "data_r_q"), data output and its handshake signal pins (data address pin "output_r_addr", data chip select pin "output_r_ce", data pin "output_r_d", data write enable pin "output_r_we"). In actual situations, there may be multiple groups of data input and its handshake signal pins and data output and its handshake signal pins, and only one group is shown in the figure;

[0068] The calculation logic starts working after the logic-controlled ap_start is pulled high. If ap_start is pulled low, the current transaction will be completed and the operation will stop.

[0069] In practical applications, an accelerator refers to a digital logic circuit that needs to accelerate deep learning inference calculations through FPGA devices; the Netlist structure refers to the file generated after the accelerator code is synthesized, which contains the register transfer level (RTL) logic circuit of the accelerator; the computational logic refers to the logic circuit that implements specific computing functions; the data cache refers to the area where data is stored before it is directly input into the computational logic, which is composed of the block random access memory (BRAM) in the FPGA; the data path refers to the circuit connection between the data output of the data cache and the data input of the computational logic.

[0070] In order to further implement the above technical solution, Figure 5 , the specific contents of step S2 include:

[0071] S21. Computation process mapping: Determine the mutual mapping relationship between the accelerator computing process and the deep learning model reasoning process according to the computing function corresponding to the computing logic and the data transmitted at each moment by the handshake signal pins and data transmission pins used for data reading and writing in the computing logic. The mutual mapping relationship is that any moment of the deep learning reasoning process corresponds to the specific moment and specific computing logic of the accelerator computing process, mainly including the computing function of each computing logic and the participation of different computing logics in a complete computing task;

[0072] In this example, the mapping relationship between the accelerator calculation process and the deep learning algorithm reasoning process is obtained by simulating the accelerator Netlist, and the mapping relationship is recorded as a mapping relationship table;

[0073] like Figure 6As shown in the figure, the mapping relationship table records the working status of each computing logic, including the start time and duration of each work of the computing logic, and the computing process of the network layer corresponding to each working time period. The horizontal axis is the accelerator inference time. Different color blocks correspond to the computing process of different network layers in the deep learning algorithm. The data in the color block indicates the current working number of the computing logic.

[0074] The start and end of each calculation logic work in the accelerator is known according to the signal of the logic control pin ap_start. When the logic control pin is pulled high, the calculation logic works, and when the logic control pin is pulled low, it indicates that the calculation logic work is completed and stops working;

[0075] S22. Monitor design: Based on the obtained mutual mapping relationship between the accelerator computing process and the deep learning model reasoning process, design an accelerator reasoning process monitor. The accelerator reasoning process includes reasoning level judgment and reasoning stage judgment.

[0076] In practical applications, embedding the monitor into the accelerator means adding the logic generated after the monitor code is synthesized into the netlist structure of the accelerator. The accelerator reasoning process monitor monitors the calculation process of each calculation logic during the operation of the accelerator;

[0077] S23. Monitor implantation: Select each computing logic start pin and data input chip select pin, and connect to the accelerator inference process monitor;

[0078] like Figure 7 The accelerator inference process monitor consists of several computing logic monitors (equal to the number of computing logics) and an accelerator monitor. The Netlist file is modified using the ECO script, and the logic start pin ap_start of the computing logic and the input data chip select pin data_r_ce are connected to the accelerator inference process monitor through the "connect_net" command. The computing logic monitor monitors the ap_start and data_r_ce signals, counts the working times of each computing logic and the data loading times in each working process, and summarizes and analyzes the information of the computing logic monitor in combination with the mapping relationship table to realize the monitoring of the accelerator inference process;

[0079] S24. Reasoning level judgment: judging the current reasoning level of the accelerator according to the execution status of different computing logics in the accelerator, where the execution status refers to the current working number of the computing logic in one acceleration process;

[0080] S25. Reasoning stage judgment: according to the loading and unloading of various types of data corresponding to the computing logic, the reasoning stage in the accelerator reasoning hierarchy, that is, the specific computing task in the accelerator reasoning hierarchy, is judged. Various types of data include input features, model weights, and model biases;

[0081] The specific computing task refers to the data involved in the calculation in the computing logic at the corresponding reasoning level, including feature data and weight data.

[0082] In order to further implement the above technical solution, Figure 8 , the specific content of step S24 is:

[0083] The monitor uses the control pin signals of each computing logic in the accelerator (i.e., the start and end signals of the work) as the basis, records the current working times of each computing logic through a counter, and determines the specific network layer of each computing logic participating in the deep learning algorithm based on the current working times of each computing logic and the mapping relationship table.

[0084] In order to further implement the above technical solution, the specific content of step S25 is:

[0085] Combined with the feature data cache and weight data cache corresponding to each computing logic in the accelerator, the corresponding data input chip select pin data_r_ce needs to be pulled high before the computing logic loads data. The number of times the data input chip select pin of each computing logic in the accelerator is pulled high is counted, and the loading status of the weight data and feature data during the working process of each computing logic is obtained to determine the specific computing stage of each computing logic, that is, the specific computing task in the accelerator reasoning level.

[0086] In order to further implement the above technical solution, Fig. 9 , the specific contents of step S3 include:

[0087] S31. Vulnerable point data path location: Search for vulnerable points in the deep learning model, combine the information of the accelerator's reasoning level and reasoning stage, and identify the transmission path of the vulnerable point data in the accelerator. The vulnerable point data is the weight data of the algorithm.

[0088] In this embodiment, the circuit connection connecting the calculation logic weight data input pin and the weight data buffer area is the vulnerable point data path;

[0089] S32. Design of vulnerable point detector: Design a vulnerable point detector by using the law of reading data buffer data by computing logic and combining the knowledge of the accelerator's reasoning level and reasoning stage obtained by the monitor;

[0090] In this embodiment, the rule for the computing logic to read the data in the data buffer is as follows: Fig.10 As shown, when the calculation logic is ready to read data, the chip select signal ce is pulled high, and the data read address is written to the data buffer through addr. At this time, the data output q of the data buffer outputs the data of the corresponding address, and one data is output in each clock cycle;

[0091] S33. Implantation of the vulnerable point detector: disconnecting the vulnerable point data path between the data output pin of the data buffer and the data input pin of the computing logic; connecting the data output pin of the data buffer to the data input pin of the vulnerable point detector, and connecting the vulnerable point data output pin to the data input pin of the computing logic;

[0092] Specifically, the "disconnect_net" and "connect_net" commands are used to disconnect the data path and connect the circuit respectively;

[0093] S34. Data detection and verification: According to the transmission mode of data from the data buffer to the computing logic, the vulnerable point detector is used to detect the vulnerable points in the transmitted data sequence, and verify whether the value of the vulnerable point data has been tampered with;

[0094] In this embodiment, the inference process monitoring information obtained by the accelerator inference process monitor and the change of the input data chip select signal are used to detect the vulnerable point data by matching the position of the vulnerable point with the timing reading position during the stage of transmitting the vulnerable point data.

[0095] In order to further implement the above technical solution, the specific content of step S34 is:

[0096] The transmission mode of transmitting data from the data buffer to the computing logic is the rule of the computing logic reading the data from the data buffer in step S32;

[0097] The serially transmitted data on the data path is counted from the time the first data is transmitted. When the vulnerable point data is transmitted, the current transmission data is read, that is, the vulnerable point data is obtained, and the obtained vulnerable point data is compared with the actual vulnerable point data. When the data values ​​are inconsistent, the vulnerable point is attacked by the outside world, otherwise the accelerator is not attacked.

[0098] In order to further implement the above technical solution, a computer-readable storage medium stores a computer program, which implements a deep learning accelerator inference monitoring method when executed by a processor.

[0099] In order to further implement the above technical solution, a processing terminal includes a memory and a processor, the memory stores a computer program that can be run on the processor, and the processor implements a deep learning accelerator inference monitoring method when executing the computer program.

[0100] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0101] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A deep learning accelerator inference monitoring method, characterized in that: The following steps are involved: S1. Analyze the netlist structure of the accelerator, identify the computing logic and data cache area inside the netlist structure, and classify the main data paths; S2. Map the reasoning process of the deep learning model to the accelerator reasoning process, design the accelerator reasoning process monitor structure, and implant the monitor into the accelerator to monitor the accelerator reasoning process; S3. Based on bit flip attacks and key data routing paths, identify the vulnerabilities of deep learning models, locate the data paths where the inference vulnerabilities of accelerators are located, design vulnerability detectors and implant them into the data paths, and detect and verify the vulnerable data; The specific contents of step S1 include: S11. Read a given accelerator netlist file; S12. Distinguish the computing logic and data cache area in the accelerator netlist, identify the computing logic and the data cache area, obtain the computing function corresponding to each computing logic and the data category cached in each data cache area, the computing function is the computing category in the deep learning model corresponding to the computing logic, and the data category includes feature data, weight data and bias data; S13. Distinguish the logic pins of the computing logic, identify the computing logic control pins, the handshake signal pins for data reading and writing in the computing logic, and the data transmission pins; The specific contents of step S2 include: S21. According to the computing function corresponding to the computing logic and the data transmitted at each moment by the handshake signal pins and data transmission pins used for data reading and writing in the computing logic, determine the mutual mapping relationship between the accelerator computing process and the deep learning model reasoning process, wherein any moment of the deep learning model reasoning process corresponds to the specific moment and specific computing logic of the accelerator computing process; S22. According to the obtained mutual mapping relationship between the accelerator computing process and the deep learning model reasoning process, an accelerator reasoning process monitor is designed. The accelerator reasoning process includes reasoning level judgment and reasoning stage judgment; S23. Select each computing logic start pin and data input chip select pin, and connect them to the accelerator reasoning process monitor; S24. Determine the current reasoning level of the accelerator according to the execution status of different computing logics in the accelerator; S25. Determine the inference stage in the accelerator inference hierarchy according to the loading and unloading of various types of data corresponding to the computing logic, wherein the various types of data include input features, model weights, and model biases; The specific contents of step S3 include: S31. Search for vulnerabilities in the deep learning model, combine the information of the reasoning level and reasoning stage of the accelerator, and identify the transmission path of the vulnerable point data in the accelerator, where the vulnerable point data is the weight data of the algorithm; S32. Design a vulnerability detector by using the law of reading data in the data cache area using the computational logic and combining the knowledge of the accelerator's reasoning level and reasoning stage obtained by the monitor; S33. Implanting the vulnerable point detector into the vulnerable point data path: disconnecting the vulnerable point data path between the data output pin of the data buffer and the data input pin of the computing logic; connecting the data output pin of the data buffer to the data input pin of the vulnerable point detector, and connecting the vulnerable point data output pin to the data input pin of the computing logic; S34. According to the transmission method of data from the data buffer to the computing logic, the vulnerable points in the transmitted data sequence are detected by the vulnerable point detector, and it is verified whether the value of the vulnerable point data has been tampered with.

2. A deep learning accelerator inference monitoring method according to claim 1, characterized in that: The specific content of step S24 is: The monitor uses the control pin signals of each computing logic in the accelerator as a basis to record the current working times of each computing logic. Based on the current working times of each computing logic and the mutual mapping relationship, it determines the specific network layer in which each computing logic currently participates in the deep learning model.

3. A deep learning accelerator inference monitoring method according to claim 1, characterized in that: The specific content of step S25 is: Combined with the feature data cache and weight data cache corresponding to each computing logic in the accelerator, the number of times the data input chip select pin of each computing logic in the accelerator is pulled high is counted, the loading status of the weight data and feature data during the working process of each computing logic is obtained, and the specific computing stage of each computing logic is determined.

4. A deep learning accelerator inference monitoring method according to claim 1, characterized in that: The specific content of step S34 is: The transmission mode of data from the data buffer area to the computing logic is the rule that the computing logic reads the data from the data buffer area in step S32; The serially transmitted data on the data path is counted from the time the first data is transmitted. When the vulnerable point data is transmitted, the current transmission data is read, that is, the vulnerable point data is obtained, and the obtained vulnerable point data is compared with the actual vulnerable point data. When the data values ​​are inconsistent, the vulnerable point is attacked by the outside world, otherwise the accelerator is not attacked.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the deep learning accelerator reasoning monitoring method described in any one of claims 1 to 4 is implemented.

6. A processing terminal, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, a deep learning accelerator reasoning monitoring method as described in any one of claims 1 to 4 is implemented.