Transportation data query method, computer equipment and readable storage medium
By selecting the optimal transportation data storage end for query based on the complexity of the transportation data query request, the problem of low transportation data query efficiency in traditional technology is solved, and more efficient and accurate data query processing is achieved.
Patent Information
- Application Number
- CN202410942633.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-08
AI Technical Summary
In traditional technology, transportation data query efficiency is low and requires a lot of manual processing time, resulting in low query efficiency.
By determining the query complexity of the transportation data query request, and selecting the optimal target storage end from at least two transportation data storage ends for querying based on the complexity, the query efficiency is improved.
It improves the efficiency and accuracy of transportation data query, reduces the consumption of system resources, and achieves more efficient data query processing.
Smart Images

Figure CN118747185A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a transportation data query method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] With the development of the logistics industry, transportation data has important applications in the logistics field. By analyzing transportation data, we can understand the transportation status of express shipments, and transportation data can also be used for subsequent application processing. Therefore, how to efficiently query transportation data has become an important research direction.
[0003] Traditional technology usually performs transportation data query through manual retrieval; however, this method requires a lot of manual processing time, resulting in low efficiency of transportation data query. Summary of the invention
[0004] Based on this, it is necessary to provide a transportation data query method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of transportation data query in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for querying transportation data. The method comprises:
[0006] In response to a transport data query request sent by a query request end, determining a query complexity of the transport data query request;
[0007] According to the query complexity, selecting a target transport data storage end associated with the query complexity from at least two transport data storage ends;
[0008] querying, from the target transportation data storage terminal, a transportation data query result corresponding to the transportation data query request;
[0009] The transport data query result is sent to the query request end.
[0010] In one embodiment, determining the query complexity of the transportation data query request includes:
[0011] Identifying the transport data query request and obtaining a query object of the transport data query request;
[0012] The query complexity is determined according to the query object.
[0013] In one embodiment, determining the query complexity according to the query object includes:
[0014] In a case where the query object is attribute information of a transport container or attribute information of a transport object, confirming that the query complexity is a first query complexity;
[0015] In a case where the query object includes an association relationship between a transport container and a transport object, the query complexity is confirmed to be a second query complexity; and the second query complexity is greater than the first query complexity.
[0016] In one of the embodiments, the at least two transport data storage terminals include a first transport data storage terminal and a second transport data storage terminal;
[0017] The selecting, according to the query complexity, a target transport data storage end associated with the query complexity from at least two transport data storage ends comprises:
[0018] When the query complexity is the first query complexity, selecting the first transport data storage end as the target transport data storage end from the at least two transport data storage ends;
[0019] When the query complexity is the second query complexity, the second transport data storage end is selected from the at least two transport data storage ends as the target transport data storage end.
[0020] In one embodiment, before determining the query complexity of the transportation data query request in response to the transportation data query request sent by the query request end, the method further includes:
[0021] Acquire the first transportation data uploaded by the query request end, and store the first transportation data in the at least two transportation data storage ends respectively;
[0022] The second transportation data uploaded by the data upload end is acquired, and the second transportation data is respectively stored in the at least two transportation data storage ends.
[0023] In one embodiment, the obtaining the first transportation data uploaded by the query request end and storing the first transportation data in the at least two transportation data storage ends respectively includes:
[0024] Receiving, by a first transportation data processing unit, the first transportation data sent by the query request end;
[0025] The first transportation data is stored in each of the transportation data storage terminals respectively.
[0026] In one embodiment, the step of acquiring the second transport data uploaded by the data upload end and storing the second transport data in the at least two transport data storage ends respectively includes:
[0027] Obtaining, by a second transport data processing unit, from a message queue the second transport data uploaded by the data upload end;
[0028] The second transportation data is stored in each of the transportation data storage terminals respectively.
[0029] In a second aspect, the present application also provides a transport data query device. The device comprises:
[0030] A request response module, configured to respond to a transport data query request sent by a query request end and determine a query complexity of the transport data query request;
[0031] A target selection module, configured to select a target transport data storage end associated with the query complexity from at least two transport data storage ends according to the query complexity;
[0032] A result query module, used for querying the transport data query result corresponding to the transport data query request from the target transport data storage terminal;
[0033] The result sending module is used to send the transportation data query result to the query request end.
[0034] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0035] In response to a transport data query request sent by a query request end, determining a query complexity of the transport data query request;
[0036] According to the query complexity, selecting a target transport data storage end associated with the query complexity from at least two transport data storage ends;
[0037] querying, from the target transportation data storage terminal, a transportation data query result corresponding to the transportation data query request;
[0038] The transport data query result is sent to the query request end.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0040] In response to a transport data query request sent by a query request end, determining a query complexity of the transport data query request;
[0041] According to the query complexity, selecting a target transport data storage end associated with the query complexity from at least two transport data storage ends;
[0042] querying, from the target transportation data storage terminal, a transportation data query result corresponding to the transportation data query request;
[0043] The transport data query result is sent to the query request end.
[0044] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0045] In response to a transport data query request sent by a query request end, determining a query complexity of the transport data query request;
[0046] According to the query complexity, selecting a target transport data storage end associated with the query complexity from at least two transport data storage ends;
[0047] querying, from the target transportation data storage terminal, a transportation data query result corresponding to the transportation data query request;
[0048] The transport data query result is sent to the query request end.
[0049] The above-mentioned transportation data query method, device, computer equipment, computer-readable storage medium and computer program product, in response to the transportation data query request sent by the query request end, determine the query complexity of the transportation data query request; select a target transportation data storage end associated with the query complexity from at least two transportation data storage ends according to the query complexity; query the transportation data query result corresponding to the transportation data query request from the target transportation data storage end; and send the transportation data query result to the query request end. This solution is conducive to improving the efficiency and accuracy of transportation data query by selecting the optimal transportation data storage end for data query according to the query complexity of the transportation data query request and returning the transportation data query result to the query request end. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1A schematic diagram of a flow chart of a method for querying transportation data in one embodiment;
[0052] Figure 2 A flowchart of steps for determining query complexity in one embodiment;
[0053] Figure 3 A flowchart of steps for determining query complexity in another embodiment;
[0054] Figure 4 A schematic flow chart of the steps of selecting a target transport data storage terminal in one embodiment;
[0055] Figure 5 An application scenario diagram of a transportation data query method in an embodiment;
[0056] Figure 6 is a structural block diagram of a transport data query device in one embodiment;
[0057] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0060] In an exemplary embodiment, Figure 1 As shown, a method for querying transportation data is provided. This embodiment uses the method applied to a relationship management system as an example for illustration. It can be understood that the method can also be applied to a terminal or a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:
[0061] Step S101, in response to a transportation data query request sent by a query request end, determining the query complexity of the transportation data query request.
[0062] Step S102: selecting a target transport data storage end associated with the query complexity from at least two transport data storage ends according to the query complexity.
[0063] Step S103, querying the transportation data query result corresponding to the transportation data query request from the target transportation data storage terminal.
[0064] Step S104, sending the transport data query result to the query request end.
[0065] The query request end may be a system that sends a transport data query request, for example, the query request end may be a TDOP system (operation system) or a NAGA system (loading and unloading task management system).
[0066] Among them, the transportation data query request can be a request for querying the relationship between the container and the express delivery. For example, the transportation data query request can be a request for the network operator to obtain the relationship between the vehicle logo and the express delivery and the loading and unloading task related information from the NAGA system through the TDOP system when unloading the vehicle; wherein, the vehicle logo can be a virtual container that can be used to indicate the transportation task identification corresponding to the express delivery, and the container can refer to a transportation container, such as a cage and / or a bag.
[0067] Among them, query complexity can be a comprehensive evaluation result of the complexity of query logic and query speed. For example, query complexity can be divided into two types: one is that only basic information of the container needs to be obtained, and the returned data is relatively simple, and the query can be completed by a single table of HBASE (non-relational database, distributed, column-oriented open source database); the other is that in addition to obtaining basic information of the container, information of sub-containers under the container and information of express items under the sub-containers are also required. In this case, if HBASE is queried, multiple database operations will be involved, which will cause great pressure on HBASE. Moreover, since HBASE is not a relational database, the code logic for this kind of query is relatively complex. It will be more efficient to query ES (Elastic Search, a distributed search and analysis engine) for such queries.
[0068] The transport data storage end may be a database storing data on the relationship between containers and express items, for example, the transport data storage end may be HBASE and Elastic Search.
[0069] The target transport data storage end may be a storage end selected according to query complexity. For example, for queries that can be completed directly through Rowkey (row key / primary key), query from HBASE; for queries involving complex query conditions, query from Elastic Search.
[0070] The transport data query result may be relationship data between a container and a package, for example, the transport data query result may be the relationship between a vehicle logo and a package.
[0071] The relationship management system may be a PCM system (Container Express Management System / Transportation Data Management System), which may be used to store the relationship between containers and between containers and express shipments.
[0072] Optionally, the relationship management system receives a transportation data query request sent by a query request end, and in response to the transportation data query request sent by the query request end, determines the complexity of the query conditions in the transportation data query request, and determines the query complexity of the transportation data query request; selects a target transportation data storage end associated with the query complexity from at least two transportation data storage ends according to a preset correspondence between the query complexity and the transportation data storage end; queries the transportation data query result corresponding to the transportation data query request from the target transportation data storage end according to the query conditions in the transportation data query request; and returns the transportation data query result to the query request end.
[0073] For example, when the TDOP system sends a transport data query request for obtaining the relationship between the vehicle logo and the express delivery to the NAGA system when unloading the vehicle, the NAGA system forwards the transport data query request to the relationship management system, which can determine the query complexity of the transport data query request based on the query conditions of the transport data query request. For example, if the query request only needs to obtain the basic information of the cage corresponding to the vehicle logo, then the query complexity is low; if the query request needs to obtain the information of the package under the cage and the express delivery information under the package in addition to the basic information of the cage corresponding to the vehicle logo, then the query complexity is high; the relationship management system can select the target transport data storage end (HBASE or ES) according to the preset correspondence between the query complexity and the transport data storage end (for example, query from HBASE for low query complexity and query from ES for high query complexity); the relationship management system queries the relationship data between the vehicle logo and the express delivery from the selected target transport data storage end according to the query conditions in the query request; the relationship management system sends the transport data query result to the NAGA system, and the NAGA system returns the transport data query result to the TDOP system.
[0074] In the above-mentioned transportation data query method, in response to the transportation data query request sent by the query request end, the query complexity of the transportation data query request is determined; according to the query complexity, a target transportation data storage end associated with the query complexity is selected from at least two transportation data storage ends; from the target transportation data storage end, a transportation data query result corresponding to the transportation data query request is queried; and the transportation data query result is sent to the query request end. This solution is conducive to improving the efficiency and accuracy of transportation data query by selecting the optimal transportation data storage end for data query according to the query complexity of the transportation data query request and returning the transportation data query result to the query request end.
[0075] In an exemplary embodiment, referring to Figure 2 In step S101, the query complexity of the transportation data query request is determined, which specifically includes the following contents:
[0076] Step S201, identifying the transport data query request and obtaining the query object of the transport data query request;
[0077] Step S202: determining the query complexity according to the query object.
[0078] Among them, the query object can be the data object to be queried by the transportation data query request, for example, the query object can be the basic information of the cage corresponding to the vehicle logo, or the basic information of the cage corresponding to the vehicle logo, the information of the package under the cage, and the express information under the package.
[0079] Optionally, the relationship management system identifies the transportation data query request and can obtain the query object of the transportation data query request by parsing the request parameters of the transportation data query request; and determines the query complexity of the transportation data query request according to the amount of data information contained in the query object or the complexity of the query conditions.
[0080] For example, the relationship management system parses the transportation data query request and obtains that the query object of the query request is the basic information of the cage corresponding to the vehicle logo, the information of the package under the cage, and the express information under the package; because the query object involves a three-layer data structure of cage, package, and express, the query conditions are relatively complex, so the relationship management system determines that the query complexity of the transportation data query request is high.
[0081] The technical solution provided in this embodiment identifies the transportation data query request, obtains the query object, and determines the query complexity based on the query object. This is conducive to dynamically determining the query complexity according to the actual situation of the query request, thereby facilitating the selection of a suitable query method according to the query complexity and improving the efficiency of transportation data query.
[0082] In an exemplary embodiment, referring to Figure 3 , according to the query object, determine the query complexity, including the following:
[0083] Step S301, when the query object is the attribute information of the transport container or the attribute information of the transport object, confirming that the query complexity is the first query complexity;
[0084] Step S302: in the case where the query object includes the association relationship between the transport container and the transport object, confirming that the query complexity is a second query complexity; the second query complexity is greater than the first query complexity.
[0085] The attribute information of the transport container may be information describing the characteristics of the transport container. For example, the attribute information of the transport container may be information such as the weight and / or volume of the container.
[0086] The attribute information of the transport object may be information describing the characteristics of the transport object. For example, the attribute information of the transport object may be information such as the weight, volume and / or destination of the express.
[0087] Among them, the association relationship between the transport container and the transport object can be a description of the corresponding relationship between the transport container and the transport object. For example, the association relationship between the transport container and the transport object can be information such as which express parcels are contained in a package and / or which package a particular express parcel is contained in.
[0088] The first query complexity may be a query difficulty with a lower query complexity. For example, the first query complexity may be a query difficulty that only requires querying a single data table to obtain required information.
[0089] The second query complexity may be a query difficulty with a higher query complexity. For example, the second query complexity may be a query difficulty that requires associating multiple data tables to obtain required information.
[0090] Optionally, after receiving the transport data query request, the relationship management system may parse the transport data query request to obtain the query object contained in the transport data query request; if the query object obtained by the analysis is the attribute information of the transport container or the attribute information of the transport object, then the query complexity of the transport data query request may be determined to be the first query complexity; if the query object obtained by the analysis includes the association relationship between the transport container and the transport object, then the query complexity of the transport data query request may be determined to be the second query complexity; since the association relationship between the transport container and the transport object involves the association query of multiple data tables, the second query complexity is greater than the first query complexity.
[0091] The technical solution provided in this embodiment is conducive to selecting the optimal query strategy for query requests of different complexities by determining different query complexities according to different types of query objects, thereby facilitating improving the query efficiency of transportation data and reducing the consumption of system resources.
[0092] In an exemplary embodiment, referring to Figure 4 In step S102, according to the query complexity, a target transport data storage end associated with the query complexity is selected from at least two transport data storage ends, specifically including the following contents:
[0093] Step S401, when the query complexity is the first query complexity, selecting the first transport data storage end as the target transport data storage end from at least two transport data storage ends;
[0094] Step S402: when the query complexity is a second query complexity, selecting a second transport data storage terminal as a target transport data storage terminal from at least two transport data storage terminals.
[0095] The at least two transport data storage terminals include a first transport data storage terminal and a second transport data storage terminal.
[0096] The first transport data storage terminal may be one of a plurality of storage terminals for storing transport data, for example, the first transport data storage terminal may be HBASE.
[0097] The second transport data storage end may be another one of the multiple storage ends for storing transport data, for example, the second transport data storage end may be Elastic Search.
[0098] The first query complexity may be a relatively low query complexity among multiple query complexities of the query request. For example, the first query complexity may be a query complexity that only involves querying the attribute information of a transport container or a transport object.
[0099] The second query complexity may be a relatively higher query complexity among multiple query complexities of the query request. For example, the second query complexity may be a query complexity involving querying the association relationship between the transport container and the transport object.
[0100] Optionally, if the relationship management system determines that the query complexity is the first query complexity, the first transport data storage end is selected from the first transport data storage end and the second transport data storage end as the target transport data storage end; if the query complexity is determined to be the second query complexity, the second transport data storage end is selected from the first transport data storage end and the second transport data storage end as the target transport data storage end.
[0101] For example, when the relationship management system receives a query request that only involves querying the attribute information of a transport container, the query complexity of the query request is determined to be the first query complexity, and then the first transport data storage end (such as HBASE) is selected from the first transport data storage end (such as HBASE) and the second transport data storage end (such as Elastic Search) as the target transport data storage end, and the attribute information of the transport container is queried from the first transport data storage end (such as HBASE); when the relationship management system receives a query request that not only involves querying the attribute information of a transport container, but also involves querying the association relationship between the transport container and other transport objects, the query complexity of the query request is determined to be the second query complexity, and then the second transport data storage end (such as Elastic Search) is selected from the first transport data storage end (such as HBASE) and the second transport data storage end (such as Elastic Search) as the target transport data storage end, and the attribute information of the transport container and the association relationship between the transport container and other transport objects are queried from the second transport data storage end (such as Elastic Search).
[0102] The technical solution provided in this embodiment is beneficial to improving query efficiency and reducing unnecessary system overhead by selecting a transport data storage end that matches the query complexity as the target transport data storage end for query based on the query complexity of the query request, thereby facilitating the efficient operation of the entire transport data management system.
[0103] In an exemplary embodiment, before responding to the transportation data query request sent by the query request end and determining the query complexity of the transportation data query request, it also includes the following content: obtaining the first transportation data uploaded by the query request end, and storing the first transportation data in at least two transportation data storage ends respectively; obtaining the second transportation data uploaded by the data upload end, and storing the second transportation data in at least two transportation data storage ends respectively.
[0104] The first transportation data may be transportation data uploaded by the query request end to the relationship management system. For example, the first transportation data may be relationship data between vehicle logos and express items reported by branch operators through the TDOP system.
[0105] The data upload end may be an upload end for uploading transportation data to the relationship management system, for example, the data upload end may be a FVP system (express route management end).
[0106] The second transportation data may be transportation data uploaded by the data upload end to the relationship management system. For example, the second transportation data may be container and express relationship data written into Kafka (open source stream processing platform) by the FVP system.
[0107] Optionally, the relationship management system obtains the first transportation data uploaded by the query request end and the second transportation data uploaded by the data upload end, and stores the first transportation data and the second transportation data in at least two transportation data storage ends respectively.
[0108] For example, after completing the loading, the branch operator will use a handheld gun to report the relationship between the vehicle logo and the express as the first transportation data to the NAGA system through the TDOP system. The NAGA system forwards the relationship between the vehicle logo and the express to the reporting module in the relationship management system. The reporting module writes the first transportation data to the two transportation data storage terminals, HBASE and ES. The FVP system writes the relationship between the container and the express as the second transportation data to Kafka. The relationship management system consumes the second transportation data of Kafka through the Flink (open source stream processing framework) processing module, and after processing, writes the second transportation data to the two transportation data storage terminals, HBase and ES.
[0109] The technical solution provided in this embodiment, by obtaining the first transportation data uploaded by the query request end and the second transportation data uploaded by the data upload end, and storing them in at least two transportation data storage ends, is conducive to ensuring that the transportation data storage end has stored all the transportation data that needs to be queried, thereby facilitating improving the accuracy and efficiency of transportation data query.
[0110] In an exemplary embodiment, the first transport data uploaded by the query request end is obtained, and the first transport data is stored in at least two transport data storage ends respectively, which specifically includes the following contents: receiving the first transport data sent by the query request end through the first transport data processing unit; and storing the first transport data in each transport data storage end respectively.
[0111] Among them, the first transport data processing unit can be a module or component for receiving and processing the first transport data. For example, the first transport data processing unit can be a reporting module (such as a reporting microservice module) in the relationship management system, and the reporting module receives the vehicle logo and express relationship data (container and express relationship data) forwarded by the NAGA system.
[0112] Optionally, the relationship management system receives the first transportation data sent by the query request end through the first transportation data processing unit in the relationship management system; and stores the received first transportation data in each transportation data storage end through the first transportation data processing unit.
[0113] The technical solution provided in this embodiment receives the first transportation data sent by the query request end through the first transportation data processing unit, and stores the first transportation data in each transportation data storage end respectively, which is conducive to improving the efficiency and accuracy of transportation data query later.
[0114] In an exemplary embodiment, the second transport data uploaded by the data upload end is obtained, and the second transport data is respectively stored in at least two transport data storage ends, which specifically includes the following contents: through the second transport data processing unit, the second transport data uploaded by the data upload end is obtained from the message queue; the second transport data is respectively stored in each transport data storage end.
[0115] The second transport data processing unit may be a processing module for processing the second transport data. For example, the second transport data processing unit may be a Flink (open source stream processing framework) processing module.
[0116] The message queue may be a middleware system for storing and transmitting received or pending messages, for example, the message queue may be Kafka or any other messaging system.
[0117] Optionally, the relationship management system obtains the second transportation data uploaded by the data upload end from the message queue through the second transportation data processing unit in the relationship management system; and stores the obtained second transportation data in each transportation data storage end through the second transportation data processing unit.
[0118] The technical solution provided in this embodiment obtains the second transportation data uploaded by the data upload end through the second transportation data processing unit, and stores the second transportation data in each transportation data storage end respectively, which is conducive to improving the efficiency and accuracy of transportation data query later.
[0119] The following is an application example to illustrate the transportation data query method provided by this application. This application example uses the method to apply to the relationship management system as an example. Figure 5 , the main steps include:
[0120] Step 1: Interface upload of the relationship between container and express: After completing loading, the branch operator will use a handheld gun to report the relationship between the vehicle logo and the express (report the relationship between container and express) to the NAGA system (loading and unloading task management system) through the TDOP system (operation system). The NAGA system forwards the relationship between the vehicle logo and the express to the reporting module (reporting microservice module) of the PCM system (relationship management system), and the reporting module writes the data to HBASE and ES.
[0121] Step 2: Kafka pushes the relationship between container and express delivery: The FVP system (data upload end) writes the relationship between container and express delivery into Kafka. The PCM system consumes the data from Kafka through the Flink processing module. After processing, it writes the relationship between container and express delivery into HBASE (the first transport data storage end) and ES (the second transport data storage end).
[0122] For example, the difference between the data reported by the FVP system and the data reported by the interface: the data reported by the FVP system may only include basic information such as container number, relationship between containers, relationship between containers and express delivery, and / or operation outlets; the data reported by the interface may include information such as container weight and / or volume.
[0123] Step 3: Interface query of the relationship between container and express: When unloading, the branch operator obtains the relationship between the vehicle logo and the express and the loading and unloading task related information from the NAGA system through the TDOP system (query the relationship between container and express). The NAGA system obtains the relationship between the vehicle logo and the express from the PCM system. The PCM system decides whether to query from HBASE or ES based on the complexity of the query (query from HBASE if the query can be completed directly through Rowkey, and query from ES if complex query conditions are involved). The query is performed through the query microservice module, and the results are returned to the NAGA system after the query is completed. The NAGA system queries the unloading task related information from the local database and returns it to the TDOP system together with the container and express information; the branch operator completes the unloading task based on this information.
[0124] Among them, whether to check HBASE or ES can be determined based on the configuration table. The configuration table includes two fields: one is the URL (Uniform Resource Locator) of the interface, and the other is the query type (1: check HBASE, 2: check ES). The complexity of the query logic and the query speed of the interface are used to comprehensively evaluate whether to check HBASE or ES.
[0125] Among them, the real-time processing requirements for data reported by the interface are relatively high, and the data volume is relatively small. This part of the data is processed by microservices; the amount of data reported by the FVP system is large, and the real-time processing requirements are not high, so it is processed by Flink; the main storage is based on HBASE, and ES provides queries for data with complex structures; the PCM system processes high-timeliness and low-timeliness data separately to avoid mutual influence.
[0126] The technical solution provided by this application example selects the optimal transportation data storage end for data query according to the query complexity of the transportation data query request, and returns the transportation data query result to the query request end, thereby helping to improve the efficiency and accuracy of transportation data query.
[0127] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0128] Based on the same inventive concept, the embodiment of the present application also provides a transport data query device for implementing the transport data query method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more transport data query device embodiments provided below can refer to the limitations of the transport data query method above, and will not be repeated here.
[0129] In an exemplary embodiment, Figure 6 As shown, a transport data query device is provided, and the transport data query device 600 may include:
[0130] The request response module 601 is used to respond to the transport data query request sent by the query request end and determine the query complexity of the transport data query request;
[0131] A target selection module 602 is used to select a target transport data storage end associated with the query complexity from at least two transport data storage ends according to the query complexity;
[0132] A result query module 603 is used to query the transport data query result corresponding to the transport data query request from the target transport data storage terminal;
[0133] The result sending module 604 is used to send the transportation data query result to the query request end.
[0134] In an exemplary embodiment, the request response module 601 is further used to identify the transportation data query request, obtain the query object of the transportation data query request, and determine the query complexity according to the query object.
[0135] In an exemplary embodiment, the request response module 601 is also used to confirm that the query complexity is a first query complexity when the query object is attribute information of a transport container or attribute information of a transport object; and to confirm that the query complexity is a second query complexity when the query object includes an association relationship between a transport container and a transport object; the second query complexity is greater than the first query complexity.
[0136] In an exemplary embodiment, at least two transport data storage terminals include a first transport data storage terminal and a second transport data storage terminal; the target selection module 602 is also used to select the first transport data storage terminal as the target transport data storage terminal from at least two transport data storage terminals when the query complexity is the first query complexity; and select the second transport data storage terminal as the target transport data storage terminal from at least two transport data storage terminals when the query complexity is the second query complexity.
[0137] In an exemplary embodiment, the device 600 also includes: a data storage module, which is used to obtain the first transportation data uploaded by the query request end, and store the first transportation data in at least two transportation data storage ends respectively; obtain the second transportation data uploaded by the data upload end, and store the second transportation data in at least two transportation data storage ends respectively.
[0138] In an exemplary embodiment, the data storage module is further used to receive the first transportation data sent by the query request end through the first transportation data processing unit; and store the first transportation data in each transportation data storage end respectively.
[0139] In an exemplary embodiment, the data storage module is further used to obtain the second transportation data uploaded by the data upload end from the message queue through the second transportation data processing unit; and store the second transportation data in each transportation data storage end respectively.
[0140] Each module in the above-mentioned transport data query device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0141] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for querying transportation data is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0142] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0143] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0144] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0145] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0146] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (Phase Change Memory), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0147] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0148] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for querying transportation data, characterized in that: The method comprises: In response to a transport data query request sent by a query request end, determining a query complexity of the transport data query request; According to the query complexity, selecting a target transport data storage end associated with the query complexity from at least two transport data storage ends; querying, from the target transportation data storage terminal, a transportation data query result corresponding to the transportation data query request; The transport data query result is sent to the query request end.
2. The method according to claim 1, characterized in that The determining the query complexity of the transportation data query request includes: Identifying the transport data query request and obtaining a query object of the transport data query request; The query complexity is determined according to the query object.
3. The method according to claim 2, characterized in that The determining the query complexity according to the query object includes: In a case where the query object is attribute information of a transport container or attribute information of a transport object, confirming that the query complexity is a first query complexity; In a case where the query object includes an association relationship between a transport container and a transport object, the query complexity is confirmed to be a second query complexity; and the second query complexity is greater than the first query complexity.
4. The method according to claim 3, characterized in that The at least two transport data storage terminals include a first transport data storage terminal and a second transport data storage terminal; The selecting, according to the query complexity, a target transport data storage end associated with the query complexity from at least two transport data storage ends comprises: When the query complexity is the first query complexity, selecting the first transport data storage end as the target transport data storage end from the at least two transport data storage ends; When the query complexity is the second query complexity, the second transport data storage end is selected from the at least two transport data storage ends as the target transport data storage end.
5. The method according to claim 1, characterized in that Before determining the query complexity of the transportation data query request in response to the transportation data query request sent by the query request end, the method further includes: Acquire the first transportation data uploaded by the query request end, and store the first transportation data in the at least two transportation data storage ends respectively; The second transportation data uploaded by the data upload end is acquired, and the second transportation data is respectively stored in the at least two transportation data storage ends.
6. The method according to claim 5, characterized in that The obtaining of the first transport data uploaded by the query request end and storing the first transport data in the at least two transport data storage ends respectively includes: Receiving, by a first transportation data processing unit, the first transportation data sent by the query request end; The first transportation data is stored in each of the transportation data storage terminals respectively.
7. The method according to claim 5, characterized in that The step of acquiring the second transport data uploaded by the data upload end and storing the second transport data in the at least two transport data storage ends respectively includes: Obtaining, by a second transport data processing unit, from a message queue the second transport data uploaded by the data upload end; The second transportation data is stored in each of the transportation data storage terminals respectively.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data query method, device and equipment and storage medium
CN112732756A
Logistics order data processing method and device, equipment and storage medium
CN113326281A
Data query method and device, computer equipment and computer readable storage medium
CN115237935A
Definition query method and device, electronic equipment and storage medium
CN116361340A
Data query method and device, electronic equipment and computer readable storage medium
CN117251607A
