A steel multi-source data autonomous query price method based on a large model agent
Patent Information
- Application Number
- CN202610689315.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-19
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-05-19
AI Technical Summary
[0006]本发明的目的是提供一种基于大模型智能体的钢材多源数据自主查询比价方法,以解决现有技术中钢材多源数据查询精度低、跨源数据整合困难、缺乏自主规划与专业化分析解读的问题
[0024]本发明通过构建基于钢材行业专业语料的提示词工程,解决了通用大模型在垂直领域理解偏差的问题;利用针对性的角色定义与任务约束,系统能够精准解析螺纹钢、热卷等专业品种的复杂比价意图,对行业术语的识别准确率显著提升,在处理模糊查询与复杂业务逻辑时表现出更强的语义对齐能力,有效规避了知识幻觉现象,保障了查询结果的专业性。
Smart Images

Figure CN122388115B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence, specifically relating to a method for autonomous querying and comparing prices of steel based on large-scale intelligent models of intelligent agents. Background Technology
[0002] With the ongoing digital transformation of the steel industry, the demand for real-time perception and in-depth analysis of market data in the steel trading sector is growing rapidly. Within the complex supply chain system, price quotes from various e-commerce platforms, industry research reports, and social media activity constitute a massive, multi-source, heterogeneous information flow. This data is the core basis for enterprises to conduct price forecasting, cost control, and procurement decisions. Utilizing advanced information technology to achieve rapid retrieval and intelligent processing of multi-source market data has become a key means to improve the efficiency of bulk commodity circulation and enhance enterprises' market responsiveness.
[0003] Among these, intelligent agent technology based on large language models offers a new approach to solving data governance challenges in vertical industries. By integrating natural language processing and autonomous planning capabilities, this technology aims to build an intelligent system capable of understanding complex business logic, automatically scheduling external tools, and performing multi-step reasoning, thereby enabling automated querying and multi-dimensional price comparison analysis of steel market prices. This technological direction transforms fragmented data silos into knowledge graphs with decision-making value by simulating the thought processes of human experts, thus addressing the rapidly changing market environment.
[0004] However, existing technologies still face numerous challenges in the in-depth application of multi-source steel data. Traditional data acquisition schemes often rely on fixed scripts or simple rule engines, making it difficult to efficiently parse deep semantic information in unstructured text, resulting in low accuracy in recognizing industry-specific terminology and complex query intents. Simultaneously, general processing models lack optimization and logical alignment for steel industry-specific prompts, often failing to effectively maintain contextual relationships when processing progressive queries and exhibiting significant knowledge illusions. Furthermore, existing systems generally lack a large-model-driven intelligent agent collaboration framework, failing to achieve adaptive cross-source data retrieval and accurate conversion of structured query statements. This leads to a lack of autonomous planning capabilities in price comparison analysis, with outputs often consisting of simple numerical data compilation, failing to provide professional analytical interpretation and visualization support.
[0005] Therefore, this invention proposes a method for autonomous querying and price comparison of multi-source steel data based on a large model intelligent agent. Summary of the Invention
[0006] The purpose of this invention is to provide a method for autonomous querying and price comparison of multi-source steel data based on a large model intelligent agent, so as to solve the problems of low query accuracy of multi-source steel data, difficulty in cross-source data integration, and lack of autonomous planning and professional analysis and interpretation in the existing technology.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] A method for autonomous querying and comparing prices of steel based on multi-source data using a large-model intelligent agent includes:
[0009] Step 1: Receive natural language query request and perform domain intent parsing: Obtain unstructured natural language text input by the user through the natural language interaction and multi-turn dialogue management module, and transmit the unstructured natural language text to the large language model prompt word engineering and intent parsing module. Use the preset steel industry professional language prompt words to perform intent recognition, entity extraction and price comparison dimension extraction to determine the core semantic indicators of the query task. The core semantic indicators include steel product entity, regional entity, time dimension entity and price comparison dimension indicator.
[0010] Step 2: Generate a collaborative query strategy for intelligent agents and execute multi-source tool calls: The intelligent agent tool call and query execution module performs autonomous path planning based on the core semantic indicators. Through the thinking chain technology, the complex query task is broken down into multiple sub-tasks, and a corresponding execution tool is assigned to each sub-task. Using natural language to structured query language technology and adaptive calling logic of multi-source data interfaces, data retrieval is performed across knowledge graphs, vector databases, and structured databases. The retrieved raw data is then processed for format alignment, unit conversion, and outlier removal to generate a standardized multi-source fusion result set.
[0011] Step 3, Price Comparison Analysis and Calculation: The price comparison analysis and visualization output module performs multi-dimensional price comparison calculation on the standardized multi-source fusion result set according to the price comparison dimension indicators. It obtains the average price, absolute price difference and price fluctuation of the target steel product in different time and regional dimensions through preset calculation rules, and performs trend judgment in combination with the steel market rules to generate price comparison analysis and trend judgment results.
[0012] Step 4: Generate natural language interpretation and visualization output of query and price comparison results: The visualization engine automatically matches the chart type and generates multi-dimensional comparison charts based on the price comparison analysis and trend judgment results. At the same time, the large language model is called to combine the price comparison analysis and trend judgment results with multi-source heterogeneous market background data to perform deep logical reasoning and generate professional natural language interpretation text. The multi-dimensional comparison charts and the natural language interpretation text are synchronously fed back to the user interface.
[0013] Step 5: Perform multi-round dialogue context maintenance and process additional queries: Store the intent recognition and classification results of the current round, the extracted entity set, the generated structured query statement, and the analysis report summary fed back to the user through the dialogue context database. When receiving the user's additional query request, calculate the cosine similarity between the new input text and the historical context information. If the cosine similarity reaches the preset relevance threshold, then logically merge the historical entities and the new dimensions through the intent completion algorithm to construct a complete enhanced query intent.
[0014] Step 1, which utilizes a pre-defined corpus of steel industry-specific linguistic prompts to perform intent recognition, includes: constructing a corpus containing a predetermined size of professional terms, business logic, and industry terminology related to steel trading; designing a multi-level prompt engineering framework based on the corpus, including a role definition layer, a task description layer, a constraint layer, and an example guidance layer; using a large language model to perform semantic decomposition on the input natural language instructions, identifying rebar, hot-rolled coil, medium and heavy plates, wire rod, and section steel; identifying regional entities including East China, North China, and South China; and identifying time-dimensional entities including those with a pre-defined time granularity; and extracting price comparison indicators, including price value comparison, price trend correlation, regional price difference analysis, and commodity linkage analysis.
[0015] Step 2, generating the agent-based collaborative query strategy, includes: constructing an agent-based collaborative framework driven by a large language model, which has task decomposition and autonomous planning functions; the agent, based on the semantic indicators parsed in Step 1, breaks down complex query tasks into multiple sub-tasks using thought chain technology, and assigns corresponding execution tools to each sub-task; the execution tools include a knowledge graph query tool for retrieving relationships, a market analysis report query tool for retrieving unstructured text semantics, a structured database query tool for retrieving real-time market data, and an application programming interface (API) call tool for calling external platform quotes; the agent dynamically adjusts subsequent query paths based on the execution results of the sub-tasks to achieve collaborative retrieval of cross-source data.
[0016] The application of natural language to structured query language technology in step 2 includes: establishing a structured database table and metadata mapping table specific to the steel industry; using a large language model to convert the query conditions described in natural language into instructions that conform to the syntax of standard structured query language; matching the identified entities with the table names and column names in the structured database through pattern linking technology; and performing syntax verification and logic correction to ensure that the generated query instructions can be executed accurately and return the target dataset.
[0017] The adaptive calling logic of the multi-source data interface in step 2 includes: establishing an application interface protocol library containing mainstream steel e-commerce platforms, industry information websites, and enterprise internal management systems; the intelligent agent automatically identifies the target data source according to the query intent and extracts matching calling parameters and authentication information from the protocol library; executing asynchronous concurrent calls to obtain real-time quotation data from multiple platforms; performing format alignment, unit conversion, and outlier removal on the obtained raw data to generate a standardized multi-source fusion result set.
[0018] The specific calculation rules for multi-dimensional price comparison in step 3 include: calculating the arithmetic average price of the target steel product within a set time interval; calculating the absolute price difference between different products or different regions, where the absolute price difference is the difference between the maximum and minimum price values; calculating the month-on-month growth rate and year-on-year growth rate of prices, where the month-on-month growth rate and year-on-year growth rate are the ratios of the difference between the current period price and the comparison period price to the comparison period price; calculating the standard deviation of price fluctuations to assess the intensity of market volatility; and using the Pearson correlation coefficient to calculate the correlation between price trends of different steel products.
[0019] The process of generating multi-dimensional comparison charts in step 4 includes: automatically matching chart types according to the dimensions of price comparison analysis; generating line trend charts for time dimension data; generating clustered column charts for variety or regional comparison dimension data; and generating pie charts for share or composition dimension data. Data linkage technology is used to trigger interaction between charts; when a user clicks on a certain chart feature, the other related charts simultaneously update their data. The generated charts support multi-dimensional scaling, filtering, and data export operations.
[0020] The professional natural language interpretation text generation process in step 4 includes: converting the price comparison analysis results calculated in step 3 and the chart features generated in step 4 into semantic description vectors; calling a large language model that has been fine-tuned with steel industry corpus, and performing in-depth logical reasoning in combination with the current market supply and demand balance, raw material cost fluctuations and macroeconomic policy guidance; generating a structured text report that includes core conclusions, causal analysis and risk warnings; the text report meets the preset text length requirements and can correspond to the logic of multi-dimensional comparison charts.
[0021] The implementation process of multi-turn dialogue context maintenance in step 5 includes: establishing a dialogue context database based on a key-value pair structure, using the user's unique identifier as the index key; storing the intent representation vector, extracted entity set, generated query statement, and final analysis results for each round of dialogue; when a new round of input is received, calculating the cosine similarity between the new input and the historical context, and if the correlation reaches a preset correlation threshold, determining it as an append query; and logically merging historical entities and newly added dimensions through an intent completion algorithm to construct a complete enhanced query intent, avoiding the repeated execution of completed calculation steps.
[0022] The proposed multi-source data autonomous query and price comparison method for steel is applied to price comparison scenarios for cold-rolled ribbed steel bars, hot-rolled ribbed steel bars, and hot-rolled steel sections within a specific time period. This method integrates and consolidates multi-source heterogeneous data, and significantly improves the decision support effectiveness of the price comparison analysis results.
[0023] Compared with the prior art, the beneficial technical effects of the present invention are as follows:
[0024] This invention solves the problem of comprehension bias in vertical domains by constructing a prompt word engineering based on professional corpus of the steel industry. By using targeted role definitions and task constraints, the system can accurately parse the complex price comparison intentions of professional products such as rebar and hot-rolled coil, significantly improve the accuracy of industry terminology recognition, and demonstrate stronger semantic alignment ability when handling fuzzy queries and complex business logic. It effectively avoids the phenomenon of knowledge illusion and ensures the professionalism of query results.
[0025] This invention, by introducing a large language model-driven intelligent agent collaborative framework, achieves a leap from querying single data sources to autonomous integration of multi-source heterogeneous data. The intelligent agent can autonomously plan query paths according to task requirements, dynamically call knowledge graphs, vector databases, and various application programming interfaces, and complete cross-platform real-time data crawling and fusion without human intervention. This autonomous execution mechanism significantly lowers the threshold for data acquisition, solves the problems of poor flexibility and high maintenance costs of traditional crawler programs, and realizes the efficient flow of steel market information.
[0026] This invention provides enterprises with decision-making support with deep logical backing through the linked output of natural language interpretation and multi-dimensional comparative charts. The system can not only automatically perform complex price comparison calculations, but also provide trend judgments and causal analyses in combination with industry background, evolving query results from simple numerical displays to in-depth knowledge services. At the same time, the robust context maintenance mechanism supports users to perform progressive and incremental natural language interactions, greatly improving the user experience, shortening the path from information acquisition to decision execution, and significantly enhancing the enterprise's responsiveness and competitive advantage in the volatile steel market. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the overall technical architecture of the steel multi-source data autonomous query and price comparison method based on a large model intelligent agent according to an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of the core principle framework of the intelligent agent collaborative query strategy and multi-source tool invocation in the steel multi-source data autonomous query and price comparison method based on a large model intelligent agent according to an embodiment of the present invention.
[0029] Figure 3 This is a flowchart illustrating the logical flow of multi-turn dialogue context maintenance and append query processing in the multi-source data autonomous query and price comparison method for steel based on a large model intelligent agent according to an embodiment of the present invention. Detailed Implementation
[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] Example 1
[0032] This invention proposes a method for autonomous querying and price comparison of multi-source steel data based on a large-scale intelligent agent. This method achieves end-to-end integration from natural language interaction to automated processing of multi-source heterogeneous data by constructing a multi-level intelligent collaborative architecture. The overall implementation logic of this method is built upon the coordinated operation of modules including a knowledge graph and vector database for the steel industry, a large-scale language model prompt word engineering and intent parsing module, an intelligent agent tool invocation and query execution module, a natural language interaction and multi-turn dialogue management module, and a price comparison analysis and visualization output module.
[0033] Please refer to Figure 1 In the above-mentioned method for autonomous querying and comparing prices of steel based on large-scale intelligent agents, step 1 involves receiving natural language query requests and performing domain intent parsing, specifically including the following detailed operations:
[0034] A stable full-duplex communication link is established through the natural language interaction and multi-turn dialogue management module to receive unstructured natural language text input by the user. This module performs preprocessing on the raw input text, including removing redundant characters, word segmentation correction, and language detection. The preprocessed text is then transmitted to the large language model prompt word engineering and intent parsing module. The core of this module adopts a prompt word engineering framework built based on a professional corpus of the steel industry. This framework is logically divided into a role definition layer, a task description layer, an industry constraint layer, and an example guidance layer.
[0035] At the role definition layer, the pre-defined language model is a senior steel trading analyst with 30 years of experience, establishing a professional and precise linguistic tone. At the task description layer, the model is explicitly required to perform three tasks: intent recognition, entity extraction, and price comparison dimension extraction. At the industry constraint layer, specific business logic from the steel trading sector is injected, such as the price of rebar typically being measured in tons, and the weighting of hot-rolled coil thickness specifications on price. At the example guidance layer, multiple sets of "input-output" pairs are provided to guide the model in learning how to transform "I want to see the recent price difference between rebar and hot-rolled coil in East China" into a structured JSON intent representation.
[0036] The system utilizes a large language model to perform deep semantic decomposition of the input natural language commands. The intent recognition process categorizes queries into single-product inquiries, multi-product price comparisons, regional price difference analysis, historical trend tracking, or correlation assessment. The entity extraction process uses a pre-defined named entity recognition model for the steel industry to accurately extract steel product entities, regional entities, time entities, and specification entities from the text. The price comparison dimension extraction process determines the core indicators for subsequent calculations, including absolute price difference, relative price change, and average price comparison.
[0037] Please refer to Figure 2 In the above-mentioned method for autonomous querying and comparing steel prices based on large-scale intelligent agents, step 2 generates a collaborative query strategy for the intelligent agents and executes multi-source tool calls, specifically including the following detailed operations:
[0038] The agent tool invocation and query execution module receives the structured intent representation output from step 1 and initiates an autonomous planning process. Based on the complexity of the query task, the agent generates a multi-step execution plan using thought chain technology. If the query task involves real-time pricing, the agent plans to invoke a structured database query tool or an external application programming interface (API) tool; if it involves industry policy interpretation or market analysis reports, it plans to invoke a market analysis report retrieval tool; if it involves upstream and downstream relationships in the industry chain, it plans to invoke a knowledge graph-based association query tool.
[0039] When executing the natural language to structured query language technology, the system first loads a metadata mapping table specific to the steel industry. This table defines the mapping relationship between natural language entities and structured database field names and table names. For example, "price" is mapped to the "price_value" field in the structured database, and "manufacturer" is mapped to "manufacturer_name". The large language model generates standardized structured query statements based on the mapping table and performs syntax compliance checks to prevent illegal join queries or incorrect filtering conditions.
[0040] For adaptive calls to multi-source data interfaces, the agent accesses a pre-defined application programming interface (API) protocol library. This library stores the calling specifications for multiple data sources, including mainstream steel trading platforms, industry information portals, and enterprise ERP systems. Based on the intent parsing results, the agent automatically matches the optimal data source and dynamically constructs a request packet containing authentication tokens, query parameters, and pagination information. Through an asynchronous concurrency mechanism, the system simultaneously initiates data requests to multiple target interfaces.
[0041] The acquired raw data enters the multi-source fusion processing stage. This stage performs data cleaning operations, including removing duplicates and correcting logically erroneous data points. For heterogeneous data from different data sources, format alignment and unit conversion are performed. Some data quoted in "yuan / sheet" are converted to the standard "yuan / ton"; different time formats are unified to international standard timestamps. Finally, a standardized multi-source fusion result set is generated, providing a high-quality data foundation for subsequent price comparison calculations.
[0042] In the above-mentioned method for autonomous querying and comparing prices of steel based on large-model intelligent agents, step 3 involves multi-source data querying and price comparison analysis, specifically including the following detailed operations:
[0043] The price comparison analysis and visualization output module performs in-depth statistical analysis on the standardized result set generated in step 2. First, it performs grouping and aggregation operations based on the parsed price comparison dimensions. For the time dimension, the system calculates the arithmetic average price of the target steel product over a set period.
[0044]
[0045] in, This represents the arithmetic average price over the target period. This represents the total number of data points sampled. Indicates the first The price value for each sampling point.
[0046] Secondly, perform cross-product or cross-regional price spread calculations. Calculate the absolute price spread, which is the price difference between different comparable objects at the same point in time or within the same time interval. Simultaneously, introduce a price fluctuation calculation logic to assess the severity of market volatility by comparing the current cycle price with the benchmark cycle price.
[0047]
[0048] in, Indicates the price growth rate. This represents the price value for the current observation period. This represents the periodic price value used as a benchmark.
[0049] In addition, the system performs trend analysis. It quantifies market risk by calculating the standard deviation of price fluctuations and identifies support and resistance levels in price trends using moving average algorithms. For multi-commodity price comparisons, it uses the Pearson correlation coefficient to calculate the correlation between price movements of different commodities, identifying steel categories with strong linkages. These calculation results constitute the core content of the price comparison analysis and trend analysis.
[0050] In the above-mentioned method for autonomous querying and comparing steel prices based on large-scale intelligent agents, step 4 generates natural language explanations and visualizations of the query and comparison results, which specifically includes the following detailed operations:
[0051] The price comparison analysis and visualization output module activates the visualization engine, automatically matching the display scheme based on the characteristics of the analysis results. For price data containing time series, the system generates highly interactive line trend charts, allowing users to zoom in and out to view micro-fluctuations; for horizontal comparisons of different regions or commodities, clustered bar charts are generated to intuitively display the price difference distribution; for cost composition or market share analysis, pie charts are generated. All charts integrate data linkage technology; when a user selects a specific time point on the line chart, the bar chart is simultaneously updated to reflect the regional price difference distribution at that time point.
[0052] While generating multi-dimensional comparative charts, the system calls upon a large language model to generate professional natural language interpretations. The large language model not only receives the numerical calculation results from step 3, but also obtains the current macroeconomic background from a vector database, listing iron ore price fluctuations, changes in coking coal costs, operating rates in downstream real estate or infrastructure industries, and the latest import and export policies. The model transforms the numerical results into a logically rigorous analysis report, covering core data conclusions such as "The average price of rebar rose by 3% this month, reaching a new high in nearly six months," in-depth analysis of the reasons why "Affected by the continued strengthening of iron ore prices, the center of gravity of steel mill production costs has shifted upward, supporting the rise in spot prices," and future risk warnings such as "The risk that the release of downstream demand may fall short of expectations needs to be monitored."
[0053] Ultimately, the system binds the natural language interpretation of the text with the execution logic of multi-dimensional comparative charts, and pushes the results synchronously to the user interface through the natural language interaction and multi-turn dialogue management module. This composite output mode of "charts + interpretation" ensures both the intuitiveness of information delivery and the depth of decision support.
[0054] Please refer to Figure 3 In the above-mentioned method for autonomous querying and comparing steel prices based on large-scale intelligent agents, step 5 involves maintaining the multi-turn dialogue context and processing append queries, specifically including the following detailed operations:
[0055] The natural language interaction and multi-turn dialogue management module writes the complete interaction information of the current turn into the dialogue context database. The stored data structure includes the user's original query vector, intent recognition classification results, extracted entity sets, generated structured query statements, and the final analysis report summary fed back to the user. The dialogue context database adopts an indexing mechanism based on the user's unique identifier to ensure data isolation and fast retrieval in multi-concurrency scenarios.
[0056] When a user submits an append query request, the system first performs cosine similarity detection. By calculating the cosine similarity between the new input text and the historical context information, it determines whether the current request is a continuation of a previous task. If it is determined to be an append query, the system initiates the intent completion algorithm. If the user previously queried "Shanghai rebar price" and now inputs "What about Guangzhou?", the system will automatically extract "rebar" and "price query intent" from the historical entities and merge them with the newly added entity "Guangzhou" to construct a complete query task.
[0057] For append queries, the agent executes an incremental query strategy, invoking relevant tools only for the changed dimensions. This avoids repeated retrieval and calculation of historically known data, significantly reducing system response latency. The completed query results are compared and analyzed with the previous results, and this progressive relationship is reflected in the feedback, thus maintaining the coherence and logic of the dialogue.
[0058] To further illustrate the implementation effect of the technical solution of the present invention, a specific application scenario is constructed below.
[0059] In this application scenario, the purchasing manager of a large construction company needs to perform decision analysis on the steel procurement plan for the second quarter of 2025. The user inputs the command through the system's voice interface: "Compare the price trends of cold-rolled ribbed steel bars, hot-rolled ribbed steel bars, and hot-rolled steel sections in the East China and South China markets in the second quarter of 2025, and analyze the reasons for the price differences."
[0060] After receiving the instruction, the system performs domain intent parsing in step 1. The large language model prompt word engineering identifies this as a complex price comparison query intent involving "multiple varieties, multiple regions, and long cycles." The extracted entities include: variety, region, and time.
[0061] In step 2, the agent generates an execution plan. First, it retrieves historical transaction prices from the company's internal procurement system using a structured database; second, it retrieves real-time listed prices from major steel e-commerce platforms using an application programming interface (API); simultaneously, it retrieves industry research reports for the relevant time period from a vector database. The agent acquires a total of 180 sets of price sampling data across two regions for three different product categories using an asynchronous concurrent approach.
[0062] Step 3 involves performing a price comparison analysis. The system calculates the average quarterly price of hot-rolled ribbed steel bars in the East China market to be RMB 3,850 / ton, and in the South China market to be RMB 3,920 / ton, with a cross-regional price difference of RMB 70 / ton. It also shows that the price difference between cold-rolled and hot-rolled ribbed steel bars widened at the end of the quarter.
[0063] Step 4: Output Generation. The interface displays a multi-variety regional price trend chart containing 6 curves, along with a natural language report: "In the second quarter of 2025, hot-rolled ribbed steel bars showed strong regional correlation. Due to logistics costs and low local inventory, prices in the South China market remained higher than in the East China market. Among the varieties, because the cold-rolling process is more sensitive to electricity costs, the price of cold-rolled ribbed steel bars saw a steeper increase in June due to the adjustment of electricity price policies in that quarter, causing the price difference between cold-rolled and hot-rolled varieties to widen from 100 yuan / ton at the beginning of the quarter to 180 yuan / ton."
[0064] The user then initiated a follow-up query: "If electricity prices fall next quarter, will this price difference narrow?" Step 5 retrieves the context and identifies that "price difference" refers to the difference between cold-rolled and hot-rolled products. The agent immediately links with the cost model in the knowledge graph to perform sensitivity analysis and quickly provides a prediction.
[0065] The method described in this embodiment enables steel traders to gain in-depth market insights with extremely low learning costs, achieving a high degree of automation in data acquisition, logical operations, and professional analysis.
[0066] Example 2
[0067] As an alternative to Example 1, this example proposes a method for autonomous querying and comparing prices of multi-source steel data based on a hybrid approach driven by a rule engine and a large model. This approach demonstrates higher performance stability when handling high-frequency, standardized query requirements.
[0068] In the aforementioned alternative, the agent tool invocation and query execution module integrates a preset rule filtering layer. When the intent parsed in step 1 belongs to a high-frequency, simple task such as "standard price query" or "single-variety historical trend," the system directly triggers the rule engine to execute data acquisition according to the preset SQL template or interface call logic, bypassing the autonomous path planning stage of the large language model. This mechanism can further shorten the response time for such tasks.
[0069] Specifically, the rules engine maintains a dynamically updated set of frequently used instructions. For the instruction "Today's rebar price," the rules engine directly maps it to a query of the core market data database and employs a preset caching mechanism. Only when the query intent involves complex logical reasoning, cross-domain correlations, or fuzzy semantics does the system switch to the intelligent agent mode driven by a large language model.
[0070] Furthermore, in the price comparison analysis and calculation phase, this alternative solution introduces a configurable business logic plugin. Users can predefine price difference warning thresholds in the system according to their own risk control requirements or trading habits. When the calculated price difference exceeds the preset range, the system will automatically raise the warning level when generating natural language interpretation and use eye-catching visual markers to annotate the multi-dimensional comparison charts.
[0071] For multi-source data fusion, this alternative employs a weighted credibility-based fusion algorithm. The system assigns a real-time updated weight factor to each data source. The calculation of the weight factor comprehensively considers the update frequency of the data source, the accuracy of historical data, and market coverage. During data alignment, a weighted average method is used to handle price conflicts between different sources, ensuring that the final output price benchmark is more authoritative.
[0072] Example 3
[0073] As an alternative to Example 1, this example proposes a method for generating personalized steel price comparison analysis reports based on a low-code platform. This solution focuses on meeting the diverse reporting and archiving needs within enterprises.
[0074] In this solution, the price comparison analysis and visualization output module in step 4 is replaced by a low-code report building engine. The system comes pre-loaded with a rich library of steel industry report components, including price balance sheets, regional inventory linkage charts, cost and profit monitoring dashboards, etc.
[0075] Once the large language model parses the user's query intent, it not only generates natural language interpretation but also automatically selects and combines the most suitable report template from the component library based on the logical structure of the intent. Users can perform secondary adjustments to the automatically generated reports through simple drag-and-drop operations, adding specific comparison manufacturers, modifying axis ranges, or inserting company-defined remarks.
[0076] This alternative also integrates an automated distribution mechanism. The generated personalized price comparison reports can be automatically pushed to designated decision-makers via enterprise office software, email systems, or mobile applications according to preset time periods. The reports embed dynamic data links, so when the underlying multi-source data is updated, the values and charts in the reports are automatically refreshed synchronously, achieving closed-loop management from query to decision execution.
[0077] Regarding data security, this alternative introduces fine-grained access control logic. The system automatically filters sensitive information from multi-source data based on user roles and permissions. Purchasing staff can only view price comparisons for their assigned region, while management has access to view core cost data for the entire region, all product categories, and upstream suppliers. This role-based data anonymization ensures the compliant use of multi-source data within the enterprise.
[0078] Example 4
[0079] As an alternative to Example 1, this example proposes a fully voice-interactive intelligent query and price comparison method for multi-source steel data, aiming to optimize interactive scenarios such as mobile office and warehouse sites where keyboard input is inconvenient.
[0080] This solution integrates a high-performance Automatic Speech Recognition (ASR) engine and a Text-to-Speech (TTS) engine at the front end of the Natural Language Interaction and Multi-Turn Dialogue Management module. The speech recognition engine has been reinforced with specialized vocabulary specific to the steel industry, enabling it to accurately recognize voice commands containing local accents and industry jargon.
[0081] In terms of execution flow, users initiate queries via voice. The system converts the speech into text in real time and uses streaming processing technology to simultaneously launch the computational tasks of steps 1 to 3 in the background. In the results feedback phase, the TTS engine transforms the professional natural language interpretation generated by the large language model into natural and fluent speech, providing users with the core price comparison conclusions through voice broadcast.
[0082] To address the limited information capacity of voice interaction, this solution employs a "voice broadcast + multi-device linkage" model. While broadcasting key conclusions, the system automatically pushes detailed, multi-dimensional comparative charts and in-depth analysis reports to the user's smartphone, tablet, or smart wearable device. Users can then perform further actions on the pushed content using simple voice commands.
[0083] For maintaining multi-turn conversations, this solution incorporates voiceprint recognition technology. The system can identify different users based on voiceprint characteristics and maintain an independent conversation context space for each user. This means that even in a collaborative office environment, the system can accurately distinguish each person's consecutive query requests, ensuring the accuracy of the interaction logic.
[0084] Example 5
[0085] This embodiment focuses on describing the specific implementation logic of this method when processing unstructured image data, in order to further enhance the depth of multi-source data query.
[0086] In steel trading, a large amount of market information exists in the form of images such as screenshots of price quotations in WeChat groups and scanned copies of handwritten price adjustment letters. During step 2, when executing multi-source tool invocation, the agent has the ability to invoke optical character recognition (OCR) tools and multimodal large models.
[0087] Specifically, when the multi-source data source includes image files, the system first uses a high-precision OCR engine to perform region localization and text extraction on the image. For structured price quotation table screenshots, the system uses row and column alignment algorithms to restore them to spreadsheet format; for unstructured price adjustment notice images, the system uses a multimodal big data model to understand their semantic focus and extract the price adjustment items, adjustment range, and execution time.
[0088] The information extracted from the images, after data cleaning and format conversion, is incorporated into the standardized result set generated in step 2. In the price comparison calculation in step 3, the image data and structured data from structured databases and application programming interfaces (APIs) undergo weighted fusion in the same dimension. When there is a time difference between the e-commerce platform's quoted price and the manufacturer's handwritten price adjustment letter, the system prioritizes the latest price information based on timestamp logic.
[0089] In the output feedback of step 4, the system will indicate the type of data source. If a price comparison result is mainly based on image information, the system will retain the thumbnail link of the original image in the report for users to perform manual verification. This in-depth mining of image data greatly expands the coverage of multi-source data queries and solves the pain point of traditional solutions being unable to handle unstructured visual information.
[0090] Example 6
[0091] This embodiment details the vector retrieval optimization strategy of this method when processing large-scale historical market data, in order to ensure response speed in ultra-long-term price comparison analysis.
[0092] In the knowledge graph and vector database module for the steel industry, the system employs hierarchical indexing and quantization compression techniques for the tens of millions of historical price and market commentary data points accumulated. During the vector retrieval in step 2, the system first performs hard filtering based on the entity tags parsed in step 1, narrowing the search space to a specific segmented vector database.
[0093] During the vector matching stage, the system employs a hierarchical retrieval logic. The first level utilizes a lightweight vector index to perform a fast coarse ranking, filtering out semantically relevant candidate sets; the second level utilizes the full set of high-dimensional vectors to perform fine ranking calculations, ensuring that the retrieved market background information highly matches the current query intent.
[0094] To improve computational efficiency, the system encapsulates the price comparison analysis calculation rules into operators. In step 3, complex statistical models such as coefficient of variation calculation and long-term trend fitting are decomposed into atomic operators that can be executed in parallel on a distributed computing cluster. For price comparison tasks involving multi-source data spanning more than 5 years, the system pre-generates statistical summaries for each dimension through a pre-calculation mechanism. This allows the system to directly call the summary data for rapid assembly within a preset response time limit when a user initiates a macro trend query, avoiding real-time scanning of the entire original data.
[0095] In all the above embodiments, the system possesses a complete exception handling mechanism. If a core data source interface fails during step 2, the agent can automatically switch to a backup data source and inform the user of the data source adjustment in the final report. If the intent parsed in step 1 is seriously ambiguous, the system will proactively ask questions through the natural language interaction module to guide the user to supplement key information, thereby ensuring the robustness of the entire query and comparison process.
[0096] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for autonomous querying and comparing prices of steel based on multi-source data using a large-scale intelligent agent, characterized in that, Includes the following steps: Step 1: Obtain unstructured natural language text input by the user through the natural language interaction and multi-turn dialogue management module, and transmit it to the large language model prompt word engineering and intent parsing module. Utilize pre-set steel industry professional language prompt words to perform intent recognition, entity extraction, and price comparison dimension extraction to determine the core semantic indicators of the query task. These core semantic indicators include: using the large language model to perform semantic decomposition of the input natural language command, identifying steel product entities including rebar, hot-rolled coil, medium and heavy plates, wire rod, and section steel; identifying regional entities including core distribution cities and their respective regions for steel trade; identifying time-dimensional entities including historical periods, current periods, and future predicted periods with pre-set time granularity; and extracting price comparison dimension indicators including price comparisons between different products, price trend correlations of the same product in different regions, regional price difference analysis, and analysis of the linkage between upstream and downstream products in the industrial chain. Step 2: Generate a query strategy for intelligent agent collaboration and execute multi-source tool calls. Perform autonomous path planning based on core semantic indicators. Utilize natural language to structured query language technology and adaptive calling logic of multi-source data interfaces to generate a standardized multi-source fusion result set. Step 3: The price comparison analysis and visualization output module performs multi-dimensional price comparison calculation on the standardized multi-source fusion result set according to the price comparison dimension indicators, calculates the standard deviation of price fluctuations to assess the intensity of market fluctuations, uses the Pearson correlation coefficient to calculate the correlation of price trends between different steel products, identifies steel product categories with strong linkages, performs trend judgment in combination with steel market rules, and generates price comparison analysis and trend judgment results. Step 4: Use the visualization engine to generate multi-dimensional comparison charts based on the price comparison analysis and trend judgment results. At the same time, call the large language model to combine the price comparison analysis and trend judgment results with multi-source heterogeneous market background data to perform deep logical reasoning and generate professional natural language interpretation text. The multi-dimensional comparison charts and natural language interpretation text are synchronously fed back to the user interface. Step 5: Perform multi-turn dialogue context maintenance and process additional queries. When an additional query request is received from the user, the intent recognition and classification results of the current turn, the extracted entity set, the generated structured query statement, and the analysis report summary fed back to the user are stored in the dialogue context database. When an additional query request is received from the user, the cosine similarity between the new input text and the historical context information is calculated to construct a complete enhanced query intent.
2. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The process of performing intent recognition using a preset steel industry-specific corpus of prompts in step 1 includes: Construct a corpus containing professional vocabulary, business logic, and industry terms in the steel trade sector; Based on a corpus, a multi-level prompt word engineering framework was designed. The prompt word engineering framework is logically divided into a role definition layer, a task description layer, a constraint condition layer, and an example guidance layer. At the role definition level, a large language model is established as the contextual tone for steel trade analysts; At the task description layer, it is explicitly required that the large language model perform tasks such as intent recognition, entity extraction, and price comparison dimension extraction. Inject business logic into the constraint layer; In the example guidance layer, multiple sets of example pairs corresponding to inputs and outputs are provided to guide the large language model to transform natural language into structured intent representations.
3. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The process of generating the agent-cooperative query strategy in step 2 includes: Construct an intelligent agent collaborative framework based on a large language model, which has the functions of task decomposition and autonomous planning. Based on the core semantic indicators obtained from parsing, the intelligent agent breaks down complex query tasks into multiple sub-tasks using the thinking chain technology, and assigns a corresponding execution tool to each sub-task. The intelligent agent dynamically adjusts the subsequent query path based on the execution results of the sub-tasks, enabling collaborative retrieval of cross-source data.
4. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The process of applying natural language to structured query language technology in step 2 includes: Establish a structured database table structure metadata mapping table specifically for the steel industry. The structured database table structure metadata mapping table defines the mapping relationship between natural language entities and structured database field names and table names. Using a large language model, query conditions described in natural language are converted into instructions that conform to the syntax of standard structured query language based on the metadata mapping table of the structured database table structure. The identified steel product entities, regional entities, and time-dimensional entities are matched with table names and column names in the structured database using pattern linking technology. Perform syntax validation and logic correction to ensure that the generated query commands can be executed accurately and return the target dataset.
5. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The adaptive invocation logic of the multi-source data interface in step 2 includes: Establish an application interface protocol library that includes multiple steel e-commerce platforms, industry information websites, and enterprise internal management systems. The application interface protocol library stores the calling specifications, authentication tokens, and query parameter formats of each data source. The intelligent agent automatically identifies the target data source based on the query intent and extracts matching call parameters and authentication information from the application programming interface protocol library; Execute asynchronous concurrent calls to obtain real-time quote data from multiple platforms; The acquired raw data is processed for format alignment, unit conversion, and outlier removal, unifying heterogeneous data from different sources into a standardized timestamp format and unit of measurement, and generating a standardized multi-source fusion result set.
6. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The specific calculation rules for multi-dimensional price comparison in step 3 include: calculating the arithmetic average price of the target steel product within a set time interval, where the arithmetic average price is the quotient of the sum of the values of the sampled data points and the total number of sampled points. Calculate the absolute price difference between different varieties or different regions. The absolute price difference is the difference between the maximum price and the minimum price. Calculate the month-on-month growth rate and year-on-year growth rate of prices. The month-on-month growth rate and year-on-year growth rate are the ratios of the difference between the current cycle price and the price in the comparison cycle to the price in the comparison cycle.
7. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The process of generating the multi-dimensional comparison chart in step 4 includes: The chart type is automatically matched according to the dimensions of the price comparison analysis. For time series price data, a line trend chart is generated; for product or regional comparison data, a clustered column comparison chart is generated; and for cost composition or market share data, a pie chart is generated. Data linkage technology is used to trigger interactions between charts. When a user makes a selection in one chart, the other related charts will update their data synchronously. The generated charts support multi-dimensional scaling, filtering, and data export operations, and all charts are bound to the execution logic of the generated natural language interpretation text.
8. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The professional natural language interpretation text generation process in step 4 includes: The calculated price comparison analysis results and the generated chart features are converted into semantic description vectors; We call upon a large language model that has been fine-tuned with a corpus of the steel industry, and obtain current market macro background data through a vector database. The market macro background data includes raw material cost fluctuations, downstream industry operating rates, and macro policy guidance. The large language model combines price comparison analysis results with macroeconomic background data to perform in-depth logical reasoning, generating a structured text report that includes core data conclusions, in-depth causal analysis, and future risk warnings. Structured text reports logically correspond to multi-dimensional comparison charts.
9. The method for autonomous querying and comparing prices of steel based on multi-source data of a large-model intelligent agent according to claim 1, characterized in that, The implementation process of multi-turn dialogue context maintenance in step 5 includes: Establish a dialogue context database based on a key-value pair structure, using the user's unique identifier as the index key, to store the intent representation vector, extracted entity set, generated query statement, and final analysis result summary for each round of dialogue; When a new round of input is received, the cosine similarity between the new input text and the historical context information is calculated. If the cosine similarity reaches the preset relevance threshold, it is determined to be an additional query. The intent completion algorithm logically merges historical entities with the dimensions of new input to construct a complete enhanced query intent. The agent executes an incremental query strategy for the enhanced query intent, calling relevant tools to perform data acquisition and calculation only for the changed dimensions, avoiding the repetition of completed calculation steps.
Citation Information
Patent Citations
Processing method and device for converting natural language into structured query language
CN114090624A
Construction method and device of multi-component data agent
CN119398092A
Retrieval enhancement generation method and system based on large language model
CN120045750A