Erp document atom vector splitting and reorganization method and system

By using the atomic vector splitting and reorganization method for ERP documents, the fields of ERP documents are decoupled into atomic feature libraries and business pointer tables. Dynamic weights are used to perform physical slicing and splicing in memory, which solves the redundancy and rigidity problems in the vectorized storage of ERP documents, improves storage efficiency and retrieval flexibility, and supports dynamic adjustment and hot switching.

CN123138306APending Publication Date: 2026-11-20CHANJET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611656215.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies for vectorized storage of ERP documents suffer from problems such as storage redundancy, rigid weight logic, and lack of hot-switching capability, making it difficult to achieve efficient vectorized expression and flexible retrieval.

Method used

The ERP document atomic vector splitting and reorganization method is adopted to decouple the fields into atomic feature libraries and business pointer tables. Through dynamic weights, physical slicing and splicing are performed in memory to generate complete vector representations. Independent atomic vector caches for products and suppliers are built to achieve zero storage redundancy and hot switching capability.

Benefits of technology

It achieves zero storage redundancy, improves vector storage efficiency and query flexibility, supports dynamic adjustment according to business scenarios, improves the loading concurrency and cache hit rate of key business entities, and avoids I/O overhead and state pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138306A_ABST
    Figure CN123138306A_ABST
Patent Text Reader

Abstract

The application discloses an ERP document atom vector splitting and recombining method and system, and relates to the technical field of database storage optimization. The method comprises the following steps: constructing an atom feature library and a business pointer table to realize decoupling of document field semantics; the atom feature library stores standardized vector representations corresponding to the smallest field units which cannot be divided; the business pointer table only stores the foreign key association between the document primary key and the vector index in the atom feature library; when querying, physical slicing is performed on the atom vector according to dynamic weights, and the length of each slice is proportional to the corresponding dynamic weight; the physical slices are spliced in the application memory according to the weight proportion to complete runtime vector assembly; and a double-path atom vector cache strategy for commodities and suppliers is supported. The application stores the atom vector through static deduplication, performs zero-redundancy pointer association and memory-level dynamic weighted slicing and recombination to improve the storage efficiency, retrieval flexibility and runtime adaptability of the vectorized expression of the ERP document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of database storage optimization technology, and in particular relates to an ERP document atomic vector splitting and reorganization method and system. Background Technology

[0002] In Enterprise Resource Planning (ERP) systems, document data is typically stored in a relational structure with high field coupling, leading to semantic redundancy and dimensionality expansion issues during vectorization. Existing technologies often employ either fixed storage of entire document vectors or field-level vector concatenation. The former results in numerous duplicate vector copies, while the latter struggles to adapt to the feature weight adjustment requirements under differentiated query intents. Furthermore, traditional vector retrieval schemes rely on pre-computed dense vector persistent storage, which cannot support dynamic adjustment of the semantic contribution of each field according to business scenarios, nor can it achieve independent caching and parallel loading of key entities such as product and supplier categories. To improve the storage efficiency, retrieval flexibility, and runtime adaptability of ERP document vectorization, a vector construction mechanism that balances static deduplication and dynamic weighting is urgently needed. Summary of the Invention

[0003] Therefore, the technical problem to be solved by the present invention is to provide an ERP document atomic vector splitting and recombining method and system, which overcomes the problems of storage redundancy, rigid weight logic and lack of hot switching capability in the existing ERP document vectorization process.

[0004] In a first aspect, the present invention provides a method for splitting and recombining atomic vectors of ERP documents, comprising the following steps: S1: Decouple the fields of the ERP document into an atomic feature library and a business pointer table. The atomic feature library stores deduplicated atomic vectors. The atomic vectors are feature vectors obtained by vectorizing and encoding each indivisible semantic unit in the ERP document. The business pointer table only stores foreign key associations pointing to the atomic feature library. S2: In response to the retrieval request, physically slice the atomic vector in the application memory according to the dynamic weights to generate multiple weighted sub-vectors; S3: Based on the foreign key association in the business pointer table, load the corresponding atomic vector from the atomic feature library, and concatenate each weighted sub-vector in memory according to the dynamic weight to form a complete vector representation of the target document; S4: Output the complete vector representation for high-dimensional vector retrieval or downstream analysis.

[0005] Furthermore, the dynamic weights are calculated in real time from the current query context and are used to determine the length ratio of each atomic vector in the physical slice.

[0006] Further, step S3, which involves concatenating the weighted sub-vectors in memory according to the dynamic weights, includes: S31: Pre-constructed dimensional contribution ranking mask: For each atomic vector in the atomic feature library, let its total dimensions be D. Collect all vectorized samples of the atomic field corresponding to the atomic vector that have appeared historically, forming a historical sample set; calculate the variance contribution rate R of the i-th dimension. i : ; Where i is the dimension index, i=1,2,…,D; σ i ² represents the variance of the i-th dimension in the historical sample set; according to R... i Sort all dimensions in descending order to generate a dimension contribution ranking mask; S32: Determine the number of sampling dimensions for each atom vector: Suppose that the atomic vectors participating in the fusion include a first atomic vector and a second atomic vector. The first atomic vector is the atomic vector pointed to by the first foreign key in the target document, and the second atomic vector is the atomic vector pointed to by the second foreign key in the target document. The dynamic weights corresponding to the first atomic vector and the second atomic vector are α and β, respectively, and α+β=1. Then, the number of sampling dimensions of the first atomic vector is N1=α×D, the number of sampling dimensions of the second atomic vector is N2=β×D, and N1+N2=D. S33: Execution of Contribution-Priority Sampling and Orthogonal Staggered Recombination: Based on the dimensional contribution sorting mask, the floating-point values ​​of the top N1 dimensions with the highest contribution are extracted from the first atomic vector to form a first numerical sequence A; the floating-point values ​​of the top N2 dimensions with the highest contribution are extracted from the second atomic vector to form a second numerical sequence B. Construct an empty fusion vector V of length D. merged Iterate through the original dimension indices k=1,2,…,D, and perform cross-filling according to the parity of the indices: When k is odd, a floating-point value is taken sequentially from the first numerical sequence A and filled into V. merged The kth position; When k is even, a floating-point value is sequentially taken from the second numerical sequence B and filled into V. merged The kth position; When the values ​​in either sequence A or B are exhausted, use the remaining floating-point values ​​in the other sequence to complete V in order. merged All remaining empty spaces; This generates V. merged This serves as the complete vector representation of the target document.

[0007] Furthermore, the physical slice is a continuous segmentation of the atomic vector by byte offset, and the length of each segment is proportional to the dynamic weight.

[0008] Furthermore, each record in the business pointer table includes a document identifier, an atomic field identifier, and the index value of the corresponding atomic vector in the atomic feature library.

[0009] Furthermore, the splicing process in memory is not written to persistent storage, and the intermediate weight sub-vectors are released immediately after splicing is completed.

[0010] Furthermore, separate atomic vector caches are constructed for product and supplier fields, and these caches are loaded and concatenated in parallel in step S3.

[0011] Furthermore, the complete vector is represented as a dense vector of fixed dimensions, the values ​​of which are obtained by linearly superimposing the concatenated weighted sub-vectors after normalization.

[0012] On the other hand, the present invention provides an ERP document atomic vector splitting and reorganization system, comprising: The atomic feature library storage module is used to store the deduplicated atomic vectors and supports fast reading by index. The atomic vectors are feature vectors obtained by vectorizing and encoding each indivisible semantic unit in the ERP document. The business pointer table management module is used to maintain the foreign key mapping relationship between documents and atomic vectors; the dynamic weight calculation module is used to generate the weight coefficients corresponding to each atomic vector based on the current query request. The memory vector assembly module is used to perform physical slicing on the atomic vectors according to the weight coefficients, and to complete vector splicing at runtime based on the foreign bond mapping relationship; The vector output interface module is used to output the concatenated complete vector representation to the vector retrieval engine.

[0013] Furthermore, the memory vector assembly module reconstructs a temporary vector structure for each query and does not retain historical splicing results.

[0014] Beneficial effects: This invention achieves zero storage redundancy and hot-switching capability through an atomic vector splitting and dynamic memory reorganization architecture; reduces vector storage space occupation and ensures semantic consistency through static deduplication storage of atomic features; enables document vector representation to have query intent adaptability through a weighted vector physical slicing mechanism; decouples the strong coupling between document structure and vector representation by storing only foreign key associations in the business pointer table; improves the loading concurrency and cache hit rate of key business entities through a dual-path atomic vector caching strategy for products and suppliers; and avoids I / O overhead and state pollution caused by persistent intermediate vectors through dynamic weighted slicing and reorganization in memory during queries. Attached Figure Description

[0015] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0016] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention. Detailed Implementation

[0017] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. The principles and features of the present invention are described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other. The embodiments given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0018] Example 1: like Figure 1 As shown in the figure, this embodiment discloses a method for splitting and recombining atomic vectors of ERP documents, including the following steps: S1: Decouple the fields of ERP documents into atomic feature library DIM and business pointer table DWD. The atomic feature library stores the deduplicated atomic vectors, and the business pointer table only stores the foreign key associations pointing to the atomic feature library. S2: In response to the retrieval request, the atomic vector is physically sliced ​​in the application memory according to the dynamic weights to generate multiple weighted sub-vectors; S3: Based on the foreign key association in the business pointer table, load the corresponding atomic vector from the atomic feature library, and concatenate the weighted sub-vectors in memory according to dynamic weights to form a complete vector representation of the target document; S4: Outputs a complete vector representation for high-dimensional vector retrieval or downstream analysis.

[0019] Each atomic vector in the atomic feature library (DIM) corresponds to an indivisible semantic unit in the document, and the same atomic vector is stored only once in the atomic feature library.

[0020] The dynamic weights are calculated in real time from the current query context and are used to determine the length ratio of each atomic vector in the physical slice.

[0021] Physical slicing divides atomic vectors into continuous segments based on byte offsets, with the length of each segment being proportional to the dynamic weight.

[0022] Each record in the Business Pointer Table (DWD) contains a document identifier, an atomic field identifier, and the index value of the corresponding atomic vector in the atomic feature library.

[0023] The concatenation process in memory is not written to persistent storage, and the intermediate weight sub-vectors are released as soon as the concatenation is completed.

[0024] Separate atomic vector caches are constructed for product and supplier fields, and are loaded and concatenated in parallel in step S3.

[0025] A complete vector is represented as a dense vector of fixed dimensions, whose dimensions are obtained by linearly superimposing the concatenated weighted subvectors after normalization.

[0026] The specific code flow and engineering execution steps in the ERP system in this embodiment are as follows: Step 1: Static storage phase, decoupling design of the underlying table structure. In traditional systems, the invoice details table has a dedicated field to store a long vector composed of thousands of floating-point numbers. In this system, the table structure undergoes strict physical decomposition: Establish a DIM standard atomic library: This is a dictionary table specifically for storing deduplicated standard entities. Fields may include: atom_id (primary key), entity_name (e.g., standard 92-octane gasoline), entity_type (identifying whether it's a product or a supplier), and vector_array (a fixed-length floating-point array generated from a larger model, e.g., 768-dimensional). This dictionary table has a very small data volume, typically only tens of thousands of records.

[0027] Create a Business Pointer Table (DWD): This table stores massive amounts of invoice details. In this table, completely remove text descriptions and vector fields, retaining only the business primary key, time, amount, and two core foreign keys: item_atom_id (pointing to the atomic ID of the product) and vendor_atom_id (pointing to the atomic ID of the supplier).

[0028] The second step is the dynamic retrieval phase, which involves reorganizing the application server's memory array. When the system needs to perform a similarity search on a specific invoice, it no longer retrieves the existing invoice vector from the database; instead, it temporarily creates a vector in the application server's runtime memory.

[0029] Weight Reading: The backend configuration center maintains a set of business weight configurations. For example, the current strategy is to find similar products as the main method and suppliers as the secondary method, with the configuration ratio being "products account for 70% and suppliers account for 30%".

[0030] Dual-path retrieval: The backend code carries the item_atom_id and vendor_atom_id of the invoice to be queried, and directly retrieves the 768-dimensional floating-point arrays corresponding to these two entities from the Redis cache instantly.

[0031] Memory slicing and concatenation: In the code logic, the two arrays are physically sliced ​​based on weights. Because the total dimension must be kept at 768 so that the underlying vector library can recognize it, the code will truncate the first 537 floating-point numbers (70% of 768) of the product array and then truncate the last 231 floating-point numbers (30% of 768) of the supplier array.

[0032] Combined distribution: The two truncated array segments are merged into a new 768-dimensional array in memory. This temporarily merged array represents the comprehensive characteristics of this invoice under the current business weight. Subsequently, this temporarily merged array is directly input into the underlying vector database (such as pgvector) to perform a similarity search. After the search is completed, the temporarily merged array is immediately destroyed from memory, without occupying any disk space.

[0033] Step 3: Zero-cost hot switching of business rules. Because the underlying DIM and DWD tables are completely static and do not interfere with each other, all fusion logic is completed within the application memory slicing in Step 2. If the business department requires the strategy to be supplier-centric and product-centric (e.g., the ratio is changed to 20%:80%), the developers only need to change a number in the configuration center. In the next second, all queries will be automatically processed by the application server during slicing, extracting the first 153 floating-point numbers for the product and the last 615 floating-point numbers for the supplier. No database rewriting is required, and there is no overhead of re-calling the large model API.

[0034] As an optional implementation, the ERP documents in step S1 include, but are not limited to: purchase orders, sales orders, inbound slips, and outbound slips; field decoupling is performed according to semantic granularity rules, which define atomic fields as the smallest indivisible business semantic units, including but not limited to: material codes, supplier names, purchaser IDs, currency codes, tax rate values, and delivery dates; the atomic feature library adopts a columnar read-only storage structure, and each atomic vector is a fixed-length floating-point array, the dimensions of which are uniformly mapped and generated by a preset embedding model. This embedding model is a domain-adapted language model obtained by fine-tuning the BERT architecture. The input is the original string of the atomic field, and the output is a 3D real number vector. The business pointer table adopts a relational database table structure, the primary key is a composite key (document identifier, atomic field identifier), and the foreign key constraint points to the index field of the atomic feature library.

[0035] As an optional implementation, step S3, which involves concatenating the weighted sub-vectors in memory according to the dynamic weights, includes: S31: Pre-construct dimensional contribution ranking mask For each atomic vector in the atomic feature library, let its total dimensions be D. Collect all vectorized samples of the atomic field corresponding to the atomic vector that have appeared historically, forming a historical sample set; calculate the variance contribution rate R of the i-th dimension. i : ; Where i is the dimension index, i=1,2,…,D; σ i ² represents the variance of the i-th dimension in the historical sample set; according to R... i Sort all dimensions in descending order to generate a dimension contribution ranking mask; S32: Determine the number of sampling dimensions for each atomic vector. Suppose that the atomic vectors participating in the fusion include a first atomic vector and a second atomic vector. The first atomic vector is the atomic vector pointed to by the first foreign key in the target document, and the second atomic vector is the atomic vector pointed to by the second foreign key in the target document. The dynamic weights corresponding to the first atomic vector and the second atomic vector are α and β, respectively, and α+β=1. Then, the number of sampling dimensions of the first atomic vector is N1=α×D, the number of sampling dimensions of the second atomic vector is N2=β×D, and N1+N2=D. S33: Execution of Contribution-Priority Sampling and Orthogonal Staggered Recombination Based on the dimensional contribution sorting mask, the floating-point values ​​of the top N1 dimensions with the highest contribution are extracted from the first atomic vector to form a first numerical sequence A; the floating-point values ​​of the top N2 dimensions with the highest contribution are extracted from the second atomic vector to form a second numerical sequence B. Construct an empty fusion vector V of length D. merged Iterate through the original dimension indices k=1,2,…,D, and perform cross-filling according to the parity of the indices: When k is odd, a floating-point value is taken sequentially from the first numerical sequence A and filled into V. merged The kth position; When k is even, a floating-point value is sequentially taken from the second numerical sequence B and filled into V. merged The kth position; When the values ​​in either sequence A or B are exhausted, use the remaining floating-point values ​​in the other sequence to complete V in order. merged All remaining empty spaces; This generates V. merged This serves as the complete vector representation of the target document.

[0036] By employing three steps—offline mask calculation, weighted dimension extraction, and staggered recombination—a hidden but fatal problem in existing technologies is solved: semantic distortion and spatial fragmentation caused by hard vector concatenation. The specific effects are reflected in: 1. Upgrade from slicing by position to slicing by importance: The traditional approach is to truncate the vector proportionally (taking the first 537 dimensions). This is mathematically very crude. If the core features of a product vector happen to be distributed in the last 200 dimensions, sequential truncation will directly discard this information.

[0037] By calculating the variance contribution rate R i This ensures that each extraction captures the dimension with the largest amount of information and the highest recognizability for that entity. This greatly improves the semantic fidelity of the dynamically concatenated vector, directly leading to an increase in retrieval recall.

[0038] 2. Upgraded from hard splicing of front and back ends to odd-even interpolation: Simply splicing the first half and the second half will create a gap in the 768-dimensional space, causing the index structure to be unable to calculate the distance correctly.

[0039] By using an alternating odd and even arrangement, the features of goods and suppliers are distributed in the vector space like interlocking gears, ensuring the smoothness of the fused vector in geometric space. This prevents the indexing accuracy of the vector database from being degraded by temporary assembly.

[0040] 3. A precise mapping bridge between business weights and mathematical dimensions has been constructed: By clarifying the mathematical relationship N1=α×D, the abstract number of 70% modified by business personnel was precisely converted into 538 floating-point numbers that can be executed by a computer. This makes hot switching not only fast, but also ensures stable retrieval accuracy before and after the switch.

[0041] Example 2: This embodiment provides an ERP document atomic vector splitting and reorganization system, including: The atomic feature library storage module is used to store deduplicated atomic vectors and supports fast reading by index; The Business Pointer Table Management module is used to maintain the foreign key mapping relationship between documents and atomic vectors; The dynamic weight calculation module is used to generate the weight coefficients corresponding to each atomic vector based on the current query request. The memory vector assembly module is used to perform physical slicing of atomic vectors based on weight coefficients and to complete vector concatenation at runtime based on foreign bond mapping relationships; The vector output interface module is used to output the concatenated complete vector representation to the vector retrieval engine.

[0042] The memory vector assembly module reconstructs a temporary vector structure on each query and does not retain historical splicing results.

[0043] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for splitting and recombining atomic vectors of ERP documents, characterized in that, Includes the following steps: S1: Decouple the fields of the ERP document into an atomic feature library and a business pointer table. The atomic feature library stores deduplicated atomic vectors. The atomic vectors are feature vectors obtained by vectorizing and encoding each indivisible semantic unit in the ERP document. The business pointer table only stores foreign key associations pointing to the atomic feature library. S2: In response to the retrieval request, physically slice the atomic vector in the application memory according to the dynamic weights to generate multiple weighted sub-vectors; S3: Based on the foreign key association in the business pointer table, load the corresponding atomic vector from the atomic feature library, and concatenate each weighted sub-vector in memory according to the dynamic weight to form a complete vector representation of the target document; S4: Output the complete vector representation for high-dimensional vector retrieval or downstream analysis.

2. The method according to claim 1, characterized in that, The dynamic weights are calculated in real time from the current query context and are used to determine the length ratio of each atomic vector in the physical slice.

3. The method according to claim 1, characterized in that, Step S3, which involves concatenating the weighted sub-vectors in memory according to the dynamic weights, includes: S31: Pre-constructed dimensional contribution ranking mask: For each atomic vector in the atomic feature library, let its total dimensions be D. Collect all vectorized samples of the atomic field corresponding to each atomic vector that have appeared historically, forming a historical sample set; calculate the variance contribution rate R of the i-th dimension. i : ; Where i is the dimension index, i=1,2,…,D; σ i ² represents the variance of the i-th dimension in the historical sample set; according to R... i Sort all dimensions in descending order to generate a dimension contribution ranking mask; S32: Determine the number of sampling dimensions for each atom vector: Suppose that the atomic vectors participating in the fusion include a first atomic vector and a second atomic vector. The first atomic vector is the atomic vector pointed to by the first foreign key in the target document, and the second atomic vector is the atomic vector pointed to by the second foreign key in the target document. The dynamic weights corresponding to the first atomic vector and the second atomic vector are α and β, respectively, and α+β=1. Then, the number of sampling dimensions of the first atomic vector is N1=α×D, the number of sampling dimensions of the second atomic vector is N2=β×D, and N1+N2=D. S33: Execution of Contribution-Priority Sampling and Orthogonal Staggered Recombination: Based on the dimensional contribution sorting mask, the floating-point values ​​of the top N1 dimensions with the highest contribution are extracted from the first atomic vector to form a first numerical sequence A; the floating-point values ​​of the top N2 dimensions with the highest contribution are extracted from the second atomic vector to form a second numerical sequence B. Construct an empty fusion vector V of length D. merged Iterate through the original dimension indices k=1,2,…,D, and perform cross-filling according to the parity of the indices: When k is odd, a floating-point value is taken sequentially from the first numerical sequence A and filled into V. merged The kth position; When k is even, a floating-point value is sequentially taken from the second numerical sequence B and filled into V. merged The kth position; When the values ​​in either sequence A or B are exhausted, use the remaining floating-point values ​​in the other sequence to complete V in order. merged All remaining empty spaces; This generates V. merged This serves as the complete vector representation of the target document.

4. The method according to claim 1, characterized in that, The physical slice is a continuous segmentation of the atomic vector based on byte offset, and the length of each segment is proportional to the dynamic weight.

5. The method according to claim 1, characterized in that, Each record in the business pointer table contains a document identifier, an atomic field identifier, and the index value of the corresponding atomic vector in the atomic feature library.

6. The method according to claim 1, characterized in that, The concatenation process in memory is not written to persistent storage, and the intermediate weight sub-vectors are released immediately after concatenation is completed.

7. The method according to claim 1, characterized in that, Separate atomic vector caches are constructed for product and supplier fields, and are loaded and concatenated in parallel in step S3.

8. The method according to claim 1, characterized in that, The complete vector is represented as a dense vector of fixed dimensions, and the values ​​of each dimension are obtained by linearly superimposing the concatenated weighted sub-vectors after normalization.

9. An ERP document atomic vector splitting and recombining system, characterized in that, include: The atomic feature library storage module is used to store the deduplicated atomic vectors and supports fast reading by index. The atomic vector is the feature vector obtained by vectorizing and encoding each indivisible semantic unit in the ERP document. The business pointer table management module is used to maintain the foreign key mapping relationship between documents and atomic vectors; the dynamic weight calculation module is used to generate the weight coefficients corresponding to each atomic vector based on the current query request. The memory vector assembly module is used to perform physical slicing on the atomic vectors according to the weight coefficients, and to complete vector splicing at runtime based on the foreign bond mapping relationship; The vector output interface module is used to output the concatenated complete vector representation to the vector retrieval engine.

10. The system according to claim 9, characterized in that, The memory vector assembly module reconstructs a temporary vector structure for each query and does not retain historical splicing results.