Method and device for constructing data storage structure, electronic equipment and storage medium

By binding the data unit to the memory pool and allocating the storage tasks of the same thread, the problem of data competition in parallel computing is solved and a more efficient computing process is achieved.

CN119336273AInactive Publication Date: 2025-01-21PHLEXING TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411770274.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-01-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In parallel computing, the prior art requires the use of thread locks to avoid data competition, which will block other threads and reduce computing efficiency.

Method used

By binding data units to memory pools and allocating storage tasks corresponding to data units bound to the same memory pool to the same thread, thread locks are avoided to reduce data contention.

Benefits of technology

When performing parallel calculations, data competition can be avoided without the use of thread locks and calculation efficiency can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336273A_ABST
    Figure CN119336273A_ABST
Patent Text Reader

Abstract

The invention relates to a method and a device for constructing a data storage structure, electronic equipment and a storage medium. The method comprises the following steps: acquiring a plurality of to-be-stored data units; the plurality of data units are respectively bound with a memory pool in the memory pool group, and one memory pool is bound with at least one data unit; distributing the storage tasks corresponding to the data units bound to the same memory pool to the same thread; and executing the plurality of threads in parallel to construct data storage structures corresponding to the plurality of data units based on the memory pool group. According to the technical scheme, after the data units and the memory pools are bound, the storage tasks corresponding to the data units bound to the same memory pool are allocated to the same thread, so that data competition can be avoided without using a thread lock during parallel computing, and the computing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of integrated chip packaging structures, and in particular to a method, device, electronic device and storage medium for constructing a data storage structure. Background Art

[0002] With the evolution of technology, the graphics complexity of chip design is getting higher and higher, and the number of graphics is also increasing. This requires chip design-related software to store and read up to hundreds of millions of graphic data in computer memory. How to improve computing efficiency is very important.

[0003] Parallel computing is a technology that improves computing efficiency. However, parallel computing needs to consider the problem of data contention. If a piece of data is read and written (READ-WRITE) or written (WRITE-WRITE) at the same time, data contention will occur, which may cause precision loss, calculation errors, undefined behavior, and crashes. Existing parallel computing uses thread locks to avoid data contention, but thread locks will block other threads, which is not conducive to improving overall computing efficiency. Summary of the invention

[0004] In response to the above technical problems, the present application provides a method, device, electronic device and storage medium for constructing a data storage structure. After binding the data unit to the memory pool, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread, thereby avoiding data contention and improving computing efficiency when performing parallel computing without using thread locks.

[0005] In order to solve the above technical problems, the present application provides a method for constructing a data storage structure, the method comprising the following steps: Acquire multiple data units to be stored; Binding the plurality of data units to a memory pool in the memory pool group respectively, wherein one memory pool is bound to at least one data unit; Allocating storage tasks corresponding to data units bound to the same memory pool to the same thread; The plurality of threads are executed in parallel to construct a data storage structure corresponding to the plurality of data units based on the memory pool group. In some embodiments, the binding of the plurality of data units to a memory pool in the memory pool group respectively comprises at least one of the following: Based on the storage task load balancing principle, the plurality of data units are respectively bound to a memory pool in the memory pool group; Based on the storage space load balancing principle, the multiple data units are respectively bound to a memory pool in the memory pool group.

[0006] In some embodiments, the step of binding the plurality of data units to a memory pool in the memory pool group based on a storage task load balancing principle includes: Obtain the load prediction result of the storage task of the target data unit, bind the target data unit to the memory pool with the smallest current storage task load, and update the task load of each memory pool according to the load prediction result, and repeat this step until all data units are bound to the corresponding memory pool; And / or, based on the storage space load balancing principle, the plurality of data units are respectively bound to a memory pool in the memory pool group, including: Obtain the storage space required by the target data unit, bind the target data unit to the memory pool with the smallest current storage space load, and update the storage space load of each memory pool according to the storage space required by the target data unit. Repeat this step until all data units are bound to the corresponding memory pools.

[0007] In some embodiments, the data unit includes data of a chip circuit pattern, and the acquiring of a plurality of data units to be stored includes: Acquire graphic data of a chip circuit graphic to be stored, wherein the graphic data includes boundary coordinates of the circuit graphic; Based on a preset grid boundary and the boundary coordinates of the circuit pattern, inserting each circuit pattern into a corresponding grid; The data unit is obtained according to the graphic data in each of the grids.

[0008] In some embodiments, the storage task includes at least one of the following: A first storage task, used for performing preset processing on the data in the data unit to store the data in the data unit when the data amount of the data unit does not exceed a threshold; The second storage task is used to convert the data unit into a secondary data unit when the data amount of the data unit exceeds a threshold, and perform the preset processing on the secondary data unit to store the data in the data unit.

[0009] In some embodiments, executing the plurality of threads in parallel to construct a data storage structure corresponding to the plurality of data units based on the memory pool group includes: During the parallel execution of the plurality of threads, each thread sequentially constructs a data storage structure corresponding to each data unit based on the data units in the corresponding memory pool.

[0010] In some embodiments, allocating storage tasks corresponding to data units bound to the same memory pool to the same thread includes at least one of the following: After all data units have completed binding with corresponding memory pools, storage tasks corresponding to data units bound to the same memory pool are assigned to the same thread; After some data units have completed binding with the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread to start executing the steps of executing multiple threads in parallel, and in the process of executing multiple threads in parallel, according to the binding results of the remaining data units with the corresponding memory pools, the storage tasks of the data units bound to the corresponding memory pool continue to be assigned to the corresponding threads.

[0011] The present application also provides a device for constructing a data storage structure, the device comprising: A data unit acquisition module, used to acquire multiple data units to be stored; A binding module, used for binding the plurality of data units to a memory pool in the memory pool group respectively, wherein one memory pool is bound to at least one data unit; An allocation module, used for allocating storage tasks corresponding to data units bound to the same memory pool to the same thread; The thread execution module is used to execute the plurality of threads in parallel to construct a data storage structure corresponding to the plurality of data units based on the memory pool group.

[0012] The present application also provides an electronic device, including a storage medium and a controller, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the method for constructing a data storage structure as described above are implemented.

[0013] The present application also provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for constructing a data storage structure as described above are implemented.

[0014] The method, device, electronic device and storage medium for constructing a data storage structure of the present application include: obtaining multiple data units to be stored; binding the multiple data units to a memory pool in a memory pool group respectively, wherein a memory pool is bound to at least one data unit; assigning storage tasks corresponding to data units bound to the same memory pool to the same thread; executing multiple threads in parallel to construct a data storage structure corresponding to multiple data units based on the memory pool group. The technical solution of the present application, after binding the data unit to the memory pool, assigns the storage tasks corresponding to the data units bound to the same memory pool to the same thread, thereby avoiding data competition and improving computing efficiency without using thread locks when performing parallel computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of a method for constructing a data storage structure according to an embodiment.

[0016] Figure 2 It is a schematic diagram of a process of constructing a data storage structure according to an embodiment.

[0017] Figure 3 is a schematic diagram of graphic data according to an embodiment.

[0018] Figure 4 is a schematic diagram showing construction of a grid based on graphic data according to an embodiment.

[0019] Figure 5 It is a structural diagram of a device for constructing a data storage structure according to an embodiment. DETAILED DESCRIPTION

[0020] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thoroughly understood.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. In the present invention, "each" includes one and more than two quantities.

[0022] Figure 1 FIG. 1 is a flow chart showing a method for constructing a data storage structure according to an embodiment. Figure 1 As shown, a method for constructing a data storage structure of the present application includes the following steps: S1, obtaining multiple data units to be stored; S2, respectively binding the plurality of data units to a memory pool in the memory pool group, wherein a memory pool is bound to at least one data unit; S3, assigns the storage tasks corresponding to the data units bound to the same memory pool to the same thread; S4, executing multiple threads in parallel to build a data storage structure corresponding to multiple data units based on the memory pool group. The data unit is a group of data, such as a group of graphic data, a group of resistance data, a group of capacitance data, a group of material data, etc., which need to build a data storage structure. The data storage structure is used to store data and is used for subsequent data search and processing processes. For example, the data storage structure can be a K-dimensional tree (KDTREE), a binary / quad / octree, a grid of each dimension, a binary tree index grid, or a combination of these structures (Hybrid).

[0023] The memory pool group can be one or more groups. Taking graphic data as an example, the memory pool groups can be differentiated according to the attributes of the graphics, such as corresponding memory pool groups are set according to conductive materials, dielectric materials, insulating materials, etc. There can be multiple memory pools in each memory group, each memory pool can store one or more data units, and each data unit is uniquely bound to a memory pool in the memory pool group.

[0024] The number of memory pools is generally equal to the number of computing cores. The number of memory pools can also be set to exceed the number of parallel computing cores to increase the granularity, thereby shortening the thread execution time while keeping the task volume unchanged.

[0025] After the data units are bound to the memory pools respectively, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread. Therefore, the memory pool does not have to be bound to a specific thread. Instead, when the data units are bound to the memory pool, it is equivalent to assigning a group of future parallel tasks. The memory pool to which the data units required for task execution are bound determines the parallel task group to which the task belongs (a parallel task group is executed by one thread), so that data competition can be avoided without using thread locks during parallel computing, thereby improving computing efficiency.

[0026] Please refer to Figure 2, taking data units a~i, n memory pools, and n threads as an example. Each data unit is bound to a memory pool in the memory pools numbered 1, 2, 3, 4, ... n. When binding the data unit to the memory pool, the memory pool corresponding to each data unit is allocated, and the numbers 1, 2, 3, 4, ... n of each data unit and the memory pool to which it is allocated are stored accordingly. When assigning tasks to threads, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread, that is, the tasks corresponding to the data units b and d assigned to memory pool 1 are assigned to thread 1, the tasks corresponding to the data units a and g assigned to memory pool 2 are assigned to thread 2, the tasks corresponding to the data units c and h assigned to memory pool 3 are assigned to thread 3, the tasks corresponding to the data units e and f assigned to memory pool 4 are assigned to thread 4, and the tasks corresponding to the data unit n assigned to memory pool n are assigned to thread n. In this way, the tasks required to be executed by the data units with the same memory pool number are assigned to the same thread. Since these data units have been assigned to different memory pools, when performing parallel computing, threads 1, 2, 3, 4, ...n are equivalent to being uniquely bound to memory pools 1, 2, 3, 4, ...n respectively. Each memory pool will only be modified by one thread at a time, and data competition can be avoided without using thread locks.

[0027] In some embodiments, step S2, binding the plurality of data units to a memory pool in the memory pool group, respectively, includes at least one of the following: Based on the storage task load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group; Based on the storage space load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group.

[0028] Among them, storage task load balancing means that the difference between the storage task loads corresponding to each memory pool is minimized. The storage task load can be characterized by the number of computing instructions required for the task, or the total time required to complete the instructions for the task. Storage space load balancing means that the difference between the storage space loads corresponding to each memory pool is minimized. The storage space load can be characterized by the amount of memory occupied by the computer operation. The memory required for the computer operation includes physical memory and virtual memory.

[0029] The load calculation function can be used to estimate and output the storage task load and storage space load brought by each task. If the storage task load is known, the load calculation function does not need to be used. The calculation result of the load is used as the input of the allocation function. The allocation function maintains an ordered list of all memory pools in the memory pool group, and calculates the storage task load (time) and storage space load (space) of each memory pool after the task is added. Then, the optimal memory pool is selected according to the set principles. The set principles include storage task load balancing, storage space load balancing, and relative balance between storage task load and storage space load balancing of the memory pool.

[0030] In some embodiments, based on the storage task load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group, including: Obtain the load prediction result of the storage task of the target data unit, bind the target data unit to the memory pool with the smallest current storage task load, and update the task load of each memory pool according to the load prediction result. Repeat this step until all data units are bound to the corresponding memory pool.

[0031] Among them, the target data unit is the data unit currently traversed among all data units. When binding is performed based on the storage task load balancing principle, the target data unit is bound to the memory pool with the smallest current storage task load to minimize the gap between the storage space loads corresponding to each memory pool.

[0032] In some embodiments, based on the storage space load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group, including: Obtain the storage space required by the target data unit, bind the target data unit to the memory pool with the smallest current storage space load, and update the storage space load of each memory pool according to the storage space required by the target data unit. Repeat this step until all data units are bound to the corresponding memory pools.

[0033] Among them, when binding is performed based on the storage space load balancing principle, the target data unit is bound to the memory pool with the smallest current storage space load to minimize the difference between the storage space loads corresponding to each memory pool. Afterwards, the storage space load of each memory pool is updated according to the storage space required to be occupied by the target data unit, and the next data unit is bound.

[0034] In some embodiments, the data unit includes data of a circuit pattern, and step S1, obtaining a plurality of data units to be stored, includes: Acquire graphic data of a chip circuit graphic to be stored, the graphic data including boundary coordinates of the circuit graphic; Inserting each circuit graphic into a corresponding grid based on the preset grid boundary and the boundary coordinates of the circuit graphic; Data units are obtained according to the graphic data in each grid.

[0035] Among them, please refer to Figure 3 , is a schematic diagram of circuit graphic data. Circuit graphics are used to represent the structural components such as wires and dielectrics in the circuit. Each circuit graphic corresponds to a boundary coordinate to indicate its position in the circuit design diagram. Taking the grid division method to obtain data units as an example, Figure 4 As shown, based on the preset grid boundary and the boundary coordinates of the circuit pattern, each circuit pattern is inserted into the corresponding grid, wherein when a pattern intersects with two or more grids at the same time, the pattern is respectively inserted into the corresponding intersecting grids. At this time, the graphic data corresponding to the circuit pattern in each grid is a data unit, so that multiple data units are obtained through grid division.

[0036] In some embodiments, the storage task includes at least one of the following: A first storage task is used to perform preset processing on the data in the data unit to store the data in the data unit when the data amount of the data unit does not exceed a threshold value; The second storage task is used to convert the data unit into a secondary data unit when the data volume of the data unit exceeds a threshold value, and perform preset processing on the secondary data unit to store the data in the data unit.

[0037] Among them, the storage task is mainly used to perform preset processing on the data in the data unit and to convert some data units into secondary data units to optimize the efficiency of subsequent data searches.

[0038] The primary data unit is a data unit for storing data, which does not need to be further converted. The secondary data unit is a data unit for storing data obtained by further converting the primary data unit.

[0039] Taking the data unit used to store the graphic data of each grid as an example, the first-level data unit stores the graphics of the first-level grid, which does not need to be further divided. The second-level data unit stores the graphics of the second-level grid obtained by further dividing the first-level grid. The second-level grid includes the second-level grid for storing graphics and the first-level grid for storing the second-level grid. Please refer to Figure 4 ,Take the first network in the second row as an example, the number of circuit graphics in this grid exceeds the threshold and is further transformed into a secondary grid.

[0040] In some embodiments, the preset processing includes at least one of the following: Calculate the Manhattan distance between each circuit graphic and the boundary of the grid in which it is located, and sort the circuit graphics in the grid according to the Manhattan distance; Calculate the area of ​​each circuit graphic and sort the circuit graphics in the grid according to the area; Calculate the volume of each circuit graphic and sort the circuit graphics in the grid according to the volume; Merge the circuit graphics within the grid.

[0041] The area of ​​the circuit pattern can be the projection area of ​​the pattern on a specified projection plane (such as the xy plane) or the surface area of ​​the pattern. The merging process is used to reduce or eliminate the overlapping areas between the patterns.

[0042] Taking the preset process of calculating the Manhattan distance between each circuit pattern and the boundary of the grid where it is located, and sorting the circuit patterns in the grid according to the Manhattan distance as an example, when the number of circuit patterns in the grid does not exceed the threshold, the first storage task is executed, and the calculation formula of the storage task load is "time load = number of patterns * single Manhattan distance calculation time + sorting time coefficient * LOG (number of patterns)". The calculation formula of the storage space load is "space load = number of patterns * single data volume".

[0043] When the number of circuit graphics in the grid exceeds the threshold, the second storage task is executed, and the calculation formula of the storage task load is "time load = number of graphics * time for a single graphic to be inserted into the second-level grid + average calculation amount of the second-level grid unit * number of second-level grid units", "average calculation amount of each unit of the second-level grid = average number of graphics in the second-level grid unit * single Manhattan distance calculation time + sorting time coefficient * LOG (average number of graphics in the second-level grid unit)". The calculation formula of the storage space load is "space load = amount of data in the second-level grid + average amount of data in the second-level grid unit * number of second-level grid units". In this example, for simplicity, it is set that "number of second-level grid units = CEIL (SQRT (number of graphics))", "average number of graphics in the second-level grid unit = CEIL (number of graphics / number of second-level grid units)".

[0044] by Figure 4Taking the network division result shown in the figure as an example, the data unit and the memory pool are bound based on the storage task load balancing principle. It is set to start from the first row of grids and traverse from left to right and from top to bottom to obtain the data unit. Assuming there are four memory pools, the time load (expressed in unit time) corresponding to each grid in the first row of grids is 6, 8, 2, 10, 5, 6, 8, 1, 10, 5, then the first 4 data units are given to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 respectively. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6, 8, 2, and 10 respectively, and the time load of memory pool 3 is the smallest.

[0045] When allocating data units of the 5th grid, the data units of the 5th grid will be allocated to memory pool 3 with a time load of 2. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6, 8, 2+5, and 10 respectively, and the time load of memory pool 1 is the smallest.

[0046] When allocating data units of the 6th grid, the data units of the 6th grid will be allocated to memory pool 1 with a time load of 6. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6+6, 8, 2+5, and 10 respectively, and the time load of memory pool 3 is the smallest.

[0047] When allocating data units of the 7th grid, the data units of the 7th grid will be allocated to memory pool 3 with a time load of 7. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6+6, 8, 2+5+8, and 10 respectively, and the time load of memory pool 2 is the smallest.

[0048] When allocating data units of the 8th grid, the data units of the 8th grid will be allocated to memory pool 2 with a time load of 8. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6+6, 8+1, 2+5+8, and 10 respectively, and the time load of memory pool 3 is the smallest.

[0049] When allocating data units of the 9th grid, the data units of the 9th grid will be allocated to memory pool 3 with a time load of 9. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6+6, 8+1+10, 2+5+8, and 10 respectively, and the time load of memory pool 4 is the smallest.

[0050] When allocating the data unit of the 10th grid, the data unit of the 10th grid will be allocated to memory pool 4 with a time load of 10. At this time, the time loads corresponding to memory pool 1, memory pool 2, memory pool 3, and memory pool 4 are 6+6, 8+1+10, 2+5+8, and 10+5 respectively. This process is repeated until all data units are allocated and storage task load balancing is achieved.

[0051] It can be understood that the allocation method based on the storage space load balancing principle is different from Figure 4 The corresponding allocation methods are similar and will not be listed here.

[0052] In some embodiments, step S4, executing multiple threads in parallel to construct a data storage structure corresponding to multiple data units based on the memory pool group, includes: During the parallel execution of multiple threads, each thread sequentially constructs a data storage structure corresponding to each data unit based on the data unit group in the corresponding memory pool.

[0053] When constructing the data storage structure, multiple threads are executed in parallel. On this basis, each thread sequentially constructs the data storage structure corresponding to each data unit based on the data unit in the corresponding memory pool. When the currently processed data unit is not a secondary data unit, the first storage task is executed, and when the currently processed data unit needs to be converted into a secondary data unit, the second storage task is executed.

[0054] In some embodiments, allocating storage tasks corresponding to data units bound to the same memory pool to the same thread includes at least one of the following: After all data units are bound to the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread; After some data units have completed binding with the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread to start the steps of executing multiple threads in parallel, and in the process of executing multiple threads in parallel, according to the binding results of the remaining data units with the corresponding memory pool, the storage tasks of the data units bound to the corresponding memory pool continue to be assigned to the corresponding threads.

[0055] Among them, after all data units have completed binding with the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool can be assigned to the same thread. The memory pool binding and task assignment can also be performed simultaneously. Since the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread, data competition will not occur even if they are performed simultaneously, and the calculation time can be shortened.

[0056] The method for constructing a data storage structure of the present application includes: obtaining multiple data units to be stored; binding the multiple data units to a memory pool in a memory pool group respectively, wherein a memory pool is bound to at least one data unit; assigning storage tasks corresponding to data units bound to the same memory pool to the same thread; and executing multiple threads in parallel to construct a data storage structure corresponding to multiple data units based on the memory pool group. The technical solution of the present application, after binding the data unit to the memory pool, assigns the storage tasks corresponding to the data units bound to the same memory pool to the same thread, thereby avoiding data competition without using thread locks when performing parallel computing, thereby improving computing efficiency.

[0057] This application combines the advantages of parallel computing and memory pool. While multi-threaded parallel computing uses multi-core central processing units to improve overall efficiency, it uses parallel memory pools that do not rely on thread locks to reduce memory fragmentation and the overhead of underlying memory calls, and improves data locality. This is beneficial to improving the efficiency of parallel spatial data structure search algorithms based on memory pools, and brings significant performance improvements to computing software without losing accuracy.

[0058] Figure 5 FIG. 1 is a schematic diagram of a device for constructing a data storage structure according to an embodiment. Figure 5 As shown, the device for constructing a data storage structure of the present application includes: The data unit acquisition module 501 is used to acquire a plurality of data units to be stored; A binding module 502, used to bind the plurality of data units to a memory pool in the memory pool group respectively, wherein a memory pool is bound to at least one data unit; An allocation module 503, configured to allocate storage tasks corresponding to data units bound to the same memory pool to the same thread; The thread execution module 504 is used to execute multiple threads in parallel to construct a data storage structure corresponding to multiple data units based on the memory pool group.

[0059] In some embodiments, the plurality of data units are respectively bound to a memory pool in the memory pool group, and the binding module 502 performs at least one of the following: Based on the storage task load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group; Based on the storage space load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group.

[0060] In some embodiments, based on the storage task load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group, and the binding module 502 is used to: Obtain the load prediction result of the storage task of the target data unit, bind the target data unit to the memory pool with the smallest current storage task load, and update the task load of each memory pool according to the load prediction result. Repeat this step until all data units are bound to the corresponding memory pools. And / or, based on the storage space load balancing principle, multiple data units are respectively bound to a memory pool in the memory pool group, including: Obtain the storage space required by the target data unit, bind the target data unit to the memory pool with the smallest current storage space load, and update the storage space load of each memory pool according to the storage space required by the target data unit. Repeat this step until all data units are bound to the corresponding memory pools.

[0061] In some embodiments, the data unit includes data of a circuit pattern, and a plurality of data units to be stored are acquired, and the data unit acquisition module 501 is used to: Acquire graphic data of a circuit graphic to be stored, the graphic data including boundary coordinates of the circuit graphic; Inserting each circuit graphic into a corresponding grid based on the preset grid boundary and the boundary coordinates of the circuit graphic; Data units are obtained according to the graphic data in each grid.

[0062] In some embodiments, the storage task includes at least one of the following: A first storage task is used to perform preset processing on the data in the data unit to store the data in the data unit when the data amount of the data unit does not exceed a threshold value; The second storage task is used to convert the data unit into a secondary data unit when the data volume of the data unit exceeds a threshold value, and perform preset processing on the secondary data unit to store the data in the data unit.

[0063] In some embodiments, executing multiple threads in parallel to construct a data storage structure corresponding to multiple data units based on the memory pool group includes: During the parallel execution of multiple threads, each thread sequentially constructs a data storage structure corresponding to each data unit based on the data units in the corresponding memory pool.

[0064] In some embodiments, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread, and the thread execution module 504 performs at least one of the following: After all data units are bound to the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread; After some data units have completed binding with the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread to start the steps of executing multiple threads in parallel, and in the process of executing multiple threads in parallel, according to the binding results of the remaining data units with the corresponding memory pool, the storage tasks of the data units bound to the corresponding memory pool continue to be assigned to the corresponding threads.

[0065] For the specific implementation process of the steps executed by each module in the device for constructing the data storage structure, please refer to the description of the method embodiment and will not be repeated here.

[0066] The present application also provides an electronic device, including a storage medium and a controller, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by the controller, the steps of the method for constructing a data storage structure as described above are implemented.

[0067] The present application also provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for constructing a data storage structure as described above are implemented.

[0068] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for constructing a data storage structure, characterized in that: The method comprises the following steps: Acquire multiple data units to be stored; Binding the plurality of data units to a memory pool in the memory pool group respectively, wherein one memory pool is bound to at least one data unit; Allocating storage tasks corresponding to data units bound to the same memory pool to the same thread; The plurality of threads are executed in parallel to construct a data storage structure corresponding to the plurality of data units based on the memory pool group.

2. The method according to claim 1, characterized in that The step of respectively binding the plurality of data units to a memory pool in the memory pool group comprises at least one of the following: Based on the storage task load balancing principle, the plurality of data units are respectively bound to a memory pool in the memory pool group; Based on the storage space load balancing principle, the multiple data units are respectively bound to a memory pool in the memory pool group.

3. The method according to claim 2, characterized in that The step of binding the plurality of data units to a memory pool in the memory pool group based on the storage task load balancing principle includes: Obtain the load prediction result of the storage task of the target data unit, bind the target data unit to the memory pool with the smallest current storage task load, and update the task load of each memory pool according to the load prediction result, and repeat this step until all data units are bound to the corresponding memory pool; And / or, based on the storage space load balancing principle, the plurality of data units are respectively bound to a memory pool in the memory pool group, including: Obtain the storage space required by the target data unit, bind the target data unit to the memory pool with the smallest current storage space load, and update the storage space load of each memory pool according to the storage space required by the target data unit. Repeat this step until all data units are bound to the corresponding memory pools.

4. The method according to claim 1, characterized in that: The storage task includes at least one of the following: A first storage task, used for performing preset processing on the data in the data unit to store the data in the data unit when the data amount of the data unit does not exceed a threshold; The second storage task is used to convert the data unit into a secondary data unit when the data amount of the data unit exceeds a threshold, and perform the preset processing on the secondary data unit to store the data in the data unit.

5. The method according to any one of claims 1 to 4, characterized in that The executing the plurality of threads in parallel to construct a data storage structure corresponding to the plurality of data units based on the memory pool group includes: During the parallel execution of the plurality of threads, each thread sequentially constructs a data storage structure corresponding to each data unit based on the data units in the corresponding memory pool.

6. The method according to any one of claims 1 to 4, characterized in that The allocating storage tasks corresponding to the data units bound to the same memory pool to the same thread includes at least one of the following: After all data units have completed binding with corresponding memory pools, storage tasks corresponding to data units bound to the same memory pool are assigned to the same thread; After some data units have completed binding with the corresponding memory pools, the storage tasks corresponding to the data units bound to the same memory pool are assigned to the same thread to start executing the steps of executing multiple threads in parallel, and in the process of executing multiple threads in parallel, according to the binding results of the remaining data units with the corresponding memory pools, the storage tasks of the data units bound to the corresponding memory pool continue to be assigned to the corresponding threads.

7. The method according to any one of claims 1 to 4, characterized in that The data unit includes data of a chip circuit pattern, and the acquiring of a plurality of data units to be stored includes: Acquire graphic data of a chip circuit graphic to be stored, wherein the graphic data includes boundary coordinates of the circuit graphic; Based on a preset grid boundary and the boundary coordinates of the circuit pattern, inserting each circuit pattern into a corresponding grid; The data unit is obtained according to the graphic data in each of the grids.

8. A device for constructing a data storage structure, characterized in that: The device comprises: A data unit acquisition module, used to acquire multiple data units to be stored; A binding module, used for binding the plurality of data units to a memory pool in the memory pool group respectively, wherein one memory pool is bound to at least one data unit; An allocation module, used for allocating storage tasks corresponding to data units bound to the same memory pool to the same thread; The thread execution module is used to execute the plurality of threads in parallel to construct a data storage structure corresponding to the plurality of data units based on the memory pool group.

9. An electronic device, comprising a storage medium and a controller, characterized in that: The storage medium stores a computer program, which, when executed by the controller, implements the steps of the method for constructing a data storage structure according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for constructing a data storage structure according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • File request processing method and system

    CN105094992A

  • Network data packet parallel processing method based on Intel DPDK

    CN105577567A

  • Graph data processing method, device and equipment and readable storage medium

    CN112685178A

  • Resource management and distribution method, intelligent computing cloud operating system and computing platform

    CN117992239A