Supply chain visualization method and device, equipment and medium
By collecting, merging and visualizing supply chain data, building and labeling supply chain maps, the problem of difficulty in integrating and analyzing supply chain data in existing systems is solved, and in-depth analysis and optimization of the supply chain is achieved, and the efficiency and resilience of the supply chain is improved.
Patent Information
- Application Number
- CN202411970802.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
The existing supply chain management system is difficult to integrate and share data, cannot quickly respond to changes in the market and supply chain, and cannot deeply explore potential problems and optimization opportunities in the supply chain.
By collecting supply chain data from multiple data sources during vehicle manufacturing, combining and loading it into a target database, converting it into a supply chain graph, labeling key nodes and dependencies, and visually displaying it.
It realizes the integration and analysis of large-scale supply chain data, identifies key nodes and potential risks, provides specific supply chain optimization suggestions and risk mitigation plans, and improves the efficiency, transparency, resilience and responsiveness of the supply chain.
Smart Images

Figure CN119887330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of supply chain management, and in particular to a supply chain visualization method, device, equipment and medium. Background Art
[0002] Supply chain management in the manufacturing industry is a complex process involving multiple links, including procurement, production, transportation, inventory management, and sales. Traditional supply chain management systems usually rely on a single data source and static analysis methods, which are difficult to effectively respond to the complex supply chain network and dynamically changing market demands in the manufacturing industry. Existing systems face the problem of data silos, making it difficult to integrate and share data, lack comprehensiveness, and are unable to quickly respond to changes in the market and supply chain. The analysis method is single and cannot deeply explore potential problems and optimization opportunities in the supply chain. Summary of the invention
[0003] In view of the above problems, the present invention aims to propose a supply chain visualization method, device, equipment and medium to solve the problems in current supply chain management that are difficult to integrate and share data, cannot respond quickly to changes in the market and supply chain, and cannot deeply explore potential problems and optimization opportunities in the supply chain.
[0004] According to a first aspect of the present invention, a supply chain visualization method is first provided, characterized in that the method comprises:
[0005] Collecting supply chain data from at least one data source during a vehicle manufacturing process, merging the supply chain data from at least one data source, and loading the merged supply chain data into a target database;
[0006] Converting the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between the nodes;
[0007] Annotating key nodes in the supply chain graph and dependency relationships between the nodes to obtain the annotated supply chain graph;
[0008] The labeled supply chain diagram is visualized.
[0009] Optionally, merging the supply chain data from at least one data source and loading the merged supply chain data into a target database includes:
[0010] acquiring the supply chain data from at least one data source at a regular interval;
[0011] Converting the supply chain data into a format that conforms to the target database format;
[0012] The supply chain data conforming to the target database format is loaded into the target database.
[0013] Optionally, converting the supply chain data into a supply chain graph includes:
[0014] Reading supply chain data in the target database;
[0015] Extracting node data and edge data from the supply chain data; the node data is a vehicle manufacturer, supplier or component in the supply chain data, and the edge data is a supply relationship between the node data;
[0016] A supply chain graph is constructed according to the node data and the edge data.
[0017] Optionally, the marking of the key nodes in the supply chain graph and the dependency relationships between the nodes to obtain the marked supply chain graph includes:
[0018] Determine key nodes in the supply chain graph and dependencies between the nodes;
[0019] The key nodes in the supply chain graph and the dependency relationships between the nodes are marked to obtain the marked supply chain graph.
[0020] Optionally, determining the key nodes in the supply chain graph and the dependency relationships between the nodes includes:
[0021] Calculating the webpage ranking value of each node in the supply chain graph, and determining the key nodes in the supply chain graph according to the magnitude of the webpage ranking value;
[0022] Performing a depth-first search on the supply chain graph, assigning timestamps to nodes in the supply chain graph, reversing the direction of the edges in the supply chain graph to perform a depth-first search, and determining the close dependency between the nodes in the supply chain graph by the sizes of the timestamps of the nodes in the supply chain graph;
[0023] For any three nodes in the supply chain graph, based on the similarities of the neighboring nodes of the nodes, the high dependency relationship between the nodes in the supply chain graph is determined.
[0024] Optionally, the determining the key nodes in the supply chain graph and the dependency relationships between the nodes further includes:
[0025] Determine an improvement plan in the vehicle manufacturing process based on the key nodes in the supply chain diagram and the dependency relationship between the nodes, and mark the improvement plan in the supply chain diagram.
[0026] Optionally, visually displaying the annotated supply chain graph includes:
[0027] Reading the annotated node data and edge data in the supply chain graph;
[0028] Importing the node data and the edge data into a graph database for visual display;
[0029] The labeled supply chain graph is visualized through a graph database visualization tool.
[0030] According to a second aspect of the present invention, there is also provided a supply chain visualization device, characterized in that the device comprises:
[0031] a data acquisition and merging module, used for collecting supply chain data from at least one data source in a vehicle manufacturing process, merging the supply chain data from at least one data source, and loading the merged supply chain data into a target database;
[0032] A conversion module, configured to convert the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, wherein the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between the nodes;
[0033] A labeling module, used to label key nodes in the supply chain graph and dependencies between the nodes to obtain the labeled supply chain graph;
[0034] A visualization module is used to visualize the labeled supply chain diagram.
[0035] According to the third aspect of the present invention, there is also provided an electronic device, characterized in that it comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the supply chain visualization method as described above is implemented.
[0036] According to a fourth aspect of the present invention, there is further provided a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the supply chain visualization method as described above is implemented.
[0037] The supply chain visualization method provided by the embodiment of the present invention collects supply chain data from at least one data source in the vehicle manufacturing process, merges the supply chain data from at least one data source, and loads the merged supply chain data into the target database; converts the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between nodes; annotates the key nodes in the supply chain graph and the dependencies between the nodes to obtain the annotated supply chain graph; and visualizes the annotated supply chain graph. The embodiment of the present invention can efficiently process and analyze large-scale supply chain data sets, integrate data scattered in different systems, and can perform in-depth analysis on various supply chain sectors in the vehicle manufacturing process, identify key nodes and potential supply chain risks; in addition, based on the in-depth analysis results, specific supply chain optimization suggestions can be provided, and corresponding risk mitigation plans can be formulated; visualization tools can also be used to intuitively display the supply chain status, monitor and dynamically adjust the entire manufacturing supply chain. It can not only improve the efficiency and transparency of the supply chain, but also enhance the resilience and responsiveness of the supply chain, helping enterprises to maintain competitiveness in a complex and changing market environment.
[0038] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0040] Figure 1 is a flowchart of steps of a supply chain visualization method provided by an embodiment of the present invention;
[0041] Figure 2 It is a visual display diagram of a supply chain diagram provided by an embodiment of the present invention;
[0042] Figure 3 It is a structural schematic diagram of a supply chain visualization device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it can be understood by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable readers to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present invention can also be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0044] It should be noted that Spark GraphX (Spark Graph Computing Library) is a graph computing library of Apache Spark, which provides a wealth of graph algorithms and tools for processing large-scale graph data. With Spark GraphX, graph data can be efficiently stored, queried, analyzed, and visualized.
[0045] Nebula Graph is a high-performance distributed graph database that supports storage and query of large-scale graph data. NebulaGraph provides a wealth of functions and tools to help users easily manage and analyze graph data.
[0046] Seatunnel (data pipeline, data flow) is an open source data integration tool that supports multiple data sources and targets. Seatunnel provides rich functions and tools to help users easily manage and analyze data.
[0047] Related technologies have the following defects when processing large-scale, high-dimensional complete supply chain data in the manufacturing industry:
[0048] 1. Data silos: It is difficult to integrate data between multiple data sources and systems, resulting in poor information sharing;
[0049] 2. Lack of effective data integration and analysis methods, which makes it impossible to deeply explore potential problems and optimization opportunities in the supply chain;
[0050] 3. Lack of in-depth analysis of key supply chain nodes, such as supplier importance, inventory levels, logistics efficiency, etc.;
[0051] 4. Lack of effective supply chain optimization suggestions, optimization measures, complete link monitoring and dynamic adjustments.
[0052] The core idea of this application is to use Spark GraphX's graph algorithm to conduct in-depth analysis of the supply chain of each sector in the vehicle manufacturing process to avoid risks such as supply chain disruptions, increased costs, and production delays. The specific advantages are as follows:
[0053] 1. Efficient data processing capabilities: Spark GraphX’s batch processing capabilities can be used to efficiently process and analyze large-scale supply chain data sets;
[0054] 2. Data integration: By using data integration tools such as Seatunnel (data pipeline, data flow), data scattered in different systems can be integrated to form a unified view;
[0055] 3. In-depth analysis: Apply graph algorithms provided by GraphX, such as PageRank (webpage ranking) and community detection, to deeply analyze the supply chain network and identify key nodes and potential bottlenecks;
[0056] 4. Optimization suggestions: Based on the in-depth analysis results, provide specific supply chain optimization suggestions, such as supplier selection, inventory management, logistics optimization, etc.;
[0057] 5. Visualization and monitoring: Use Nebula Graph’s visualization tools to intuitively display the supply chain status, monitor and dynamically adjust the entire manufacturing industry chain;
[0058] Through these advantages, the present invention can effectively solve the challenges encountered by related technologies in supply chain management and provide more in-depth and comprehensive supply chain analysis and optimization strategies.
[0059] Reference Figure 1 , shows a flow chart of the steps of a supply chain visualization method provided by an embodiment of the present invention, which may specifically include the following steps:
[0060] Step 101 , collecting supply chain data from at least one data source in a vehicle manufacturing process, merging the supply chain data from at least one data source, and loading the merged supply chain data into a target database.
[0061] Assume that the data sources include enterprise resource planning system, supply chain management system and inventory management system, and the target database is Doris data warehouse.
[0062] It should be noted that the enterprise resource planning system, supply chain management system and inventory management system are used as examples for illustration here. The actual data sources are not limited to these and this application does not impose any restrictions.
[0063] Collect supply chain data from various sectors in the vehicle manufacturing process. For example, from the enterprise resource planning (ERP) system, you can collect data on parts inventory information, purchase orders, production plans, etc. For example, for each part, you can obtain its current inventory quantity, safety stock level, purchase price, supplier information, etc.; the supply chain management system (SCM) can provide information such as supplier delivery time, supply reliability, and transportation methods. For example, record the average delivery cycle of each supplier, the on-time delivery rate in the past period of time, etc.; the inventory management system can provide real-time inventory levels, inventory turnover rate and other data. For example, understand the changes in the inventory quantity of specific parts in different warehouses, etc.
[0064] Install and configure Seatunnel, and create a Seatunnel task configuration file. In Seatunnel, a task configuration file is usually a YAML (YAML Ain't Markup Language) file that defines data sources, targets, conversion rules, etc.
[0065] Configure Seatunnel tasks: define three data sources: enterprise resource planning system, supply chain management system, and inventory management system. Connect the three data sources. You can use JDBC (Java Database Connectivity) to connect, but it is not limited to JDBC and can be adjusted according to actual conditions.
[0066] Define data conversion, define data cleaning and conversion rules, filter out data that does not meet the conditions, and map data in different systems to a unified data model.
[0067] Define the destination of the data, such as storing the data in a temporary storage area.
[0068] Use a scheduled task tool or scheduling tool to run Seatunnel tasks regularly, extracting supply chain data from different data sources into a temporary storage area. Then clean and convert the data to make the supply chain data conform to the format requirements of the Doris data warehouse, load the supply chain data into the Doris data warehouse, and create the corresponding data table.
[0069] Step 102, converting the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between the nodes.
[0070] Use Spark to connect to the Doris data warehouse, read the supply chain data in the Doris data warehouse, and then use SparkGraphX to build a supply chain graph.
[0071] Specifically, configure Spark to connect to Doris and ensure that Spark has configured the dependencies and configurations for connecting to the Doris data warehouse.
[0072] Add the JDBC driver dependency of Doris and configure the Spark Session in Spark so that it can connect to the Doris data warehouse. Use Spark's JDBC connection to read the supply chain data in the Doris data warehouse.
[0073] Use Spark's JDBC connection to read the supply chain data in the Doris data warehouse into DataFrame, where DataFrame is a data structure in Apache Spark, similar to a table in a relational database. DataFrame provides a rich API (Application Programming Interface) for data query, conversion, and analysis.
[0074] Create a Spark Session object, extract vertex and edge data from the DataFrame, convert it to RDD (Resilient Distributed Dataset), and use the RDD of vertices and edges to build a graph. RDD is a core concept in Apache Spark, representing an immutable, partitioned data set. RDD provides a rich API for data conversion and operation.
[0075] Each node in the graph consists of a unique ID (IDentifier) and a name or label; in the supply chain graph, a node can be a vehicle manufacturer, supplier, or component. For example, the node ID can be the supplier's unique code, and the node name can be the supplier's name.
[0076] Each edge in the graph connects two nodes, indicating the supply relationship between them. For example, an edge can point from a supplier node to a vehicle manufacturer node, indicating that the supplier supplies parts to the vehicle manufacturer.
[0077] Step 103: annotate the key nodes in the supply chain graph and the dependency relationships between the nodes to obtain the annotated supply chain graph.
[0078] After converting the supply chain data into a supply chain graph, the graph algorithm of Spark GraphX can be used to deeply analyze and optimize the supply chain. For example, the PageRank algorithm can be applied to identify key nodes in the supply chain graph, the community detection algorithm can be applied to identify natural groupings in the supply chain, the Strongly Connected Components (SCC) algorithm can be applied to identify closely dependent subgraphs in the supply chain, the triangle counting algorithm can be applied to reflect the degree of close cooperation in the supply chain, and the shortest path algorithm can be applied to determine the shortest supply path for key components or suppliers. The results obtained through the graph algorithm analysis (key nodes, dependencies between nodes, etc.) can be annotated on the nodes and edges in the supply chain graph.
[0079] The PageRank algorithm iteratively calculates the importance score of each node. During the iteration process, the more relationships a node has with other nodes, the larger the PageRank value. The more nodes a node has relationships with, the larger the PageRank value. In the supply chain graph, the PageRank value of a node can represent the importance of the node in the supply chain. For example, a supplier with a high PageRank value may mean that it has a high influence in the supply chain, such as supplying key components or having cooperative relationships with multiple other important suppliers.
[0080] Community detection algorithms are used to identify naturally occurring groups in a graph. In a supply chain graph, these groups may represent different supply chain subnetworks or different supplier groups. They can help companies understand the cooperative groups in the supply chain, for example, finding out which suppliers cooperate closely or which parts belong to the same supply community.
[0081] The strongly connected component algorithm can identify strongly connected subgraphs in the supply chain network, where nodes in these subgraphs are reachable from each other. In the supply chain, strongly connected components may represent groups of suppliers that work closely together or supply chain links with high dependencies. For example, if a supplier in a strongly connected component has a problem, it may affect other suppliers and vehicle manufacturers in the entire subgraph.
[0082] In the triangle counting algorithm, a triangle refers to a subgraph consisting of three vertices, which are connected in pairs to form a closed triangle; by enumerating the triples (combinations of three nodes) in the graph, check whether they form a triangle, that is, check whether the three nodes are connected in pairs by edges to form a closed triangle. For each node, traverse the neighbor nodes of its neighbor nodes to find common neighbors to determine the number of triangles. Triangle counting can reflect the close cooperation in the supply chain network. In social network analysis, triangles usually represent close relationships between friends. In the supply chain, triangles can represent close cooperation between three suppliers, or a close relationship between a supplier, a component and a vehicle manufacturer. A higher number of triangles may mean that there is a high degree of cooperation and dependence in some parts of the supply chain.
[0083] The shortest path algorithm is used to calculate the shortest path from a source node to a target node for a specific key component or supplier node, with the node as the source node and the vehicle manufacturer node as the target node. Determine the shortest supply path for key components or suppliers. When problems occur in the supply chain, the impact on key nodes can be quickly evaluated and alternative shortest paths can be found. For example, if a key supplier stops supplying, other possible supply routes can be found through the shortest path information to minimize the impact on vehicle manufacturing.
[0084] After in-depth analysis of the supply chain graph using graph algorithms, optimization recommendations can be generated based on the analysis results.
[0085] Taking the analysis of the supply chain graph by the PageRank algorithm as an example, after calculating the PageRank value of each node through the PageRank algorithm, a PageRank value threshold can be preset according to the actual situation. By comparing the PageRank value of each node with the threshold, nodes with higher importance can be screened out as key suppliers. The generated optimization suggestions can then include focusing on key suppliers, establishing closer cooperative relationships, increasing inventory reserves, etc. For example, if a key supplier has a high PageRank value but low supply reliability, you can consider signing a long-term contract with the supplier or looking for alternative suppliers.
[0086] Step 104: Visually display the annotated supply chain diagram.
[0087] After deeply analyzing the supply chain graph through graph algorithms, NebulaGraph is used as a graph database to store the analyzed supply chain graph data, and NebulaGraph Studio (NebulaGraph visualization tool) is used for visualization. The supply chain graph data includes point data and edge data. The point data written into Nebula Graph represents the node information in the supply chain graph. Each node has the following properties:
[0088] 1. Node ID: used to uniquely identify a node.
[0089] 2. Node name: describes the specific entity of the node.
[0090] 3. PageRank value: a node importance index calculated by the PageRank algorithm.
[0091] 4. Community: The community to which the node belongs, determined by the community detection algorithm.
[0092] The edge data written into Nebula Graph represents the connection information between nodes in the supply chain graph and has the following properties:
[0093] 1. Source node ID: indicates the ID of the starting node of the edge.
[0094] 2. Target node ID: indicates the ID of the end node of the edge.
[0095] 3. Edge type: describes the type of relationship represented by the edge. In the supply chain, "SUPPLIES" usually represents the supply relationship.
[0096] In Nebula Graph, you need to create vertex labels and edge types first, and then import edge data and point data. After importing edge data and point data, use Studio's query and visualization functions to display the supply chain status. Through the visualization interface of NebulaGraphStudio, you can intuitively display the structure and properties of the supply chain graph. For example, you can set the higher the PageRank value, the darker the color of the node when visualized, indicating that the node is more important; the same color can also be set to the same community; the shortest path can be set to a line of a special color; use different line styles to indicate the type of edge. Finally, users can view nodes and edges in a specific area or of a specific type by zooming, panning, and filtering.
[0097] Through the above method, using Spark GraphX's graph algorithm, through in-depth analysis of the supply chain of each segment in the vehicle manufacturing process, it is possible to identify key nodes and potential supply chain risk points, and then formulate corresponding risk mitigation plans; through Nebula Graph's visualization tool, the supply chain status can be intuitively displayed, including the importance of suppliers, inventory levels, logistics efficiency, etc., to improve the transparency and operability of supply chain management.
[0098] In an embodiment of the present invention, supply chain data from at least one data source in the vehicle manufacturing process is collected, and the supply chain data from at least one data source is merged, and the merged supply chain data is loaded into a target database; the supply chain data is converted into a supply chain graph; wherein the supply chain graph includes nodes and edges, the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between nodes; the key nodes in the supply chain graph and the dependencies between the nodes are marked to obtain a marked supply chain graph; and the marked supply chain graph is visualized. The embodiment of the present invention can efficiently process and analyze large-scale supply chain data sets, integrate data scattered in different systems, and can perform in-depth analysis of various supply chain sectors in the vehicle manufacturing process, identify key nodes and potential supply chain risks; in addition, based on the in-depth analysis results, specific supply chain optimization suggestions can be provided, and corresponding risk mitigation plans can be formulated; visualization tools can also be used to intuitively display the supply chain status, monitor and dynamically adjust the entire manufacturing supply chain. It can not only improve the efficiency and transparency of the supply chain, but also enhance the resilience and responsiveness of the supply chain, helping enterprises to maintain competitiveness in a complex and changing market environment.
[0099] In an optional embodiment of the present invention, step 101 further includes the following steps:
[0100] S1011, regularly acquiring the supply chain data from at least one data source;
[0101] S1012, converting the format of the supply chain data to obtain supply chain data that conforms to the target database format;
[0102] S1013, loading the supply chain data conforming to the target database format into the target database.
[0103] In the embodiment of the present invention, it is assumed that there are three data sources: an enterprise resource planning system, a supply chain management system, and an inventory management system. It is assumed that the target database is Doris.
[0104] Configure Seatunnel tasks, create Seatunnel task configuration files, define data sources, data targets, conversion rules, etc.;
[0105] Map the data in different systems to a unified data model, use a scheduled task tool (cron) or a scheduling tool (Airflow) to regularly run Seatunnel tasks, extract the supply chain data to a temporary storage area, clean and convert the supply chain data to meet the format requirements of Doris, and finally load the cleaned and converted supply chain data into Doris and create the corresponding data table.
[0106] Specifically, the code example for integrating data into Doris is as follows:
[0107]
[0108]
[0109]
[0110] In this example, in the source section, MongoDB: configures the data source as MongoDB.
[0111] uri: MongoDB connection URI, including username, password and host address;
[0112] database: MongoDB database name;
[0113] collection: MongoDB collection name;
[0114] Schema: defines the fields and their data types in the MongoDB collection;
[0115] fields: List of fields.
[0116] c_map: a map<string,string> A field of type represents a collection of key-value pairs.
[0117] c_array: an array <int>A field of type representing an array of integers.
[0118] c_string: A field of string type, representing a string.
[0119] c_boolean: A boolean type field, representing a Boolean value.
[0120] In the sink section, Doris: This section configures the data destination as the Doris database;
[0121] fenodes: the address and port of the Doris FE (Frontend) node;
[0122] Username: The username to connect to Doris, here is root;
[0123] password: password to connect to Doris;
[0124] database: the name of the Doris database to be written;
[0125] table: the name of the Doris table to be written;
[0126] sink.label-prefix: The label prefix used when data is written to Doris, which is used to identify data batches;
[0127] sink.enable-2pc: Whether to enable two-phase commit (2PC). If set to true, it means enabled.
[0128] sink.enable-delete: whether to enable the delete operation. If set to true, it means enabled.
[0129] doris.config: Doris related configuration;
[0130] format: the format in which data is written to Doris, here is json;
[0131] read_json_by_line: Whether to read JSON data by line. If set to true, it means reading by line.
[0132] This code example reads data from MongoDB (from the source_table collection of the test_db database) and writes it to the e2e_table_sink table in the test database of the Doris database. The data format is JSON, and two-phase commit and delete operations are enabled.
[0133] In an optional embodiment of the present invention, step 102 further includes the following sub-steps:
[0134] S1021, reading the supply chain data in the target database;
[0135] S1022, extracting node data and edge data from the supply chain data; the node data is a vehicle manufacturer, supplier or component in the supply chain data, and the edge data is a supply relationship between the node data;
[0136] S1023: construct a supply chain graph according to the node data and the edge data.
[0137] Specifically, add Doris's JDBC driver dependency in Spark; create a Spark Session object, use Spark's JDBC connection to read the supply chain data in the Doris data warehouse into a DataFrame, and then use Spark GraphX to convert the supply chain data into a supply chain graph.
[0138] The following is a code example of Spark GraphX building a graph:
[0139]
[0140] Among them, import the necessary libraries:
[0141] import org.apache.spark.sql.SparkSession
[0142] import org.apache.spark.graphx._
[0143] SparkSession: It is the unified entry point introduced in Spark 2.0 for interacting with Spark.
[0144] GraphX: This is Spark's graph computing library, which provides graph representation and operations.
[0145] Create SparkSession and SparkContext:
[0146] SparkSession: Create a SparkSession instance named SupplyChainGraph;
[0147] SparkContext: Get SparkContext from SparkSession, which is the core component of Spark and is used to interact with the cluster.
[0148] Assume df is a DataFrame containing supply chain data;
[0149] vertices: Select the entity_id and entity_name columns from the DataFrame and convert it to an RDD. Each vertex is represented by a tuple where the first element is the vertex's ID (entity_id) and the second element is the vertex's name (entity_name)
[0150] edges: Select the src_id and dst_id columns from the DataFrame and convert them to RDD. Each edge is represented by an Edge object, where src_id is the source vertex ID of the edge and dst_id is the destination vertex ID of the edge.
[0151] Build a graph: Use the Graph class to build a graph from vertices and edges. Graph is the core data structure in GraphX, representing a directed graph.
[0152] Specifically, Vertices represent nodes in the graph, each of which consists of a unique ID and a name or label. In a supply chain graph, a node can be a vehicle manufacturer, supplier, or component. For example, the node ID can be the unique code of the supplier, and the node name can be the name of the supplier.
[0153] Edges represent the edges in the graph. Each edge connects two nodes and represents the supply relationship between them. For example, an edge can point from a supplier node to a vehicle manufacturer node, indicating that the supplier supplies parts to the vehicle manufacturer.
[0154] In an optional embodiment of the present invention, step 103 further includes the following sub-steps:
[0155] S1031, determining the key nodes in the supply chain graph and the dependency relationships between the nodes;
[0156] S1032, marking the key nodes in the supply chain graph and the dependency relationships between the nodes to obtain the marked supply chain graph.
[0157] Specifically, after converting the supply chain data into a supply chain graph, the graph algorithm of Spark GraphX can be used to deeply analyze and optimize the supply chain. For example, the PageRank algorithm can be applied to identify key nodes in the supply chain graph, the community detection algorithm can be applied to identify natural groupings in the supply chain, the Strongly Connected Components (SCC) algorithm can be applied to identify closely dependent subgraphs in the supply chain, the triangle counting algorithm can be applied to reflect the degree of close cooperation in the supply chain, and the shortest path algorithm can be applied to determine the shortest supply path for key components or suppliers. The results obtained through the graph algorithm analysis can be annotated on the nodes and edges in the supply chain graph, that is, the nodes in the supply chain graph have attributes such as PageRank values and the communities they belong to; the edges have attributes such as relationship types.
[0158] In an optional embodiment of the present invention, S1031 further includes the following sub-steps:
[0159] S1031-1, calculating the webpage ranking value of each node in the supply chain graph, and determining the key nodes in the supply chain graph according to the magnitude of the webpage ranking value.
[0160] Specifically, the PageRank algorithm is used to iteratively calculate the importance score of each node in the supply chain graph, namely the PageRank value. The parameter in the algorithm (such as 0.0001) is the convergence threshold. When the change in the PageRank value of the node in each iteration is less than the threshold, the algorithm stops iterating.
[0161] In a supply chain graph, the PageRank value of a node can indicate the importance of the node in the supply chain. For example, a high PageRank value of a supplier node may mean that it has a high influence in the supply chain, such as supplying key components or having cooperative relationships with multiple other important suppliers.
[0162] S1031-2, perform a depth-first search on the supply chain graph, assign timestamps to the nodes in the supply chain graph, reverse the direction of the edges in the supply chain graph to perform a depth-first search, and determine the close dependency between the nodes in the supply chain graph by the size of the timestamps of the nodes in the supply chain graph.
[0163] Specifically, the strongly connected component algorithm can be used to identify strongly connected subgraphs in the supply chain network, where the nodes in these subgraphs are mutually reachable. First, a depth-first search (DFS) is performed on the graph, and a timestamp (the time when the current node is searched) is assigned to each node; then, the direction of all edges in the supply chain graph is reversed to obtain a reverse graph, and a DFS is performed on the reverse graph, starting from the node with the largest timestamp, and the visited nodes are assigned to the same strongly connected component.
[0164] In a supply chain, strongly connected components may represent groups of suppliers that work closely together or supply chain links with high dependencies. For example, if a supplier in a strongly connected component has a problem, it may affect other suppliers and vehicle manufacturers in the entire subgraph.
[0165] S1031-3: for any three nodes in the supply chain graph, determine the high dependency relationship between the nodes in the supply chain graph based on the similarity of the neighboring nodes of the nodes.
[0166] Specifically, a triangle counting algorithm is used to reflect the close cooperation in the supply chain network. By enumerating the triples (combinations of three nodes) in the graph, checking whether they form a triangle, and checking whether the three nodes are connected by edges to form a closed triangle. For each node, traverse the neighbor nodes of its neighbor nodes, find common neighbors, and thus determine the number of triangles. In Spark GraphX, the graph.triangleCount() method can be used to count the number of triangles.
[0167] The triangle count can reflect the close cooperation in the supply chain network. In social network analysis, triangles usually represent close relationships between friends. In a supply chain graph, a triangle can represent a close relationship between three nodes, corresponding to the close cooperation between three suppliers in the actual supply chain, or the close relationship between a supplier, a component, and the vehicle manufacturer. A higher number of triangles may mean that there is a high degree of cooperation and dependence in some parts of the supply chain.
[0168] In addition to using the above three algorithms to analyze the supply chain graph, the community detection algorithm can also be used to discover closely connected subnetworks in the supply chain, and the shortest path algorithm can calculate the shortest path between all node pairs.
[0169] Specifically, algorithms based on modularity optimization, such as the Louvain algorithm, can be used. This algorithm continuously assigns nodes to different communities so that the connections within the community are tight, while the connections between communities are relatively sparse. The results of community detection can help companies understand the cooperative groups in the supply chain, for example, to find out which suppliers cooperate more closely, or which parts belong to the same supply community. Among them, the Louvain algorithm is an algorithm for community detection, which is particularly suitable for large-scale networks. It divides the nodes in the network by maximizing modularity, thereby identifying the community structure.
[0170] Modularity: Modularity is an indicator to measure the quality of community division, which indicates the difference between the density of edges within the community and the expected density under random conditions. The higher the modularity, the better the community division;
[0171] Community: A community refers to a group of closely connected nodes in a network. The connections between nodes within the community are denser than the connections between nodes outside the community.
[0172] The Louvain algorithm consists of two main phases, which are iterated until modularity stops increasing:
[0173] Phase 1: Community Division
[0174] Initialization: Each node in the graph is initially considered as an independent community;
[0175] Local optimization: For each node, try to move it to the community where the neighboring nodes are located, and calculate the change in modularity after the move. Select the move that increases the modularity the most and execute it. Repeat this process until no node's move can increase the modularity.
[0176] Phase 2: Community Aggregation
[0177] Community aggregation: Each community is regarded as a new node, and the edge weight between communities is the sum of the weights of the edges between the original communities;
[0178] Recursive execution: Repeat phase 1 and phase 2 for the new node network until the modularity stops increasing.
[0179] The Louvain algorithm can be used to identify communities in the supply chain graph. The nodes in the same community are closely connected, that is, the suppliers represented by the nodes have a close cooperative relationship. This can help companies optimize the structure and process of the supply chain network, formulate risk management strategies, optimize supplier selection and management strategies, and ultimately improve the overall performance and competitiveness of the supply chain.
[0180] For a specific key component or supplier node, take the node as the source node and the vehicle manufacturer node as the target node, and use the shortest path algorithm to calculate the shortest path from the source node to the target node. In Spark GraphX, you can use the graph.shortestPaths() method to calculate the shortest path. You can specify a specific set of source and target nodes, or calculate the shortest path between all node pairs. Determine the shortest supply path for key components or suppliers, mainly to quickly evaluate the impact on key nodes and find alternative shortest paths when problems occur in the supply chain. For example, if a key supplier stops supplying, other possible supply routes can be found through the shortest path information to minimize the impact on vehicle manufacturing.
[0181] In one embodiment of the present invention, it is assumed that there are the following entities in the supply chain:
[0182] Vehicle Manufacturer A (ID: 1)
[0183] Supplier B (ID: 2)
[0184] Supplier C (ID: 3)
[0185] Supplier D (ID: 4)
[0186] Supplier E (ID: 5)
[0187] The supply relationship is as follows:
[0188] Supplier B supplies key components to vehicle manufacturer A;
[0189] Supplier C supplies common parts to vehicle manufacturer A;
[0190] Supplier D supplies raw materials to Supplier B;
[0191] Supplier E supplies auxiliary materials to Supplier C;
[0192] Assume that after multiple iterations, i.e., frequently traversing the relationship between each node and its adjacent nodes, and the adjacent nodes of the adjacent nodes, the following PageRank values are obtained:
[0193] Vehicle Manufacturer A: 0.3
[0194] Supplier B: 0.4
[0195] Supplier C: 0.2
[0196] Supplier D: 0.1
[0197] Supplier E: 0.15
[0198] This indicates that supplier B is relatively important in the supply chain, probably because it supplies key components and is directly connected to vehicle manufacturer A, and obtains raw material supply from supplier D, thus occupying a relatively core position in the supply chain.
[0199] After running the community detection algorithm, these entities can be divided into two communities:
[0200] Community 1: Vehicle manufacturer A, supplier B, supplier D. In this community, supplier B supplies key parts to vehicle manufacturer A, and supplier D supplies raw materials to supplier B. The connection between them is relatively close.
[0201] Community 2: Supplier C, Supplier E. Supplier E supplies auxiliary materials to Supplier C, forming another relatively independent community.
[0202] After analyzing the graph using the strongly connected component algorithm, it may be found that the strongly connected components are:
[0203] Strongly connected component 1: Supplier B, Supplier D. Because Supplier D supplies raw materials to Supplier B, and Supplier B depends on the supply of Supplier D, they are reachable to each other, forming a strongly connected component.
[0204] Through the triangle counting algorithm, assume that the triangles in the graph are as follows:
[0205] There are no direct triangle triplets, that is, the three nodes cannot form a closed triangle. The triangle count is 0. This may indicate that there is currently no very close three-party cooperation relationship between these suppliers.
[0206] With the shortest path algorithm, let's assume that we are concerned about the supply path of key components. If there is a problem with supplier B, we calculate the shortest path with supplier B as the source node and vehicle manufacturer A as the target node. If there are no other suppliers that directly supply key components, it may be necessary to find a path that indirectly supplies through other suppliers. For example, if supplier C has the potential to supply similar key components under certain conditions, then the path from supplier C to vehicle manufacturer A may become an alternative shortest path.
[0207] The following is a code example of applying graph algorithms to the supply chain graph:
[0208]
[0209]
[0210] Specifically, create the SparkSession and sparkContext parts, SparkSession: Create a SparkSession instance named SupplyChainGraphExample.
[0211] Create a DataFrame containing the supply chain data
[0212] DataFrame: Create a DataFrame containing the supply chain data. Each row of data represents an entity (such as a vehicle manufacturer or supplier) and its attributes.
[0213] entity_id: unique identifier of the entity, entity_name: name of the entity, src_id: source node ID of the edge, dst_id: destination node ID of the edge, price: price (optional), capacity: capacity (optional), has_alternative: whether there is an alternative supplier (optional).
[0214] PageRank: Calculates the PageRank value of each vertex in the graph. PageRank is an algorithm used to evaluate the importance of nodes in a graph. 0.0001 is the convergence threshold, which means that the algorithm stops iterating when the change in PageRank value is less than this threshold.
[0215] Connected Components: Computes the connected components in a graph. A connected component is a set of nodes in a graph that are connected to each other. This algorithm returns a new graph where the attribute of each vertex is the identifier of the connected component to which it belongs.
[0216] Strongly Connected Components: Computes the strongly connected components in the graph. A strongly connected component is a set of mutually reachable nodes in the graph. seed=1L means using 1 as the random seed to ensure the repeatability of the results.
[0217] Triangle Count: Counts the number of triangles that each vertex in the graph participates in. Triangle count is used to measure the compactness of the graph. This algorithm returns a new graph where the attribute of each vertex is the number of triangles it participates in.
[0218] Shortest Paths: Computes the shortest path from a given vertex (here 1L, "Vehicle Manufacturer A") to all other vertices in the graph. This algorithm returns a new graph where the attribute of each vertex is a mapping representing the shortest path distance from the source vertex to that vertex.
[0219] Through the application of the above-mentioned graph algorithms, we can gain a deeper understanding of the structure and characteristics of the supply chain and provide strong support for corporate decision-making.
[0220] By using Spark GraphX's graph algorithm, in-depth analysis of the supply chain of each sector in the vehicle manufacturing process can identify key nodes and potential supply chain risk points, such as reduced raw material production capacity or supplier legal and regulatory issues. If a supplier cannot provide products due to legal and regulatory issues, the PageRank algorithm can be used to identify key nodes and quickly find alternative suppliers to avoid production interruptions. After identifying key nodes, corresponding risk mitigation plans can also be formulated, such as establishing an alternative supply chain or diversifying procurement, thereby enhancing the resilience and risk resistance of the supply chain.
[0221] In an optional embodiment of the present invention, S1031 further includes the following sub-steps:
[0222] Determine an improvement plan in the vehicle manufacturing process based on the key nodes in the supply chain diagram and the dependency relationship between the nodes, and mark the improvement plan in the supply chain diagram.
[0223] Specifically, after analyzing the supply chain graph through a graph algorithm, supply chain optimization suggestions in the vehicle manufacturing process can be generated based on the analysis results.
[0224] In the embodiment of the present invention, the analysis of the supply chain graph using the PageRank algorithm is taken as an example. After the PageRank value of each node in the supply chain graph is calculated by the PageRank algorithm, the nodes with higher importance are screened out as key suppliers by comparing the PageRank value of each node with the threshold. In view of this, the generated optimization suggestions may include focusing on key suppliers, establishing closer cooperative relationships, increasing inventory reserves, etc. For example, if a key supplier has a high PageRank value but low supply reliability, it may be considered to sign a long-term contract with the supplier or find an alternative supplier.
[0225] The following is an example of code that generates optimization suggestions:
[0226]
[0227] Among them, threshold is a PageRank value threshold set according to actual conditions, which is used to filter out suppliers with PageRank values higher than the threshold.
[0228] pageRankGraph.vertices: Gets the PageRank value of each vertex in the graph calculated by the PageRank algorithm; pageRankGraph.vertices returns an RDD, where each element is a tuple (id, rank), representing the vertex ID and the corresponding PageRank value.
[0229] filter: Use the filter method to filter out vertices whose PageRank values are greater than the threshold; case(id,rank)=>rank>threshold is a pattern match used to extract the vertex ID and PageRank value, and determine whether the PageRank value is greater than the threshold.
[0230] map: Convert the filtered vertex information into a string format, such as "Supplier 2with PageRank0.7".
[0231] keySuppliers.map: Further process the selected key suppliers and generate optimization suggestions.
[0232] if(supplierPageRank>0.8): Generate different recommendations based on the supplier's PageRank value. If the supplier's PageRank value is greater than 0.8, it is recommended to establish a strategic partnership with it; otherwise, it is recommended to closely monitor its supply situation.
[0233] s"Establish strategic partnership with$supplier.": Generates a suggestion string, for example, "Establish strategic partnership with Supplier 2with PageRank 0.7.".
[0234] s"Monitor closely the supply from$supplier.": Generates a suggestion string, for example "Monitor closely the supply from Supplier 2with PageRank 0.7."
[0235] Use the results of the PageRank algorithm to identify key suppliers and generate optimization recommendations based on their importance, thereby helping companies optimize supply chain management.
[0236] In the embodiment of the present invention, through in-depth analysis and optimization suggestions, enterprises can optimize inventory management, production planning and logistics strategies, reduce costs and improve efficiency; if a supplier cannot provide products due to legal and regulatory issues, key nodes can be identified through PageRank algorithms, etc., and alternative suppliers can be quickly found to avoid production interruptions.
[0237] In an optional embodiment of the present invention, step 104 further includes the following sub-steps:
[0238] S1041, reading the annotated node data and edge data in the supply chain graph;
[0239] S1042, importing the node data and the edge data into a graph database for visual display;
[0240] S1043, visualize the annotated supply chain graph using a graph database visualization tool.
[0241] Specifically, in one embodiment of the present invention, it is assumed that there are the following entities in the supply chain: vehicle manufacturer A (ID: 1), supplier B (ID: 2), supplier C (ID: 3), supplier D (ID: 4), and supplier E (ID: 5).
[0242] After in-depth analysis of the supply chain graph through graph algorithms, the nodes in the supply chain graph have the following properties:
[0243] 1. Node ID: used to uniquely identify a node. For example, the ID of vehicle manufacturer A is 1, the ID of supplier B is 2, etc.
[0244] 2. Node name: describes the specific entity of the node, such as "Vehicle Manufacturer A", "Supplier B", etc.
[0245] 3. PageRank value: The node importance index calculated by the PageRank algorithm. For example, suppose the PageRank value of vehicle manufacturer A is 0.3 and the PageRank value of supplier B is 0.4;
[0246] 4. Community: The community to which the node belongs, as determined by the community detection algorithm. For example, "community1" means that the node belongs to the first community.
[0247] The edge data written into Nebula Graph represents the connection information between nodes in the supply chain graph and has the following properties:
[0248] 1. Source node ID: indicates the ID of the starting node of the edge. For example, the ID of supplier D is 4. If there is an edge from supplier D to supplier B, then the source vertex ID here is 4;
[0249] 2. Target node ID: indicates the ID of the end node of the edge. Continuing with the above example, the ID of supplier B is 2, so the target vertex ID here is 2;
[0250] 3. Edge type: describes the type of relationship represented by the edge. In the supply chain, "SUPPLIES" usually represents the supply relationship. For example, supplier D supplies raw materials to supplier B, and the type of this edge is "SUPPLIES".
[0251] Specifically, in Nebula Graph, you need to create vertex labels and edge types before you can import data.
[0252] Creating vertex labels and edge types is as follows:
[0253] CREATE TAG IF NOT EXISTS manufacturer(name string);
[0254] CREATE TAG IF NOT EXISTS supplier(name string);
[0255] CREATE EDGE IF NOT EXISTS supplies();
[0256] Here two vertex labels "manufacturer" (for vehicle manufacturers) and "supplier" (for suppliers) are created, as well as an edge type "supplies" (representing the supply relationship).
[0257] After importing edge data and point data, use Studio's query and visualization functions to display the supply chain status. Through NebulaGraph Studio's visualization interface, you can intuitively display the structure and properties of the supply chain graph. For example, you can set the higher the PageRank value, the darker the color of the node when visualized, indicating that the node is more important; the same community can also be set to the same color; the shortest path can be set to a line of a special color; use different line styles to indicate the type of edge. Finally, users can view nodes and edges in a specific area or a specific type by zooming, panning, and filtering.
[0258] In the embodiment of the present invention, the supply chain status, including the importance of suppliers, inventory levels, logistics efficiency, etc., can be intuitively displayed through the visualization tool of NebulaGraph, thereby improving the transparency and operability of supply chain management.
[0259] In an optional embodiment of the present invention, an automation script can be written using a shell script, a Python script, or a workflow management tool (such as Dolphin Scheduler) to realize automation of supply chain analysis and optimization. The automation script sequentially performs data integration, graph construction, analysis and calculation, result import, and visualization.
[0260] You can use cron to set up scheduled tasks and execute automated scripts regularly to ensure the timeliness of supply chain analysis and optimization. For example, you can run an automated script every night to update the supply chain map and analysis results.
[0261] In the embodiments of the present invention, through system integration and automation, the efficient operation of data flow, analysis process and feedback mechanism is ensured, manual intervention is reduced, and the efficiency of overall supply chain analysis and optimization is improved.
[0262] Reference Figure 2 , shows a visual display diagram of a supply chain diagram provided by an embodiment of the present invention, as follows:
[0263] The arrows in the figure represent dependencies, i.e. supply relationships. For example, battery raw material supplier A supplies battery raw materials to battery supplier A, range extender raw material suppliers B and C supply range extender raw materials to range extender supplier B, rubber raw material supplier E supplies rubber raw materials to tire supplier E and tire manufacturing workshops, and so on.
[0264] The PageRank value represents the importance of the supplier in the supply chain. For example, the range extender supplier B supplies a key component and is directly connected to car A. It also obtains raw materials from range extender raw material suppliers B and C. It is in a relatively core position in the supply chain, so its PageRank value is relatively high. When performing a visual display, this node can be set to the darkest color. At this time, you can generate optimization suggestions for this, such as focusing on this node, establishing a closer cooperative relationship, and increasing inventory reserves.
[0265] If two suppliers of XX raw materials are identified in the supply chain, the diagram can show that these two suppliers of XX raw materials are substitutes for each other, that is, when one of them has a problem and cannot supply, another supplier that can replace it can be directly found.
[0266] Reference Figure 3 , showing a schematic diagram of the structure of a supply chain visualization device provided by an embodiment of the present invention, the device comprising:
[0267] The data acquisition and merging module 201 is used to collect supply chain data from at least one data source in the vehicle manufacturing process, merge the supply chain data from at least one data source, and load the merged supply chain data into a target database;
[0268] A conversion module 202, configured to convert the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, wherein the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between the nodes;
[0269] A labeling module 203, used to label key nodes in the supply chain graph and dependencies between the nodes to obtain the labeled supply chain graph;
[0270] The visualization module 204 is used to visualize the annotated supply chain diagram.
[0271] In an optional embodiment of the present invention, the data acquisition and merging module 201 includes:
[0272] An acquisition module, used for periodically acquiring the supply chain data from at least one data source;
[0273] A format conversion module, used to convert the format of the supply chain data to obtain the supply chain data that conforms to the target database format;
[0274] The data loading module is used to load the supply chain data conforming to the target database format into the target database.
[0275] In an optional embodiment of the present invention, the conversion module 202 includes:
[0276] A reading module, used for reading the supply chain data in the target database;
[0277] An extraction module, used to extract node data and edge data from the supply chain data; the node data is a vehicle manufacturer, supplier or component in the supply chain data, and the edge data is a supply relationship between the node data;
[0278] A construction module is used to construct a supply chain graph according to the node data and the edge data.
[0279] In an optional embodiment of the present invention, the marking module 203 includes:
[0280] An analysis module, used to determine the key nodes in the supply chain diagram and the dependencies between the nodes;
[0281] The supply chain diagram annotation module is used to annotate the key nodes in the supply chain diagram and the dependency relationships between the nodes to obtain the annotated supply chain diagram.
[0282] In an optional embodiment of the present invention, the analysis module includes:
[0283] A key node determination module, used to calculate the webpage ranking value of each node in the supply chain diagram, and determine the key nodes in the supply chain diagram according to the size of the webpage ranking value;
[0284] A first dependency determination module is used to perform a depth-first search on the supply chain graph, assign timestamps to nodes in the supply chain graph, reverse the direction of the edges in the supply chain graph to perform a depth-first search, and determine the close dependency between the nodes in the supply chain graph by the size of the timestamps of the nodes in the supply chain graph;
[0285] The second dependency determination module is used to determine, for any three nodes in the supply chain graph, a high degree of dependency between the nodes in the supply chain graph based on the similarity of neighboring nodes of the nodes.
[0286] In an optional embodiment of the present invention, the analysis module further includes:
[0287] An improvement module is used to determine an improvement plan in the vehicle manufacturing process according to the key nodes in the supply chain diagram and the dependency relationship between the nodes, and mark the improvement plan in the supply chain diagram.
[0288] In an optional embodiment of the present invention, the visualization module 204 includes:
[0289] A data reading module, used to read the node data and edge data in the labeled supply chain graph;
[0290] A data import module, used to import the node data and the edge data into a graph database for visual display;
[0291] The visualization display module is used to visualize the annotated supply chain graph through a graph database visualization tool.
[0292] In an embodiment of the present invention, supply chain data from at least one data source in the vehicle manufacturing process is collected, and the supply chain data from at least one data source is merged, and the merged supply chain data is loaded into a target database; the supply chain data is converted into a supply chain graph; wherein the supply chain graph includes nodes and edges, the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between nodes; the key nodes in the supply chain graph and the dependencies between the nodes are marked to obtain a marked supply chain graph; and the marked supply chain graph is visualized. The embodiment of the present invention can efficiently process and analyze large-scale supply chain data sets, integrate data scattered in different systems, and can perform in-depth analysis of various supply chain sectors in the vehicle manufacturing process, identify key nodes and potential supply chain risks; in addition, based on the in-depth analysis results, specific supply chain optimization suggestions can be provided, and corresponding risk mitigation plans can be formulated; visualization tools can also be used to intuitively display the supply chain status, monitor and dynamically adjust the entire manufacturing supply chain. It can not only improve the efficiency and transparency of the supply chain, but also enhance the resilience and responsiveness of the supply chain, helping enterprises to maintain competitiveness in a complex and changing market environment.
[0293] An embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the supply chain visualization method as described above is implemented.
[0294] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0295] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0296] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the supply chain visualization method as described above is implemented.
[0297] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0298] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0299] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0300] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0301] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.< / int>
Claims
1. A supply chain visualization method, characterized in that: The method comprises: Collecting supply chain data from at least one data source during a vehicle manufacturing process, merging the supply chain data from at least one data source, and loading the merged supply chain data into a target database; Converting the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between the nodes; Annotating key nodes in the supply chain graph and dependency relationships between the nodes to obtain the annotated supply chain graph; The labeled supply chain diagram is visualized.
2. The method according to claim 1, characterized in that The merging of the supply chain data from at least one data source and loading the merged supply chain data into a target database includes: acquiring the supply chain data from at least one data source at a regular interval; Converting the supply chain data into a format that conforms to the target database format; The supply chain data conforming to the target database format is loaded into the target database.
3. The method according to claim 1, characterized in that The converting the supply chain data into a supply chain graph comprises: Reading supply chain data in the target database; Extracting node data and edge data from the supply chain data; the node data is a vehicle manufacturer, supplier or component in the supply chain data, and the edge data is a supply relationship between the node data; A supply chain graph is constructed according to the node data and the edge data.
4. The method according to claim 1, characterized in that: The marking of the key nodes in the supply chain graph and the dependency relationships between the nodes to obtain the marked supply chain graph includes: Determine key nodes in the supply chain graph and dependencies between the nodes; The key nodes in the supply chain graph and the dependency relationships between the nodes are marked to obtain the marked supply chain graph.
5. The method according to claim 4, characterized in that Determining the key nodes in the supply chain graph and the dependency relationships between the nodes includes: Calculating the webpage ranking value of each node in the supply chain graph, and determining the key nodes in the supply chain graph according to the magnitude of the webpage ranking value; Performing a depth-first search on the supply chain graph, assigning timestamps to nodes in the supply chain graph, reversing the direction of the edges in the supply chain graph to perform a depth-first search, and determining the close dependency between the nodes in the supply chain graph by the sizes of the timestamps of the nodes in the supply chain graph; For any three nodes in the supply chain graph, based on the similarities of neighboring nodes of the nodes, a high degree of dependency between the nodes in the supply chain graph is determined.
6. The method according to claim 4, characterized in that The determining of the key nodes in the supply chain graph and the dependency relationships between the nodes further includes: Determine an improvement plan in the vehicle manufacturing process based on the key nodes in the supply chain diagram and the dependency relationship between the nodes, and mark the improvement plan in the supply chain diagram.
7. The method according to claim 1, characterized in that The visual display of the annotated supply chain diagram includes: Reading the annotated node data and edge data in the supply chain graph; Importing the node data and the edge data into a graph database for visual display; The labeled supply chain graph is visualized through a graph database visualization tool.
8. A supply chain visualization device, characterized in that: The device comprises: a data acquisition and merging module, used for collecting supply chain data from at least one data source in a vehicle manufacturing process, merging the supply chain data from at least one data source, and loading the merged supply chain data into a target database; A conversion module, configured to convert the supply chain data into a supply chain graph; wherein the supply chain graph includes nodes and edges, wherein the nodes are vehicle manufacturers, suppliers or parts in the supply chain data, and the edges are supply relationships between the nodes; A labeling module, used to label key nodes in the supply chain graph and dependencies between the nodes to obtain the labeled supply chain graph; A visualization module is used to visualize the labeled supply chain diagram.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the supply chain visualization method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the supply chain visualization method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Risk early warning method and system based on automobile service supply chain
CN120317686A