Data interaction method, apparatus and system, and electronic device and storage medium
Abstract
A data interaction method, apparatus and system, an electronic device, and a storage medium are disclosed. The method includes: obtaining, in response to a parameter writing operation signal, a first parameter and storing the first parameter in a downlink buffer; acquiring a second parameter from the downlink buffer and transmitting the second parameter to a data processing circuit unit, for the data processing circuit unit to process data based on the second parameter so as to obtain output data; storing the output data in an uplink buffer; recording the quantity of output data stored in the uplink buffer, and transmitting, when the quantity of the output data stored in the uplink buffer reaches an output quantity threshold, storage state information of the uplink buffer; and outputting the output data stored in the uplink buffer in bulk in response to a data reading operation instruction.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1 . A data interaction method, comprising:
obtaining, in response to receiving a parameter writing operation signal transmitted by a central processing unit, a first parameter from the central processing unit and storing the first parameter in a downlink buffer; acquiring a second parameter from the downlink buffer and transmitting the second parameter to a data processing circuit unit, the second parameter being the first parameter; processing data, by the data processing circuit unit, based on the second parameter to obtain output data corresponding to the second parameter, wherein processing the data comprises: compressing frame data to obtain image compression data and state information of the data processing circuit unit obtained during compressing the frame data; storing, by the data processing circuit unit, the output data corresponding to the second parameter in an uplink buffer; recording a quantity of output data stored in the uplink buffer; transmitting, in response to that the quantity of the output data stored in the uplink buffer reaches an output quantity threshold, storage state information of the uplink buffer to trigger a data reading operation instruction, wherein the storage state information of the uplink buffer indicates that the uplink buffer is not capable of continuing to store subsequent new output data; outputting all of the output data stored in the uplink buffer at one time to the central processing unit in response to the data reading operation instruction; and determining, by the central processing unit, a fifth parameter to be configured to the data processing circuit unit according to the output data.
2 . The data interaction method according to claim 1 , further comprising:
recording a quantity of parameters stored in the downlink buffer; deleting the second parameter from the downlink buffer after acquiring the second parameter from the downlink buffer and transmitting the second parameter to the data processing circuit unit; transmitting first downlink storage state information in response to that the quantity of the parameters stored in the downlink buffer is increased from being smaller than an input quantity upper limit threshold to being greater than or equal to the input quantity upper limit threshold, wherein the first downlink storage state information indicates that the downlink buffer is not capable of continuing to store subsequent new parameters, and controls the central processing unit to stop transmitting the parameter writing operation signal so as to suspend parameter distributing; and transmitting second downlink storage state information in response to that the quantity of the parameters stored in the downlink buffer is decreased from being greater than an input quantity lower limit threshold to being less than or equal to the input quantity lower limit threshold, wherein the second downlink storage state information indicates that the downlink buffer is capable of continuing to store subsequent new parameters, and controls the central processing unit to resume transmitting the parameter writing operation signal so as to resume parameter distributing.
3 . The data interaction method according to claim 1 , wherein the obtaining, in response to a parameter writing operation signal transmitted by a central processing unit, a first parameter and storing the first parameter in a downlink buffer comprises:
obtaining the first parameter in response to the parameter writing operation signal; converting the parameter writing operation signal into an electrical writing signal of writing to the downlink buffer, wherein the parameter writing operation signal is based on a bus protocol; and storing the first parameter in the downlink buffer based on the electrical writing signal.
4 . The data interaction method according to claim 1 , wherein
the downlink buffer is in a first input first output (FIFO) queue or a static random-access memory (SRAM).
5 . The data interaction method according to claim 1 , wherein the acquiring a second parameter from the downlink buffer and transmitting the second parameter to a data processing circuit unit comprises:
acquiring the second parameter from the downlink buffer, storing the second parameter in a ping-pong buffer, acquiring the second parameter from the ping-pong buffer, and transmitting the second parameter to the data processing circuit unit.
6 . The data interaction method according to claim 5 , wherein
the ping-pong buffer comprises two cache regions: a first cache region and a second cache region, the first cache region and the second cache region being configured to store parameters obtained from the downlink buffer respectively, the parameters stored in the first cache region being different from the parameters stored in the second cache region; the acquiring the second parameter from the downlink buffer and storing the second parameter in a ping-pong buffer, acquiring the second parameter from the ping-pong buffer, and transmitting the second parameter to the data processing circuit unit, comprises: acquiring the second parameter from the downlink buffer and storing the second parameter in the first cache region, in response to that the first cache region has not stored any parameters and in response to that the downlink buffer stores the second parameter; otherwise, acquiring the second parameter from the downlink buffer and storing the second parameter in the second cache region, in response to that the second cache region has not stored any parameters and in response to that the downlink buffer stores the second parameter; and acquiring the second parameter from the first cache region or acquiring the second parameter from the second cache region, and transmitting the second parameter to the data processing circuit unit.
7 . The data interaction method according to claim 6 , further comprising:
acquiring, in response to that the data processing circuit unit fails to process the data based on the second parameter acquired from the first cache region, the second parameter from the first cache region again and transmitting the second parameter to the data processing circuit unit; deleting, in response to that the data processing circuit unit successfully processes the data based on the second parameter acquired from the first cache region, the second parameter in the first cache region from the first cache region, acquiring a third parameter currently stored in the second cache region, and transmitting the third parameter to the data processing circuit unit; acquiring, in response to that the data processing circuit unit fails to process the data based on the second parameter acquired from the second cache region, the second parameter from the second cache region again and transmitting the second parameter to the data processing circuit unit; and deleting, in response to that the data processing circuit unit successfully processes the data based on the second parameter acquired from the second cache region, the second parameter in the second cache region from the second cache region, acquiring a fourth parameter currently stored in the first cache region, and transmitting the fourth parameter to the data processing circuit unit.
8 . The data interaction method according to claim 1 , wherein the outputting all of the output data stored in the uplink buffer at one time to the central processing unit in response to the data reading operation instruction comprises:
reading all of the output data from the uplink buffer at one time in response to the data reading operation instruction; and converting the output data read from the uplink buffer into a signal based on a bus protocol, and transmitting the signal through a bus.
9 . An electronic device, comprising:
a processor; and a memory configured to store executable instructions of the processor, wherein the processor is configured to execute the executable instructions to perform the following operations: obtaining, in response to receiving a parameter writing operation signal transmitted by a central processing unit, a first parameter from the central processing unit and storing the first parameter in a downlink buffer; acquiring a second parameter from the downlink buffer and transmitting the second parameter to a data processing circuit unit, for the data processing circuit unit to process data based on the second parameter to obtain output data corresponding to the second parameter, the second parameter being the first parameter, wherein processing the data comprises: compressing frame data to obtain image compression data and state information of the data processing circuit unit obtained during compressing the frame data; storing the output data corresponding to the second parameter in an uplink buffer; recording a quantity of output data stored in the uplink buffer; transmitting, in response to that the quantity of the output data stored in the uplink buffer reaches an output quantity threshold, storage state information of the uplink buffer to trigger a data reading operation instruction, wherein the storage state information of the uplink buffer indicates that the uplink buffer is not capable of continuing to store subsequent new output data; and outputting all of the output data stored in the uplink buffer at one time to the central processing unit in response to the data reading operation instruction, for the central processing unit to determine a fifth parameter to be configured to the data processing circuit unit according to the output data.
10 . The electronic device according to claim 9 , wherein the processor is further configured to execute the executable instructions to perform the following operations:
recording a quantity of parameters stored in the downlink buffer; deleting the second parameter from the downlink buffer after acquiring the second parameter from the downlink buffer and transmitting the second parameter to the data processing circuit unit; transmitting first downlink storage state information in response to that the quantity of the parameters stored in the downlink buffer is increased from being smaller than an input quantity upper limit threshold to being greater than or equal to the input quantity upper limit threshold, wherein the first downlink storage state information indicates that the downlink buffer is not capable of continuing to store subsequent new parameters, and controls the central processing unit to stop transmitting the parameter writing operation signal so as to suspend parameter distributing; and transmitting second downlink storage state information in response to that the quantity of the parameters stored in the downlink buffer is decreased from being greater than an input quantity lower limit threshold to being less than or equal to the input quantity lower limit threshold, wherein the second downlink storage state information indicates that the downlink buffer is capable of continuing to store subsequent new parameters, and controls the central processing unit to resume transmitting the parameter writing operation signal so as to resume parameter distributing.
11 . The electronic device according to claim 9 , wherein the processor is further configured to execute the executable instructions to perform the following operations:
obtaining the first parameter in response to the parameter writing operation signal; converting the parameter writing operation signal into an electrical writing signal of writing to the downlink buffer, wherein the parameter writing operation signal is based on a bus protocol; and storing the first parameter in the downlink buffer based on the electrical writing signal.
12 . The electronic device according to claim 9 , wherein
the downlink buffer is in a first input first output (FIFO) queue or a static random-access memory (SRAM).
13 . The electronic device according to claim 9 , wherein the processor is further configured to execute the executable instructions to perform the following operations:
acquiring the second parameter from the downlink buffer, storing the second parameter in a ping-pong buffer, acquiring the second parameter from the ping-pong buffer, and transmitting the second parameter to the data processing circuit unit.
14 . The electronic device according to claim 13 , wherein
the ping-pong buffer comprises two cache regions: a first cache region and a second cache region, the first cache region and the second cache region being configured to store parameters obtained from the downlink buffer respectively, the parameters stored in the first cache region being different from the parameters stored in the second cache region; the acquiring the second parameter from the downlink buffer and storing the second parameter in a ping-pong buffer, acquiring the second parameter from the ping-pong buffer, and transmitting the second parameter to the data processing circuit unit, comprises: acquiring the second parameter from the downlink buffer and storing the second parameter in the first cache region in response to that the first cache region has not stored any parameters and in response to that the downlink buffer stores the second parameter; otherwise, acquiring the second parameter from the downlink buffer and storing the second parameter in the second cache region in response to that the second cache region has not stored any parameters and in response to that the downlink buffer stores the second parameter; and acquiring the second parameter from the first cache region or acquiring the second parameter from the second cache region, and transmitting the second parameter to the data processing circuit unit.
15 . The electronic device according to claim 14 , wherein the processor is further configured to execute the executable instructions to perform the following operations:
acquiring, in response to that the data processing circuit unit fails to process the data based on the second parameter acquired from the first cache region, the second parameter from the first cache region again and transmitting the second parameter to the data processing circuit unit; deleting, in response to that the data processing circuit unit successfully processes the data based on the second parameter acquired from the first cache region, the second parameter in the first cache region from the first cache region, acquiring a third parameter currently stored in the second cache region, and transmitting the third parameter to the data processing circuit unit; acquiring, in response to that the data processing circuit unit fails to process the data based on the second parameter acquired from the second cache region, the second parameter from the second cache region again and transmitting the second parameter to the data processing circuit unit; and deleting, in response to that the data processing circuit unit successfully processes the data based on the second parameter acquired from the second cache region, the second parameter in the second cache region from the second cache region, acquiring a fourth parameter currently stored in the first cache region, and transmitting the fourth parameter to the data processing circuit unit.
16 . The electronic device according to claim 9 , wherein the processor is further configured to execute the executable instructions to perform the following operations:
reading all of the output data from the uplink buffer at one time in response to the data reading operation instruction; and converting the output data read from the uplink buffer into a signal based on a bus protocol, and transmitting the signal through a bus.
17 . A computer-readable storage medium, causing, when at least one instruction in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device to perform the following operations:
obtaining, in response to receiving a parameter writing operation signal transmitted by a central processing unit, a first parameter from the central processing unit and storing the first parameter in a downlink buffer; acquiring a second parameter from the downlink buffer and transmitting the second parameter to a data processing circuit unit, for the data processing circuit unit to process data based on the second parameter to obtain output data corresponding to the second parameter, the second parameter being the first parameter, wherein processing the data comprises: compressing frame data to obtain image compression data and state information of the data processing circuit unit obtained during compressing the frame data; storing the output data corresponding to the second parameter in an uplink buffer; recording a quantity of output data stored in the uplink buffer; transmitting, in response to that the quantity of the output data stored in the uplink buffer reaches an output quantity threshold, storage state information of the uplink buffer to trigger a data reading operation instruction, wherein the storage state information of the uplink buffer indicates that the uplink buffer is not capable of continuing to store subsequent new output data; and outputting all of the output data stored in the uplink buffer at one time to the central processing unit in response to the data reading operation instruction, for the central processing unit to determine a fifth parameter to be configured to the data processing circuit unit according to the output data.
18 . The computer-readable storage medium according to claim 17 , further causing, when the at least one instruction in the computer-readable storage medium is executed by the processor of the electronic device, the electronic device to perform the following operations:
recording a quantity of parameters stored in the downlink buffer; deleting the second parameter from the downlink buffer after acquiring the second parameter from the downlink buffer and transmitting the second parameter to the data processing circuit unit; transmitting first downlink storage state information in response to that the quantity of the parameters stored in the downlink buffer is increased from being smaller than an input quantity upper limit threshold to being greater than or equal to the input quantity upper limit threshold, wherein the first downlink storage state information indicates that the downlink buffer is not capable of continuing to store subsequent new parameters, and controls the central processing unit to stop transmitting the parameter writing operation signal so as to suspend parameter distributing; and transmitting second downlink storage state information in response to that the quantity of the parameters stored in the downlink buffer is decreased from being greater than an input quantity lower limit threshold to being less than or equal to the input quantity lower limit threshold, wherein the second downlink storage state information indicates that the downlink buffer is capable of continuing to store subsequent new parameters, and controls the central processing unit to resume transmitting the parameter writing operation signal so as to resume parameter distributing.
19 . The computer-readable storage medium according to claim 17 , wherein the obtaining, in response to a parameter writing operation signal transmitted by a central processing unit, a first parameter and storing the first parameter in a downlink buffer comprises:
obtaining the first parameter in response to the parameter writing operation signal; converting the parameter writing operation signal into an electrical writing signal of writing to the downlink buffer, wherein the parameter writing operation signal is based on a bus protocol; and storing the first parameter in the downlink buffer based on the electrical writing signal.
20 . The computer-readable storage medium according to claim 17 , wherein
the downlink buffer is in a first input first output (FIFO) queue or a static random-access memory (SRAM).Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.