CN-122019593-A - Supply chain collaborative optimization method and system based on Internet of things data and knowledge base RAG
Abstract
The invention relates to the technical field of data retrieval, and discloses a supply chain collaborative optimization method and a system based on Internet of things data and a knowledge base RAG; the method comprises the steps of S1, constructing a vector knowledge base from multi-source historical data, S2, generating a collaborative request, S3, retrieving a target case from the vector knowledge base, dividing the target case into a direct association case and an indirect association case, S4, generating a direct collaborative policy, S5, fusing the direct collaborative policy and the indirect collaborative policy into a combined collaborative policy, and ensuring that subsequent collaborative optimization policy measures can be made according to the search result of interactive orientation between the real-time data and the historical data, meanwhile, breaking barrier among different data cases, and combining the direct collaborative policy and self-adaption generation output logic of the combined collaborative policy, so that a targeted collaborative optimization policy can be provided for collaborative optimization of different requirements in a supply chain, and high-quality collaborative optimization operation of the supply chain is ensured.
Inventors
- CAO FEI
- LI HEYU
- XU HAI
Assignees
- 鑫琪人工智能科技(江苏)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260202
Claims (10)
- 1. The supply chain collaborative optimization method based on the Internet of things data and the knowledge base RAG is characterized by comprising the following steps: s1, combining multi-source historical data in a supply chain into a collaborative case, converging similar collaborative cases into a case group, and constructing a vector knowledge base matched with the case group, wherein the multi-source historical data comprises Internet of things data, enterprise supply data and industry market data; s2, acquiring real-time Internet of things data, identifying abnormal data from the real-time Internet of things data, analyzing and explaining the abnormal data, and generating a collaboration request; s3, based on a case similarity search criterion, searching a target case matched with the collaborative request from a vector knowledge base, and dividing the target case into a direct association case and an indirect association case according to a case similarity value of the target case; S4, under the limitation of an RAG mechanism, the direct association case and the collaboration request are imported into a policy optimization model to generate a direct collaboration policy directly adapted to the collaboration request, and the direct collaboration policy is simulated and operated through a supply simulation model to judge whether to output the direct collaboration policy; And S5, importing the indirect association case and the collaboration request into a policy optimization model, generating an indirect collaboration policy indirectly adapted to the collaboration request, and performing policy fusion on the direct collaboration policy and the indirect collaboration policy to generate a combined collaboration policy.
- 2. The method for collaborative optimization of a supply chain based on internet of things data and a knowledge base RAG according to claim 1, wherein the collaborative case consists of a pre-cause element and a post-effect element; When the collaborative cases are combined, consistency comparison is carried out on the Internet of things data and corresponding standard data, and the Internet of things data inconsistent with the standard data is recorded as abnormal data; The abnormal data and the corresponding standard data are subjected to difference, an abnormal difference value is calculated, enterprise supply data and industry market data with the same supply attribute as the abnormal data are sequentially identified according to the mode that the abnormal difference value is from large to small, and the enterprise supply data and the industry market data are recorded as solution data; and respectively marking the abnormal data and the solution data as a pre-factor element and a result element, and combining the pre-factor element with the corresponding result element to generate A collaborative cases.
- 3. The method for collaborative optimization of a supply chain based on internet of things data and a knowledge base RAG according to claim 2, wherein the method for summarizing the case groups is as follows: A1, inquiring case semantics of previous elements in the A collaborative cases one by one, converting the A case semantics into A semantic vectors through a BERT model, and randomly selecting one semantic vector as a reference vector; A2, sequentially calculating cosine values of the reference vector and the rest A-1 semantic vectors through a cosine similarity algorithm, and matching the semantic vectors with the cosine values larger than a calibration threshold value with the reference vector to obtain a vector combination; A3, randomly selecting one semantic vector from the rest semantic vectors as a reference vector, and repeatedly executing the step A2 until all the semantic vectors are matched to obtain B vector combinations; And A4, respectively summarizing the synergistic cases corresponding to the semantic vectors in the B vector combinations to obtain B case groups.
- 4. The supply chain collaborative optimization method based on the internet of things data and the knowledge base RAG according to claim 3, wherein the vector knowledge base construction method is as follows: converting all the collaborative cases into knowledge vectors through a BERT model, and collecting the knowledge vectors in the same case group to obtain B case vectors; constructing a knowledge base with B basic levels, and remarking B case vectors on the B levels one by one to promote the basic levels to be converted into vector levels; And building remarking units on the B vector layers respectively, and after importing reference vectors corresponding to the case vectors in the remarking units, building a multi-layer vector knowledge base.
- 5. The method for collaborative optimization of a supply chain based on internet of things data and a knowledge base RAG according to claim 4, wherein the method for generating the collaborative request is as follows: analyzing all the abnormal data one by one through a natural language processing technology, and explaining the analysis result to obtain C abnormal definitions; Sequencing the C abnormal paraphrases in sequence according to the sequence of supply chain supply to generate a paraphrasing queue, inputting the paraphrasing queue into a request analysis model, and outputting an associated phrase with an added position mark; And adding corresponding associated phrase between two adjacent abnormal definitions by taking the adding position label as a standard, adding a request preamble before the first abnormal definition, and adding a request follow-up after the last abnormal definition to construct a collaborative request.
- 6. The collaborative optimization method for the supply chain based on the Internet of things data and the RAG of the knowledge base according to claim 5, wherein the case similarity search criteria is that searching is performed from similarity first and then from real-time; the retrieval method of the target case comprises the following steps: converting C abnormal definitions in the collaborative request into abnormal vectors through a BERT model, and sequentially calculating cosine values of the C abnormal vectors and semantic vectors in the collaborative case through a cosine similarity algorithm to obtain C first similarity values; Marking the synergistic cases with the C first similarity values larger than the calibrated similarity threshold as effective cases to obtain D effective cases; Inquiring the last modification time of the policy and regulation and the generation time of D effective cases from industry market data respectively to obtain policy change time and D case recording time; And eliminating the effective cases with the case record time earlier than the policy change time, and marking the rest effective cases as target cases to obtain E target cases.
- 7. The method for collaborative optimization of a supply chain based on internet of things data and a knowledge base RAG according to claim 6, wherein the method for dividing the direct association case and the indirect association case is as follows: Respectively adding the maximum value of the first similar values of E target cases and the minimum value of the first similar values, then averaging, calculating E case similar values, accumulating the case similar values of E effective cases, then averaging, and calculating a similar average value; marking the target cases with case similarity values larger than or equal to the similarity mean value as cases to be verified, and counting the number of the cases to be verified; When the number of the cases to be verified is more than or equal to one third of the number of the target cases, marking the cases to be verified as direct association cases, and marking the rest target cases as indirect association cases; When the number of the cases to be verified is smaller than one third of the number of the target cases, 5% of the similar mean value is used as a reduction standard, the similar mean value is continuously reduced, the number of the reduced cases to be verified is counted, the process is stopped until the number of the reduced cases to be verified is larger than or equal to one third of the number of the target cases, the reduced cases to be verified are marked as direct association cases, and the rest target cases are marked as indirect association cases.
- 8. The method for collaborative optimization of a supply chain based on Internet of things data and a knowledge base RAG according to claim 7, wherein the RAG mechanism is that the collaborative authority of a direct collaborative strategy does not exceed the supply authority of the supply chain; The method for judging whether to output the direct cooperative strategy comprises the following steps: Based on real-time Internet of things data, a supply simulation model matched with a supply chain is built by combining a digital mirror technology; Setting a first simulation position and a second simulation position in a supply simulation model, respectively importing real-time enterprise supply data and real-time industry market data into the first simulation position and the second simulation position, and setting a supply authority of the supply simulation model; Identifying cooperative parameters in the direct cooperative strategy through a natural language processing technology, and adjusting the data of the Internet of things corresponding to the cooperative parameters to drive the supply simulation model to simulate operation; After the simulation operation of the collaborative parameters is completed, respectively inquiring a cost index, a time index and a stability index for supplying the simulation model, respectively endowing different proportional coefficients with a cost reduction index, an efficiency index and a stability index, and then adding the different proportional coefficients to calculate a strategy reliability index; when the strategy reliability index is larger than or equal to the strategy reliability threshold, judging to output a direct cooperative strategy; When the policy reliability index is smaller than the policy reliability threshold, it is determined that the direct cooperative policy is not output.
- 9. The method for collaborative optimization of a supply chain based on internet of things data and a knowledge base RAG according to claim 8, wherein the method for generating a combined collaborative policy is as follows: identifying cooperative parameters in an indirect cooperative strategy through a natural language processing technology, marking the same cooperative parameters in the direct cooperative strategy and the indirect cooperative strategy as repeated parameters, and collecting the same repeated parameters to obtain F parameter sets; Inquiring the adjustment amplitude of the data of the Internet of things corresponding to the repeated parameters in the F parameter sets one by one, and removing the repeated parameters in the F parameter sets except the maximum value of the adjustment amplitude; And recording different cooperative parameters in the direct cooperative strategy and the indirect cooperative strategy as addition parameters, and adding all the addition parameters into the direct cooperative strategy according to the supply sequence of a supply chain to generate a combined cooperative strategy.
- 10. The supply chain collaborative optimization system based on the internet of things data and the knowledge base RAG is used for realizing the supply chain collaborative optimization method based on the internet of things data and the knowledge base RAG according to any one of claims 1-9, and is characterized by comprising a knowledge base construction module, a request generation module, a case screening module, a first strategy module and a second strategy module, wherein the modules are connected through a wired or wireless network mode; the knowledge base construction module is used for combining multi-source historical data in a supply chain into collaborative cases, converging similar collaborative cases into a case group, and constructing a vector knowledge base matched with the case group; The request generation module is used for acquiring real-time Internet of things data, identifying abnormal data from the real-time Internet of things data, and generating a collaborative request after analyzing and interpreting the abnormal data; The case screening module is used for retrieving a target case matched with the collaborative request from the vector knowledge base based on a case similarity retrieval criterion, and dividing the target case into a direct association case and an indirect association case according to a case similarity value of the target case; The first strategy module is used for importing the direct association case and the collaboration request into a strategy optimization model under the limitation of an RAG mechanism, generating a direct collaboration strategy directly adapted to the collaboration request, performing simulation operation on the direct collaboration strategy through a supply simulation model, and judging whether to output the direct collaboration strategy; And the second strategy module is used for importing the indirect association case and the cooperation request into a strategy optimization model when the direct cooperation strategy is not output, generating an indirect cooperation strategy indirectly adapted to the cooperation request, and carrying out strategy fusion on the direct cooperation strategy and the indirect cooperation strategy to generate a combined cooperation strategy.
Description
Supply chain collaborative optimization method and system based on Internet of things data and knowledge base RAG Technical Field The invention relates to the technical field of data retrieval, in particular to a supply chain collaborative optimization method and system based on Internet of things data and a knowledge base RAG. Background In the process of enterprise production, marketing and supply, the supply chain collaborative optimization operation is the key to improving the overall operation efficiency of enterprises, reducing the cost and enhancing the competitiveness, and the traditional supply chain collaborative optimization operation depends on a preset static model or an experience decision based on recent manual work, so that an effective and accurate collaborative optimization strategy cannot be provided for an enterprise supply chain when the real-time dynamic change data is faced, and therefore, the collaborative optimization of the supply chain needs to be carried out by combining a knowledge base RAG. The patent application with the publication number of CN120374011A discloses an intelligent logistics and supply chain collaborative management method based on the Internet of things, which comprises the steps of collecting multi-source data related to logistics in logistics transportation and storage links, carrying out format conversion and anomaly detection on the received multi-source data in edge calculation nodes, carrying out fusion calculation on key state variables of a logistics system to generate structured data, calculating an optimal transportation path by using a path planning method, and transmitting an optimized scheduling scheme to an intelligent decision system for execution; The existing supply chain can only provide one or a plurality of collaboration strategies when in collaborative optimization, and can not adaptively provide specific solutions with different dimensions and levels according to specific characteristics and optimization requirements of collaboration requests constructed in real time in the supply chain, so that the demand suitability of the provided collaboration strategies is low or the execution effect of the collaborative optimization is poor, and the local small-range direct collaboration requirements and the multi-party linkage large-range combined collaboration requirements of the supply chain can not be pertinently met when in collaborative optimization, thereby causing the weak pertinence and insufficient accuracy of the finally provided collaboration strategies of the supply chain and guaranteeing the high-quality collaborative optimization operation of the supply chain. In view of the above, the present invention provides a method and a system for collaborative optimization of a supply chain based on internet of things data and a knowledge base RAG to solve the above problems. Disclosure of Invention In order to overcome the defects in the prior art and achieve the purposes, the invention provides a supply chain collaborative optimization method based on Internet of things data and a knowledge base RAG, which comprises the following steps: s1, combining multi-source historical data in a supply chain into a collaborative case, converging similar collaborative cases into a case group, and constructing a vector knowledge base matched with the case group, wherein the multi-source historical data comprises Internet of things data, enterprise supply data and industry market data; s2, acquiring real-time Internet of things data, identifying abnormal data from the real-time Internet of things data, analyzing and explaining the abnormal data, and generating a collaboration request; s3, based on a case similarity search criterion, searching a target case matched with the collaborative request from a vector knowledge base, and dividing the target case into a direct association case and an indirect association case according to a case similarity value of the target case; S4, under the limitation of an RAG mechanism, the direct association case and the collaboration request are imported into a policy optimization model to generate a direct collaboration policy directly adapted to the collaboration request, and the direct collaboration policy is simulated and operated through a supply simulation model to judge whether to output the direct collaboration policy; And S5, importing the indirect association case and the collaboration request into a policy optimization model, generating an indirect collaboration policy indirectly adapted to the collaboration request, and performing policy fusion on the direct collaboration policy and the indirect collaboration policy to generate a combined collaboration policy. Further, the collaboration case is composed of a pre-cause element and a result element; When the collaborative cases are combined, consistency comparison is carried out on the Internet of things data and corresponding standard data, and the Internet of thin