Inclination angle detection method and system based on storage and calculation array, terminal and storage medium

By directly completing data calibration and calculation in the memory array, the high power consumption and low efficiency problems caused by data transfer in sensor data calibration and inclination calculation are solved, and the system power consumption is reduced and the calculation speed is improved.

CN119533408APending Publication Date: 2025-02-28XIDIAN UNIV HANGZHOU RES INST
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510092726.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art requires frequent transfer of data between memory and calculation units during sensor data calibration and inclination calculation, resulting in significant increase in system power consumption and reduced computing efficiency.

Method used

By using the inclination detection method based on the arithmetic array, by obtaining the pre-constructed calibration arithmetic array, the calculation parameters stored by each calculation unit in the arithmetic array are determined by the correction weight matrix and the compensation value sequence obtained by the calibration correction formula of the three-axis acceleration, and the data calibration and calculation are directly completed in the arithmetic array.

Benefits of technology

It effectively reduces data transfer overhead, reduces system power consumption, and improves computing speed and energy efficiency ratio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119533408A_ABST
    Figure CN119533408A_ABST
Patent Text Reader

Abstract

The invention discloses an inclination angle detection method and system based on a storage and calculation array, a terminal and a storage medium, and relates to the technical field of digital circuits. Firstly, a pre-constructed calibration storage array is obtained, and a method for determining calculation parameters stored in all calculation units in the calibration storage array comprises the steps that a correction weight matrix and a compensation value sequence are obtained through a calibration correction formula, and the calculation parameters stored in all the calculation units are determined according to the correction weight matrix and the compensation value sequence; the calculation parameter is a weight value or a compensation value. And inputting the three-axis acceleration original data into the calibration storage array to obtain three-axis acceleration calibration data. And finally, carrying out inclination angle detection according to the three-axis acceleration calibration data. Complicated data calibration tasks in the inclination angle detection process are mapped to the storage and calculation array to be executed, the characteristic of deep integration of storage and calculation in the storage and calculation integrated technology is utilized, the data migration overhead is effectively reduced, and therefore system power consumption is reduced, and the calculation speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital circuit technology, and in particular to a tilt detection method, system, terminal and storage medium based on a storage and computing array. Background Art

[0002] Inclination detection technology has been widely used in many fields, such as smart phones, industrial automation, and vehicle navigation. Traditional inclination detection mainly relies on inertial sensors, such as three-axis accelerometers. The raw data of three-axis acceleration is usually affected by zero bias error, sensitivity mismatch and other problems, and complex calibration correction calculations are required to improve the accuracy of the data.

[0003] Traditional processor architectures need to frequently move data between the memory and the computing unit when implementing sensor data calibration and tilt angle calculation: transferring raw data from the memory to the computing unit, and then writing the results back to the memory after the calculation is completed. This results in a significant increase in system power consumption and a decrease in computing efficiency.

[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, an inclination detection method, system, terminal and storage medium based on a storage and computing array are provided, aiming to solve the problem in the prior art that when realizing sensor data calibration and inclination calculation, data needs to be frequently moved between the memory and the computing unit, resulting in a significant increase in system power consumption and a decrease in computing efficiency.

[0006] The technical solution adopted by the present invention to solve the problem is as follows: In a first aspect, an embodiment of the present invention provides a tilt detection method based on a storage and computing array, the method comprising: A pre-constructed calibration storage array is obtained, wherein the calibration storage array includes a plurality of calculation units storing calculation parameters; a method for determining the calculation parameters stored in each of the calculation units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula of three-axis acceleration, wherein each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; and determining the calculation parameters respectively stored in each of the calculation units according to the correction weight matrix and the compensation value series, wherein the calculation parameters are weight values ​​or compensation values; Acquire the original data of the three-axis acceleration of the target object, input the original data of the three-axis acceleration into the calibration storage array, and obtain the three-axis acceleration calibration data; The target object is subjected to inclination detection according to the three-axis acceleration calibration data.

[0007] In one embodiment, determining the calculation parameters stored in each of the calculation units respectively according to the modified weight matrix and the compensation value series includes: The computing units except the last row in the calibration storage array are used as first computing units, and the computing units in the last row are used as second computing units; Determining the calculation parameters respectively stored in each of the first calculation units according to the modified weight matrix, wherein the calculation parameters stored in the first calculation unit are weight values; The calculation parameters respectively stored in each of the second calculation units are determined according to the compensation value series, and the calculation parameters stored in the second calculation units are compensation values.

[0008] In one implementation, the calculation parameters stored in each of the first calculation units are determined according to the modified weight matrix, and the calculation parameters stored in the first calculation unit are weight values, including: For each row of the first calculation units, determine the column numbers with the same values ​​in the modified weight matrix according to the row number of the row; According to the principle of sequence bit correspondence, the weight values ​​respectively stored in each of the first calculation units in the row are determined according to a column of weight values ​​corresponding to the column sequence number.

[0009] In one embodiment, the calculation parameters stored in each of the second calculation units are determined according to the compensation value series, and the calculation parameters stored in the second calculation units are compensation values, including: For each of the second calculation units, the compensation value stored in the second calculation unit is determined according to the compensation value in the compensation value sequence having the same sequence as that of the second calculation unit.

[0010] In one implementation, the three-axis acceleration raw data is input into the calibration storage array to obtain the three-axis acceleration calibration data, including: Inputting the acceleration data in each direction of the three-axis acceleration raw data into different rows of the calibration storage array respectively, so that the acceleration data received by each first calculation unit in the same row is the same, and each second calculation unit receives a preset fixed value; Each of the first calculation units calculates a product based on the received acceleration data and the weight value stored in the first calculation unit; Each of the second calculation units calculates a product according to the received fixed value and the compensation value stored in the second calculation unit; Calculate the acceleration calibration data corresponding to each column according to the product calculated by each of the calculation units in the column; The three-axis acceleration calibration data is obtained according to the acceleration calibration data corresponding to each column.

[0011] In one embodiment, the calibration storage and calculation array further includes a processing unit; and calculating the acceleration calibration data corresponding to each column according to the product calculated by each of the calculation units in the column, including: Inputting the product calculated by each of the calculation units in each column into the processing unit; The processing unit performs addition and subtraction operations according to the products calculated by the calculation units in each column to obtain the acceleration calibration data corresponding to the column.

[0012] In one implementation, performing inclination detection on the target object according to the three-axis acceleration calibration data includes: Calculating the pitch angle and the roll angle according to the three-axis acceleration calibration data; An inclination detection result of the target object is generated according to the pitch angle and the roll angle.

[0013] In a second aspect, an embodiment of the present invention further provides a tilt detection system based on a storage and computing array, the system comprising: A sensor module is used to obtain the original data of the three-axis acceleration of the target object; A main control chip, used to input the three-axis acceleration raw data into a storage and computing integrated chip; The storage and computing integrated chip includes a pre-built calibration storage and computing array, which is used to output three-axis acceleration calibration data according to the three-axis acceleration raw data; the calibration storage and computing array includes a plurality of computing units storing computing parameters; a method for determining the computing parameters stored in each of the computing units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula for three-axis acceleration, wherein each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; and determining the computing parameters stored in each of the computing units according to the correction weight matrix and the compensation value series, wherein the computing parameters are weight values ​​or compensation values; The main control chip is also used to detect the inclination of the target object according to the three-axis acceleration calibration data.

[0014] In a third aspect, an embodiment of the present invention further provides a terminal, comprising a memory and one or more processors; the memory stores one or more programs; the program comprises instructions for executing any of the above-described inclination detection methods based on storage and computing arrays; and the processor is used to execute the program.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a plurality of instructions are stored, wherein the instructions are suitable for being loaded and executed by a processor to implement the steps of any of the above-described methods for detecting inclination angles based on a storage and computing array.

[0016] Beneficial effects of the present invention: The embodiment of the present invention first obtains a pre-built calibration storage array, and the method for determining the calculation parameters stored in each calculation unit in the calibration storage array includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula, and determining the calculation parameters stored in each calculation unit according to the correction weight matrix and the compensation value series, and the calculation parameters are weight values ​​or compensation values. Then the three-axis acceleration original data is input into the calibration storage array to obtain the three-axis acceleration calibration data. Finally, the inclination detection is performed according to the three-axis acceleration calibration data. The present invention maps the complex data calibration tasks in the inclination detection process to the storage array for execution, and utilizes the characteristics of deep fusion of storage and calculation in the storage and calculation integrated technology to effectively reduce the data movement overhead, thereby achieving a reduction in system power consumption and an increase in calculation speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] 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 some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flowchart of a tilt detection method based on a storage and computing array provided in an embodiment of the present invention.

[0019] Figure 2 It is a block diagram of calibration storage and calculation array data mapping provided by an embodiment of the present invention.

[0020] Figure 3 It is a schematic diagram of a continuous tilt detection process provided by an embodiment of the present invention.

[0021] Figure 4 It is a hardware block diagram of the inclination detection system based on the storage and computing array provided in an embodiment of the present invention.

[0022] Figure 5 It is a principle block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The present invention discloses a tilt detection method, system, terminal and storage medium based on a storage and computing array. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0024] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0025] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0026] In view of the above-mentioned defects of the prior art, the present invention provides a tilt detection method based on a storage and calculation array, the method obtains a pre-constructed calibration storage and calculation array, the calibration storage and calculation array includes a number of calculation units storing calculation parameters; the method for determining the calculation parameters stored in each of the calculation units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula of three-axis acceleration, each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; according to the correction weight matrix and the compensation value series, determining the calculation parameters stored in each of the calculation units, the calculation parameters are weight values ​​or compensation values; obtaining the original data of the three-axis acceleration of the target object, inputting the original data of the three-axis acceleration into the calibration storage and calculation array, and obtaining the three-axis acceleration calibration data; performing tilt detection on the target object according to the three-axis acceleration calibration data. The present invention maps the complex data calibration task in the tilt detection process to the storage and calculation array for execution, and utilizes the characteristics of deep fusion of storage and calculation in the storage and calculation integrated technology to effectively reduce the data movement overhead, thereby achieving a reduction in system power consumption and an increase in calculation speed.

[0027] like Figure 1 As shown, the method specifically comprises the following steps: Step S100, obtaining a pre-constructed calibration storage array, the calibration storage array comprising a plurality of computing units storing computing parameters; a method for determining the computing parameters stored in each of the computing units comprising: obtaining a correction weight matrix and a compensation value series through a calibration correction formula for three-axis acceleration, each row of weight values ​​in the correction weight matrix having a corresponding relationship with a compensation value in the compensation value series; determining the computing parameters respectively stored in each of the computing units according to the correction weight matrix and the compensation value series, the computing parameters being weight values ​​or compensation values.

[0028] Specifically, the storage and computing array can also be called a storage and computing integrated array. The storage and computing array integrates data storage and data computing functions, and can directly complete operations such as multiplication and addition in one processing unit, fundamentally reducing the cost of data movement. With the help of this feature of the storage and computing array, this embodiment maps the data calibration task to the storage and computing array for execution, significantly reducing system power consumption and improving data computing efficiency. In addition, the non-volatile storage and computing array can also achieve power-off without data loss, avoiding the data movement process of reloading after power-on, so that the system also reduces the corresponding hardware overhead and time delay during power-on and power-off.

[0029] The core step of the inclination detection method based on the storage and calculation array is to perform error calibration correction on the three-axis acceleration raw data collected by the sensor. The error calibration correction is mainly achieved through a preset calibration correction formula. The calibration correction formula is mainly composed of a correction weight matrix and a compensation value series. The correction weight matrix is ​​composed of multiple weight values ​​arranged in an array, and the compensation value series is composed of multiple compensation values. Each weight value in the correction weight matrix and each compensation value in the compensation value series are pre-stored in a block manner in the calculation unit of the storage and calculation array, thereby obtaining the calibration storage and calculation array used to perform data correction in this embodiment.

[0030] For example, the calibration correction formula is expressed as: , formula (1); Among them, x, y, and z are the original acceleration data of the three axes; , , It is the three-axis acceleration calibration data; is composed of a variety of error factors ( , , The correction weight matrix is ​​composed of the sensor installation error, non-orthogonal error and scale factor error, etc. It is a series of compensation values ​​used to eliminate zero bias errors during calibration, including multiple compensation values ​​( , , ). In the calibration correction calculation, the correction weight matrix And compensation value series is fixed, and can be used to store and calculate , Long-term storage in the array, thus obtaining a calibration storage array. Figure 2 As shown, the calibration storage array includes a plurality of computing units arranged in an array. The computing unit may also be referred to as an array unit, and each computing unit stores different computing parameters, and the computing parameter stored in each computing unit is a weight value or a compensation value.

[0031] In one implementation, determining the calculation parameters stored in each of the calculation units respectively according to the modified weight matrix and the compensation value series includes: The computing units except the last row in the calibration storage array are used as first computing units, and the computing units in the last row are used as second computing units; Determining the calculation parameters respectively stored in each of the first calculation units according to the modified weight matrix, wherein the calculation parameters stored in the first calculation unit are weight values; The calculation parameters respectively stored in each of the second calculation units are determined according to the compensation value series, and the calculation parameters stored in the second calculation units are compensation values.

[0032] Specifically, according to the type of stored calculation parameters, this embodiment divides the calculation units into two categories, one is a first calculation unit for storing weight values, and the other is a second calculation unit for storing compensation values. The first calculation units are distributed in each row of the calibration storage array except the last row, and the second calculation units are distributed in the last row of the calibration storage array. The number of weight values ​​in the first calculation units and the correction weight matrix in the calibration storage array is the same. According to the preset corresponding relationship, the weight values ​​in the correction weight matrix are mapped one by one and stored in each first calculation unit. The number of compensation values ​​in the second calculation units and the compensation value series in the calibration storage array is the same. According to the preset corresponding relationship, the compensation values ​​in the compensation value series are mapped one by one and stored in each second calculation unit.

[0033] In one implementation, the calculation parameters stored in each of the first calculation units are determined according to the modified weight matrix, and the calculation parameters stored in the first calculation unit are weight values, including: For each row of the first calculation units, determine the column numbers with the same values ​​in the modified weight matrix according to the row number of the row; According to the principle of sequence bit correspondence, the weight values ​​respectively stored in each of the first calculation units in the row are determined according to a column of weight values ​​corresponding to the column sequence number.

[0034] Specifically, this embodiment takes a first calculation unit as an example to illustrate the correspondence between the first calculation unit in the calibration storage array and the weight value in the correction weight matrix. First, determine which row in the calibration storage array the first calculation unit is located in, and obtain the row sequence number of the row. Then, query the column sequence number with the same value in the correction weight matrix according to the row sequence number to obtain a column of weight values. Finally, according to the sequence position of the first calculation unit, query the weight value of the corresponding sequence position in the column of weight values, and the weight value is the weight value stored in the first calculation unit.

[0035] In one implementation, the calculation parameters stored in each of the second calculation units are determined according to the compensation value series, and the calculation parameters stored in the second calculation units are compensation values, including: For each of the second calculation units, the compensation value stored in the second calculation unit is determined according to the compensation value in the compensation value sequence having the same sequence as that of the second calculation unit.

[0036] Specifically, this embodiment takes a second calculation unit as an example to illustrate the correspondence between the second calculation unit in the calibration storage array and the compensation value in the compensation value sequence. First, determine which sequence position of the last row of the calibration storage array the second calculation unit is located in. Then, query the compensation value of the same sequence position in the compensation value sequence, and the compensation value is the compensation value stored in the second calculation unit.

[0037] Step S200, obtaining the original three-axis acceleration data of the target object, inputting the original three-axis acceleration data into the calibration storage array, and obtaining the three-axis acceleration calibration data.

[0038] Specifically, the three-axis acceleration raw data includes acceleration data in different directions, specifically including acceleration data corresponding to the x, y, and z axes respectively. The acceleration data in different directions are dynamically input into the interface, and loaded into the calibration storage array block by block, and calculated with the calculation parameters stored in each calculation unit in the calibration storage array. Furthermore, each acceleration data is determined according to the calibration correction formula. The weight value corresponding to the acceleration data is loaded into the calculation unit where the corresponding weight value is located.

[0039] For example, according to the above formula (1), the weight value corresponding to the acceleration data on the x-axis is , , , then load the acceleration data on the x-axis into , , in the computational unit where it is located.

[0040] In one implementation, the three-axis acceleration raw data is input into the calibration storage array to obtain the three-axis acceleration calibration data, including: Inputting the acceleration data in each direction of the three-axis acceleration raw data into different rows of the calibration storage array respectively, so that the acceleration data received by each first calculation unit in the same row is the same, and each second calculation unit receives a preset fixed value; Each of the first calculation units calculates a product based on the received acceleration data and the weight value stored in the first calculation unit; Each of the second calculation units calculates a product according to the received fixed value and the compensation value stored in the unit; Calculate the acceleration calibration data corresponding to each column according to the product calculated by each of the calculation units in the column; The three-axis acceleration calibration data is obtained according to the acceleration calibration data corresponding to each column.

[0041] After the three-axis acceleration raw data collected by the sensor is input into the calibration storage array, the matrix multiplication and addition operation will be completed directly in the calibration storage array. Specifically, the first calculation unit and the second calculation unit in the calibration storage array correspond to different types of input data, the input data of the first calculation unit is acceleration data, and the input data of the second calculation unit is a preset fixed value, such as 1. The acceleration data in different directions are loaded into the corresponding first calculation unit and calculated with the pre-stored weight value. Among them, the first calculation units in each row correspond to acceleration data in different directions, and the first calculation units in the same row receive the same acceleration data. For example, each first calculation unit on the first row receives the acceleration component on the X-axis, each first calculation unit on the second row receives the acceleration component on the y-axis, and each first calculation unit on the third row receives the acceleration component on the z-axis. The preset fixed value is input into each second calculation unit and calculated with the pre-stored compensation value.

[0042] The calibration storage array in this embodiment has the fusion characteristics of calculation and storage, and can complete complex calibration correction tasks, namely matrix operations and bias compensation, at low energy consumption. The correction weight matrix and compensation value are pre-stored in the calibration storage array, and the matrix multiplication and addition operations are directly performed with the dynamically input acceleration data to obtain the intermediate calculation results, and finally the calibrated three-axis acceleration calibration data is obtained. It can effectively reduce the energy consumption caused by data movement and improve the energy efficiency and hardware reliability of inclination detection.

[0043] In one implementation, the calibration storage and calculation array further includes a processing unit; and calculating the acceleration calibration data corresponding to each column according to the product calculated by each of the calculation units in the column, including: Inputting the product calculated by each of the calculation units in each column into the processing unit; The processing unit performs addition and subtraction operations according to the products calculated by the calculation units in each column to obtain the acceleration calibration data corresponding to the column.

[0044] Specifically, both the calculation unit and the processing unit belong to the calibration storage array. Taking a column of calculation units as an example, in the processing unit, the output data of each first calculation unit for storing weight values ​​will be locally accumulated and subtracted from the output data of the second calculation unit for storing compensation values ​​corresponding to the column to obtain acceleration calibration data in one direction. After the output data of each column of calculation units are processed separately, the three-axis acceleration calibration data is obtained.

[0045] Step S300: performing inclination detection on the target object according to the three-axis acceleration calibration data.

[0046] The three-axis acceleration calibration data can accurately reflect the inclination changes of the target object and ensure the accuracy of the inclination detection results. Specifically, the system will regularly receive the latest three-axis acceleration raw data collected by the sensor and dynamically load it into the calibration storage array. Through the correction weight matrix and compensation value pre-stored in the calibration storage array, the three-axis acceleration raw data is calibrated and corrected in real time, thereby achieving continuous and accurate inclination monitoring of the target object (such as Figure 3 as shown).

[0047] In one implementation, performing inclination detection on the target object according to the three-axis acceleration calibration data includes: Calculating the pitch angle and the roll angle according to the three-axis acceleration calibration data; An inclination detection result of the target object is generated according to the pitch angle and the roll angle.

[0048] Specifically, the three-axis acceleration calibration data can be used to calculate the pitch and roll angles of the target object. In actual application scenarios, the calibration storage and computing array uses the storage and computing integrated chip as the carrier, and the sensor module collects the three-axis acceleration raw data of the target object through the three-axis accelerometer. After the main control chip (MCU) pre-processes the three-axis acceleration raw data, it dynamically inputs it into the storage and computing integrated chip. After the storage and computing integrated chip calibrates and corrects the three-axis acceleration raw data, it outputs the three-axis acceleration calibration data to the main control chip. There is no need for excessive data movement throughout the process, which can effectively reduce system energy consumption.

[0049] Based on the above embodiments, the present invention also provides a tilt detection system based on a storage and computing array, such as Figure 4 As shown, the system comprises: A sensor module is used to obtain the original data of the three-axis acceleration of the target object; A main control chip, used to input the three-axis acceleration raw data into a storage and computing integrated chip; The storage and computing integrated chip includes a pre-built calibration storage and computing array, which is used to output three-axis acceleration calibration data according to the three-axis acceleration raw data; the calibration storage and computing array includes a plurality of computing units storing computing parameters; a method for determining the computing parameters stored in each of the computing units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula for three-axis acceleration, wherein each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; and determining the computing parameters stored in each of the computing units according to the correction weight matrix and the compensation value series, wherein the computing parameters are weight values ​​or compensation values; The main control chip is also used to detect the inclination of the target object according to the three-axis acceleration calibration data.

[0050] Specifically, Figure 4 The hardware block diagram of the entire tilt detection system is shown. It is mainly composed of three parts: sensor module, main control chip (MCU) and storage and computing chip, realizing the complete process from data acquisition to calibration correction and final calculation output. The sensor module collects the three-axis acceleration raw data x, y, z of the device through the three-axis accelerometer. After the main control chip pre-processes the three-axis acceleration raw data, it dynamically inputs it into the storage and computing chip, and at the same time receives the calibration correction results output by the storage and computing chip, and calculates the pitch angle and roll angle.

[0051] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Figure 5 As shown. The terminal includes a processor, a memory, a network interface, and a display screen connected via a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an inclination detection method based on a storage and computing array is implemented. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.

[0052] Those skilled in the art will understand that Figure 5 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0053] In one implementation, the memory of the terminal stores one or more programs, and is configured to be executed by one or more processors, wherein the one or more programs include instructions for performing a tilt detection method based on a storage and computing array.

[0054] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0055] In summary, the present invention discloses an inclination detection method, system, terminal and storage medium based on a storage and calculation array, and relates to the field of digital circuit technology. The method obtains a pre-constructed calibration storage and calculation array, and the calibration storage and calculation array includes a plurality of calculation units storing calculation parameters; the method for determining the calculation parameters stored in each of the calculation units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula for three-axis acceleration, and each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; according to the correction weight matrix and the compensation value series, determining the calculation parameters stored in each of the calculation units, the calculation parameters are weight values ​​or compensation values; obtaining the original three-axis acceleration data of the target object, inputting the original three-axis acceleration data into the calibration storage and calculation array, and obtaining the three-axis acceleration calibration data; performing inclination detection on the target object according to the three-axis acceleration calibration data. The present invention maps the complex data calibration tasks in the tilt detection process to the storage and computing array for execution, and utilizes the characteristics of deep integration of storage and computing in the storage and computing integrated technology to effectively reduce the data movement overhead, thereby achieving a reduction in system power consumption and an increase in computing speed.

[0056] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A tilt detection method based on a storage and computing array, characterized in that: The method comprises: A pre-constructed calibration storage array is obtained, wherein the calibration storage array includes a plurality of calculation units storing calculation parameters; a method for determining the calculation parameters stored in each of the calculation units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula of three-axis acceleration, wherein each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; and determining the calculation parameters respectively stored in each of the calculation units according to the correction weight matrix and the compensation value series, wherein the calculation parameters are weight values ​​or compensation values; Acquire the original data of the three-axis acceleration of the target object, input the original data of the three-axis acceleration into the calibration storage array, and obtain the three-axis acceleration calibration data; The target object is subjected to inclination detection according to the three-axis acceleration calibration data.

2. The inclination detection method based on the storage and computing array according to claim 1 is characterized in that: Determining the calculation parameters stored in each of the calculation units according to the modified weight matrix and the compensation value series includes: The computing units except the last row in the calibration storage array are used as first computing units, and the computing units in the last row are used as second computing units; Determining the calculation parameters respectively stored in each of the first calculation units according to the modified weight matrix, wherein the calculation parameters stored in the first calculation unit are weight values; The calculation parameters respectively stored in each of the second calculation units are determined according to the compensation value series, and the calculation parameters stored in the second calculation units are compensation values.

3. The inclination detection method based on the storage and calculation array according to claim 2 is characterized in that: Determining the calculation parameters stored in each of the first calculation units according to the modified weight matrix, where the calculation parameters stored in the first calculation unit are weight values, includes: For each row of the first calculation units, determine the column ordinal numbers of the modified weight matrix having the same values ​​according to the row ordinal number of the row; According to the principle of sequence bit correspondence, the weight values ​​respectively stored in each of the first calculation units in the row are determined according to a column of weight values ​​corresponding to the column sequence number.

4. The inclination detection method based on the storage and calculation array according to claim 2 is characterized in that: Determining the calculation parameters stored in each of the second calculation units according to the compensation value series, wherein the calculation parameters stored in the second calculation units are compensation values, includes: For each of the second calculation units, the compensation value stored in the second calculation unit is determined according to the compensation value in the compensation value sequence having the same sequence as that of the second calculation unit.

5. The inclination detection method based on the storage and calculation array according to claim 2 is characterized in that: Inputting the three-axis acceleration raw data into the calibration storage array to obtain the three-axis acceleration calibration data, including: Inputting the acceleration data in each direction of the three-axis acceleration raw data into different rows of the calibration storage array respectively, so that the acceleration data received by each first calculation unit in the same row is the same, and each second calculation unit receives a preset fixed value; Each of the first calculation units calculates a product based on the received acceleration data and the weight value stored in the first calculation unit; Each of the second calculation units calculates a product according to the received fixed value and the compensation value stored in the unit; Calculate the acceleration calibration data corresponding to each column according to the product calculated by each of the calculation units in the column; The three-axis acceleration calibration data is obtained according to the acceleration calibration data corresponding to each column.

6. The inclination detection method based on the storage and calculation array according to claim 5 is characterized in that: The calibration storage and calculation array further includes a processing unit; and according to the product calculated by each of the calculation units in each column, the acceleration calibration data corresponding to the column is calculated, including: Inputting the product calculated by each of the calculation units in each column into the processing unit; The processing unit performs addition and subtraction operations according to the products calculated by the calculation units in each column to obtain the acceleration calibration data corresponding to the column.

7. The inclination detection method based on the storage and calculation array according to claim 1 is characterized in that: Performing inclination detection on the target object according to the three-axis acceleration calibration data includes: Calculating the pitch angle and the roll angle according to the three-axis acceleration calibration data; An inclination detection result of the target object is generated according to the pitch angle and the roll angle.

8. An inclination detection system based on a storage and computing array, characterized in that: The system comprises: A sensor module is used to obtain the original data of the three-axis acceleration of the target object; A main control chip, used to input the three-axis acceleration raw data into a storage and computing integrated chip; The storage and computing integrated chip includes a pre-built calibration storage and computing array, which is used to output three-axis acceleration calibration data according to the three-axis acceleration raw data; the calibration storage and computing array includes a plurality of computing units storing computing parameters; a method for determining the computing parameters stored in each of the computing units includes: obtaining a correction weight matrix and a compensation value series through a calibration correction formula for three-axis acceleration, wherein each row of weight values ​​in the correction weight matrix has a corresponding relationship with a compensation value in the compensation value series; and determining the computing parameters stored in each of the computing units according to the correction weight matrix and the compensation value series, wherein the computing parameters are weight values ​​or compensation values; The main control chip is also used to detect the inclination of the target object according to the three-axis acceleration calibration data.

9. A terminal, characterized in that: The terminal includes a memory and one or more processors; the memory stores one or more programs; the program contains instructions for executing the tilt detection method based on the storage and computing array as described in any one of claims 1-7; and the processor is used to execute the program.

10. A computer-readable storage medium having a plurality of instructions stored thereon, characterized in that: The instructions are suitable for being loaded and executed by a processor to implement the steps of the tilt detection method based on a storage and computing array as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Digital oblique angle sensor and measurement method

    CN106840100A

  • Quantitative calculation method and system for convolutional neural network

    CN110991608A

  • K-means classifier based on memristor array and classification method of K-means classifier

    CN111027619A

  • Neural network computing chip and computing method

    CN112686364A

  • Computing device and robustness processing method thereof

    CN113517016A