Supply chain collaborative optimization method and system based on Internet of Things data and knowledge base RAG

By constructing a vector knowledge base and a RAG mechanism, abnormal data is identified to generate collaborative requests and direct and indirect collaborative strategies. This solves the real-time and accuracy problems of supply chain collaborative optimization in existing technologies and realizes adaptive optimization of the supply chain.

CN122019593APending Publication Date: 2026-05-12XINQI ARTIFICIAL INTELLIGENCE TECHNOLOGY (JIANGSU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINQI ARTIFICIAL INTELLIGENCE TECHNOLOGY (JIANGSU) CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

When optimizing supply chain collaboration, existing technologies cannot be targeted at specific technologies within the supply chain, nor can they effectively adapt to real-time and historical data for adaptive collaborative optimization, resulting in insufficient targeting and accuracy of collaborative strategies.

Method used

By constructing a vector knowledge base, utilizing the BERT model and cosine similarity algorithm, abnormal data is identified and collaborative requests are generated. Combined with the RAG mechanism and supply chain simulation model, direct and indirect collaborative strategies are generated to achieve adaptive optimization of the supply chain.

Benefits of technology

It achieves real-time and precise supply chain collaborative optimization, and can generate targeted collaborative strategies based on real-time and historical data, thereby improving the collaborative optimization effect of the supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019593A_ABST
    Figure CN122019593A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data retrieval, and discloses a supply chain collaborative optimization method and system based on Internet of Things data and a knowledge base RAG. Comprising the following steps: S1, constructing a vector knowledge base from multi-source historical data; s2, generating a cooperation request; s3, retrieving a target case from the vector knowledge base, and dividing the target case into a direct association case and an indirect association case; s4, generating a direct cooperation strategy; s5, fusing the direct collaboration strategy and the indirect collaboration strategy into a combined collaboration strategy; according to the method, the interactive directional retrieval effect between real-time data and historical data can be achieved, it is ensured that follow-up collaborative optimization strategy measures can have the basis, meanwhile, barriers between different data cases are broken through, the output logic is generated in combination with the direct collaborative strategy and the combined collaborative strategy in a self-adaptive mode, and the method is suitable for large-scale popularization and application. A targeted collaborative optimization strategy can be provided for collaborative optimization of different requirements in the supply chain, and high-quality collaborative optimization operation of the supply chain is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data retrieval technology, and more specifically, to a supply chain collaborative optimization method and system based on Internet of Things data and the knowledge base RAG. Background Technology

[0002] In the process of enterprise production, sales and supply, supply chain collaborative optimization is the key to improving the overall operational efficiency of enterprises, reducing costs and enhancing competitiveness. Traditional supply chain collaborative optimization relies on preset static models or decisions based on recent human experience. Therefore, when faced with real-time dynamic changes in data, it is impossible to provide effective and accurate collaborative optimization strategies for the enterprise supply chain. Therefore, it is necessary to combine the knowledge base RAG for supply chain collaborative optimization.

[0003] Referring to patent application CN120374011A, a smart logistics and supply chain collaborative management method based on the Internet of Things is disclosed. The method includes: first, collecting multi-source data related to logistics in the transportation and warehousing stages; second, performing format conversion and anomaly detection on the received multi-source data at edge computing nodes; third, performing fusion calculations on key state variables of the logistics system to generate structured data; fourth, calculating the optimal transportation route using path planning methods and transmitting the optimized scheduling plan to the intelligent decision-making system for execution; fifth, dynamically adjusting transportation strategies, inventory replenishment plans, and warehousing management schemes; and sixth, executing the logistics scheduling and inventory management strategies generated by the intelligent decision-making system at each node of the supply chain. Existing supply chains typically offer only one or a few fixed collaboration strategies during collaborative optimization. They cannot adaptively provide specific solutions at different dimensions and levels based on the specific characteristics and optimization needs of collaboration requests built in real time within the supply chain. This results in poor demand adaptability of the provided collaboration strategies or ineffective execution of collaborative optimization. They cannot specifically meet the local, small-scale direct collaboration needs and the large-scale combined collaboration needs of multiple parties during collaborative optimization. Consequently, the collaboration strategies ultimately provided to the supply chain are not targeted enough or accurate enough, and cannot guarantee high-quality collaborative optimization operations of the supply chain.

[0004] In view of this, the present invention proposes a supply chain collaborative optimization method and system based on IoT data and the knowledge base RAG to solve the above problems. Summary of the Invention

[0005] To overcome the aforementioned shortcomings of existing technologies and achieve the above objectives, this invention provides the following technical solution: a supply chain collaborative optimization method based on IoT data and the knowledge base RAG, comprising: S1: Combine multi-source historical data in the supply chain into collaborative cases, aggregate similar collaborative cases into case groups, and build a vector knowledge base that matches the case groups. Multi-source historical data includes IoT data, enterprise supply data, and industry market data. S2: Collect real-time IoT data, identify abnormal data from the real-time IoT data, analyze and interpret the abnormal data, and generate collaborative requests. S3: Based on the case similarity retrieval criterion, retrieve target cases that match the collaborative request from the vector knowledge base, and classify the target cases into directly related cases and indirectly related cases according to the case similarity value of the target cases; S4: Under the constraints of the RAG mechanism, import the directly related cases and collaboration requests into the strategy optimization model, generate a direct collaboration strategy that directly adapts to the collaboration request, and simulate the direct collaboration strategy through the supply simulation model to determine whether to output the direct collaboration strategy; if the direct collaboration strategy is output, end; if the direct collaboration strategy is not output, execute S5. S5: Import indirect association cases and collaboration requests into the strategy optimization model to generate indirect collaboration strategies that are indirectly adapted to the collaboration requests. Then, merge the direct collaboration strategies and indirect collaboration strategies to generate a combined collaboration strategy.

[0006] Furthermore, collaborative cases consist of causal elements and consequential elements; When combining collaborative cases, the IoT data is compared with the corresponding standard data for consistency, and IoT data that is inconsistent with the standard data is recorded as abnormal data. The abnormal data is subtracted from the corresponding standard data to calculate the abnormal difference value. Then, in descending order of the abnormal difference value, enterprise supply data and industry market data with the same supply attributes as the abnormal data are identified and recorded as the solution data. The abnormal data and the resolution data are respectively recorded as the antecedent element and the consequence element. The antecedent element is combined with the corresponding consequence element to generate A collaborative cases.

[0007] Furthermore, the method for summarizing the case groups is as follows: A1: Query the case semantics of the antecedent elements in A collaborative cases one by one, convert the A case semantics into A semantic vectors through the BERT model, and randomly select a semantic vector as the base vector; A2: The cosine similarity algorithm is used to calculate the cosine values ​​of the base vector and the remaining A-1 semantic vectors in sequence, and the semantic vectors with cosine values ​​greater than the calibration threshold are matched with the base vector to obtain vector combinations; A3: Randomly select a semantic vector from the remaining semantic vectors as the base vector, and repeat step A2 until all semantic vectors are matched to obtain B vector combinations; A4: After summarizing the collaborative cases corresponding to the semantic vectors in the B vector combinations, we obtain B case groups.

[0008] Furthermore, the method for constructing a vector knowledge base is as follows: The BERT model is used to convert all collaborative cases into knowledge vectors, and the knowledge vectors in the same case group are aggregated to obtain B case vectors. Construct a knowledge base with B basic levels, and annotate the B case vectors one by one on the B levels to promote the transformation of the basic levels into vector levels. By establishing annotation units at each of the B vector levels and importing the baseline vectors corresponding to the case vectors into the annotation units, a multi-level vector knowledge base is constructed.

[0009] Furthermore, the method for generating collaborative requests is as follows: All the abnormal data were analyzed one by one using natural language processing technology, and the analysis results were interpreted to obtain C abnormal interpretations. According to the order of supply chain delivery, the C abnormal interpretations are sorted in sequence to generate an interpretation queue. The interpretation queue is then input into the request analysis model, which outputs related word groups with added position labels. Based on the addition of location annotations, corresponding related phrases are added between two adjacent exception definitions, and a request prequence is added before the first exception definition and a request postquence is added after the last exception definition to construct a collaborative request.

[0010] Furthermore, the case similarity retrieval criterion is: first, retrieve based on similarity, and then retrieve based on real-time performance; The method for retrieving the target case is as follows: The C anomaly interpretations in the collaborative request are converted into anomaly vectors using the BERT model. The cosine similarity algorithm is then used to calculate the cosine values ​​of the C anomaly vectors and the semantic vectors in the collaborative case, thus obtaining the C first similarity values. C collaborative cases in which the first similarity value is greater than the calibration similarity threshold are recorded as valid cases, and D valid cases are obtained. The time of the last amendment to the policy and regulations and the time of the generation of D valid cases are retrieved from the industry market data to obtain the time of policy change and the time of D case record. Valid cases whose case recording time is earlier than the time of policy change are removed, and the remaining valid cases are recorded as target cases, resulting in E target cases.

[0011] Furthermore, the method for distinguishing between directly related cases and indirectly related cases is as follows: The maximum and minimum values ​​of the first similarity values ​​of the E target cases are added together and averaged to calculate the similarity value of the E cases. The average of the case similarity values ​​of the E valid cases is then calculated. Target cases with a similarity value greater than or equal to the mean similarity value are recorded as cases to be verified, and the number of cases to be verified is counted. When the number of cases to be verified is greater than or equal to one-third of the number of target cases, the cases to be verified are recorded as directly related cases, and the remaining target cases are recorded as indirectly related cases. When the number of cases to be verified is less than one-third of the number of target cases, the similarity mean is continuously reduced by 5% of the similarity mean, and the number of cases to be verified after reduction is counted until the number of cases to be verified after reduction is greater than or equal to one-third of the number of target cases. The cases to be verified after reduction are recorded as directly related cases, and the remaining target cases are recorded as indirectly related cases.

[0012] Furthermore, the RAG mechanism stipulates that the collaboration authority of the direct collaboration strategy shall not exceed the supply authority of the supply chain; The method for determining whether to output a direct cooperation strategy is as follows: Based on real-time IoT data, a supply simulation model matching the supply chain is constructed using digital mirroring technology; In the supply simulation model, a first simulation bit and a second simulation bit are set. Real-time enterprise supply data and real-time industry market data are imported into the first simulation bit and the second simulation bit respectively, and the supply permissions of the supply simulation model are set. Natural language processing technology is used to identify the collaboration parameters in the direct collaboration strategy, and the IoT data corresponding to the collaboration parameters is adjusted to drive the supply simulation model to run. After all the collaborative parameters have been simulated and run, the cost index, time index and stability index of the supply simulation model are retrieved respectively. Then, the cost reduction index, efficiency index and stability index are assigned different proportional coefficients and added together to calculate the strategy reliability index. When the policy reliability index is greater than or equal to the policy reliability threshold, the direct collaborative policy is determined and output. When the policy reliability index is less than the policy reliability threshold, it is determined that no direct collaborative policy will be output.

[0013] Furthermore, the method for generating combined collaborative strategies is as follows: The collaboration parameters in the indirect collaboration strategy are identified by natural language processing technology. The same collaboration parameters in the direct collaboration strategy and the indirect collaboration strategy are recorded as repeated parameters. After summarizing the same repeated parameters, F parameter sets are obtained. Query the adjustment range of IoT data corresponding to the duplicate parameters in the F parameter sets one by one, and remove the duplicate parameters in the F parameter sets except for the maximum value of the adjustment range. Different collaboration parameters in the direct and indirect collaboration strategies are recorded as added parameters. All added parameters are added to the direct collaboration strategy according to the order of supply chain delivery to generate a combined collaboration strategy.

[0014] The supply chain collaborative optimization system based on IoT data and the knowledge base RAG is used to realize the supply chain collaborative optimization method based on IoT data and the knowledge base RAG. It includes a knowledge base construction module, a request generation module, a case screening module, a first strategy module, and a second strategy module. The modules are connected to each other via wired or wireless networks. The knowledge base construction module is used to combine multi-source historical data in the supply chain into collaborative cases, aggregate similar collaborative cases into case groups, and build a vector knowledge base that matches the case groups. The request generation module is used to collect real-time IoT data, identify abnormal data from the real-time IoT data, parse and interpret the abnormal data, and then generate collaborative requests. The case filtering module is used to retrieve target cases that match the collaborative request from the vector knowledge base based on the case similarity retrieval criteria, and to classify the target cases into directly related cases and indirectly related cases according to the case similarity value of the target cases; The first strategy module is used to import directly related cases and collaboration requests into the strategy optimization model under the constraints of the RAG mechanism, generate direct collaboration strategies that are directly adapted to the collaboration requests, and simulate the direct collaboration strategies through the supply simulation model to determine whether to output the direct collaboration strategies. The second strategy module is used to import indirect association cases and collaboration requests into the strategy optimization model when no direct collaboration strategy is output. It generates indirect collaboration strategies that are indirectly adapted to the collaboration requests, and merges the direct and indirect collaboration strategies to generate a combined collaboration strategy.

[0015] The technical effects of this invention on the supply chain collaborative optimization method and system based on IoT data and the RAG knowledge base are as follows: (1): This invention combines multi-source historical data into a vector database containing a large number of collaborative cases, which can form a collaborative case with reference significance from the specific collaborative optimization schemes of the supply chain in historical periods. By converting real-time supply chain data into collaborative requests, the collaborative requests can serve as an accurate basis for retrieving target cases from the collaborative cases. This enables interactive and directional retrieval between real-time data and historical data, ensuring that subsequent collaborative optimization strategies and measures are based on evidence. It also breaks down the barriers between different data cases, avoids the disconnect between real-time data and historical data, and improves the interactivity between data of all parties in the supply chain.

[0016] (2): By restricting the RAG mechanism, this invention can provide an accurate permission basis for subsequent supply optimization strategies, avoiding the phenomenon that the collaborative optimization strategy cannot be executed due to exceeding the limit. At the same time, the operation of distinguishing target cases can combine the collaborative optimization strategies of the supply chain from two dimensions of direct and indirect association. Through the adaptive generation output logic of direct collaborative strategy and combined collaborative strategy, it can provide targeted collaborative optimization strategies for different needs in the supply chain, thereby ensuring high-quality collaborative optimization operations of the supply chain. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the supply chain collaborative optimization method based on IoT data and the knowledge base RAG provided in Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the supply chain collaborative optimization system based on IoT data and knowledge base RAG provided in Embodiment 2 of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Example 1: Please refer to Figure 1 As shown in this embodiment, the supply chain collaborative optimization method based on IoT data and the knowledge base RAG includes: S1: Combine multi-source historical data of various supply roles in the supply chain into collaborative cases, summarize collaborative cases into case groups, and build a multi-level vector knowledge base; The supply chain includes multiple supply roles that play different functions. Through the joint efforts of these multiple supply roles, the entire supply chain process can be operated. Specifically, supply roles include, but are not limited to, suppliers, manufacturers, logistics providers, and distributors.

[0020] Multi-source historical data refers to different types of IoT data generated by various supply roles in the supply chain during historical periods, as well as enterprise and industry data that can affect supply chain collaborative optimization. In this embodiment, multi-source historical data includes IoT data, enterprise supply data, and industry market data. IoT data refers to data from various sensors that participate in supply chain collaboration within a historical timeframe, and serves as the basic data for optimizing supply chain collaboration. Specifically, IoT data includes, but is not limited to, raw material supply, storage temperature, and transportation routes.

[0021] Enterprise supply data refers to the internal data of enterprises that participate in supply chain collaboration within a historical period. Specifically, enterprise supply data includes, but is not limited to, historical orders, production rules, and product evaluation standards.

[0022] Industry market data refers to data on industry norms and market changes in which supply roles participate in supply chain collaboration over a historical period. Specifically, industry market data includes, but is not limited to, market demand forecasts, policies and regulations, and logistics networks.

[0023] After obtaining multi-source historical data, the data is in a discrete state, and the different data cannot be effectively correlated and combined. Therefore, it cannot provide a complete reference for subsequent supply chain collaborative optimization. Thus, it is necessary to combine the discrete multi-source historical data to provide reference and comparative collaborative cases for subsequent supply chain collaborative optimization. In this embodiment, a collaborative case consists of antecedent elements and consequent elements; the antecedent elements refer to the actual problems to be solved during collaborative optimization, and the consequent elements refer to the corresponding solutions to the actual problems during collaborative optimization.

[0024] Specifically, when combining multi-source historical data into collaborative cases, firstly, the collected IoT data is compared with the corresponding standard data in the database for consistency, and inconsistent IoT data is recorded as abnormal data, resulting in A abnormal data. Then, the abnormal data is compared with the corresponding standard data to calculate the abnormal difference value, and all abnormal data are arranged in descending order of abnormal difference value to obtain an abnormal queue. Next, according to the abnormal queue from front to back, enterprise supply data and industry market data with the same supply attributes as the abnormal data are identified in sequence to obtain A solution data. Finally, the A abnormal data and A solution data are recorded as antecedent elements and consequence elements, respectively, and the antecedent elements are combined with the corresponding consequence elements in sequence to generate A collaborative cases.

[0025] In this embodiment, the supply attribute is used to represent the specific functions that IoT data, enterprise supply data, and industry market data play in the collaborative optimization of the enterprise supply chain. This allows multi-source historical data that perform the same function to be effectively bound together and provides two independent parts for the construction of subsequent collaborative cases.

[0026] After being combined into collaborative cases, each collaborative case can only solve the actual problem corresponding to one abnormal data. In order to connect multiple collaborative cases that solve related actual problems, it is necessary to summarize collaborative cases that can solve the same actual problem or whose actual problems are related, thereby forming a case group. Specifically, the method for summarizing the case studies is as follows: A1: Query the case semantics of the antecedent elements in A collaborative cases one by one, convert the A case semantics into A semantic vectors through the BERT model, and randomly select a semantic vector as the base vector; the BERT model in this embodiment is a pre-trained model, which enables the BERT model to convert the case semantics of each collaborative case into a high-dimensional vector. A2: The cosine similarity algorithm is used to calculate the cosine values ​​of the remaining A-1 semantic vectors and the reference vector in turn. Semantic vectors with cosine values ​​greater than the calibration threshold are matched with the reference vector to obtain vector combinations. The calibration threshold is used to limit the minimum cosine value of semantic vectors in any collaborative case in the same case group, which can ensure that all collaborative cases in the same case group have a certain degree of similarity. A3: Randomly select a semantic vector from the remaining semantic vectors as the base vector, and repeat step A2 until all semantic vectors are matched to obtain B vector combinations; A4: After summarizing the collaborative cases corresponding to the semantic vectors in the B vector combinations, we obtain B case groups.

[0027] It should be noted that the number of collaborative cases in each case group is not the same, and the minimum number of collaborative cases in a case group is 1, and the maximum number is A.

[0028] After obtaining the case sets, it is necessary to aggregate and integrate multiple case sets to maintain an aggregated state, which facilitates subsequent management and retrieval. Therefore, it is necessary to build a vector knowledge base to store and manage multiple case sets. In this embodiment, the vector knowledge base is a database used to store multiple different case groups and to quantitatively manage the case groups, thereby facilitating the subsequent retrieval and query of collaborative cases in different case groups; Specifically, the method for constructing a vector knowledge base is as follows: The BERT model is used to convert all collaborative cases into knowledge vectors, and the knowledge vectors in the same case group are aggregated to obtain B case vectors. A knowledge base with B hierarchical levels is constructed. B case vectors are annotated on B levels one by one, which causes the basic level to be converted into a vector level. The basic level is the library structure of the knowledge base, which enables the knowledge base to maintain multiple different levels of library structure and provides an independent import position for each case group. By establishing annotation units at each of the B vector levels and importing the baseline vectors corresponding to the case vectors into the annotation units, a multi-level vector knowledge base is constructed.

[0029] S2: Collect real-time IoT data from the supply chain, identify abnormal data from the real-time IoT data, and generate a collaboration request after parsing and interpreting the abnormal data. Real-time IoT data refers to the IoT data collected by various supply roles in the supply chain through sensors at the current moment. When the real-time IoT data fluctuates beyond the safe range, it indicates that there is an abnormal phenomenon in the relevant process in the supply chain corresponding to the IoT data. At this time, the collaborative operation of the supply chain has become uncontrollable, and it is necessary to identify the abnormal data that affects the collaborative operation of the supply chain. For example, when the real-time IoT data is the storage temperature, and the standard data for the storage temperature is 12.5°C-15.5°C, if the real-time storage temperature is 15.8°C, then the storage temperature will be identified as abnormal data.

[0030] After identifying abnormal data from real-time IoT data, it is necessary to analyze and interpret all abnormal data, extract the specific content in the abnormal data that affects the coordinated operation of the supply chain, and generate corresponding coordination requests based on the analysis and interpretation. In this embodiment, the collaboration request is a request constructed based on the true meaning and content of the abnormal data, used to provide a retrieval basis for supply chain collaboration optimization.

[0031] Specifically, the method for generating collaborative requests is as follows: All the abnormal data were analyzed one by one using natural language processing technology, and the analysis results were interpreted to obtain C abnormal interpretations. According to the order of supply chain delivery, sort the C exception interpretations in sequence to generate an interpretation queue; The definition queue is input into the trained request analysis model, and the output is related word groups with added position labels; Based on the added position markers, corresponding related phrases are added between two adjacent exception definitions. A request preorder is added before the first exception definition, and a request postorder is added after the last exception definition to construct a collaborative request. The request preorder and request postorder are the basic format for constructing a collaborative request, ensuring that the collaborative request maintains its integrity.

[0032] It should be noted that a collaboration request typically contains only one major category of supply chain collaboration dimension, and the major category of supply chain collaboration dimension is determined by the exception remarks; for example, when the exception remarks are temperature, the supply chain collaboration dimension corresponding to the collaboration request is temperature. In this embodiment, the request analysis model is a pre-trained large language model, which enables the request analysis model to accurately read the true meaning of the definition queue and output word phrases that match the abnormal definitions based on the true meaning, namely: related word phrases. At the same time, the output related word phrases also have positional notes, which can provide a limitation on the position to be added for the subsequent combination of related word phrases and multiple abnormal definitions.

[0033] S3: Based on the case similarity retrieval criterion, retrieve target cases that match the collaborative request from the vector knowledge base, and divide the target cases into directly related cases and indirectly related cases; Once a collaboration request is constructed, it can serve as a direct basis for matching and retrieving collaboration cases within the vector knowledge base. This allows for the rapid, accurate, and comprehensive retrieval of target cases that effectively match the collaboration request's corresponding supply chain anomalies, providing a foundation for subsequent final decisions on supply chain collaboration optimization. Specifically, a target case refers to a collaborative case within the vector knowledge base whose similarity to the collaborative request exceeds the lower limit of the matching threshold.

[0034] When retrieving target cases from a vector knowledge base, it is necessary to combine case similarity retrieval criteria. In this embodiment, the case similarity retrieval criterion is: first, retrieve based on similarity, and then retrieve based on real-time performance; this ensures that the retrieved target cases can meet the matching retrieval requirements of the collaborative request in terms of both similarity and real-time performance.

[0035] The method for retrieving the target case is as follows: The C anomaly interpretations in the collaborative request are converted into anomaly vectors using the BERT model. The cosine similarity algorithm is then used to calculate the cosine values ​​of the C anomaly vectors and the semantic vectors in the collaborative case, thus obtaining the C first similarity values. C collaborative cases whose first similarity values ​​are all greater than the calibration similarity threshold are recorded as valid cases, resulting in D valid cases. The calibration similarity threshold is the minimum cosine value when the collaborative request and the collaborative case are similar, thus providing a specific numerical basis for selecting valid cases. The calibration similarity threshold is set according to actual needs; for example, the calibration similarity threshold is 75%. The time of the last amendment to the policy and regulations and the time of the generation of D valid cases are retrieved from the industry market data to obtain the time of policy change and the time of D case record. Valid cases whose case recording time is earlier than the time of policy change are removed, and the remaining valid cases are recorded as target cases, resulting in E target cases.

[0036] It should be noted that the retrieved E target cases can ensure a good match with the collaborative request in terms of both similarity and real-time performance, and provide a comprehensive and accurate case basis for the effective resolution of subsequent collaborative requests.

[0037] After obtaining the target case, the specific numerical value of the matching similarity between the target case and the collaboration request will vary, resulting in inconsistent matching similarity between each target case and the collaboration request. In order to improve the accuracy of formulating the collaboration optimization strategy corresponding to the subsequent collaboration request, and at the same time reduce the efficiency of target case analysis and calculation, it is necessary to distinguish the target cases and classify them into directly related cases with high matching similarity and indirectly related cases with low matching similarity. Specifically, the method for distinguishing between directly related cases and indirectly related cases is as follows: The maximum and minimum values ​​of the first similarity values ​​of the E target cases are added together and then averaged to calculate the similarity value of the E cases. The formula for calculating the case similarity value is: ; In the formula, For case similarity values, The maximum value of the first similarity value of the target case. The minimum value of the first similarity value of the target case; The average similarity score is calculated by summing the similarity scores of the E valid cases. The formula for calculating the similarity mean is: ; In the formula, For similar means, For the first Case similarity values ​​for each target case; Target cases with a similarity value greater than or equal to the mean similarity value are recorded as cases to be verified, and the number of cases to be verified is counted. When the number of cases to be verified is greater than or equal to one-third of the number of target cases, the cases to be verified are recorded as directly related cases, and the remaining target cases are recorded as indirectly related cases. When the number of cases to be verified is less than one-third of the number of target cases, the similarity mean is continuously reduced by 5% of the similarity mean, and the number of cases to be verified after reduction is counted until the number of cases to be verified after reduction is greater than or equal to one-third of the number of target cases. The cases to be verified after reduction are recorded as directly related cases, and the remaining target cases are recorded as indirectly related cases.

[0038] It should be noted that when dividing the target cases into directly related cases and indirectly related cases, in order to ensure that the number of directly related cases remains reasonable and sufficient, it is necessary to ensure that the number of directly related cases reaches more than one-third of the total number of target cases, so as to provide a more comprehensive case basis for the specific solutions and strategies for subsequent supply chain collaborative optimization.

[0039] S4: Under the constraints of the RAG mechanism, import directly related cases and collaboration requests into the strategy optimization model, generate direct collaboration strategies that are directly adapted to the collaboration requests, optimize and parse the direct collaboration strategies, and determine whether to output the direct collaboration strategy. Once the directly related cases are obtained, they can be used as a basis for the direct collaboration strategy of subsequent supply chain collaboration optimization, so that the direct collaboration strategy can serve as a specific solution and measure that is directly adapted to the collaboration request to meet the direct needs of supply chain collaboration optimization. When constructing direct collaboration strategies from directly related cases, the construction process of direct collaboration strategies needs to be limited based on the RAG mechanism to ensure that the constructed direct collaboration strategies can maintain an excellent matching effect with the collaboration requests. Specifically, the RAG mechanism ensures that the collaboration authority of the direct collaboration strategy does not exceed the supply authority of the supply chain, and that the constructed direct collaboration strategy can be implemented in an orderly and comprehensive manner across all supply roles in the supply chain.

[0040] When generating direct collaboration strategies through direct association cases, it is necessary to use a strategy optimization model to assist in ensuring that the direct collaboration strategy can match the supply anomalies corresponding to the collaboration request. In this embodiment, the strategy optimization model is based on collaborative requests. It extracts and analyzes direct collaborative strategies from imported target cases to solve the problem of timely response to collaborative requests. To obtain the strategy optimization model, a large language model is continuously iterated and optimized by taking a large number of collaborative requests and corresponding directly related cases as input data and direct collaborative strategies as output data.

[0041] The generated direct collaboration strategy can only provide corresponding specific measures for supply chain collaboration optimization from the perspective of directly related cases. In this case, two situations may occur: First, the direct collaboration strategy can be adapted to the collaboration request and meet the needs of supply chain collaboration optimization; Second, the direct collaboration strategy cannot be adapted to the collaboration request and cannot meet the needs of supply chain collaboration optimization. In the first scenario, the direct collaboration strategy can be output externally as a guide for supply chain collaboration optimization. In the second scenario, the direct system strategy cannot be output externally. Therefore, it is necessary to determine whether the direct collaboration strategy should be output externally. Specifically, the method for determining whether to output a direct collaborative strategy is as follows: Based on real-time IoT data, a supply simulation model matching the supply chain is constructed using digital mirroring technology; In the supply simulation model, a first simulation bit and a second simulation bit are set. Real-time enterprise supply data and real-time industry market data are imported into the first simulation bit and the second simulation bit, respectively. The supply permissions of the supply simulation model are also set. The first simulation bit and the second simulation bit are virtual positions in the supply simulation model for importing real-time data. The supply permissions are the maximum simulation operation permissions of the supply simulation model during simulation, ensuring that the supply simulation model simulates within a reasonable range. Natural language processing technology is used to identify the collaboration parameters in the direct collaboration strategy, and the IoT data corresponding to the collaboration parameters is adjusted to drive the supply simulation model to run. After all the collaborative parameters have been simulated and run, the cost index, time index, and stability index of the supply simulation model are retrieved respectively. The cost reduction index, efficiency index, and stability index are assigned different proportional coefficients and then summed to calculate the strategy reliability index. The cost index, time index, and stability index are three specific indices automatically generated by the supply simulation model during simulation. They can represent the reliability of the direct collaborative strategy from three dimensions: collaborative cost, optimization time, and collaborative stability. The formula for calculating the strategy reliability index is: ; In the formula, As a strategy reliability index, To reduce the cost index, Efficiency index To stabilize the index, , , These are the proportional coefficients for the cost reduction index, efficiency index, and stability index, respectively. ; When the strategy reliability index is greater than or equal to the strategy reliability threshold, the direct collaboration strategy can effectively deal with the abnormal phenomena corresponding to the collaboration request. At this time, the collaboration optimization effect of the supply chain is good, and the direct collaboration strategy is determined to be output. The strategy reliability threshold refers to the minimum value of the strategy reliability index when the direct collaboration strategy can be directly output. This ensures that the output direct collaboration strategy maintains a comprehensive reliability effect in the three dimensions of collaboration cost, optimization time and collaboration stability. When the strategy reliability index is less than the strategy reliability threshold, the direct collaboration strategy cannot effectively deal with the abnormal phenomena corresponding to the collaboration request. At this time, the collaboration optimization effect of the supply chain is poor, and it is determined that the direct collaboration strategy will not be output.

[0042] When no direct collaboration strategy is output, the direct collaboration strategy is not discarded. Instead, it is temporarily stored and combined with the collaboration strategies corresponding to subsequent indirect related cases before being output as a whole.

[0043] S5: Import indirect association cases and collaboration requests into the strategy optimization model to generate indirect collaboration strategies that are indirectly adapted to the collaboration requests, and merge the direct collaboration strategies and indirect collaboration strategies to generate a combined collaboration strategy. If no direct collaboration strategy is output, it means that the direct association case cannot fully meet the supply chain collaboration optimization needs of the collaboration request. It is necessary to supplement the collaboration strategy with indirect association cases. Therefore, it is necessary to import the indirect association cases into the strategy optimization model for analysis to obtain the indirect collaboration strategy that can be combined with the direct collaboration strategy. In this embodiment, the indirect collaboration strategy can serve as a specific solution to indirectly adapt to the collaboration request, thereby meeting the indirect needs of supply chain collaboration optimization.

[0044] It should be noted that the strategy optimization model can also be used for indirect collaborative strategies, and the method of generating indirect collaborative strategies through indirect association cases is consistent with the method of generating direct collaborative strategies mentioned above. Furthermore, the training logic and methods of the two corresponding models are also consistent.

[0045] Since indirect collaboration strategies are indirect adaptations to collaboration requests, they cannot be directly output as guidance for supply chain collaboration optimization. They need to be combined with direct collaboration strategies to obtain combined collaboration strategies that can be output. In this embodiment, the combined collaboration strategy is a strategy generated by merging and interacting direct collaboration strategies and indirect collaboration strategies to meet the needs of supply chain collaboration optimization.

[0046] Specifically, the method for generating combined collaborative strategies is as follows: The collaboration parameters in the indirect collaboration strategy are identified by natural language processing technology. The same collaboration parameters in the direct collaboration strategy and the indirect collaboration strategy are recorded as repeated parameters. After summarizing the same repeated parameters, F parameter sets are obtained. Query the adjustment range of IoT data corresponding to the duplicate parameters in the F parameter sets one by one, and remove the duplicate parameters in the F parameter sets except for the maximum value of the adjustment range. Different collaboration parameters in the direct and indirect collaboration strategies are recorded as added parameters. All added parameters are added to the direct collaboration strategy according to the order of supply chain delivery to create a combined collaboration strategy.

[0047] In this embodiment, after obtaining the combined coordination strategy, the combined coordination strategy can be directly output to the outside world, so that the combined coordination strategy can serve as the final guiding opinion for this supply chain coordination optimization. With the help of the combined coordination strategy, abnormal phenomena in the supply chain can be coordinated and optimized, helping various supply roles in the supply chain to operate in a coordinated, efficient and stable manner.

[0048] Example 2: Please refer to Figure 2 As shown, the parts not described in detail in this embodiment are described in Embodiment 1. A supply chain collaborative optimization system based on IoT data and knowledge base RAG is provided to realize a supply chain collaborative optimization method based on IoT data and knowledge base RAG. The system includes a knowledge base construction module, a request generation module, a case screening module, a first strategy module, and a second strategy module. The modules are connected to each other via wired or wireless networks. The knowledge base construction module is used to combine multi-source historical data in the supply chain into collaborative cases, aggregate similar collaborative cases into case groups, and build a vector knowledge base that matches the case groups. Multi-source historical data includes IoT data, enterprise supply data, and industry market data; The request generation module is used to collect real-time IoT data, identify abnormal data from the real-time IoT data, parse and interpret the abnormal data, and then generate collaborative requests. The case filtering module is used to retrieve target cases that match the collaborative request from the vector knowledge base based on the case similarity retrieval criteria, and to classify the target cases into directly related cases and indirectly related cases according to the case similarity value of the target cases; The first strategy module is used to import directly related cases and collaboration requests into the strategy optimization model under the constraints of the RAG mechanism, generate direct collaboration strategies that are directly adapted to the collaboration requests, and simulate the direct collaboration strategies through the supply simulation model to determine whether to output the direct collaboration strategies. The second strategy module is used to import indirect association cases and collaboration requests into the strategy optimization model when no direct collaboration strategy is output. It generates indirect collaboration strategies that are indirectly adapted to the collaboration requests, and merges the direct and indirect collaboration strategies to generate a combined collaboration strategy.

[0049] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A supply chain collaborative optimization method based on IoT data and the knowledge base RAG, characterized in that, include: S1: Combine multi-source historical data in the supply chain into collaborative cases, aggregate similar collaborative cases into case groups, and build a vector knowledge base that matches the case groups. Multi-source historical data includes IoT data, enterprise supply data, and industry market data. S2: Collect real-time IoT data, identify abnormal data from the real-time IoT data, analyze and interpret the abnormal data, and generate collaborative requests. S3: Based on the case similarity retrieval criterion, retrieve target cases that match the collaborative request from the vector knowledge base, and classify the target cases into directly related cases and indirectly related cases according to the case similarity value of the target cases; S4: Under the constraints of the RAG mechanism, directly related cases and collaboration requests are imported into the strategy optimization model to generate direct collaboration strategies that are directly adapted to the collaboration requests. The direct collaboration strategies are then simulated and run through the supply simulation model to determine whether to output the direct collaboration strategy. If a direct cooperation strategy is output, the process ends; otherwise, S5 is executed. S5: Import indirect association cases and collaboration requests into the strategy optimization model to generate indirect collaboration strategies that are indirectly adapted to the collaboration requests. Then, merge the direct collaboration strategies and indirect collaboration strategies to generate a combined collaboration strategy.

2. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 1, characterized in that, Collaborative cases consist of causal elements and consequence elements; When combining collaborative cases, the IoT data is compared with the corresponding standard data for consistency, and IoT data that is inconsistent with the standard data is recorded as abnormal data. The abnormal data is subtracted from the corresponding standard data to calculate the abnormal difference value. Then, in descending order of the abnormal difference value, enterprise supply data and industry market data with the same supply attributes as the abnormal data are identified and recorded as the solution data. The abnormal data and the resolution data are respectively recorded as the antecedent element and the consequence element. The antecedent element is combined with the corresponding consequence element to generate A collaborative cases.

3. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 2, characterized in that, The method for summarizing case studies is as follows: A1: Query the case semantics of the antecedent elements in A collaborative cases one by one, convert the A case semantics into A semantic vectors through the BERT model, and randomly select a semantic vector as the base vector; A2: The cosine similarity algorithm is used to calculate the cosine values ​​of the base vector and the remaining A-1 semantic vectors in sequence, and the semantic vectors with cosine values ​​greater than the calibration threshold are matched with the base vector to obtain vector combinations; A3: Randomly select a semantic vector from the remaining semantic vectors as the base vector, and repeat step A2 until all semantic vectors are matched to obtain B vector combinations; A4: After summarizing the collaborative cases corresponding to the semantic vectors in the B vector combinations, we obtain B case groups.

4. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 3, characterized in that, The method for constructing a vector knowledge base is as follows: The BERT model is used to convert all collaborative cases into knowledge vectors, and the knowledge vectors in the same case group are aggregated to obtain B case vectors. Construct a knowledge base with B basic levels, and annotate the B case vectors one by one on the B levels to promote the transformation of the basic levels into vector levels. By establishing annotation units at each of the B vector levels and importing the baseline vectors corresponding to the case vectors into the annotation units, a multi-level vector knowledge base is constructed.

5. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 4, characterized in that, The method for generating collaborative requests is as follows: All the abnormal data were analyzed one by one using natural language processing technology, and the analysis results were interpreted to obtain C abnormal interpretations. According to the order of supply chain delivery, the C abnormal interpretations are sorted in sequence to generate an interpretation queue. The interpretation queue is then input into the request analysis model, which outputs related word groups with added position labels. Based on the addition of location annotations, corresponding related phrases are added between two adjacent exception definitions, and a request prequence is added before the first exception definition and a request postquence is added after the last exception definition to construct a collaborative request.

6. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 5, characterized in that, The criteria for case similarity retrieval are: first, retrieve cases based on similarity, and then, retrieve cases based on real-time performance. The method for retrieving the target case is as follows: The C anomaly interpretations in the collaborative request are converted into anomaly vectors using the BERT model. The cosine similarity algorithm is then used to calculate the cosine values ​​of the C anomaly vectors and the semantic vectors in the collaborative case, thus obtaining the C first similarity values. C collaborative cases in which the first similarity value is greater than the calibration similarity threshold are recorded as valid cases, and D valid cases are obtained. The time of the last amendment to the policy and regulations and the time of the generation of D valid cases are retrieved from the industry market data to obtain the time of policy change and the time of D case record. Valid cases whose case recording time is earlier than the time of policy change are removed, and the remaining valid cases are recorded as target cases, resulting in E target cases.

7. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 6, characterized in that, The method for distinguishing between directly related cases and indirectly related cases is as follows: The maximum and minimum values ​​of the first similarity values ​​of the E target cases are added together and averaged to calculate the similarity value of the E cases. The average of the case similarity values ​​of the E valid cases is then calculated. Target cases with a similarity value greater than or equal to the mean similarity value are recorded as cases to be verified, and the number of cases to be verified is counted. When the number of cases to be verified is greater than or equal to one-third of the number of target cases, the cases to be verified are recorded as directly related cases, and the remaining target cases are recorded as indirectly related cases. When the number of cases to be verified is less than one-third of the number of target cases, the similarity mean is continuously reduced by 5% of the similarity mean, and the number of cases to be verified after reduction is counted until the number of cases to be verified after reduction is greater than or equal to one-third of the number of target cases. The cases to be verified after reduction are recorded as directly related cases, and the remaining target cases are recorded as indirectly related cases.

8. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 7, characterized in that, The RAG mechanism is as follows: the collaboration authority of the direct collaboration strategy shall not exceed the supply authority of the supply chain; The method for determining whether to output a direct cooperation strategy is as follows: Based on real-time IoT data, a supply simulation model matching the supply chain is constructed using digital mirroring technology; In the supply simulation model, a first simulation bit and a second simulation bit are set. Real-time enterprise supply data and real-time industry market data are imported into the first simulation bit and the second simulation bit respectively, and the supply permissions of the supply simulation model are set. Natural language processing technology is used to identify the collaboration parameters in the direct collaboration strategy, and the IoT data corresponding to the collaboration parameters is adjusted to drive the supply simulation model to run. After all the collaborative parameters have been simulated and run, the cost index, time index and stability index of the supply simulation model are retrieved respectively. Then, the cost reduction index, efficiency index and stability index are assigned different proportional coefficients and added together to calculate the strategy reliability index. When the policy reliability index is greater than or equal to the policy reliability threshold, the direct collaborative policy is determined and output. When the policy reliability index is less than the policy reliability threshold, it is determined that no direct collaborative policy will be output.

9. The supply chain collaborative optimization method based on IoT data and knowledge base RAG as described in claim 8, characterized in that, The method for generating combined collaborative strategies is as follows: The collaboration parameters in the indirect collaboration strategy are identified by natural language processing technology. The same collaboration parameters in the direct collaboration strategy and the indirect collaboration strategy are recorded as repeated parameters. After summarizing the same repeated parameters, F parameter sets are obtained. Query the adjustment range of IoT data corresponding to the duplicate parameters in the F parameter sets one by one, and remove the duplicate parameters in the F parameter sets except for the maximum value of the adjustment range. Different collaboration parameters in the direct and indirect collaboration strategies are recorded as added parameters. All added parameters are added to the direct collaboration strategy according to the order of supply chain delivery to generate a combined collaboration strategy.

10. A supply chain collaborative optimization system based on IoT data and the knowledge base RAG, used to implement the supply chain collaborative optimization method based on IoT data and the knowledge base RAG as described in any one of claims 1-9, characterized in that, It includes a knowledge base building module, a request generation module, a case selection module, a first strategy module, and a second strategy module. The modules are connected to each other via wired or wireless networks. The knowledge base construction module is used to combine multi-source historical data in the supply chain into collaborative cases, aggregate similar collaborative cases into case groups, and build a vector knowledge base that matches the case groups. The request generation module is used to collect real-time IoT data, identify abnormal data from the real-time IoT data, parse and interpret the abnormal data, and then generate collaborative requests. The case filtering module is used to retrieve target cases that match the collaborative request from the vector knowledge base based on the case similarity retrieval criteria, and to classify the target cases into directly related cases and indirectly related cases according to the case similarity value of the target cases; The first strategy module is used to import directly related cases and collaboration requests into the strategy optimization model under the constraints of the RAG mechanism, generate direct collaboration strategies that are directly adapted to the collaboration requests, and simulate the direct collaboration strategies through the supply simulation model to determine whether to output the direct collaboration strategies. The second strategy module is used to import indirect association cases and collaboration requests into the strategy optimization model when no direct collaboration strategy is output. It generates indirect collaboration strategies that are indirectly adapted to the collaboration requests, and merges the direct and indirect collaboration strategies to generate a combined collaboration strategy.