Supply and demand prediction method and early warning system

By analyzing the historical records of agricultural product transactions, identifying noise fluctuation periods and effective fluctuation periods, classifying fluctuation correlation types, and establishing a supply and demand forecasting model, the problems of large computational complexity and slow prediction speed in traditional methods are solved, and efficient agricultural product supply and demand forecasting and early warning are achieved.

CN120765295APending Publication Date: 2025-10-10INST OF AGRI RESOURCES & ENVIRONMENT HEBEI ACADEMY OF AGRI & FORESTRY SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510846743.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Traditional agricultural product supply and demand forecasting methods rely on manual experience or simple statistical models, which make it difficult to effectively analyze complex market volume and price information. The huge amount of data leads to large computational complexity, high forecasting model training costs, and slow response speed.

Method used

By obtaining historical records of agricultural product transactions, establishing a supply and demand forecasting model, analyzing market volume and price fluctuations, identifying noise fluctuation periods and effective fluctuation periods, classifying fluctuation correlation types, training the supply and demand forecasting model and issuing early warnings.

Benefits of technology

It reduces the amount and complexity of model training data, improves the efficiency of prediction output, and achieves high efficiency and accuracy in agricultural product supply and demand forecasting and early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765295A_ABST
    Figure CN120765295A_ABST
Patent Text Reader

Abstract

The invention discloses a supply and demand prediction method and an early warning system, and relates to the technical field of agricultural management. The system comprises an early warning setting module which is used for inputting the marketing quantity of agricultural products of a target type and a set safety range of prices; the supply and demand prediction module is used for obtaining the types of fluctuation-related agricultural products of each type of agricultural products according to the marketing quantity and prices of each type of agricultural products on multiple trading days; respectively establishing supply and demand prediction models and training until convergence; extracting the marketing quantity and price of the agricultural products of the target type and the fluctuation associated type in the transaction historical record in the current continuous multiple transaction days to obtain the predicted marketing quantity and predicted price of the agricultural products of the target type in the future multiple transaction days; and the alarm module is used for judging whether the predicted marketing quantity and the predicted price of the target type of agricultural products in multiple trading days in the future exceed the corresponding set safety range or not. The agricultural product supply and demand prediction and early warning efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of agricultural management, and particularly relates to a supply and demand prediction method and a warning system. BACKGROUND

[0002] The supply and demand balance of agricultural products is a key factor to guarantee food security and social stability. However, the traditional prediction method mainly relies on artificial experience or simple statistical model, and it is difficult to fully analyze the complex information of the market supply and price.

[0003] And the calculation amount of analyzing and predicting the huge amount of agricultural product transaction data is extremely large, not only the prediction model training cost is high, but also the response speed of the prediction output is slow. SUMMARY

[0004] The purpose of the present application is to provide a supply and demand prediction method and a warning system, which improves the efficiency of the supply and demand prediction and warning of agricultural products by correlatively analyzing different types of agricultural product transaction information.

[0005] To solve the above technical problems, the present application is realized by the following technical scheme: The present application provides a supply and demand prediction method, comprising, obtaining transaction history records and extracting the market supply and price of each type of agricultural product on multiple trading days; obtaining the market supply fluctuation and price fluctuation of each type of agricultural product on multiple trading days according to the market supply and price of each type of agricultural product on multiple trading days, and obtaining the type of fluctuation associated agricultural product of each type of agricultural product; for each type of agricultural product, respectively establishing a supply and demand prediction model, and extracting the market supply and price of the agricultural product of the type and the fluctuation associated type for multiple consecutive days in the transaction history records to train the supply and demand prediction model to convergence; extracting the market supply and price of the agricultural product of the target type and the fluctuation associated type for multiple consecutive trading days in the transaction history records, and inputting the corresponding supply and demand prediction model to obtain the predicted market supply and predicted price of the agricultural product of the target type in the future multiple trading days.

[0006] The present application also discloses a supply and demand warning system, comprising, a warning setting module for inputting the set safety range of the market supply and price of the target type of agricultural product; a supply and demand prediction module for obtaining transaction history records and extracting the market supply and price of each type of agricultural product on multiple trading days; obtaining the market supply fluctuation and price fluctuation of each type of agricultural product on multiple trading days according to the market supply and price of each type of agricultural product on multiple trading days, and obtaining the type of fluctuation associated agricultural product of each type of agricultural product; For each type of agricultural product, a supply and demand forecasting model is established. The market volume and price of agricultural products of this type and related types for multiple consecutive days in the transaction history are extracted to train the supply and demand forecasting model until convergence. Extract the market volume and price of the target agricultural product and the fluctuation-related agricultural product in the current multiple consecutive trading days from the transaction history records, input the corresponding supply and demand forecast model to obtain the predicted market volume and price of the target agricultural product in the next multiple trading days; An alarm module is used to determine whether the predicted market volume and price of the target agricultural product in the next several trading days exceed the corresponding set safety range; If so, a supply and demand warning will be issued; If not, no warning will be issued and continuous monitoring will be carried out.

[0007] The present invention uses a supply and demand forecasting module to analyze the market volume and price fluctuations of different types of agricultural products, deriving the types of agricultural products associated with fluctuations in each type of agricultural product. A separate supply and demand forecasting model is then established and trained for each type of agricultural product. Since each training process only requires data on the type and associated agricultural products, the amount of model training data is reduced, the complexity of overall model training is reduced, and the training speed is accelerated. This also improves the efficiency of subsequent forecast output, indirectly improving the efficiency of agricultural product supply and demand forecasting and early warning.

[0008] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of an embodiment of a supply and demand early warning system according to the present invention; Figure 2 This is a schematic diagram of the steps of the supply and demand forecasting module in one embodiment of the present invention; Figure 3 This is a schematic diagram of the process flow of step S2 in one embodiment of the present invention; Figure 4 This is a schematic diagram of the process flow of step S21 in one embodiment of the present invention; Figure 5 This is a schematic diagram of the process flow of step S22 in one embodiment of the present invention; Figure 6 This is a schematic diagram of the process flow of step S23 in one embodiment of the present invention; Figure 7 This is a schematic diagram of the process flow of step S3 in one embodiment of the present invention; In the accompanying drawings, the components represented by the reference numerals are as follows: 1- Early warning setting module, 2- Supply and demand forecast module, 3- Alarm module. DETAILED DESCRIPTION

[0011] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0012] It should be noted that the terms "first," "second," and the like in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application as detailed in the appended claims.

[0013] See also Figures 1 to 2 As shown, the present invention provides a supply and demand early warning system, comprising an early warning setting module 1, a supply and demand forecasting module 2, and an alarm module 3. The early warning setting module 1 allows staff to input a set safety range for the market quantity and price of target agricultural products. The supply and demand forecasting module 2 is used to forecast the market quantity and price of agricultural products on future trading days. The alarm module 3 is used to issue an early warning if the forecast data exceeds the set range.

[0014] Please continue reading Figure 1 and 2 As shown, during operation, the supply and demand forecasting module 2 in this solution can first execute step S1 to obtain transaction history records and extract the market quantity and price of each type of agricultural product for multiple trading days. Next, step S2 can be executed to obtain the market quantity fluctuation and price fluctuation of each type of agricultural product over multiple trading days based on the market quantity and price of each type of agricultural product for multiple trading days, and obtain the type of agricultural product associated with the fluctuation of each type of agricultural product.

[0015] See also Figures 2 to 4As shown, during the analysis of fluctuation-correlated agricultural products, since agricultural product prices and supply levels contain some routine disturbances of little analytical value, analyzing these fluctuations increases computational complexity but does not improve the accuracy of subsequent supply and demand forecasts. Therefore, step S21 can be performed to determine noise fluctuation periods and effective fluctuation periods for each type of agricultural product based on the supply levels and prices over multiple trading days. Specifically, step S211 can be performed to calculate the difference in supply level between each trading day and the previous adjacent trading day for each type of agricultural product. Next, step S212 can be performed to sort the supply level differences between each trading day and the previous adjacent trading day by numerical value to obtain a supply level difference sequence. Next, step S213 can be performed to calculate the mean of each supply level difference in the supply level difference sequence and the adjacent supply level differences as the supply level noise difference. Step S214 can be performed to classify trading days where the supply level difference between each trading day and the previous adjacent trading day for that type of agricultural product is less than the supply level noise difference as noise fluctuation periods.

[0016] Of course, price factors can also be taken into account, so step S215 can be executed to calculate the price difference between each trading day and the previous adjacent trading day of this type of agricultural product. Step S216 can be executed to sort the price difference between each trading day and the previous adjacent trading day of this type of agricultural product according to the numerical value to obtain a price difference sequence. Step S217 can be executed to calculate the average of each price difference and the adjacent price differences in the price difference sequence as the price noise difference. Step S218 can be executed to include the trading days on which the price difference between each trading day and the previous adjacent trading day of this type of agricultural product is less than the price noise difference in the noise fluctuation period. Finally, step S219 can be executed to include the trading days other than the regenerated fluctuation period in the multiple trading days participating in the fluctuation period division into the effective fluctuation period.

[0017] To supplement the implementation of steps S211 to S219, we provide the source code for some functional modules, with cross-references and explanations provided in the comments. To prevent the leakage of data involving commercial secrets, data that does not affect the implementation of the solution is desensitized. The same applies below.

[0018] struct Transaction { string date; / / trading day double supply; / / Listing quantity double price; / / price }; / / Fluctuation period analysis results struct FluctuationPeriods { vector <string>noise_periods; / / Noise fluctuation period (date) vector <string>valid_periods; / / valid volatility periods (dates) }; / / Calculate the difference between adjacent trading days vector<pair<string, double>> calculateDailyDifferences(const vector <transaction>& transactions, const string& type) { vector<pair<string, double>> differences; for (size_t i = 1; i < transactions.size(); ++i) { double diff = (type == "supply") ? (transactions[i].supply - transactions[i-1].supply) : (transactions[i].price - transactions[i-1].price); differences.emplace_back(transactions[i].date, diff); } return differences; } / / 计算噪声阈值(相邻差值均值) double calculateNoiseThreshold(vector <double>& differences) { / / Sort by absolute value sort(differences.begin(), differences.end(), [](double a, double b) { return abs(a) < abs(b);}); / / Calculate the mean of adjacent differences vector <double>neighbor_means; for (size_t i = 1; i < differences.size(); ++i) { neighbor_means.push_back((abs(differences[i]) + abs(differences[i-1])) / 2.0); } / / 取中位数作为噪声阈值 sort(neighbor_means.begin(), neighbor_means.end()); return neighbor_means.empty() ? 0.0 : neighbor_means[neighbor_means.size() / 2]; } / / 主分析函数 FluctuationPeriods analyzeFluctuationPeriods(const vector <transaction>& transactions) { FluctuationPeriods result; / / 1. Calculate the difference in listing volume auto supply_diffs = calculateDailyDifferences(transactions, "supply"); vector <double>supply_diff_values; for (const auto& p : supply_diffs) { supply_diff_values.push_back(p.second); } / / 2. Calculate the listing noise threshold double supply_noise = calculateNoiseThreshold(supply_diff_values); / / 3. Calculate the price difference auto price_diffs = calculateDailyDifferences(transactions, "price"); vector <double>price_diff_values; for (const auto& p : price_diffs) { price_diff_values.push_back(p.second); } / / 4. Calculate price noise threshold double price_noise = calculateNoiseThreshold(price_diff_values); / / 5. Mark the noise period (meet any condition) vector <bool>is_noise(supply_diffs.size(), false); for (size_t i = 0; i < supply_diffs.size(); ++i) { if (abs(supply_diffs[i].second) < supply_noise || abs(price_diffs[i].second) < price_noise) { is_noise[i] = true; result.noise_periods.push_back(supply_diffs[i].first); } } / / 6. 标记有效时段 for (size_t i = 0; i < supply_diffs.size(); ++i) { if (!is_noise[i]) { result.valid_periods.push_back(supply_diffs[i].first); } } return result; } int main() { / / 示例数据 vector <transaction>transactions = { {"2023-01-01", 100.0, 5.0}, {"2023-01-02", 105.0, 5.1}, / / Supply difference +5.0, price difference +0.1 {"2023-01-03", 102.0, 5.3}, / / Supply difference -3.0, price difference +0.2 {"2023-01-04", 108.0, 5.2}, / / Supply difference +6.0, price difference -0.1 {"2023-01-05", 107.0, 5.4}, / / Supply difference -1.0, price difference +0.2 {"2023-01-06", 115.0, 5.6}, / / Supply difference +8.0, price difference +0.2 {"2023-01-07", 110.0, 5.5} / / Supply difference -5.0, price difference -0.1 }; / / Perform analysis auto periods = analyzeFluctuationPeriods(transactions); / / Output the result cout << "Noise fluctuation period:" << endl; for (const auto& date : periods.noise_periods) { cout << date << endl; } cout << "\nEffective fluctuation period:" << endl; for (const auto& date : periods.valid_periods) { cout << date << endl; } return 0; } This code implements intelligent segmentation of fluctuation periods for agricultural product trading data. It first performs a difference calculation to accurately calculate the difference in supply and price changes between adjacent trading days. It then identifies noise and dynamically determines the noise threshold using a sorted average of adjacent differences. Next, it performs time period segmentation, marking periods where both supply and price fluctuations are below the threshold as noise periods and the remaining periods as valid periods. Finally, the results are output, categorizing the specific trading days of the noise and valid periods.

[0019] This function uses dual judgment conditions (supply volume + price) to improve the accuracy of noise identification. The dynamic noise threshold adapts to the fluctuation characteristics of different agricultural products. The modular design facilitates integration into a larger supply and demand forecasting system.

[0020] See also Figure 2 、 3 As shown in Figure 5, after obtaining the noise fluctuation period and the effective fluctuation period, step S22 can be executed to calculate the overlap between the effective fluctuation periods of each agricultural product type. Specifically, for any two agricultural products, step S221 is first executed to obtain the trading days on which the effective fluctuation periods of the two agricultural products overlap. Then, step S222 can be executed to calculate the overlap between the effective fluctuation periods of the two agricultural products as the ratio of the trading days on which the effective fluctuation periods of the two agricultural products overlap to the number of trading days participating in the fluctuation period division.

[0021] See also Figure 2 、 3 As shown in Figure 6, after calculating the overlap between the effective fluctuation periods of each type of agricultural product, step S23 can be executed to obtain the type of fluctuation-related agricultural products of each type of agricultural product based on the overlap between the effective fluctuation periods of each type of agricultural product. Specifically, step S231 can be executed first to select multiple benchmark types of agricultural products from all types of agricultural products. Next, step S232 can be executed to calculate and obtain the overlap between the effective fluctuation periods of each benchmark type of agricultural product and each of the remaining types of agricultural products. Next, step S233 can be executed to divide each type of agricultural product other than the benchmark type of agricultural product into the same type pool, with the benchmark type of agricultural product having the largest overlap between the effective fluctuation periods of the type of agricultural product and the type of agricultural product.

[0022] However, the different types of agricultural products in the category pool obtained at this time may not necessarily have sufficient correlation. Therefore, step S234 can be executed for each category pool to calculate the cumulative value of the overlap between each type of agricultural product contained in the category pool and the effective fluctuation period with other types of agricultural products, as the cumulative fluctuation overlap of each type of agricultural product contained in the category pool. Next, step S235 can be executed to determine whether the agricultural product type with the highest cumulative fluctuation overlap in each category pool is the corresponding benchmark category agricultural product. If so, step S236 can be executed to obtain the type of fluctuation-related agricultural product for each type of agricultural product. At this time, there is sufficient correlation between the different types of agricultural products in the category pool. If not, it means that the classification of the category pool is incorrect. Therefore, step S237 can be executed to use the agricultural product type with the highest cumulative fluctuation overlap in each category pool as the re-selected benchmark category agricultural product, regenerate the category pool and judge until a category pool with sufficient correlation between different types of agricultural products is obtained.

[0023] In order to supplement the implementation process of the above-mentioned steps S231 to S237, the source code of some functional modules is provided, and a comparative explanation is given in the comment part.

[0024] struct CategoryData { string name; / / Category name vector <string>valid_periods; / / Valid fluctuation period dates }; struct CorrelationResult { string benchmark; / / Benchmark type vector <string>related_categories; / / Related categories map<string, double> overlap_sums; / / The cumulative fluctuation overlap of each variety }; / / Calculate the overlap of the effective fluctuation periods of two varieties (Jaccard similarity) double calculateOverlap(const vector <string>& periods1, const vector <string>& periods2) { vector <string>intersection; vector <string>union_set; set_intersection(periods1.begin(), periods1.end(), periods2.begin(), periods2.end(), back_inserter(intersection)); set_union(periods1.begin(), periods1.end(), periods2.begin(), periods2.end(), back_inserter(union_set)); return union_set.empty() ? 0.0 : static_cast <double>(intersection.size()) / union_set.size(); } / / Select the initial benchmark type (select the first N with the most valid periods) vector <string>selectInitialBenchmarks(const vector <categorydata>&categories, int n) { vector<pair<string, int>> counts; for (const auto& cat : categories) { counts.emplace_back(cat.name, cat.valid_periods.size()); } sort(counts.begin(), counts.end(), [](const auto& a, const auto& b) { return a.second > b.second;}); vector <string>benchmarks; for (int i = 0; i < min(n, static_cast <int>(counts.size())); ++i) { benchmarks.push_back(counts[i].first); } return benchmarks; } / / Generate type pool map <string, vector <string>> generateCategoryPools( const vector <categorydata>& categories, const vector <string>& benchmarks) { map<string, vector <string>> pools; map <string, map<string, double> > overlap_matrix; / / Initialize the benchmark type pool for (const auto& bench : benchmarks) { pools[bench] = {bench}; } / / Calculate the overlap between all varieties for (const auto& cat1 : categories) { for (const auto& cat2 : categories) { if (cat1.name == cat2.name) continue; double overlap = calculateOverlap(cat1.valid_periods, cat2.valid_periods); overlap_matrix[cat1.name][cat2.name] = overlap; } } / / Assign non-benchmark varieties to the benchmark pool with the highest overlap for (const auto& cat : categories) { if (find(benchmarks.begin(), benchmarks.end(), cat.name) !=benchmarks.end()) { continue; / / Skip the benchmark type } string best_bench; double max_overlap = -1.0; for (const auto& bench : benchmarks) { double current = overlap_matrix[cat.name][bench]; if (current > max_overlap) { max_overlap = current; best_bench = bench; } } if (max_overlap > 0) { pools[best_bench].push_back(cat.name); } } return pools; } / / Calculate the cumulative fluctuation overlap of each variety in the variety pool void calculateOverlapSums( map <string, vector <string>>& pools, const map <string, map<string, double> >& overlap_matrix) { for (auto& pool : pools) { pool.second.overlap_sums.clear(); const auto& members = pool.second.related_categories; / / Calculate the cumulative overlap of each member for (const auto& member : members) { double sum = 0.0; for (const auto& other : members) { if (member != other) { sum += overlap_matrix.at(member).at(other); } } pool.second.overlap_sums[member] = sum; } } } / / Check and update the benchmark type bool updateBenchmarks(map <string, vector <string>>& pools) { bool changed = false; for (auto& pool : pools) { string current_bench = pool.first; auto& members = pool.second.related_categories; auto& sums = pool.second.overlap_sums; if (members.empty()) continue; / / Find the variety with the largest cumulative value auto max_it = max_element(sums.begin(), sums.end(), [](const auto& a, const auto& b) { return a.second < b.second;}); if (max_it->first != current_bench) { / / Need to update the benchmark type string new_bench = max_it->first; vector <string>new_members; / / Keep the original pool members (except the new benchmark) copy_if(members.begin(), members.end(), back_inserter(new_members), [&](const string& s) { return s != new_bench;}); / / Update pool data pools[new_bench] = {new_bench}; pools[new_bench].related_categories = new_members; pools.erase(current_bench); changed = true; } } return changed; } / / Main analysis process vector <correlationresult>analyzeCategoryRelations(const vector <categorydata>& categories) { / / 1. Select the initial benchmark type (select the 3 with the most valid periods) auto benchmarks = selectInitialBenchmarks(categories, 3); / / 2. Pre-calculate the overlap matrix between all varieties map <string, map<string, double> > overlap_matrix; for (const auto& cat1 : categories) { for (const auto& cat2 : categories) { if (cat1.name == cat2.name) continue; overlap_matrix[cat1.name][cat2.name] = calculateOverlap(cat1.valid_periods, cat2.valid_periods); } } / / 3. Iteratively optimize the category pool map <string, vector <string>> pools; bool changed; int max_iterations = 10; do { pools = generateCategoryPools(categories, benchmarks); calculateOverlapSums(pools, overlap_matrix); changed = updateBenchmarks(pools); / / Update the benchmark list benchmarks.clear(); for (const auto& pool : pools) { benchmarks.push_back(pool.first); } } while (changed && --max_iterations > 0); / / 4. Convert to result format vector <correlationresult>results; for (const auto& pool : pools) { CorrelationResult res; res.benchmark = pool.first; res.related_categories = pool.second.related_categories; res.overlap_sums = pool.second.overlap_sums; results.push_back(res); } return results; } int main() { / / Sample data (assuming that the valid fluctuation period has been preprocessed) vector <categorydata>categories = { {"Apple", {"2023-01-02", "2023-01-04", "2023-01-06"}}, {"banana", {"2023-01-02", "2023-01-05", "2023-01-07"}}, {"Pear", {"2023-01-03", "2023-01-06"}}, {"Orange", {"2023-01-02", "2023-01-04"}}, {"Grape", {"2023-01-05", "2023-01-07"}} }; / / Perform analysis auto results = analyzeCategoryRelations(categories); / / Output the result for (const auto& res : results) { cout << "Benchmark type: " << res.benchmark << endl; cout << "Association type: "; for (const auto& cat : res.related_categories) { cout << cat << " "; } cout << "\nAccumulated coincidence: "; for (const auto& sum : res.overlap_sums) { cout << sum.first << "(" << sum.second << ") "; } cout << "\n\n"; } return 0; } This code implements intelligent classification of agricultural product fluctuation-related categories. During operation, it first performs benchmark selection, automatically selecting the category with the most effective fluctuation periods as the initial benchmark. Then, it performs dynamic classification, allocating non-benchmark categories to the benchmark pool with the highest overlap through iterative optimization. Next, it calculates overlap, using the Jaccard similarity metric to quantify the degree of overlap between effective fluctuation periods. A self-optimization mechanism then automatically detects and replaces new benchmark categories with higher cumulative overlap. Finally, the results are output, clearly displaying the benchmark categories and their associated categories for each category pool.

[0025] This algorithm adaptively adjusts benchmarks to ensure classification rationality and employs a dual validation mechanism (initial selection + iterative optimization) to enhance result stability. Visual output of the cumulative overlap of each variety facilitates analysis of correlation strength, while a configurable number of iterations prevents infinite loops. This implementation can be directly implemented as a pre-module for supply and demand forecasting systems, providing a scientific grouping basis for subsequent collaborative forecasting of related varieties.

[0026] See also Figure 2 and 7 As shown, after obtaining the types of fluctuation-related agricultural products for each type of agricultural product, step S3 can be executed to establish a supply and demand forecasting model for each type of agricultural product, and the supply and demand forecasting model can be trained until convergence by extracting the market volume and price of agricultural products of this type and fluctuation-related types in the transaction history records for multiple consecutive days. Specifically, for the training of the supply and demand forecasting model corresponding to each type of agricultural product, step S31 can be executed first to obtain the overlap of the effective fluctuation period of the agricultural products of this type and the fluctuation-related agricultural products of the fluctuation-related types. Then, step S32 can be executed to use the market volume and price of agricultural products of this type and fluctuation-related types for multiple consecutive trading days in the transaction history records as the output layer, the market volume and price of agricultural products of this type for multiple subsequent trading days as the output layer, and the overlap of the effective fluctuation period of the agricultural products of this type and each type of fluctuation-related agricultural products as the initial weight of the supply and demand forecasting model, and the supply and demand forecasting model can be trained until convergence.

[0027] Please continue reading Figure 2 As shown, after completing the training of the supply and demand forecasting model for each type of agricultural product, step S4 can be executed next to extract the market quantity and price of the target type and fluctuation-related types of agricultural products in the current multiple consecutive trading days in the transaction history records, and input the corresponding supply and demand forecasting model to obtain the predicted market quantity and predicted price of the target type of agricultural products in the next multiple trading days.

[0028] Please continue reading Figure 1 As shown, the alarm module 3 in this solution continuously determines whether the predicted market volume and price of the target agricultural product for the next several trading days exceed the corresponding set safety range. If so, a supply and demand warning is issued; otherwise, no warning is issued and continuous monitoring is carried out.

[0029] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and the part for the module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be performed substantially in parallel, and they can sometimes also be performed in the opposite order, depending on the function involved.

[0030] It should also be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart, can be implemented by hardware that performs the corresponding function or action, such as a circuit or ASIC (Application Specific Integrated Circuit), or can be implemented by a combination of hardware and software, such as firmware.

[0031] Although the present invention has been described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by examining the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. The fact that certain measures are recorded in different dependent claims does not mean that these measures cannot be combined to produce good results.

[0032] The embodiments of the present application have been described above. The above description is illustrative and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.< / categorydata> < / correlationresult> < / string> < / categorydata> < / correlationresult> < / string> < / string> < / string> < / string> < / string> < / categorydata> < / string> < / int> < / string> < / categorydata> < / string> < / double> < / string> < / string> < / string> < / string> < / string> < / string> < / transaction> < / bool> < / double> < / double> < / transaction> < / double> < / double> < / transaction> < / string> < / string>

Claims

1. A supply and demand forecasting method, characterized in that: include, Obtain transaction history records and extract the market volume and price of each type of agricultural product over multiple trading days; According to the market quantity and price of each type of agricultural product over multiple trading days, the market quantity fluctuation and price fluctuation of each type of agricultural product over multiple trading days are obtained, and the types of agricultural products associated with the fluctuation of each type of agricultural product are obtained; For each type of agricultural product, a supply and demand forecasting model is established. The market volume and price of agricultural products of this type and related types for multiple consecutive days in the transaction history are extracted to train the supply and demand forecasting model until convergence. Extract the market volume and price of agricultural products of target categories and fluctuation-related categories in the current multiple consecutive trading days from the transaction history records, input the corresponding supply and demand forecasting model to obtain the predicted market volume and predicted price of agricultural products of target categories in the next multiple trading days.

2. The method according to claim 1, characterized in that The step of obtaining the market quantity fluctuation and price fluctuation of each type of agricultural product on multiple trading days based on the market quantity and price of each type of agricultural product on multiple trading days, and obtaining the type of agricultural product associated with the fluctuation of each type of agricultural product, include, For each type of agricultural product, the noise fluctuation period and effective fluctuation period are obtained based on the market volume and price of multiple trading days; Calculate and obtain the overlap between the effective fluctuation periods of each type of agricultural product; According to the overlap between the effective fluctuation periods of each type of agricultural products, the types of fluctuation-related agricultural products of each type of agricultural products are obtained.

3. The method according to claim 2, characterized in that The step of obtaining the noise fluctuation period and the effective fluctuation period according to the listing volume and price of multiple trading days, include, Calculate the difference between the market volume of the agricultural product of that type on each trading day and the previous adjacent trading day; The difference between the market volume of the agricultural product of this type on each trading day and the previous adjacent trading day is sorted by numerical value to obtain a market volume difference sequence; Calculate the mean of each listing volume difference and the adjacent listing volume differences in the listing volume difference sequence as the listing volume noise difference; The trading days on which the difference between the market volume of the agricultural product of this type and the previous adjacent trading day is less than the noise difference of the market volume shall be included in the noise fluctuation period; The trading days other than the regenerated fluctuation period among the multiple trading days participating in the fluctuation period division shall be included in the effective fluctuation period.

4. The method according to claim 3, characterized in that The step of obtaining the noise fluctuation period and the effective fluctuation period according to the listing volume and price of multiple trading days also includes: Calculate the price difference between each trading day and the previous adjacent trading day for the agricultural product of that type; The price difference between each trading day and the previous adjacent trading day of this type of agricultural product is sorted by numerical value to obtain a price difference sequence; Calculate the mean of each price difference and the adjacent price differences in the price difference sequence as the price noise difference; Trading days on which the price difference between the agricultural product of this type and the previous adjacent trading day is less than the price noise difference are also included in the noise fluctuation period.

5. The method according to claim 2, characterized in that The step of calculating and obtaining the overlap between the effective fluctuation periods of each type of agricultural product includes: For any two types of agricultural products, perform the following steps respectively: Obtain the trading days on which the effective fluctuation periods of two types of agricultural products overlap; The ratio of the trading days on which the effective fluctuation periods of the two types of agricultural products overlap to the multiple trading days involved in the fluctuation period division is taken as the overlap degree between the effective fluctuation periods of the two types of agricultural products.

6. The method according to claim 2, characterized in that The step of deriving the type of fluctuation-related agricultural products of each type of agricultural product based on the overlap between the effective fluctuation periods of each type of agricultural product includes: Select multiple benchmark agricultural products from all types of agricultural products; Calculate the overlap of the effective fluctuation period between each benchmark agricultural product and each other agricultural product; Each type of agricultural product other than the benchmark type of agricultural products is divided into the same type pool by dividing it into the same type pool with the benchmark type of agricultural product whose effective fluctuation period overlaps the most. The agricultural products in the same type pool are mutually fluctuation-related agricultural products.

7. The method according to claim 6, characterized in that The step of deriving the type of fluctuation-related agricultural products of each type of agricultural product based on the overlap between the effective fluctuation periods of each type of agricultural product also includes: For each category pool, calculate and obtain the cumulative value of the overlap between the effective fluctuation periods of each category of agricultural products contained in the category pool and other categories of agricultural products, as the cumulative fluctuation overlap of each category of agricultural products contained in the category pool; Determine whether the agricultural product category with the highest cumulative fluctuation overlap in each category pool is the corresponding benchmark agricultural product category; If so, the fluctuation-related agricultural product types of each type of agricultural product are obtained; If not, reselect the benchmark agricultural product category, regenerate the category pool and make the judgment.

8. The method according to claim 7, characterized in that The steps of reselecting the benchmark agricultural products are as follows: include, The agricultural product category with the highest overlap in the cumulative fluctuations in each category pool is used as the benchmark agricultural product category for reselection.

9. The method according to any one of claims 6 to 8, characterized in that The step of extracting the market volume and price of the agricultural products of the category and the fluctuation-related categories from the transaction history records for multiple consecutive days to train the supply and demand forecast model until convergence includes: For each type of agricultural product corresponding to the supply and demand forecasting model, the training process performs the following steps: Obtain the overlap between the effective fluctuation periods of the agricultural products of this category and the fluctuation-related agricultural products of the fluctuation-related category; The market volume and price of agricultural products of this type and fluctuation-related types for multiple consecutive trading days in the transaction history records are used as the output layer, the market volume and price of agricultural products of this type for multiple subsequent trading days are used as the output layer, and the overlap of the effective fluctuation period of agricultural products of this type with each type of fluctuation-related agricultural products is used as the initial weight of the supply and demand forecasting model, and the supply and demand forecasting model is trained until convergence.

10. A supply and demand early warning system, characterized in that: include, The early warning setting module is used to input the target agricultural product’s market quantity and price set safety range; The supply and demand forecasting module is used to obtain transaction history records and extract the market volume and price of each type of agricultural product over multiple trading days; According to the market quantity and price of each type of agricultural product over multiple trading days, the market quantity fluctuation and price fluctuation of each type of agricultural product over multiple trading days are obtained, and the types of agricultural products associated with the fluctuation of each type of agricultural product are obtained; For each type of agricultural product, a supply and demand forecasting model is established. The market volume and price of agricultural products of this type and related types for multiple consecutive days in the transaction history are extracted to train the supply and demand forecasting model until convergence. Extract the market volume and price of the target agricultural product and the fluctuation-related agricultural product in the current multiple consecutive trading days from the transaction history records, input the corresponding supply and demand forecast model to obtain the predicted market volume and price of the target agricultural product in the next multiple trading days; An alarm module is used to determine whether the predicted market volume and price of the target agricultural product in the next several trading days exceed the corresponding set safety range; If so, a supply and demand warning will be issued; If not, no warning will be issued and continuous monitoring will be carried out.