Rule manual generation method, device, equipment and medium

By dividing the input feature map into blocks and constructing mapping relationships to generate a rule manual, the problems of latency and bandwidth overhead introduced by rule manual generation are solved, and efficient sparse point cloud data processing on the NPU is achieved, improving the real-time performance and computational efficiency of the autonomous driving system.

CN122240984BActive Publication Date: 2026-11-20YUAN LI (BEI JING) BAN DAO TI JI SHU YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610183600.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-11-20
Estimated Expiration
2046-02-09

AI Technical Summary

Technical Problem

The generation process of the rulebook introduces additional latency and bandwidth overhead, becoming a bottleneck to improving the efficiency of processing sparse point cloud data, especially since it cannot be completed locally on a neural network processor (NPU), resulting in low computational efficiency.

Method used

By dividing the input feature map space into multiple spatial blocks, the coordinates of each active point are obtained, and a mapping relationship from the coordinates to the input point index is constructed. The mapping relationship is used to generate matching items, perform matching processing, form a rule manual, adapt to the parallel architecture of the NPU, and avoid data transfer between the CPU and the NPU.

Benefits of technology

It enables efficient local generation of rule manuals, significantly improving the efficiency and real-time performance of sparse data processing. It is compatible with the parallel architecture of NPU, avoids data transmission bottlenecks, and improves the perception capabilities and decision-making speed of autonomous driving systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240984B_ABST
    Figure CN122240984B_ABST
Patent Text Reader

Abstract

The application discloses a rule book generation method, device, equipment and medium, and belongs to the semiconductor field. The space of an input feature map is divided into multiple spatial blocks, and the coordinates of each active point in the input feature map are obtained. In the input search area, a mapping relationship from the coordinates to the input point indexes is constructed. Then, based on the coordinates of the output points and the parameters of the feature extraction window, corresponding to-be-matched items are generated respectively. The mapping relationship is used for matching processing on the multiple to-be-matched items, and the indexes of the corresponding effective input points and the internal position indexes of the feature extraction window are screened out for each output point. The matching processing results of each spatial block are stored to form a rule book. The method makes the rule book generation process completely adapt to the parallel architecture of special hardware such as NPU, realizes local efficient generation on the NPU, avoids the data transmission bottleneck between the CPU and the NPU, and improves the efficiency and real-time performance of processing sparse data (such as 3D point cloud).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of semiconductors, and specifically relates to a method for generating a rulebook, an apparatus for generating a rulebook, an electronic device, and a readable storage medium. Background Technology

[0002] In fields such as autonomous driving, robot navigation, and augmented reality, 3D point cloud data acquired by sensors such as LiDAR has become a key source of environmental perception. Point cloud data directly represents the three-dimensional spatial coordinates of an object's surface and is a naturally sparse data representation method. Compared to methods that divide the three-dimensional space into dense voxel grids, it can significantly reduce the amount of data and avoid cubic-level increases in memory and computational overhead.

[0003] However, mainstream deep learning models, especially convolutional neural networks (CNNs), are designed to process dense data arranged on a regular grid, such as two-dimensional images. The unordered, unstructured, and sparsity of point cloud data makes it impossible for traditional CNNs to process it effectively. To address this challenge, researchers have proposed various technical approaches. Among them, sparse convolution, as a convolution method specifically designed for sparse data, significantly improves computational efficiency by restricting operations to non-zero data points and their neighborhoods.

[0004] Submanifold convolution is an important evolution of sparse convolution, and its core design goal is to strictly maintain the sparsity of the input data during convolution. Specifically, for data such as point clouds, whose sparsity is defined on a low-dimensional manifold (such as the surface of an object), submanifold convolution ensures that the non-zero positions in the output feature map correspond one-to-one with the non-zero positions in the input feature map. This avoids the exponential growth in the number (activity) of non-zero positions caused by the convolution operation, thus effectively controlling the consumption of computational and memory resources when deepening the network.

[0005] Efficient implementation of submanifold convolution relies on a key data structure—the rule book. This book precisely records all valid correspondences between input coordinates, output coordinates, kernel indices, and spatial offset indices, essentially defining the computational graph of sparse convolution. Traditional submanifold convolution rule book generation schemes typically rely on building data structures such as hash tables on a central processing unit (CPU). This approach requires collecting all input points and traversing all possible offset positions of the convolution kernel for each output point, checking the hash table to determine if the input point exists. However, this hash-based random access model is severely incompatible with hardware architectures such as neural network processors (NPUs) designed for rule-based, parallel computation. Therefore, the rule book generation process cannot be completed locally on the NPU; it must first be generated on the CPU and then transmitted to the NPU via the bus. This process introduces additional data transmission latency and bandwidth consumption, becoming a major bottleneck in improving the efficiency of the NPU in end-to-end processing of sparse point cloud data. Summary of the Invention

[0006] The purpose of this application is to provide a method for generating a rule manual, a device for generating a rule manual, an electronic device, and a readable storage medium, which can solve the problem that the generation of the rule manual introduces additional latency and bandwidth overhead, becoming a bottleneck for improving processing efficiency.

[0007] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a method for generating a rule manual, the method comprising: The space of the input feature map is divided into multiple spatial blocks, and the coordinates of each active point in the input feature map are obtained; For each current space block, perform the following steps: Within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window used, a mapping relationship from coordinates to input point indices is constructed; Based on the coordinates of each output point and the parameters of the feature extraction window, corresponding matching items are generated respectively; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined according to the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and its internal position index in the corresponding feature extraction window; The mapping relationship is used to match multiple items to be matched, and the index of the corresponding valid input point and the internal position index of the feature extraction window are selected for each output point; The matching results of each of the space blocks are stored to form a rule manual.

[0008] Secondly, embodiments of this application provide a rule manual generation apparatus, the apparatus comprising: The acquisition module is used to divide the space of the input feature map into multiple spatial blocks and acquire the coordinates of each active point in the input feature map; The mapping relationship construction module is used to construct a mapping relationship from coordinates to input point indices for each current spatial block within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window used. The rule matching module is used to generate corresponding matching items based on the coordinates of each output point and the parameters of the feature extraction window, and to perform matching processing on multiple matching items using the mapping relationship, thereby filtering out the index of the corresponding valid input point and the internal position index of the feature extraction window for each output point; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined based on the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and the internal position index of the corresponding feature extraction window; The result storage module is used to store the matching processing results of each of the space blocks to form a rule manual.

[0009] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0010] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0011] According to the embodiments of this application, the space of the input feature map is divided into multiple spatial blocks, and the coordinates of each active point in the input feature map are obtained. For each current spatial block, the following steps are performed: within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window, a mapping relationship from coordinates to input point indices is constructed. Then, based on the coordinates of each output point and the parameters of the feature extraction window, corresponding matching items are generated respectively; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined according to the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and its internal position index in the corresponding feature extraction window. Then, the mapping relationship is used to perform matching processing on multiple matching items, and the corresponding valid input point index and the internal position index of the feature extraction window are selected for each output point. Finally, the matching processing results of each spatial block are stored to form a rule manual. This scheme decomposes the global problem into parallel-processable local problems through a spatial block strategy, and uses a pattern matching mechanism (constructing a mapping table and querying) to replace the traditional inefficient hash table search, transforming irregular memory access into regular array index operations. This method enables the rulebook generation process to be fully adapted to the parallel architecture of dedicated hardware such as NPU, achieving efficient local generation on NPU, avoiding data transfer bottlenecks between CPU and NPU, and significantly improving the efficiency and real-time performance of processing sparse data (such as 3D point clouds). Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating the steps of a method for generating a rule manual according to an embodiment of this application; Figure 2 This is a schematic diagram of a block-separated storage structure; Figure 3 This is a schematic diagram of the rulebook generation process; Figure 4 This is a structural block diagram of an embodiment of a rule manual generation apparatus provided in another embodiment of this application; Figure 5 This is a schematic diagram of a point extraction unit; Figure 6 This is a structural block diagram of an electronic device for generating a rule manual, according to an exemplary embodiment. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0015] The method for generating the rule manual provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0016] The block-separated and pattern-matching submanifold convolution rule manual generation and storage scheme provided in this application has high hardware adaptability and deployment flexibility. Its specific implementation can be carried out by various computing environments such as cloud service platforms, AI servers in self-built data centers, or dedicated neural network processors (NPUs) integrated into terminal devices, and this application embodiment does not impose any limitations on this.

[0017] This solution is particularly suitable for edge computing and mobile terminal scenarios with stringent requirements for real-time performance, energy efficiency, and computational efficiency. A typical application example is its integration into intelligent vehicle systems or in-vehicle computing units. In autonomous driving environments, vehicles need to continuously capture 3D point cloud data of the surrounding environment using sensors such as LiDAR. Traditional processing methods often become a bottleneck for real-time system response due to the inefficiency of rule manual generation.

[0018] By applying this application, the onboard NPU can utilize its built-in dedicated hardware units (such as point extraction units, indexing units, and zero-point removal units) to efficiently and with low latency generate the rulebook required for submanifold convolution locally. This significantly accelerates the feature extraction speed of sparse point cloud data, thereby providing powerful computing support for key tasks such as real-time obstacle detection, drivable area segmentation, and high-precision local map construction, effectively improving the perception capabilities and decision-making speed of autonomous driving systems.

[0019] Reference Figure 1 The diagram illustrates a flowchart of a method for generating a rule manual according to an embodiment of this application, which may specifically include the following steps: Step 101: Divide the space of the input feature map into multiple spatial blocks and obtain the coordinates of each active point in the input feature map.

[0020] In this embodiment, the input feature map refers to the raw 3D spatial data to be processed, such as a sparse point cloud obtained by LiDAR scanning. Most locations in this space do not contain valid data (values ​​are zero), and only a few locations carry the information to be processed; these locations are called active points.

[0021] In the embodiments of this application, a spatial block refers to a larger, more manageable local region into which a large global input feature map is divided in a spatial dimension (such as height H). This block-based strategy is the core of the parallel processing concept, which can decompose the global sparse data matching problem into multiple sub-problems that can be processed independently or in parallel.

[0022] For example, for an input feature map with spatial dimensions (H=100, D=100, W=100), it can be equally divided into M=10 blocks along the height dimension, with each block having dimensions of (H=10, D=100, W=100). Obtaining the coordinates of each active point means obtaining the position information of all non-zero data points along the H, D, and W dimensions.

[0023] In one optional embodiment of this application, a specific implementation of dividing the space of the input feature map into multiple spatial blocks may include: dividing the space into M blocks along one of the three dimensions of the input feature map, where M is an integer greater than 1.

[0024] The considerations for selecting the preset dimension include the spatial distribution characteristics of the sparse data (e.g., 3D point cloud), the convenience of subsequent processing steps, and the best compatibility with dedicated hardware parallel computing architectures such as neural network processors (NPUs).

[0025] In practical implementation, if the input feature map has obvious hierarchy or continuity in the height (H) dimension (for example, in autonomous driving scenarios, the vertical distribution of point cloud data often exhibits a specific structure), the height dimension can be preset as the partitioning criterion to facilitate independent processing of each block subsequently. Similarly, if the data has stronger local correlation in the depth (D) or width (W) dimensions, or to maximize the utilization of the continuity of hardware memory access, this dimension can also be selected as the partitioning criterion.

[0026] The granularity of the partition (i.e., the value of M) can be determined by comprehensively considering the total size of the input feature map in the preset dimension, the number of computing cores of the available hardware processing units, and the requirements for parallel processing efficiency.

[0027] For example, the feature map location space where the ordered points of the input are located is divided into blocks equally along a preset H dimension, resulting in a total of M spatial blocks. Each block contains a continuous data segment along the H dimension, thereby decomposing the global, potentially irregular, large-scale sparse data space into multiple regular and easily manageable local regions.

[0028] The beneficial effects of this partitioning method lie in its regularity and hardware friendliness. By partitioning along a preset, uniform dimension, the boundaries of each spatial block are clear and the computation is regular, greatly simplifying the subsequent logic of determining the input search region for each block. This regular partitioning method is highly compatible with the characteristics of dedicated hardware such as neural network processors (NPUs) that excel at processing regular data blocks, enabling data to be efficiently allocated and scheduled among multiple processing units, facilitating parallel execution, and thus improving the efficiency and scalability of the entire rulebook generation process.

[0029] In one optional embodiment of this application, the coordinates are one-dimensional tiled coordinates. A specific implementation of obtaining the coordinates of each active point in the input feature map may include: obtaining the three-dimensional spatial coordinates of each active point in the input feature map; sorting them according to a preset three-dimensional dimensional order, and converting the three-dimensional spatial coordinates of each active point into one-dimensional tiled coordinates.

[0030] Three-dimensional spatial coordinates refer to the three-dimensional position of an active point in the original input feature map, typically uniquely determined by the values ​​of its height (H), depth (D), and width (W). For example, an active point might be located at (h=5, d=10, w=8). Obtaining these coordinates is fundamental for all subsequent spatial logic calculations.

[0031] According to a preset three-dimensional dimensional order (e.g., priority order is height H, depth D, width W), the three-dimensional spatial coordinates of each active point are mapped to a unique one-dimensional linear address.

[0032] One-dimensional tiled coordinates are a mathematical transformation that maps a point in three-dimensional space to a unique index value on a one-dimensional line. This transformation aims to convert complex three-dimensional spatial relationships into linear, continuous one-dimensional relationships.

[0033] The generation of one-dimensional tiled coordinates is achieved through a defined mathematical formula. Specifically, the three-dimensional spatial coordinates of all active points in the input feature map are tiled into one-dimensional space according to a preset HDW dimension order, generating a location spatial index list ins_list. The calculation formula is as follows:

[0034] in, These represent the coordinates of the i-th active point in the height (H), depth (D), and width (W) dimensions, respectively. D and W are the dimensions (or maximum coordinate limits) of the feature map in the depth and width directions, respectively.

[0035] For example, the allocation and mapping of sequential indices are performed synchronously after the transformation. The system uses padding units to assign sequential index values ​​to all input points in an enumerated padding manner (with the enumeration starting at 1), generating all_idx_list. This list corresponds one-to-one with the one-dimensional tiled coordinates in ins_list, thus establishing a mapping relationship from spatial coordinates to the position of the input sequence.

[0036] The technical advantage of this transformation method lies in converting the problem of irregular three-dimensional spatial search and addressing into a regularized access to one-dimensional linear sequences. This not only simplifies the logical complexity of subsequent operations such as mapping relationship construction and matching queries, but also ensures that the one-dimensional data arrangement is highly compatible with the memory management mode of computing hardware (such as NPU / GPU), greatly optimizing the efficiency of parallel batch processing, reducing memory access latency, and laying a solid foundation for the efficient generation of rule manuals.

[0037] Step 102: For each current spatial block, construct a mapping relationship from coordinates to input point indices within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window used.

[0038] In this embodiment, the input search region refers to the range of input data sources that need to be retrieved from the entire input feature map, determined based on the parameters (such as size) of the feature extraction window (such as the convolution kernel) for processing the current spatial block. This region is typically larger than the current spatial block itself to ensure that the convolution computation can cover all possible input points.

[0039] For example, based on the current space block ( The location of the point extraction unit and the size of the convolution kernel determine a range of input data to be searched (i.e., the input search region). Specifically, the size of the convolution kernel in the height (H) dimension is kh. The range parameters l (left boundary) and r (right boundary) of the point extraction unit are calculated using the following formula: ; ; ; ; in, and r represents the left and right boundaries of the current spatial block, respectively. block_size is the length of each spatial block in dimension H, and D and W are the dimensions of the feature map in the depth and width directions, respectively. This region encompasses the coordinate range of all input points that may need to be accessed to compute the output of the current block.

[0040] In this embodiment, constructing a mapping relationship refers to creating a temporary, dense address lookup table (e.g., an array initialized with invalid values) within a defined input search area. The core function of this mapping relationship is to establish a fast correspondence between spatial coordinates and input point indices.

[0041] In practice, firstly, a dense address array is created within the input search region, and each element of the array is initialized to a preset invalid flag value (such as 0). Then, all active points within this region and their sequential indices in the overall input sequence are obtained. Finally, using the spatial coordinates of each active point (usually converted to one-dimensional tiled coordinates) as the index address of the array, the corresponding sequential index is written to the appropriate position. For example, the position number of the active point coordinates (h, d, w) in the input sequence.

[0042] Step 103: Based on the coordinates of each output point and the parameters of the feature extraction window, generate corresponding matching items respectively; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined according to the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and its internal position index in the corresponding feature extraction window.

[0043] In this embodiment, the output point is the active point within the current spatial block that will produce the convolution result. The coordinates of the output point can be determined based on the coordinates of the input point. In submanifold convolution, the position of the output point corresponds one-to-one with the input active point, meaning the coordinate values ​​of the output point are the same as the coordinate values ​​of the corresponding input point.

[0044] In this embodiment, the term to be matched is the set of input point coordinates theoretically required to complete the convolution operation for each output point, calculated based on all possible positions of the feature extraction window (e.g., a convolution kernel of size kh×kw×kd). Each term to be matched is associated with an internal position index of the feature extraction window (e.g., a one-dimensional linear index of the convolution kernel weights), used to identify which specific weight parameter is involved in the calculation.

[0045] In practice, for an output point P within the current block, each offset of the convolution kernel is traversed to calculate the coordinates of a theoretical input point. These coordinates, together with the corresponding internal index of the convolution kernel, constitute a matching term.

[0046] Step 104: Use the mapping relationship to perform matching processing on multiple items to be matched, and filter out the index of the corresponding valid input point and the internal position index of the feature extraction window for each output point.

[0047] In this embodiment of the application, the matching process refers to using the mapping relationship (address lookup table) constructed in step 102 to perform batch and rapid verification on all the items to be matched generated in step 103, so as to determine which theoretical input points actually exist.

[0048] In practice, for each item to be matched, the mapping array constructed in step 102 is queried using the coordinates of its contained theoretical input points as the address. If the query result is a non-invalid identifier value, the match is considered successful, and this value is the valid input point index, which is retained along with the internal position index of the feature extraction window in the item to be matched. If the query result is an invalid identifier value, the match is considered to have failed, and this item to be matched is filtered out. Finally, a hardware-friendly zero-point removal unit removes all failed matching items, outputting a tightly packed set of valid results.

[0049] Step 105: Store the matching processing results of each of the space blocks to form a rule manual.

[0050] In this embodiment, the rule book is the final output data structure, which records which valid input points (identified by indexes) each output point needs to be computed with, and which internal position of the feature extraction window (identified by an internal position index). For example, the rule book for submanifold convolution.

[0051] In practice, the matching results are stored for each spatial block, typically including: the number of active points that serve as output points within the block, the number of valid input points obtained after matching, a set of indices for all valid input points, and a set of indices for the internal positions within the feature extraction window corresponding to all valid input points. Similar information for all spatial blocks is stored contiguously in memory, forming a block-separated storage structure, facilitating efficient access by subsequent computational units.

[0052] For example, given a set of 3D point cloud coordinates (i.e., active points in the input feature map) sorted in order of height (H), depth (D), and width (W), this method generates a corresponding Submanifold Convolution rule book.

[0053] According to the embodiments of this application, the space of the input feature map is divided into multiple spatial blocks, and the coordinates of each active point in the input feature map are obtained. For each current spatial block, the following steps are performed: within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window, a mapping relationship from coordinates to input point indices is constructed. Then, based on the coordinates of each output point and the parameters of the feature extraction window, corresponding matching items are generated respectively; wherein, the output point is an active point located within the current spatial block, and the matching item includes the coordinates of the theoretical input point and its internal position index within the corresponding feature extraction window. Then, the mapping relationship is used to perform matching processing on multiple matching items, and the corresponding valid input point index and the internal position index of the feature extraction window are selected for each output point. Finally, the matching processing results of each spatial block are stored to form a rule manual. This scheme decomposes the global problem into parallelizable local problems through a spatial block strategy, and uses a pattern matching mechanism (constructing a mapping table and querying) to replace the traditional inefficient hash table search, transforming irregular memory access into regular array index operations. This method enables the rulebook generation process to be fully adapted to the parallel architecture of dedicated hardware such as NPU, achieving efficient local generation on NPU, avoiding data transfer bottlenecks between CPU and NPU, and significantly improving the efficiency and real-time performance of processing sparse data (such as 3D point clouds).

[0054] In one optional embodiment of this application, a specific implementation of constructing a mapping relationship from coordinates to input point indices may include: creating an address array corresponding to the coordinates within the input search area, and initializing each element of the address array to a preset invalid identifier value; obtaining the sequential index of the active points located within the input search area in the input sequence; using the coordinates of each active point as the index address of the address array, and writing the corresponding sequential index into the corresponding position of the address array.

[0055] The mapping is implemented through a specially created and initialized address array. This address array corresponds strictly to the coordinate space within the input search region, and each element is initially set to a preset invalid flag value (e.g., the value 0), which indicates that all coordinate positions are not initially associated with any valid input points.

[0056] The core of constructing the mapping relationship lies in filling the aforementioned address array with valid input point information. The specific process is as follows: First, the system identifies active points located within the input search area and obtains their sequential indices in the global input sequence. Then, the coordinates of each active point (usually calculated and converted to one-dimensional tiled coordinates) are used as the precise index address of the address array, and the corresponding sequential index of that active point is written as the data value to the appropriate position in the array. This operation establishes a direct mapping from coordinates to input point indices.

[0057] The address array constructed in the above manner essentially forms a highly efficient dynamic look-up table (LUT). In this mapping relationship, the state of each coordinate position is explicit: if the value of its corresponding array element is a non-invalid identifier, then the value directly represents the input sequence index of the actual active point at this coordinate; if its value is still an invalid identifier, it explicitly indicates that there is no valid data at this coordinate position. This direct mapping mechanism based on array indexes transforms the irregular spatial search problem into a regularized access to contiguous memory addresses.

[0058] For example, an address array is created and initialized. The padding unit is configured to create a dense address array (or "zero matrix") within the input search region. The size of this array strictly corresponds to the total number of coordinates within the region, and immediately after creation, all its elements are initialized to a preset invalid flag value (e.g., the value 0), indicating that in the initial state, all coordinate positions are not associated with valid input points. Next, valid data is extracted and a mapping is constructed. The point extraction unit filters all active points located within the region from the global input sequence based on the calculated ranges l and r, obtaining their one-dimensional tiled coordinates (out) and their sequential indexes (out_idx_list) in the input sequence. Subsequently, the indexing unit performs a crucial hash distribution operation: using the one-dimensional tiled coordinates out[i] of each active point relative to the starting address of the current spatial block. ( offset of ) As the destination index (i.e., the index address of the address array), the corresponding sequential index is written from the source data address (out_idx_list) to the corresponding position at the starting address of the destination data (zero matrix). At this point, an efficient coordinate-to-index lookup table (LUT) is constructed, and this space is labeled X. In this table, valid input point positions store their sequential indices, while invalid positions retain an invalid flag value.

[0059] Simultaneously, convolution kernel position indices are prepared for the rulebook. To support efficient block computation of subsequent matrix multiplication-related operators, the system generates a composite index for each connection relationship. Its encoding method is as follows:

[0060] in, It is the i-th output point within the current block. kd, kh, and kw are the sizes of the 3D convolution kernel. This is the index of the internal position of the convolution kernel corresponding to the connection. P and Q are the block sizes introduced to optimize subsequent matrix multiplications, for example, they can both be set to 16.

[0061] The advantage of this implementation lies in its extremely high hardware execution efficiency. Since the process is entirely based on address calculation and array read / write, it avoids complex branching or hash calculations. Its operating mode is highly compatible with the parallel architecture of dedicated hardware such as neural network processors (NPUs), laying a solid foundation for subsequent fast and parallel matching processing, thereby significantly improving the generation efficiency of the submanifold convolution rulebook.

[0062] In one optional embodiment of this application, a specific implementation of using the mapping relationship to perform matching processing on multiple items to be matched, and filtering out the corresponding valid input point index and the internal position index of the feature extraction window for each output point, may include: for each item to be matched, querying the address array using the coordinates of its contained theoretical input point as the address; if the query result is a non-invalid identifier value, then the item to be matched is determined to be successfully matched, and the query result is the corresponding valid input point index; if the query result is the preset invalid identifier value, then the item to be matched is determined to be unmatched; filtering all unmatched items to be matched, forming a set consisting of the valid input point index and the internal position index of the feature extraction window corresponding to the successfully matched items to be matched.

[0063] Matching processing refers to the batch and efficient verification and filtering process of all unmatched items generated for each output point using the constructed mapping relationship (i.e., the address array). Its core purpose is to accurately identify the valid connections that actually exist in the actual input data from the theoretically derived possible connections, and to eliminate invalid items, thereby generating a rulebook fragment that accurately guides convolution calculation.

[0064] The specific steps of the matching process include: Generating the set of theoretical input points: In submanifold convolution, there is a one-to-one correspondence between the coordinates of the output points and the input points. Therefore, the coordinates of the active points within the current spatial block can be used as the coordinates of the output points. Based on the size of the convolution kernel, the theoretically required set of input point coordinates for each output point during convolution calculation can be deduced. The calculation formula is as follows: ,in The coordinates of the current output point are given, padding is the convolution padding value (e.g., 1), and (khi, kwi, kdi) is the offset inside the convolution kernel. The entire convolution kernel space is traversed (khi from 0 to kh-1, kwi from 0 to kw-1, kdi from 0 to kd-1).

[0065] Query mapping relationship: For each theoretical input point coordinate calculated above, convert it into one-dimensional tiled coordinates and use it as an address to query the address array (i.e., mapping relationship X).

[0066] Judgment and Filtering: Match successful: If the query result is not an invalid identifier value (e.g., non-zero), it is determined that the theoretical input point actually exists, and the match is successful. This query result is the corresponding valid input point index, which, together with the internal position index of the feature extraction window corresponding to the current theoretical input point (i.e., the convolution kernel weight index), constitutes a valid rule.

[0067] Match failed: If the query result is a preset invalid identifier value, it is determined that the point does not exist and the match fails.

[0068] Zero-point removal and compact storage: The zero-point removal unit filters the judgment results of all items to be matched, removing all items that fail to match. This unit takes the result after querying the address array as input data, uses the pre-generated composite index idx_with_kernel_idx (which encodes the output point information and the convolution kernel position information) as index, and finally outputs a tightly packed set of valid input point indices (valid_input_point) and the corresponding set of valid convolution kernel position indices (valid_idx_with_kernel_idx).

[0069] By introducing a hardware-level filtering mechanism based on parallel matching and zero-point removal units using direct address lookup, this embodiment effectively overcomes the inefficiency of traditional solutions that rely on serial hash lookups on the CPU. It transforms the judgment of irregular data dependencies into regularized array access and streaming filtering operations, which are highly adept at using dedicated hardware such as NPUs. This significantly accelerates the generation of rulebooks, reduces computational latency, and provides crucial technical support for real-time processing of large-scale sparse data (such as high-resolution 3D point clouds).

[0070] In one optional embodiment of this application, after performing matching processing on multiple items to be matched using the mapping relationship, the method may further include: obtaining a first number of active points within the current spatial block that serve as output points; obtaining a second number of valid input points obtained after matching processing; wherein the stored matching processing result includes at least: the first number, the second number, a set of indices of valid input points, and a set of internal position indices of feature extraction windows corresponding to valid input points.

[0071] The data structure of the rulebook fragment contains four key components that together precisely describe all valid input-output connections within the current spatial block: The first quantity refers to the total number of active points that, after filtering, are located within the current spatial block and serve as output points for the convolution calculation of this manifold. This quantity clarifies how many output points the calculation rules need to be defined for this rulebook segment.

[0072] The second quantity refers to the total number of valid input points that are finally confirmed after matching. This quantity reflects the scale of all valid input data required to complete the calculation of all output points within the current block.

[0073] A set of indices for valid input points: This is an ordered list that stores the sequential indices of all successfully matched valid input points in the global input sequence. This set directly points to the memory location of the original input data required for computation.

[0074] The set of internal position indices of the feature extraction window corresponding to the valid input points: This is an ordered list that strictly corresponds to the set above, where each element identifies the position of the convolution kernel weight associated with its corresponding valid input point during the convolution operation (i.e., the internal position index of the feature extraction window).

[0075] The relationships between the four components described above constitute the core logic of the rulebook fragment. Specifically, the rulebook fragment is typically organized in memory as a metadata + data body structure. The first quantity (number of output points) and the second quantity (number of valid input points), as metadata, are stored first, providing a framework for the computation unit to quickly parse the data body. Next, the data body portion is stored, namely the two index sets. The valid input point index set indicates where the data is retrieved, while the corresponding feature extraction window internal position index set indicates which parameters (convolution kernel weights) are used for calculation. The elements in these two sets correspond one-to-one, and through the mapping relationship established in the preceding matching steps, they together precisely define each valid input-output-convolution kernel weight connection.

[0076] Through this structured data organization, this embodiment achieves the following technical effects: First, it eliminates the need for subsequent computing units to perform time-consuming dynamic join lookups, allowing them to directly perform efficient sparse matrix-vector multiplication operations based on this rulebook. Second, the explicit metadata (two quantities) enables computing units to pre-allocate computing resources and achieve fine-grained task scheduling. Finally, this highly regularized data format significantly optimizes the memory access patterns of dedicated hardware such as NPUs, eliminating latency caused by irregular memory accesses, thereby significantly improving the overall throughput and energy efficiency of submanifold convolution computation.

[0077] In one optional embodiment of this application, a specific implementation of storing the matching processing results of each of the space blocks may include: storing similar information in the rule manual fragments generated for each space block consecutively in a memory.

[0078] Rulebook fragments typically contain various types of metadata. The data structure of a rulebook fragment comprises four key components that together precisely describe all valid input-output connections within the current spatial block: First quantity (number of output points (length of out)): refers to the total number of active points within the current spatial block that serve as output points for convolution calculation.

[0079] The second quantity (number of valid input points (length of valid_input_point)): refers to the total number of valid input points corresponding to all output points in the current spatial block after matching.

[0080] The set of valid input point indices (valid_input_point): an ordered list that stores the sequential indices of all successfully matched valid input points in the global input sequence.

[0081] The set of internal position indices of the feature extraction window corresponding to the valid input point (valid_idx_with_kernel_idx): an ordered list that strictly corresponds to the set of valid input point indices, storing the internal position index of the feature extraction window (such as the convolution kernel) associated with each valid input point.

[0082] During storage, the block separation strategy is specifically reflected in two levels: Intra-block organization: For a single spatial block, the above four results are written as independent data units to their respective preset memory destination addresses.

[0083] Inter-block organization (core innovation): After processing all M spatial blocks, similar information from all spatial blocks is grouped together and divided into contiguous data blocks on physical memory. Specifically: The "first quantity" values ​​of all space blocks are stored together in a contiguous address space in memory, forming a complete data block.

[0084] The "second quantity" values ​​of all space blocks are stored together in the next contiguous address space, forming another data block.

[0085] All the "indices of valid input points" of all spatial blocks are tightly connected to form a long, continuous list of indices.

[0086] All the "internal location indices of feature extraction windows" of all spatial blocks are also tightly connected to form another long, continuous index list, which corresponds one-to-one with the elements in the previous index list.

[0087] For example, such as Figure 2The diagram illustrates a block-separated storage structure. The final rulebook is organized in memory into four logically parallel tables (Tables 0-3), each storing a specific type of information, with this type of information stored consecutively: Table 0: Stores the number of active points (output points) within all spatial blocks (block 0 to block M) sequentially and consecutively. This table allows the computation unit to quickly determine how many output points need to be calculated for each block. Table 1: Stores the number of valid input points obtained after matching processing for all spatial blocks sequentially and consecutively. This table clarifies the amount of valid data corresponding to each block. Table 2: Stores the indices of all valid input points in all spatial blocks sequentially and tightly. These indices directly point to specific locations in the input data buffer. Table 3: Stores the internal position indices of the feature extraction windows (e.g., convolutional kernels) corresponding to all valid input points sequentially and tightly. These indices indicate which weight parameters are used during computation.

[0088] The beneficial effects of this storage scheme are a significant improvement in the execution efficiency of the entire sparse convolution processing flow. First, it provides the computation unit with a regularized and predictable data access pattern, making data prefetching more accurate and greatly reducing the idle time of the computation unit while waiting for data. Second, this structured storage method also simplifies the process of the computation unit parsing the rulebook. The computation unit only needs a few base address pointers and stride information to locate and retrieve any type of data in any spatial block as needed, reducing parsing overhead. Finally, this optimized storage structure fully utilizes the computational potential of the NPU by reducing memory access bottlenecks, providing crucial low-latency and high-throughput guarantees for processing large-scale sparse data (such as high-resolution 3D point clouds).

[0089] The storage method defined in this embodiment is not just a simple result saving, but a key part of deeply optimizing the data flow of the computing system. It extends the advantages of "block separation" processing from the rule manual generation stage to the storage and access stage, forming a complete performance optimization closed loop.

[0090] For example, such as Figure 3 The diagram illustrates the generation process of the rulebook. The entire process begins with input coordinate points. These coordinate points ( The coordinates of all active points (i.e., valid data points) in the input feature map are determined. First, the system combines the coordinates of all points with the convolutional kernel pooling size, and then tiles the feature map in HDW dimension order onto a one-dimensional space to calculate the one-dimensional tiled coordinates. This step transforms three-dimensional spatial coordinates into one-dimensional linear addresses, laying the foundation for all subsequent address-based calculations and addressing.

[0091] Subsequently, the process enters a partitioning stage of equally slicing the input feature map space in the H dimension into a total of M blocks, and starts a cyclic processing procedure for each block Mi (i ranges from 0 to M-1) (Mi=0; Mi<M; Mi+=1). For the current block Mi, its processing flow accurately reflects the hierarchical relationship: Determine the input search area: the step of extracting the coordinate points in the input space corresponding to the M blocks in combination with the convolution kernel size in the flowchart corresponds to determining the input search area for the current block Mi. This area is jointly determined by the convolution kernel size and the current block position, and is the data source range for subsequent mapping construction and matching.

[0092] Construct a mapping relationship. Create a zero matrix for the input dense region corresponding to Mi, and hash and distribute the sequential indices in the input sequence corresponding to the valid points in this region to the dense region matrix. Its specific execution corresponds to three operations: Create and initialize the address array: creating the zero matrix of the input dense region corresponding to Mi means creating an address array corresponding to the input search region. Each position of this matrix (array) represents a possible coordinate in the region, and is initialized to "zero" (that is, the preset invalid identification value).

[0093] Obtain active points and their sequential indices: after the input search area is determined, the system has obtained the active points located in this area and their sequential indices in the input sequence by extracting the coordinate points in the input space corresponding to the M blocks.

[0094] Write the mapping: hash and distribute the sequential indices in the input sequence corresponding to the valid points in this region to the dense region matrix. Specifically, the system uses the one-dimensional tiled coordinate of each active point (after offset calculation relative to the start address Mi_offset of the current block ) as the index address of this "zero matrix" (address array), and "hashes" the sequential index of this point as a data value into the corresponding position (position A) of the matrix. So far, an efficient "coordinate -> index" mapping relationship (i.e., look-up table LUT) is constructed. This dense region matrix is marked as X in the process.

[0095] Perform matching and filtering using the mapping: obtaining the sequential indices of all input points from the dense region matrix and removing invalid input points with a sequential index of 0 intuitively shows how to use the constructed mapping relationship X for matching. The theoretical input point coordinates calculated by the system for the output points are queried through X to obtain their sequential indices, and points whose query result is 0 (invalid identification value) are invalid inputs, which are filtered by the zero point removal unit.

[0096] It should be noted that the rule manual generation method provided in this application embodiment can be executed by a rule manual generation device, or by a control module within that rule manual generation device for executing the method of loading the rule manual generation. This application embodiment uses the example of a rule manual generation device executing the method of loading the rule manual generation to illustrate the rule manual generation method provided in this application embodiment.

[0097] Reference Figure 4 The diagram illustrates a structural block diagram of an embodiment of a rule manual generation apparatus provided in another embodiment of this application, which may specifically include: The acquisition module 201 is used to divide the space of the input feature map into multiple spatial blocks and acquire the coordinates of each active point in the input feature map; The mapping relationship construction module 202 is used to construct a mapping relationship from coordinates to input point index within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window used, for each current spatial block. The rule matching module 203 is used to generate corresponding matching items based on the coordinates of each output point and the parameters of the feature extraction window, and to perform matching processing on multiple matching items using the mapping relationship, thereby filtering out the index of the corresponding valid input point and the internal position index of the feature extraction window for each output point; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined based on the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and the internal position index of the corresponding feature extraction window; The result storage module 204 is used to store the matching processing results of each of the space blocks to form a rule manual.

[0098] In one optional embodiment of this application, the mapping relationship construction module includes: A filling unit is used to create an address array corresponding to the coordinates within the input search area, and to initialize each element of the address array to a preset invalid flag value.

[0099] The point extraction unit, connected to the acquisition module, is used to acquire the sequential index of active points located within the input search area in the input sequence.

[0100] An indexing unit, connected to the filling unit and the point extraction unit, is used to write the corresponding sequential index into the corresponding position of the address array, using the coordinates of each active point as the index address of the address array.

[0101] The mapping relationship construction module comprises three logically closely connected functional units: a filling unit, a point extraction unit, and an indexing unit. This modular design decomposes the complex task of constructing the mapping relationship into several regular subtasks that are easy to execute in parallel or in a pipeline on hardware.

[0102] The filling unit is responsible for preparing the initial data structure for the mapping relationship. Its specific work is to create an address array in the memory space corresponding to the input search area determined by the position of the current spatial block and the parameters of the feature extraction window. The size of this array strictly corresponds to the number of all possible coordinate points in the input search area. After creation, the unit immediately initializes all elements of this address array to a preset invalid flag value (for example, the value 0). This operation is equivalent to establishing an empty "seating chart", indicating that all coordinate positions are not occupied by valid input points in the initial state.

[0103] The point extraction unit is connected to the acquisition module, and its core task is to acquire valid data. It filters out all active points (i.e., valid data points) whose coordinates are located within the current input search area from the global input data provided by the acquisition module, and simultaneously acquires the sequential indices of these active points in the global input sequence. This unit functions for data filtering and positioning, ensuring that subsequent operations are only performed on the data points that actually exist within the current search area.

[0104] For example, as Figure 5 shown in the schematic diagram of the point extraction unit. This diagram clearly demonstrates how the unit efficiently and in parallel completes the core function of "finding elements within a given range in an array" through a dedicated hardware circuit. It shows two optional or advanced hardware architectures of the "point extraction unit". Both architectures receive a set of ordered input data points P0, P1, ..., P n (corresponding to the coordinate points in the "input sequence" or their derived values), and receive a range parameter r as the judgment boundary.

[0105] In the basic architecture (Diagram A), its working flow embodies a highly parallelized hardware filtering logic: Parallel comparison: The input point P_i is sent to two hardware comparators at the same time. The first comparator performs the operation P_i ≥ l, and the second comparator performs the operation P_i < r (here, l can represent the lower bound of the range, r can represent the upper bound of the range, and the specific logic is configurable). These two comparison operations can be executed serially or in parallel, generating two preliminary Boolean (0 / 1) results.

[0106] Logical aggregation: The outputs of the two comparators are fed into an AND (&) logic unit. This unit performs a logical AND operation and outputs a valid signal (e.g., logic '1') only if P_i simultaneously satisfies the condition of being greater than the lower bound and less than or equal to the upper bound (or other interval conditions as defined by a specific definition).

[0107] Data Filtering: The result of the above AND operation serves as a control signal, controlling the subsequent data path. An output of '1' indicates that the corresponding input point P_i is within the target range, and its data is allowed to pass; an output of '0' indicates that the point is outside the range. Finally, all unselected points (or placeholders) are filtered out by the subsequent zero-point removal unit, tightly outputting all valid points P_i within the range. This process can be executed in parallel for multiple input points, greatly improving throughput.

[0108] In the enhanced architecture (Figure B), fixed-point multiplication units and input point indices are introduced on top of the basic process to handle the filtering logic of the computation: Comparison and aggregation logic: Similar to diagram A, the input points undergo parallel comparison and AND logic operations to produce a preliminary validity judgment.

[0109] Fixed-point arithmetic calculation: The preliminary judgment result, along with the input point data, is sent to the fixed-point multiplication / division / modulo unit. This unit is a dedicated computational core used to multiply / divide / modulo a set of fixed-point numbers by a common fixed-point number and output the result.

[0110] Data filtering: The output of the fixed-point multiplication / division / modulo unit and the index of the input point are passed to the zero-point removal unit. Similar to Figure A, it outputs all valid points P_i within the range, and also outputs the index i of the valid points.

[0111] pass Figure 5 As illustrated in the example, the point extraction unit is not a simple software function call, but a dedicated hardware module composed of a comparator array, combinational logic circuits, dedicated computing units, and pipelined control logic. Its series of operations—parallel input comparison, hardware logic determination, and final hardware-level zero-point removal—are all executed in a pipelined or parallel manner at the hardware level, completely avoiding the serial judgment and branch jump overhead of traditional processors (CPUs). This design enables the operation of "obtaining active points within the input search region" to be completed with extremely high throughput and deterministic low latency, making it one of the key hardware foundations supporting the entire mapping relationship construction module and even the entire rulebook generation process to achieve the real-time performance standards required by the NPU.

[0112] The indexing unit is the key execution unit for completing the "coordinate-index" mapping, and it remains connected to both the filling unit and the point extraction unit. For each active point provided by the point extraction unit, the indexing unit performs the following operations: First, it uses the spatial coordinates of the active point (usually calculated and converted to one-dimensional tiled coordinates) as the target index address; then, it writes the corresponding sequential index of the active point as the data value to the corresponding position in the address array created and initialized by the filling unit. Through this write operation, the value of the coordinate position in the address array is updated from an invalid identifier value to a valid sequential index, thus completing the mapping from "coordinates" to "input point index".

[0113] The workflow of the three units described above exhibits a clear sequence and coordination. The entire mapping relationship construction process is as follows: the filling unit acts first, preparing an initial "empty" array; subsequently, the point extraction unit prepares the valid data to be filled into the array and its indices in parallel; finally, the indexing unit calculates the address based on the coordinates and performs batch write operations, ultimately completing the construction of the entire lookup table. This collaborative architecture is highly beneficial for achieving efficient pipelined processing on dedicated hardware such as neural network processors (NPUs), thereby significantly accelerating the generation speed of the rulebook.

[0114] This embodiment achieves precise division of labor and coordination among the filling unit, point extraction unit, and indexing unit. This implementation not only clearly defines the internal structure of the device, but also provides a solid foundation for subsequent hardware implementation or software optimization due to the single function and clear interface of each unit. This is an important guarantee for the high-performance parallel processing capability of this patented solution.

[0115] In one optional embodiment of this application, the rule matching module includes: The matching execution unit, connected to the indexing unit, is used to query the address array for each item to be matched, using the coordinates of its contained theoretical input point as the address. If the query result is a non-invalid identifier value, the item to be matched is determined to be matched successfully, and the query result is the corresponding valid input point index. If the query result is the preset invalid identifier value, the item to be matched is determined to be matched unsuccessfully.

[0116] The zero-point removal unit, connected to the matching execution unit, is used to filter all items to be matched whose query results are the preset invalid identifier values, and output a set consisting of the valid input point index corresponding to the successfully matched item and the internal position index of the feature extraction window.

[0117] The rule matching module comprises two logically interconnected functional units: a matching execution unit and a zero-point removal unit. This modular design allows the complex task of matching to be broken down into several well-organized subtasks that are easy to execute in parallel or pipelined on hardware.

[0118] The matching execution unit is the core executor of the matching process. Connected to the indexing unit, it can access the constructed address array (i.e., mapping relationships). Its specific task is to perform batch queries on all items to be matched generated for each output point within the current spatial block. For each item to be matched, the unit directly accesses the address array using the coordinates of its contained theoretical input points (usually converted to one-dimensional tiled coordinates) as the query address. The logic for determining the query results is clear and efficient: if the query result is a non-invalid flag value (i.e., not a preset invalid value filled in during initialization, such as 0), then the item to be matched is determined to have matched successfully, and the query result itself is a valid input point index; if the query result is a preset invalid flag value, then the item to be matched is determined to have failed to match.

[0119] The zero-point removal unit, connected to the matching execution unit, is responsible for post-processing the matching results. Its core function is filtering. This unit receives all matching results from the matching execution unit and, based on the judgment result, removes all failed matches (i.e., items with invalid query results) from the current processing stream. Finally, this unit outputs a clean set consisting of the indices of valid input points and the internal position indices of the feature extraction window corresponding to all successfully matched matches. This set is the core content of the current spatial block rule manual fragment, precisely defining the valid input-output-convolution kernel weight connection relationships.

[0120] The workflows of the two units described above exhibit a clear sequence and coordination. The entire matching process is as follows: the matching execution unit acts first, performing high-speed address lookups and preliminary determinations on all items to be matched in parallel; subsequently, the zero-point removal unit filters the preliminary results, removing invalid items and outputting the final set of valid connections. This collaborative architecture of "query-determination-filtering" is highly beneficial for achieving efficient pipelined processing on dedicated hardware such as neural network processors (NPUs).

[0121] This embodiment achieves precise division of labor and collaboration between the matching execution unit and the zero-point removal unit. This implementation not only clearly defines the internal structure of the device, but also provides a solid foundation for subsequent hardware implementation due to the single function and clear interface of each unit. In particular, the introduction of the "zero-point removal unit" directly embodies the innovative idea of ​​hardware-level efficient filtering of a large number of invalid connections (zero points) in sparse data, replacing the complex logical judgments in traditional software solutions. This significantly accelerates the generation speed of the submanifold convolution rule manual, which is an important guarantee for the high-performance parallel processing of this patented solution.

[0122] In one optional embodiment of this application, the device further includes: a fixed-point vector multiplication unit, a fixed-point vector division unit, and a fixed-point vector modulus taking unit; wherein, when the point extraction unit and / or the rule matching module determine the spatial range and calculate the coordinates, they call the fixed-point vector multiplication unit, the fixed-point vector division unit, or the fixed-point vector modulus taking unit to perform the calculation.

[0123] The purpose of these dedicated computing units is to provide hardware-level acceleration for core steps involving spatial logic judgment and numerical calculation in the device. When performing its functions, such as accurately determining whether a spatial coordinate point is within the boundary of the current input search region, or performing coordinate format conversion, the point extraction unit needs to perform a large number of scalar and vector calculations. Similarly, the rule matching module may also involve complex arithmetic operations when generating matching items or processing coordinate mapping. During such calculations, the point extraction unit and / or the rule matching module will call the corresponding fixed-point vector operation units to perform operations according to specific computational needs. For example, when calculating the search region boundary determined by the block position and convolution kernel size, it may be necessary to call the fixed-point vector multiplication unit for scaling; when performing coordinate normalization or address offset calculation, it may be necessary to call the fixed-point vector division unit or the fixed-point vector modulus unit.

[0124] This hardware-level calling mechanism embodies the design optimization principles of System-on-a-Chip (SoC) or Application-Specific Integrated Circuit (ASIC). These fixed-point vector operation units, acting as coprocessors or hardware acceleration IPs, are integrated within the chip and connected to core logic units such as point extraction units and rule matching modules via a high-speed on-chip bus or dedicated data path. When the main logic unit encounters a computational task, it does not process it via software instructions from a general-purpose arithmetic logic unit (ALU). Instead, it sends the computational task, operands, and data flow dependencies to the corresponding dedicated hardware unit. The dedicated unit completes the computation with extremely high parallelism and energy efficiency, then returns the result, freeing up the main logic unit to focus on flow control and logical judgment.

[0125] By introducing the aforementioned dedicated fixed-point vector operation unit and establishing an efficient calling mechanism, this embodiment achieves significant technical benefits. First, it moves these frequent and fundamental mathematical operations from the software level to the hardware level. Leveraging the parallelism and low latency of hardware circuits, it greatly improves the execution speed of basic operations such as coordinate calculation and range determination, thereby shortening the overall latency of submanifold convolution rulebook generation. Second, dedicated hardware units are typically more energy-efficient than general-purpose processors when performing specific operations, which helps reduce the overall power consumption of the device. This is crucial for deploying this technology in mobile devices or edge computing scenarios. Finally, this architectural optimization enables the submanifold convolution rulebook generation device to better meet the needs of applications with extremely high real-time requirements (such as real-time point cloud processing in autonomous driving), improving the overall system performance and responsiveness.

[0126] In one optional embodiment of this application, the acquisition module, the mapping relationship construction module, the rule matching module, and the result storage module are integrated into a neural network processor and implemented by a dedicated hardware circuit.

[0127] The core of this highly integrated hardware implementation lies in directly embedding and mapping the functions of the aforementioned modules into dedicated computing units, control logic, and high-speed data paths within the NPU. For example, the acquisition module and mapping relationship construction module can be implemented as fixed-function pipelines within the NPU specifically for processing sparse data address mapping; the core operations of the rule matching module (such as address array lookup and zero-value filtering) can be executed in parallel by the NPU's tensor cores or a custom comparator array; and the result storage module is tightly coupled with the NPU's on-chip cache (SRAM) and its memory controller (MC), responsible for organizing and temporarily storing submanifold convolution rule manual data in an efficient "block-separated" format. The collaborative work between modules is scheduled by dedicated control logic or microcontrollers (such as RISC-V cores) within the NPU, and data interaction is achieved through a high-speed on-chip network (NoC) or crossbar.

[0128] By implementing the entire rulebook generation process within the NPU using dedicated hardware circuitry, this embodiment delivers significant technical benefits and performance advantages. First, it achieves extreme performance and energy efficiency improvements. The dedicated hardware circuitry eliminates the overhead of instruction fetching and decoding inherent in traditional software implementations and is deeply optimized for the specific task of sparse data matching, resulting in an order-of-magnitude improvement in rulebook generation speed compared to CPU software implementations, while significantly reducing power consumption. Second, this integration approach achieves low latency and high parallelism. Multiple computing units within the NPU can process different spatial blocks in parallel, or process a large number of matching items in parallel within a single spatial block, greatly shortening processing time and meeting the stringent real-time requirements of scenarios such as autonomous driving. Finally, it constitutes a complete hardware acceleration solution. This allows for a highly efficient processing pipeline, from sparse input feature maps to rulebook generation and finally to submanifold convolution calculations, to be entirely integrated within the NPU, minimizing data exchange with external CPUs or memory, reducing system bandwidth pressure, and providing a solid foundation for high-performance edge AI inference on terminal devices.

[0129] The hardware integration scheme claimed in this embodiment is the key to whether the patented technical solution can play its advantages of high performance and low latency in real-world applications. It ensures from a physical level that the rule manual generation method can be executed with optimal efficiency and energy efficiency.

[0130] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0131] Figure 6 This is a structural block diagram illustrating an electronic device 700 for generating a rulebook, according to an exemplary embodiment. For example, the electronic device 700 may be a computer.

[0132] Reference Figure 6 The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0133] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0134] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instruction messages, pictures, videos, etc., for any application or method operating on electronic device 700. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0135] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.

[0136] Multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation.

[0137] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0138] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0139] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0140] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0141] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0143] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a terminal's processor, enables the terminal to execute a rulebook generation method, the method comprising: The space of the input feature map is divided into multiple spatial blocks, and the coordinates of each active point in the input feature map are obtained; For each current space block, perform the following steps: Within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window used, a mapping relationship from coordinates to input point indices is constructed; Based on the coordinates of each output point and the parameters of the feature extraction window, corresponding matching items are generated respectively; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined according to the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and its internal position index in the corresponding feature extraction window; The mapping relationship is used to match multiple items to be matched, and the index of the corresponding valid input point and the internal position index of the feature extraction window are selected for each output point; The matching results of each of the space blocks are stored to form a rule manual.

[0144] Optionally, constructing the mapping relationship from coordinates to input point indices includes: Create an address array corresponding to the coordinates within the input search area, and initialize each element of the address array to a preset invalid flag value; Obtain the sequential index of the active points located within the input search area in the input sequence; Using the coordinates of each activity point as the index address of the address array, the corresponding sequential index is written into the corresponding position of the address array.

[0145] Optionally, the step of using the mapping relationship to perform matching processing on multiple items to be matched, and filtering out the index of the corresponding valid input point and the internal position index of the feature extraction window for each output point, includes: For each item to be matched, the address array is queried using the coordinates of the theoretical input point it contains as the address; If the query result is a non-invalid identifier value, then the item to be matched is determined to be a successful match, and the query result is the corresponding valid input point index; If the query result is the preset invalid identifier value, then the item to be matched is determined to have failed to match; Filter out all unmatched items to be matched, forming a set consisting of the indices of the valid input points corresponding to the successfully matched items and the internal position indices of the feature extraction window.

[0146] Optionally, after performing matching processing on the plurality of items to be matched using the mapping relationship, the method further includes: Obtain the first number of active points within the current spatial block that serve as output points; Obtain the second number of valid input points after matching; The stored matching results include at least: the first quantity, the second quantity, a set of indices of valid input points, and a set of internal position indices of the feature extraction window corresponding to the valid input points.

[0147] Optionally, storing the matching results of each of the space blocks includes: The same type of information in the rulebook fragments generated for each space block is stored contiguously in memory.

[0148] Optionally, dividing the space of the input feature map into multiple spatial blocks includes: The space is divided into M blocks along one of the three dimensions of the input feature map, where M is an integer greater than 1.

[0149] Optionally, the coordinates are one-dimensional tiled coordinates, and obtaining the coordinates of each active point in the input feature map includes: Obtain the three-dimensional spatial coordinates of each active point in the input feature map; Sort the data according to the preset three-dimensional order, and convert the three-dimensional spatial coordinates of each active point into one-dimensional tiled coordinates.

[0150] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, please refer to each other.

[0151] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0152] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0153] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0155] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments, as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0156] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0157] The foregoing has provided a detailed description of a method for generating a rule manual, a device for generating a rule manual, an electronic device, and a readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for generating a rule manual, characterized in that, The method includes: The space of the input feature map is divided into multiple spatial blocks, and the coordinates of each active point in the input feature map are obtained; For each current space block, perform the following steps: Within the input search region determined by the position of the current spatial block and the parameters of the feature extraction window used, a mapping relationship from coordinates to input point indices is constructed; wherein, constructing the mapping relationship from coordinates to input point indices includes: creating an address array corresponding to the coordinates within the input search region, and initializing each element of the address array to a preset invalid identifier value; obtaining the sequential index of the active points located within the input search region in the input sequence; using the coordinates of each active point as the index address of the address array, and writing the corresponding sequential index into the corresponding position of the address array; Based on the coordinates of each output point and the parameters of the feature extraction window, corresponding matching items are generated respectively; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined according to the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and its internal position index in the corresponding feature extraction window; The mapping relationship is used to match multiple items to be matched, and the index of the corresponding valid input point and the internal position index of the feature extraction window are selected for each output point; The matching results of each of the space blocks are stored to form a rule manual.

2. The method according to claim 1, characterized in that, The process of matching multiple items to be matched using the mapping relationship, and filtering out the index of the corresponding valid input point and the internal position index of the feature extraction window for each output point, includes: For each item to be matched, the address array is queried using the coordinates of the theoretical input point it contains as the address; If the query result is a non-invalid identifier value, then the item to be matched is determined to be a successful match, and the query result is the corresponding valid input point index; If the query result is the preset invalid identifier value, then the item to be matched is determined to have failed to match; Filter out all unmatched items to be matched, forming a set consisting of the indices of the valid input points corresponding to the successfully matched items and the internal position indices of the feature extraction window.

3. The method according to claim 1, characterized in that, After performing matching processing on the multiple items to be matched using the mapping relationship, the method further includes: Obtain the first number of active points within the current spatial block that serve as output points; Obtain the second number of valid input points after matching; The stored matching results include at least: the first quantity, the second quantity, a set of indices of valid input points, and a set of internal position indices of the feature extraction window corresponding to the valid input points.

4. The method according to claim 1, characterized in that, The matching processing results for storing each of the space blocks include: The same type of information in the rulebook fragments generated for each space block is stored contiguously in memory.

5. The method according to claim 1, characterized in that, The process of dividing the space of the input feature map into multiple spatial blocks includes: The space is divided into M blocks along one of the three dimensions of the input feature map, where M is an integer greater than 1.

6. The method according to any one of claims 1-5, characterized in that, The coordinates are one-dimensional tiled coordinates, and obtaining the coordinates of each active point in the input feature map includes: Obtain the three-dimensional spatial coordinates of each active point in the input feature map; Sort the data according to the preset three-dimensional order, and convert the three-dimensional spatial coordinates of each active point into one-dimensional tiled coordinates.

7. A rulebook generation apparatus, characterized in that, The device includes: The acquisition module is used to divide the space of the input feature map into multiple spatial blocks and acquire the coordinates of each active point in the input feature map; The mapping relationship construction module is used to construct a mapping relationship from coordinates to input point indices for each current spatial block within the input search area determined by the position of the current spatial block and the parameters of the feature extraction window used. The rule matching module is used to generate corresponding matching items based on the coordinates of each output point and the parameters of the feature extraction window, and to perform matching processing on multiple matching items using the mapping relationship, thereby filtering out the index of the corresponding valid input point and the internal position index of the feature extraction window for each output point; wherein, the output point is an active point located within the current spatial block, the coordinates of the output point are determined based on the coordinates of the input point, and the matching item includes the coordinates of the theoretical input point and the internal position index of the corresponding feature extraction window; The result storage module is used to store the matching processing results of each of the spatial blocks to form a rule manual; The mapping relationship construction module includes: A filling unit is used to create an address array corresponding to the coordinates in the input search area, and initialize each element of the address array to a preset invalid flag value; A point extraction unit, connected to the acquisition module, is used to acquire the sequential index of active points located within the input search area in the input sequence; An indexing unit, connected to the filling unit and the point extraction unit, is used to write the corresponding sequential index into the corresponding position of the address array, using the coordinates of each active point as the index address of the address array.

8. The apparatus according to claim 7, characterized in that, The rule matching module includes: The matching execution unit, connected to the index unit, is used to query the address array for each item to be matched, using the coordinates of its contained theoretical input points as the address. If the query result is a non-invalid identifier value, the item to be matched is determined to be matched successfully, and the query result is the corresponding valid input point index. If the query result is the preset invalid identifier value, the item to be matched is determined to be matched unsuccessfully. The zero-point removal unit, connected to the matching execution unit, is used to filter all items to be matched whose query results are the preset invalid identifier values, and output a set consisting of the valid input point index corresponding to the successfully matched item and the internal position index of the feature extraction window.

9. The apparatus according to claim 7, characterized in that, The device further includes: Fixed-point vector multiplication unit, fixed-point vector division unit, and fixed-point vector modulus taking unit; Specifically, when determining the spatial range and calculating coordinates, the point extraction unit and / or the rule matching module call the fixed-point vector multiplication unit, the fixed-point vector division unit, or the fixed-point vector modulus unit to perform the calculations.

10. The apparatus according to claim 7, characterized in that, The acquisition module, the mapping relationship construction module, the rule matching module, and the result storage module are integrated into the neural network processor and implemented by dedicated hardware circuitry.

11. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method for generating a rulebook as described in any one of claims 1-6.

12. A readable storage medium, characterized in that, The program or instructions are stored on the readable storage medium, and when executed by a processor, the program or instructions implement the steps of the rulebook generation method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data processing system and method applied to multilayer sparse convolutional neural network model

    CN117496182A

  • Tile-based sparsity aware dataflow optimization for sparse data

    US20210090328A1