Transmission protection circuit for medical neural network chip

By designing the transmission protection circuit of read-only memory, counter, comparator and cross-swap module on medical neural network chips, the alternating state of data output is realized, and the problem of large hardware overhead in the prior art is solved, effectively preventing data monitoring. And improves security.

CN119294452AActive Publication Date: 2025-01-10NINGBO UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411323472.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-10
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

When the prior art prevents data monitoring of medical neural network chips, it will cause large additional hardware overhead to be generated on the device and server side, and cannot effectively prevent data monitoring without increasing hardware overhead.

Method used

Design a transmission protection circuit including read-only memory, counter, comparator and cross-switch module. The cross-switch module has switched and non-switched states. The comparator controls switching between these two states to ensure data output. Alternating states, the attacker cannot obtain complete data.

Benefits of technology

Effectively prevent data monitoring, only a small amount of hardware is added to the device side, and no additional hardware overhead is required on the server side, which significantly improves the security of medical neural network chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294452A_ABST
    Figure CN119294452A_ABST
Patent Text Reader

Abstract

The invention discloses a transmission protection circuit of a medical neural network chip, which comprises a read-only memory, a counter, a comparator and a cross exchange module, and is characterized in that the read-only memory is used for storing all input data and all weight data of the medical neural network chip; one input data and one weight data of the medical neural network chip are output to the cross-exchange module every time, and the cross-exchange module is used for directly outputting or crosswise outputting one input data and one weight data output to the cross-exchange module by the read-only memory under the control of the comparator. The counter is used for carrying out real-time statistics on output working turns of the cross-exchange module, and the comparator is used for generating two paths of control signals according to a statistical value of the counter to control whether the counter is reset or not and direct output or cross output of the cross-exchange module; the method has the advantages that data monitoring can be effectively prevented, hardware overhead does not need to be additionally increased at a server side, and only a small amount of hardware needs to be added at an equipment side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a transmission protection circuit, in particular to a transmission protection circuit for a medical neural network chip. Background Art

[0002] Cache attacks on medical neural network chips are a common means of stealing important privacy data of patients. At present, many studies have proposed a series of protection measures. For example, the Chinese patent application number CN202310915909.9 discloses a privacy-preserving neural network prediction method and system. This method and system is based on a secret-sharing protocol for the nonlinear layer of the neural network, which avoids the conversion overhead between the numerical representation of the linear layer and the Boolean representation of the nonlinear layer. At the same time, the ciphertext calculation and parameter preparation are all performed in the offline stage, so that the calculation of the nonlinear layer in the online stage is all lightweight, which greatly reduces the time required for prediction and improves the efficiency of privacy-preserving neural network prediction. A Chinese patent with publication number CN114003961B discloses a deep neural network reasoning method with privacy protection, which mainly includes: the client generates a key; the client uses the key to send it to the edge server; the edge server returns the calculation result to the client; the client verifies the returned result, and accepts it if the result is correct, and refuses to receive it if the result is incorrect; for the verified correct result, the client uses the locally stored key and bias matrix to restore the actual output result of the linear layer; the client performs calculations on the nonlinear layer locally, and uses the calculation results as the input of the next linear layer, and repeats the above steps until the final reasoning result is obtained.

[0003] However, both of the above-mentioned technologies prevent attacks on data monitoring on medical neural network chips, and will generate large additional hardware overhead on the device side and server side of the medical neural network chip. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a transmission protection circuit for a medical neural network chip that can effectively prevent data eavesdropping and does not require additional hardware overhead on the server side, but only requires a small amount of hardware to be added on the device side.

[0005] The technical solution adopted by the present invention to solve the above technical problems is: a transmission protection circuit of a medical neural network chip, including a read-only memory, a counter, a comparator and a cross-interchange module, the read-only memory is used to store all input data and all weight data of the medical neural network chip, and outputs one input data and one weight data of the medical neural network chip to the cross-interchange module each time according to a preset sequence; the cross-interchange module has two states, an "exchange" state and a "non-exchange" state, and the cross-interchange module is used to switch between the "exchange" state and the "non-exchange" state under the control of the comparator, and the The initial state of the cross-interchange module is the "non-exchange" state; when the cross-interchange module receives an input data and a weight data outputted to it by the read-only memory, if it is in the "exchange" state, the currently received input data and weight data are exchanged and outputted to complete a round of output work; if it is in the "non-exchange" state, the currently received input data and weight data are directly outputted to complete a round of output work; the counter is used to perform real-time statistics on the output work rounds of the cross-interchange module, obtain the real-time statistical value as the current statistical value for storage, and output the current statistical value to the comparator, The initial statistical value of the counter is 0; the comparator is used to generate two control signals according to the current statistical value output by the counter, wherein the first control signal is output to the counter to control whether the counter is cleared, and the second control signal is output to the cross exchange module to control whether the cross exchange module switches between the "exchange" state and the "non-exchange" state; when the current statistical value output by the counter is 1000, the first control signal output by the comparator controls the counter to set the current statistical value stored therein to 0, and at this time the counter restarts from 0 to reset the current statistical value stored therein. The output working rounds of the cross exchange module are counted, and the second control signal controls the cross exchange module to switch between the "exchange" state and the "non-exchange" state. At this time, if the cross exchange module is in the "exchange" state, it switches to the "non-exchange" state, and if the cross exchange module is in the "non-exchange" state, it switches to the "exchange" state; when the current statistical value output by the counter is less than 1000, the first signal output by the comparator controls the counter to continue counting based on the current statistical value it saves, and the second control signal controls the cross exchange module to keep its current state unchanged.

[0006] The read-only memory has a reset terminal, an input data output channel with a bit width of 32 bits, and a weight data output channel with a bit width of 32 bits; the counter has a clock terminal, a reset terminal, a counting input terminal with a bit width of 10 bits, and a counting output terminal with a bit width of 10 bits; the comparator has a clock terminal, a reset terminal, a counting input terminal with a bit width of 10 bits, a counting output terminal with a bit width of 10 bits, and a switching output terminal; the cross-interchange module has a switching input terminal, a reset terminal, two input data terminals with a bit width of 32 bits, and two output data terminals with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as its input data terminal one and input data terminal two, and its two output data terminals with a bit width of 32 bits are respectively referred to as its output data terminal one and output data terminal two; the input data output channel of the read-only memory is connected to the input data terminal one of the cross-interchange module, and the weight data output channel of the read-only memory is connected to the The second input data terminal of the cross-interchange module is connected to the reset terminal of the read-only memory, the reset terminal of the counter, the reset terminal of the comparator and the reset terminal of the cross-interchange module, and its connection terminal serves as the reset port of the data transmission protection circuit, which is used to access the external reset signal to restore the data transmission protection circuit to an initial state; the counting input terminal of the counter is connected to the counting output terminal of the comparator, the counting output terminal of the counter is connected to the counting input terminal of the comparator, the clock terminal of the counter is connected to the clock terminal of the comparator, and its connection terminal serves as the clock terminal outside the data transmission protection circuit, which is used to access the clock signal; the switching output terminal of the comparator is connected to the switching input terminal of the cross-interchange module, the output data terminal one of the cross-interchange module serves as the data output terminal one of the data transmission protection circuit, and the output data terminal two of the cross-interchange module serves as the data output terminal two of the data transmission protection circuit.

[0007] The cross-exchange module includes four data selectors, which are respectively referred to as data selector 1, data selector 2, data selector 3 and data selector 4. The data selector 1 has a switching input terminal, two input data terminals with a bit width of 32 bits and an output data terminal with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as input data terminal 1 and input data terminal 2; the data selector 2 has a reset terminal, a 32-bit input data terminal, a 32-bit low-level input terminal and an output data terminal with a bit width of 32 bits; the data selector three has a switching input terminal, two input data terminals with a bit width of 32 bits and an output data terminal with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as its input data terminal one and input data terminal two; the data selector four has a reset terminal, a 32-bit input data terminal, a 32-bit low-level input terminal and a 32-bit output data terminal; the output data terminal of the data selector one is connected to the output data terminal of the data selector two The input data end is connected, the switching input end of the data selector one is connected to the switching input end of the data selector three, and its connection end serves as the switching input end of the cross-interchange module, the input data end one of the data selector one is connected to the input data end one of the data selector three, and its connection end serves as the input data end one of the cross-interchange module, the input data end two of the data selector one is connected to the input data end two of the data selector three, and its connection end serves as the input data end two of the cross-interchange module; the low level input end of the data selector two is connected to the low level input end of the data selector four and is connected to a 32-bit low level, the reset end of the data selector two is connected to the reset end of the data selector four, and its connection end serves as the reset end of the cross-interchange module, the output data end of the data selector two serves as the output data end one of the cross-interchange module; the output data end of the data selector three is connected to the input data end of the data selector four; the output data end of the data selector four is the output data end two of the cross-interchange module.

[0008] Compared with the prior art, the advantage of the present invention is that a transmission protection circuit of a medical neural network chip is formed by a read-only memory, a counter, a comparator and a cross-interchange module. The read-only memory stores all input data and all weight data of the medical neural network chip collected by the sensor device, and outputs one input data and one weight data of the medical neural network chip to the cross-interchange module each time in a preset order. The cross-interchange module has two states, an "exchange" state and a "non-exchange" state. The cross-interchange module switches between the "exchange" state and the "non-exchange" state under the control of the comparator. The initial state of the cross-interchange module is the "non-exchange" state. When the cross-interchange module receives an input data outputted to it by the read-only memory, When receiving a data and a weight data, if it is in the "exchange" state, the currently received input data and weight data are exchanged and output to complete a round of output work. If it is in the "non-exchange" state, the currently received input data and weight data are directly output to complete a round of output work. The counter performs real-time statistics on the output work rounds of the cross-exchange module, obtains the real-time statistical value as the current statistical value for storage, and outputs the current statistical value to the comparator. The initial statistical value of the counter is 0. The comparator generates two control signals according to the current statistical value output by the counter. The first control signal is output to the counter to control whether the counter is cleared, and the second control signal is output to the cross-exchange module to control Whether the cross-interchange module switches between the "exchange" state and the "non-exchange" state. When the current statistical value output by the counter is 1000, the first control signal output by the comparator controls the counter to set the current statistical value stored in it to 0. At this time, the counter starts counting the output working rounds of the cross-interchange module from 0 again. The second control signal controls the cross-interchange module to switch between the "exchange" state and the "non-exchange" state. At this time, if the cross-interchange module is in the "exchange" state, it switches to the "non-exchange" state. If the cross-interchange module is in the "non-exchange" state, it switches to the "exchange" state. When the current statistical value output by the counter is less than 1000, the first signal output by the comparator controls the counter in The second control signal controls the cross-interchange module to keep its current state unchanged. When the attacker monitors the input data and weight data of the medical neural network chip output by the cross-interchange module, since the cross-interchange module switches between the "exchange" state and the "non-exchange" state, the input data and weight data of the medical neural network chip output by the cross-interchange module also become alternating states, that is, the attacker will obtain discontinuous input data and weight data of the medical neural network chip from the cross-interchange module, and cannot obtain complete input data and weight data of the medical neural network chip, thereby achieving the purpose of protection. Therefore, the present invention can effectively prevent data monitoring and does not require additional hardware overhead on the server side.The present invention only needs to be deployed on the device side, that is, only a small amount of hardware needs to be added on the device side. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a structural schematic diagram of the transmission protection circuit of the medical neural network chip of the present invention;

[0010] Figure 2 It is a structural schematic diagram of the cross-interchange module of the transmission protection circuit of the medical neural network chip of the present invention;

[0011] Figure 3 It is an area cost diagram of the transmission protection circuit of the medical neural network chip of the present invention;

[0012] Figure 4 A power consumption diagram of the transmission protection circuit of the medical neural network chip of the present invention;

[0013] Figure 5 This is a comparison chart of the medical neural network chip being attacked by CNN before and after using the transmission protection circuit of the medical neural network chip of the present invention. DETAILED DESCRIPTION

[0014] The present invention is further described in detail below with reference to the accompanying drawings.

[0015] Embodiment 1: Figure 1As shown, a transmission protection circuit of a medical neural network chip includes a read-only memory, a counter, a comparator and a cross-interchange module, wherein the read-only memory is used to store all input data and all weight data of the medical neural network chip (obtained by training EEG signals using Python), and outputs one input data and one weight data of the medical neural network chip to the cross-interchange module each time according to a preset order, wherein all input data and all weight data of the medical neural network chip are collected by a sensor device; the cross-interchange module has two states, an "exchange" state and a "non-exchange" state, and the cross-interchange module is used to switch between the "exchange" state and the "non-exchange" state under the control of the comparator, and the initial state of the cross-interchange module is the "non-exchange" state; when the cross-interchange module receives an input data and a weight data outputted to it by the read-only memory, if it is in the "exchange" state, the currently received input data and weight data are exchanged and output, completing a round of output work, and if it is in the "non-exchange" state, the currently received input data and weight data are directly output, completing a round of output work; the counter is used to perform real-time statistics on the output work rounds of the cross-interchange module, and obtain The real-time statistical value is saved as the current statistical value, and the current statistical value is output to the comparator, and the initial statistical value of the counter is 0; the comparator is used to generate two control signals according to the current statistical value output to it by the counter, wherein the first control signal is output to the counter to control whether the counter is cleared, and the second control signal is output to the cross-exchange module to control whether the cross-exchange module switches between the "exchange" state and the "non-exchange" state; when the current statistical value output by the counter is 1000, the first control signal output by the comparator controls the counter to set the current statistical value stored therein to 0, at this time The counter starts counting the output working rounds of the cross-interchange module again from 0, and the second control signal controls the cross-interchange module to switch between the "exchange" state and the "non-exchange" state. At this time, if the cross-interchange module is in the "exchange" state, it switches to the "non-exchange" state, and if the cross-interchange module is in the "non-exchange" state, it switches to the "exchange" state; when the current statistical value output by the counter is less than 1000, the first signal output by the comparator controls the counter to continue counting based on the current statistical value it saves, and the second control signal controls the cross-interchange module to keep its current state unchanged.

[0016] In this embodiment, when an attacker monitors the input data and weight data of the medical neural network chip output by the cross-interchange module, since the cross-interchange module switches between the "exchange" state and the "non-exchange" state, the input data and weight data of the medical neural network chip output by it also become alternating states, that is, the attacker will obtain discontinuous input data and weight data of the medical neural network chip from the cross-interchange module, and cannot obtain complete input data and weight data of the medical neural network chip, thereby achieving the purpose of protection. Therefore, the present invention can effectively prevent data monitoring, and does not require additional hardware overhead on the server side. It only needs to be deployed on the device side, that is, only a small amount of hardware needs to be added on the device side.

[0017] Embodiment 2: This embodiment is basically the same as Embodiment 1, except that: in this embodiment, the read-only memory has 1 reset terminal, 1 input data output channel with a bit width of 32 bits, and 1 weight data output channel with a bit width of 32 bits; the counter has 1 clock terminal, 1 reset terminal, 1 counting input terminal with a bit width of 10 bits, and 1 counting output terminal with a bit width of 10 bits; the comparator has 1 clock terminal, 1 reset terminal, 1 counting input terminal with a bit width of 10 bits, 1 counting output terminal with a bit width of 10 bits, and 1 switching output terminal; the cross-interchange module has 1 switching input terminal, 1 reset terminal, two input data terminals with a bit width of 32 bits, and two output data terminals with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as its input data terminal 1 and input data terminal 2, and its two output data terminals with a bit width of 32 bits are respectively referred to as its output data terminal 1 and output data terminal 2; the input data output of the read-only memory The channel is connected to the input data terminal one of the cross-interchange module, the weight data output channel of the read-only memory is connected to the input data terminal two of the cross-interchange module, the reset terminal of the read-only memory, the reset terminal of the counter, the reset terminal of the comparator and the reset terminal of the cross-interchange module are connected, and the connection terminal thereof serves as the reset port of the data transmission protection circuit, which is used to access the external reset signal to restore the data transmission protection circuit to the initial state; the count input terminal of the counter is connected to the count output terminal of the comparator, the count output terminal of the counter is connected to the count input terminal of the comparator, the clock terminal of the counter is connected to the clock terminal of the comparator, and the connection terminal thereof serves as the clock terminal outside the data transmission protection circuit, which is used to access the clock signal; the switching output terminal of the comparator is connected to the switching input terminal of the cross-interchange module, the output data terminal one of the cross-interchange module serves as the data output terminal one of the data transmission protection circuit, and the output data terminal two of the cross-interchange module serves as the data output terminal two of the data transmission protection circuit.

[0018] In this embodiment, when the data transmission protection circuit is in the initial state, the cross-interchange module is in the "non-exchange" state, the initial count value of the counter is 0, and when the input data output channel of the read-only memory starts to output the input data of the medical neural network chip to the input data terminal 1 of the cross-interchange module, and the weight data output channel of the read-only memory starts to output the weight data of the medical neural network chip to the input data terminal 2 of the cross-interchange module, the data transmission protection circuit enters the working state and starts to work periodically. In each working cycle, the data transmission protection circuit is first in the "non-exchange" stage and then in the "exchange" stage. When the data transmission protection circuit is in the "non-exchange" stage, the cross-interchange module is in the "non-exchange" state. When entering the "non-exchange" stage, the counter starts counting, and when the input data output channel of the read-only memory outputs the input data of the medical neural network chip to the input data terminal 1 of the cross-interchange module for the tth time in the current working cycle, and the weight data output channel of the read-only memory outputs the weight data of the medical neural network chip to the input data terminal 2 of the cross-interchange module for the tth time in the current working cycle, if t=1, the current statistical value of the counter is set to 1, and its counting input terminal does not receive the data output by the counting output terminal of the comparator. The counter transmits the current statistical value to the counting input terminal of the comparator through its counting output terminal. At this time, the switching output terminal of the comparator outputs 0 to the switching input terminal of the cross-interchange module; the output data terminal 1 of the cross-interchange module transmits the current input to its The data of input data terminal one is output, and the output data terminal two outputs the data currently input to its input data terminal two. If t is greater than 1 and less than 1000, the current statistical value of the counter is increased by 1 as the real-time statistical value, and the real-time statistical value is used to update its current statistical value, and the counting input terminal of the counter can receive the data output by the counting output terminal of the comparator. The counter transmits the current statistical value to the counting input terminal of the comparator through its counting output terminal. At this time, the switching output terminal of the comparator outputs 0 to the switching input terminal of the cross-interchange module, and the counting output terminal of the comparator outputs the current statistical value to the counting input terminal of the counter. The counter maintains its current statistical value, and the output data terminal one of the cross-interchange module outputs the data currently input to its input data terminal one, and the output data terminal The second outputs the data currently input to its input data terminal two; if t is equal to 1000, the current statistical value of the counter is added by 1 as the real-time statistical value, and the real-time statistical value is used to update its current statistical value, and the counting input terminal of the counter can receive the data output by the counting output terminal of the comparator, and the counter transmits the current statistical value to the counting input terminal of the comparator through its counting output terminal. At this time, the switching output terminal of the comparator outputs 0 to the switching input terminal of the cross-interchange module, and the counting output terminal of the comparator outputs the current statistical value to the counting input terminal of the counter, and the counter sets its current statistical value to 0, and the output data terminal one of the cross-interchange module outputs the data currently input to its input data terminal one, and the output data terminal two outputs the data currently input to its input data terminal two;If t is greater than or equal to 1001 and less than 2000, the data transmission protection circuit enters the "exchange" stage, the current statistical value of the counter is added by 1 as the real-time statistical value, and the real-time statistical value is used to update its current statistical value, and the counting input end of the counter can receive the data output by the counting output end of the comparator, and the counter transmits the current statistical value to the counting input end of the comparator through its counting output end. At this time, the switching output end of the comparator outputs 1 to the switching input end of the cross-interchange module, and the cross-interchange module switches to the "exchange" state, and the counting output end of the comparator outputs the current statistical value to the counting input end of the counter, and the counter keeps its current statistical value unchanged, and the output data end one of the cross-interchange module outputs the data currently input to its input data end two, and the output data end two outputs the data currently input to the comparator. The data terminal 2 outputs the data currently input to its input data terminal 1; if t is equal to 2000, the current statistical value of the counter is added by 1 as the real-time statistical value, and the real-time statistical value is used to update its current statistical value, and the counting input terminal of the counter can receive the data output by the counting output terminal of the comparator, and the counter transmits the current statistical value to the counting input terminal of the comparator through its counting output terminal. At this time, the switching output terminal of the comparator outputs 1 to the switching input terminal of the cross-interchange module, and the counting output terminal of the comparator outputs the current statistical value to the counting input terminal of the counter, and the counter sets its current statistical value to 0, and the output data terminal 1 of the cross-interchange module outputs the data currently input to its input data terminal 1, and the output data terminal 2 outputs the data currently input to its input data terminal 2. ;

[0019] Embodiment 3: This embodiment is basically the same as Embodiment 2, except that: in this embodiment, Figure 2As shown, the cross-exchange module includes four data selectors, which are respectively referred to as data selector 1, data selector 2, data selector 3 and data selector 4. Data selector 1 has 1 switching input terminal, two input data terminals with a bit width of 32 bits and 1 output data terminal with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as input data terminal 1 and input data terminal 2; data selector 2 has 1 reset terminal, 1 input data terminal with a bit width of 32 bits, 1 The data selector 3 has a switching input terminal, two input data terminals with a bit width of 32 bits, and an output data terminal with a bit width of 32 bits. The two input data terminals with a bit width of 32 bits are respectively referred to as input data terminal 1 and input data terminal 2; the data selector 4 has a reset terminal, a 32-bit input data terminal, a 32-bit low-level input terminal, and a 32-bit output data terminal. ; The output data end of data selector one is connected to the input data end of data selector two, the switching input end of data selector one is connected to the switching input end of data selector three, and its connection end serves as the switching input end of the cross-interchange module, the input data end one of data selector one is connected to the input data end one of data selector three, and its connection end serves as the input data end one of the cross-interchange module, the input data end two of data selector one is connected to the input data end two of data selector three, and its connection end serves as the input data end two of the cross-interchange module; the low level input end of data selector two is connected to the low level input end of data selector four and is connected to a 32-bit low level, the reset end of data selector two is connected to the reset end of data selector four, and its connection end serves as the reset end of the cross-interchange module, the output data end of data selector two serves as the output data end one of the cross-interchange module; the output data end of data selector three is connected to the input data end of data selector four; the output data end of data selector four is the output data end two of the cross-interchange module.

[0020] In the cross-interchange module of this embodiment, when the switching input terminal of data selector 1 is connected to signal 0, its output data terminal outputs the data connected to its input data terminal 2 at this time, and when the switching input terminal of data selector 1 is connected to signal 1, its output data terminal outputs the data connected to its input data terminal 1 at this time; when the reset terminal of data selector 2 is connected to signal 0, its output data terminal outputs the data connected to its low-level input terminal, and when the reset terminal of data selector 2 is connected to signal 1, its output data terminal outputs the data connected to its input data terminal at this time; when the switching input terminal of data selector 3 is connected to signal 0, its output data terminal outputs the data connected to its input data terminal 2 at this time, and when the switching input terminal of data selector 3 is connected to signal 1, its output data terminal outputs the data connected to its input data terminal 1 at this time; when the reset terminal of data selector 4 is connected to signal 0, its output data terminal outputs the data connected to its low-level input terminal, and when the reset terminal of data selector 4 is connected to signal 1, its output data terminal outputs the data connected to its input data terminal at this time.

[0021] In order to verify the performance of the transmission protection circuit of the medical neural network chip of the present invention, the transmission protection circuit of the medical neural network chip of the present invention is modeled on an Intel Core i5-12400 CPU with a 2.3GHz processor, and EDA tools (such as VCS, ModelSim, design compiler, IC compiler, Virtuoso layout editor IC5141) are used to simulate and verify the transmission protection circuit of the medical neural network chip of the present invention. The transmission protection circuit of the medical neural network chip of the present invention is applied to the medical neural network chip disclosed in the document "An efficient ANN SoC for detecting Alzheimer's disease based on recurrent computing", and its resource consumption is analyzed, wherein the area overhead of the transmission protection circuit of the medical neural network chip of the present invention is as follows: Figure 3 As shown, the power consumption is Figure 4 Analysis Figure 3 and Figure 4 It can be seen that the hardware overhead of the medical neural network chip using the transmission protection circuit of the medical neural network chip of the present invention only increases by 2.5%, and the power consumption overhead only increases by 3.61%.

[0022] The CNN model generated by training with the TensorFlow database of Python 3.9 is used to attack the medical neural network chip disclosed in the document "Anefficient ANN SoC for detecting Alzheimer's disease based on recurrent computing" and the medical neural network chip after using the transmission protection circuit of the medical neural network chip of the present invention. The comparison diagram is as follows: Figure 5 Analysis Figure 5 It can be seen that before the medical neural network chip uses the transmission protection circuit of the medical neural network chip of the present invention, 86.12% of the protected data in the medical neural network chip can be obtained through attacks, while after using the transmission protection circuit of the medical neural network chip of the present invention, only 8.4% of the protected data in the medical neural network chip can be obtained through attacks. It can be seen that the transmission protection circuit of the medical neural network chip of the present invention greatly improves the security of the medical neural network chip.

[0023] To sum up, by deploying the transmission protection circuit of the medical neural network chip of the present invention at the device end (at the medical neural network chip), data monitoring can be effectively prevented while only a small amount of hardware needs to be added at the device end, without adding additional hardware overhead at the server end.

Claims

1. A transmission protection circuit for a medical neural network chip, characterized in that The invention comprises a read-only memory, a counter, a comparator and a cross-interchange module. The read-only memory is used to store all input data and all weight data of the medical neural network chip, and outputs one input data and one weight data of the medical neural network chip to the cross-interchange module each time according to a preset order; the cross-interchange module has two states, namely, an "exchange" state and a "non-exchange" state. The cross-interchange module is used to switch between the "exchange" state and the "non-exchange" state under the control of the comparator, and the initial state of the cross-interchange module is the "non-exchange" state; when the cross-interchange module receives one input data and one weight data outputted to it by the read-only memory, if it is in the "exchange" state, the input data and weight data currently received are exchanged and then outputted to complete one round of output work; if it is in the "non-exchange" state, the input data and weight data currently received are directly outputted to complete one round of output work; the counter is used to perform real-time statistics on the output work rounds of the cross-interchange module, obtain the real-time statistical value as the current statistical value for storage, and output the current statistical value to the comparator, and the initial statistical value of the counter is 0; the comparator The comparator is used to generate two control signals according to the current statistical value outputted by the counter, wherein the first control signal is outputted to the counter to control whether the counter is cleared, and the second control signal is outputted to the cross exchange module to control whether the cross exchange module switches between the "exchange" state and the "non-exchange" state; when the current statistical value outputted by the counter is 1000, the first control signal outputted by the comparator controls the counter to set the current statistical value stored therein to 0, at which time the counter starts to count the output working rounds of the cross exchange module again from 0, and the second control signal controls the cross exchange module to switch between the "exchange" state and the "non-exchange" state once, at which time if the cross exchange module is in the "exchange" state, it switches to the "non-exchange" state, and if the cross exchange module is in the "non-exchange" state, it switches to the "exchange" state; when the current statistical value outputted by the counter is less than 1000, the first signal outputted by the comparator controls the counter to continue counting based on the current statistical value stored therein, and the second control signal controls the cross exchange module to keep its current state unchanged.

2. A transmission protection circuit for a medical neural network chip according to claim 1, characterized in that The read-only memory has a reset terminal, a 32-bit input data output channel and a 32-bit weight data output channel; the counter has a clock terminal, a reset terminal, a 10-bit counting input terminal and a 10-bit counting output terminal; the comparator has a clock terminal, a reset terminal, a 10-bit counting input terminal, a 10-bit counting output terminal and a switching output terminal; the cross-interchange module has a switching input terminal, a reset terminal, two 32-bit input data terminals and two 32-bit output data terminals, and its two 32-bit input data terminals are They are respectively called their input data terminal one and input data terminal two, and their two output data terminals with a bit width of 32 bits are respectively called their output data terminal one and output data terminal two; the input data output channel of the read-only memory is connected to the input data terminal one of the cross-interchange module, the weight data output channel of the read-only memory is connected to the input data terminal two of the cross-interchange module, the reset end of the read-only memory, the reset end of the counter, the reset end of the comparator and the reset end of the cross-interchange module are connected, and their connection ends serve as the reset port of the data transmission protection circuit, which is used to access an external reset signal to restore the data transmission protection circuit to an initial state; The counting input end of the counter is connected to the counting output end of the comparator, the counting output end of the counter is connected to the counting input end of the comparator, the clock end of the counter is connected to the clock end of the comparator, and its connection end serves as the clock end outside the data transmission protection circuit for accessing the clock signal; the switching output end of the comparator is connected to the switching input end of the cross-interchange module, the output data end 1 of the cross-interchange module serves as the data output end 1 of the data transmission protection circuit, and the output data end 2 of the cross-interchange module serves as the data output end 2 of the data transmission protection circuit.

3. A transmission protection circuit for a medical neural network chip according to claim 2, characterized in that The cross-exchange module includes four data selectors, which are respectively referred to as data selector 1, data selector 2, data selector 3 and data selector 4. The data selector 1 has a switching input terminal, two input data terminals with a bit width of 32 bits and an output data terminal with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as input data terminal 1 and input data terminal 2; the data selector 2 has a reset terminal, a 32-bit input data terminal, a 32-bit low-level input terminal and an output data terminal with a bit width of 32 bits; the data selector three has a switching input terminal, two input data terminals with a bit width of 32 bits and an output data terminal with a bit width of 32 bits, and its two input data terminals with a bit width of 32 bits are respectively referred to as its input data terminal one and input data terminal two; the data selector four has a reset terminal, a 32-bit input data terminal, a 32-bit low-level input terminal and a 32-bit output data terminal; the output data terminal of the data selector one is connected to the output data terminal of the data selector two The input data end is connected, the switching input end of the data selector one is connected to the switching input end of the data selector three, and its connection end serves as the switching input end of the cross-interchange module, the input data end one of the data selector one is connected to the input data end one of the data selector three, and its connection end serves as the input data end one of the cross-interchange module, the input data end two of the data selector one is connected to the input data end two of the data selector three, and its connection end serves as the input data end two of the cross-interchange module; the low level input end of the data selector two is connected to the low level input end of the data selector four and is connected to a 32-bit low level, the reset end of the data selector two is connected to the reset end of the data selector four, and its connection end serves as the reset end of the cross-interchange module, the output data end of the data selector two serves as the output data end one of the cross-interchange module; the output data end of the data selector three is connected to the input data end of the data selector four; the output data end of the data selector four is the output data end two of the cross-interchange module.

Citation Information

Patent Citations

  • A privacy-preserving deep neural network inference method

    CN114003961B

  • A privacy-preserving neural network prediction method and system

    CN116663064B

  • Efficient Hash calculation unit for Kyber algorithm

    CN117454996A

  • MCU chip based on RISC-V kernel control and system thereof

    CN118132502A

  • Neural network dedicated memory calculation reading device and control method thereof

    CN118569332A