Logistics state prediction method based on spatial-temporal characteristics

Through a deep learning model based on spatiotemporal features, combined with workshop layout and historical logistics data, the traditional methods have solved the shortcomings in prediction accuracy and adaptability, and achieved more accurate logistics state prediction and more efficient production management.

CN119090048APending Publication Date: 2024-12-06CHONGQING SHOUHENG SOFTWARE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411063271.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional production logistics prediction methods have limited prediction accuracy when processing large-scale, high-dimensional and nonlinear data, making it difficult to adapt to rapidly changing production needs and complex and changing workshop environments, and lack the combination of workshop layout information with logistics time series data. The effective means of the logistics status prediction results are deviated from the actual situation.

Method used

A logistics state prediction method based on spatiotemporal characteristics is proposed. By obtaining historical data from the workshop information system, analyzing the workshop layout description file to generate topological structures, extracting time and spatial features, using deep learning models for nonlinear transformation processing, and optimizing model parameters to Improve prediction accuracy and generalization capabilities.

Benefits of technology

It significantly improves the accuracy of logistics state prediction and the generalization ability of the model, can characterize logistics state changes more comprehensively and meticulously, adapt to the complex workshop environment, and enhances the accuracy of production planning and resource allocation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090048A_ABST
    Figure CN119090048A_ABST
Patent Text Reader

Abstract

The invention provides a logistics state prediction method based on spatial-temporal characteristics. The method comprises the following steps: acquiring historical production logistics time sequence data, historical production logistics state sequence data and historical logistics states from a workshop information system; analyzing the workshop layout description file of the production workshop system to generate a workshop layout topological structure; based on the workshop layout topological structure, performing feature extraction on historical production logistics time sequence data and historical production logistics pattern sequence data to obtain historical logistics time features and historical logistics space features; the production logistics state space-time model predicts the logistics state based on the historical logistics time features and the historical logistics space features to obtain a predicted logistics state; and according to the historical logistics state and the predicted logistics state, optimizing model parameters of the production logistics state space-time model until a training ending standard is reached.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of digital twins, and in particular to a logistics status prediction method based on spatiotemporal characteristics. Background Art

[0002] With the in-depth development of the concepts of intelligent manufacturing and Industry 4.0, production logistics management, as one of the core links of modern manufacturing, has a direct impact on the operational efficiency of the entire production chain. Traditional production logistics forecasting methods mostly rely on statistical models, such as time series analysis and linear regression. Although these methods can handle data changes in the time dimension to a certain extent, they often ignore the complex interactive relationship between the spatial layout of the production environment and the logistics status. In addition, these traditional methods have limited prediction accuracy when facing large-scale, high-dimensional and nonlinear data, and are difficult to adapt to rapidly changing production needs and complex and changing workshop environments.

[0003] In particular, the physical structure of the workshop layout has a direct impact on logistics efficiency, but the existing technology lacks effective means to combine workshop layout information with logistics time series data for comprehensive analysis and prediction. This results in the inability of the logistics status prediction model to accurately reflect the changing laws of logistics status in the actual production environment, and the prediction results often deviate from the actual situation, affecting the accurate formulation of production plans and the efficient allocation of resources. Summary of the invention

[0004] The purpose of this application is to propose a logistics status prediction method based on spatiotemporal characteristics to solve or overcome the above-mentioned technical problems existing in the prior art.

[0005] According to a first aspect of an embodiment of the present application, a method for predicting logistics status based on spatiotemporal characteristics is provided, which includes:

[0006] Obtain historical production logistics time series data, historical production logistics status series data and historical logistics status from the workshop information system;

[0007] Parse the workshop layout description file of the production workshop system to generate the workshop layout topology structure;

[0008] Based on the workshop layout topology, feature extraction is performed on the historical production logistics time series data and the historical production logistics state series data to obtain historical logistics time features and historical logistics space features;

[0009] The production logistics state spatiotemporal model predicts the logistics state based on the historical logistics time characteristics and the historical logistics space characteristics to obtain the predicted logistics state;

[0010] According to the historical logistics status and the predicted logistics status, the model parameters of the production logistics status spatiotemporal model are optimized until the training end standard is reached.

[0011] In the present invention, firstly, the time series data and state series data of historical production logistics are collected from the workshop information system, and the historical logistics state information is obtained at the same time, providing a rich data basis for the model. Subsequently, by parsing the workshop layout description file, a topological structure diagram of the workshop layout is generated. This step takes the physical space layout into consideration and makes up for the lack of spatial information in the traditional prediction method. In addition, the workshop layout topology structure is used to extract deep features of historical data, and the time features and spatial features of historical logistics are respectively extracted. This fusion of spatiotemporal features not only considers the trend of logistics state evolution over time, but also fully considers the influence of factors such as logistics path and location on logistics state, and realizes a more comprehensive and detailed characterization of logistics state. On this basis, the spatiotemporal model of production logistics state is adopted. Based on the extracted spatiotemporal features, the features are processed by nonlinear transformation through deep learning structures such as fully connected layers, which effectively improves the model's ability to fit complex logistics state changes, thereby obtaining a more accurate prediction of logistics state. Finally, by comparing the historical logistics status with the predicted logistics status, the model parameters are iteratively optimized to ensure that the prediction model can continuously learn and adapt to new changes in logistics status until the model performance reaches the predetermined training standard, significantly improving the prediction accuracy and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Hereinafter, some specific embodiments of the present application will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings: Figure 1 A flow chart of a logistics status prediction method based on spatiotemporal characteristics provided in an embodiment of the present application. DETAILED DESCRIPTION

[0013] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0014] Figure 1 A flow chart of a logistics status prediction method based on spatiotemporal characteristics provided in an embodiment of the present application. Figure 1 As shown, it includes:

[0015] Obtain historical production logistics time series data, historical production logistics status series data and historical logistics status from the workshop information system;

[0016] Parse the workshop layout description file of the production workshop system to generate the workshop layout topology structure;

[0017] Based on the workshop layout topology, feature extraction is performed on the historical production logistics time series data and the historical production logistics state series data to obtain historical logistics time features and historical logistics space features;

[0018] The production logistics state spatiotemporal model predicts the logistics state based on the historical logistics time characteristics and the historical logistics space characteristics to obtain the predicted logistics state;

[0019] According to the historical logistics status and the predicted logistics status, the model parameters of the production logistics status spatiotemporal model are optimized until the training end standard is reached.

[0020] In the present invention, firstly, the time series data and state series data of historical production logistics are collected from the workshop information system, and the historical logistics state information is obtained at the same time, providing a rich data basis for the model. Subsequently, by parsing the workshop layout description file, a topological structure diagram of the workshop layout is generated. This step takes the physical space layout into consideration and makes up for the lack of spatial information in the traditional prediction method. In addition, the workshop layout topology structure is used to extract deep features of historical data, and the time features and spatial features of historical logistics are respectively extracted. This fusion of spatiotemporal features not only considers the trend of logistics state evolution over time, but also fully considers the influence of factors such as logistics path and location on logistics state, and realizes a more comprehensive and detailed characterization of logistics state. On this basis, the spatiotemporal model of production logistics state is adopted. Based on the extracted spatiotemporal features, the features are processed by nonlinear transformation through deep learning structures such as fully connected layers, which effectively improves the model's ability to fit complex logistics state changes, thereby obtaining a more accurate prediction of logistics state. Finally, by comparing the historical logistics status with the predicted logistics status, the model parameters are iteratively optimized to ensure that the prediction model can continuously learn and adapt to new changes in logistics status until the model performance reaches the predetermined training standard, significantly improving the prediction accuracy and generalization ability of the model.

[0021] Optionally, the acquiring of historical production logistics time series data, historical production logistics status series data and historical logistics status from the workshop information system includes:

[0022] Based on the workshop information database query statement, a workshop information database access request is constructed;

[0023] Based on the workshop information database access request, a workshop information database connector is constructed to access the workshop information database through the workshop information database connector and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status therefrom.

[0024] To this end, based on the above technical processing flow, the following technical benefits are achieved:

[0025] (1) Improved the automation level of data acquisition: By constructing workshop information database query statements and database connectors, the required historical data can be automatically obtained from the workshop information database without manual operation, which greatly improves the efficiency and automation level of data acquisition.

[0026] (2) Ensure data security and consistency: Using a database connector to access the database can ensure that the data transmission process is protected and reduce the risk of data leakage. At the same time, since data is obtained directly from the database, the consistency and accuracy of the data can be guaranteed.

[0027] (3) Enhanced system flexibility and maintainability: By building configurable database query statements and database connectors, query conditions can be easily modified or different databases can be connected, which enhances the flexibility and maintainability of the system.

[0028] (4) Supports real-time and accuracy of data: Data in the database is usually updated in real time. By directly obtaining data from the database, it can be ensured that the historical production logistics data obtained is the latest and accurate.

[0029] From the perspective of product implementation, the following is the code implementation using the SQLite database as an example:

[0030]

[0031]

[0032] Optionally, constructing a workshop information database access request based on a workshop information database query statement includes:

[0033] Based on a workshop information database query statement, the workshop information database query statement is parameterized and compiled to construct a data access request.

[0034] Optionally, based on the workshop information database access request, a workshop information database connector is constructed to access the workshop information database through the workshop information database connector and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status therefrom, including:

[0035] Based on the workshop information database access request, instantiate the API of the database interface and create a database session;

[0036] Based on the database session, the connection string format of the workshop information database is parsed to construct a connection string including the host, port, and database name;

[0037] Build a workshop information database connector based on the constructed connection string;

[0038] Based on the workshop information database connector, create a database cursor object;

[0039] The database cursor object is instantiated to access the workshop information database and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status therefrom.

[0040] Based on the above technical processing flow, the following technical benefits are achieved:

[0041] (1) Improved system configurability and flexibility: By parsing the connection string format to build a database connector, the system can automatically create and connect to different databases based on different database types and configuration information. This flexibility enables the system to adapt to a variety of database environments and reduces system maintenance costs.

[0042] (2) Enhanced system security and stability: By instantiating the database interface API and creating a database session, the system can ensure that standard API specifications are followed when connecting to the database, thereby improving the security and stability of data access. In addition, the instantiation of the database cursor object enables the system to accurately control the data access process and avoid potential security risks.

[0043] (3) Optimized data access performance: The creation and use of database cursor objects allows the system to access data in the database in a more efficient way. Through cursor objects, the system can obtain data on demand, reducing unnecessary data transmission and processing, thereby improving data access performance.

[0044] (4) Simplified data access programming: By encapsulating the logic of database connection and data access, the system provides developers with a concise and unified interface, so that developers do not need to worry about the specific implementation details of the underlying database, but only need to focus on the implementation of business logic. This greatly reduces the workload and complexity of data access programming.

[0045] The following sample code implements the process of parsing the connection string and creating a database session.

[0046]

[0047]

[0048] The above code shows how to use the sqlite3 library to parse the connection string, create a database session, build a database connector, and query the data.

[0049] Optionally, constructing a workshop information database connector according to the constructed connection string includes:

[0050] According to the constructed connection string, a match is made in the constructed database connector library to build a workshop information database connector that matches the type of the workshop information database, and a context manager is assigned to the workshop information database connector to recycle the workshop information database connector after completing the acquisition of the historical production logistics time series data, the historical production logistics status sequence data and the historical logistics status.

[0051] Based on the above technical processing flow, the following technical benefits are achieved:

[0052] (1) Improved system compatibility and scalability: By matching in the database connector library, the system can support a variety of different types of databases, including relational databases (such as MySQL, PostgreSQL), non-relational databases (such as MongoDB, Redis), etc. This greatly facilitates the expansion and upgrade of the system, and supports new database types without making extensive modifications to the core code.

[0053] (2) Optimized resource usage and management: Assigning a context manager to a database connector ensures that the database connector can be properly closed and recycled after obtaining the required data, avoiding resource leakage and waste. At the same time, the context manager can also automatically handle exceptions and errors, improving the robustness of the system.

[0054] (3) Simplified database connection management: With the context manager, developers do not need to manually open and close database connections. Instead, they can automatically create, use, and close connections through with statements when they need to use the database. This greatly simplifies database connection management and reduces the possibility of errors.

[0055] (4) Improved code readability and maintainability: By encapsulating the logic of database connection and access, the system provides developers with a concise and unified interface. This makes the code clearer, easier to understand and maintain. At the same time, because the management of database connections is automatically processed, developers can focus more on the implementation of business logic.

[0056] The following is an example code for the above solution:

[0057]

[0058]

[0059] In the sample code above, a DatabaseConnector base class is defined to represent the abstract interface of the database connector, and the SQL i teConnector class is implemented as the specific implementation of the SQL i te database. A context manager managed_connector is also used to encapsulate the creation, use, and closing of the database connector. Finally, the create_database_connector factory function is used to create the corresponding database connector according to the connection string, and it is used in the main program to query data.

[0060] Optionally, the creating a database cursor object based on the workshop information database connector includes:

[0061] Based on the workshop information database connector, generating a database cursor declaration;

[0062] importing query configuration parameters for the database cursor declaration to create a database cursor object;

[0063] Instantiate the database cursor object to access the workshop information database and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status; wherein the query configuration parameters include the following:

[0064] Time series data table name: the table name that stores historical production logistics time series data.

[0065] Time series data column name: including timestamp and logistics quantity column name;

[0066] Status sequence data table name: the table name for storing historical production logistics status sequence data;

[0067] Status sequence data column name: includes timestamp and logistics status column name.

[0068] Historical logistics status index: created by referring to the timestamp and logistics status column name defined in the status sequence data table name.

[0069] By creating a database cursor object based on the workshop information database connector and importing query configuration parameters into the cursor object, this technical processing flow brings the following benefits:

[0070] (1) Improved flexibility of data access: By configuring different query parameters for the cursor object, different data tables and columns can be easily accessed to meet different data requirements.

[0071] (2) Enhanced code readability and maintainability: Query configuration parameters are clearly defined and imported into the cursor object, making the code clearer and easier to understand. When you need to modify the query logic, you only need to adjust the query configuration parameters without modifying the core code.

[0072] (3) Reduced data access error rate: By specifying clear data table names and data column names for cursor objects, data access problems caused by incorrect operations or input errors are reduced.

[0073] (4) Improved data query efficiency: The cursor object directly accesses the required data tables and data columns according to the query configuration parameters, reducing unnecessary database access and data processing, and improving data query efficiency.

[0074] (5) Supports complex data queries: By configuring multiple query parameters for the cursor object, complex data query logic such as union query and subquery can be supported.

[0075] The following is a Python sample code that demonstrates how to create a database cursor object based on the workshop information database connector and import query configuration parameters to access the workshop information database:

[0076]

[0077]

[0078] In this example, a WorkshopInfoDatabaseConnector class is first defined to represent the workshop information database connector. Then, a query configuration parameter dictionary query_config is defined, which contains the configuration information of the data table name and data column name. Next, in the fetch_product_logis_data function, a cursor object is created based on the database connector, and the query configuration parameters are used to execute SQL query statements to obtain historical production logistics time series data and status series data.

[0079] Optionally, parsing a workshop layout description file of the production workshop system to generate a workshop layout topology structure includes:

[0080] Parse the workshop layout description file of the production workshop system to obtain equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics;

[0081] Objectifying the equipment location features, production line layout features, material flow path features, and work area division features to generate a logical representation of the workshop layout;

[0082] A workshop layout topology structure is generated according to the logical representation of the workshop layout.

[0083] The above solution has the following technical advantages:

[0084] (1) Enhanced understandability: By parsing the workshop layout description file and generating logical representation and topological structure, the actual layout of the workshop can be more easily understood and visualized, facilitating subsequent analysis and optimization.

[0085] (2) Improve data exchange efficiency: Object-oriented logical representation and topological structure can facilitate data exchange with different systems or applications, realizing rapid information sharing.

[0086] (3) Support automated decision-making: Based on the workshop layout topology, automated algorithms can be developed to optimize production processes, equipment configuration or material scheduling to improve production efficiency.

[0087] (4) Facilitate simulation and simulation: The workshop layout topology can be used as the input of the simulation and simulation system to evaluate the effects of different production strategies or layout schemes.

[0088] (5) Reduce human errors: By automating the parsing and generation process, human errors in workshop layout data processing are reduced.

[0089] The sample code provided below demonstrates how to parse a simple shop layout description file and generate a topology structure:

[0090]

[0091]

[0092] Optionally, the workshop layout description file of the production workshop system is parsed to obtain equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics, including: based on the configured regular expression, label traversal, attribute extraction, production line numbering and serial equipment sequence matching are performed on the workshop layout description file of the production workshop system to obtain equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics.

[0093] The above solution has the following technical advantages:

[0094] (1) Improving parsing efficiency: By configuring regular expressions, efficient label traversal and attribute extraction can be performed based on the specific structure and content of the workshop layout description file, thereby improving the efficiency of the entire parsing process.

[0095] (2) Enhanced flexibility and scalability: Regular expressions allow flexible adjustments based on the actual format changes of the workshop layout description file. At the same time, new feature extraction can be supported by adding new regular expressions, which makes the system more scalable.

[0096] (3) Ensure data accuracy: Through precise label traversal and attribute extraction, it can be ensured that the data extracted from the workshop layout description file, such as equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics, are accurate and reliable.

[0097] (4) Easy error handling: The regular expression-based parsing process can easily capture and handle parsing errors, such as file format errors, tag mismatches, etc., thereby improving the robustness of the system.

[0098] (5) Support for multiple workshop layout description files: Since regular expressions can be flexibly configured, the solution can support a variety of workshop layout description files with different formats and structures, thereby improving the versatility of the system.

[0099] To this end, based on the above technical benefits, from the perspective of product implementation, the following code implementation is provided:

[0100]

[0101]

[0102] Optionally, based on the following logic, the equipment location features, production line layout features, material flow path features, and work area division features are objectified to generate a logical representation of the workshop layout:

[0103] The relationship between the equipment object and the production line object: The equipment object is added to the production line object to indicate its ownership;

[0104] Material flow objects represent the material movement path: Material flow objects connect different devices and represent the material movement path;

[0105] The work area includes equipment and production lines: The work area includes multiple equipment and production lines, reflecting the spatial layout.

[0106] Optionally, the relationship between the equipment object and the production line object is defined as follows:

[0107] List: Store the equipment objects in an ordered list according to the order of the equipment on the production line. The index of the list implies the position of the equipment on the production line.

[0108] Dictionary / Map: To find the production line to which a device belongs based on its ID, a dictionary is used, where the key is the device ID and the value is the production line object;

[0109] The material flow object indicates that the material movement path is defined as follows:

[0110] Figure: Material flow is mapped as a directed graph, where nodes represent equipment and directed edges represent the flow of materials from one equipment to another;

[0111] List of Lists: Material flow path, represented by a two-dimensional list, each internal list represents a sequence of equipment on a path;

[0112] The work area including equipment and production lines is defined as follows:

[0113] Set: matches the membership of the equipment and production lines contained in the work area. Each work area corresponds to a set, which contains all the equipment and production line objects in the area.

[0114] Tree structure: matches the hierarchical relationship between work areas. The root node is the top-level work area, each child node represents the sub-area below it, and the leaf node ultimately points to a specific device or production line.

[0115] The above solution has the following technical advantages:

[0116] (1) Clear structured representation: By objectifying equipment, production lines, material flow paths, and work areas, a clear and easy-to-understand structured representation can be obtained, which helps with subsequent query, analysis, and optimization operations.

[0117] (2) Efficient data access: By using data structures such as lists and dictionaries to define the relationship between equipment objects and production line objects, and by using graphs and lists of lists to represent material flow paths, data can be efficiently accessed and queried. For example, the production line to which a device belongs can be quickly found by its ID, or the shortest material flow path can be found by graph algorithms.

[0118] (3) Flexible scalability: Object-based representation allows new features or attributes to be easily added without changing the existing structure. For example, more attributes such as maintenance status and production capacity can be added to equipment objects to meet different business needs.

[0119] (4) Support for complex queries: By representing the workshop layout as a graph or tree structure, it can support more complex query operations, such as finding all material flow paths between two equipment, or analyzing the equipment load situation in a certain work area.

[0120] (5) Visual display: The object-oriented logical representation of the workshop layout can be easily converted into visual graphics, helping users to intuitively understand the layout of the workshop and the material flow, thereby improving decision-making efficiency.

[0121] The following is an example code:

[0122]

[0123]

[0124] Optionally, the workshop layout topology structure is generated according to the logical representation of the workshop layout.

[0125] By performing multi-scale mapping on the logical representation of the workshop layout, a mapping table of equipment and production line, a mapping table of material flow, and a mapping table of work area hierarchy can be obtained;

[0126] Based on the equipment and production line mapping table, generate equipment and production line diagrams using dictionaries or mapping tables;

[0127] Based on the material flow mapping table, a directed graph is constructed to represent the material flow, where nodes represent equipment or specific material handover points, edges represent the flow direction of materials, and edge weights represent the frequency or importance of material flow;

[0128] Based on the work area hierarchical mapping table, a tree structure is used to represent the work area. Each node represents an area, and the child node represents the sub-area under the area or the equipment and production line directly contained in it. The root node is the entire workshop.

[0129] The above solution has the following technical benefits

[0130] (1) Intuitive visualization: By mapping the logical representation of the workshop layout into a multi-scale topological structure, an intuitive visualization can be obtained, helping engineers and managers quickly understand the overall layout and details of the workshop.

[0131] (2) Fast query and positioning: The mapping tables generated by multi-scale mapping (such as equipment and production line mapping tables, material flow mapping tables, and work area hierarchy mapping tables) can speed up the query and positioning of specific equipment, production lines, or material flow paths, thereby improving production efficiency.

[0132] (3) Support for complex analysis: Directed graphs representing material flows can support complex analysis, such as identification of material flow bottlenecks and optimization of material flow paths, thereby improving the efficiency of material flow and reducing waste in production.

[0133] (4) Flexible hierarchical management: The work area hierarchy mapping table represented by a tree structure can clearly display the regional structure of different levels in the workshop, facilitating hierarchical management and decision-making.

[0134] (5) Scalability and maintainability: The object- and mapping-based implementation makes the system scalable and maintainable, making it easy to add new equipment, production lines, or work areas, and adjust the existing layout.

[0135] The exemplary code implementation of the above scheme is as follows:

[0136]

[0137]

[0138] Optionally, based on the workshop layout topology, feature extraction is performed on the historical production logistics time series data and the historical production logistics state series data to obtain historical logistics time features and historical logistics space features, including:

[0139] The workshop layout topology structure is converted into a feature vector group, and is respectively input into the graph convolutional network model and the gated recurrent unit in the feature extraction model for feature extraction, so as to obtain the historical logistics time features and the historical logistics space features respectively.

[0140] Optionally, the converting the workshop layout topology structure into a feature vector group, respectively inputting them into a graph convolutional network model and a gated recurrent unit in a feature extraction model for feature extraction, so as to obtain historical logistics time features and historical logistics space features respectively, including:

[0141] The feature vector group is transformed into a feature matrix and an adjacency matrix which are input into the graph convolutional network model, so that the graph convolutional network model performs a convolution operation on the feature matrix and the adjacency matrix to obtain the historical logistics space characteristics, wherein the feature matrix contains an initial feature vector for each equipment or material handover point, and the initial feature vector includes the encoded feature value of the equipment type and location information corresponding to the node, and the adjacency matrix is ​​used to reflect the direction and path of material flow by characterizing the connection relationship between nodes.

[0142] Optionally, the converting the workshop layout topology structure into a feature vector group, respectively inputting them into a graph convolutional network model and a gated recurrent unit in a feature extraction model for feature extraction, so as to obtain historical logistics time features and historical logistics space features respectively, including:

[0143] The feature vector group is transformed into a time series input into the gated recurrent unit, so that the gated recurrent unit forgets and updates the gate mechanism control information of the time series to obtain the historical logistics time characteristics.

[0144] The above solution has the following technical advantages:

[0145] (1) Improving the accuracy of feature extraction: By converting the workshop layout topology into a feature vector group and using the graph convolutional network model and gated recurrent unit to extract spatial and temporal features respectively, the complexity and dynamics of material flow in the workshop can be captured more accurately.

[0146] (2) Accurate representation of spatial features: The graph convolutional network model can effectively process topological structure data. By combining the adjacency matrix and the feature matrix through convolution operations, it can accurately represent the spatial characteristics of material flow, such as the connection relationship between equipment, the direction and path of material flow, etc.

[0147] (3) Dynamic capture of temporal features: Gated recurrent units (such as LSTM or GRU), as a commonly used sequence processing model, can effectively process time series data and capture the characteristics of material flow that change over time, such as fluctuations in the production cycle and the periodicity of material flow.

[0148] (4) Scalability and adaptability of the model: The feature extraction method based on the graph convolutional network model and the gated recurrent unit has good scalability and adaptability, and can be easily applied to workshop layouts of different scales and complexities, as well as different types of historical production logistics data.

[0149] (5) Improve the efficiency of production logistics analysis: Through the automated feature extraction process, the workload of manual analysis and data processing can be reduced, the efficiency and accuracy of production logistics analysis can be improved, and strong support can be provided for production optimization and decision support.

[0150] The following code implementation shows how to convert the workshop layout topology into a feature vector group and input it into the graph convolutional network model and gated recurrent unit for feature extraction.

[0151]

[0152]

[0153] Optionally, the production logistics state spatiotemporal model predicts the logistics state based on the historical logistics time characteristics and the historical logistics space characteristics to obtain a predicted logistics state, including:

[0154] The feature fusion layer in the production logistics state spatiotemporal model fuses the historical logistics time features and the historical logistics space features based on the attention mechanism to obtain spatiotemporal fusion features;

[0155] The transformer layer in the production logistics state spatiotemporal model processes the spatiotemporal fusion feature mapping to obtain logistics state mapping features;

[0156] The fully connected layer in the production logistics state spatiotemporal model performs nonlinear transformation processing on the logistics state mapping features to obtain a predicted logistics state.

[0157] The above solution has the following technical advantages:

[0158] (1) Fusion of spatiotemporal features improves prediction accuracy: Through the fusion layer based on the attention mechanism, the spatiotemporal model of production logistics status can dynamically adjust the weights of historical logistics time features and historical logistics space features in the prediction, thereby more accurately reflecting the changes in logistics status in time and space and improving the accuracy of prediction.

[0159] (2) Transformer layer enhances feature mapping capability: The Transformer layer captures the dependencies between features through the self-attention mechanism and maps the spatiotemporal fusion features to a higher-level representation space, further enhancing the model’s ability to capture changes in logistics status.

[0160] (3) The fully connected layer provides nonlinear transformation: The fully connected layer performs nonlinear transformation on the logistics status mapping features through a nonlinear activation function, enabling the model to learn more complex patterns and adapt to different logistics status prediction requirements.

[0161] (4) Model interpretability: The fusion layer based on the attention mechanism can provide the importance of each feature in the prediction, thereby increasing the interpretability of the model and helping to understand and optimize model performance.

[0162] (5) Flexibility and scalability: The design of the production logistics state spatiotemporal model is flexible and scalable, and the model structure, parameters, and training strategies can be adjusted according to specific application scenarios to adapt to different production logistics environments.

[0163] The following is an exemplary code implementation:

[0164]

[0165]

[0166] Optionally, optimizing the model parameters of the production logistics state spatiotemporal model according to the historical logistics state and the predicted logistics state until the training end standard is reached includes:

[0167] The distance between the historical logistics state and the predicted logistics state is calculated, and the fitting deviation is determined based on the distance. If the fitting deviation is less than the set fitting deviation threshold, the training end standard is determined. Otherwise, the model parameters of the production logistics state spatiotemporal model are optimized based on the distance until the training end standard is reached.

[0168] The above solution has the following technical advantages:

[0169] (1) Quantitative evaluation of model performance: By calculating the distance between the historical logistics state and the predicted logistics state and determining the fitting deviation based on the distance, the prediction performance of the spatiotemporal model of the production logistics state can be quantitatively evaluated. This helps to more accurately understand the accuracy and reliability of the model.

[0170] (2) Automatically adjust the training process: Based on the comparison between the fitting deviation and the set fitting deviation threshold, it can automatically determine whether the training end criteria have been met. If the fitting deviation is less than the threshold, the training process ends; otherwise, the model parameters continue to be optimized. This automatic adjustment mechanism ensures that the model stops training after reaching sufficient accuracy, avoiding overfitting or underfitting.

[0171] (3) Improve model training efficiency: Since the optimization of model parameters is based on the fitting deviation, targeted optimization can be performed on the parts with poor performance instead of blindly adjusting all parameters. This can improve the efficiency of model training and reduce unnecessary consumption of computing resources.

[0172] (4) Enhance the generalization ability of the model: By continuously optimizing the model parameters to reduce the fitting deviation, the model can be better adapted to different logistics scenarios and data distributions. This helps to enhance the generalization ability of the model, enabling it to more accurately predict various logistics states.

[0173] (5) Easy model tuning and deployment: By setting clear training end criteria and optimization process, the model can be easily tuned and deployed. When the model performance needs to be improved, parameters such as the fitting deviation threshold or optimization algorithm can be adjusted to obtain better prediction results.

[0174] An exemplary code implementation of the above solution is provided below:

[0175]

[0176]

[0177] Optionally, the method further comprises:

[0178] Obtain the time series data of the production logistics to be processed and the production logistics state sequence to be processed, so as to predict the logistics state in real time based on the trained spatiotemporal model of the production logistics state.

[0179] To this end, based on the above solution, the following technical benefits are achieved:

[0180] (1) Real-time prediction capability: By obtaining the production logistics time series data and sequences to be processed, real-time prediction can be made based on the trained production logistics status spatiotemporal model. This real-time prediction capability is crucial for the logistics industry and can help companies understand the logistics status in a timely manner and make corresponding decisions and adjustments.

[0181] (2) Improve logistics efficiency: Real-time prediction of logistics status can help enterprises plan logistics routes in advance and optimize logistics resource allocation, thereby improving logistics efficiency. Through prediction, enterprises can predict potential logistics bottlenecks or delays and take corresponding measures to prevent and resolve them.

[0182] (3) Reduce operating costs: Through accurate logistics status forecasting, enterprises can reduce unnecessary inventory backlogs, reduce transportation costs, and optimize human resource allocation. This helps reduce the operating costs of enterprises and improve profitability.

[0183] (4) Improve customer satisfaction: Accurate logistics status prediction allows customers to know the location and estimated arrival time of goods in a timely manner, thus improving customer satisfaction with logistics services. This has positive significance for enterprises to maintain customer relationships and enhance their brand image.

[0184] (5) Supporting intelligent decision-making: Based on real-time predicted logistics status data, enterprises can build intelligent decision-making systems to achieve automated and intelligent logistics management and optimization. This helps to improve the management level and competitiveness of enterprises.

[0185] From the perspective of product implementation, the following code implementation is provided:

[0186]

[0187]

[0188] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A logistics status prediction method based on spatiotemporal characteristics, characterized in that: include: Obtain historical production logistics time series data, historical production logistics status series data and historical logistics status from the workshop information system; Parse the workshop layout description file of the production workshop system to generate the workshop layout topology structure; Based on the workshop layout topology, feature extraction is performed on the historical production logistics time series data and the historical production logistics state series data to obtain historical logistics time features and historical logistics space features; The production logistics state spatiotemporal model predicts the logistics state based on the historical logistics time characteristics and the historical logistics space characteristics to obtain the predicted logistics state; According to the historical logistics status and the predicted logistics status, the model parameters of the production logistics status spatiotemporal model are optimized until the training end standard is reached; The acquisition of historical production logistics time series data, historical production logistics status series data and historical logistics status from the workshop information system includes: Based on the workshop information database query statement, a workshop information database access request is constructed; Based on the workshop information database access request, a workshop information database connector is constructed to access the workshop information database through the workshop information database connector and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status therefrom.

2. A logistics status prediction method based on spatiotemporal characteristics according to claim 1, characterized in that: The step of constructing a workshop information database access request based on a workshop information database query statement includes: Based on a workshop information database query statement, parameterizing and compiling the workshop information database query statement to construct a data access request; Wherein, based on the workshop information database access request, a workshop information database connector is constructed to access the workshop information database through the workshop information database connector and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status therefrom, including: Based on the workshop information database access request, instantiate the database interface API and create a database session; Based on the database session, the connection string format of the workshop information database is parsed to construct a connection string including the host, port, and database name; Build a workshop information database connector based on the constructed connection string; Based on the workshop information database connector, create a database cursor object; The database cursor object is instantiated to access the workshop information database and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status therefrom.

3. The method for predicting logistics status based on spatiotemporal characteristics according to claim 1, characterized in that: According to the constructed connection string, a workshop information database connector is constructed, including: According to the constructed connection string, a match is made in the constructed database connector library to build a workshop information database connector that matches the type of the workshop information database, and a context manager is assigned to the workshop information database connector to recycle the workshop information database connector after completing the acquisition of the historical production logistics time series data, the historical production logistics status sequence data and the historical logistics status.

4. The method for predicting logistics status based on spatiotemporal characteristics according to claim 1, characterized in that: The step of creating a database cursor object based on the workshop information database connector includes: Based on the workshop information database connector, generating a database cursor declaration; importing query configuration parameters for the database cursor declaration to create a database cursor object; Instantiate the database cursor object to access the workshop information database and obtain historical production logistics time series data, historical production logistics status sequence data and historical logistics status; wherein the query configuration parameters include the following: Time series data table name: the table name for storing historical production logistics time series data; Time series data column name: including timestamp and logistics quantity column name; Status sequence data table name: the table name for storing historical production logistics status sequence data; Status sequence data column name: including timestamp and logistics status column name; Historical logistics status index: created by referring to the timestamp and logistics status column name defined in the status sequence data table name.

5. The method for predicting logistics status based on spatiotemporal characteristics according to claim 1, characterized in that: The parsing of the workshop layout description file of the production workshop system to generate a workshop layout topology structure includes: Parse the workshop layout description file of the production workshop system to obtain equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics; Objectifying the equipment location features, production line layout features, material flow path features, and work area division features to generate a logical representation of the workshop layout; Generating a workshop layout topology structure according to the logical representation of the workshop layout; Among them, the workshop layout description file of the production workshop system is parsed to obtain equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics, including: based on the configured regular expression, label traversal, attribute extraction, production line numbering and its serial equipment sequence matching are performed on the workshop layout description file of the production workshop system to obtain equipment location characteristics, production line layout characteristics, material flow path characteristics, and work area division characteristics.

6. A logistics status prediction method based on spatiotemporal characteristics according to claim 5, characterized in that: Based on the following logic, the equipment location features, production line layout features, material flow path features, and work area division features are objectified to generate a logical representation of the workshop layout: The relationship between the equipment object and the production line object: The equipment object is added to the production line object to indicate its ownership; Material flow objects represent the material movement path: Material flow objects connect different devices and represent the material movement path; The work area includes equipment and production lines: The work area includes multiple equipment and production lines, reflecting the spatial layout.

7. A logistics status prediction method based on spatiotemporal characteristics according to claim 6, characterized in that: The relationship between the equipment object and the production line object is defined as follows: List: Store the equipment objects in an ordered list according to the order of the equipment on the production line. The index of the list implies the position of the equipment on the production line. Dictionary: To find the production line to which a device belongs based on its ID, use a dictionary, where the key is the device ID and the value is the production line object; The material flow object indicates that the material movement path is defined as follows: Figure: Material flow is mapped as a directed graph, where nodes represent equipment and directed edges represent the flow of materials from one equipment to another; List of lists: Material flow path, represented by a two-dimensional list, each internal list represents a sequence of equipment on a path; The work area including equipment and production lines is defined as follows: Collection: matches the membership of the equipment and production lines contained in the work area. Each work area corresponds to a collection, which contains all the equipment and production line objects in the area. Tree structure: matches the hierarchical relationship between work areas. The root node is the top-level work area, each child node represents the sub-area below it, and the leaf node ultimately points to a specific device or production line.

8. A logistics status prediction method based on spatiotemporal characteristics according to claim 7, characterized in that: generating a workshop layout topology structure according to the logical representation of the workshop layout; By performing multi-scale mapping on the logical representation of the workshop layout, a mapping table of equipment and production line, a mapping table of material flow, and a mapping table of work area hierarchy can be obtained; Based on the equipment and production line mapping table, generate equipment and production line diagrams using dictionaries or mapping tables; Based on the material flow mapping table, a directed graph is constructed to represent the material flow, where nodes represent equipment or specific material handover points, edges represent the flow direction of materials, and edge weights represent the frequency or importance of material flow; Based on the work area hierarchical mapping table, a tree structure is used to represent the work area. Each node represents an area, and the child node represents the sub-area under the area or the equipment and production line directly contained in it. The root node is the entire workshop.

9. The method for predicting logistics status based on spatiotemporal characteristics according to claim 1, characterized in that: Based on the workshop layout topology structure, feature extraction is performed on the historical production logistics time series data and the historical production logistics state series data to obtain historical logistics time features and historical logistics space features, including: The workshop layout topology structure is converted into a feature vector group, and the feature vectors are respectively input into a graph convolutional network model and a gated recurrent unit in a feature extraction model for feature extraction, so as to obtain historical logistics time features and historical logistics space features respectively; The workshop layout topology structure is converted into a feature vector group, and respectively input into the graph convolutional network model and the gated recurrent unit in the feature extraction model for feature extraction, so as to obtain the historical logistics time feature and the historical logistics space feature, respectively, including: The feature vector group is transformed into a feature matrix and an adjacency matrix input into the graph convolutional network model, so that the graph convolutional network model performs a convolution operation on the feature matrix and the adjacency matrix to obtain the historical logistics space characteristics, wherein the feature matrix contains an initial feature vector of each equipment or material handover point, and the initial feature vector includes a coded feature value of the equipment type and location information corresponding to the node, and the adjacency matrix is ​​used to reflect the direction and path of material flow by characterizing the connection relationship between nodes; The workshop layout topology structure is converted into a feature vector group, and respectively input into the graph convolutional network model and the gated recurrent unit in the feature extraction model for feature extraction, so as to obtain the historical logistics time feature and the historical logistics space feature, respectively, including: The feature vector group is transformed into a time series input into the gated recurrent unit, so that the gated recurrent unit forgets and updates the gate mechanism control information of the time series to obtain the historical logistics time characteristics.

10. The method for predicting logistics status based on spatiotemporal characteristics according to claim 1, characterized in that: The production logistics state spatiotemporal model predicts the logistics state based on the historical logistics time characteristics and the historical logistics space characteristics to obtain the predicted logistics state, including: The feature fusion layer in the production logistics state spatiotemporal model fuses the historical logistics time features and the historical logistics space features based on the attention mechanism to obtain spatiotemporal fusion features; The transformer layer in the production logistics state spatiotemporal model processes the spatiotemporal fusion feature mapping to obtain logistics state mapping features; The fully connected layer in the production logistics state spatiotemporal model performs nonlinear transformation processing on the logistics state mapping features to obtain a predicted logistics state.

Citation Information

Cited By

  • Database compatibility method and device, electronic equipment, system and storage medium

    CN119938749A