Rapid industrial chain classification method and system based on memory database

By constructing a prefix tree for industry chain rules and using in-memory database processing, the problems of low efficiency in industry chain classification and disk I/O bottlenecks were solved, enabling real-time and efficient calculation of industry chain classification and supporting fully online inclusive finance business.

CN121807977APending Publication Date: 2026-04-07AISINO CREDIT INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in classifying industry chains, which cannot meet the real-time requirements of fully online credit approval for inclusive finance. Traditional methods also suffer from low efficiency in rule traversal and disk I/O bottlenecks.

Method used

A fast industry chain classification method based on in-memory database is adopted. By constructing an industry chain rule prefix tree (Trie tree), using tax classification codes to dynamically filter rules, and combining in-memory database for data processing, the calculation scope is reduced and the data access speed is improved.

Benefits of technology

It enables real-time classification of the industrial chain, greatly reduces the number of rules that need to be executed, improves data access speed by 10-100 times, and supports the online business model of inclusive finance throughout the entire process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807977A_ABST
    Figure CN121807977A_ABST
Patent Text Reader

Abstract

The invention provides a rapid industrial chain classification method and system based on a memory database, and relates to the technical field of financial science and technology and data processing. The method comprises the following steps: analyzing massive industrial chain node rules, and extracting prefix modes of classification key identifiers such as tax classification codes to construct an industrial chain rule prefix tree (Trie tree); the method comprises the following steps: acquiring business data such as invoices of a target enterprise, extracting classification key identifiers actually involved in the business data, and matching in a Trie tree, thereby dynamically screening out a to-be-executed rule set in a minimum range; and loading target enterprise business data by utilizing a memory database (such as H2), executing the screened rule set in a memory environment, and outputting an industrial chain classification result. According to the method, the rule traversal range is greatly narrowed through the Trie tree, the disk I / O bottleneck is eliminated through the memory database, and millisecond-level real-time classification and verification of the enterprise industry chain attributes in the whole online credit process are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer data processing and financial technology, and in particular to a rapid industry chain classification method and system based on an in-memory database. Background Technology

[0002] Inclusive finance, as an important component of financial services, is committed to providing convenient credit services to micro and small enterprises. However, traditional inclusive finance faces pain points such as high service costs, difficulty in risk identification, and limited credit accumulation. Supply chain analysis technology, by constructing industry maps, verifies the authenticity and business rationality of individual enterprises from a macro perspective. By utilizing cross-validation of upstream and downstream transaction data, it can more accurately assess the operating status of enterprises.

[0003] Currently, inclusive finance is trending towards a fully online process, requiring rapid approval and loan disbursement at the second or even millisecond level. However, existing supply chain classification technologies mainly suffer from the following problems: Low efficiency of rule traversal: The number of rules in the industry chain nodes is huge (usually tens of thousands). Traditional methods usually need to traverse all rules to match enterprise data, which is a huge amount of computation.

[0004] Disk I / O bottleneck: Traditional methods execute queries directly on disk-based relational databases. Enterprises have large amounts of invoice data (thousands to hundreds of thousands of records), and frequent disk read and write operations lead to low execution efficiency, making it difficult to meet the real-time requirements of fully online credit scenarios.

[0005] Although there are some patents in the existing technology that classify the industry chain, most of them focus on "how to define classification rules" and lack effective solutions in "how to accelerate classification under existing rules". Summary of the Invention

[0006] This invention aims to solve the problems of low efficiency in supply chain classification and inability to meet the needs of real-time credit approval in existing technologies, and proposes a fast supply chain classification method based on an in-memory database.

[0007] The first aspect of this invention discloses a fast industry chain classification method based on an in-memory database; the method includes: Step S1: Obtain a preset set of rules for industry chain nodes, parse each rule in the set of rules for industry chain nodes, and extract the prefix pattern of the classification key identifier; Step S2: Construct an industry chain rule prefix tree based on all extracted prefix patterns, wherein the nodes of the prefix tree store the corresponding industry chain node rules; Step S3: Obtain the business transaction data of the target enterprise to be classified, and extract the deduplicated set of classification key identifiers from the business transaction data; Step S4: Traverse the set of classification key identifiers, perform path matching in the industry chain rule prefix tree, and add the industry chain node rules associated with all nodes on the matching path to the set of rules to be executed; Step S5: Construct an in-memory database environment and load the target enterprise's business transaction data into the data tables of the in-memory database; Step S6: In the memory database, execute the rules in the set of rules to be executed for the loaded business transaction data, and output the industry chain classification result.

[0008] According to the method of the first aspect of the present invention, step S1 specifically includes: The SQL parser reads the query statements for the rules of the industry chain nodes. Identify fuzzy matching conditions for category key identifier fields in query statements; Extract the deterministic prefix string from the fuzzy matching conditions as the prefix pattern; The key identifier for classification is the tax classification code, and the business transaction data is invoice data.

[0009] According to the method of the first aspect of the present invention, the process of constructing the industry chain rule prefix tree in step S2 includes: Create the root node; For each prefix pattern, perform a path search character by character, starting from the root node; If the child node corresponding to the current character does not exist, a new node is created, and the complete prefix corresponding to the node is recorded; If the child node corresponding to the current character already exists, move to that child node; On the node corresponding to the last character of the prefix pattern, mark the end state and associate the corresponding industry chain node rules into that node.

[0010] According to the method of the first aspect of the present invention, step S4 specifically includes: For each category key identifier in the category key identifier set, match character by character starting from the root node of the industry chain rule prefix tree; During the matching process, if the currently traversed node is associated with a rule of the industry chain node, then the rule is added to the set of rules to be executed. If an unmatchable character is encountered or the traversal ends, the matching of the current category key identifier will stop. Finally, the set of rules to be executed is deduplicated to obtain the minimum range of rules to be executed.

[0011] According to the method of the first aspect of the present invention, the process of path matching in the industry chain rule prefix tree adopts a multi-level full path matching strategy, the strategy specifically including: For a single category key identifier, when traversing to a node in the industry chain rule prefix tree and that node is associated with an industry chain node rule, the rule is added to the set of rules to be executed, and the remaining characters of the category key identifier are used to continue searching for child nodes for matching, until all characters of the category key identifier are matched or the current node has no matching child nodes, so as to capture the parent and child rules that the category key identifier matches simultaneously in the industry chain classification system.

[0012] According to the method of the first aspect of the present invention, step S5 specifically includes: The business transaction data is parsed and structured into a list of four-tuples containing the seller's name, buyer's name, product name, and category key identifier; A temporary data table is created in the memory database. The structure of the temporary data table is adapted to the list of quadruples, and an index is created on the category key identifier field. Write the list of quadruples into the temporary data table in batches.

[0013] According to the method of the first aspect of the present invention, step S6 specifically includes: The query logic for each rule in the set of rules to be executed is read sequentially; The query logic is converted into an execution statement adapted to the in-memory database; The execution statement is run in the memory database to filter out records that meet the conditions; The selected records are marked with the corresponding industry chain nodes and industry chain names, generating classification results that include: seller name, buyer name, product name, classification key identifier, industry chain name, and industry chain node name.

[0014] A second aspect of this invention discloses a rapid supply chain classification system based on an in-memory database; the system includes: The decision tree construction module is used to parse the rules of the industry chain nodes, extract the prefix pattern, and construct the industry chain rule prefix tree accordingly. The rule filtering module is used to retrieve and determine the set of rules to be executed in the industry chain rule prefix tree based on the classification key identifiers in the business transaction data of the target enterprise to be classified. The in-memory computing module is used to build an in-memory database environment, load the business transaction data, and execute the set of rules to be executed in memory to generate classification results.

[0015] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a rapid supply chain classification method based on a memory database, as described in any of the first aspects of this disclosure.

[0016] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a rapid supply chain classification method based on an in-memory database, as described in any of the first aspects of this disclosure.

[0017] The beneficial effects of this invention are as follows: 1. Significantly reduces the scope of calculation: By constructing a trie tree (prefix tree) for the industry chain rules, rules are dynamically filtered based on the tax classification codes actually owned by the enterprise, avoiding a full rule traversal and reducing the number of rules to be executed from tens of thousands to only dozens or fewer that are relevant to the enterprise.

[0018] 2. Break through I / O performance bottleneck: By leveraging the characteristic of in-memory databases where data resides in memory, the read and write latency of traditional disk databases is eliminated, data access speed is increased by 10-100 times, and real-time classification of the industry chain is realized.

[0019] 3. Supports fully online scenarios: High-efficiency computing power makes it possible to instantly complete the industry chain profile after user authorization, which strongly supports the online business model of inclusive finance throughout the entire process. Attached Figure Description

[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 A flowchart illustrating a rapid supply chain classification method based on an in-memory database according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the industry chain rule prefix tree (Trie tree) in an embodiment of the present invention.

[0022] Figure 3 This is a structural diagram of a rapid supply chain classification system based on an in-memory database according to an embodiment of the present invention; Figure 4 This is a system module structure diagram provided for an embodiment of the present invention.

[0023] Figure 5 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] Definitions: Industry Map An industry map is a tool that systematically and structurally depicts the components, relationships, value flows, and ecosystem of a specific industry (or industrial chain). Essentially, it's a "strategic map" of an industry, breaking down complex industrial economic systems into easily understandable nodes and links, helping users gain insight into the overall picture, key links, and dynamic changes within the industry.

[0026] Industry nodes Industrial nodes are the basic units that constitute an industrial map. They refer to economic entities, functional links, or key elements that undertake specific value creation functions and play specific roles in a specific industrial chain or industrial ecosystem.

[0027] Industry chain node rules The industry chain node rules refer to a set of standardized systems that define the identification criteria, behavioral logic, relationships, and quantitative indicators for each node in the industry chain. The definition of industry chain node rules is the core of transforming the industry map from a static diagram into a dynamic system that can be calculated, analyzed, and operated. The rules involved in this invention are mainly based on the relevant rules defined by tax classification codes.

[0028] Tax Classification Code The tax classification code is a unified and standardized product and service classification code system formulated by the State Taxation Administration. It assigns a unique, multi-level numerical code to each type of tradable goods or services.

[0029] In-memory database An in-memory database is a database management system that permanently resides all or most of its working data in main memory for operation. Its fundamental difference from traditional databases lies in the fact that traditional databases primarily store data on disk and load it into memory in pages for processing when needed. In-memory databases, with data residing in memory, eliminate the major performance bottleneck of disk read / write operations, achieving data access speeds in the microsecond or even nanosecond range—10 to 100 times faster than traditional disk-based databases.

[0030] The first aspect of this invention discloses a rapid industry chain classification method based on an in-memory database, comprising: parsing industry chain node rules and extracting prefix patterns of key classification identifiers (such as tax classification codes); constructing an industry chain rule prefix tree (Trie tree) based on the prefix patterns and attaching the rules to the corresponding nodes; obtaining a set of key classification identifiers for target enterprise data; matching the key classification identifiers of the target enterprise using the Trie tree to filter out the smallest set of rules to be executed; loading the target enterprise data into an in-memory database (such as an H2 database); executing the filtered set of rules in the in-memory database and outputting the classification results.

[0031] Example 1: Figure 1 Here is a flowchart of a fast supply chain classification method based on an in-memory database according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes: Step S1: Obtain a preset set of rules for industry chain nodes, parse each rule in the set of rules for industry chain nodes, and extract the prefix pattern of the classification key identifier; Step S1 specifically includes: The SQL parser reads the query statements for the rules of the industry chain nodes. Identify fuzzy matching conditions for category key identifier fields in query statements; Extract the deterministic prefix string from the fuzzy matching conditions as the prefix pattern; The key identifier for classification is the tax classification code, and the business transaction data is invoice data.

[0032] In some specific implementations, taking the inclusive finance scenario as an example, we can use corporate invoice data to classify the industrial chain.

[0033] The core concepts involved include: Industry chain node rules: SQL rules defined based on tax classification codes (ssflbm) and commodity names (xmmc).

[0034] In-memory databases, such as H2 Database, where data resides permanently in memory.

[0035] like Figure 1 As shown, the process of this method is as follows: Step 1: Construct a Trie tree for supply chain rules During system initialization, rules for all nodes in the industry chain are read. For example: Rule 1: SELECT * FROM jyxx WHERE ssflbmLIKE '101%' AND xmmcLIKE '%lithium battery%'; Rule 2: SELECT * FROM jyxx WHERE ssflbmLIKE '10101%' AND xmmcLIKE '%electric vehicle%'; Rule 3: SELECT * FROM jyxx WHERE ssflbmLIKE '102%' AND xmmcLIKE '%battery%'; Parse the SQL to extract the prefix pattern set P: {'101', '10101', '102'}.

[0036] Constructing a Trie tree (e.g.) Figure 2 (as shown) Starting from the root node, the path '1'->'0'->'1' leads to node C (corresponding to rule 1, prefix 101).

[0037] Continuing from node C, the path '0'->'1' leads to node E (corresponding to rule 2, prefix 10101).

[0038] Starting from the root node, the path '1'->'0'->'2' reaches node F (corresponding to rule 3, prefix 102).

[0039] Each endpoint node (is_end=True) stores the corresponding rule ID or rule content.

[0040] Step S2: Construct a trie tree (prefix tree) for the industry chain rules based on all extracted prefix patterns. The nodes of the prefix tree store the corresponding industry chain node rules. The process of constructing the industry chain rule prefix tree in step S2 includes: Create the root node; For each prefix pattern, perform a path search character by character, starting from the root node; If the child node corresponding to the current character does not exist, a new node is created, and the complete prefix corresponding to the node is recorded; If the child node corresponding to the current character already exists, move to that child node; On the node corresponding to the last character of the prefix pattern, mark the end state and associate the corresponding industry chain node rules into that node.

[0041] In some specific embodiments, the rule filtering for industry chain nodes is as follows, when it is necessary to classify a certain enterprise: 1. Obtain the tax classification codes for all invoices of the company and remove duplicates. Assume the company has codes '101010100...' and '103000...'.

[0042] 2. Traversing the Trie tree: 1) For '101010100...': 11) A match of depth 3 ('101') is found. Node C has rule 1. Add rule 1 to the set to be executed.

[0043] 12) Continue matching to depth 5 ('10101'). Node E has rule 2. Add rule 2 to the set to be executed.

[0044] 13) Continue matching the character '0'. Node E has no child node '0', so the matching ends.

[0045] 2) For '103000...': Match the prefix '103'. There is no such path in the tree, so skip it directly.

[0046] 3. Finally, it was determined that the set of rules to be executed only contains rule 1 and rule 2.

[0047] Step S3: Obtain the business transaction data of the target enterprise to be classified, and extract the deduplicated set of classification key identifiers from the business transaction data; Step S4: Traverse the set of classification key identifiers, perform path matching in the industry chain rule prefix tree, and add the industry chain node rules associated with all nodes on the matching path to the set of rules to be executed; Step S4 specifically includes: For each category key identifier in the category key identifier set, match character by character starting from the root node of the industry chain rule prefix tree; During the matching process, if the currently traversed node is associated with a rule of the industry chain node, then the rule is added to the set of rules to be executed. If an unmatchable character is encountered or the traversal ends, the matching of the current category key identifier will stop. Finally, the set of rules to be executed is deduplicated to obtain the minimum range of rules to be executed.

[0048] The process of path matching in the industry chain rule prefix tree adopts a multi-level full-path matching strategy, including: For a single category key identifier, when traversing to a node in the prefix tree and that node is associated with industry chain node rules, the rule is added to the set of rules to be executed, and the remaining characters of the category key identifier are used to search for child nodes for matching until all characters of the category key identifier are matched or the current node has no matching child nodes, so as to capture the parent and child rules that the category key identifier hits simultaneously in the industry chain classification system.

[0049] Step S5: Construct an in-memory database environment and load the target enterprise's business transaction data into the data tables of the in-memory database; Step S5 specifically includes: The business transaction data is parsed and structured into a list of four-tuples containing the seller's name, buyer's name, product name, and category key identifier; A temporary data table is created in the memory database. The structure of the temporary data table is adapted to the list of quadruples, and an index is created on the category key identifier field. Write the list of quadruples into the temporary data table in batches.

[0050] Step S6: In the memory database, execute the rules in the set of rules to be executed for the loaded business transaction data, and output the industry chain classification result.

[0051] Step S6 specifically includes: The query logic for each rule in the set of rules to be executed is read sequentially; The query logic is converted into an execution statement adapted to the in-memory database; The execution statement is run in the memory database to filter out records that meet the conditions; The selected records are marked with the corresponding industry chain nodes and industry chain names, generating classification results that include: seller name, buyer name, product name, classification key identifier, industry chain name, and industry chain node name.

[0052] In some specific embodiments, classification is performed based on an in-memory database, and the specific method is as follows: 1. Data preparation: Query the company's invoice data from the source database (such as MySQL) and organize it into a list of four tuples: <seller name, buyer name, product name, tax classification code>.

[0053] 2. Memory Loading: Start the in-memory database instance (or use a connection pool), create a temporary table Table_A with the same structure as above, and create an index on the tax classification code column. Batch insert the list of four-tuples into Table_A. Because the operation is in memory, this process is extremely fast.

[0054] 3. Rule execution: Iterate through the set of rules to be executed (rules 1 and 2) and convert their SQL into queries for Table_A.

[0055] Execution rule 1: SELECT * FROM Table_AWHERE Tax Classification Code LIKE '101%' AND Product Name LIKE '%Lithium Battery%'.

[0056] Rule 2 to be executed: ...

[0057] 4. Result Output: Mark the records that match the rules. The output format is <Seller Name, Buyer Name, Product Name, Tax Classification Code, Industry Chain Name, Industry Chain Node Name>.

[0058] In summary, the solution proposed in this invention significantly reduces the number of industry chain node rules that need to be executed by constructing a trie tree (prefix tree) for industry chain node rules. Furthermore, previously, industry chain node rules were executed directly on relational databases, where the target company's invoice data ranged from thousands to hundreds of thousands, resulting in low execution efficiency. This invention utilizes an in-memory relational database (H2), writing the target company's invoice data into the in-memory relational database and executing only the filtered industry chain node rules, thus greatly improving execution efficiency.

[0059] The second aspect of this invention discloses a rapid industry chain classification system based on an in-memory database. Figure 3 This is a structural diagram of a rapid supply chain classification system based on an in-memory database according to an embodiment of the present invention; as follows: Figure 3 As shown, the system 100 includes: Decision tree construction module 101: Responsible for rule preprocessing and Trie tree maintenance during system startup. Specifically, it is used to parse the rule prefixes of the industry chain nodes, extract the prefix patterns, and construct the industry chain rule prefix tree accordingly. Rule filtering module 102: Responsible for receiving real-time requests, parsing enterprise data characteristics, and interacting with the Trie tree to output Candidate Rules. Specifically, it is used to retrieve and determine the set of rules to be executed in the industry chain rule prefix tree based on the classification key identifiers in the business transaction data of the target enterprise to be classified; Memory computing module 103: Integrates memory database engines such as H2, responsible for temporary high-speed data storage and SQL execution. Specifically, it is used to build a memory database environment, load the business transaction data, and execute the set of rules to be executed in memory to generate classification results.

[0060] like Figure 4As shown, in some specific embodiments, the system includes a decision tree construction module and a general module for industry classification based on an in-memory database, wherein the general module for industry classification based on an in-memory database includes a rule filtering module and an in-memory computing module.

[0061] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the rapid supply chain classification method based on a memory database, as described in any of the first aspects of this invention.

[0062] Figure 5 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 5 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0063] Those skilled in the art will understand that Figure 5 The structure shown is merely a structural diagram of the part related to the technical solution of this disclosure and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0064] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a rapid supply chain classification method based on a memory database, as described in any of the first aspects of this invention.

[0065] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A fast industry chain classification method based on an in-memory database, characterized in that, Includes the following steps: Step S1: Obtain a preset set of rules for industry chain nodes, parse each rule in the set of rules for industry chain nodes, and extract the prefix pattern of the classification key identifier; Step S2: Construct an industry chain rule prefix tree based on all extracted prefix patterns, wherein the nodes of the prefix tree store the corresponding industry chain node rules; Step S3: Obtain the business transaction data of the target enterprise to be classified, and extract the deduplicated set of classification key identifiers from the business transaction data; Step S4: Traverse the set of classification key identifiers, perform path matching in the industry chain rule prefix tree, and add the industry chain node rules associated with all nodes on the matching path to the set of rules to be executed; Step S5: Construct an in-memory database environment and load the target enterprise's business transaction data into the data tables of the in-memory database; Step S6: In the memory database, execute the rules in the set of rules to be executed for the loaded business transaction data, and output the industry chain classification result.

2. The method according to claim 1, characterized in that, Step S1 specifically includes: The SQL parser reads the query statements for the rules of the industry chain nodes. Identify fuzzy matching conditions for category key identifier fields in query statements; Extract the deterministic prefix string from the fuzzy matching conditions as the prefix pattern; The key identifier for classification is the tax classification code, and the business transaction data is invoice data.

3. The method according to claim 1, characterized in that, The process of constructing the industry chain rule prefix tree in step S2 includes: Create the root node; For each prefix pattern, perform a path search character by character, starting from the root node; If the child node corresponding to the current character does not exist, a new node is created, and the complete prefix corresponding to the node is recorded; If the child node corresponding to the current character already exists, move to that child node; On the node corresponding to the last character of the prefix pattern, mark the end state and associate the corresponding industry chain node rules into that node.

4. The method according to claim 1, characterized in that, Step S4 specifically includes: For each category key identifier in the category key identifier set, match character by character starting from the root node of the industry chain rule prefix tree; During the matching process, if the currently traversed node is associated with a rule of the industry chain node, then the rule is added to the set of rules to be executed. If an unmatchable character is encountered or the traversal ends, the matching of the current category key identifier will stop. Finally, the set of rules to be executed is deduplicated to obtain the minimum range of rules to be executed.

5. The method according to claim 4, characterized in that, The process of path matching in the industry chain rule prefix tree adopts a multi-level full path matching strategy, which specifically includes: For a single category key identifier, when traversing to a node in the industry chain rule prefix tree and that node is associated with an industry chain node rule, the rule is added to the set of rules to be executed, and the remaining characters of the category key identifier are used to continue searching for child nodes for matching, until all characters of the category key identifier are matched or the current node has no matching child nodes, so as to capture the parent and child rules that the category key identifier matches simultaneously in the industry chain classification system.

6. The method according to claim 1, characterized in that, Step S5 specifically includes: The business transaction data is parsed and structured into a list of four-tuples containing the seller's name, buyer's name, product name, and category key identifier; A temporary data table is created in the memory database. The structure of the temporary data table is adapted to the list of quadruples, and an index is created on the category key identifier field. Write the list of quadruples into the temporary data table in batches.

7. The method according to claim 1, characterized in that, Step S6 specifically includes: The query logic for each rule in the set of rules to be executed is read sequentially; The query logic is converted into an execution statement adapted to the in-memory database; The execution statement is run in the memory database to filter out records that meet the conditions; The selected records are marked with the corresponding industry chain nodes and industry chain names, generating classification results that include: seller name, buyer name, product name, classification key identifier, industry chain name, and industry chain node name.

8. A rapid supply chain classification system based on an in-memory database, characterized in that, The system employs the method described in any one of claims 1-7, the system comprising: The decision tree construction module is used to parse the rules of the industry chain nodes, extract the prefix pattern, and construct the industry chain rule prefix tree accordingly. The rule filtering module is used to retrieve and determine the set of rules to be executed in the industry chain rule prefix tree based on the classification key identifiers in the business transaction data of the target enterprise to be classified. The in-memory computing module is used to build an in-memory database environment, load the business transaction data, and execute the set of rules to be executed in memory to generate classification results.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the rapid supply chain classification method based on a memory database according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the rapid supply chain classification method based on a memory database according to any one of claims 1 to 7.