ERP query method and device based on natural language understanding, equipment and storage medium

By using an ERP query method based on natural language understanding, we have achieved end-to-end intelligent data interaction from voice input to visual output, which solves the problems of high professional threshold and low query efficiency in existing ERP systems and provides a personalized and secure data query solution.

CN120994694APending Publication Date: 2025-11-21BEIJING CSSCA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511509995.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing ERP systems suffer from several drawbacks in their data retrieval methods. These include high barriers to entry for professionals, difficulty in responding to dynamically changing personalized needs, and inability to effectively parse open-domain natural language query requests and complex semantic fuzzy query requests.

Method used

By employing a natural language understanding-based approach, the system converts voice input into query text using an ASR model, utilizes a semantic understanding model to obtain query intent and slots, dynamically assembles SQL query statements using a slot-field mapping rule base, and outputs the results in a visual representation, thus achieving end-to-end intelligent data interaction.

Benefits of technology

It lowers the barrier to entry for ERP systems, improves query efficiency and adaptability, can accurately respond to complex query needs, and integrates user account information into query generation and result output to ensure security and personalized display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994694A_ABST
    Figure CN120994694A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an ERP query method and device based on natural language understanding, equipment and a storage medium. The method comprises the following steps: acquiring voice input data of a user, converting the voice input data into query text data through an ASR model, then inputting the query text data and account information of the user into a semantic understanding model, acquiring a query intention and a query slot position, and performing semantic understanding on the query intention and the query slot position; according to the query intention, the query slot position and the slot position-field mapping rule base, SQL statement dynamic assembly is carried out, an SQL query statement is obtained, then service output data is obtained through the SQL query statement, and the service output data is visually output according to account information of a user. In this way, the query efficiency of the ERP system can be improved, and the query use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this application relate to the field of data querying, and more particularly to ERP query methods, apparatus, devices, and storage media based on natural language understanding. Background Technology

[0002] Enterprise Resource Planning (ERP) systems retrieve data using pre-built forms and Structured Query Language (SQL). However, existing retrieval methods have inherent limitations. First, users need to master specific field rules and operational logic to execute queries, presenting a high barrier to entry for professionals. Second, existing retrieval systems rely on preset query templates, limiting their coverage to fixed business conditions and failing to respond to dynamically changing personalized needs. Especially for open-domain natural language queries, traditional technologies lack effective parsing capabilities. Non-technical users must memorize complex table structures and field names, and manually construct query statements by combining multiple conditions. When multi-table joins are involved, query efficiency drops exponentially with massive amounts of data. Furthermore, for fuzzy queries with complex semantics, existing technologies cannot directly parse their semantic logic, forcing users to break them down into multiple independent queries, severely limiting business decision-making efficiency.

[0003] Therefore, there is an urgent need for an intelligent query solution based on natural language understanding to bridge the semantic gap between business intent and machine instructions. Summary of the Invention

[0004] According to an embodiment of this application, an ERP query solution based on natural language understanding is provided, which can build an end-to-end intelligent data interaction channel for ERP from voice to visualization, thereby realizing the automation and intelligence of the ERP query process.

[0005] In a first aspect of this application, an ERP query method based on natural language understanding is provided. The method includes: Acquire user voice input data and convert it into query text data using an ASR model; Input the query text data and user account information into the semantic understanding model to obtain the query intent and query slots; The SQL statement is dynamically assembled based on the query intent, query slot, and slot-field mapping rule base to obtain the SQL query statement; Business output data is obtained through SQL query statements, and the business output data is visualized based on the user's account information.

[0006] In one possible implementation, the semantic understanding model is trained using historical ERP query data and supplementary ERP data. The joint loss function of the semantic understanding model during training consists of intent classification cross-entropy loss, slot labeling loss, and intent-slot correlation constraint.

[0007] Optionally, the joint loss function settings for the semantic understanding model during training also include, Set dynamic weights for each loss term in the joint loss function; When the query intent predicted by the semantic understanding model belongs to the preset query intent category, the weight of the intent-slot relevance constraint is increased to 3 times the baseline intent-slot relevance constraint value.

[0008] Optionally, methods for obtaining supplementary ERP data include: Pre-set keywords and slot names in unlabeled training data; Semi-automatic labeling is performed on the unlabeled training data based on preset keywords and slot names to obtain supplementary ERP data.

[0009] In one possible implementation, the SQL statement is dynamically assembled based on the query intent, the query slot, and the slot-field mapping rule base to obtain the SQL query statement, including... Determine the target query data table based on the query intent; Generate a WHERE clause based on the target query data table, query slots, and slot-field mapping rule base; When the number of business output data entries obtained through an SQL query exceeds the preset number of entries, add a pagination LIMIT clause to the SQL query.

[0010] In one possible implementation, the method also includes, Query intents include production queries, sales queries, inventory queries, and unknown intents; User account information includes user query history, user permissions, and user preferences.

[0011] Optionally, the method also includes, When the query intent is unknown, a second determination of the query intent is made based on the query slot.

[0012] In a second aspect of this application, an ERP query apparatus based on natural language understanding is provided. The apparatus includes: The first acquisition module is used to acquire the user's voice input data and convert the voice input data into query text data through the ASR model; The second acquisition module is used to input query text data and user account information into the semantic understanding model to obtain query intent and query slots; The third acquisition module is used to dynamically assemble SQL statements based on query intent, query slots, and slot-field mapping rule base to obtain SQL query statements. The output module is used to obtain business output data through SQL query statements and to visualize the business output data based on the user's account information.

[0013] In a third aspect of this application, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described above.

[0014] In a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method according to the first aspect of this application.

[0015] The ERP query method based on natural language understanding provided in this application acquires the user's voice input data, converts the voice input data into query text data through an ASR model, and then inputs the query text data and the user's account information into a semantic understanding model to obtain the query intent and query slots. Based on the query intent, query slots, and slot-field mapping rule base, the method dynamically assembles SQL statements to obtain SQL query statements, and then obtains business output data through the SQL query statements. Based on the user's account information, the business output data is visualized, thus realizing automated and intelligent ERP system querying. At the same time, it allows non-technical users to easily obtain accurate ERP query data.

[0016] It should be understood that the description in the Summary Section is not intended to limit the key or essential features of the embodiments of this application, nor is it intended to restrict the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0017] The above and other features, advantages, and aspects of the embodiments of this application will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 A flowchart of an ERP query method based on natural language understanding according to an embodiment of this application; Figure 2 This is a schematic diagram of slot-field mapping according to an embodiment of this application; Figure 3This is a schematic diagram illustrating the visual output of an ERP query system according to an embodiment of this application; Figure 4 A block diagram of an ERP query device based on natural language understanding according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a terminal device or server suitable for implementing the embodiments of this application. Detailed Implementation

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

[0019] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0020] Figure 1 A flowchart of an ERP query method based on natural language understanding according to an embodiment of this disclosure is shown. See also Figure 1 The method includes: S101: Obtain the user's voice input data and convert the voice input data into query text data through the ASR model.

[0021] The purpose of the ASR (Automatic Speech Recognition) model is to convert the vocabulary content in the user's speech input data into computer-readable text. It extracts features from the user's speech input data into a sequence of feature vectors. Then, it uses an acoustic model to probabilistically associate the feature vector sequence with the corresponding phonemes or subphonemes. At the same time, it uses a language model to calculate the probability of words and sentences appearing in the feature vector sequence by combining grammatical and semantic information. Finally, the decoder combines the outputs of the acoustic model and the language model to search for the text sequence with the highest probability in the feature vector sequence as the final recognition result, i.e., the query text data.

[0022] This embodiment provides a natural and convenient voice-based input method, which improves the efficiency of data input and greatly enhances the user experience.

[0023] S102, input the query text data and user account information into the semantic understanding model to obtain the query intent and query slot.

[0024] The semantic understanding models include, but are not limited to, the BERT (Bidirectional Encoder Representations from Transformers) model and the JointBERT (Joint Bidirectional Encoder Representations from Transformers) model. Furthermore, BERT-base-chinese can be used as the base model for semantic understanding, optimized for specific Chinese characteristics of the query text data.

[0025] In this embodiment, the natural language understanding model can parse the true intent in the query text data and user account information, and extract key parameters, laying the foundation for the subsequent generation of SQL query statements.

[0026] Optionally, the semantic understanding model is trained using historical ERP query data and supplementary ERP data; The joint loss function of the semantic understanding model during training consists of intent classification cross-entropy loss, slot labeling loss, and intent-slot correlation constraint.

[0027] Among them, the intent classification cross-entropy loss is used to measure the difference between the query intent category distribution predicted by the semantic understanding model and the actual query intent category label; the slot labeling loss is used to measure the difference between the query slot sequence predicted by the semantic understanding model and the actual query slot sequence; the intent-slot correlation constraint is an auxiliary constraint that utilizes the inherent correlation between query intent and query slot to improve the consistency and overall accuracy of the semantic understanding model in both query intent prediction and query slot prediction tasks.

[0028] In this embodiment, the model is trained based on historical ERP query data and supplementary ERP data, which ensures that the semantic understanding model accurately matches and is highly adapted to business terms and scenarios. Furthermore, the use of a joint loss function significantly improves the accuracy and generalization of the semantic understanding model.

[0029] Optionally, the joint loss function settings for the semantic understanding model during training also include, Set dynamic weights for each loss term in the joint loss function; When the query intent predicted by the semantic understanding model belongs to the preset query intent category, the weight of the intent-slot relevance constraint is increased to 3 times the baseline intent-slot relevance constraint value.

[0030] In one possible implementation, the formula for calculating the joint loss function of the semantic understanding model during training is as follows: , in, The total joint loss of the semantic understanding model during training is , Cross-entropy loss is used for intent classification during the training process of semantic understanding models. The slot labeling loss during the training process of the semantic understanding model. The intent-slot relevance constraint is used in the joint loss function of the semantic understanding model during training. , , The values ​​are, in order, the dynamic weight coefficients of the intention classification cross-entropy loss, slot labeling loss, and intention-slot correlation constraint in the joint loss function, and, .

[0031] Furthermore, the formula for calculating the intent-slot correlation constraint is as follows: , in, For intent-slot correlation constraints, For indicator functions, The query intent predicted by the semantic understanding model. To pre-set the query intent, This represents the slot hidden feature of the i-th training data during the training process of the semantic understanding model. These are preset slot feature prototype vectors used to improve the semantic understanding model's sensitivity to preset slot representations.

[0032] In one possible implementation, when the query intent predicted by the semantic understanding model belongs to a preset query intent category, the weight of the intent-slot relevance constraint is increased to three times the baseline intent-slot relevance constraint value. For example, the preset query intent categories include sales queries and production queries, the query intent predicted by the semantic understanding model is a production query, and the baseline intent-slot relevance constraint value is... Then the weights of the intent-slot correlation constraint will be... Increased to 3 times the baseline intent-slot correlation constraint value, i.e. .

[0033] In this embodiment, by setting dynamic weights, the semantic understanding model can flexibly adjust the optimization focus according to the training state, thereby improving the overall performance of the model. Furthermore, the semantic understanding model strengthens the learning of the correlation between query intent and query slot through intent-slot correlation constraints.

[0034] Optionally, methods for obtaining supplementary ERP data include: Pre-set keywords and slot names in unlabeled training data; Semi-automatic labeling is performed on the unlabeled training data based on preset keywords and slot names to obtain supplementary ERP data.

[0035] First, a large amount of unlabeled training data is preprocessed. Domain experts pre-define keywords (such as "production" and "sales data") and their corresponding slot names (such as B-prodindex and B-salesindex) based on ERP business requirements. Then, based on the pre-defined keywords and slot names, the unlabeled statements are automatically annotated initially, generating pre-annotated data. Finally, annotators manually verify and correct the pre-annotated data, forming high-quality supplementary ERP data that can be used to train semantic understanding models.

[0036] In one possible implementation, the slot name corresponding to the keyword "factory" is B-plant / I-plant, the slot name corresponding to the keyword "month" is B-date.month / I-date.month, the slot name corresponding to the keyword "last month" is B-date.relmonth / I-date.relmonth, the slot name corresponding to the keyword "year" is B-date.year, the slot name corresponding to the keyword "product name" is B-prodname / I-prodname, the slot name corresponding to the keyword "salesperson" is B-salesman / I-salesman, the slot name corresponding to the keyword "warehouse" is B-warehouse / I-warehouse, the slot name corresponding to the keyword "regional scope" is B-scope / I-scope, the slot name corresponding to the keyword "product index" is B-prodindex / I-prodindex, the slot name corresponding to the keyword "sales index" is B-salesindex / I-salesindex, and the slot name corresponding to the keyword "salesperson name" is B-salesman / I-salesman. The table below shows an example of supplementary ERP data after semi-automatic annotation:

[0037] In this context, "O" is a meaningless modal particle.

[0038] In this embodiment, ERP supplementary data is obtained through semi-automatic annotation, which reduces the workload of manual annotation while ensuring annotation accuracy and improving the quality of data annotation.

[0039] S103: Dynamically assemble the SQL statement based on the query intent, query slot, and slot-field mapping rule base to obtain the SQL query statement. In this embodiment, ERP query data is automatically translated into database language, realizing automated query generation and reducing development workload and reliance on database knowledge.

[0040] Optionally, the SQL statement is dynamically assembled based on the query intent, query slot, and slot-field mapping rule base to obtain the SQL query statement, including: Determine the target query data table based on the query intent; Generate a WHERE clause based on the target query data table, query slots, and slot-field mapping rule base; When the number of business output data entries obtained through an SQL query exceeds the preset number of entries, add a pagination LIMIT clause to the SQL query.

[0041] For example, when the query text is "Please find all suppliers whose purchase amount exceeds 100,000 in June 2025", and the user's account information is "ID: 12138, Department: Production Department, Role / Permission: Ordinary Employee", the semantic understanding model identifies the query intent as a production query, with query slots date.month (month), amount (amount filter), and user (user). For the time slot date.month: "2025-06", the slot-field mapping rule library maps it to the order_date field, generating the condition WHERE order_date BETWEEN '2025-06-01' AND '2025-06-30' (i.e., the date range is from June 1, 2025 to June 30, 2025). Furthermore, permission constraints are automatically injected based on the user's account information. If the user's permission rules restrict queries to only their department (e.g., "Purchasing Department One"), then the SQL query statement will automatically append the condition AND department = 'Purchasing Department One'. Finally, for the amount filtering condition "amount: ">100000", the slot-field mapping rule base parses it as a filter for the aggregated results, thus generating the clause "HAVING SUM(amount)>100000" (i.e., filtering data with purchase amounts exceeding 100,000). The final generated SQL query can be shown below: SELECT vendor_name, SUM(amount) FROM purchase_orders WHERE order_date BETWEEN '2025-06-01' AND '2025-06-30' AND department = 'Purchasing Department 1' GROUP BY vendor_id HAVING SUM(amount)>100000. Here, vendor_name is the supplier name, purchase_orders is the target query table (i.e., the purchase data table), and vendor_id is the supplier index.

[0042] In one possible implementation, the slot-field mapping rule base is the core middleware connecting natural language semantic understanding and SQL database query. It defines the correspondence and conversion logic between the query slots output by the semantic understanding model and the fields of the ERP query database. It is the key set of rules for achieving accurate conversion "from business language to database language".

[0043] Figure 2 This is a schematic diagram of slot-field mapping according to an embodiment of this application, as shown below. Figure 2 As shown: The query text data is "What was the sales performance of Li Ming, a salesperson in the South China region, in April last year? Did it reach 1 million yuan?" According to the slot field mapping rule library, the slot corresponding to "last year" is "B-date.relyear / I-date.relyear", the slot corresponding to "four" is "B-date.month", the slot corresponding to "South China region" is "B-scope / I-scope", the slot corresponding to "Li Ming" is "B-salesman / I-salesman", the slot corresponding to "performance" is "B-salesindex / I-salesindex", the slot corresponding to "reached" is "B-bigger / I-bigger" (the keyword for this slot is "comparison"), and the slot corresponding to "1 million" is "B-number / I-number" (the keyword for this slot is "numerical").

[0044] In one possible implementation, when the number of business output data entries obtained through an SQL query exceeds a preset number of entries, a pagination LIMIT clause is added to the SQL query. For example, if the number of business output data entries obtained through an SQL query is 1000, while the preset number of entries is 100, adding a pagination LIMIT clause to the SQL query can enable the ERP query system to display and return 1000 business output data entries.

[0045] In this embodiment, by dynamically assembling SQL query statements by combining multi-dimensional information, it is possible to accurately match the query needs of different businesses and automatically optimize the query based on the number of items in the business output data, thereby improving the efficiency and adaptability of ERP queries.

[0046] Optionally, the method also includes, Query intents include production queries, sales queries, inventory queries, and unknown intents; User account information includes user query history, user permissions, and user preferences.

[0047] In this embodiment, the query intent is categorized to quickly and accurately understand user needs. Furthermore, by integrating data such as the user's historical query records, user permissions, and user preferences, the system respects the user's personalized needs while ensuring data security and compliance of query operations based on user permissions.

[0048] Optionally, the method also includes, When the query intent is unknown, a second determination of the query intent is made based on the query slot.

[0049] In one possible implementation, when the semantic understanding model predicts an unknown query intent, information is extracted from the query slots to infer the query intent. For example, if the query slot contains "salesindex" or "salesman," the query intent can be determined as a "sales query." If the query slot contains "prodindex" or "plant," the query intent can be determined as a "production query." If the query slot contains "storeindex" or "warehouse," the query intent can be determined as an "inventory query."

[0050] In this embodiment, the intelligence and adaptability of the ERP system are enhanced by making a second judgment on the query intent. Even if the intent is not accurately identified initially, the system can still use slot information to deeply explore the user's potential needs and will not interrupt the service due to unknown intent.

[0051] S104 retrieves business output data through SQL query statements and visualizes the business output data based on the user's account information.

[0052] Figure 3 This is a schematic diagram illustrating the visual output of an ERP query system according to an embodiment of this application, such as... Figure 3 As shown: The visualization output interface includes voice input, query text data, account information, visualization preferences, historical output query, and visualization output chart 1 and chart 2. Users can begin querying via voice input. The query text data component displays the query text data converted from the ASR model. Users can use this component to verify the accuracy of the ASR model conversion; if incorrect, they can correct it via text input. Account information includes all user account information in the ERP system. Visualization preferences reflect the user's preferred chart visualization output within the ERP system. The historical output query component allows users to view their past query information. When the ERP system first visualizes business output data, it displays visualization output chart 1 and chart 2. Users can choose whether to retain both charts or generate other chart types. For example, if visualization output chart 1 is a bar chart and chart 2 is a line chart, and the user is dissatisfied with chart 2, they can replace it with another chart type.

[0053] In this embodiment, during the visualization output of business output data, sensitive information is automatically filtered based on the user's account information, and an appropriate visualization format is intelligently selected for presentation, thereby improving the user experience.

[0054] According to the embodiments of this disclosure, the following technical effects are achieved: 1) It breaks through the limitations of traditional ERP queries that require memorizing fixed formats or menu paths. Users can express complex query needs in a conversational way, which lowers the threshold for using the ERP system.

[0055] 2) Based on semantic understanding results and mapping rule base, SQL query statements are dynamically generated, avoiding the lengthy process of pre-developing fixed reports for each query requirement and improving the agility of ERP system queries.

[0056] 3) User account information is integrated into the entire process of query generation and result output to ensure data access security. At the same time, the visual output can be personalized according to user roles and preferences, providing personalized query data display.

[0057] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0058] The above is an introduction to the method embodiments. The following describes the solution described in this application through device embodiments.

[0059] Figure 4 A block diagram of an ERP query apparatus based on natural language understanding according to an embodiment of this application is shown, such as... Figure 4 The following are included: The first acquisition module 401 is used to acquire the user's voice input data and convert the voice input data into query text data through the ASR model; The second acquisition module 402 is used to input query text data and user account information into the semantic understanding model to obtain query intent and query slots; The third acquisition module 403 is used to dynamically assemble SQL statements based on query intent, query slots and slot-field mapping rule base, and obtain SQL query statements. Output module 404 is used to obtain business output data through SQL query statements and to visualize the business output data based on the user's account information.

[0060] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0061] Figure 5 A schematic diagram of a terminal device or server suitable for implementing embodiments of this application is shown.

[0062] like Figure 5 As shown, the terminal device or server includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the terminal device or server. The CPU 501, ROM 502, and RAM 503 are interconnected via bus 504. An input / output (I / O) interface 505 is also connected to bus 504.

[0063] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.

[0064] Specifically, according to embodiments of this application, the above method flow steps can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a machine-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined in the system of this application.

[0065] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0066] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0067] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be located in a processor. The names of these units or modules do not, in certain circumstances, constitute a limitation on the unit or module itself.

[0068] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the methods described in this application.

[0069] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing application concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions claimed in this application.

Claims

1. An ERP query method based on natural language understanding, characterized in that, include: Acquire user voice input data and convert the voice input data into query text data using an ASR model; The query text data and the user's account information are input into the semantic understanding model to obtain the query intent and query slots; Based on the query intent, the query slot, and the slot-field mapping rule base, the SQL statement is dynamically assembled to obtain the SQL query statement; The business output data is obtained through the SQL query statement, and the business output data is visualized based on the user's account information.

2. The ERP query method based on natural language understanding according to claim 1, characterized in that, The semantic understanding model was trained using historical ERP query data and supplementary ERP data. The joint loss function of the semantic understanding model during training consists of intent classification cross-entropy loss, slot labeling loss, and intent-slot correlation constraint.

3. The ERP query method based on natural language understanding according to claim 2, characterized in that, The joint loss function settings for the semantic understanding model during training also include, Dynamic weights are assigned to each loss term in the joint loss function; When the query intent predicted by the semantic understanding model belongs to a preset query intent category, the weight of the intent-slot relevance constraint is increased to 3 times the baseline intent-slot relevance constraint value.

4. The ERP query method based on natural language understanding according to claim 2, characterized in that, The method for obtaining supplementary ERP data includes, Pre-set keywords and slot names in unlabeled training data; The unlabeled training data is semi-automatically labeled based on preset keywords and slot names to obtain the ERP supplementary data.

5. The ERP query method based on natural language understanding according to claim 1, characterized in that, The step of dynamically assembling an SQL statement based on the query intent, the query slot, and the slot-field mapping rule base to obtain an SQL query statement includes, Determine the target query data table based on the query intent; Generate a WHERE clause based on the target query data table, the query slot, and the slot-field mapping rule base; When the number of business output data entries obtained through the SQL query exceeds the preset number of entries, a pagination LIMIT clause is added to the SQL query.

6. The ERP query method based on natural language understanding according to claim 1, characterized in that, The method also includes, The query intents include production queries, sales queries, inventory queries, and unknown intents; The user's account information includes the user's historical query records, user permissions, and user preferences.

7. The ERP query method based on natural language understanding according to claim 1 or 6, characterized in that, The method also includes, When the query intent is the unknown intent, the query intent is further judged based on the query slot.

8. An ERP query device based on natural language understanding, characterized in that, include: The first acquisition module is used to acquire the user's voice input data and convert the voice input data into query text data through the ASR model; The second acquisition module is used to input the query text data and the user's account information into the semantic understanding model to obtain the query intent and query slot; The third acquisition module is used to dynamically assemble SQL statements based on the query intent, the query slot, and the slot-field mapping rule base to obtain SQL query statements. The output module is used to obtain business output data through the SQL query statement and to visualize the business output data based on the user's account information.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Natural language processing method and device, computing equipment and storage medium

    CN111125309A

  • Structured query language statement obtaining method and device based on natural language

    CN113495900A

  • Digital factory data query method, device, equipment, medium and product

    CN119025618A

  • SQL (Structured Query Language) statement generation method and device based on large language model, equipment and medium

    CN119201966A

  • Data query method and device, storage medium and computer program product

    CN119322787A