Logistics business data query method, apparatus and device, and storage medium

By collecting, cleaning, and constructing knowledge graphs, combined with machine learning algorithms and natural language processing, the inefficiency and lack of intelligence in logistics business data processing have been solved, achieving efficient and accurate logistics business management.

CN120950558APending Publication Date: 2025-11-14SHANGHAI YUNDA HIGH TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510999374.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

The current logistics business data processing relies on manual operation, resulting in long data aggregation cycles, strong subjectivity of experience-based judgment, and an inability to achieve intelligent analysis and prediction. Furthermore, the system cannot integrate intelligent technologies such as machine learning and natural language processing.

Method used

Collect multi-source logistics business data, clean and extract features, construct a knowledge graph, and combine machine learning algorithms and natural language processing to achieve automatic data analysis and query.

Benefits of technology

It improves the integrity and availability of logistics business data, reduces manual intervention, enhances analysis efficiency and accuracy, supports dynamic monitoring and anomaly early warning, and improves the level of intelligence in logistics operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120950558A_ABST
    Figure CN120950558A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of logistics data processing, and discloses a logistics business data query method, which comprises the following steps: collecting multi-source logistics business data, collecting original business data from a plurality of data sources, and cleaning the original business data to obtain preprocessed business data; extracting a time period and website features from the preprocessed service data, and screening the extracted features; dividing the preprocessed business data into historical data and real-time data according to a time sequence, selecting a machine learning algorithm according to an analysis target to construct an analysis model, training the selected model by using the historical data, inputting the real-time data into the trained model, and outputting a detection result; and constructing a knowledge graph, receiving a natural language query request of a user, and outputting a query result. According to the method, the problems of dispersion and non-uniform format of traditional logistics data are solved, the integrity and availability of the data are remarkably improved, a closed-loop analysis process is formed, and the efficiency and accuracy of logistics business management are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics data processing technology, and in particular to a method, apparatus, equipment and storage medium for querying logistics business data. Background Technology

[0002] Logistics operations encompass more than ten stages, including order processing, warehousing and sorting, transportation scheduling, last-mile delivery, and exception handling. Each stage requires manual data collection and analysis. For example, in the order entry stage, customer service staff must manually input information from paper or electronic waybills filled out by customers into Excel or the ERP system. Entering a single order can take several minutes, and companies processing hundreds of thousands of orders daily require a data entry team of over a hundred people. Furthermore, customer service staff are prone to errors due to fatigue. In the transportation stage, dispatchers need to track vehicle locations via phone or paper documents. Each trip requires manual recording of dozens of nodes, and cross-regional routes of thousands of kilometers require accumulating numerous node records, with data aggregation taking 1-2 days.

[0003] In the traditional model, data is generated by manually compiling historical data to create weekly and monthly reports, and decision-making often relies on the experience and judgment of managers. The limitations of this model are twofold: firstly, historical data cannot reflect unforeseen factors; secondly, the subjectivity of experience-based judgment may lead to resource misallocation.

[0004] Furthermore, the analytical functions of existing systems are mostly limited to data display, and they cannot discover hidden business patterns, predict future trends, or generate optimization strategies through data mining; moreover, existing systems generally cannot integrate intelligent technologies such as machine learning, natural language processing, and knowledge graphs.

[0005] Therefore, existing technologies still need improvement and development. Summary of the Invention

[0006] This invention provides a method, apparatus, device, and storage medium for querying logistics business data, used for in-depth analysis and processing of logistics business data, thereby improving the efficiency and accuracy of logistics business management.

[0007] The first aspect of this invention provides a method for querying logistics business data, the method comprising: Collect multi-source logistics business data, collect raw business data from multiple data sources, clean the raw business data to obtain pre-processed business data; Extract time periods and branch characteristics from preprocessed business data, and then filter the extracted characteristics; Preprocessed business data is divided into historical data and real-time data according to time sequence. Machine learning algorithms are selected to build analysis models according to analysis objectives. Historical data is used to train the selected models. Real-time data is input into the trained models, and detection results are output. The system constructs a knowledge graph by importing pre-processed logistics business data into the system, receiving users' natural language query requests, and outputting query results.

[0008] Optionally, in a first implementation of the first aspect of the present invention, the step of collecting multi-source logistics business data, collecting raw business data from multiple data sources, and cleaning the raw business data to obtain preprocessed business data, includes: Raw business data is collected from multiple heterogeneous data sources, including order data, logistics trajectory data, outlet data, and receipt data of logistics business. The original business data is scanned line by line using a data recording scanning engine. Preset business logic rules are used to perform logical verification on the original business data and determine whether it conforms to the business logic rules. Original business data that does not conform to the business logic rules is deleted. Extract key identifier fields from the original business data, perform multimodal encoding on the key identifier fields, and generate feature vectors.

[0009] Optionally, in a second implementation of the first aspect of the present invention, the step of collecting multi-source logistics business data, collecting raw business data from multiple data sources, and cleaning the raw business data to obtain preprocessed business data, further includes: Preset field categories, and classify the original business data according to the field categories; For categorical fields, detect the frequency of occurrence of each field value and fill missing values ​​with the category value that appears most frequently in that field; For numeric fields, choose the mean, median, or mode to fill the data based on its distribution characteristics.

[0010] Based on the feature vector, a hash algorithm is used to identify and delete duplicate records in the original business data to obtain non-duplicate data. Non-repeating data is transformed and normalized to obtain preprocessed business data.

[0011] Optionally, in a third implementation of the first aspect of the present invention, the step of extracting time periods and branch features from preprocessed business data and filtering the extracted features includes: Extract time features from the preprocessed order data, group the order data according to daily, weekly and monthly periods, and calculate the number of orders, the number of signed-outs and the time interval between signed-outs in each time period. Calculate the historical acceptance rate, order processing volume, and shipping delay rate for each branch; Extract the weight, volume, shipping distance, and their derived ratios of the order; For numerical features, calculate the correlation coefficient between the numerical features and the target variable, and retain features whose absolute values ​​exceed the dynamic threshold; For categorical features, the independence of the features is evaluated using the chi-square test, and features that meet the significance level are selected.

[0012] Optionally, in a fourth implementation of the first aspect of the present invention, the step of dividing the preprocessed business data into historical data and real-time data according to time sequence, selecting a machine learning algorithm to construct an analysis model according to the analysis objective, training the selected model using historical data, inputting real-time data into the trained model, and outputting the detection result includes: The logistics business data, after feature filtering, is divided into historical data and real-time data according to time sequence. Dynamically select machine learning algorithms to construct the analysis model based on the analysis objectives; The selected analytical model is trained using the historical data. The same preprocessing and feature extraction methods as historical data are used for real-time collected logistics business data to obtain standardized feature vectors; The feature vector is input into the trained model, and the detection results are output in real time.

[0013] Optionally, in a fifth implementation of the first aspect of the present invention, the construction of the knowledge graph involves importing preprocessed logistics business data into a knowledge graph construction system, receiving natural language query requests from users, and outputting query results, including: Import preprocessed logistics business data into the knowledge graph construction system: The entity types are defined, and the entity types include at least: branch entity, order entity, and means of transport entity; The relationship types are defined, and the relationship types include at least: the relationship between orders and outlets, the transportation relationship between orders and means of transport, and the influence relationship between means of transport and outlets; The knowledge graph is stored in a graph database.

[0014] Optionally, in a sixth implementation of the first aspect of the present invention, the step of constructing a knowledge graph, which involves importing preprocessed logistics business data into a knowledge graph construction system, receiving natural language query requests from users, and outputting query results, further includes: Receive natural language query requests from users and execute them through the natural language processing module: Perform word segmentation and named entity recognition on the query text to extract a set of keywords; Based on semantic analysis, keywords are mapped to entities and relationships in a knowledge graph; Perform graph queries based on semantic analysis results; Traverse the related entities and relationship paths in the knowledge graph, retrieve the entity attributes and related data that meet the query conditions, generate structured query results, and return them to the user interface.

[0015] A second aspect of the present invention provides a logistics business data query device, comprising: The preprocessing module is used to collect multi-source logistics business data, collect raw business data from multiple data sources, clean the raw business data, and obtain preprocessed business data. The feature extraction module is used to extract time period and branch features from preprocessed business data and to filter the extracted features. The model training output module is used to divide preprocessed business data into historical data and real-time data in chronological order, select machine learning algorithms to build analysis models according to analysis objectives, train the selected models using historical data, input real-time data into the trained models, and output detection results. The query module is used to build a knowledge graph. It imports preprocessed logistics business data into the knowledge graph construction system, receives users' natural language query requests, and outputs query results.

[0016] Optionally, in a first implementation of the second aspect of the present invention, the preprocessing module includes: a data acquisition and scanning unit, used to acquire raw business data from multiple heterogeneous data sources, the raw business data including order data, logistics trajectory data, network point data, and receipt data of logistics business; scanning the raw business data in a line-by-line traversal manner using a data recording scanning engine; a first preset unit, used to preset business logic rules, perform logical verification on the raw business data and determine whether it conforms to the business logic rules, and delete raw business data that does not conform to the business logic rules; a first extraction unit, used to extract key identification fields from the raw business data, perform multimodal encoding processing on the key identification fields, and generate feature vectors; a second preset unit, used to preset field categories, and classify the raw business data according to the field categories; a filling unit, used to detect the frequency of occurrence of each field value for categorical fields, fill missing values ​​with the category value with the highest frequency of occurrence of the field; and for numerical fields, fill with the mean, median, or mode according to the data distribution characteristics. The deletion processing unit is used to identify and delete duplicate records in the original business data based on the feature vector using a hash algorithm to obtain non-duplicate data; and to perform data transformation and normalization processing on the non-duplicate data to obtain preprocessed business data.

[0017] Optionally, in a second implementation of the second aspect of the present invention, the feature extraction module includes: a first calculation unit, used to extract time features from preprocessed order data, group and statistically analyze the order data according to daily, weekly, and monthly cycles, and calculate the number of orders, the number of signed receipts, and the time interval between signing receipts within each time period; a second calculation unit, used to calculate the historical signing rate, order processing volume, and transportation delay rate of each branch; a second extraction unit, used to extract the weight, volume, transportation distance, and their derived ratio features of the orders; and a third calculation unit, used to calculate the correlation coefficient between numerical features and the target variable, retaining features whose absolute values ​​exceed a dynamic threshold; and to evaluate the independence of categorical features through a chi-square test, selecting features that meet the significance level criteria.

[0018] Optionally, in a third implementation of the second aspect of the present invention, the model training output module includes: a partitioning unit, used to partition the logistics business data after feature filtering into historical data and real-time data according to time order; a construction unit, used to dynamically select a machine learning algorithm to construct an analysis model according to the analysis objective; a training unit, used to train the selected analysis model using the historical data; a processing and extraction unit, used to apply the same preprocessing and feature extraction methods as historical data to the real-time collected logistics business data to obtain standardized feature vectors; and an output unit, used to input the feature vectors into the trained model and output the detection results in real time.

[0019] Optionally, in a fourth implementation of the second aspect of the present invention, the query module includes: The system comprises the following components: an import unit for importing preprocessed logistics business data into the knowledge graph construction system; a definition unit for defining entity types, including at least: branch entity, order entity, and transportation vehicle entity; and a relationship type for defining at least: the relationship between an order and a branch, the transportation relationship between an order and a transportation vehicle, and the influence relationship between a transportation vehicle and a branch; and a storage unit for storing the knowledge graph in a graph database. A query receiving unit receives natural language query requests from the user and executes the following through the natural language processing module: word segmentation and named entity recognition of the query text to extract a keyword set; semantic analysis to map the keywords to entities and relationships in the knowledge graph; and graph query based on the semantic analysis results. A generation unit traverses the associated entity and relationship paths in the knowledge graph, retrieves entity attributes and associated data that meet the query conditions, generates structured query results, and returns them to the user interface.

[0020] A third aspect of the present invention provides a logistics business data query device, including a memory and at least one processor, wherein the memory stores computer-readable instructions; The at least one processor invokes the computer-readable instructions in the memory to perform the various steps of the logistics business data query method described above.

[0021] A fourth aspect of the present invention provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the various steps of the logistics business data query method described above.

[0022] The technical solution provided by this invention solves the problems of scattered and inconsistent formats of traditional logistics data by collecting and cleaning multi-source logistics business data, significantly improving the integrity and usability of the data and providing a high-quality data foundation for subsequent analysis. By automatically extracting time periods and network characteristics and filtering key features, manual intervention is reduced, computational redundancy is decreased, and the relevance of model input is enhanced, improving analysis efficiency and accuracy. By dividing historical data and real-time data and combining them with machine learning models, dynamic monitoring and anomaly warning of logistics operations are achieved, supporting rapid response to business changes and improving the intelligence level of logistics operations. This invention integrates data collection, cleaning, modeling, and knowledge graph technologies to form a closed-loop logistics data analysis process, optimizing the inefficiency of traditional staged processing and significantly improving the efficiency and accuracy of logistics business management. Attached Figure Description

[0023] Figure 1This is a first flowchart of a logistics business data query method provided in an embodiment of the present invention; Figure 2 This is a second flowchart of the logistics business data query method provided in an embodiment of the present invention; Figure 3 This is a third flowchart of the logistics business data query method provided in the embodiments of the present invention; Figure 4 This is a fourth flowchart of the logistics business data query method provided in this embodiment of the invention; Figure 5 A fifth flowchart of the logistics business data query method provided in this embodiment of the invention; Figure 6 A sixth flowchart of the logistics business data query method provided in this embodiment of the invention; Figure 7 This is a schematic diagram of the structure of the logistics business data query device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a logistics business data query device provided in an embodiment of the present invention. Detailed Implementation

[0024] This invention provides a method, apparatus, device, and storage medium for querying logistics business data, which are used to perform in-depth analysis and processing of logistics business data, thereby improving the efficiency and accuracy of logistics business management.

[0025] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The first embodiment of a logistics business data query method according to the present invention includes: S101. Collect multi-source logistics business data. Collect raw business data from multiple data sources and clean the raw business data to obtain pre-processed business data. S102. Extract time period and branch characteristics from preprocessed business data, and filter the extracted characteristics; S103. Divide the preprocessed business data into historical data and real-time data according to the time sequence, select a machine learning algorithm to build an analysis model according to the analysis objective, use historical data to train the selected model, input real-time data into the trained model, and output the detection results. S104. Construct a knowledge graph by importing the preprocessed logistics business data into the knowledge graph construction system, receiving users' natural language query requests, and outputting query results.

[0027] In this embodiment, data related to logistics operations is collected periodically at set time intervals through an interface. The collected data includes, but is not limited to, order information (order number, order time, product information, etc.), logistics trajectory information (pickup time, transportation node time, arrival time, etc.), branch information (branch name, address, person in charge, etc.), and signature information (signature time, signer, signature status, etc.).

[0028] The technical solution provided by this invention solves the problems of scattered and inconsistent formats of traditional logistics data by collecting and cleaning multi-source logistics business data, significantly improving the integrity and usability of the data and providing a high-quality data foundation for subsequent analysis. By automatically extracting time periods and network characteristics and filtering key features, manual intervention is reduced, computational redundancy is decreased, and the relevance of model input is enhanced, improving analysis efficiency and accuracy. By dividing historical data and real-time data and combining them with machine learning models, dynamic monitoring and anomaly warning of logistics operations are achieved, supporting rapid response to business changes and improving the intelligence level of logistics operations. This invention integrates data collection, cleaning, modeling, and knowledge graph technologies to form a closed-loop logistics data analysis process, optimizing the inefficiency of traditional staged processing and significantly improving the efficiency and accuracy of logistics business management.

[0029] Please see Figure 2 The second embodiment of the logistics business data query method in this invention includes collecting multi-source logistics business data, collecting raw business data from multiple data sources, cleaning the raw business data to obtain preprocessed business data, and including: S201. Collect raw business data from multiple heterogeneous data sources, including order data, logistics trajectory data, outlet data, and receipt data of logistics business; S202. Scan the original business data in a line-by-line traversal manner using the data recording scanning engine; S203. Preset business logic rules, perform logical verification on the original business data and determine whether it conforms to the business logic rules, and delete the original business data that does not conform to the business logic rules; S204. Extract the key identification fields from the original business data, perform multimodal encoding processing on the key identification fields, and generate feature vectors.

[0030] In this embodiment, the collected data is scanned line by line, and for each record, its key attributes (such as order number, logistics tracking number, and other uniquely identified data) are combined into a feature vector.

[0031] In this embodiment, data that clearly does not conform to business logic (such as order time being later than receipt time, or negative transportation distance) is judged by setting business rules.

[0032] This invention clearly defines the data source types, covering information across the entire logistics business chain, solving the problem of the one-sidedness of traditional single data source analysis and providing multi-dimensional data support for subsequent modeling. It employs a traversal scanning engine to process massive amounts of raw data, avoiding the memory pressure of batch loading, making it particularly suitable for high-concurrency logistics scenarios and significantly improving the processing efficiency of the data cleaning stage. It automatically verifies the logical rationality of data through preset rules, eliminating abnormal or contradictory data, reducing noise interference with model training, and improving the reliability of subsequent analysis results. It performs multimodal encoding on key identifier fields, unifying heterogeneous data into machine-processable feature vectors, solving the inefficiency problem of traditional manual feature engineering.

[0033] Please see Figure 3 A third embodiment of a logistics business data query method according to the present invention further includes: collecting multi-source logistics business data, collecting raw business data from multiple data sources, cleaning the raw business data to obtain preprocessed business data, and further comprising: S301. Preset field categories and classify the original business data according to the field categories; S302. For the categorical fields, detect the frequency of occurrence of each field value and fill missing values ​​with the category value that appears most frequently in that field. S303. For numerical fields, select the mean, median, or mode to fill the data based on the data distribution characteristics.

[0034] S304. Based on the feature vector, a hash algorithm is used to identify and delete duplicate records in the original business data to obtain non-duplicate data; S305. Perform data transformation and normalization on non-repeating data to obtain preprocessed business data.

[0035] In this embodiment, feature vectors are converted into hash values ​​using a hash algorithm, and these hash values ​​are stored using a hash table. If a hash value for a new record already exists in the hash table, the record is determined to be a duplicate and is deleted from the dataset.

[0036] In this embodiment, for categorized fields (such as receipt status, product type, etc.), the most frequently occurring values ​​can be used for filling.

[0037] In this embodiment, if erroneous data is found, the data can be corrected (e.g., by making reasonable calculations and adjustments) or the record can be deleted directly.

[0038] In this embodiment, a standardization algorithm is used to process numerical data fields; for categorical data fields, one-hot encoding is used to convert them into numerical vectors.

[0039] In this embodiment, different methods are used to handle missing values ​​for different types of data fields. For numerical fields (such as order weight, transportation distance, etc.), the mean, median, or mode can be used to fill the missing values. Specifically, the mean, median, or mode of all non-missing values ​​of the field is calculated, and then the missing values ​​are replaced with the calculated values.

[0040] In this embodiment of the invention, for categorical fields, missing values ​​are filled by statistically analyzing high-frequency category values. This preserves the original distribution characteristics of the field while avoiding data loss caused by directly deleting missing values. It reduces the bias introduced by the filling process and improves the accuracy of subsequent model training or analysis. Dynamically selecting the mean, median, or mode for filling based on the data distribution characteristics (such as normal or skewed distribution) of numerical fields enhances the scientific rigor of missing value handling. Utilizing a hash algorithm to quickly identify and delete duplicate records significantly improves data deduplication efficiency while avoiding oversights from manual checks.

[0041] Please see Figure 4 The fourth embodiment of a logistics business data query method in this invention includes extracting time periods and network characteristics from preprocessed business data and filtering the extracted characteristics, comprising: S401. Extract time features from the preprocessed order data, group the order data according to daily, weekly and monthly cycles, and calculate the number of orders, the number of signed-out items and the time interval between signed-out items in each time period. S402. Calculate the historical receipt rate, order processing volume, and transportation delay rate for each branch. S403. Extract the weight, volume, transportation distance, and their derived ratio characteristics of the order; S404. For numerical features, calculate the correlation coefficient between the numerical features and the target variable, and retain features whose absolute values ​​exceed the dynamic threshold. S405. For categorical features, assess the independence of features using the chi-square test, and select features that meet the significance level.

[0042] In this embodiment, time features are extracted from the preprocessed data; for order data, statistics are grouped according to time periods such as daily, weekly, and monthly; the number of orders, the number of receipts, and the receipt time interval are calculated for each time period; the receipt time interval can be obtained by subtracting the order placement time from the receipt time.

[0043] In this embodiment, for each branch, its historical acceptance rate is calculated, which is the ratio of the number of signed orders to the total number of orders in the past period; at the same time, the order processing volume and transportation delay rate are statistically analyzed; features such as order weight, volume, and transportation distance are extracted from the order data; these features can be directly obtained from the original data, and if there are missing data, the missing data processing method in step one can be used to fill them; a feature selection algorithm is used to filter the extracted features.

[0044] In this embodiment, for correlation analysis, the correlation coefficient between each feature and the target feature is calculated, and features with an absolute value of correlation coefficient greater than a set threshold are retained; for chi-square test, it is used to evaluate the independence between categorical features and target features, and features with larger chi-square values ​​are selected as key features.

[0045] Please see Figure 5 The fifth embodiment of a logistics business data query method in this invention includes dividing preprocessed business data into historical data and real-time data according to time sequence, selecting a machine learning algorithm to construct an analysis model based on the analysis objective, training the selected model using historical data, inputting real-time data into the trained model, and outputting detection results, including: S501. Divide the logistics business data after feature filtering into historical data and real-time data according to time sequence. S502. Dynamically select machine learning algorithms to construct analysis models based on analysis objectives; S503. Train the selected analysis model using the historical data; S504. Use the same preprocessing and feature extraction methods as historical data for real-time collected logistics business data to obtain standardized feature vectors; S505. Input the feature vector into the trained model and output the detection result in real time.

[0046] In this embodiment, the data after feature filtering is divided into historical data and real-time data according to time sequence. Historical data is used for model training and analysis, while real-time data is used for real-time detection.

[0047] In this embodiment, an appropriate machine learning algorithm is selected based on the analysis objective. For prediction problems, time series analysis or regression algorithms are selected; for classification problems, algorithms such as support vector machines (SVM), decision trees, and neural networks are selected.

[0048] In this embodiment, historical data is used to train the selected model. By adjusting the model's hyperparameters, the model achieves optimal performance on the training data. Real-time acquired data is preprocessed and features are extracted to extract key features identical to those in the training data. These features are then input into the trained model to obtain detection results in real time.

[0049] Please see Figure 6 The sixth embodiment of a logistics business data query method in this invention includes constructing a knowledge graph, importing preprocessed logistics business data into a knowledge graph construction system, receiving natural language query requests from users, and outputting query results, including: S601. Import the preprocessed logistics business data into the knowledge graph construction system: S602. Define the entity type, which includes at least: branch entity, order entity, and means of transport entity; S603. Define the relationship types, which include at least: the relationship between orders and outlets, the transportation relationship between orders and means of transport, and the influence relationship between means of transport and outlets; S604. Store the knowledge graph in a graph database.

[0050] Furthermore, the construction of the knowledge graph, which involves importing preprocessed logistics business data into the knowledge graph construction system, receiving users' natural language query requests, and outputting query results, also includes: Receive natural language query requests from users and execute them through the natural language processing module: Perform word segmentation and named entity recognition on the query text to extract a set of keywords; Based on semantic analysis, keywords are mapped to entities and relationships in a knowledge graph; Perform graph queries based on semantic analysis results; Traverse the related entities and relationship paths in the knowledge graph, retrieve the entity attributes and related data that meet the query conditions, generate structured query results, and return them to the user interface.

[0051] In this embodiment, the preprocessed and feature-engineered data is imported into a knowledge graph construction tool; entity types, such as outlets, orders, and receipt records, and relationship types, such as belonging, association, and influence, are defined; a graph database is used to store the knowledge graph, and entities and relationships are added to the knowledge graph by traversing the data.

[0052] In this embodiment, a user interface is developed, providing a text input box where users can enter natural language query questions. The user's question is sent to the backend server via the HTTP protocol to interact with the natural language processing module. Natural language processing technologies, such as word segmentation, part-of-speech tagging, and named entity recognition, are used to parse the user's input question. Keywords in the question, such as time range, branch name, and query type, are extracted and combined with entities and relationships in the knowledge graph for semantic analysis, converting the natural language question into a query statement that the computer can understand.

[0053] In this embodiment, based on the parsed query statement, a query is performed in the knowledge graph to retrieve relevant data; the query results are returned to the user and presented to the user in the form of natural language; if necessary, the model prediction results can also be combined for comprehensive analysis and answers.

[0054] The logistics business data query method in the embodiments of the present invention has been described above. The apparatus in the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 7 The implementation methods of the logistics business data query device in this embodiment of the invention include: The preprocessing module 701 is used to collect multi-source logistics business data, collect raw business data from multiple data sources, clean the raw business data, and obtain preprocessed business data. The feature extraction module 702 is used to extract time period and branch features from preprocessed business data and to filter the extracted features. The model training output module 703 is used to divide preprocessed business data into historical data and real-time data in chronological order, select machine learning algorithms to build an analysis model according to the analysis objectives, train the selected model using historical data, input real-time data into the trained model, and output the detection results. The query module 704 is used to build a knowledge graph. It imports preprocessed logistics business data into the knowledge graph construction system, receives users' natural language query requests, and outputs query results.

[0055] In this embodiment, the preprocessing module 701 includes: a data acquisition and scanning unit 7011, used to acquire raw business data from multiple heterogeneous data sources, including order data, logistics trajectory data, network point data, and receipt data of logistics business; scanning the raw business data in a line-by-line traversal manner using a data recording scanning engine; a first preset unit 7012, used to preset business logic rules, perform logical verification on the raw business data and determine whether it conforms to the business logic rules, and delete raw business data that does not conform to the business logic rules; a first extraction unit 7013, used to extract key identification fields from the raw business data, perform multimodal encoding processing on the key identification fields, and generate feature vectors; a second preset unit 7014, used to preset field categories, classifying the raw business data according to the field categories; and a filling unit 7015, used to detect the frequency of occurrence of each field value for categorical fields, fill missing values ​​with the category value with the highest frequency of occurrence for that field; and for numerical fields, fill with the mean, median, or mode according to the data distribution characteristics. The deletion processing unit 7016 is used to identify and delete duplicate records in the original business data based on the feature vector using a hash algorithm to obtain non-duplicate data; and to perform data transformation and normalization processing on the non-duplicate data to obtain preprocessed business data.

[0056] In this embodiment, the feature extraction module 702 includes: a first calculation unit 7021, used to extract time features from preprocessed order data, group and statistically analyze the order data according to daily, weekly, and monthly cycles, and calculate the number of orders, the number of signed receipts, and the time interval between signing receipts in each time period; a second calculation unit 7022, used to calculate the historical signing rate, order processing volume, and transportation delay rate of each branch; a second extraction unit 7023, used to extract the weight, volume, transportation distance, and their derived ratio features of orders; and a third calculation unit 7024, used to calculate the correlation coefficient between numerical features and the target variable, retain features whose absolute values ​​exceed the dynamic threshold, and evaluate the independence of categorical features through a chi-square test, selecting features that meet the significance level.

[0057] In this embodiment, the model training output module 703 includes: a partitioning unit 7031, used to partition the logistics business data after feature filtering into historical data and real-time data according to time order; a construction unit 7032, used to dynamically select a machine learning algorithm to construct an analysis model according to the analysis objective; a training unit 7033, used to train the selected analysis model using the historical data; a processing and extraction unit 7034, used to apply the same preprocessing and feature extraction methods as historical data to the real-time collected logistics business data to obtain standardized feature vectors; and an output unit 7035, used to input the feature vectors into the trained model and output the detection results in real time.

[0058] In this embodiment, the query module 704 includes: an import unit 7041, used to import preprocessed logistics business data into the knowledge graph construction system; a definition unit 7042, used to define entity types, which at least include: branch entity, order entity, and transportation vehicle entity; and to define relationship types, which at least include: order-to-branch relationship, order-to-transportation relationship, and transportation vehicle-to-branch influence relationship; and a storage unit 7043, used to store the knowledge graph through a graph database. The query receiving unit 7044 is used to receive natural language query requests input by the user, and executes the following through the natural language processing module: performing word segmentation and named entity recognition on the query text, extracting a keyword set; mapping the keywords to entities and relationships in the knowledge graph based on semantic analysis; performing graph query based on the semantic analysis results; and a generation unit 7045, used to traverse the associated entity and relationship paths in the knowledge graph, retrieve entity attributes and associated data that meet the query conditions, generate structured query results, and return them to the user interface.

[0059] The technical solution provided by this invention solves the problems of scattered and inconsistent formats of traditional logistics data by collecting and cleaning multi-source logistics business data, significantly improving the integrity and usability of the data and providing a high-quality data foundation for subsequent analysis. By automatically extracting time periods and network characteristics and filtering key features, manual intervention is reduced, computational redundancy is decreased, and the relevance of model input is enhanced, improving analysis efficiency and accuracy. By dividing historical data and real-time data and combining them with machine learning models, dynamic monitoring and anomaly warning of logistics operations are achieved, supporting rapid response to business changes and improving the intelligence level of logistics operations. This invention integrates data collection, cleaning, modeling, and knowledge graph technologies to form a closed-loop logistics data analysis process, optimizing the inefficiency of traditional staged processing and significantly improving the efficiency and accuracy of logistics business management.

[0060] Figure 7 The structure of the logistics business data query device shown does not constitute a limitation on the logistics business data query device, and can implement the steps of the logistics business data query method provided in the above-described method embodiments.

[0061] above Figure 7 The logistics business data query device in this embodiment of the invention is described in detail from the perspective of modular functional entities. The logistics business data query device in this embodiment of the invention is described in detail below from the perspective of hardware processing.

[0062] Figure 8This is a schematic diagram of the structure of a logistics business data query device provided in an embodiment of the present invention. The device 800 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown), each module may include a series of instruction operations on the device 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media on the device 800.

[0063] Device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.

[0064] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a logistics business data query method.

[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0066] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0067] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for querying logistics business data, characterized in that, The logistics business data query method includes: Collect multi-source logistics business data, collect raw business data from multiple data sources, clean the raw business data to obtain pre-processed business data; Extract time periods and branch characteristics from preprocessed business data, and then filter the extracted characteristics; Preprocessed business data is divided into historical data and real-time data according to time sequence. Machine learning algorithms are selected to build analysis models according to analysis objectives. Historical data is used to train the selected models. Real-time data is input into the trained models, and detection results are output. The system constructs a knowledge graph by importing pre-processed logistics business data into the system, receiving users' natural language query requests, and outputting query results.

2. The logistics business data query method according to claim 1, characterized in that, The process of collecting multi-source logistics business data involves gathering raw business data from multiple data sources, cleaning the raw business data to obtain preprocessed business data, including: Raw business data is collected from multiple heterogeneous data sources, including order data, logistics trajectory data, outlet data, and receipt data of logistics business. The original business data is scanned line by line using a data recording scanning engine. Preset business logic rules are used to perform logical verification on the original business data and determine whether it conforms to the business logic rules. Original business data that does not conform to the business logic rules is deleted. Extract key identifier fields from the original business data, perform multimodal encoding on the key identifier fields, and generate feature vectors.

3. The logistics business data query method according to claim 2, characterized in that, The process of collecting multi-source logistics business data, which involves collecting raw business data from multiple data sources and cleaning the raw business data to obtain preprocessed business data, also includes: Preset field categories, and classify the original business data according to the field categories; For categorical fields, detect the frequency of occurrence of each field value and fill missing values ​​with the category value that appears most frequently in that field; For numeric fields, choose the mean, median, or mode to fill the data based on its distribution characteristics. Based on the feature vector, a hash algorithm is used to identify and delete duplicate records in the original business data to obtain non-duplicate data. Non-repeating data is transformed and normalized to obtain preprocessed business data.

4. The logistics business data query method according to claim 3, characterized in that, The process of extracting time periods and branch characteristics from preprocessed business data, and then filtering the extracted characteristics, includes: Extract time features from the preprocessed order data, group the order data according to daily, weekly and monthly periods, and calculate the number of orders, the number of signed-outs and the time interval between signed-outs in each time period. Calculate the historical acceptance rate, order processing volume, and shipping delay rate for each branch; Extract the weight, volume, shipping distance, and their derived ratios of the order; For numerical features, calculate the correlation coefficient between the numerical features and the target variable, and retain features whose absolute values ​​exceed the dynamic threshold; For categorical features, the independence of the features is evaluated using the chi-square test, and features that meet the significance level are selected.

5. The logistics business data query method according to claim 1, characterized in that, The process involves dividing preprocessed business data into historical and real-time data according to chronological order, selecting a machine learning algorithm to construct an analysis model based on the analysis objective, training the selected model using historical data, inputting real-time data into the trained model, and outputting detection results, including: The logistics business data, after feature filtering, is divided into historical data and real-time data according to time sequence. Dynamically select machine learning algorithms to construct the analysis model based on the analysis objectives; The selected analytical model is trained using the historical data. The same preprocessing and feature extraction methods as historical data are used for real-time collected logistics business data to obtain standardized feature vectors; The feature vector is input into the trained model, and the detection results are output in real time.

6. The logistics business data query method according to claim 5, characterized in that, The process of constructing a knowledge graph involves importing preprocessed logistics business data into the knowledge graph construction system, receiving natural language query requests from users, and outputting query results, including: Import preprocessed logistics business data into the knowledge graph construction system: The entity types are defined, and the entity types include at least: branch entity, order entity, and means of transport entity; The relationship types are defined, and the relationship types include at least: the relationship between orders and outlets, the transportation relationship between orders and means of transport, and the influence relationship between means of transport and outlets; The knowledge graph is stored in a graph database.

7. The logistics business data query method according to claim 6, characterized in that, The process of constructing a knowledge graph, which involves importing preprocessed logistics business data into a knowledge graph construction system, receiving users' natural language query requests, and outputting query results, also includes: Receive natural language query requests from users and execute them through the natural language processing module: Perform word segmentation and named entity recognition on the query text to extract a set of keywords; Based on semantic analysis, keywords are mapped to entities and relationships in a knowledge graph; Perform graph queries based on semantic analysis results; Traverse the related entities and relationship paths in the knowledge graph, retrieve the entity attributes and related data that meet the query conditions, generate structured query results, and return them to the user interface.

8. A logistics business data query device, characterized in that, include: The preprocessing module is used to collect multi-source logistics business data, collect raw business data from multiple data sources, clean the raw business data, and obtain preprocessed business data. The feature extraction module is used to extract time period and branch features from preprocessed business data and to filter the extracted features. The model training output module is used to divide preprocessed business data into historical data and real-time data in chronological order, select machine learning algorithms to build analysis models according to analysis objectives, train the selected models using historical data, input real-time data into the trained models, and output detection results. The query module is used to build a knowledge graph. It imports preprocessed logistics business data into the knowledge graph construction system, receives users' natural language query requests, and outputs query results.

9. A logistics business data query device, characterized in that, It includes a memory and at least one processor, wherein the memory stores computer-readable instructions; The at least one processor invokes the computer-readable instructions in the memory to perform the steps of the logistics business data query method as described in any one of claims 1-7.

10. A computer-readable storage medium storing computer-readable instructions thereon, characterized in that, When the computer-readable instructions are executed by a processor, they implement the various steps of the logistics business data query method as described in any one of claims 1-7.

Citation Information

Cited By

  • Logistics data analysis method and system supporting natural language query

    CN122332515A