A collaborative optimization method and system for peanut supply chain

By constructing a peanut supply chain information platform based on blockchain technology, in real time capture and updating key data, and dynamically adjusting the logistics distribution route, solving the problem of incomplete information transmission in the traditional supply chain and insufficient data processing, and achieved more efficient efficiency Supply chain association optimization and cost reduction.

CN118917780BActive Publication Date: 2025-01-28RUSHAN SANYA FOOD CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410962134.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2025-01-28
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

Information flow in the traditional peanut supply chain relies on point-to-point communication, resulting in insufficient information transmission and errors. The data processing method is insufficient in real-time and dynamics, affecting the collaborative cooperation and process optimization of the supply chain.

Method used

Build a peanut supply chain information platform based on blockchain technology, capture and update key data in each link in real time, dynamically adjust factor encryption data, and dynamically adjust the logistics distribution route based on encryption data.

Benefits of technology

Improving the transparency and data security of the supply chain, optimizing the efficiency of logistics distribution, reducing delivery costs, and enhancing the ability to respond to emergencies in the supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917780B_ABST
    Figure CN118917780B_ABST
Patent Text Reader

Abstract

The present invention provides a collaborative optimization method and system for a peanut supply chain, and relates to the technical field of big data. The method includes: constructing a peanut supply chain information platform based on blockchain technology, wherein the peanut supply chain information platform includes multiple nodes, each node representing a different participant in the supply chain; capturing and updating key data of each link of the peanut supply chain in real time through the peanut supply chain information platform to obtain a peanut supply chain data stream; determining influencing factors, and calculating dynamic adjustment factors according to the influencing factors, wherein the influencing factors include time factors, data flow, and supply chain status; encrypting the peanut supply chain data stream according to the dynamic adjustment factor and an initial encryption key to obtain encrypted data; and dynamically adjusting the logistics distribution route according to the encrypted data to obtain a final distribution route. The present invention improves logistics efficiency and reduces distribution costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a collaborative optimization method and system for a peanut supply chain. Background Art

[0002] In the traditional peanut supply chain, information flow mainly relies on point-to-point communication, which may lead to slow information transmission or occasional errors in transmission in some cases. Since the information between the various links of the supply chain is not completely transparent, it may be difficult for all parties in the supply chain to fully and real-time understand the status of the entire supply chain, which to some extent affects the collaboration and process optimization between all parties.

[0003] In addition, traditional data processing methods may be slightly insufficient in terms of real-time and dynamics. Data in the peanut supply chain, such as production, quality, price, demand, etc., are all dynamically changing. However, these traditional methods may not always be able to capture and update changes in this data in a timely manner. Therefore, sometimes supply chain decisions may not be based on the latest information, which may have a certain impact on the overall efficiency and benefits of the supply chain. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a collaborative optimization method and system for a peanut supply chain, thereby improving logistics efficiency and reducing distribution costs.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] In a first aspect, a collaborative optimization method for a peanut supply chain is provided, the method comprising:

[0007] Build a peanut supply chain information platform based on blockchain technology. The peanut supply chain information platform includes multiple nodes, each of which represents a different participant in the supply chain;

[0008] Capture and update key data of each link of the peanut supply chain in real time through the peanut supply chain information platform to obtain the peanut supply chain data flow;

[0009] Determine the influencing factors, and calculate the dynamic adjustment factors according to the influencing factors, wherein the influencing factors include time factors, data flow, and supply chain status; encrypt the peanut supply chain data flow according to the dynamic adjustment factors and the initial encryption key to obtain encrypted data;

[0010] Based on the encrypted data, the logistics delivery route is dynamically adjusted to obtain the final delivery route.

[0011] Furthermore, a peanut supply chain information platform based on blockchain technology is constructed, including:

[0012] Determine the gene encoding scheme, where each gene represents a specific transmission node, path, or related parameter in the supply chain;

[0013] According to the genetic coding scheme, a series of initial configuration schemes are randomly generated, each of which represents a supply chain information platform configuration scheme;

[0014] According to the initial configuration scheme, determining the evaluation function used to evaluate the performance of each supply chain information platform configuration scheme;

[0015] According to the evaluation function, each individual in the initial population is evaluated to obtain an evaluation result;

[0016] According to the evaluation results, determine the corresponding supply chain information platform configuration plan, and perform cross-operation to generate a new configuration plan, and repeat the steps until the preset number of iterations is reached;

[0017] After the iteration, the corresponding configuration scheme is determined as the final solution;

[0018] According to the final solution, a blockchain-based peanut supply chain information platform was built.

[0019] Furthermore, the calculation formula of the evaluation function is:

[0020]

[0021] Where N represents the total number of nodes in the supply chain; c i represents the unit cost of node i; q i (x) represents the amount of transmission through node i under configuration scheme x; t i (x) represents the processing time of node i under configuration scheme x; M represents the total number of known security vulnerabilities; s j (x) represents the severity score of vulnerability j under configuration scheme x; K represents the total number of traceability checkpoints; represents the traceability score of checkpoint k1 under configuration scheme x; α, β, γ and δ represent weight coefficients; It means that for a given configuration x, all t i (x) and find the maximum value.

[0022] Furthermore, the peanut supply chain information platform is used to capture and update key data of each link of the peanut supply chain in real time to obtain the peanut supply chain data flow, including:

[0023] After building the peanut supply chain information platform, the data is preprocessed to obtain preprocessed data;

[0024] Determine the number of clusters K2, and randomly select K2 points from the preprocessed data as the initial cluster centers;

[0025] For each data point in the data stream, calculate the distance between it and each cluster center;

[0026] Assign each data point to the corresponding cluster center to form K2 initial clusters;

[0027] For each cluster, calculate the average value of all data points within it, use the average value as the new cluster center, and repeat the steps until the preset number of iterations is reached to obtain the clustering result;

[0028] According to the clustering results, the data points in the peanut supply chain data stream are divided into different categories, each category represents a link or state in the peanut supply chain;

[0029] The classified data points are sorted according to the time series to form a structured peanut supply chain data stream, which contains timestamps, data values ​​and categories.

[0030] Furthermore, the influencing factors are determined and the dynamic adjustment factors are calculated based on the influencing factors, including:

[0031] Determine the influencing factors and Calculate the dynamic adjustment factor D;

[0032] Among them, w1, w2 and w3 represent weight coefficients; t represents the number of hours in a day, representing the current time; d represents the current data flow; d max and d min They represent the maximum and minimum values ​​of data flow respectively; s represents the current order volume; s max and S min Represent the maximum and minimum order quantities respectively.

[0033] Furthermore, the peanut supply chain data stream is encrypted according to the dynamic adjustment factor and the initial encryption key to obtain encrypted data, including:

[0034] The dynamic adjustment factor is converted into a first byte string; the initial key is also converted into a second byte string;

[0035] Connecting the first byte string and the second byte string, and performing a hash operation on the connected first byte string and the second byte string using a hash function to obtain a new key;

[0036] The peanut supply chain data stream is divided into data blocks of fixed size, and each data block in the data stream is encrypted using a new key and hash function to form encrypted data.

[0037] Furthermore, the logistics distribution route is dynamically adjusted based on the encrypted data to obtain the final distribution route, including:

[0038] Decrypt the encrypted data to obtain the original supply chain data;

[0039] Parse raw supply chain data into structured information, including order details, inventory status, and transportation requirements;

[0040] Filter out key information related to logistics delivery routes from structured information, including shipping location, destination, cargo volume, and delivery time requirements;

[0041] Obtain pre-planned logistics delivery routes and evaluate the current delivery routes based on key information to obtain evaluation results;

[0042] Analyze the evaluation results and initialize the pheromone matrix based on the nodes and paths of the logistics distribution network to represent the pheromone concentration on each path;

[0043] A starting delivery node is randomly selected for each ant, and each ant determines the next node to visit according to probability based on the pheromone concentration and heuristic information of the nodes around the current location;

[0044] During the movement of ants, the pheromones of the paths they pass through are locally updated. After all ants complete a path search, the global pheromones are updated according to the length and quality of each ant's path. The ant path selection and pheromone update process is repeated until the preset number of iterations is reached to obtain the final delivery route.

[0045] In a second aspect, a collaborative optimization system for a peanut supply chain includes:

[0046] The acquisition module is used to build a peanut supply chain information platform based on blockchain technology. The peanut supply chain information platform includes multiple nodes, each of which represents a different participant in the supply chain. The peanut supply chain information platform is used to capture and update key data of each link of the peanut supply chain in real time to obtain the peanut supply chain data flow;

[0047] The processing module is used to determine the influencing factors and calculate the dynamic adjustment factors based on the influencing factors, which include time factors, data flow and supply chain status; encrypt the peanut supply chain data stream based on the dynamic adjustment factors and the initial encryption key to obtain encrypted data; and dynamically adjust the logistics distribution route based on the encrypted data to obtain the final distribution route.

[0048] According to a third aspect, a computing device includes:

[0049] one or more processors;

[0050] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described.

[0051] In a fourth aspect, a computer-readable storage medium stores a program, and when the program is executed by a processor, the method described is implemented.

[0052] The above solution of the present invention includes at least the following beneficial effects:

[0053] By building a peanut supply chain information platform based on blockchain technology, the present invention can achieve real-time capture and update of key data in each link of the supply chain. The decentralized nature of blockchain technology and the characteristics of data that cannot be tampered with ensure the authenticity and credibility of the data, thereby improving the transparency of the entire supply chain.

[0054] The present invention encrypts the peanut supply chain data stream by calculating a dynamic adjustment factor and combining it with an initial encryption key, thereby protecting the data security and preventing the data from being tampered with or stolen. The present invention can dynamically adjust the logistics distribution route to obtain the optimal distribution path. This dynamic planning capability not only improves logistics efficiency and reduces distribution costs, but also enhances the supply chain's ability to respond to emergencies, such as traffic congestion, weather changes, etc.

[0055] By updating and sharing data in real time, all parties in the supply chain can understand the overall situation more accurately and achieve more effective collaboration. This collaborative optimization not only helps to improve the response speed of the supply chain, but also reduces the waste of resources and efficiency loss caused by information asymmetry. By improving the intelligence and automation level of data processing, the present invention helps to reduce human errors and delays, thereby improving the overall performance and efficiency of the supply chain. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a flow chart of a collaborative optimization method for a peanut supply chain provided by an embodiment of the present invention.

[0057] Figure 2 It is a schematic diagram of a collaborative optimization system for a peanut supply chain provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0059] like Figure 1 As shown, an embodiment of the present invention proposes a collaborative optimization method for a peanut supply chain, the method comprising the following steps:

[0060] Step 11, building a peanut supply chain information platform based on blockchain technology, the peanut supply chain information platform includes multiple nodes, each node represents a different participant in the supply chain;

[0061] Step 12, capturing and updating key data of each link of the peanut supply chain in real time through the peanut supply chain information platform to obtain a peanut supply chain data flow;

[0062] Step 13, determining influencing factors, and calculating dynamic adjustment factors according to the influencing factors, wherein the influencing factors include time factors, data flow, and supply chain status; encrypting the peanut supply chain data stream according to the dynamic adjustment factors and the initial encryption key to obtain encrypted data;

[0063] Step 14: dynamically adjust the logistics distribution route based on the encrypted data to obtain the final distribution route.

[0064] In the embodiment of the present invention, step 11, by building an information platform based on blockchain, the transparency and credibility of supply chain information can be improved. The decentralized and tamper-proof characteristics of blockchain technology ensure the authenticity and security of supply chain data and promote the establishment of trust among all participants. In addition, multi-node participation enables real-time sharing of information, which enhances the coordination and response speed of the supply chain. Step 12, real-time capture and update of key data of each link of the supply chain can ensure that all parties in the supply chain obtain the latest information in a timely manner, so as to make more accurate decisions. The establishment of such a data flow helps to reduce information asymmetry and delays, and improve the overall efficiency and flexibility of the supply chain. Step 13, by considering multiple influencing factors and calculating dynamic adjustment factors, the method can more accurately reflect the real-time changes in the supply chain status. At the same time, the data is encrypted in combination with the initial encryption key, which effectively protects the security and privacy of the supply chain data and prevents data leakage or malicious use. Step 14, dynamically adjusting the logistics distribution route according to the encrypted data can ensure the efficiency and security of the distribution process. This dynamic planning capability not only optimizes the efficiency of logistics distribution and reduces transportation costs, but also effectively responds to the challenges brought by sudden factors such as traffic conditions and weather changes. By adjusting delivery routes in real time, delays and losses can be minimized, improving customer satisfaction and the overall performance of the supply chain.

[0065] In a preferred embodiment of the present invention, the above step 11, building a peanut supply chain information platform based on blockchain technology, may include:

[0066] Step 111, determining a gene encoding scheme, where each gene represents a specific transmission node, path or related parameter in the supply chain;

[0067] Step 112, randomly generating a series of initial configuration schemes according to the gene encoding scheme, each scheme representing a supply chain information platform configuration scheme;

[0068] Step 113, determining an evaluation function for evaluating the performance of each supply chain information platform configuration solution according to the initial configuration solution;

[0069] Step 114, evaluating each individual in the initial population according to the evaluation function to obtain an evaluation result;

[0070] Step 115, according to the evaluation results, determine the corresponding supply chain information platform configuration plan, and perform cross-operation to generate a new configuration plan, and repeat the steps until a preset number of iterations is reached;

[0071] Step 116, after the iteration is completed, determine the corresponding configuration solution as the final solution;

[0072] Step 117, based on the final solution, build a blockchain-based peanut supply chain information platform.

[0073] In an embodiment of the present invention, step 111, by determining the genetic coding scheme, each component in the supply chain, including transmission nodes, paths and related parameters, can be clearly and systematically represented. Step 112, by randomly generating an initial configuration scheme, a wider solution space can be explored. This method helps to avoid falling into a local optimal solution, thereby finding a globally better configuration scheme. Step 113, the determination of the evaluation function enables the performance of different configuration schemes to be quantitatively compared, which helps to objectively evaluate the pros and cons of various configuration schemes. Step 114, by evaluating each individual in the initial population, the performance of various configuration schemes can be understood. Step 115, by generating a new configuration scheme through a crossover operation, more possible solutions can be explored. This iterative process helps to gradually approach the optimal solution and improve the performance of the supply chain information platform. Step 116, after multiple iterative optimizations, a configuration scheme with better performance can be determined as the final solution, which helps to improve the overall performance and efficiency of the supply chain information platform. Step 117, building an information platform based on the final solution can ensure that the performance and security of the platform are in the optimal state. The information platform based on blockchain technology will have higher transparency, credibility and coordination, which will help improve the management level and efficiency of the entire peanut supply chain.

[0074] Steps 111 to 117 are the specific process of building a peanut supply chain information platform based on blockchain technology. The implementation process of these steps will be described in detail below, and a specific case will be given.

[0075] Step 111, in this step, a unique genetic code is assigned to each key element in the supply chain (such as a transmission node, a path, related parameters, etc.). For example, a binary code can be used, where a combination of "0" and "1" represents different nodes, paths or parameters. Specifically, it includes:

[0076] List all the key elements in the supply chain and assign each one a unique binary code.

[0077] Step 112: In this step, a series of initial supply chain information platform configuration schemes are randomly generated according to the genetic coding scheme, and these schemes will serve as the starting point for the subsequent optimization process. Specifically, they include:

[0078] Using a random number generator, multiple initial configuration schemes are generated according to the genetic encoding scheme, ensuring that each scheme is unique to avoid repeated calculations.

[0079] Step 113, the evaluation function is used to quantitatively evaluate the performance of each supply chain information platform configuration scheme. This function should consider multiple aspects, such as data transmission efficiency, security, scalability, etc. Specifically including:

[0080] Define the mathematical expression of the evaluation function, which should cover all important performance indicators and determine the weight of each performance indicator to reflect their different impact on the overall performance.

[0081] Step 114: In this step, an evaluation function is used to evaluate each individual (i.e., configuration scheme) in the initial population to understand their performance. Specifically, it includes:

[0082] Apply the evaluation function to each initial configuration scheme and record the evaluation results of each scheme for subsequent comparison and optimization.

[0083] Step 115, through crossover operations (such as single-point crossover, multi-point crossover, etc.), the advantages of different configuration schemes can be combined to generate a new and possibly better configuration scheme. Specifically, it includes:

[0084] Select two or more configuration schemes with better performance as parents, perform crossover operations on the selected parents, generate new child configuration schemes, and repeat this process until the preset number of iterations is reached.

[0085] Step 116, comparing the evaluation results of all generated configuration solutions, and selecting the configuration solution with the best evaluation result as the final solution.

[0086] Step 117, according to the genetic code of the final configuration plan, set the various components and parameters of the information platform, deploy the blockchain network, ensure communication and data synchronization between nodes, test the performance and security of the information platform, and ensure that it meets the preset requirements.

[0087] The specific cases are as follows:

[0088] Assume there is a peanut supply chain with 5 key transmission nodes (farms, processing plants, warehouses, distributors, retailers). Each node can be assigned a 3-bit binary code (e.g., farm = 001, processing plant = 010, and so on). Then, 10 initial configuration schemes are randomly generated, each containing a different combination of these nodes and path selection.

[0089] Next, define an evaluation function that considers factors such as data transmission speed, data security, system scalability, etc., and assigns different weights to each factor. Then, evaluate these 10 initial solutions and record the score of each solution.

[0090] Through multiple iterations and cross-operations, the optimal solution is gradually approached. Finally, the configuration with the highest score is selected as the final solution, and a blockchain-based peanut supply chain information platform is built based on it. This platform will be able to achieve real-time sharing of supply chain information, ensure data security and credibility, and improve the coordination and response speed of the entire supply chain.

[0091] In a preferred embodiment of the present invention, the calculation formula of the evaluation function is:

[0092]

[0093] Where N represents the total number of nodes in the supply chain; c i represents the unit cost of node i; q i (x) represents the amount of transmission through node i under configuration scheme x; t i (x) represents the processing time of node i under configuration scheme x; M represents the total number of known security vulnerabilities; s j (x) represents the severity score of vulnerability j under configuration scheme x; the severity score of vulnerability s j (x) is a non-negative real number used to quantify the potential threat level of vulnerability j under configuration scheme x. Its value range can be [0, S max ], where S max is a positive real number, indicating the upper limit of the score. For example, if the score is scored on a 10-point scale, then S max = 10. When it comes to specific applications, it can be divided into the following specific parts:

[0094] Low threat: The vulnerability has a limited impact, is difficult to exploit, has been known for a long time, and has a corresponding score range of [0, 3].

[0095] Medium threat: The vulnerability has a medium impact, is moderately difficult to exploit, has been known for a short time, and has a corresponding score range of (3, 7).

[0096] High threat: The vulnerability has a wide impact, is easy to exploit, has been known for a short time, and has a corresponding score range of (7, S max ]; K represents the total number of traceability checkpoints; represents the traceability score of checkpoint k1 under configuration scheme x, and the traceability score of the checkpoint It is also a non-negative real number used to quantify the traceability of checkpoint k1 under configuration scheme x. Its value range is set in [0, 1], where 0 means completely untraceable and 1 means completely traceable. When applied in specific applications, it can be divided into the following specific parts:

[0097] Poor: data is incomplete, difficult to access, and inaccurately associated, with a corresponding score range of [0, 0.3].

[0098] Medium: data is partially complete, access is moderately convenient, associations are partially accurate, and the corresponding score range is (0.3, 0.7].

[0099] Good: complete data, easy access, accurate association, corresponding score range (0.7, 1]; α, β, γ and δ represent weight coefficients; It means that for a given configuration x, all t i (x) and find the maximum value.

[0100] In the embodiment of the present invention, This part takes into account the unit cost of the node and the transmission volume passing through the node. By optimizing this part, the cost of the entire supply chain can be reduced and the economic benefits can be improved. Some attention is paid to the maximum processing time of the nodes. By reducing the maximum processing time, the cycle of the entire supply chain process can be shortened and operational efficiency can be improved. This part takes into account the severity of the security vulnerability. Optimizing this part can reduce the impact of security vulnerabilities and improve the security of the supply chain information platform. Some attention is paid to the scoring of traceability checkpoints. Improving traceability helps to quickly locate and solve problems when they occur, ensuring the stability and transparency of the supply chain. The weight coefficients α, β, γ and δ in the formula can be adjusted according to actual conditions to adapt to different supply chain needs and optimization goals.

[0101] In a preferred embodiment of the present invention, the above step 12, capturing and updating key data of each link of the peanut supply chain in real time through the peanut supply chain information platform to obtain the peanut supply chain data flow, may include:

[0102] Step 121, after building the peanut supply chain information platform, preprocessing the data to obtain preprocessed data;

[0103] Step 122, determine the number of clusters K2, and randomly select K2 points from the preprocessed data as initial cluster centers;

[0104] Step 123, for each data point in the data stream, calculate the distance between it and each cluster center;

[0105] Step 124, assigning each data point to a corresponding cluster center to form K2 initial clusters;

[0106] Step 125, for each cluster, calculate the average value of all data points within it, use the average value as the new cluster center, and repeat the steps until a preset number of iterations is reached to obtain a clustering result;

[0107] Step 126, according to the clustering result, the data points in the peanut supply chain data stream are divided into different categories, each category representing a link or state in the peanut supply chain;

[0108] Step 127, sorting the classified data points according to the time series to form a structured peanut supply chain data stream, which includes a timestamp, a data value, and a category.

[0109] In an embodiment of the present invention, the data preprocessing of step 121 can effectively integrate data from different sources and different formats, and clean invalid or erroneous data, thereby ensuring the accuracy and effectiveness of subsequent analysis. Through the cluster analysis of steps 122 to 125, a large number of data streams can be divided into several main categories, which can greatly reduce the complexity of subsequent data analysis and improve processing efficiency. Since the data stream is captured and updated in real time, this process can realize real-time monitoring of each link of the peanut supply chain. Once the data of a certain link is abnormal, the system can react quickly and notify relevant personnel in time to handle it. Through steps 126 and 127, the data stream is divided into different categories and sorted by time series, which makes the data more structured, facilitates data visualization and report generation, and helps managers understand the operating status of the supply chain more intuitively. Through real-time monitoring and analysis of data streams, potential risks in the supply chain, such as supply delays, inventory backlogs, etc., can be discovered in time, so that corresponding prevention and control measures can be taken to reduce losses. The structured data stream records the timestamp, data value and category of each data point, which greatly enhances the transparency and traceability of the supply chain.

[0110] When applied specifically, the implementation process includes the following:

[0111] Step 121, in this step, the raw data captured from the peanut supply chain information platform is first cleaned and sorted, which includes removing duplicate data, filling or deleting missing values, converting data types, processing outliers, etc. For example, for temperature data, Fahrenheit temperature may be converted to Celsius temperature to ensure data consistency, and the pre-processed data will be used as input for subsequent clustering analysis.

[0112] Step 122, based on the characteristics and needs of the peanut supply chain, determine the number of clusters to be formed, and then randomly select a corresponding number of points from the preprocessed data as initial cluster centers. For example, if it is decided to form three clusters, then three data points are randomly selected as initial cluster centers.

[0113] Step 123: For each data point in the data stream, calculate the Euclidean distance between it and each cluster center.

[0114] Step 124, according to the Euclidean distance calculated in step 123, each data point is assigned to the cluster center with the closest distance, so as to form an initial cluster.

[0115] Step 125, for each cluster, calculate the average value of all data points within it, and use this average value as the new cluster center. Then repeat steps 123 and 124 until the preset number of iterations is reached or the change of the cluster center is less than a certain threshold, thereby obtaining the final clustering result.

[0116] Step 126, based on the final clustering result, the data points in the peanut supply chain data stream are divided into different categories. Each category represents a specific link or state in the peanut supply chain, such as procurement, warehousing, transportation, etc. In this way, by looking at the category of the data point, it is possible to quickly understand which link in the supply chain it belongs to.

[0117] Step 127, sort the classified data points according to the time series to form a structured peanut supply chain data stream. This data stream contains the timestamp, data value and category of each data point. Such a data structure facilitates subsequent data analysis and visualization.

[0118] Specific examples:

[0119] Suppose a peanut supply chain information platform is monitoring the temperature data of peanuts in real time to ensure the quality of peanuts during transportation and storage. The platform captures a large number of temperature data points and now needs to identify different temperature patterns through cluster analysis.

[0120] Remove duplicate and abnormal temperature data, unify the temperature unit to Celsius, and decide to form three clusters based on historical data, representing "normal temperature", "low temperature" and "high temperature" respectively; randomly select three initial cluster centers, and calculate the Euclidean distance between each temperature data point and these centers to form initial clusters. Through multiple iterations, adjust the cluster centers until the clustering results are stable; divide the temperature data points into three categories: "normal temperature", "low temperature" and "high temperature"; sort these data points according to the time series, and add timestamps, temperature values ​​and category information to form a structured temperature data stream.

[0121] In a preferred embodiment of the present invention, the above step 13, determining the influencing factors and calculating the dynamic adjustment factors according to the influencing factors, may include:

[0122] Step 131, determine the influencing factors, and Calculate the dynamic adjustment factor D;

[0123] Among them, w1, w2 and w3 represent weight coefficients; t represents the number of hours in a day, representing the current time; d represents the current data flow; d max and d min They represent the maximum and minimum values ​​of data flow respectively; s represents the current order volume; s max and min Represent the maximum and minimum order quantities respectively.

[0124] In the embodiment of the present invention, by calculating the dynamic adjustment factor D, the system can flexibly adjust the supply chain management strategy according to the actual situation. This flexibility enables the system to better adapt to the ever-changing market environment and business needs. Since the dynamic adjustment factor D is calculated based on real-time data (such as the current time t, data flow d, and order volume s), the system can immediately reflect changes in the supply chain status and make corresponding adjustments. This real-time nature helps enterprises quickly respond to market changes and improve operational efficiency.

[0125] The calculation of the dynamic adjustment factor D takes into account multiple influencing factors (time, data flow, and order volume), which enables the system to make decisions by comprehensively considering information from multiple aspects. This comprehensiveness helps the system to more comprehensively evaluate the supply chain status and make more reasonable adjustments. By dynamically adjusting factors, companies can allocate resources more reasonably, such as increasing manpower or material input during peak hours to cope with increased data flow and order volume. This helps to improve resource utilization efficiency and reduce costs. By adjusting supply chain strategies in real time, companies can respond to customer needs more quickly, improve order processing speed and accuracy, and thus improve customer satisfaction.

[0126] In a preferred embodiment of the present invention, the above step 13, encrypting the peanut supply chain data stream according to the dynamic adjustment factor and the initial encryption key to obtain encrypted data, may also include:

[0127] Step 132, converting the dynamic adjustment factor into a first byte string; and converting the initial key into a second byte string;

[0128] Step 133, concatenating the first byte string and the second byte string, and performing a hash operation on the concatenated first byte string and the second byte string using a hash function to obtain a new key;

[0129] Step 134, divide the peanut supply chain data stream into data blocks of fixed size, and encrypt each data block in the data stream using a new key and hash function to form encrypted data.

[0130] In an embodiment of the present invention, by combining the dynamic adjustment factor and the initial key to generate a new encryption key, the complexity and dynamics of the key are increased, thereby significantly improving the security of the data. Even if the initial key is leaked, due to the existence of the dynamic adjustment factor, it is difficult for an attacker to crack the encrypted data in a short time. Encrypting the peanut supply chain data stream can ensure that sensitive information (such as price, transaction volume, etc.) in the data stream is not leaked during transmission and storage, and effectively protect the business secrets of the enterprise and the privacy of the customer. Using a hash function to encrypt data can ensure the integrity and authenticity of the data. Once the data is tampered with during transmission, the recipient can discover the tampering by verifying the hash value, thereby taking timely measures to prevent losses. Since the dynamic adjustment factor is calculated based on real-time influencing factors, even if the system is attacked or fails, the encryption key will be dynamically adjusted as the influencing factors change, increasing the robustness and anti-attack capability of the system.

[0131] When specifically applied, the above step 132, in this step, first convert the dynamic adjustment factor D and the initial key K3 from numerical values ​​or character strings to byte strings. For the dynamic adjustment factor D, if it is a floating point number or an integer, it can be converted to a string, and then the string is encoded into a byte string. For example, if D = 1.2345, it can be first converted to the string "1.2345", and then converted to a byte string using UTF-8 encoding. For the initial key K3, if it is a string, it can be directly converted to a byte string using UTF-8 encoding. After the conversion is completed, two byte strings are obtained: the first byte string (representing the dynamic adjustment factor D) and the second byte string (representing the initial key K3).

[0132] Step 133, obtain two converted byte strings: the first byte string (from the dynamic adjustment factor) and the second byte string (from the initial key); then, perform a connection operation. Specifically, it includes:

[0133] Create an empty new byte string to store the concatenated result, set two pointers, one to point to the start position of the first byte string and the other to point to the start position of the second byte string, and enter a loop until at least one of the two byte strings is completely traversed:

[0134] Take a byte from the current pointer position of the first byte string, add it to the end of the new byte string, and move the pointer of the first byte string to the next byte; take a byte from the current pointer position of the second byte string, and add it to the end of the new byte string; move the pointer of the second byte string to the next byte. If one byte string is traversed first and there are remaining bytes in the other byte string, add the remaining bytes to the end of the new byte string in sequence. After the above steps, a longer new byte string composed of alternating two original byte strings will be obtained.

[0135] Determine the SHA-256 hash function and pass the concatenated byte string as input data to the hash function. The SHA-256 hash function processes the input data and generates a fixed-length hash value through its internal algorithm. The characteristics of this hash value are uniqueness and irreversibility, which means that different inputs will produce different hash values, and the original input cannot be deduced from the hash value. The specific calculation steps of the SHA-256 hash function are as follows:

[0136] SHA-256 has an initial hash value (H0 = (H 00 ,H 10 ,…,H 70 )); The original message will be padded and split into 512-bit blocks M i , where i represents the index of the block; SHA-256 uses 64 32-bit constants J t , where 0≤t≤63. For each 512-bit message block M i , generate 64 32-bit words W by operation t , where 0≤t≤63. For each message block, the compression function uses the current hash value H i-1 and 64 words W generated by message scheduling t To calculate the new hash value H i This process involves 64 iterations, each of which updates 8 working variables (a, b, c, d, e, f, g, h). Initially, these variables are equal to H i-1 In each round t (0≤t≤63), the following operations are performed:

[0137] The current hash value H i-1 Load into registers (a, b, c, d, e, f, g, h); process the input message block to generate 64 32-bit words W t ; where, for each round t (from 0 to 63):

[0138] (1) Calculate S1 and Ch:

[0139] Among them, S1 is obtained by performing three unsigned right shifts on register e (6 bits, 11 bits, and 25 bits respectively) and XORing the results. Ch is obtained by performing a logical AND operation on registers e and f, then negating register e and performing a logical AND operation with register g, and finally XORing the two results.

[0140] (2) Calculate S0 and Maj:

[0141] S0 is obtained by performing three unsigned right shifts on register a (2 bits, 13 bits, and 22 bits respectively) and XORing the results. S0 is a nonlinear transformation used in the message expansion process, which is designed to increase the confusion of the algorithm so that a small input change can lead to a significant change in the output hash value. Maj is obtained by performing a logical AND operation on registers (a, b, c) and then XORing the three results. Specifically, it calculates the logical AND of a and b, the logical AND of a and c, and the logical AND of b and c, and XORs the three results. Maj is a majority function that is designed to capture the "majority" value in the input bits and increase the diffusion of the algorithm so that a single change in the input can affect multiple bits of the output hash value.

[0142] (3) Calculate T1 and T2:

[0143] T1 is obtained by combining register h, intermediate result S1, Ch, constant K t and the message word W t T2 is obtained by adding the intermediate results S0 and Maj.

[0144] (4) Update register:

[0145] Register h is updated with the value of register g.

[0146] Register g is updated with the value of register f.

[0147] Register f is updated with the value of register e.

[0148] Register e is updated to the sum of register d and T1.

[0149] Register d is updated with the value of register c.

[0150] Register c is updated with the value of register b.

[0151] Register b is updated with the value of register a.

[0152] Register a is updated to the sum of T1 and T2.

[0153] (5) After all 64 rounds of calculation are completed, the values ​​in registers (a, b, c, d, e, f, g, h) will constitute the new hash value H i This new hash value will be used in the next round of calculations together with the next message block until all message blocks are processed. Finally, the hash value obtained after the last message block is processed is the SHA-256 hash value of the entire message.

[0154] Step 134, in this step, the peanut supply chain data stream is first divided into data blocks of fixed size. This size can be determined based on the specific encryption requirements and the characteristics of the data stream. Then, for each data block, it is encrypted using a new key (i.e., the hash value generated in step 133) and an encryption algorithm (such as AES). The encryption algorithm takes the plaintext data (here, the data block) and the key as input and outputs the ciphertext data (i.e., the encrypted data block). This process is repeated for each data block until the entire data stream is encrypted. In the end, a string of encrypted data is obtained, which is safe when transmitted or stored, and only the recipient with the correct key can decrypt and access the original data.

[0155] Specific examples:

[0156] Suppose there is a peanut supply chain data stream, which contains a series of information such as price, quantity, and transaction time. In order to protect the security of this data, it is encrypted using the above steps.

[0157] Step 132, a dynamic adjustment factor D = 1.2345 is calculated and converted into a string "1.2345", which is then converted into a first byte string using UTF-8 encoding. At the same time, there is an initial key K = "SecretKey123", which is also converted into a second byte string using UTF-8 encoding.

[0158] Step 133, concatenate the first byte string and the second byte string to form a longer byte string. Then, use the SHA-256 hash function to perform a hash operation on the concatenated byte string to obtain a 256-bit hash value as a new key.

[0159] In step 134, the peanut supply chain data stream is divided into data blocks of 1024 bytes each. Then, for each data block, a new key and AES encryption algorithm are used for encryption. Finally, a string of encrypted data is obtained, which can be safely transmitted or stored in an untrusted environment. Through this case, we can see how to use the dynamic adjustment factor and the initial key to generate a new key and use this new key to encrypt the peanut supply chain data stream. This method provides strong data protection capabilities and ensures data security and privacy.

[0160] In a preferred embodiment of the present invention, the above step 14, dynamically adjusting the logistics distribution route according to the encrypted data to obtain the final distribution route, may include:

[0161] Step 141, decrypting the encrypted data to obtain original supply chain data;

[0162] Step 142, parsing the raw supply chain data into structured information, including order details, inventory status, and transportation requirements;

[0163] Step 143, filtering out key information related to the logistics delivery route from the structured information, the key information including the shipping location, destination, cargo volume and delivery time requirements;

[0164] Step 144, obtaining a pre-planned logistics distribution route, and evaluating the current distribution route based on the key information to obtain an evaluation result;

[0165] Step 145, analyzing the evaluation results, and initializing the pheromone matrix according to the nodes and paths of the logistics distribution network to represent the pheromone concentration on each path;

[0166] Step 146, randomly selecting a starting delivery node for each ant, and each ant determines the next node to be visited according to probability based on the pheromone concentration and heuristic information of the nodes around the current position;

[0167] Step 147, during the movement of the ants, the pheromones of the paths they pass through are locally updated. After all the ants complete a path search, the global pheromones are updated according to the path length and quality of each ant. The ant path selection and pheromone update process is repeated until the preset number of iterations is reached to obtain the final delivery route.

[0168] In the embodiment of the present invention, the original supply chain data is obtained by decrypting the encrypted data, thereby ensuring the security of the data during transmission and processing. This encryption-decryption process effectively prevents data leakage or malicious tampering, and provides the first layer of security for logistics distribution. The original supply chain data is parsed into structured information, making subsequent data processing and analysis more efficient and accurate. Structured information is easier to be understood and operated by computer systems, thereby improving the intelligence level of the entire logistics distribution system. By screening key information related to the logistics distribution route and evaluating it in combination with the pre-planned logistics distribution route, the system can flexibly adjust the distribution route according to actual conditions. This dynamic adjustment mechanism ensures the efficiency and real-time performance of logistics distribution and effectively responds to various emergencies in the supply chain. By introducing the ant colony algorithm, the system can intelligently search and optimize the distribution path. Each ant selects a path based on the pheromone concentration and heuristic information. This self-organizing behavior helps to find the optimal or approximately optimal distribution route, thereby saving transportation costs and time and optimizing resource allocation. During the movement of the ants, the pheromones are locally and globally updated on the path passed. Through multiple iterations, the system can adaptively learn the best distribution route. This self-learning capability enables the system to continuously optimize its performance when faced with complex and changing logistics and distribution needs.

[0169] When applied specifically, the following steps are included:

[0170] Step 141, obtain the key for decryption, which is the hash value previously generated by the dynamic adjustment factor and the initial key (as described in step 133); use the same decryption algorithm as encryption (such as AES decryption), take the encrypted data as input, and the key as a parameter to perform the decryption operation. After decryption, the system should verify the integrity and authenticity of the data, which can usually be achieved through hash verification and other methods; after decryption and verification, output the original supply chain data for use in subsequent steps.

[0171] Step 142, according to the original format of the data (such as JSON, XML, etc.), parse out information such as order details, inventory status and transportation requirements, clean the parsed data, and remove invalid or erroneous data items; represent the cleaned data in a structured form (such as a database table, object array, etc.) for subsequent processing.

[0172] Step 143, according to the predefined field list or rules, filter out the fields related to the logistics distribution route from the structured information, such as the shipping location, destination, cargo quantity and delivery time requirements, etc., extract specific values ​​from the filtered fields, and form a key information set.

[0173] Step 144, obtain the pre-planned logistics delivery route from the database or configuration file; based on key information (such as cargo volume, delivery time requirements, etc.), evaluate whether the current delivery route meets the requirements through an evaluation formula. The evaluation may include calculating transportation time, cost, capacity restrictions, etc. The evaluation formula is:

[0174]

[0175] Among them, w t represents weight; T max Indicates the maximum allowed transportation time; T act Indicates the actual transportation time; w c Represents weight; C bud represents the budget cost, which is the cost budget set to complete the delivery task; C act represents the actual cost, which is the sum of all relevant costs estimated based on the current delivery route; w v represents weight; V tot V represents the total vehicle capacity, the total cargo capacity of all vehicles involved in the delivery; req It represents the required quantity of goods, which is the total amount of goods required to be transported for the current order or delivery task; R represents the evaluation result.

[0176] Step 145, analyze the evaluation result R, determine whether it is necessary to adjust the distribution route, nodes in the logistics distribution network (such as warehouses, sorting centers, distribution stations, etc.) and paths; assign an initial pheromone concentration value to each path, usually this value can be the same, indicating that all paths are treated equally at the beginning.

[0177] Step 146, assign a random starting distribution node to each ant according to the preset number of ants; calculate the probability of the ant selecting the next node according to the pheromone concentration and heuristic information (such as distance, transportation cost, etc.) of the nodes around the current location; and randomly select a next node to be visited for each ant according to the calculated probability. The probability calculation formula is:

[0178]

[0179] Among them, τ ij (t) represents the pheromone concentration on path (i, j) at time t; represents the pheromone concentration on the path (i, k4) at time t; η ij (t) and represents the heuristic information, which can be the inverse of the distance or the inverse of the transportation cost. For example, if distance is considered as the heuristic information, then Among them, d ij is the distance between the current node i and the next node j; α3 is the pheromone heuristic factor; β3 is the expected heuristic factor; allowed i represents the set of nodes that can be directly reached from node i (i.e., the set of feasible nodes for the ant to reach next); i represents the current node i where the ant is located. The ant starts from the starting node and moves to the target node step by step. j represents the next node that the ant may choose to go to from the current node i; k4 is used in the summation formula to represent all possible next nodes of the current node i (i.e., the set of nodes that the ant can directly reach from node i). i The summation operation traverses all nodes in this set, calculates the numerator of the transition probability from node i to each node k4, and adds them together to get the denominator. In this way, P in the formula ij represents the relative probability of the ant transferring from the current node i to the node j.

[0180] Step 147, during the movement of the ants, the pheromones on the path they pass through are locally updated to increase the probability that the path will be selected by subsequent ants; after all ants complete a path search, the global pheromones are updated according to the path length and quality (such as cost, time, etc.) of each ant. The shorter the path and the higher the quality of the ant, the more pheromones it releases; the ant path selection and pheromone update process is repeated until the preset number of iterations is reached. Among them, during the movement of the ants, each time an ant moves from node i to node j, the pheromones on the path (i, j) it passes through are locally updated. The purpose of the local update is to increase the probability that the path will be selected by subsequent ants, while avoiding the algorithm from falling into a local optimum due to the excessive accumulation of pheromones. The local update uses the following formula:

[0181] τ ij (t)←(1-ζ)×τ ij (t)+×Δτ ij ;

[0182] Among them, τ ij (t) represents the pheromone concentration on the path (i, j) at time t; ζ (0<ζ≤1) is the local volatility coefficient of the pheromone, which is used to control the volatility of the pheromone. Δτ ij is the increment of pheromone released by ants on the path (i, j), which can be a fixed value. After all ants have completed a path search (i.e., each ant has built a complete solution), the global pheromone is updated according to the path length and quality (such as cost, time, etc.) of each ant. Ants with shorter paths and higher quality release more pheromones, thereby attracting more ants to choose this path. The global update uses the following formula:

[0183] τ ij (t+n)←(1-)×τ ij (t)+τ ij ;

[0184] Where t+n represents the new time after the global update; n is used to indicate the time point when the global pheromone update occurs; ρ (0<ρ<1) is the global volatility coefficient of pheromone; Δτ ijIt is the sum of the pheromone increments released by all ants on the path (i, j) in this iteration. It can be weighted according to the path quality of different ants, for example, using the inverse of the path length or cost constructed by the ant as the weight. The ant path selection and pheromone update process is repeated until the preset number of iterations or other stop conditions are reached. In each iteration, the ant will select a path based on the current pheromone distribution and heuristic information, and release pheromones to update the global pheromone after completing the path search. As the iteration proceeds, the pheromone distribution will gradually converge to a better path, thereby guiding the ants to find the approximate optimal solution or optimal solution to the problem.

[0185] For example, a peanut supply chain company needs to optimize the logistics delivery route from farms to distributors. Currently, there are two pre-planned routes to choose from, but due to factors such as traffic conditions and weather changes, the delivery route needs to be adjusted dynamically. The system obtains the encrypted supply chain data and decrypts it using the dynamically generated key to obtain the original data containing order details, inventory status, and transportation requirements. The system parses the original data and extracts key information such as the shipping location (farm A), destination (distributor B), cargo volume (10 tons), and delivery time requirements (within 24 hours). The system obtains two pre-planned delivery routes and evaluates the feasibility of the two routes based on the key information. Subsequently, the pheromone matrix is ​​initialized and the same pheromone concentration is assigned to the two routes. The system starts the ant colony algorithm, randomly selects a starting node (such as farm A) for each ant, and selects the next node based on the pheromone concentration and heuristic information (such as distance, traffic conditions, etc.). The pheromone is locally updated during the movement of the ants, and globally updated after all ants have completed a search. The system repeats the ant's path selection and pheromone update process. After multiple iterations, it is found that one of the routes (passing through a sorting center and then reaching distributor B) is better than the other route in terms of transportation time and cost. Therefore, the system determines this route as the final delivery route. The system executes the delivery task according to the optimized delivery route and monitors the transportation status in real time during the delivery process to ensure that the delivery task is completed on time and in quantity.

[0186] like Figure 2 As shown, an embodiment of the present invention further provides a collaborative optimization system 20 for a peanut supply chain, comprising:

[0187] The acquisition module 21 is used to build a peanut supply chain information platform based on blockchain technology, wherein the peanut supply chain information platform includes multiple nodes, each node representing a different participant in the supply chain; the key data of each link of the peanut supply chain is captured and updated in real time through the peanut supply chain information platform to obtain the peanut supply chain data flow;

[0188] The processing module 22 is used to determine the influencing factors and calculate the dynamic adjustment factors according to the influencing factors, the influencing factors include time factors, data flow and supply chain status; encrypt the peanut supply chain data stream according to the dynamic adjustment factors and the initial encryption key to obtain encrypted data; and dynamically adjust the logistics distribution route according to the encrypted data to obtain the final distribution route.

[0189] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0190] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0191] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

Claims

1. A collaborative optimization method for a peanut supply chain, characterized in that: The method comprises: Build a peanut supply chain information platform based on blockchain technology. The peanut supply chain information platform includes multiple nodes, each of which represents a different participant in the supply chain; Capture and update key data of each link of the peanut supply chain in real time through the peanut supply chain information platform to obtain the peanut supply chain data flow; Determine the influencing factors, and calculate the dynamic adjustment factors according to the influencing factors, wherein the influencing factors include time factors, data flow, and supply chain status; encrypt the peanut supply chain data flow according to the dynamic adjustment factors and the initial encryption key to obtain encrypted data; According to the encrypted data, the logistics distribution route is dynamically adjusted to obtain the final distribution route; a peanut supply chain information platform based on blockchain technology is built, including: Determine the gene encoding scheme, where each gene represents a specific transmission node, path, or related parameter in the supply chain; According to the genetic coding scheme, a series of initial configuration schemes are randomly generated, each of which represents a supply chain information platform configuration scheme; According to the initial configuration scheme, determining the evaluation function used to evaluate the performance of each supply chain information platform configuration scheme; According to the evaluation function, each individual in the initial population is evaluated to obtain an evaluation result; According to the evaluation results, determine the corresponding supply chain information platform configuration plan, and perform cross-operation to generate a new configuration plan, and repeat the steps until the preset number of iterations is reached; After the iteration, the corresponding configuration scheme is determined as the final solution; According to the final solution, a peanut supply chain information platform based on blockchain is constructed; the calculation formula of the evaluation function is: ; in, represents the total number of nodes in the supply chain; Representation Node Unit cost; Indicates that in the configuration scheme Next, through the node The amount of transmission; Indicates that in the configuration scheme Next, node processing time; Indicates the total number of known security vulnerabilities; Indicates that in the configuration scheme Next, the loophole severity score; Indicates the total number of traceability checkpoints; Indicates that in the configuration scheme Next, checkpoint Traceability score; , , and represents the weight coefficient; Indicates that for a given configuration , calculate all and find the maximum value; Determine the influencing factors and calculate the dynamic adjustment factors based on the influencing factors, including: Determine the influencing factors and Calculating Dynamic Adjustment Factors ; in, , and represents the weight coefficient; Indicates the hour of the day, representing the current time; Indicates the current data traffic; and Respectively represent the maximum and minimum values ​​of data traffic; Indicates the current order volume; and Respectively represent the maximum and minimum values ​​of the order quantity; according to the dynamic adjustment factor and the initial encryption key, the peanut supply chain data stream is encrypted to obtain encrypted data, including: The dynamic adjustment factor is converted into a first byte string; the initial key is also converted into a second byte string; Connecting the first byte string and the second byte string, and performing a hash operation on the connected first byte string and the second byte string using a hash function to obtain a new key; The peanut supply chain data stream is divided into fixed-size data blocks. For each data block in the data stream, a new key and hash function are used to encrypt it to form encrypted data. Based on the encrypted data, the logistics distribution route is dynamically adjusted to obtain the final distribution route, including: Decrypt the encrypted data to obtain the original supply chain data; Parse raw supply chain data into structured information, including order details, inventory status, and transportation requirements; Filter out key information related to logistics delivery routes from structured information, including shipping location, destination, cargo volume, and delivery time requirements; Obtain pre-planned logistics delivery routes and evaluate the current delivery routes based on key information to obtain evaluation results; Analyze the evaluation results and initialize the pheromone matrix based on the nodes and paths of the logistics distribution network to represent the pheromone concentration on each path; A starting delivery node is randomly selected for each ant, and each ant determines the next node to visit according to probability based on the pheromone concentration and heuristic information of the nodes around the current location; During the movement of ants, the pheromones of the paths they pass through are locally updated. After all ants complete a path search, the global pheromones are updated according to the length and quality of each ant's path. The ant path selection and pheromone update process is repeated until the preset number of iterations is reached to obtain the final delivery route.

2. The collaborative optimization method for the peanut supply chain according to claim 1, characterized in that: The peanut supply chain information platform captures and updates key data of each link of the peanut supply chain in real time to obtain the peanut supply chain data flow, including: After building the peanut supply chain information platform, the data is preprocessed to obtain preprocessed data; Determine the number of clusters , randomly selected from the preprocessed data points as the initial cluster centers; For each data point in the data stream, calculate the distance between it and each cluster center; Assign each data point to the corresponding cluster center to form Initial clusters; For each cluster, calculate the average value of all data points within it, use the average value as the new cluster center, and repeat the steps until the preset number of iterations is reached to obtain the clustering result; According to the clustering results, the data points in the peanut supply chain data stream are divided into different categories, each category represents a link or state in the peanut supply chain; The classified data points are sorted according to the time series to form a structured peanut supply chain data stream, which contains timestamps, data values ​​and categories.

3. A collaborative optimization system for peanut supply chain, characterized in that: include: The acquisition module is used to build a peanut supply chain information platform based on blockchain technology. The peanut supply chain information platform includes multiple nodes, each of which represents a different participant in the supply chain. The peanut supply chain information platform is used to capture and update key data of each link of the peanut supply chain in real time to obtain the peanut supply chain data flow; A processing module is used to determine influencing factors and calculate dynamic adjustment factors based on the influencing factors, including time factors, data flow and supply chain status; Encrypting the peanut supply chain data stream according to the dynamic adjustment factor and the initial encryption key to obtain encrypted data; According to the encrypted data, the logistics distribution route is dynamically adjusted to obtain the final distribution route; Build a peanut supply chain information platform based on blockchain technology, including: Determine the gene encoding scheme, where each gene represents a specific transmission node, path, or related parameter in the supply chain; According to the genetic coding scheme, a series of initial configuration schemes are randomly generated, each of which represents a supply chain information platform configuration scheme; According to the initial configuration scheme, determining the evaluation function used to evaluate the performance of each supply chain information platform configuration scheme; According to the evaluation function, each individual in the initial population is evaluated to obtain an evaluation result; According to the evaluation results, determine the corresponding supply chain information platform configuration plan, and perform cross-operation to generate a new configuration plan, and repeat the steps until the preset number of iterations is reached; After the iteration, the corresponding configuration scheme is determined as the final solution; According to the final solution, a peanut supply chain information platform based on blockchain is constructed; the calculation formula of the evaluation function is: ; in, represents the total number of nodes in the supply chain; Representation Node Unit cost; Indicates that in the configuration scheme Next, through the node The amount of transmission; Indicates that in the configuration scheme Next, node processing time; Indicates the total number of known security vulnerabilities; Indicates that in the configuration scheme Next, the loophole severity score; Indicates the total number of traceability checkpoints; Indicates that in the configuration scheme Next, checkpoint Traceability score; , , and represents the weight coefficient; Indicates that for a given configuration , calculate all and find the maximum value; Determine the influencing factors and calculate the dynamic adjustment factors based on the influencing factors, including: Determine the influencing factors and Calculating Dynamic Adjustment Factors ; in, , and represents the weight coefficient; Indicates the hour of the day, representing the current time; Indicates the current data traffic; and Respectively represent the maximum and minimum values ​​of data traffic; Indicates the current order volume; and Respectively represent the maximum and minimum values ​​of the order quantity; according to the dynamic adjustment factor and the initial encryption key, the peanut supply chain data stream is encrypted to obtain encrypted data, including: The dynamic adjustment factor is converted into a first byte string; the initial key is also converted into a second byte string; Connecting the first byte string and the second byte string, and performing a hash operation on the connected first byte string and the second byte string using a hash function to obtain a new key; The peanut supply chain data stream is divided into fixed-size data blocks. For each data block in the data stream, a new key and hash function are used to encrypt it to form encrypted data. Based on the encrypted data, the logistics distribution route is dynamically adjusted to obtain the final distribution route, including: Decrypt the encrypted data to obtain the original supply chain data; Parse raw supply chain data into structured information, including order details, inventory status, and transportation requirements; Filter out key information related to logistics delivery routes from structured information, including shipping location, destination, cargo volume, and delivery time requirements; Obtain pre-planned logistics delivery routes and evaluate the current delivery routes based on key information to obtain evaluation results; Analyze the evaluation results and initialize the pheromone matrix based on the nodes and paths of the logistics distribution network to represent the pheromone concentration on each path; A starting delivery node is randomly selected for each ant, and each ant determines the next node to visit according to probability based on the pheromone concentration and heuristic information of the nodes around the current location; During the movement of ants, the pheromones of the paths they pass through are locally updated. After all ants complete a path search, the global pheromones are updated according to the length and quality of each ant's path. The ant path selection and pheromone update process is repeated until the preset number of iterations is reached to obtain the final delivery route.

4. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Agricultural product whole-process supply chain logistics platform and distribution method

    CN110163550A

  • Rural breeding industry supply chain management system based on block chain

    CN113763199A