An event-driven agricultural product market big model explainable attribution method and system
By using an event-driven agricultural product market model, and leveraging a pre-trained large language model and knowledge base for evidence binding and time decay, the problem of handling sudden events in existing technologies is solved, and the interpretability and accuracy of agricultural product price prediction are achieved.
Patent Information
- Application Number
- CN202611612981.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-19
- Publication Date
- 2026-11-24
AI Technical Summary
Existing agricultural product price forecasting schemes are unable to effectively handle unforeseen events and cannot accurately explain the impact of events on prices, leading to problems such as double counting, output without evidence, and mismatch of scope.
By establishing an event-driven large-scale model of agricultural product market trends, using a pre-trained large language model for event understanding and structured generation, and combining an agricultural product market knowledge base and structured output rules, evidence binding, range matching, and time decay are performed. Events and historical time series are dynamically integrated to form an interpretable attribution record.
It enables verifiable and interpretable price prediction for unstructured events, reduces duplicate events and unproven outputs, ensures the accuracy and traceability of prediction results, and reduces the risk of time failure and range mismatch.
Smart Images

Figure CN123159564A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural product market analysis technology, specifically an event-driven, large-scale agricultural product market model with an explainable attribution method and system. Background Technology
[0002] Agricultural product prices are simultaneously affected by production cycles, weather disasters, supply in production areas, inter-regional transportation, logistics, regulatory measures, import and export policies, public health, seasonal consumption, and market expectations. Transaction prices, transaction volumes, supply, demand, and inventory levels typically exist in structured time-series formats, while policy announcements, disaster warnings, traffic notices, production area surveys, and market news are usually scattered across different data sources in text format. These different data sources differ in product category names, market names, release times, event occurrence times, units of measurement, and price definitions, making it difficult for external events to be consistently incorporated into market forecasting.
[0003] Existing agricultural product price forecasting schemes typically build statistical or neural network models based on historical prices, transaction volumes, or production supply and demand indicators. While these schemes can learn from historical patterns, they often only passively learn about sudden weather events, temporary traffic controls, policy adjustments, or changes in consumer demand after these events have already been reflected in prices. Some schemes extract viewpoints from articles or use sentiment to correct trends, but textual viewpoints may lack original evidence, applicable product categories, and geographical boundaries. They may also mistakenly interpret the publication date as the event's occurrence date, leading to duplicate counting of the same event, the continued effectiveness of expired events, or the erroneous application of localized events to the national market.
[0004] Large-scale models possess the ability to understand events and generate structured data. However, if directly asked to predict price increases or decreases, the model output is difficult to reproduce, and it cannot prove whether a conclusion is supported by the original evidence. Furthermore, simply displaying attention weights does not explain how the prediction results would change after removing a particular event, making it difficult to form verifiable event-level attributions. Therefore, a technical solution is needed that can perform knowledge constraints, evidence binding, range matching, and time decay on unstructured events, dynamically integrate event representations with transaction timelines, and then verify the event contribution through counterfactual calculations. Summary of the Invention
[0005] The purpose of this invention is to provide an event-driven, large-scale model of agricultural product market trends with an explainable attribution method and system, effectively solving the problems mentioned in the background art.
[0006] This invention is implemented as follows: an event-driven large-scale model for agricultural product market trends with an explainable attribution method, comprising:
[0007] Establish a forecasting task that includes the target agricultural product, target market, forecast benchmark time point, and forecast window, and obtain the corresponding market time series and candidate event data;
[0008] The market data timeline is aligned by category, market, unit of measurement, price caliber, and time granularity, and the original text position is recorded for candidate event data.
[0009] Under the constraints of the agricultural product market knowledge base and structured output rules, the market data extraction model is used to extract market events that are bound to the original evidence from the candidate event data. Market events that pass the verification of evidence, scope and time are identified as valid market events, and market events that fail the verification are excluded from the prediction input.
[0010] The timeliness impact representation and event mask for determining valid market data events;
[0011] The effective time-series impact representation of the event mask is dynamically fused with the historical time series representation obtained from the market time series, and the price center value, lower quantile value and upper quantile value within the prediction window are output.
[0012] For each market event involved in the forecast, a control task is established that only masks that market event. The directional contribution is determined based on the difference in price center values before and after masking. An interpretable attribution record is formed by combining the original text location of the market event, the applicable category, the applicable region, and the effective time.
[0013] As a further aspect of the present invention: the market data includes transaction price, transaction volume, supply, demand, inventory, and logistics timeliness; The candidate event data includes information on meteorological disasters, production area supply, distribution and transportation, market supervision, import and export policies, public health, consumer demand, and seasonal activities;
[0014] Set missing status and abnormal status for missing time windows and abnormal data in market data time series respectively, and retain the original record identifier;
[0015] The original text location includes source identifier, file identifier, paragraph number, character start and end positions, and original text fingerprint, and the publication time and event occurrence time of the candidate event data are stored separately.
[0016] As a further aspect of the present invention: the market data extraction model is based on a pre-trained large language model with the ability to understand long texts and generate structured data. It utilizes agricultural product market data corpus and instruction sample sets labeled with event type, affected object, affected direction, affected intensity, credibility, occurrence time, duration, category range, geographical range and evidence location for domain adaptation. The domain adaptation employs instruction fine-tuning or low-rank parameter fine-tuning, or, while keeping the basic model parameters unchanged, configures enhanced search prompt templates, sample samples, and constrained decoding to enable the model to output market events according to defined fields, data types, value ranges, and mandatory requirements. The original evidence refers to the original records in the candidate event data or market data that can prove the validity of the corresponding market event.
[0017] As a further aspect of the present invention: the market event includes an event identifier, event type, affected object, affected direction, affected intensity, credibility, occurrence time, duration, spatial range, category range, evidence location information, and validity status;
[0018] The market data extraction model outputs market data events and performs checks on field completeness, evidence existence, consistency between conclusions and evidence, category range, geographical range, time validity, and repeatability. Market data events that pass the checks are determined to be valid market data events, while those that fail the checks on evidence existence, consistency between conclusions and evidence, or scope of application are marked as pending verification and are not included in market data prediction.
[0019] For market events from different sources but pointing to the same fact, they are merged based on the source identifier, release time, original text fingerprint, and event fingerprint, while retaining the evidence location information of each source; when different sources record inconsistent events in terms of occurrence status, direction of impact, or duration, the corresponding market events are marked as conflicting and sent to the review terminal; before the review is completed, market events in conflicting states will not participate in market prediction.
[0020] As a further aspect of the present invention: forming the time-related impact representation includes:
[0021] Read the version of the agricultural product market knowledge base associated with the prediction task. Time decay parameter of the event type to which the market event belongs and the validity period;
[0022] Based on the prediction baseline time point The timing of this market event The time difference between them is used as a time interval. and will , and Converted to the same unit of time, where, Later Market events are not included in current predictions;
[0023] Will affect the direction Intensity of influence and credibility The product of these factors is determined as the magnitude of the event's effect. It was determined as the time decay coefficient, and according to... Get the first The timeliness impact vector of a market event at the prediction benchmark time point ,in This is the event vector for the market event;
[0024] when When the value is zero, the magnitude of the event remains unchanged during the effective period. When it is greater than zero, the time decay coefficient increases with... It increases while monotonically decreasing, and The larger the value, the faster the decay rate; recalculation is performed each time the baseline prediction time changes. and ;
[0025] The system determines whether the applicable product category of the market event includes the target agricultural product or has a product category hierarchy relationship with the target agricultural product as defined by the knowledge base; whether the spatial scope of the market event includes the target market or has a circulation relationship with the target market as defined by the knowledge base; and whether the validity period of the market event overlaps with the forecast window. Only when all three of the above determinations are true and the market event is in a valid state, the corresponding event mask is set to valid. If any determination is false, or if the market event is in an expired, pending verification, or conflict state, the corresponding event mask is set to invalid.
[0026] As a further aspect of the present invention: the historical time series representation is obtained by numerical standardization, time sequence encoding and time series feature extraction of price, transaction volume, supply, demand, inventory, logistics timeliness, missing status and abnormal status within a continuous time window;
[0027] For the prediction reference time point Represented by historical time sequence After querying the mapping matrix Mapping to obtain the query vector The first valid event mask A time-dependent impact vector Key mapping matrix Mapping yields the key vector and according to and The scaling dot product is used to calculate the matching score; exponential normalization is performed on the matching scores within the current set of valid market events to obtain the matching weight of each market event. This ensures that all matching weights are non-negative and their sum is 1; and that each time-effect vector... via event mapping matrix Transform to the same fusion dimension as the historical time series representation, and according to the corresponding matching weights. Weighted summation yields the aggregated event representation; historical time sequence representation is then used. Through time-series mapping matrix The transformation yields a historical mapping representation, which is then combined with the aggregated event representation and the fused bias vector. Element-wise addition, followed by a non-linear activation function. Get integrated market data , where the nonlinear activation function The query mapping matrix is one of the hyperbolic tangent function, the corrected linear unit function, or the Gaussian error linear unit function; Key mapping matrix Event Mapping Matrix Time-series mapping matrix and fusion bias vector Determined during the model training phase, it remains unchanged during the prediction process of the same model version; when there are no valid market events, the aggregated event representation is set to a zero vector, and the fused market representation is calculated only based on the historical mapping representation and the fusion bias vector, and the state of no external valid events is recorded.
[0028] As a further aspect of the present invention: when establishing the control task, the market time sequence, other market events except for the blocked market events, model parameters, prediction benchmark time point, and prediction window are kept unchanged, and only the timeliness impact representation corresponding to the blocked market events is set to zero; the difference between the price center value of the prediction task with unblocked market events and the control task represents the direction of the market event's influence on the price center value, and the difference is normalized by the sum of the absolute values of the differences corresponding to each market event; when the change in the prediction interval width after blocking market events exceeds a set threshold, an uncertainty impact marker is written in the explainable attribution record.
[0029] As a further aspect of the present invention, it also includes:
[0030] Generate forecast result review records that include product, base date, forecast date, current price, model predicted price, published price, review status, and review method; query forecast tasks by product, base date, review status, and review method; and receive single or batch approval, rejection, and price correction instructions during manual review.
[0031] During automatic review, the automatic review configuration version that is in effect on the prediction task baseline date is read. The automatic review configuration includes at least the automatic review master switch, applicable scope type, applicable scope identifier, historical accuracy statistics period, prediction period, accuracy judgment error tolerance, minimum number of valid samples, accuracy threshold, effective time and expiration time. The configuration uniquely corresponding to the prediction task is determined according to the priority order of specified SKU, specified category, and all products. Among them, the priority of the specified SKU configuration is higher than that of the specified category configuration, and the priority of the specified category configuration is higher than that of all product configuration.
[0032] Within the historical accuracy statistical period, completed tasks with the same applicable scope, prediction period, model version, and price caliber as the prediction task, and which simultaneously have both model-predicted prices and actual prices, are selected as valid samples. Valid samples whose relative error between model-predicted prices and actual prices is no greater than the error tolerance are recorded as accurate samples. The historical accuracy is obtained by dividing the number of accurate samples by the total number of valid samples.
[0033] The model-predicted price will be written into the published price and the review method will be marked as automatic review only when the automatic review switch is turned on, the total number of valid samples is not less than the minimum number of valid samples, the model version and price data are complete and the historical accuracy is not lower than the accuracy threshold. Otherwise, the review will be transferred to manual review.
[0034] After obtaining the actual price corresponding to the forecast date, the accuracy is summarized according to category, SKU, forecast period and model version, and a trend comparison and accuracy details between the current model version and the comparison model version are generated. The review configuration, market event status or model parameters are updated according to the forecast results review, manual review and accuracy analysis results, and the previous version is retained.
[0035] As a further aspect of the present invention: the input of the market data extraction model is constructed according to a preset template, the template including extraction task instructions, knowledge entries retrieved from the market data knowledge base, text fragments of candidate event data and their evidence location information, and structured output rules specifying output fields, data types, value ranges and mandatory requirements; the market data extraction model outputs market events using a constrained decoding method, and records the pre-trained large language model identifier, domain adaptation method, model version, prompt template version and inference parameters; The agricultural product market knowledge base is generated by a knowledge base building program, which executes the following:
[0036] Collect agricultural product category and market coding documents, category-level data, market supply and circulation data, early warning and policy documents, supply, inventory and circulation statistics, and time-stamped historical market data. Add source identifiers, collection times, business times, document versions, and original text fingerprints to each source of data. Map category names, market names, administrative divisions, event terms, units of measurement, and time formats from different sources to a unified field pattern to form category entities, market entities, event type entities, evidence entities, and market time window entities. Generate category inclusion relationships based on coding levels, market circulation relationships based on supply locations, transportation routes, and market coverage areas, and evidence associations between event type entities and evidence entities based on original text locations and original text fingerprints. Store these entities and relationships as data records that can be queried by a processor. Select event-market sample pairs with consistent category, market, price caliber, and time granularity from historical data. Determine candidate impact directions based on the direction of change between the baseline market price before the event and the continuous market price after the event, and determine candidate impacts based on the ratio range of the absolute value of price change relative to the baseline market price. The strength is determined by the time it takes for the change amplitude to fall back to a preset impact threshold, which determines the candidate validity period. Candidate time decay parameters are fitted based on the change amplitude at consecutive time points. The candidate parameters, along with corresponding sample identifiers, sample size, price range, fitting error, and original evidence, are submitted for review. Once approved, they are written into machine-executable knowledge entries. Each machine-executable knowledge entry includes at least an entry identifier, trigger condition field, event type, applicable category identifier set, applicable market identifier set, evidence requirements, impact direction candidate value, impact strength value range, validity period, time decay parameter value range, source record, review record, effective period, and version number. A combined index is established for category identifiers, market identifiers, event types, and effective periods, and a semantic retrieval index is established for the evidence text. During retrieval, machine-executable knowledge entries are first filtered based on the target category, target market, prediction window, and effective period, and then sorted based on the semantic matching degree between candidate event data and evidence text. Based on the review results or newly added historical samples, parameter calculation and review are re-executed. Once approved, a new version is generated, while the original version and its associated historical prediction tasks are retained. The original text evidence refers to the original record itself that can prove the validity of the corresponding market event: for text data, it is a text fragment determined by the source identifier, file identifier, paragraph number, character start and end positions, and original text fingerprint; for structured market records, it is the original record identifier and its specific field names and field values; the evidence location information is the traceable location information pointing to the above-mentioned original record; the direction of influence, intensity of influence, and scope of application of the market event do not exceed the scope of the facts recorded in its original text evidence, and model outputs that do not have traceable original records are not considered valid market events for market prediction.
[0037] The present invention also provides an event-driven, large-scale, explainable attribution system for agricultural product market data, including a data interface, one or more processors, a memory, and a verification terminal; The data interface is used to receive market data, candidate event information, actual prices, and audit configurations. The memory is used to store agricultural product market knowledge base, structured output rules, market events, model parameters, prediction results, published prices, review records, accuracy records, and version audit records; The one or more processors are used to execute program instructions stored in the memory to implement functional modules associated in the following order:
[0038] The forecasting task management module is used to create forecasting tasks and display task status, target agricultural products, target markets, forecasting window, and task version. The market event management module is used to generate, verify, merge, and query market events associated with prediction tasks; The explainable attribution module is used to generate the directional contribution of market events and their correlation with original evidence; The review and processing module is used to send market events, forecast results, attribution records and conflict information to the review terminal, and to receive the adoption, correction or rejection results; The prediction result review module is used to save the current price, the model predicted price, and the published price, perform manual or automatic review, and generate a status of pending review, approved, rejected, or published. The automatic audit configuration module is used to save the automatic audit master switch, historical accuracy statistics period, accuracy threshold, and applicable scope for all products, specified categories, or specified SKUs; The accuracy analysis module is used to calculate accuracy by time range, category, SKU, prediction period and model version, and generate model version trend comparison and detailed records;
[0039] One or more processors are also used to generate new versions of audit configurations, market event statuses, or model parameters based on audit, review, and accuracy analysis results, and save the previous version.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention enables unstructured events to enter the prediction chain in a form with defined fields and verifiable original text through evidence binding, knowledge constraints, and scope matching. Candidate event data is processed by the market data extraction model to form market events with defined fields. Each event retains its original text location, occurrence time, category range, geographical range, and validity status. Events lacking evidence, with mismatched scope, or that have expired are not included in the prediction, thereby reducing the impact of duplicate events, time-series misalignments, and expanded applicability, and mitigating the risks of no-evidence output, scope mismatch, time expiration, and duplicate inclusion.
[0041] 2. This invention utilizes event timeliness impact vectors and event masks to dynamically incorporate effective events into prediction based on time decay and applicable scope. The impact of market events is simultaneously controlled by influence direction, intensity, credibility, time decay, and applicable scope, and the fusion weight is determined based on the current historical market conditions. Events automatically exit the current task after they become invalid, thus preserving the continuous change characteristics of historical market conditions while allowing external events that have not yet been fully reflected in transaction prices to be included in the prediction.
[0042] 3. This invention, through dynamic fusion of events and historical time series and interval prediction, preserves the continuous change characteristics of historical market conditions while allowing external events that are not yet fully reflected in transaction prices to be included in the prediction. Uncertainty is expressed using a price center value and upper and lower quantile values. The prediction model outputs a price center value and upper and lower quantile values, representing uncertainty in interval form, and does not present the interval results as a definite transaction price.
[0043] 4. This invention forms a repeatable and verifiable directional contribution of events and an interpretable attribution chain by calculating counterfactual results through the item-by-item masking of events. By keeping other inputs and model parameters constant and masking market events item by item, repeatable directional contributions of events can be obtained; the interrelationships between market data, event evidence, prediction results, and model versions facilitate the review of prediction basis and the reproduction of historical tasks.
[0044] 5. This invention achieves auditable, publishable, and traceable forecast results through a verification terminal, forecast result review, automatic review configuration, and accuracy analysis, while retaining previous versions. The verification terminal can display market events, original evidence, applicable categories, geographical scope, timeliness impact, price center value, forecast interval, and directional contribution; the forecast result review record saves the current price, model-predicted price, published price, review status, and review method; the automatic review configuration determines whether to enable automatic review based on the historical accuracy statistical period, accuracy threshold, and applicable scope; the accuracy analysis forms a trend comparison and category or SKU details according to the forecast period and model version. Each adjustment generates a new version without overwriting the original version, and historical forecasts are recalculated based on the saved market data, market events, knowledge base, structured output rules, automatic review configuration, and model version at that time. Attached Figure Description
[0045] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the overall process of the method of the present invention. Figure 2 A schematic diagram illustrating the governance of market time-series data and candidate event data, as well as evidence indexing; Figure 3 Flowchart for extracting market events based on evidence bound by knowledge constraints; Figure 4 This is a diagram illustrating the quantification and range matching of event timeliness. Figure 5 A structure diagram for dynamic fusion of events and historical time series and interval prediction; Figure 6 A flowchart for generating attribution chains for counterfactual events. Detailed Implementation
[0047] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0048] The present invention will be further explained below with reference to specific embodiments.
[0049] Please see Figures 1-6 The present invention provides an event-driven, large-scale, explainable attribution method for agricultural product market trends, comprising the following steps: Step S101: Prediction Task Establishment and Task Overview
[0050] For each market analysis task, a unique forecast task identifier is established, and the target agricultural product, target market, forecast baseline time, data time granularity, forecast window, task creation time, task status, and task version are recorded. The target agricultural product is determined by category, variety, grade, and place of origin code, while the target market is determined by market code and administrative division code. The forecast task overview displays the task status according to the task creation time or forecast baseline time, and associates it with the number of market events, forecast result status, review status, and approval status.
[0051] The data interface reads the transaction price, transaction volume, supply, demand, inventory, and logistics timeliness corresponding to the forecast task, and retains the data source, collection time, business time, and original record identifier. Simultaneously, it obtains data related to meteorological disasters, production area supply, distribution and transportation, market supervision, import and export policies, public health, consumer demand, and seasonal activities related to the target agricultural product, recording the source, release time, and original document identifier for each.
[0052] Step S102: Data Governance, Time Alignment, and Evidence Indexing
[0053] Category names and market aliases from different data sources are mapped to unified category codes and market codes, respectively. Price and weight data are converted to the currency and unit of measurement set in the task. Wholesale price, origin price, retail price, highest price, lowest price, arithmetic average price, and volume-weighted price are stored according to their respective price types; when there is no clear conversion basis, one price caliber is not used to replace another. Market data records are summarized according to the time granularity set in the task, a missing status is set for missing time windows, and an abnormal status is set for records that exceed business boundaries or deviate significantly from the distribution of adjacent time windows, while retaining the original values.
[0054] For announcements, warnings, and other text documents, the title, body, issuing entity, release date, event occurrence date, region name, and category name are analyzed. Each text segment records the source identifier, file identifier, paragraph number, character start and end positions, and original text fingerprint. The release date and event occurrence date are saved separately; if the event occurrence date cannot be determined from the original text, it is marked as pending verification and is not replaced by the release date.
[0055] Step S103: Market Event Generation and Verification
[0056] The agricultural product market knowledge base used in this step is not a simple compilation of existing industry rules, nor is it generated temporarily by the model during the reasoning process. Instead, it is a machine-queryable dataset formed by the knowledge base construction program after performing data collection, standardization, entity association, historical sample calculation, parameter fitting, approval and entry into the database, and version indexing on multi-source data. Public specifications, early warning documents, policy documents, and industry statistics are only used as raw inputs to the knowledge base construction program; the data used for market event extraction and prediction are machine-executable knowledge entries that have undergone unified data model conversion, association with original evidence and historical samples, and have been approved.
[0057] The knowledge base construction process operates according to the following procedure:
[0058] Source registration and data standardization. Collect category and market coding documents, category-level data, market supply and distribution data, early warning and policy documents, supply, inventory and distribution statistics, and time-stamped historical market data; assign source identifiers, collection times, business times, file versions, access permission status, and original fingerprints to each input record; convert category names, market names, administrative divisions, event terms, units of measurement, and time formats to a unified field pattern; records that cannot be mapped are placed in a processing queue instead of being directly written to the knowledge base.
[0059] Entity and Relationship Generation. Based on a unified field schema, category entities, market entities, event type entities, evidence entities, and market time window entities are generated. Category inclusion relationships are generated based on the parent-child paths of category codes; market circulation relationships are generated based on supply location, transportation route, and market coverage area; and evidence associations between event type entities and evidence entities are generated based on source identifiers, document identifiers, paragraph numbers, character positions, and original text fingerprints. Each entity and relationship retains its source record and version, enabling the processor to trace back to the original input from knowledge entries.
[0060] Historical event-market data sample construction. From completed and data-complete historical tasks, select event records and market time windows with consistent categories, markets, price calibers, and time granularities. Align the two with the event occurrence time to form a baseline time window before the event and a continuous observation time window after the event. Exclude event records with conflicting price calibers, unclear event times, missing market data exceeding the threshold, or multiple indistinguishable event records within the same observation window, and save the sample selection criteria and exclusion reasons.
[0061] Candidate parameter calculation. Comparing market changes within the baseline time window and the continuous observation time window: candidate influence directions are generated based on the direction of change; candidate influence strengths are generated based on the ratio range of the absolute value of price changes relative to the baseline market; candidate validity periods are generated based on the time it takes for the change magnitude to fall back to a preset influence threshold; and candidate time decay parameters are fitted using the change magnitudes at consecutive time points. Each candidate parameter is bound to a sample identifier, sample size, price caliber, time granularity, fitting error, and original text evidence; parameters are not directly determined by conclusions from a single text.
[0062] Approval and itemized storage. Candidate parameters and evidence are associated and submitted for approval; upon approval, machine-executable knowledge entries are generated. Each entry includes at least an entry identifier, trigger condition field, event type, set of applicable category identifiers, set of applicable market identifiers, evidence requirements, candidate values for influence direction, range of influence intensity values, validity period, range of time decay parameters, source record, approval record, effective period, and version number. Candidate parameters that fail approval are only retained as construction records and are not provided to the market data extraction model.
[0063] Indexing, retrieval, and version updates. A combined index is built for category identifiers, market identifiers, event types, and effective periods; a semantic retrieval index is built for evidence text. When executing a prediction task, entries are first filtered by target category, target market, prediction window, and effective period. Then, they are sorted according to the semantic matching degree between candidate event data and evidence text. The sorted entries, along with the source records, are provided to the market data extraction model. After step S108 generates a confirmed review result or adds new historical samples, the sample pair construction, candidate parameter calculation, and approval are re-executed. When the approval is passed, a new version is generated, without overwriting the original entries. Completed historical predictions continue to be associated with the knowledge base version used during their execution.
[0064] The pre-trained large language model used in this step can be a publicly available or self-pre-trained basic model with the ability to understand long texts and generate structured data. This invention does not limit its specific network structure. The basic model only serves as a carrier of text understanding and structured generation capabilities. It does not directly judge price rises or falls, nor does it directly output predicted prices. Instead, it is adapted to the following agricultural product market data domain to form a dedicated market data extraction model: the domain corpus consists of weather warnings, production area supply reports, traffic control notices, regulatory and import / export policy announcements, consumption and seasonal data, and historical market data. Market analysts annotate the corpus with event types, affected objects, direction of influence, influence intensity and credibility values, occurrence time, duration, category and geographical scope, and evidence location to form an instruction sample set. The sample input is "task instruction + knowledge item + candidate data text fragments", and the output is a list of market events that conforms to the structured output pattern. The basic model can be fine-tuned via commands or low-rank parameters to obtain a market data extraction model. Alternatively, it can be adapted to interface call scenarios by using only enhanced prompt templates, a few examples, and constrained decoding while keeping the parameters unchanged. Both output modes are identical, and subsequent verification and prediction processes are consistent. The model input is constructed according to a preset template, including extraction task commands, retrieved knowledge entries, candidate data text fragments and their evidence location information, as well as a structured output mode specifying fields, data types, value ranges, and mandatory requirements. Constrained decoding is used during inference to ensure that the output can only fall within the aforementioned fields and value ranges. The basic model identifier, adaptation method, model version, prompt template version, and inference parameters are all recorded in the version record. A new version is generated when the event classification system or judgment rules are adjusted, without overwriting the original version.
[0065] The candidate market events output by the model include event identifier, event type, affected objects, direction of influence, intensity of influence, credibility, occurrence time, duration, spatial range, category range, evidence location information, and validity status. These are not directly used for prediction but are instead sequentially checked for field completeness, evidence existence, consistency between conclusion and evidence, category range, geographical range, time validity, and repeatability. Here, original text evidence refers to the original record itself that can prove the event's validity, not a paraphrase or summary by the model: announcements, warnings, notices, or statistical data constitute a segment of the original text, identified by source identifier, document identifier, paragraph number, character start and end positions, and original text fingerprint; structured market records are identified by specific record identifiers and their field names and values. Evidence location information points to the aforementioned records, allowing reviewers to trace back to the original text or record from the event. The direction, intensity, and scope of the event's influence must not exceed the range that the evidence can prove; outputs without traceable records are not considered valid events. Events that pass verification will proceed to subsequent calculations. Events with insufficient evidence or whose scope of application cannot be confirmed will be marked as pending verification. Events that have exceeded their validity period will be marked as expired. Multiple sources of records for the same fact will be merged according to the event fingerprint and the original text fingerprint, and the position of each piece of evidence will be retained. When there are contradictions between sources, a conflict state will be set and the case will be submitted for review.
[0066] Step S104: Event timeliness quantification and scope matching
[0067] Before using the formula, define: For the first The timeliness impact vector of an event; To influence the direction, the value can be negative one, zero, or positive one; To influence the intensity, the value range is from zero to one; For reliability, the value range is from zero to one; This is the non-negative decay parameter corresponding to the event type; The non-negative time interval from the time the event occurred to the prediction baseline time; The event vector is formed by event type, affected objects, spatial scope, category scope, and evidence text encoding; exp is an exponential function. The event timeliness impact vector is calculated according to the event timeliness impact vector formula:
[0068] The specific decay process is as follows: First, the time decay parameters corresponding to the event type are read from the knowledge base version associated with the current prediction task. And the effective period, and the time when the event occurred. Prediction reference time point And the attenuation parameters are standardized to the same time unit; then the calculation is performed. If an event occurs later than the prediction baseline time, the event must not be included in the current task; if the event has already occurred and the validity period has not expired, it should be included in the current task. As the magnitude of the effect of an event without time adjustment, As a time decay coefficient, the two are then combined with the event vector. Multiply to get .when When, the event does not decay over time during its validity period; when At that time, for each unit increase in time interval, the attenuation coefficient decreases according to the same exponential law, and The larger the value, the faster the decay rate. When the prediction baseline changes, the system recalculates the time interval, time decay coefficient, and time effect vector, and does not use the calculation results from the previous prediction task.
[0069] For ongoing policies, traffic controls, or other events with clearly defined start and end times, the event occurrence time is taken as the start time of its effectiveness, and the calculation is performed as described above within the validity period; if the prediction baseline time exceeds the end time, the event is marked as expired. For one-off events, the event occurrence time is taken as the actual occurrence time recorded in the original evidence, and the end time is determined according to the validity period of that event type in the knowledge base; events whose occurrence time cannot be determined from the original text are marked as pending verification, and the publication time is not used as a substitute.
[0070] The event mask is determined by four criteria: category matching, market matching, time matching, and event status. Category matching determines whether the applicable category of the event directly includes the target agricultural product, or whether the two satisfy the superior and subordinate category relationship specified in the knowledge base. Market matching determines whether the event's spatial scope directly includes the target market, or whether the target market is associated with the event's affected area through supply, transportation, or distribution relationships in the knowledge base. Time matching determines whether the event's effective period overlaps with the prediction window. Event status determines whether the event is in a valid state. When all four criteria are true, the event mask is set to valid; if any criterion is false, or if the event is in an expired, pending verification, or conflict state, the event mask is set to invalid.
[0071] Step S105: Dynamic fusion of events and historical timelines
[0072] The system constructs temporal features according to continuous time windows, and a historical time series representation is generated by a time series encoder. Before using the formula, further definitions are provided: For the prediction baseline time point The integrated market data is displayed; Represented as a historical timeline; This is the time-series mapping matrix; This is the event mapping matrix; For the fusion bias vector; It is a non-linear activation function; The set of events that pass the range and validity period verification at the prediction baseline time point; For the first Normalized matching weights of events relative to their historical time-series representations ; The query vector is generated from the historical time series representation; For the first The key vector generated by the time-sensitive impact vector; Let be the dimension of the key vector. The fused market data representation is calculated according to the event-time series fused representation formula: ; The nonlinear fusion is performed in the following order: First, based on historical time series representation... After querying the mapping matrix Get the query vector The timeliness impact vector of each valid market event Key mapping matrix Obtain the key vector Secondly, calculation With each The dot product, divided by the square root of the dimension of the key vector. The scaled match score is obtained, and then exponential normalization is performed on all scaled match scores within the current valid event set to make each match weight... All values are between 0 and 1 and the total weight is 1; next, each via event mapping matrix Mapped to a preset fusion dimension, and according to the corresponding Weighted summation yields the aggregated event representation; subsequently, Through time-series mapping matrix Mapping to the same fusion dimension, the historical mapping representation, the aggregated event representation, and the fusion bias vector are combined. Element-wise addition is performed; finally, a non-linear activation function is applied to the sum. The integrated market data indicates The nonlinear activation function can be a hyperbolic tangent function, a modified linear unit function, or a Gaussian error linear unit function; the specific type is saved as part of the model configuration.
[0073] The aforementioned mapping matrix and fusion bias vector are jointly determined during model training using the interval prediction loss function and are saved with each model version; they remain unchanged when performing prediction tasks and event-by-event masking control tasks using the same model version. Therefore, the same market event can acquire different matching weights under different historical time series states, but there will be no additional differences between the baseline task and the control task due to changes in the fusion parameters. When there are no valid market events in the current task, the aggregated event representation is set to a zero vector, and the data is processed according to... The calculation is based solely on the fused market data representation, and the prediction records indicate that there are no valid external events.
[0074] Step S106: Price Range Prediction
[0075] The system integrates market data with the input range prediction model and outputs the price center value, lower quantile value, and upper quantile value for each time point in the target prediction window. The lower and upper quantile levels are determined by the training configuration and must satisfy the condition that the lower quantile level is less than the upper quantile level. During the training phase, training, validation, and test sets are used, partitioned chronologically. Data after the prediction baseline time point is prohibited from being written into the input features. The system saves the target category, target market, prediction baseline time point, prediction window, market data version, valid event set, model version, and output range. The range result is used to express model uncertainty and is not presented as a determined transaction price.
[0076] Step S107: Generation of Counterfactual Event Attribution Chain
[0077] Before using the formula, define: For the first The directional contribution of each event; This is the price center value that includes all valid events; To only block the first The price center value when the event occurs while keeping the other inputs and model parameters constant; To prevent positive numbers with a denominator of zero; This is an index of valid events. The directional contribution is calculated according to the event directional contribution formula: ; when A positive value indicates that, under the current model and input conditions, the event shifts the price center value upwards relative to when the event was masked; a negative value indicates a downward shift. Its absolute value represents the relative proportion among all valid counterfactual differences. This contribution is a model-level counterfactual attribution and does not replace statistical causal identification conclusions. The system connects the contribution with event evidence, applicable category, geographical scope, effective time, predicted changes, actual results, and version information to generate a traceable attribution chain.
[0078] Step S108: Verify the terminal, review the prediction results, and analyze the accuracy.
[0079] (1) Review Terminal. After the interpretable attribution record is generated, the review terminal displays the market event, original evidence, applicable category, geographical scope, time-sensitive impact, price center value, forecast range, and directional contribution according to the forecast task identifier. Reviewers can adopt, modify, or reject market events or attribution results. When modifying, the content before modification, the content after modification, the reason for review, the operator, and the operation time are recorded; rejected market events will no longer participate in subsequent forecasts but will be retained in the historical tasks.
[0080] (2) Forecast Result Review. Forecast result review records are jointly identified by product, base date, forecast date, and task version, and save the current price on the base date, the predicted price given by the model, the approved release price, review status, and review method. Reviewers can query pending records by product, base date, review status, and review method, view task details, and then execute approval, rejection, or release price correction. They can also perform batch approval or batch rejection on multiple records under the same review conditions. When approval is granted, the confirmed price is written to the release price, and the task status is updated to "released." When rejection is granted, no release price is generated, but the rejection reason is retained. The review method is recorded as either manual review or automatic review.
[0081] (3) Automatic Review Configuration. Each automatic review configuration is uniquely identified by its configuration identifier and configuration version, and saves the automatic review master switch, applicable scope type, applicable scope identifier, historical accuracy statistics period, prediction period, accuracy judgment error tolerance, minimum number of valid samples, accuracy threshold, effective time, and expiration time. The applicable scope type includes all products, specified categories, and specified SKUs; the applicable scope identifier records the category code when specifying categories, the SKU code when specifying SKUs, and the global identifier when specifying all products. When the same prediction task matches multiple configurations at the same time, the system selects the unique effective configuration in the order of "specified SKU takes precedence over specified category, specified category takes precedence over all products"; when there are multiple versions of the same applicable scope, the configuration with the latest version number that falls within the effective period of the prediction task benchmark date is selected.
[0082] The historical accuracy statistical period is determined by the start and end dates or the number of days to look back. Within this statistical period, the system selects completed forecasting tasks that simultaneously meet the following conditions as valid samples: consistent with the applicable scope of the task to be reviewed; consistent forecasting period; consistent model version; consistent price caliber; and both the model-predicted price and the actual price on the forecast date are not empty. For the nth valid sample, the relative error is obtained by dividing the absolute value of the difference between the model-predicted price and the actual price by the actual price; if the relative error is not greater than the error tolerance, the sample is recorded as an accurate sample. The historical accuracy rate equals the number of accurate samples divided by the total number of valid samples, multiplied by 100%. Records with an actual price of zero or abnormal data status are not included in the valid samples, and the reason for exclusion is recorded.
[0083] The system sequentially checks whether the automatic review switch is on, whether the total number of valid samples has reached the minimum number of valid samples, whether the model version and price data are complete, and whether the historical accuracy rate has reached the accuracy threshold. If all the above conditions are met, the model's predicted price is copied to the published price, and the configuration version used, the number of valid samples, the historical accuracy rate, and the review time are recorded. The review method is marked as automatic review. If any condition is not met, the published price is not written, the task is transferred to manual review, and the corresponding reason is recorded. When the configuration is modified, a new version is generated without overwriting the original version. Tasks that have already completed the review continue to be associated with the actual configuration version used during the review.
[0084] (4) Accuracy Analysis and Version Update. After obtaining the actual price corresponding to the forecast date, determine the accuracy of individual forecasts according to the preset error tolerance, and calculate the accuracy for forecast periods of 𝑇+1, 𝑇+7, or other forecast periods. The accuracy analysis page filters data by time range, category, model version, and comparison model version, displays the global accuracy, automatic review threshold, and automatic review status, and compares the accuracy trend of the current model version with that of the comparison model version in the form of a time series. The category or SKU details record includes at least the accuracy of each forecast period, whether the threshold has been reached, and the automatic review status; when recalculating, use the current filtering conditions and the specified data version to generate new statistical results, and retain the original statistical version; when exporting, generate an analysis record containing statistical scope, model version, and detailed data.
[0085] Confirmed audit results, actual prices, and review results can be used to adjust event classification rules, event validity periods, time decay parameters, fusion parameters, or interval prediction models. Each adjustment generates a new version and does not overwrite the original version; historical predictions are recalculated based on the saved market data, market events, knowledge base, structured output rules, automatic audit configuration, and model version at the time. Accuracy thresholds and statistical periods are configurable parameters and are not limited to the example values displayed in the implementation interface.
[0086] This invention provides an event-driven, large-scale, explainable attribution system for agricultural product market trends, which executes the method described above. The system includes a data interface, one or more processors, a memory, and a verification terminal.
[0087] The data interface is used to receive market data, candidate event information, actual prices, and audit configurations.
[0088] The memory is used to store agricultural product market knowledge base, structured output rules, market events, model parameters, prediction results, published prices, review records, accuracy records, and version audit records;
[0089] The one or more processors are used to execute program instructions stored in the memory to implement functional modules associated in the following order:
[0090] The forecasting task management module is used to create forecasting tasks and display task status, target agricultural products, target markets, forecasting window, and task version. The market event management module is used to generate, verify, merge, and query market events associated with prediction tasks; The explainable attribution module is used to generate the directional contribution of market events and their correlation with original evidence; The review and processing module is used to send market events, forecast results, attribution records and conflict information to the review terminal, and to receive the adoption, correction or rejection results; The prediction result review module is used to save the current price, the model predicted price, and the published price, perform manual or automatic review, and generate a status of pending review, approved, rejected, or published. The automatic audit configuration module is used to save the automatic audit master switch, historical accuracy statistics period, accuracy threshold, and applicable scope for all products, specified categories, or specified SKUs; The accuracy analysis module is used to calculate accuracy by time range, category, SKU, prediction period and model version, and generate model version trend comparison and detailed records;
[0091] One or more processors are also used to generate new versions of audit configurations, market event statuses, or model parameters based on audit, review, and accuracy analysis results, and save the previous version.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An event-driven, large-scale model for agricultural product market trends with an explainable attribution method, characterized in that, include: Establish a forecasting task that includes the target agricultural product, target market, forecast benchmark time point, and forecast window, and obtain the corresponding market time series and candidate event data; The market data timeline is aligned by category, market, unit of measurement, price caliber, and time granularity, and the original text position is recorded for candidate event data. Under the constraints of the agricultural product market knowledge base and structured output rules, the market data extraction model is used to extract market events that are bound to the original evidence from the candidate event data. Market events that pass the verification of evidence, scope and time are identified as valid market events, and market events that fail the verification are excluded from the prediction input. The timeliness impact representation and event mask for determining valid market data events; The effective time-series impact representation of the event mask is dynamically fused with the historical time series representation obtained from the market time series, and the price center value, lower quantile value and upper quantile value within the prediction window are output. For each market event involved in the forecast, a control task is established that only masks that market event. The directional contribution is determined based on the difference in price center values before and after masking. An interpretable attribution record is formed by combining the original text location of the market event, the applicable category, the applicable region, and the effective time.
2. The method according to claim 1, characterized in that, The market data includes transaction price, transaction volume, supply, demand, inventory, and logistics timeliness. The candidate event data includes information on meteorological disasters, production area supply, distribution and transportation, market supervision, import and export policies, public health, consumer demand, and seasonal activities; Set missing status and abnormal status for missing time windows and abnormal data in market data time series respectively, and retain the original record identifier; The original text location includes source identifier, file identifier, paragraph number, character start and end positions, and original text fingerprint, and the publication time and event occurrence time of the candidate event data are stored separately.
3. The method according to claim 1, characterized in that, The market data extraction model is based on a pre-trained large language model with long text understanding and structured generation capabilities. It utilizes agricultural product market data corpus and instruction sample sets labeled with event type, affected object, direction of influence, intensity of influence, credibility, occurrence time, duration, category range, geographical range and evidence location for domain adaptation. The domain adaptation employs instruction fine-tuning or low-rank parameter fine-tuning, or, while keeping the basic model parameters unchanged, configures enhanced search prompt templates, sample samples, and constrained decoding to enable the model to output market events according to defined fields, data types, value ranges, and mandatory requirements. The original evidence refers to the original records in the candidate event data or market data that can prove the validity of the corresponding market event.
4. The method according to claim 1, characterized in that, The market data events include event identifier, event type, affected objects, direction of influence, intensity of influence, credibility, occurrence time, duration, spatial range, category range, evidence location information, and validity status; The market data extraction model outputs market data events and performs checks on field completeness, evidence existence, consistency between conclusions and evidence, category range, geographical range, time validity, and repeatability. Market events that pass verification are determined to be valid market events. Market events that fail verification of the existence of evidence, consistency between conclusions and evidence, or scope of application are marked as pending verification and are not included in market prediction. For market data events from different sources but pointing to the same fact, they are merged based on the source identifier, release time, original text fingerprint, and event fingerprint, while retaining the evidence location information of each source; when different sources record inconsistent events in terms of occurrence status, direction of impact, or duration, the corresponding market data events are marked as conflicting and sent to the verification terminal. Before the review is completed, market events that are in conflict will not be included in market prediction.
5. The method according to claim 1, characterized in that, Forming the aforementioned timeliness impact representation includes: Read the version of the agricultural product market knowledge base associated with the prediction task. Time decay parameter of the event type to which the market event belongs and the validity period; Based on the prediction baseline time point The timing of this market event The time difference between them is used as a time interval. and will , and Converted to the same unit of time, where, Later Market events are not included in current predictions; Will affect the direction Intensity of influence and credibility The product of these factors is determined as the magnitude of the event's effect. It was determined as the time decay coefficient, and according to... Get the first The timeliness impact vector of a market event at the prediction benchmark time point ,in This is the event vector for the market event; when When the value is zero, the magnitude of the event remains unchanged during the effective period. When it is greater than zero, the time decay coefficient increases with... It increases while monotonically decreasing, and The larger the value, the faster the decay rate; recalculation is performed each time the baseline prediction time changes. and ; The system determines whether the applicable product category of the market event includes the target agricultural product or has a product category hierarchy relationship with the target agricultural product as defined by the knowledge base; whether the spatial scope of the market event includes the target market or has a circulation relationship with the target market as defined by the knowledge base; and whether the validity period of the market event overlaps with the forecast window. Only when all three of the above determinations are true and the market event is in a valid state, the corresponding event mask is set to valid. If any determination is false, or if the market event is in an expired, pending verification, or conflict state, the corresponding event mask is set to invalid.
6. The method according to claim 5, characterized in that, The historical time series representation is obtained by numerical standardization, time sequence encoding and time series feature extraction of price, transaction volume, supply, demand, inventory, logistics timeliness, missing status and abnormal status within a continuous time window; For the prediction reference time point Represented by historical time sequence After querying the mapping matrix Mapping to obtain the query vector The first valid event mask A time-dependent impact vector Key mapping matrix Mapping yields the key vector and according to and The scaling dot product is used to calculate the matching score; exponential normalization is performed on the matching scores within the current set of valid market events to obtain the matching weight of each market event. This ensures that all matching weights are non-negative and their sum is 1; and that each time-effect vector... via event mapping matrix Transform to the same fusion dimension as the historical time series representation, and according to the corresponding matching weights. Weighted summation yields the aggregated event representation; historical time sequence representation is then used. Through time-series mapping matrix The transformation yields a historical mapping representation, which is then combined with the aggregated event representation and the fused bias vector. Element-wise addition, followed by a non-linear activation function. Get integrated market data , where the nonlinear activation function The query mapping matrix is one of the hyperbolic tangent function, the corrected linear unit function, or the Gaussian error linear unit function; Key mapping matrix Event Mapping Matrix Time-series mapping matrix and fusion bias vector Determined during the model training phase, it remains unchanged during the prediction process of the same model version; when there are no valid market events, the aggregated event representation is set to a zero vector, and the fused market representation is calculated only based on the historical mapping representation and the fused bias vector, and the state of no external valid events is recorded.
7. The method according to claim 1, characterized in that, When establishing the aforementioned comparison task, the market time sequence, other market events except for the blocked market events, model parameters, prediction benchmark time point, and prediction window remain unchanged; only the timeliness impact of the blocked market events is set to zero. The difference between the price center value of the prediction task and the control task without masking the market event represents the direction of the market event's influence on the price center value, and the difference is normalized by the sum of the absolute values of the differences corresponding to each market event; when the change in the prediction interval width after masking the market event exceeds a set threshold, an uncertainty impact marker is written into the explainable attribution record.
8. The method according to claim 1, characterized in that, Also includes: Generate forecast result review records that include product, base date, forecast date, current price, model predicted price, published price, review status, and review method; query forecast tasks by product, base date, review status, and review method; and receive single or batch approval, rejection, and price correction instructions during manual review. During automatic review, the automatic review configuration version that is in effect on the prediction task baseline date is read. The automatic review configuration includes at least the automatic review master switch, applicable scope type, applicable scope identifier, historical accuracy statistics period, prediction period, accuracy judgment error tolerance, minimum number of valid samples, accuracy threshold, effective time and expiration time. The configuration uniquely corresponding to the prediction task is determined according to the priority order of specified SKU, specified category, and all products. Among them, the priority of the specified SKU configuration is higher than that of the specified category configuration, and the priority of the specified category configuration is higher than that of all product configuration. Within the historical accuracy statistical period, completed tasks with the same applicable scope, prediction period, model version, and price caliber as the prediction task, and which simultaneously have both model-predicted prices and actual prices, are selected as valid samples. Valid samples whose relative error between model-predicted prices and actual prices is no greater than the error tolerance are recorded as accurate samples. The historical accuracy is obtained by dividing the number of accurate samples by the total number of valid samples. The model-predicted price will be written into the published price and the review method will be marked as automatic review only when the automatic review switch is turned on, the total number of valid samples is not less than the minimum number of valid samples, the model version and price data are complete and the historical accuracy is not lower than the accuracy threshold. Otherwise, the review will be transferred to manual review. After obtaining the actual price corresponding to the forecast date, the accuracy is summarized according to category, SKU, forecast period and model version, and a trend comparison and accuracy details between the current model version and the comparison model version are generated. The review configuration, market event status or model parameters are updated according to the forecast results review, manual review and accuracy analysis results, and the previous version is retained.
9. The method according to claim 3, characterized in that, The input to the market data extraction model is constructed according to a preset template. The template includes extraction task instructions, knowledge entries retrieved from the market data knowledge base, text fragments of candidate event data and their evidence location information, as well as structured output rules that specify output fields, data types, value ranges, and mandatory requirements. The market data extraction model outputs market events using a constrained decoding method and records the pre-trained large language model identifier, domain adaptation method, model version, prompt template version, and inference parameters. The agricultural product market knowledge base is generated by a knowledge base building program, which executes the following: Collect agricultural product category and market coding documents, category-level data, market supply and circulation data, early warning and policy documents, supply, inventory and circulation statistics, and time-stamped historical market data. Add source identifiers, collection timestamps, business timestamps, document versions, and original document fingerprints to each data source. Map category names, market names, administrative divisions, event terms, units of measurement, and time formats from different sources to a unified field schema, forming category entities, market entities, event type entities, evidence entities, and market time window entities. Generate category inclusion relationships based on coding levels and generate market flows based on supply locations, transportation routes, and market coverage areas. Based on the original text location and original text fingerprint, evidence associations are generated between event type entities and evidence entities, and the entities and relationships are stored as data records that can be queried by the processor. Event-market sample pairs with consistent category, market, price caliber and time granularity are selected from historical data. The direction of change between the benchmark market before the event and the continuous market after the event is used to determine the candidate influence direction. The ratio range of the absolute value of the price change to the benchmark market is used to determine the candidate influence intensity. The time taken for the change amplitude to fall back to the preset influence threshold is used to determine the candidate validity period. The candidate time decay parameter is fitted according to the change amplitude of continuous time points. Candidate parameters, along with corresponding sample identifiers, sample size, price caliber, fitting error, and original evidence, are submitted for review. Once approved, they are written into machine-executable knowledge entries. Each machine-executable knowledge entry must include at least an entry identifier, trigger condition field, event type, applicable category identifier set, applicable market identifier set, evidence requirements, candidate values for influence direction, influence intensity value range, validity period, time decay parameter value range, source record, review record, effective period, and version number. A combined index is established for category identifiers, market identifiers, event types, and effective periods, and a semantic retrieval index is established for evidence text. During retrieval, machine-executable knowledge entries are first filtered based on target category, target market, prediction window, and effective period, and then sorted based on the semantic matching degree between candidate event data and evidence text. Based on the review results or newly added historical samples, parameter calculation and review are re-executed. Once approved, a new version is generated while retaining the original version and its associated historical prediction tasks. The original text evidence refers to the original record itself that can prove the validity of the corresponding market event: for text data, it is a text fragment determined by the source identifier, file identifier, paragraph number, character start and end positions, and original text fingerprint; for structured market records, it is the original record identifier and its specific field names and field values; the evidence location information is the traceable location information pointing to the above-mentioned original record; the direction of influence, intensity of influence, and scope of application of the market event do not exceed the scope of the facts recorded in its original text evidence, and model outputs that do not have traceable original records are not considered valid market events for market prediction.
10. An event-driven, large-scale, explainable attribution system for agricultural product market trends, characterized in that... Includes a data interface, one or more processors, memory, and a verification terminal; The data interface is used to receive market data, candidate event information, actual prices, and audit configurations. The memory is used to store agricultural product market knowledge base, structured output rules, market events, model parameters, prediction results, published prices, review records, accuracy records, and version audit records; The one or more processors are used to execute program instructions stored in the memory to implement functional modules associated in the following order: The forecasting task management module is used to create forecasting tasks and display task status, target agricultural products, target markets, forecasting window, and task version. The market event management module is used to generate, verify, merge, and query market events associated with prediction tasks; The explainable attribution module is used to generate the directional contribution of market events and their correlation with original evidence; The review and processing module is used to send market events, forecast results, attribution records and conflict information to the review terminal, and to receive the results of acceptance, correction or rejection. The prediction result review module is used to save the current price, the model predicted price, and the published price, perform manual or automatic review, and generate a status of pending review, approved, rejected, or published. The automatic audit configuration module is used to save the automatic audit master switch, historical accuracy statistics period, accuracy threshold, and applicable scope for all products, specified categories, or specified SKUs; The accuracy analysis module is used to calculate accuracy by time range, category, SKU, prediction period and model version, and generate model version trend comparison and detailed records; One or more processors are also used to generate new versions of audit configurations, market event statuses, or model parameters based on audit, review, and accuracy analysis results, and save the previous version.
