Method for querying logistics data and related device
By working together with API gateway devices and logistics server clusters, the problem of low query efficiency for multiple modes of transportation in cross-border logistics queries has been solved, achieving the effect of one-stop query of different transportation trajectories.
Patent Information
- Application Number
- CN202210958509.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In cross-border logistics tracking, existing technologies can only track logistics routes on a single website, resulting in low tracking efficiency and an inability to achieve unified tracking of multiple modes of transportation.
After obtaining the query request through the API gateway device and determining that the query type is a trajectory query, the corresponding crawler server is selected from the logistics server cluster to obtain the logistics trajectory sub-data, and then it is saved and forwarded to the user device to realize one-stop query of different transportation trajectories.
It enables one-stop query of cross-border logistics data for various transportation modes, improving query efficiency and user experience.
Smart Images

Figure CN115293699B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of network information technology, and specifically relates to a logistics data query method and related apparatus. Background Technology
[0002] Cross-border e-commerce refers to an international business activity in which trading entities belonging to different customs territories complete transactions and payment settlements through e-commerce platforms, and deliver goods through cross-border logistics to complete the transaction.
[0003] Currently, within China, thanks to the rapid development of China's e-commerce logistics industry this year, real-time tracking of parcels has been largely achieved. However, in cross-border logistics, including both domestic and international segments, each tracking website can only track a single logistics path. For example, sea freight can only be tracked on a dedicated sea freight logistics website, and rail freight can only be tracked on a dedicated rail freight logistics website. This limited tracking method means that tracking a single parcel across different modes of transport requires searching on different websites, resulting in low efficiency. Summary of the Invention
[0004] This application provides a logistics data query method and related apparatus to enable one-stop query of different transportation trajectories based on transportation type.
[0005] In a first aspect, embodiments of this application provide a logistics data query method, applied to a query server, including:
[0006] Obtain a query request from the API gateway device for the target logistics data. The query request is generated based on the logistics tracking number imported by the user on the user's device. The target logistics data refers to the logistics data corresponding to the logistics tracking number.
[0007] Determine the query type of the query request;
[0008] If the query type is a trajectory query, then the transportation type corresponding to the logistics tracking number is determined;
[0009] Based on the transportation type, one or more first crawler servers are determined from the logistics server cluster, and each of the one or more first crawler servers stores the logistics trajectory sub-data corresponding to the transportation type.
[0010] Send a first acquisition request for the logistics trajectory sub-data to each of the first crawler servers;
[0011] Receive the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers, obtain one or more logistics trajectory sub-data, and save the one or more logistics trajectory sub-data as target logistics data;
[0012] The target logistics data is sent to the API gateway device, and the one or more logistics trajectory sub-data are used to provide the API gateway device with an instruction to forward the one or more logistics trajectory sub-data to the user device, and to provide the user device with an instruction to draw transportation trajectory polylines and transportation nodes on a map.
[0013] Secondly, embodiments of this application provide a logistics data query method, applied to user equipment, the method comprising:
[0014] The system obtains the tracking number and query type entered by the user through the input box. The tracking number and query type are used to provide the API gateway device with an instruction to generate a query request. The query request is used to provide the query server with an instruction to obtain the target logistics data from the corresponding first crawler server. The target logistics data refers to the logistics data corresponding to the tracking number. The query type includes trajectory query.
[0015] Send the tracking number and query type to the API gateway device;
[0016] The system receives target logistics data sent by the API gateway device. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device.
[0017] Based on the one or more logistics trajectory sub-data, a logistics trajectory polyline and transportation nodes are drawn on the map of the display interface to obtain the logistics trajectory map corresponding to the logistics order number.
[0018] Thirdly, this application provides a logistics data query method, characterized in that it is applied to an API gateway device, and the method includes:
[0019] Receives a logistics tracking number and query type from the user device, the query type including a trajectory query;
[0020] A query request for the target logistics data is generated based on the tracking number and the query type, where the target logistics data refers to the logistics data corresponding to the tracking number.
[0021] Send the query request to the query server;
[0022] The system receives target logistics data from the query server. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device.
[0023] The target logistics data is sent to the user equipment, and the one or more logistics trajectory sub-data are used to provide the user equipment with instructions for drawing transportation trajectory polylines and transportation nodes on a map.
[0024] Fourthly, embodiments of this application provide a user interface for a user device, characterized in that the user device includes a display screen, the display screen displays the user interface, the user interface is a software interface; the user interface is controlled by the user through touch commands input on the display screen, or by the user through an input device input control commands;
[0025] The user interface includes an initial interface and a query results display interface. The initial interface includes multiple input boxes and query controls. The multiple input boxes are used to input the logistics tracking number and query type, respectively. The query results display interface includes multiple sub-interfaces, and each sub-interface corresponds to a query type. The query type includes track query.
[0026] When the tracking number and query type have been entered in the multiple input boxes, if a click operation is received on the query control, the initial interface will jump to the display sub-interface corresponding to the query type.
[0027] Fifthly, embodiments of this application provide an electronic device including a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of any one of the first to third aspects of embodiments of this application.
[0028] In a sixth aspect, embodiments of this application provide a computer storage medium, characterized in that it stores a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in any one of the first to third aspects of this embodiment.
[0029] In a seventh aspect, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in any one of the first to third aspects of embodiments of this application. The computer program product may be a software installation package.
[0030] As can be seen, in this embodiment, a query request for target logistics data is first obtained from the API gateway device; then, the query type of the query request is determined; if the query type is a trajectory query, the transportation type corresponding to the logistics tracking number is determined; then, based on the transportation type, one or more first crawler servers are determined from the logistics server cluster, each of the one or more first crawler servers storing logistics trajectory sub-data corresponding to the transportation type; a first acquisition request for the logistics trajectory sub-data is sent to each of the first crawler servers; then, the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers is received, resulting in one or more logistics trajectory sub-data, which are then saved as target logistics data; the target logistics data is sent to the API gateway device, and a user device displays the target logistics data. In this way, a one-stop query for different transportation trajectories based on transportation type is achieved. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a diagram illustrating the architecture of a logistics query system provided in an embodiment of this application.
[0033] Figure 2 This is a flowchart illustrating a logistics data query method provided in an embodiment of this application;
[0034] Figure 3 This is a schematic diagram of the transportation process for the four order types provided in the embodiments of this application;
[0035] Figure 4 This is a schematic diagram of the query result display interface provided in the embodiments of this application;
[0036] Figure 5 This is a schematic diagram of the structure of a logistics data query device provided in an embodiment of this application;
[0037] Figure 6 This is a schematic diagram of the structure of a logistics data query device provided in an embodiment of this application;
[0038] Figure 7 This is a schematic diagram of the structure of a logistics data query device provided in an embodiment of this application;
[0039] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0040] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0041] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, systems, products, or apparatuses.
[0042] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0043] The following is a brief introduction to the relevant terminology used in this application.
[0044] VGM (Verified Gross Container Weight): This is the sum of the total weight of the cargo and the tare weight of the container, including packaging and dunnage. Verifying the gross container weight is a commitment to safety. Misreporting the gross container weight poses risks to people, goods, and equipment both domestically and internationally, both inland and at sea, and can lead to accidents. The VGM requirement aims to reduce the occurrence of such accidents.
[0045] API Gateway: API Gateway (abbreviated as APIG) is an API hosting service provided by Huawei Cloud. An API (Application Programming Interface) is a set of predefined functions that applications encapsulate their service capabilities into APIs and expose to users through the API Gateway. An API includes basic information, request paths and parameters between the front-end and back-end, and request-related protocols.
[0046] Currently, in cross-border logistics tracking, including both domestic and international segments, each tracking website can only track a single logistics path. For example, sea freight can only be tracked on a dedicated sea freight logistics website, and rail freight can only be tracked on a dedicated rail freight logistics website. This limited tracking method means that tracking a package for different modes of transport requires searching on different websites, resulting in low tracking efficiency.
[0047] To address the aforementioned issues, this application provides a logistics data query method. This method can be applied to cross-border logistics query scenarios. It involves obtaining a query request for target logistics data from an API gateway device; then determining the query type of the request; if the query type is a trajectory query, determining the transportation type corresponding to the logistics tracking number; then, based on the transportation type, determining one or more corresponding first crawler servers from a logistics server cluster, each of which stores logistics trajectory sub-data corresponding to the transportation type; sending a first acquisition request for the logistics trajectory sub-data to each first crawler server; subsequently, receiving the logistics trajectory sub-data sent by an external data source service from the one or more first crawler servers, obtaining one or more logistics trajectory sub-data sets, and saving these one or more logistics trajectory sub-data sets as target logistics data; sending the target logistics data to the API gateway device, and displaying the target logistics data on a user device. This achieves one-stop querying of different transportation trajectories based on transportation type. This solution is applicable to various scenarios, including but not limited to the application scenarios mentioned above.
[0048] The system architecture involved in the embodiments of this application is described below.
[0049] Figure 1This application provides an architecture diagram of a logistics query system. The system includes a user device 10, an API gateway device 20, a query server 30, and a logistics server cluster 40. Users perform query operations through a website or software displayed on the user device 10, such as entering a logistics tracking number or clicking to trigger related functional controls. After detecting a user's query operation, the user device 10 sends relevant data (e.g., logistics tracking number and query type) to the API gateway device 20. The API gateway device 20 preprocesses the tracking number, generates a query request, and then sends the query request to the crawler request data preprocessing service of the query server 30. The crawler request data preprocessing service converts the query request's data format to conform to the format requirements of the corresponding crawler machine in the logistics server cluster 40 and forwards it to the distribution service of the query server 30. The distribution service determines the crawler machine whose machine parameters correspond to the relevant data from the logistics server cluster 40 and then forwards the converted query request to that crawler machine. A web crawler; the external data source service in the web crawler sends the corresponding target logistics data to the query server 30 according to the query request; the distribution service obtains the corresponding parsing method based on the logistics provider KEY, parses the target logistics data, organizes the target logistics data into a unified data format, and then sends the target logistics data to the socket service in the query server 30; the socket service saves the target logistics data to a Redis database and a MongoDB database, and then forwards the target logistics data to the API gateway device 20; the API gateway device 20 forwards the target logistics data to the user device 10; the user device 10 displays the target logistics data on a display screen.
[0050] Specifically, the order number preprocessing includes:
[0051] a) Filter out non-standard order numbers;
[0052] b. Filter duplicate order numbers;
[0053] c, Filter out order numbers that exceed the current processing limit;
[0054] d. Retrieve the logistics provider, destination country abbreviation, and shipping time corresponding to the tracking number from the cache (the set of basic tracking information pre-stored locally on the API gateway device 20);
[0055] e. If the corresponding logistics provider is not found in the cache (the cache refers to the local cache of the API gateway device 20), then the logistics provider is matched according to the tracking number rules (tracking number rules refer to the data format of logistics tracking numbers of different logistics providers, such as: international postal tracking numbers include large parcels, small parcels and EMS, such as CP123456789CN, RR123456789CN, EE123456789CN respectively, while the tracking numbers of third-party international logistics companies are such as DHL, FEDEX, UPS, TNT and other international logistics tracking numbers).
[0056] f. Mark whether the tracking number needs to be queried in two segments (this refers to the situation where the logistics information of the sending country and the logistics information of the destination country correspond to different query website links, and the logistics information needs to be queried through the respective logistics provider's query interface).
[0057] g. If the API gateway device 20 finds that there is cached data locally and the cached data update time is no more than 10 minutes (this time is a custom requirement of the enterprise), and the logistics provider in the tracking number is not the logistics provider selected by the user / enterprise but the logistics provider configured by the system by default, then the cached data is organized and returned to the front-end device.
[0058] H. For other queries that require real-time access, the API gateway device 20 interacts with the query server 30 to check whether the number of connections to the crawler request data preprocessing service of the query server 30 has reached the limit. If not, a request (real-time query request for the trajectory of the target logistics number) is sent to the service; otherwise, a system busy exception is returned.
[0059] The specific methods will be described in detail below.
[0060] Please see Figure 2 This application also provides a logistics data query method, applied to a query server, including:
[0061] Step 201: Obtain the query request for the target logistics data from the API gateway device.
[0062] The query request is generated based on the tracking number imported by the user on the user's device, and the target logistics data refers to the logistics data corresponding to the tracking number.
[0063] Step 202: Determine the query type of the query request.
[0064] For example, query types include trajectory query, statistical data query, distribution data query, order status information query, etc. In addition, other types of information queries can also be included, without being limited to uniqueness here.
[0065] Step 203: If the query type is a trajectory query, then determine the transportation type corresponding to the logistics tracking number.
[0066] Step 204: Based on the transportation type, determine one or more corresponding first crawler servers from the logistics server cluster. Each of the one or more first crawler servers stores the logistics trajectory sub-data corresponding to the transportation type.
[0067] In one possible embodiment, the transportation type includes a first transportation type and a second transportation type; determining one or more corresponding first crawler servers from the logistics server cluster according to the transportation type includes:
[0068] If the logistics tracking number only includes the first transportation type or the second transportation type, then the first crawler server in an idle state is determined from the logistics server cluster. The idle state means that it can respond to the first acquisition request at the current moment. The first crawler server stores the first logistics trajectory sub-data / the second logistics trajectory sub-data. The first logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the first transportation type, and the second logistics trajectory sub-data is the logistics trajectory value data corresponding to the second transportation type.
[0069] If the logistics tracking number includes a first transportation type and a second transportation type, then one or more first crawler servers in an idle state are determined from the logistics server cluster; when a first crawler server is determined, the first crawler server stores the first logistics trajectory sub-data and the second logistics trajectory sub-data; when multiple first crawler servers are determined, the multiple first crawler servers respectively store the first logistics trajectory sub-data and the second logistics trajectory sub-data.
[0070] For example, the first type of transport includes sea and / or air transport, and the second type of transport includes truck and / or rail transport.
[0071] For example, the type of transport can be determined by a transport identifier, and different transport identifiers can be associated with different types of transport. The identifier can be composed of numbers and / or letters in the tracking number or a combination of numbers and / or letters in the tracking number, or other identifiers, without being limited to uniqueness.
[0072] In practice, in cross-border logistics, different parcels require different modes of transport due to their different destination countries. Some parcels are destined for neighboring countries by land, so the transport method may be air freight or trucking, and after delivery to the destination country, trucking or rail transport can also be used. Other parcels are destined for countries separated by sea, so the transport method may be sea freight or air freight, and after delivery to the destination country, trucking or rail transport can also be used. Understandably, once a parcel is transported to the destination country by air or sea, the customer can pick it up directly at the airport or port, without necessarily needing to use land transport (trucking, rail, etc.) to deliver the parcel. The choice can be made according to needs, and no single method is specified here.
[0073] Specifically, if the package corresponding to the tracking number only includes the first type of transportation, such as sea freight, obtain the IP address associated with the destination country, and determine the first crawler machine based on the IP address.
[0074] As can be seen, in this embodiment, different crawler machines are determined based on different transportation types, thereby enabling targeted queries for different transportation types.
[0075] Step 205: Send a first acquisition request for the logistics trajectory sub-data to each of the first crawler servers.
[0076] Step 206: Receive the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers, obtain one or more logistics trajectory sub-data, and save the one or more logistics trajectory sub-data as target logistics data.
[0077] In one possible embodiment, receiving the logistics trajectory sub-data sent by an external data source service from the one or more first crawler servers includes:
[0078] If the tracking number only includes the first transportation type, then the first transportation tool identifier, the first transportation trajectory, and the first current transportation status are received from the external data source service of the first crawler server. The first transportation type includes sea freight and / or air freight, and the first transportation tool identifier includes the ship number and / or flight number.
[0079] If the logistics tracking number only includes the second transportation type, then the second transportation tool identifier, the second transportation trajectory, and the second current transportation status are received from the external data source service of the first crawler server. The first transportation type includes air freight and / or train, and the second transportation tool identifier includes license plate number / train number.
[0080] If the tracking number includes a first transportation type and a second transportation type, then the system receives a first transportation tool identifier, a first transportation trajectory, a first current transportation status, a second transportation tool identifier, a second transportation trajectory, and a second current transportation status from the external data source service of the one or more crawler servers.
[0081] For example, the first current transportation status refers to the transportation node of the first transportation process that the package corresponding to the tracking number is currently in, and the first transportation process is a transportation process of the first transportation type; the second current transportation status refers to the transportation node of the second transportation process that the package corresponding to the tracking number is currently in, and the second transportation process is a transportation process of the second transportation type.
[0082] For example, the logistics trajectory sub-data includes, but is not limited to, vehicle identification, transportation trajectory, and current transportation status, and the transportation trajectory includes, but is not limited to, the coordinate signals and trajectory information of the vehicle.
[0083] In practice, different transportation types have different transportation processes. Therefore, different logistics trajectory sub-data will be received for each transportation type. When the transportation of a package requires multiple transportation types, the corresponding logistics trajectory sub-data needs to be obtained from multiple logistics providers, that is, from multiple first crawler servers, thus obtaining multiple logistics trajectory sub-data.
[0084] As can be seen, in this embodiment, based on different transportation types, corresponding logistics trajectory sub-data is obtained from different crawler servers, thereby achieving accurate acquisition of logistics trajectory sub-data.
[0085] Step 207: Send the target logistics data to the API gateway device.
[0086] The one or more logistics trajectory sub-data are used to provide the API gateway device with instructions to forward the one or more logistics trajectory sub-data to the user device, and to provide the user device with instructions to draw transportation trajectory polylines and transportation nodes on a map.
[0087] In one possible embodiment, after receiving the target logistics data, the API gateway device caches some or all of the data in the target logistics data. If the user performs the same query again within a preset time, the corresponding target cached data is directly retrieved from the cache in the API gateway and sent to the user device, thereby improving the efficiency of the query.
[0088] In one possible embodiment, the query type includes statistical data queries; after sending the logistics trajectory data to the API gateway device, the method further includes:
[0089] If the query type is the statistical data query, then one or more corresponding second crawler servers are determined from the logistics server cluster. Each of the one or more second crawler servers stores statistical data, which includes timeliness data. The timeliness data includes logistics provider timeliness data and / or country timeliness data. Logistics provider timeliness refers to the first average time for logistics providers to transport parcels, and country timeliness refers to the second average time from the country of origin to the country of destination.
[0090] Send a second acquisition request for the logistics provider's timeliness data and / or the country's timeliness data to the one or more second crawler servers;
[0091] Receive the logistics provider timeliness data and / or the country timeliness data sent by the external data source service of the one or more second crawler servers, obtain one or more logistics provider timeliness data and / or the country timeliness data, and save the one or more logistics provider timeliness data and / or the country timeliness data as the target logistics data;
[0092] The target logistics data is sent to the API gateway device. The timeliness data of one or more logistics providers and / or country timeliness data are used to provide the user device with an instruction to display a logistics provider timeliness statistics table and / or a country timeliness statistics table in a display sub-window. The logistics provider timeliness statistics table includes the logistics provider timeliness data, and the country timeliness statistics table includes the country timeliness data. The logistics provider timeliness statistics table is used to display the logistics provider, the number of first transported parcels, and the first average time corresponding to the logistics provider. The country timeliness statistics table is used to display the destination country, the number of second transported parcels, and the second average time corresponding to the destination country.
[0093] In specific implementation, to enable users to better understand logistics providers or destination countries for reference when selecting logistics providers, or for logistics providers to summarize their experiences, this embodiment provides statistical data query. The statistical data includes timeliness data. If the user inputs a statistical data query, the second crawler server is identified, and the corresponding logistics provider timeliness data and / or country timeliness data are obtained from the second crawler server. Then, the data is sent to the user's device via the API gateway device to display the corresponding logistics provider timeliness statistics table and / or country timeliness statistics table.
[0094] Specifically, if the statistical data query is only for the logistics provider's timeliness data, then only the logistics provider's timeliness data will be retrieved from the second crawler server that stores the logistics provider's timeliness data; similarly, if the statistical data query is only for the country's timeliness data, then only the country's timeliness data will be retrieved from the second crawler server that stores the country's timeliness data. Alternatively, the logistics provider's timeliness data and the country's timeliness data can be retrieved simultaneously from the two second crawler servers mentioned above.
[0095] As can be seen, in this embodiment, for statistical data queries, the corresponding statistical data is obtained from the crawler server that stores the corresponding statistical data, thereby enabling the query of statistical data such as timeliness statistics tables, enriching the types of logistics queries.
[0096] In one possible embodiment, the query type further includes distributed data query; after sending the logistics trajectory data to the API gateway device, the method further includes:
[0097] If the query type is the distribution data query, then one or more corresponding third crawler servers are determined from the logistics server cluster. The one or more third crawler servers store distribution data, which includes tracking number country distribution data. Tracking number country distribution refers to the distribution status of tracking numbers stored in the database in multiple destination countries.
[0098] Send a third acquisition request for the country distribution data of the single number to the one or more third crawler servers;
[0099] Receive the country distribution data of the tracking number sent by the external data source service of the one or more third crawler servers, obtain one or more country distribution data of tracking number, and save the one or more country distribution data of tracking number as the target logistics data;
[0100] The target logistics data is sent to the user equipment. The country distribution data of the tracking number is used to provide the user equipment with an instruction to display a country distribution statistics table of the tracking number in a display sub-window. The country distribution statistics table of the tracking number is used to display the country distribution of the tracking number.
[0101] In this implementation, to help users understand the main business of logistics providers, this example provides a query service for the distribution data of logistics tracking numbers. The distribution data includes country-specific tracking number data, reflecting the distribution of each logistics provider's tracking numbers across various countries, thereby revealing the business layout of each logistics provider in different countries.
[0102] As can be seen, in this embodiment, by obtaining the country distribution statistics table of the logistics tracking numbers of logistics providers in various countries, the user is provided with the business layout of each logistics provider in various countries, which helps the user to accurately select a logistics provider.
[0103] In one possible embodiment, after sending the target logistics data to the API gateway device, the method further includes:
[0104] If the query type is an order status information query, then determine the order type corresponding to the logistics tracking number;
[0105] Obtain the transportation process corresponding to the order type, wherein the transportation process includes multiple transportation nodes;
[0106] Determine the current transportation node for the logistics tracking number from the plurality of transportation nodes;
[0107] Based on the transportation node, determine one or more corresponding fourth crawler servers from the logistics server cluster;
[0108] Send a fourth request for the order status information to the one or more fourth crawler servers;
[0109] Receive order status information sent by the external data source service of the one or more fourth crawler servers, and save the order status information as the target logistics data;
[0110] The target logistics data is sent to the user equipment, and the order status information is used to provide the user equipment with an indication to display the order status information in a display sub-window.
[0111] Specifically, in the logistics industry, there are various order types, and the transportation process differs for each order type. For example... Figure 3 The above, Figure 3 The diagram illustrates the transportation flow for four order types. The exporter's turnkey cross-border transportation flow is: Order Receipt → Turnkey First-Leg Transportation → Export Customs Declaration → Trunk Line Transportation → Import Customs Clearance → Last-Leg Delivery; the overseas warehouse outbound cross-border transportation flow is: Order Receipt → Outbound Execution → Transit Execution → Export Customs Declaration → Trunk Line Transportation → Import Customs Clearance → Last-Leg Delivery; the self-shipped to warehouse cross-border transportation flow is: Order Receipt → Warehouse Receipt and Sign-in → Transit Execution → Export Customs Declaration → Trunk Line Transportation → Import Customs Clearance → Last-Leg Delivery; and the production and delivery cross-border transportation flow is: Order Receipt → Production Planning → Production Execution → First-Leg Transportation → Transit Execution → Export Customs Declaration → Trunk Line Transportation → Import Customs Clearance → Last-Leg Delivery.
[0112] In practice, when the user enters an order status information query, it means that the user needs to know the current status of the package corresponding to the logistics tracking number. Therefore, it is necessary to first determine the order type of the logistics order, then determine the corresponding transportation process based on the order type, and then obtain the order status information corresponding to the current transportation node from one or more fourth crawler servers.
[0113] As can be seen, this embodiment enables the query of order status information.
[0114] This application embodiment also provides a logistics data query method, characterized in that it is applied to user equipment, and the method includes:
[0115] The system obtains the tracking number and query type entered by the user through the input box. The tracking number and query type are used to provide the API gateway device with an instruction to generate a query request. The query request is used to provide the query server with an instruction to obtain the target logistics data from the corresponding first crawler server. The target logistics data refers to the logistics data corresponding to the tracking number. The query type includes trajectory query.
[0116] Send the tracking number and query type to the API gateway device;
[0117] The system receives target logistics data sent by the API gateway device. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device.
[0118] Based on the one or more logistics trajectory sub-data, a logistics trajectory polyline and transportation nodes are drawn on the map of the display interface to obtain the logistics trajectory map corresponding to the logistics order number.
[0119] In practice, when a user needs to query logistics data, they log in to the query website or software maintained by the logistics query system, enter the corresponding logistics tracking number and query type in the user interface of the website or software, and then send the entered logistics tracking number and query type to the API gateway device. The API gateway device performs corresponding tracking number preprocessing and generates a query request. Finally, the API gateway device receives the target logistics data fed back from the query server and sends it to the user device. The user device displays the target logistics data, allowing the user to view the logistics data they want to query.
[0120] As can be seen, in this embodiment, the user device obtains the tracking number and query type input by the user. The API gateway device generates a query request based on the tracking number and query type. If the query server determines that the query type is a trajectory query, it further determines the transportation type corresponding to the tracking number. Based on the transportation type, it performs the corresponding logistics trajectory sub-data acquisition operation, obtains the logistics trajectory sub-data from the logistics server cluster as the target logistics data, and finally returns it to the user device sequentially through the query server and API gateway device. The user device then displays the corresponding logistics information based on the target logistics data. In this way, a one-stop query for different transportation trajectories based on transportation type is realized.
[0121] This application embodiment also provides a logistics data query method, characterized in that it is applied to an API gateway device, and the method includes:
[0122] Receives a logistics tracking number and query type from the user device, the query type including a trajectory query;
[0123] A query request for the target logistics data is generated based on the tracking number and the query type, where the target logistics data refers to the logistics data corresponding to the tracking number.
[0124] Send the query request to the query server;
[0125] The system receives target logistics data from the query server. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device.
[0126] The target logistics data is sent to the user equipment, and the one or more logistics trajectory sub-data are used to provide the user equipment with instructions for drawing transportation trajectory polylines and transportation nodes on a map.
[0127] In practice, when the API gateway device receives the tracking number and query type from the user device, it retrieves the logistics provider corresponding to the tracking number from its cache, matches the tracking number according to the logistics provider, generates a query request together with the matched logistics provider, tracking number, and query type, and sends the query request to the query server. The query server then retrieves the target logistics data from the corresponding crawler server in the logistics server cluster and returns the target logistics data to the API gateway device, which then forwards the target logistics data to the user device for display.
[0128] As can be seen, in this embodiment, the user device obtains the tracking number and query type input by the user. The API gateway device generates a query request based on the tracking number and query type. If the query server determines that the query type is a trajectory query, it further determines the transportation type corresponding to the tracking number. Based on the transportation type, it performs the corresponding logistics trajectory sub-data acquisition operation, obtains the logistics trajectory sub-data from the logistics server cluster as the target logistics data, and finally returns it to the user device sequentially through the query server and API gateway device. The user device then displays the corresponding logistics information based on the target logistics data. In this way, a one-stop query for different transportation trajectories based on transportation type is realized.
[0129] In one possible embodiment, if the tracking number rule confirms that multiple logistics providers are needed to obtain the complete logistics trajectory for the tracking number, then logistics trajectory sub-data is obtained from the sixth crawler server corresponding to each of the multiple logistics providers, resulting in multiple logistics trajectory sub-data sets. These are then sent to the user device, which merges the multiple logistics trajectory sub-data sets for the same tracking number and displays them as a complete logistics trajectory on the trajectory map. The multiple logistics trajectory sub-data sets include first-leg data and last-leg data.
[0130] As can be seen, in this embodiment, the logistics trajectory splicing function is realized by merging and displaying the logistics trajectory sub-data of different logistics providers.
[0131] This application embodiment also provides a user interface for a user device, characterized in that the user device includes a display screen, the display screen displays the user interface, the user interface is a software interface; the user interface is controlled by the user through touch commands input on the display screen, or by the user through control commands input on an input device;
[0132] The user interface includes an initial interface and a query results display interface. The initial interface includes multiple input boxes and query controls. The multiple input boxes are used to input the logistics tracking number and query type, respectively. The query results display interface includes multiple sub-interfaces, and each sub-interface corresponds to a query type. The query type includes track query.
[0133] When the tracking number and query type have been entered in the multiple input boxes, if a click operation is received on the query control, the initial interface will jump to the display sub-interface corresponding to the query type.
[0134] In practice, users interact with the initial interface in the user interface, inputting corresponding touch commands, such as inputting the logistics tracking number and query type from input boxes / selection boxes, and after receiving the target logistics data returned by the API gateway device, they are redirected to the query results display interface to show the corresponding query results.
[0135] like Figure 4 The query results display interface shows the tracking number, tracking number status (as shown in "In Transit"), logistics provider (as shown in "XX Logistics Provider"), basic information, transportation vehicle information, planned action, and transportation process 401, etc. The basic information refers to the package information corresponding to the tracking number, such as... Figure 4 The package is transported by sea, therefore the basic information includes the receiving location, loading port, unloading port, delivery location, database address, service mode, number of containers, gross weight, volume, number of manifests, estimated loading date, VGM cut-off date, and cut-off date (arrival date). The container information includes container number, dimensions / type, seal number, service type, quantity, mode, VGM, current status, and date. The planned actions include the estimated arrival date, location, and estimated arriving vessel / voyage. The transportation process 401 includes multiple transportation nodes, with the current node highlighted. Furthermore, the query results display interface includes controls for copying links, copying results, and trajectory translation. The copy link control copies links to the query results display page, the copy results control copies all content from the query results display page, and the trajectory translation displays a trajectory map based on the query results.
[0136] As can be seen, in this embodiment, by displaying the target logistics data in the query results display interface, users can get an overview of the logistics information and view the trajectory map, which improves the visualization of the query and the efficiency of viewing logistics information.
[0137] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, mobile electronic devices include corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0138] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0139] Please see Figure 5 This application also provides a logistics data query device 50, applied to a query server, comprising:
[0140] The acquisition unit 51 is used to acquire a query request for target logistics data from the API gateway device. The query request is generated based on the logistics tracking number imported by the user on the user device. The target logistics data refers to the logistics data corresponding to the logistics tracking number.
[0141] The determining unit 52 is used to determine the query type of the query request; and when the query type is a trajectory query, to determine the transportation type corresponding to the logistics tracking number; and according to the transportation type, to determine one or more first crawler servers from the logistics server cluster, wherein each of the one or more first crawler servers stores the logistics trajectory sub-data corresponding to the transportation type.
[0142] The first sending unit 53 is used to send a first acquisition request for the logistics trajectory sub-data to each of the first crawler servers;
[0143] The receiving unit 54 is used to receive the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers, obtain one or more logistics trajectory sub-data, and save the one or more logistics trajectory sub-data as target logistics data.
[0144] The second sending unit 55 is used to send the target logistics data to the API gateway device. The one or more logistics trajectory sub-data are used to provide the API gateway device with an instruction to forward the one or more logistics trajectory sub-data to the user device, and to provide the user device with an instruction to draw transportation trajectory polylines and transportation nodes on a map.
[0145] As can be seen, in this embodiment, a query request for target logistics data is first obtained from the API gateway device; then, the query type of the query request is determined; if the query type is a trajectory query, the transportation type corresponding to the logistics tracking number is determined; then, based on the transportation type, one or more first crawler servers are determined from the logistics server cluster, each of the one or more first crawler servers storing logistics trajectory sub-data corresponding to the transportation type; a first acquisition request for the logistics trajectory sub-data is sent to each of the first crawler servers; then, the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers is received, resulting in one or more logistics trajectory sub-data sets, which are then saved as target logistics data; finally, the target logistics data is sent to the API gateway device, and the target logistics data is displayed by a user device. In this way, a one-stop query for different transportation trajectories based on transportation type is achieved.
[0146] In one possible embodiment, the transportation type includes a first transportation type and a second transportation type; in the aspect of determining one or more corresponding first crawler servers from the logistics server cluster according to the transportation type, the determining unit 52 is specifically used for:
[0147] If the logistics tracking number only includes the first transportation type or the second transportation type, then the first crawler server in an idle state is determined from the logistics server cluster. The idle state means that it can respond to the first acquisition request at the current moment. The first crawler server stores the first logistics trajectory sub-data / the second logistics trajectory sub-data. The first logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the first transportation type, and the second logistics trajectory sub-data is the logistics trajectory value data corresponding to the second transportation type.
[0148] If the logistics tracking number includes a first transportation type and a second transportation type, then one or more first crawler servers in an idle state are determined from the logistics server cluster; when a first crawler server is determined, the first crawler server stores the first logistics trajectory sub-data and the second logistics trajectory sub-data; when multiple first crawler servers are determined, the multiple first crawler servers respectively store the first logistics trajectory sub-data and the second logistics trajectory sub-data.
[0149] In one possible embodiment, in receiving the logistics trajectory sub-data sent by an external data source service from the one or more first crawler servers, the receiving unit 54 is specifically configured to:
[0150] If the tracking number only includes the first transportation type, then the first transportation tool identifier, the first transportation trajectory, and the first current transportation status are received from the external data source service of the first crawler server. The first transportation type includes sea freight and / or air freight, and the first transportation tool identifier includes the ship number and / or flight number.
[0151] If the logistics tracking number only includes the second transportation type, then the second transportation tool identifier, the second transportation trajectory, and the second current transportation status are received from the external data source service of the first crawler server. The first transportation type includes air freight and / or train, and the second transportation tool identifier includes license plate number / train number.
[0152] If the tracking number includes a first transportation type and a second transportation type, then the system receives a first transportation tool identifier, a first transportation trajectory, a first current transportation status, a second transportation tool identifier, a second transportation trajectory, and a second current transportation status from the external data source service of the one or more crawler servers.
[0153] In one possible embodiment, the query type includes statistical data queries; after sending the logistics trajectory data to the API gateway device, the device further includes:
[0154] The determining unit 52 is further configured to determine one or more corresponding second crawler servers from the logistics server cluster when the query type is the statistical data query. Each of the one or more second crawler servers stores statistical data, which includes timeliness data. The timeliness data includes logistics provider timeliness data and / or country timeliness data. Logistics provider timeliness refers to the first average time for logistics providers to transport parcels, and country timeliness refers to the second average time from the country of origin to the country of destination.
[0155] The first sending unit 53 is further configured to send a second acquisition request for the logistics provider's timeliness data and / or the country's timeliness data to the one or more second crawler servers;
[0156] The receiving unit 54 is further configured to receive the logistics provider timeliness data and / or the country timeliness data sent by the external data source service of the one or more second crawler servers, obtain one or more logistics provider timeliness data and / or the country timeliness data, and save the one or more logistics provider timeliness data and / or the country timeliness data as the target logistics data;
[0157] The second sending unit 55 is further configured to send the target logistics data to the API gateway device. The one or more logistics provider timeliness data and / or country timeliness data are used to provide the user device with an instruction to display a logistics provider timeliness statistics table and / or a country timeliness statistics table in a display sub-window. The logistics provider timeliness statistics table includes the logistics provider timeliness data, and the country timeliness statistics table includes the country timeliness data. The logistics provider timeliness statistics table is used to display the logistics provider, the number of first transported parcels, and the first average time corresponding to the logistics provider. The country timeliness statistics table is used to display the destination country, the number of second transported parcels, and the second average time corresponding to the destination country.
[0158] In one possible embodiment, the query type further includes distributed data query; after sending the logistics trajectory data to the API gateway device, the method further includes:
[0159] The determining unit 52 is further configured to determine one or more corresponding third crawler servers from the logistics server cluster when the query type is the distribution data query. The one or more third crawler servers store distribution data, which includes tracking number country distribution data. Tracking number country distribution refers to the distribution status of tracking numbers stored in the database in multiple destination countries.
[0160] The first sending unit 53 is further configured to send a third acquisition request for the country distribution data of the serial number to the one or more third crawler servers;
[0161] The receiving unit 54 is also used to receive the country distribution data of the tracking number sent by the external data source service of the one or more third crawler servers, obtain one or more country distribution data of tracking number, and save the one or more country distribution data of tracking number as the target logistics data.
[0162] The second sending unit 55 is further configured to send the target logistics data to the user equipment, wherein the tracking number country distribution data is used to provide the user equipment with an instruction to display a tracking number country distribution statistics table in a display sub-window, and the tracking number country distribution statistics table is used to display the tracking number country distribution.
[0163] In one possible embodiment, after sending the target logistics data to the API gateway device, the method further includes:
[0164] The determining unit 52 is further configured to: determine the order type corresponding to the logistics tracking number when the query type is an order status information query; determine the current transportation node of the logistics tracking number from the plurality of transportation nodes; and determine one or more corresponding fourth crawler servers from the logistics server cluster based on the transportation node.
[0165] The acquisition unit 51 is also used to acquire the transportation process corresponding to the order type, and the transportation process includes multiple transportation nodes;
[0166] The first sending unit 53 is further configured to send a fourth acquisition request for the order status information to the one or more fourth crawler servers;
[0167] The receiving unit 54 is also used to receive order status information sent by the external data source service of the one or more fourth crawler servers, and save the order status information as the target logistics data;
[0168] The second sending unit 55 is further configured to send the target logistics data to the user equipment, and the order status information is used to provide the user equipment with an indication to display the order status information in a display sub-window.
[0169] Please see Figure 6 This application also provides a logistics data query device 60, applied to user equipment, the method comprising:
[0170] The acquisition unit 61 is used to acquire the logistics tracking number and query type entered by the user through the input box. The logistics tracking number and the query type are used to provide the API gateway device with an instruction to generate a query request. The query request is used to provide the query server with an instruction to obtain the target logistics data from the corresponding first crawler server. The target logistics data refers to the logistics data corresponding to the logistics tracking number. The query type includes trajectory query.
[0171] Sending unit 62 is used to send the logistics tracking number and query type to the API gateway device;
[0172] The receiving unit 63 is used to receive target logistics data sent by the API gateway device; when the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are respectively stored in one or more first crawler servers in the logistics server cluster; the logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number; the transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device;
[0173] The drawing unit 64 is used to draw logistics trajectory polylines and transportation nodes on the map of the display interface based on the one or more logistics trajectory sub-data, so as to obtain the logistics trajectory map corresponding to the logistics order number.
[0174] Please see Figure 7 This application also provides a logistics data query device 70, applied to an API gateway device, the method comprising:
[0175] The first receiving unit 71 is used to receive the logistics tracking number and query type from the user equipment, wherein the query type includes a trajectory query.
[0176] The generation unit 72 is used to generate a query request for target logistics data based on the logistics tracking number and the query type, wherein the target logistics data refers to the logistics data corresponding to the logistics tracking number;
[0177] The first sending unit 73 is used to send the query request to the query server;
[0178] The second receiving unit 74 is used to receive the target logistics data from the query server. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are respectively stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device.
[0179] The second sending unit 75 is used to send the target logistics data to the user equipment, wherein the one or more logistics trajectory sub-data are used to provide the user equipment with an indication to draw transportation trajectory polylines and transportation nodes on a map.
[0180] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0181] This application also provides an electronic device 80, such as... Figure 8 As shown, it includes at least one processor 81, a display screen 82, and a memory 83, and may also include a communications interface 85 and a bus 84. The processor 81, display screen 82, memory 83, and communications interface 85 can communicate with each other via the bus 84. The display screen 82 is configured to display a preset user guide interface in the initial setup mode. The communications interface 85 can transmit information. The processor 81 can call logical instructions in the memory 83 to execute the methods described in the above embodiments.
[0182] Optionally, the electronic device 80 may be a mobile electronic device, an electronic device, or other devices, and is not limited to any particular type.
[0183] Furthermore, the logic instructions in the aforementioned memory 83 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0184] The memory 83, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 81 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 83, thereby implementing the methods in the above embodiments.
[0185] The memory 83 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the electronic device 80. Furthermore, the memory 83 may include high-speed random access memory (RAM) and may also include non-volatile memory. For example, 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, may be used, or they may be transient storage media.
[0186] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0187] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.
[0188] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0189] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, and systems can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0190] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0191] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.
[0192] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, volatile memory, or non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM), etc., various media capable of storing program code.
[0193] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can easily conceive of variations or substitutions without departing from the spirit and scope of the present invention, and various modifications and alterations can be made, including combinations of the different functions and implementation steps described above, as well as software and hardware implementation methods, all of which are within the protection scope of the present invention.
Claims
1. A method for querying logistics data, characterized in that, A query server is applied to a logistics query system, the logistics query system including user equipment, API gateway equipment, the query server, and a logistics server cluster, the logistics server cluster including one or more first crawler servers, and the query server including a distribution service, a Socket service, a Redis database, and a MongoDB database; the method includes: Obtain a query request from the API gateway device for the target logistics data. The query request is generated based on the logistics tracking number imported by the user on the user's device. The target logistics data refers to the logistics data corresponding to the logistics tracking number. Determine the query type of the query request; If the query type is a trajectory query, then the transportation type corresponding to the logistics tracking number is determined; Based on the transportation type, determine one or more corresponding first crawler servers from the logistics server cluster, including: if the logistics tracking number only includes a first transportation type or a second transportation type, determine the first crawler server in an idle state from the logistics server cluster, where idle state means that it can respond to the first acquisition request at the current moment. The first crawler server stores first logistics trajectory sub-data or second logistics trajectory sub-data, where the first logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the first transportation type, and the second logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the second transportation type; if the logistics tracking number includes a first transportation type... For the second transportation type, one or more first crawler servers in an idle state are determined from the logistics server cluster; when one first crawler server is determined, the first crawler server stores the first logistics trajectory sub-data and the second logistics trajectory sub-data; when multiple first crawler servers are determined, the multiple first crawler servers respectively store the first logistics trajectory sub-data and the second logistics trajectory sub-data; each of the one or more first crawler servers stores the logistics trajectory sub-data corresponding to the transportation type, where the first transportation type includes sea freight and / or air freight, and the second transportation type includes truck freight and / or train freight. Send a first acquisition request for logistics trajectory sub-data to each of the first crawler servers; Receive the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers, obtain one or more logistics trajectory sub-data, and save the one or more logistics trajectory sub-data as target logistics data; The target logistics data is sent to the API gateway device, and the one or more logistics trajectory sub-data are used to provide the API gateway device with an instruction to forward the one or more logistics trajectory sub-data to the user device, and to provide the user device with an instruction to draw transportation trajectory polylines and transportation nodes on a map.
2. The method according to claim 1, characterized in that, Receiving the logistics trajectory sub-data sent by the external data source service of the one or more first crawler servers includes: If the tracking number only includes the first transportation type, then the first transportation tool identifier, the first transportation trajectory, and the first current transportation status are received from the external data source service of the first crawler server. The first transportation type includes sea freight and / or air freight, and the first transportation tool identifier includes the ship number and / or flight number. If the logistics tracking number only includes the second transportation type, then the second transportation tool identifier, the second transportation trajectory, and the second current transportation status are received from the external data source service of the first crawler server. The second transportation type includes air freight and / or train, and the second transportation tool identifier includes license plate number / train number. If the tracking number includes a first transportation type and a second transportation type, then the system receives a first transportation tool identifier, a first transportation trajectory, a first current transportation status, a second transportation tool identifier, a second transportation trajectory, and a second current transportation status from the external data source service of the one or more crawler servers.
3. The method according to claim 1 or 2, characterized in that, The query type includes statistical data queries; after sending logistics trajectory data to the API gateway device, the method further includes: If the query type is the statistical data query, then one or more corresponding second crawler servers are determined from the logistics server cluster. Each of the one or more second crawler servers stores statistical data, which includes timeliness data. The timeliness data includes logistics provider timeliness data and / or country timeliness data. Logistics provider timeliness refers to the first average time for logistics providers to transport parcels, and country timeliness refers to the second average time from the country of origin to the country of destination. Send a second acquisition request for the logistics provider's timeliness data and / or the country's timeliness data to the one or more second crawler servers; Receive the logistics provider timeliness data and / or the country timeliness data sent by the external data source service of the one or more second crawler servers, obtain one or more logistics provider timeliness data and / or the country timeliness data, and save the one or more logistics provider timeliness data and / or the country timeliness data as the target logistics data; The target logistics data is sent to the API gateway device. The timeliness data of one or more logistics providers and / or country timeliness data are used to provide the user device with an instruction to display a logistics provider timeliness statistics table and / or a country timeliness statistics table in a display sub-window. The logistics provider timeliness statistics table includes the logistics provider timeliness data, and the country timeliness statistics table includes the country timeliness data. The logistics provider timeliness statistics table is used to display the logistics provider, the number of first transported parcels, and the first average time corresponding to the logistics provider. The country timeliness statistics table is used to display the destination country, the number of second transported parcels, and the second average time corresponding to the destination country.
4. The method according to claim 1 or 2, characterized in that, The query type also includes distributed data query; after sending logistics trajectory data to the API gateway device, the method further includes: If the query type is the distribution data query, then one or more corresponding third crawler servers are determined from the logistics server cluster. The one or more third crawler servers store distribution data, which includes tracking number country distribution data. Tracking number country distribution refers to the distribution status of tracking numbers stored in the database in multiple destination countries. Send a third acquisition request for the country distribution data of the single number to the one or more third crawler servers; Receive the country distribution data of the tracking number sent by the external data source service of the one or more third crawler servers, obtain one or more country distribution data of tracking number, and save the one or more country distribution data of tracking number as the target logistics data; The target logistics data is sent to the user equipment. The country distribution data of the tracking number is used to provide the user equipment with an instruction to display a country distribution statistics table of the tracking number in a display sub-window. The country distribution statistics table of the tracking number is used to display the country distribution of the tracking number.
5. The method according to claim 1 or 2, characterized in that, After sending the target logistics data to the API gateway device, the method further includes: If the query type is an order status information query, then determine the order type corresponding to the logistics tracking number; Obtain the transportation process corresponding to the order type, wherein the transportation process includes multiple transportation nodes; Determine the current transportation node for the logistics tracking number from the plurality of transportation nodes; Based on the transportation node, determine one or more corresponding fourth crawler servers from the logistics server cluster; Send a fourth request for the order status information to the one or more fourth crawler servers; Receive order status information sent by the external data source service of the one or more fourth crawler servers, and save the order status information as the target logistics data; The target logistics data is sent to the user equipment, and the order status information is used to provide the user equipment with an indication to display the order status information in a display sub-window.
6. A method for querying logistics data, characterized in that, A user device applied to a logistics query system, the logistics query system including the user device, an API gateway device, a query server, and a logistics server cluster, the logistics server cluster including one or more first crawler servers, the query server including a distribution service, a Socket service, a Redis database, and a MongoDB database; the method includes: The system obtains the tracking number and query type entered by the user through an input box. The tracking number and query type are used to instruct the API gateway device to generate a query request. The query request instructs the query server to retrieve target logistics data from the corresponding first crawler server. The target logistics data refers to the logistics data corresponding to the tracking number. The query type includes trajectory query. If the tracking number only includes a first transportation type or a second transportation type, then an idle first crawler server is determined from the logistics server cluster. Idle status means that the server can respond to the first retrieval request at the current moment. The first crawler server stores either first logistics trajectory sub-data or second logistics trajectory sub-data. The sub-data refers to the logistics trajectory sub-data corresponding to the first transportation type, and the second logistics trajectory sub-data refers to the logistics trajectory sub-data corresponding to the second transportation type. If the logistics tracking number includes both the first and second transportation types, one or more first crawler servers in an idle state are determined from the logistics server cluster. When one first crawler server is determined, the first crawler server stores both the first and second logistics trajectory sub-data. When multiple first crawler servers are determined, the multiple first crawler servers respectively store the first and second logistics trajectory sub-data. The first transportation type includes sea freight and / or air freight, and the second transportation type includes truck freight and / or train freight. Send the tracking number and query type to the API gateway device; The system receives target logistics data sent by the API gateway device. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device. Based on the one or more logistics trajectory sub-data, a logistics trajectory polyline and transportation nodes are drawn on the map of the display interface to obtain the logistics trajectory map corresponding to the logistics order number.
7. A method for querying logistics data, characterized in that, An API gateway device is applied to a logistics query system, the logistics query system including user equipment, the API gateway device, a query server, and a logistics server cluster, the logistics server cluster including one or more first crawler servers, and the query server including a distribution service, a Socket service, a Redis database, and a MongoDB database; the method includes: Receives a logistics tracking number and query type from the user device, the query type including a trajectory query; A query request for target logistics data is generated based on the tracking number and the query type. The target logistics data refers to the logistics data corresponding to the tracking number. If the tracking number only includes a first transportation type or a second transportation type, a first crawler server in an idle state is determined from the logistics server cluster. The idle state means that it can respond to the first acquisition request at the current moment. The first crawler server stores first logistics trajectory sub-data or second logistics trajectory sub-data. The first logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the first transportation type, and the second logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the second transportation type. If the tracking number includes a first transportation type and a second transportation type, one or more first crawler servers in an idle state are determined from the logistics server cluster. When one first crawler server is determined, the first crawler server stores the first logistics trajectory sub-data and the second logistics trajectory sub-data. When multiple first crawler servers are determined, the multiple first crawler servers respectively store the first logistics trajectory sub-data and the second logistics trajectory sub-data. The first transportation type includes sea freight and / or air freight, and the second transportation type includes truck freight and / or train freight. Send the query request to the query server; The system receives target logistics data from the query server. When the query type is a trajectory query, the target logistics data includes one or more logistics trajectory sub-data, which are stored in one or more first crawler servers in the logistics server cluster. The logistics tracking number is used to provide the query server with an indication to determine the transportation type of the logistics tracking number. The transportation type is used to provide the query server with an indication to obtain the one or more logistics trajectory sub-data from the one or more first crawler servers and send it to the API gateway device. The target logistics data is sent to the user equipment, and the one or more logistics trajectory sub-data are used to provide the user equipment with instructions for drawing transportation trajectory polylines and transportation nodes on a map.
8. A logistics query system, characterized in that, The logistics query system includes user equipment, API gateway equipment, query server, and logistics server cluster. The logistics server cluster includes one or more first crawler servers. The query server includes a distribution service, a Socket service, a Redis database, and a MongoDB database. The user equipment includes a display screen displaying a user interface, which is a software interface. The user interface is controlled by the user through touch commands input on the display screen, or by the user through an input device inputting control commands. The user interface includes an initial interface and a query results display interface. The initial interface includes multiple input boxes and query controls. The multiple input boxes are used to input the logistics tracking number and query type, respectively. The query results display interface includes multiple sub-interfaces, and each sub-interface corresponds to a query type. The query type includes track query. When the tracking number and query type have been entered in the multiple input boxes, if a click operation is received on the query control, the initial interface will jump to the display sub-interface corresponding to the query type. If the tracking number includes only a first transportation type or a second transportation type, then a first crawler server in an idle state is determined from the logistics server cluster. An idle state means that the server can respond to the first acquisition request at the current moment. The first crawler server stores either first logistics trajectory sub-data or second logistics trajectory sub-data. The first logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the first transportation type, and the second logistics trajectory sub-data is the logistics trajectory sub-data corresponding to the second transportation type. If the tracking number includes both a first transportation type and a second transportation type, then one or more first crawler servers in an idle state are determined from the logistics server cluster. When a first crawler server is identified, the first crawler server stores the first logistics trajectory sub-data and the second logistics trajectory sub-data; when multiple first crawler servers are identified, the multiple first crawler servers respectively store the first logistics trajectory sub-data and the second logistics trajectory sub-data, the first transportation type includes sea freight and / or air freight, and the second transportation type includes truck freight and / or train freight.
9. An electronic device, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, said one or more programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange is provided, wherein the computer program causes a computer to execute instructions for the steps of the method as described in any one of claims 1-5.
Citation Information
Patent Citations
International logistics information tracking method and system
CN102419843A
Method and device for information inquiry
CN103995891A
Logistics timeliness tracking method and device, terminal equipment and storage medium
CN114490807A
Logistics managing and controlling system and method
CN1469285A