Intelligent question-answering system and method for chemical purchasing

By introducing large language models, knowledge bases and knowledge graphs in the field of chemical procurement, the existing system has been solved, and the accuracy and flexibility of the intelligent question-and-answer system in the field of chemical procurement has been achieved.

CN120470081APending Publication Date: 2025-08-12SINOCHEM ENERGY SAVING ENVIRONMENTAL PROTECTION HLDG BEIJING +1
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510425412.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing intelligent question-and-answer system has problems such as inaccurate semantic understanding, insufficient decision-making support capabilities, imperfect knowledge base management, poor system scalability and insufficient digital tool integration in the field of chemical procurement, which is difficult to meet the needs of complex procurement scenarios.

Method used

A large language model is used to combine knowledge bases and knowledge graphs to form a professional corpus in the field of chemical procurement. Through deep learning and natural language processing technology, an accurate understanding of professional terms and context is achieved, and modular expansion and integration with other digital tools are supported.

Benefits of technology

It improves the accuracy and applicability of the Q&A system, and can provide accurate business guidance and decision-making support in the field of chemical procurement, reduces system expansion costs, shortens development cycles, and achieves seamless sharing and collaboration of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470081A_ABST
    Figure CN120470081A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an intelligent question-answering system and method for chemical purchasing, and belongs to the field of chemical purchasing. The system comprises a foreground dialogue module, a background large model module and a knowledge base and / or a knowledge graph, and the foreground dialogue module comprises a receiving unit and an output unit; the background large model module comprises a semantic analysis unit, a background information acquisition unit, a question classification unit and a reply unit, and the knowledge base and / or the knowledge graph are / is used for managing, storing and updating data resources related to chemical purchase. The system is used for better meeting question and answer requirements in the field of chemical procurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chemical procurement, and in particular to an intelligent question-answering system and method for chemical procurement. Background Art

[0002] In specific procurement areas, such as chemical procurement, traditional procurement processes often rely on manual operations, including raw material demand analysis, supplier evaluation, risk control, and business process guidance. With the development of information technology, some companies have introduced basic automation and data processing systems to streamline processes and improve efficiency. However, these systems primarily focus on information recording and basic data processing, lacking intelligent support for complex procurement scenarios and unable to provide real-time decision support.

[0003] In recent years, with the development of artificial intelligence (AI) technology, natural language processing (NLP) and knowledge graph technologies have been gradually applied to procurement management to support automated question-answering, information retrieval, and data analysis. Simple intelligent question-answering systems provide basic business support through keyword matching and fixed answer templates, but they often struggle to accurately understand the specialized terminology and complex requirements in procurement scenarios. For example, some systems use NLP technologies based on pre-trained models such as BERT to support basic text parsing and keyword extraction to answer common questions in specific procurement scenarios. However, existing intelligent question-answering systems have the following shortcomings:

[0004] (1) Insufficient semantic understanding accuracy: Current intelligent question-answering systems rely heavily on pre-trained models for general domains, making it difficult to accurately understand the specialized terminology, technical parameters, and contextual requirements in specific procurement scenarios. This lack of semantic understanding can lead to inaccurate responses. For example, when it comes to chemical raw material standards, quality standards, safety regulations, supplier qualifications, and contract details, it is unable to effectively support specialized scenarios such as supplier evaluation, compliance reviews, and raw material quality standards, making it difficult to provide accurate business guidance to procurement personnel.

[0005] (2) Lack of decision support capabilities: Most current systems remain at the information query level and lack decision support functions for complex business scenarios. For example, it is difficult to provide in-depth analysis and reliable suggestions in multi-supplier selection, procurement strategy formulation, or compliance risk assessment.

[0006] (3) Imperfect knowledge base management: Knowledge bases in specific procurement areas typically contain a large amount of data, including industry standards, regulations, policies, and supplier information. Existing knowledge bases are mostly statically managed, with poor data update and integration capabilities, and are unable to meet the real-time and accuracy requirements of the procurement process. Existing systems have relatively simple knowledge base management and lack deep integration with specific industry standard libraries, company compliance libraries, and policy and regulation libraries. The knowledge base update mechanism is also imperfect, impacting the accuracy and effectiveness of the system in specific procurement scenarios.

[0007] (4) Lack of modular expansion capabilities: The existing system's architectural design is relatively simple and cannot meet the long-term development needs of the company's procurement business. For example, when it is necessary to expand to new material categories or introduce new compliance standards, the existing system often requires large-scale code modifications, resulting in high costs and long cycles.

[0008] (5) Lack of integration with existing digital tools: Existing intelligent question-answering systems usually operate independently and lack effective integration with other digital tools in specific procurement fields (such as procurement risk management systems, supplier management systems, etc.). They are unable to achieve seamless data sharing and business process collaboration, resulting in information islands.

[0009] In summary, existing technologies have obvious deficiencies in semantic understanding, decision support, knowledge base management, system scalability, and digital tool integration, making it difficult to meet the question-and-answer needs in specific procurement areas, such as chemical procurement. Summary of the Invention

[0010] The purpose of the embodiments of the present invention is to provide an intelligent question-answering system and method for chemical procurement to better meet the question-answering needs in the field of chemical procurement.

[0011] To achieve the above-mentioned objectives, in a first aspect, an embodiment of the present invention provides an intelligent question-answering system for chemical procurement, comprising: a front-end dialogue module, a back-end large model module, and a knowledge base and / or a knowledge graph, wherein the front-end dialogue module comprises: a receiving unit for receiving a question; and an output unit for outputting an answer, and the back-end large model module comprises: a semantic analysis unit for performing semantic analysis on the question and obtaining semantic information contained in the question; a background information acquisition unit for obtaining background information contained in the question; a question classification unit for classifying the question based on the semantic information and the background information; and a reply unit comprising a preset number of working branches for calling a preset analysis strategy based on the classification of the question, and enabling the working branch corresponding to the analysis strategy to generate and output an answer to the output unit, and the knowledge base and / or knowledge graph is used to manage, store and update data resources related to chemical procurement, wherein the preset analysis strategy includes a processing flow for the question, and when the question is classified as a query type, the preset analysis strategy includes locating and retrieving the knowledge base and / or knowledge graph.

[0012] Optionally, the system also includes a user feedback module, which includes: a feedback unit for receiving user feedback on satisfaction with the answer; an optimization unit for scoring the answer based on the satisfaction and adjusting the output answer of the reply unit based on the score.

[0013] Optionally, the user feedback module also includes: a first judgment module, used to judge whether the user feedbacks satisfaction with the output answer, if not, starting the second judgment module; a second judgment module, used to judge whether the user continues to ask questions, if so, starting the receiving unit, if not, ending the conversation.

[0014] Optionally, the classification of the problem includes a tool calling class and a query class, and the query class includes a statistical analysis class, a reasoning recommendation class, a knowledge guidance class, and a text generation class.

[0015] Optionally, when the problem is classified as a tool call type, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: determining the name of the calling tool based on the problem, the semantic information and / or background information of the problem; determining key parameters based on the problem, the semantic information and / or background information of the problem and transmitting them to the tool; receiving the result returned by the tool; and forming a complete response content based on the returned result, and outputting it as an answer, wherein determining the key parameters and transmitting them to the tool includes: encapsulating the key parameters in JSON format, and sending them to the API interface of the target business system where the tool is located through the system's built-in HTTP component in the form of a POST request.

[0016] Optionally, when the classification is a query class, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: based on the question, the semantic information of the question and / or the background information, determining whether the preset function can be directly called to output the answer; if so, output it directly; if not, performing the following processing: based on the question, the semantic information of the question and / or the background information, locating the secondary database in the database and / or the secondary knowledge graph in the knowledge graph for retrieval to obtain the retrieval results; based on the retrieval results, forming a complete reply content and outputting it as an answer, wherein the database includes a preset number of secondary databases, the knowledge graph includes a preset number of secondary knowledge graphs, and each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

[0017] Optionally, based on the question, the semantic information and / or background information of the question, a secondary database in the database and / or a secondary knowledge graph in the knowledge graph is located for retrieval, and the retrieval results include: based on the question, the semantic information and / or background information of the question, locating at least one relevant secondary database and / or secondary knowledge graph; searching the secondary database and / or secondary knowledge graph to obtain candidate results; based on a pre-trained text embedding model, generating a vector representation of each of the candidate results to obtain a first text embedding; based on a pre-trained text embedding model, generating a vector representation of the question, the semantic information and / or background information of the question to obtain a second text embedding; calculating the cosine similarity between each of the first text embedding and the second text embedding; and sorting the cosine similarities and selecting the candidate result corresponding to the highest cosine similarity as the retrieval result.

[0018] Optionally, the management, storage and update of data resources related to chemical procurement by the knowledge base and / or knowledge graph include: obtaining text corpus in the field of chemical procurement, including structured / unstructured / semi-structured data; aligning internal procurement data with external knowledge data in the text corpus in the field of chemical procurement; converting the unstructured / semi-structured data into text form and / or vector form; storing the data in text form and / or vector form in a corresponding secondary database based on the subject type; extracting the relationship between entities from the knowledge base to form and store secondary knowledge graphs of different subject types; and receiving text corpus in the field of chemical procurement transmitted by an external system at preset time intervals to update the knowledge base and / or knowledge graph.

[0019] On the other hand, an embodiment of the present invention provides an intelligent question-answering method for chemical procurement, which includes: receiving a question; performing semantic analysis on the content of the question to obtain semantic information contained in the question; obtaining background information contained in the question; classifying the question based on the semantic information and the background information; and calling a preset analysis strategy based on the classification of the question, and enabling a work branch corresponding to the analysis strategy to generate and output an answer, wherein the preset analysis strategy includes a processing flow for the question, and when the question is classified as a query type, the preset analysis strategy includes locating and retrieving a knowledge base and / or knowledge graph, and the knowledge base and / or knowledge graph is used to manage, store and update data resources related to chemical procurement.

[0020] Optionally, the management, storage and update of data resources related to chemical procurement by the knowledge base and / or knowledge graph include: obtaining text corpus in the field of chemical procurement, including structured / unstructured / semi-structured data; aligning internal procurement data with external knowledge data in the text corpus in the field of chemical procurement; converting the unstructured / semi-structured data into text form and / or vector form; storing the data in text form and / or vector form in a corresponding secondary database based on the subject type; extracting the relationship between entities from the knowledge base to form and store secondary knowledge graphs of different subject types; and receiving text corpus in the field of chemical procurement transmitted by an external system at preset time intervals, and updating the knowledge base and / or knowledge graph, wherein the database includes a preset number of secondary databases, the knowledge graph includes a preset number of secondary knowledge graphs, and each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

[0021] The technical solution proposed in this paper integrates a large language model with a knowledge base and knowledge graph to form a specialized corpus for chemical procurement. Leveraging deep learning and natural language processing, the large language model accurately understands user input questions and precisely captures the specialized terminology and contextual requirements of specific industries. This facilitates precise identification and intelligent response to chemical procurement scenarios, improving the accuracy and applicability of answers and better meeting the question-and-answer needs of the chemical procurement sector.

[0022] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:

[0024] Figure 1 This is a schematic diagram of the structure of the intelligent question-answering system for chemical procurement provided by an embodiment of the present invention;

[0025] Figure 2 This is a schematic diagram of the question-answering process of the chemical procurement intelligent question-answering system provided by an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of the construction process of the chemical procurement intelligent question-answering system provided by an embodiment of the present invention;

[0027] Figure 4 This is a data flow diagram of the knowledge graph provided by an embodiment of the present invention;

[0028] Figure 5 The embodiment of the present invention provides Figure 4 Enlarged view of the middle chart portion;

[0029] Figure 6 It is a flow chart of the intelligent question-answering method for chemical procurement provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.

[0031] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use such solutions.

[0032] Figure 1 This is a schematic diagram of the structure of the chemical procurement intelligent question-answering system provided by an embodiment of the present invention. Figure 1 As shown, the system includes: a front-end dialogue module, a back-end large model module, and a knowledge base and / or knowledge graph.

[0033] The front-end dialogue module includes: a receiving unit for receiving questions; and an output unit for outputting answers.

[0034] The background large model module includes: a semantic analysis unit for performing semantic analysis on the question and obtaining the semantic information contained in the question; a background information acquisition unit for obtaining the background information contained in the question; a question classification unit for classifying the question based on the semantic information and the background information; and a reply unit, including a preset number of working branches, for calling a preset analysis strategy based on the classification of the question, and enabling the working branch corresponding to the analysis strategy to generate and output the answer to the output unit. The background large model module mainly includes a large language model, which can be a large language model of the Transformer architecture.

[0035] The knowledge base and / or knowledge graph is used to manage, store, and update data resources related to chemical procurement, including laws and regulations, corporate systems, and policy documents related to chemical procurement.

[0036] Among them, the preset analysis strategy includes a problem processing process. When the problem is classified as a query type, the preset analysis strategy includes locating and retrieving the knowledge base and / or knowledge graph.

[0037] Figure 2 This is a schematic diagram of the question-answering process of the chemical procurement intelligent question-answering system provided by an embodiment of the present invention. When implementing it specifically, the question-answering process of the chemical procurement intelligent question-answering system can refer to Figure 2 :

[0038] A user, such as a purchasing staff or purchasing manager, enters a question in the dialog box of the front-end dialogue module, thereby starting the chemical procurement intelligent question-answering system.

[0039] The question is then transmitted to the semantic analysis unit in the backend large model module, which analyzes and obtains semantic information to ensure that the question is accurately understood. Semantic information mainly identifies the intention of the user's question, such as policy and system related, data analysis, supplier information query, etc. Different intentions are used for subsequent work branch design and prompt word limitation. Next, the background information acquisition unit analyzes the question and obtains the background information contained in the question, such as user portrait / background, mandatory recruitment / non-mandatory recruitment according to law, demand (subject matter, i.e. standard products to be purchased) keywords, demand attribute words, user intention, user preference, user emotion, dialogue context, specific question content and user tone, etc.

[0040] Afterwards, the question classification unit classifies the question based on the semantic information and the background information. The question classification includes tool call class and query class. The query class includes statistical analysis class, reasoning recommendation class, knowledge guidance class, text generation class and other possible classifications.

[0041] The response unit enters different work branches according to different classifications. Different work branches contain preset analysis strategies, which include the process of handling the problem. Then, the response unit gives the final answer based on the analysis strategy, integrates semantic information, background information, etc., and outputs it to the output unit of the front-end dialogue module. For example, it conducts in-depth analysis of procurement data, identifies potential risks, and provides decision support; based on the data analysis results, it intelligently recommends appropriate procurement methods and suppliers suitable for undertaking projects; and provides users with detailed procurement process guidance.

[0042] Ensure that every operation complies with standards and specifications.

[0043] In the system proposed by the present invention, a set of specially sorted regular expression specifications for the chemical industry are also adopted, and the common expressions in the legal text are accurately identified and parsed through rule matching and keyword extraction modules. In the reply unit, through rule matching and keyword extraction modules, a pre-defined regular template is used, combined with a special vocabulary in the chemical industry, key information such as temperature range, storage conditions, and transportation requirements are automatically extracted, thereby significantly improving the accuracy of information extraction. At the same time, when the reply unit locates and retrieves the knowledge base and / or knowledge graph, the parsed legal information is automatically mapped and compared with the existing chemical procurement data (including supplier information, product quality parameters, and transportation and storage requirements, etc.) in the knowledge base and / or knowledge graph. Through preset data matching rules and mapping mechanisms, the system can quickly detect the differences between procurement data and legal terms, issue early warnings in a timely manner, and provide rectification suggestions to ensure that the procurement process always meets the strict legal requirements of the chemical industry.

[0044] This paper introduces a large language model and combines it with a knowledge base and knowledge graph to form a professional corpus in the field of chemical procurement. Using deep learning and natural language processing techniques, the large language model accurately understands user input questions and precisely grasps the specialized terminology and contextual requirements of specific industries. This facilitates precise identification and intelligent response to procurement scenarios, thereby improving the accuracy and applicability of answers.

[0045] The system proposed in this invention is based on a modular design and can be flexibly expanded to new business scenarios or new material categories according to the needs of the enterprise. For example, it can be expanded beyond chemical procurement to related fields such as equipment procurement and logistics management, and has broad application prospects. In addition, the modular design can support flexible expansion of system functions. For example, when adding new material categories or compliance standards, it is only necessary to configure parameters in the relevant modules, such as the knowledge base, without the need for large-scale code modifications. This helps to solve the problem of insufficient expansion capabilities of existing systems, reduces the upgrade cost of the enterprise procurement system, shortens the function development cycle, and meets the long-term development needs of the enterprise.

[0046] Figure 3 This is a schematic diagram of the construction process of the chemical procurement intelligent question-answering system provided by an embodiment of the present invention. Figure 3 As shown, the construction of the system includes four parts: refining the knowledge base and corpus, building the knowledge base and / or knowledge graph, applying the large language model, and intelligent decision-making / business support.

[0047] (1) Refining the knowledge base and corpus: First, organize the text corpus in the field of chemical procurement, including laws and regulations, corporate systems, and policy documents related to chemical procurement. By summarizing industry, legal, and corporate system standards, a comprehensive knowledge base is formed. Next, extract data from core business scenarios, that is, scenarios related to procurement business in the chemical industry, such as demand reporting, procurement document preparation, and supplier sourcing. Classify and organize data and subdivide the dimensions to ensure the accuracy and comprehensiveness of the knowledge base content, providing a solid foundation for the construction and application of subsequent models.

[0048] (2) Build a knowledge base and / or knowledge graph: In this phase, based on the actual needs of chemical procurement, a knowledge base and / or knowledge graph in the field of chemical procurement will be built. Active learning and artificial intelligence technologies will be used to continuously expand and optimize the content of the knowledge base and / or knowledge graph to ensure that it covers all aspects of the chemical procurement field. The knowledge base and / or knowledge graph will continuously absorb new business data and knowledge through a dynamic update and expansion mechanism to support accurate decision-making and efficient operation of the system.

[0049] (3) Application of Large Language Models: Introducing large language models, training and tuning specialized language models for chemical procurement, and integrating them with knowledge bases and / or knowledge graphs to form a specialized corpus for chemical procurement. Large language models will be used for tasks such as text understanding, semantic analysis, and question answering. Through deep learning and natural language processing technologies, they will enable accurate identification and intelligent responses to chemical procurement business scenarios.

[0050] (4) Intelligent decision-making / business support: Integrate the knowledge base and / or knowledge graph with the large language model, and set up a front-end dialogue module to form an intelligent question-and-answer system for chemical procurement in the form of an intelligent dialogue robot.

[0051] Furthermore, the system also includes a user feedback module, which includes: a feedback unit for receiving user feedback on satisfaction with the answer; an optimization unit for scoring the answer based on the satisfaction and adjusting the output answer of the reply unit based on the score.

[0052] Furthermore, the user feedback module also includes: a first judgment module, used to judge whether the user feedbacks satisfaction with the output answer, if not, starting the second judgment module; a second judgment module, used to judge whether the user continues to ask questions, if so, starting the receiving unit, if not, ending the conversation.

[0053] Please refer to Figure 2After the response unit gives the final answer, the first judgment module is activated to determine whether the user has provided feedback on their satisfaction with the output answer. If no feedback is provided, the second judgment module is activated to monitor the user's subsequent behavior. If feedback is provided, it is fed back to the optimization unit for autonomous local model adjustment. For example, for each question and answer, user feedback (such as "satisfied" or "dissatisfied") is recorded and associated with the specific query and model output. The feedback is then labeled, indicating which answers received "satisfaction" and which received "dissatisfaction." Finally, a scoring mechanism is introduced. Based on "satisfied" feedback, the scores of highly relevant answers are increased; based on "dissatisfied" feedback, the scores of less relevant or incomplete answers are decreased. In subsequent responses, the answers are adjusted based on the scores. Based on this dynamic semantic analysis approach, the system's output answers are adjusted based on feedback, updating the model's semantic understanding capabilities in real time, thereby continuously optimizing the output results. By receiving feedback and monitoring user behavior, user feedback is closely integrated with model optimization, achieving efficient transmission and processing of feedback data, and helping to improve the comprehensiveness and accuracy of responses. When it is determined that the user continues to ask questions, the process returns to the receiving unit to continue processing, ensuring that the user obtains the required information. After the problem is solved, the conversation ends, forming a complete interactive closed loop.

[0054] Furthermore, the problem classification includes tool call and query categories, and the query categories include statistical analysis, reasoning recommendation, knowledge guidance, and text generation. Depending on the actual situation, the query category may also include other categories, and the present invention does not limit the type and number of query categories.

[0055] Furthermore, when the question is classified as a tool call type, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: determining the name of the calling tool based on the question, the semantic information and / or background information of the question; determining key parameters based on the question, the semantic information and / or background information of the question and transmitting them to the tool; receiving the results returned by the tool; and forming a complete reply content based on the returned results, and outputting it as an answer.

[0056] Specifically, key parameters include original data, identification information, verification information, etc., and these parameters are all included in the question, the semantic information of the question and / or the background information.

[0057] Determining and transmitting key parameters to the tool involves encapsulating the key parameters in JSON format and sending them via a built-in HTTP component via a POST request to the API interface of the target business system where the tool resides. Upon receiving the request, the target business system performs parameter validation, identity verification, and data decryption, then invokes the appropriate business logic to process the request and returns the results in JSON format. Upon receiving the returned results, they are converted into natural language and displayed as output items within the conversation.

[0058] When the problem is classified as a tool call, the API interface is used for tool call, so that the key functions of other business systems in the chemical procurement field (such as performance calculation, material price calculation, etc.) are integrated into this system. By seamlessly connecting with existing systems, real-time data sharing and collaboration are achieved, while reducing the time cost of switching platforms.

[0059] Furthermore, when the classification is a query class, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: based on the question, the semantic information of the question and / or the background information, determining whether the preset function can be directly called to output the answer; if so, output it directly; if not, performing the following processing: based on the question, the semantic information of the question and / or the background information, locating the secondary database in the database and / or the secondary knowledge graph in the knowledge graph for retrieval to obtain the retrieval results; based on the retrieval results, forming a complete reply content and outputting it as an answer, wherein the database includes a preset number of secondary databases, the knowledge graph includes a preset number of secondary knowledge graphs, and each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

[0060] The topic types can be divided according to core business scenarios, such as demand reporting, procurement document preparation, supplier sourcing, etc. Please refer to Figure 2 , Figure 2Among the several types of problems given in [1], most statistical analysis problems can directly call preset functions to output answers. That is, the corresponding function is called according to the user's data analysis requirements to obtain the execution result. However, other types require database retrieval, and the answers are either directly given or further reasoned to form the answer. When classified as statistical analysis, the analysis strategy includes: locating the target data source, determining the analysis method, calling the response function, and determining the output conclusion form. When classified as reasoning recommendation, the analysis strategy includes: locating the target subject knowledge base (single / multiple), determining the reasoning method (knowledge graph-based / rule-based / LLM-based further reasoning capabilities), and determining the output conclusion form. The target subject database is a secondary database, and the LLM is a large language model. When classified as knowledge guidance, the analysis strategy includes: locating relevant policies and regulations / corporate system libraries, restricting the reasoning method (limiting the LLM's free play to only based on rules and knowledge graphs), and determining the output conclusion form. When classified as text generation, the analysis strategy includes: locating the target subject knowledge base, determining the writing style of the generated text, and generating text that meets the requirements based on the knowledge base.

[0061] Furthermore, based on the question, the semantic information and / or background information of the question, locating the secondary database in the database and / or the secondary knowledge graph in the knowledge graph for retrieval, obtaining the retrieval results includes the following steps:

[0062] Based on the question, semantic information and / or background information of the question, at least one relevant secondary database and / or secondary knowledge graph is located.

[0063] The secondary database and / or secondary knowledge graph is searched to obtain candidate results, which are typically documents or paragraphs. Simple search models such as the BM25 algorithm can be used for search, which generally do not need to consider very complex context or semantics to improve search speed.

[0064] Based on the pre-trained text embedding model, a vector representation of each candidate result is generated to obtain a first text embedding. These first text embeddings can capture the semantic information of the text, not just relying on keywords, but encoding the entire context.

[0065] Based on the pre-trained text embedding model, generate the question, the semantic information of the question and / or

[0066] Or a vector representation of background information to obtain the second text embedding.

[0067] Calculate the cosine similarity between each of the first text embedding and the second text embedding. In this step, the GTE-Rerank model can be used to calculate the cosine similarity to evaluate the relevance.

[0068] The cosine similarity is sorted, and the candidate result corresponding to the highest cosine similarity is selected as the search result. Based on the cosine similarity score, the GTE-Rerank model re-sorts the candidate results, selects the most relevant documents or answers, and returns the sorted document or answer list to obtain the final result.

[0069] Furthermore, the management, storage and update of chemical procurement-related data resources by the knowledge base and / or knowledge graph include the following steps:

[0070] Acquire text corpus in the field of chemical procurement, including structured / unstructured / semi-structured data.

[0071] Internal procurement data in the text corpus of the chemical procurement field is aligned with external knowledge data.

[0072] The unstructured / semi-structured data is converted into text form and / or vector form.

[0073] The data in text form and / or vector form are stored in a corresponding secondary database based on the subject type.

[0074] Relationships between entities are extracted from the knowledge base to form and store secondary knowledge graphs of different subject types.

[0075] The knowledge base and / or knowledge graph are updated by receiving textual data in the chemical procurement field from external systems at preset intervals. This textual data includes procurement-related laws and regulations (such as demand reporting, procurement document preparation, and supplier sourcing), corporate systems, and policy documents.

[0076] by Figure 2 As an example, when the system answers questions, it directly retrieves the knowledge base, that is, Figure 2 The vectorized local knowledge base in is used to obtain the required data resources, and the knowledge base is not updated at this time.

[0077] When updating the knowledge base, the first step is to acquire textual data from the chemical procurement field, including unstructured, semi-structured, or structured data. Unstructured / semi-structured data, including text, tables, data charts, citations, key concepts, and relationships, primarily comes from various documents and reports in the chemical procurement field. Natural language processing techniques and data parsing tools are used to convert this unstructured and semi-structured data into processable data formats, namely text and vector forms. Alternatively, the knowledge base data can be derived from manually constructed knowledge graphs. These graphs are constructed by business personnel based on their domain experience, practical business needs, and a deep understanding of a specific domain, creating maps of entities, attributes, and their relationships. These entities can be key business objects (such as products, customers, and employees), while their relationships reflect business processes, upstream and downstream connections, and role interactions. Manually constructed knowledge graphs not only represent a concentrated representation of an organization's internal business knowledge but also provide high-quality, industry-specific input for the knowledge base. This type of graph is input into the knowledge base as part of business knowledge. Enterprises can make the implicit knowledge of business personnel explicit, play the role of knowledge representation, and facilitate the dissemination of this knowledge to other employees or systems to ensure the consistency of business decisions and operations.

[0078] Structured data comes from relational databases that store internal procurement and supplier data. This data is accessed and managed using Structured Query Language (SQL), including procurement history, supplier information, price data, etc.

[0079] It's important to note that externally acquired unstructured / semi-structured data needs to be aligned with internal data. For example, external supplier risk data should be aligned with internal supplier data to ensure data consistency and comparability. Furthermore, data cleansing and conversion techniques are required to address issues such as inconsistent data formats and missing values. For structured data, internal databases can be configured to periodically transfer data to a local knowledge base, or dynamic loading can be configured to improve system scalability and accuracy.

[0080] As for knowledge graphs, their data sources and data processing can be similar to those of databases, or they can be directly generated based on the content of the database. Figure 4 This is a schematic diagram of the data flow of the knowledge graph provided by the embodiment of the present invention. Please refer to Figure 4, the knowledge graph focuses more on extracting and abstracting the relationship between entities from existing information. This process can be based on existing technologies, such as automatic processing through natural language processing, information extraction and other technologies, to mine entities (such as people, organizations, places, etc.) and their mutual relationships (such as cooperation, affiliation, dependence, etc.) from large amounts of text, databases and other knowledge sources, and display them in the form of nodes and edges. For example, based on the procurement data and supplier historical data of the chemical industry, the automatically extracted relationship between entities can reflect the potential risks of suppliers and the direction of procurement strategy adjustments. Among them, the relationship between entities includes the relationship between "suppliers" and "raw materials", the connection between "purchase orders" and "budgets", etc. The knowledge graph analyzes the multi-dimensional correlation between entities through automated algorithms, providing the system with a more flexible and dynamic knowledge structure, facilitating the analysis and in-depth mining of data in chemical procurement business, and thus optimizing procurement decisions and budget control. Figure 5 The embodiment of the present invention provides Figure 4 The enlarged image of the middle chart shows that the data sources include bidding and procurement laws and regulations, group systems, and company systems. By integrating this type of data, the professionalism of data in the chemical procurement field has been improved, thereby providing more professional answers to chemical procurement issues.

[0081] This invention integrates and updates externally acquired information through a knowledge fusion mechanism, enabling comprehensive data collection, fusion, processing, and application to ensure the comprehensiveness, accuracy, and real-time nature of the knowledge base. Using unified version management and vectorized storage technology, the knowledge base and knowledge graph are continuously expanded and optimized based on newly acquired data and knowledge, ensuring coverage of all possible procurement business scenarios, thereby providing reliable data support for decision-making in the backend large model.

[0082] By introducing prompt word engineering and dynamic semantic analysis, this system can intelligently match chemical procurement professional terminology and specific needs based on user input, provide accurate process guidance and strategic recommendations, support real-time decision-making and business compliance in complex procurement environments, and significantly improve the intelligence level of procurement business.

[0083] The embodiment of the present invention also provides a chemical procurement intelligent question-answering method, Figure 6 This is a flow chart of the intelligent question-answering method for chemical procurement provided by an embodiment of the present invention. Figure 6 As shown, the method includes the following steps S1 to S5.

[0084] Step S1: Receive a question.

[0085] Step S2: Perform semantic analysis on the content of the question to obtain semantic information contained in the question.

[0086] Step S3: Obtain background information contained in the question.

[0087] Step S4: Classify the question based on the semantic information and the background information.

[0088] Step S5: Based on the classification of the problem, a preset analysis strategy is called, and a work branch corresponding to the analysis strategy is enabled to generate and output an answer.

[0089] Among them, the preset analysis strategy includes the processing flow of the problem. When the problem is classified as a query type, the preset analysis strategy includes locating and retrieving the knowledge base and / or knowledge graph. The knowledge base and / or knowledge graph is used to manage, store and update data resources related to chemical procurement.

[0090] Furthermore, the method further includes: receiving user feedback on satisfaction with the answer; and scoring the answer based on the satisfaction, and adjusting the output answer of the reply unit based on the score.

[0091] Furthermore, the method further includes: determining whether the user provides feedback on satisfaction with the output answer; if not, determining whether the user continues to ask questions; if so, continuing to receive questions; if not, ending the conversation.

[0092] The classification of the problems includes tool calling class and query class, and the query class includes statistical analysis class, reasoning recommendation class, knowledge guidance class and text generation class.

[0093] Furthermore, when the question is classified as a tool call type, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: determining the name of the calling tool based on the question, the semantic information and / or background information of the question; determining key parameters based on the question, the semantic information and / or background information of the question and transmitting them to the tool; receiving the results returned by the tool; and forming a complete reply content based on the returned results, and outputting it as an answer.

[0094] The step of determining the key parameters and transmitting them to the tool includes encapsulating the key parameters in JSON format and sending the JSON parameters to the API interface of the target business system where the tool is located via a built-in HTTP component of the system in a POST request manner.

[0095] Furthermore, when the classification is a query class, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: based on the question, the semantic information of the question and / or the background information, determining whether the preset function can be directly called to output the answer; if so, output it directly; if not, performing the following processing: based on the question, the semantic information of the question and / or the background information, locating the secondary database in the database and / or the secondary knowledge graph in the knowledge graph for retrieval to obtain the retrieval results; based on the retrieval results, forming a complete reply content and outputting it as an answer, wherein the database includes a preset number of secondary databases, the knowledge graph includes a preset number of secondary knowledge graphs, and each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

[0096] Furthermore, based on the question, the semantic information and / or background information of the question, a secondary database in the database and / or a secondary knowledge graph in the knowledge graph is located for retrieval, and the retrieval results include: based on the question, the semantic information and / or background information of the question, locating at least one relevant secondary database and / or secondary knowledge graph; searching the secondary database and / or secondary knowledge graph to obtain candidate results; based on a pre-trained text embedding model, generating a vector representation of each candidate result to obtain a first text embedding; based on a pre-trained text embedding model, generating a vector representation of the question, the semantic information and / or background information of the question to obtain a second text embedding; calculating the cosine similarity between each of the first text embedding and the second text embedding; and sorting the cosine similarities, and selecting the candidate result corresponding to the highest cosine similarity as the retrieval result.

[0097] Furthermore, the management, storage and update of data resources related to chemical procurement by the knowledge base and / or knowledge graph include: obtaining text corpus in the field of chemical procurement, including structured / unstructured / semi-structured data; aligning internal procurement data with external knowledge data in the text corpus in the field of chemical procurement; converting the unstructured / semi-structured data into text form and / or vector form; storing the data in text form and / or vector form in the corresponding secondary database based on the subject type; extracting the relationship between entities from the knowledge base, forming secondary knowledge graphs of different subject types and storing them; and receiving text corpus in the field of chemical procurement transmitted by an external system at preset time intervals, and updating the knowledge base and / or knowledge graph, wherein the database includes a preset number of secondary databases, the knowledge graph includes a preset number of secondary knowledge graphs, and each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

[0098] The specific working principle and benefits of the chemical procurement intelligent question-answering method provided by the embodiment of the present invention are similar to the specific working principle and benefits of the chemical procurement intelligent question-answering system provided by the embodiment of the present invention, and will not be repeated here.

[0099] The present application also provides a computer program product which, when executed on a data processing device, is suitable for executing a program initializing steps S1 to S5 of the intelligent question-answering method for chemical procurement.

[0100] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0101] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0102] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0104] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0105] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0106] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0107] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0108] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A chemical procurement intelligent question-answering system, characterized in that: The system includes: Front-end dialogue module, back-end large model module, and knowledge base and / or knowledge graph, among which, The foreground dialogue module includes: a receiving unit for receiving questions; and Output unit, used to output the answer, The background large model module includes: A semantic analysis unit, configured to perform semantic analysis on the question to obtain semantic information contained in the question; A background information acquisition unit, configured to acquire background information contained in the question; a question classification unit, configured to classify the question based on the semantic information and the background information; and The answering unit includes a preset number of working branches, which are used to call a preset analysis strategy based on the classification of the question, and enable the working branches corresponding to the analysis strategy to generate and output the answer to the output unit. The knowledge base and / or knowledge graph is used to manage, store and update data resources related to chemical procurement. Among them, the preset analysis strategy includes a problem processing process. When the problem is classified as a query type, the preset analysis strategy includes locating and retrieving the knowledge base and / or knowledge graph.

2. The system according to claim 1, wherein: The system further includes a user feedback module, which includes: A feedback unit, configured to receive feedback from the user regarding satisfaction with the answer; An optimization unit is configured to score the answer based on the satisfaction level and adjust an output answer of the reply unit based on the score.

3. The system according to claim 2, characterized in that The user feedback module also includes: The first judgment module is used to judge whether the user feedbacks satisfaction with the output answer, and if not, activate the second judgment module; The second judging module is used to judge whether the user continues to ask questions, and if so, start the receiving unit; if not, end the current conversation.

4. The system according to claim 1, wherein: The classification of the problems includes tool calling class and query class, and the query class includes statistical analysis class, reasoning recommendation class, knowledge guidance class and text generation class.

5. The system according to claim 4, characterized in that When the problem is classified as a tool call type, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: Determining a name for a calling tool based on the question, semantic information about the question, and / or contextual information; Based on the problem, semantic information of the problem and / or context information, key parameters are determined and transmitted to the tool; Receive the results returned by the tool; and Based on the returned result, a complete reply content is formed and output as an answer. The step of determining the key parameters and transmitting them to the tool includes encapsulating the key parameters in JSON format and sending the JSON parameters to the API interface of the target business system where the tool is located via a built-in HTTP component of the system in a POST request manner.

6. The system according to claim 4, characterized in that When the classification is a query class, enabling the work branch corresponding to the analysis strategy to generate and output an answer includes: Based on the question, its semantic information and / or background information, determine whether a preset function can be directly called to output the answer. If so, directly output the answer. If not, perform the following processing: Based on the question, semantic information and / or background information of the question, locate the secondary database in the database and / or the secondary knowledge graph in the knowledge graph to perform a search and obtain a search result; Based on the search results, a complete reply content is formed and output as an answer. Among them, the database includes a preset number of secondary databases, and the knowledge graph includes a preset number of secondary knowledge graphs. Each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

7. The system according to claim 6, characterized in that Based on the question, the semantic information and / or background information of the question, a secondary database in the positioning database and / or a secondary knowledge graph in the knowledge graph is searched, and the search results obtained include: Locating at least one relevant secondary database and / or secondary knowledge graph based on the question, semantic information and / or background information of the question; Searching the secondary database and / or the secondary knowledge graph to obtain candidate results; Based on a pre-trained text embedding model, generating a vector representation of each candidate result to obtain a first text embedding; Based on a pre-trained text embedding model, generating a vector representation of the question, semantic information of the question, and / or background information to obtain a second text embedding; Calculating the cosine similarity between each of the first text embeddings and the second text embedding; and The cosine similarities are sorted, and the candidate result corresponding to the highest cosine similarity is selected as the search result.

8. The system according to claim 6, wherein: The management, storage and updating of chemical procurement-related data resources by the knowledge base and / or knowledge graph include: Acquire text corpus in the field of chemical procurement, including structured / unstructured / semi-structured data; Aligning internal procurement data with external knowledge data in the text corpus of the chemical procurement field; Converting the unstructured / semi-structured data into text form and / or vector form; storing the data in text form and / or vector form in a corresponding secondary database based on the subject type; Extracting relationships between entities from the knowledge base to form and store secondary knowledge graphs of different subject types; and Receive text corpus in the field of chemical procurement transmitted by an external system at preset time intervals, and update the knowledge base and / or knowledge graph.

9. An intelligent question-answering method for chemical procurement, characterized in that: The method includes: Receiving issues; Performing semantic analysis on the content of the question to obtain semantic information contained in the question; Obtain background information about the problem; classifying the question based on the semantic information and the background information; and Based on the classification of the problem, a preset analysis strategy is called, and the work branch corresponding to the analysis strategy is enabled to generate and output the answer. Among them, the preset analysis strategy includes the processing flow of the problem. When the problem is classified as a query type, the preset analysis strategy includes locating and retrieving the knowledge base and / or knowledge graph. The knowledge base and / or knowledge graph is used to manage, store and update data resources related to chemical procurement.

10. The method according to claim 9, characterized in that The management, storage and updating of chemical procurement-related data resources by the knowledge base and / or knowledge graph include: Acquire text corpus in the field of chemical procurement, including structured / unstructured / semi-structured data; Aligning internal procurement data with external knowledge data in the text corpus of the chemical procurement field; Converting the unstructured / semi-structured data into text form and / or vector form; storing the data in text form and / or vector form in a corresponding secondary database based on the subject type; Extracting relationships between entities from the knowledge base to form and store secondary knowledge graphs of different subject types; and Receive text corpus in the field of chemical procurement transmitted by an external system at preset time intervals, and update the knowledge base and / or knowledge graph. Among them, the database includes a preset number of secondary databases, and the knowledge graph includes a preset number of secondary knowledge graphs. Each of the secondary databases and / or secondary knowledge graphs is used to store data resources corresponding to a subject type.

Citation Information

Patent Citations

  • Multi-engine intelligent question answering system for multi-type knowledge base

    CN115238101A

  • Knowledge graph-based medicine supply chain question-answering method and system

    CN117251543A

  • Law question answering system based on intention recognition and knowledge graph

    CN117891923A

  • Steel industry intelligent question and answer method and device based on large model and medium

    CN118051587A

  • Large language model knowledge question-answering method and system fused with multi-modal knowledge graph

    CN118627628A