CN111352960A - Express order information query method, device, equipment and storage medium - Google Patents
Express order information query method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111352960A CN111352960A CN202010164816.3A CN202010164816A CN111352960A CN 111352960 A CN111352960 A CN 111352960A CN 202010164816 A CN202010164816 A CN 202010164816A CN 111352960 A CN111352960 A CN 111352960A
- Authority
- CN
- China
- Prior art keywords
- order
- information
- attribute
- express
- attribute value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- General Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Data Mining & Analysis (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Databases & Information Systems (AREA)
- Accounting & Taxation (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Operations Research (AREA)
- Human Resources & Organizations (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of data query, and discloses a method, a device, equipment and a storage medium for querying express mail order information, wherein the method comprises the following steps: reading an order number of an express order to be inquired; taking the order number as an index name, retrieving a preset order table index to obtain order information corresponding to the order number in a preset order table, wherein the order information comprises a plurality of order attribute IDs; searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID; inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value; and outputting detailed information corresponding to each order attribute value. The invention can reduce the data volume of retrieval and improve the data query efficiency.
Description
Technical Field
The invention relates to the field of data query, in particular to a method, a device, equipment and a storage medium for querying express order information.
Background
With the continuous development of online shopping, the logistics industry is rapidly developed correspondingly. According to measurement and calculation, the Chinese express development index in 11 months in 2019 is 230.2, the concordance is improved by 25.3%, the development scale index, the service index and the development capacity index are 280.7, 254.9 and 209.5 respectively, and the development scale index, the service index and the development capacity index are improved by 20.2%, 38.5% and 19.4% respectively in the same period as the previous year.
With the increasing of the order quantity, the order data quantity needing to be managed is also increased remarkably, which is a very huge number, for express management, according to different business requirements, various operations, such as query, display, modification and the like, need to be performed on each order data, and how to quickly and accurately locate target data from massive order data, so that the express management efficiency is improved, which becomes an urgent problem in the current logistics industry.
Disclosure of Invention
The invention mainly aims to solve the technical problem of improving the data query efficiency.
The first aspect of the invention provides a method for inquiring express order information, which comprises the following steps:
reading an order number of an express order to be inquired;
taking the order number as an index name, retrieving a preset order table index to obtain order information corresponding to the order number in a preset order table, wherein the order information comprises a plurality of order attribute IDs;
searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID;
inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
and outputting detailed information corresponding to each order attribute value.
Optionally, in a first implementation manner of the first aspect of the present invention, before the reading the order number of the to-be-queried express order, the method further includes:
writing order numbers and a plurality of order attribute IDs corresponding to the express orders into an order table;
and establishing an order table index corresponding to the order table by taking the order number as an index name.
Optionally, in a second implementation manner of the first aspect of the present invention, before the reading the order number of the to-be-queried express order, the method further includes:
respectively writing each order attribute value and the detailed information corresponding to each order attribute value into a corresponding order attribute table;
and creating a key value pair of each order attribute ID and the corresponding order attribute value, and writing the key value pair into a cache.
Optionally, in a third implementation manner of the first aspect of the present invention, the order attribute ID includes: customer ID, website ID, province ID, city ID, district ID.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the order attribute table stored in the database includes: a customer table, a network point table, a province table, a city table and a district table;
the system comprises a client table, a network point table, a province table, a city table and a district table, wherein the client table is used for storing client information, the network point table is used for storing network point information, the province table is used for storing province information, the city table is used for storing city information, and the district table is used for storing district information.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the querying, according to each order attribute value, a corresponding order attribute table in a preset database to obtain detailed information corresponding to each order attribute value includes:
inquiring a customer table in the database according to the customer attribute value of the express order to obtain customer information corresponding to the customer attribute value;
inquiring a network point table in the database according to the network point attribute value of the express order to obtain network point information corresponding to the network point attribute value;
inquiring a province table in the database according to the province attribute value of the express order to obtain province information corresponding to the province attribute value;
inquiring a city table in the database according to the city attribute value of the express order to obtain city information corresponding to the city attribute value;
and inquiring a district and county table in the database according to the district and county attribute value of the express order to obtain the district and county information corresponding to the district and county attribute value.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the outputting detailed information corresponding to each order attribute value includes:
and taking the inquired customer information, the website information, the province information, the city information and the district information as information inquiry results of the express orders corresponding to the order numbers and outputting the information inquiry results.
The second aspect of the present invention provides an express mail order information query device, including:
the reading module is used for reading the order number of the express order to be inquired;
the index retrieval module is used for retrieving a preset order list index by taking the order number as an index name to obtain order information corresponding to the order number in a preset order list, wherein the order information comprises a plurality of order attribute IDs;
the key value retrieval module is used for retrieving the preset key value pairs in the cache by taking each order attribute ID as a key word to obtain the order attribute value corresponding to each order attribute ID;
the query module is used for querying a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
and the output module is used for outputting the detailed information corresponding to each order attribute value.
Optionally, in a first implementation manner of the second aspect of the present invention, the device for querying express order information further includes:
the order table processing module is used for writing the order number and the plurality of order attribute IDs corresponding to each express order into an order table; and establishing an order table index corresponding to the order table by taking the order number as an index name.
Optionally, in a second implementation manner of the second aspect of the present invention, the device for querying express order information further includes:
the attribute table processing module is used for writing each order attribute value and the detailed information corresponding to each order attribute value into the corresponding order attribute table respectively; and creating a key value pair of each order attribute ID and the corresponding order attribute value, and writing the key value pair into a cache.
Optionally, in a third implementation manner of the second aspect of the present invention, the order attribute ID includes: customer ID, website ID, province ID, city ID, district ID.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the order attribute table stored in the database includes: a customer table, a network point table, a province table, a city table and a district table;
the system comprises a client table, a network point table, a province table, a city table and a district table, wherein the client table is used for storing client information, the network point table is used for storing network point information, the province table is used for storing province information, the city table is used for storing city information, and the district table is used for storing district information.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the query module is specifically configured to:
inquiring a customer table in the database according to the customer attribute value of the express order to obtain customer information corresponding to the customer attribute value;
inquiring a network point table in the database according to the network point attribute value of the express order to obtain network point information corresponding to the network point attribute value;
inquiring a province table in the database according to the province attribute value of the express order to obtain province information corresponding to the province attribute value;
inquiring a city table in the database according to the city attribute value of the express order to obtain city information corresponding to the city attribute value;
and inquiring a district and county table in the database according to the district and county attribute value of the express order to obtain the district and county information corresponding to the district and county attribute value.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the output module is specifically configured to:
and taking the inquired customer information, the website information, the province information, the city information and the district information as information inquiry results of the express orders corresponding to the order numbers and outputting the information inquiry results.
A third aspect of the present invention provides an express mail order information query device, including: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor calls the instructions in the memory to enable the express order information inquiry equipment to execute the express order information inquiry method.
A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the above-mentioned method for querying express order information.
In the invention, when the order information of the express is inquired, the order number is read firstly, then the index of the preset order table is retrieved by taking the order number as an index name, and the order attribute ID in the order table corresponding to the order number is obtained; searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID; and finally, inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value, wherein the detailed information is the detailed order information of the express order. The data query mode is correspondingly adjusted by improving the content record form of the order list, the order attribute value corresponding to the order number can be obtained only by retrieving the index and the key value pair of the order list, and then the corresponding attribute value list is accurately queried according to the order attribute value, so that the data retrieval efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of a method for querying express order information according to an embodiment of the present invention;
FIG. 2 is a diagram of a second embodiment of a method for querying express order information according to an embodiment of the present invention;
FIG. 3 is a diagram of a third embodiment of a method for querying express order information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of an apparatus for querying express order information according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another embodiment of an express mail order information query device in the embodiment of the present invention;
fig. 6 is a schematic diagram of an embodiment of an express order information query device in the embodiment of the invention.
Detailed Description
The terms (if any) in the description, the claims and the drawings are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequence order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a detailed flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of the method for querying express mail order information in the embodiment of the present invention includes:
101. reading an order number of an express order to be inquired;
it is understood that the execution subject of the present invention may be an express order information query device, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
In this embodiment, the express order refers to an order generated after a goods sender places an order for an express company, and usually, the express company generates a unique order number of the express order, and different express order numbers are used for different express order numbers, where the order number may be an express waybill number on an express waybill, or may be a separately set order number.
In this embodiment, the user needs to query the detailed information of the express order by inputting the order number, and after the user inputs the order number, the user clicks to query, and the query server automatically reads the order number.
102. Taking the order number as an index name, retrieving a preset order table index to obtain order information corresponding to the order number in a preset order table, wherein the order information comprises a plurality of order attribute IDs;
in this embodiment, after reading the order number of the express order to be queried, the query server retrieves the preset order table index by using the order number as an index name. The order table index is used for associating each order number in the order table with corresponding order information. Such as the order table index shown in table 1, through which order information for each of the orders in the order table may be retrieved.
TABLE 1
As can be seen from table 1, the ID number of the order attribute a corresponding to the order number 1001 is a101, the ID number of the order attribute a corresponding to the order number 1002 is a102, the ID number of the order attribute B corresponding to the order number 1001 is B201, and the ID number of the order attribute B corresponding to the order number 1002 is B202.
In this embodiment, only the order number and the plurality of order attribute IDs are recorded in the order table, and no detailed information of the order is recorded, so that the search speed of the order table can be greatly increased.
The present embodiment is not limited to setting the order attribute, and the setting is specifically performed based on the actual attribute of the order.
Optionally, in a specific embodiment, the order attributes of the express order include, but are not limited to: customer attribute, site attribute, province attribute, city attribute, district attribute. Accordingly, the order attribute ID includes, but is not limited to: customer ID, website ID, province ID, city ID, district ID.
For example, the ID of client A is A101, and the ID of client B is A102; the ID of mesh point A is B201, and the ID of mesh point B is B202; ID of Guangdong province is C301, and ID of Hunan province is C302; the ID of Shenzhen is D401, and the ID of Guangzhou is D402; the south mountain area has an ID of E501, and the lake region has an ID of E502.
103. Searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID;
in this embodiment, after obtaining each order attribute ID of the express order, the query server further needs to retrieve the preset key value pair, so as to obtain an order attribute value corresponding to each order attribute ID. Wherein the key-value pair associates an order attribute id (key) with a corresponding order attribute value (value) in a key-value form.
For example, the order attribute ID is a101, and the corresponding order attribute value is customer a; the order attribute ID is B201, and the corresponding order attribute value is site A; the order attribute ID is C301, and the corresponding order attribute value is Guangdong province; the order attribute ID is D401, and the corresponding order attribute value is Shenzhen; the order attribute ID is E501, and the corresponding order attribute value is a south mountain area.
In this embodiment, since the data size of the key-value pair is not very large, the key-value pair is preferably stored in the cache in advance, and the order attribute value can be obtained without querying an information table for recording the order attribute value, so that the data query speed can be further increased.
104. Inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
in this embodiment, the order attribute values are specifically stored in the order attribute table, and different order attribute tables are used for different types of order attributes.
Optionally, in a specific embodiment, the order attribute table includes but is not limited to: a customer table, a network point table, a province table, a city table and a district table; the order attribute value is preferably a name, such as a customer name, a site name, a province name, a city name, a district name.
The system comprises a client table, a website table, a province table, a city table and a prefecture table, wherein the client table is used for storing client information including client names, the website table is used for storing website information including website names, the province table is used for storing province information including identity names, the city table is used for storing city information including city names, and the prefecture table is used for storing prefecture information including prefecture names.
In this embodiment, the order attribute table specifically stores detailed information corresponding to the order attribute value, and different order attributes correspond to different order attribute tables, so that order information of the same express order is divided into different order attribute tables according to the order attribute dimension for storage, and although the number of times of data retrieval is increased, the speed of querying the order information is greatly increased.
For example, if the order attribute value is Guangdong province, the province table is queried to obtain detailed information corresponding to Guangdong province, such as the number of websites administered by Guangdong province, the name, address, contact telephone and other detailed information. If the order attribute value is customer A, the customer table is queried to obtain the detailed information corresponding to customer A, such as the detailed information of the number of delivered parts, settlement cost, contact information and the like of customer A.
105. And outputting detailed information corresponding to each order attribute value.
In this embodiment, after the detailed information corresponding to each order attribute value corresponding to the express order is queried, the information can be output as an express order information query result.
In the embodiment, the data query mode is correspondingly adjusted by improving the content record form of the order table, only the order number and each order attribute ID are stored in the order table, the order attribute value corresponding to the order number can be obtained only by retrieving the order table index and the key value pair in order data query, then the corresponding attribute value table is accurately queried according to the order attribute value and order detailed data is obtained from the attribute table, so that the order data retrieval efficiency is improved, and in addition, the key value pair is stored in the cache, so that the order information retrieval speed is further accelerated.
Referring to fig. 2, another embodiment of the method for querying express order information according to the embodiment of the present invention includes:
201. writing order numbers and a plurality of order attribute IDs corresponding to the express orders into an order table;
in this embodiment, only the order number and the ID corresponding to each order attribute (the ID is constituted by a number having a designation property) are recorded in the order table. Different order attributes are represented by different IDs, and the ID values corresponding to the same order attributes are different.
For example, as shown in table 1 above, the ID number of the order attribute a corresponding to the order number 1001 is a101, and the ID number of the order attribute B is B201; the ID number of order attribute A corresponding to order number 1001 is A101, while the ID number of order attribute A corresponding to order number 1002 is A102.
In this embodiment, only the order number and the order attribute ID are recorded in the order table, which can greatly reduce the data volume of the order table and increase the speed of querying the data in the order table.
202. Taking an order number as an index name, and creating an order table index corresponding to the order table;
in this embodiment, the order attribute ID is only one identifier, and more specific information can be retrieved by the ID. Therefore, in order to obtain detailed order information corresponding to the order number, an index between the order number and data (i.e., an order attribute ID) in the order table, i.e., an order table index, such as shown in table 1, may be established, so that the order attribute ID may be retrieved through the order number, and then more specific information may be retrieved through the ID.
203. Respectively writing each order attribute value and the detailed information corresponding to each order attribute value into a corresponding order attribute table;
in this embodiment, in order to further reduce the data retrieval amount and improve the data retrieval efficiency, a plurality of different order attribute tables are used to record the corresponding order attribute values and the corresponding detailed information thereof.
For example, a customer table is used to store a customer name and customer detailed information, a site table is used to store a site name and site detailed information, a province table is used to store a province name and province detailed information, a city table is used to store a city name and city detailed information, and a prefecture table is used to store a prefecture name and prefecture detailed information.
It should be noted that the order attribute table in this embodiment is suitable for recording attributes that share the same data among orders, such as province attributes, city attributes, website attributes, and the like, so that the data amount stored in the order attribute table can be reduced, and the efficiency of retrieving data in the order attribute table is improved.
204. Creating each order attribute ID and a key value pair corresponding to the order attribute value, and writing the key value pair into a cache;
in this embodiment, the created key-value pair (key-value) information is stored in the cache, so that the query server can directly retrieve a small amount of common data from the cache, and the data retrieval speed is greatly increased.
205. Reading an order number of an express order to be inquired;
206. taking the order number as an index name, retrieving a preset order table index to obtain order information corresponding to the order number in a preset order table, wherein the order information comprises a plurality of order attribute IDs;
207. searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID;
208. inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
209. and outputting detailed information corresponding to each order attribute value.
In this embodiment, each piece of order information is written into the database and is respectively written into different attribute tables according to the attribute type of the information, some indicative numbers ID and the like are used to represent corresponding information, such as customer information, such as a customer name corresponding to a customer ID, information, such as a network name address corresponding to a network ID, and the like, only the information, such as the customer ID, the network ID, a province ID, a city ID and the like, is recorded in the order table, and corresponding detailed information can be found in the customer table, the network table, the province table and the city table through the IDs. The table structure design of the embodiment can reduce the data volume written in the order table and improve the data query efficiency, and if some information in the order table needs to be modified, only attribute tables such as the website table of the corresponding customer table need to be modified, and each order table with the information does not need to be modified, so that convenience of modifying only one place instead of modifying n places is achieved, and data maintenance in the subsequent order table is facilitated.
Referring to fig. 3, another embodiment of the method for querying express order information according to the embodiment of the present invention includes:
301. writing order numbers and a plurality of order attribute IDs corresponding to the express orders into an order table, wherein the order attribute IDs comprise: customer ID, website ID, province ID, city ID, district ID;
302. taking an order number as an index name, and creating an order table index corresponding to the order table;
303. respectively writing each order attribute value and the detailed information corresponding to each order attribute value into a corresponding order attribute table, wherein the order attribute table comprises: a customer table, a network point table, a province table, a city table and a district table;
304. creating each order attribute ID and a key value pair corresponding to the order attribute value, and writing the key value pair into a cache;
305. reading an order number of an express order to be inquired;
306. taking the order number as an index name, retrieving a preset order table index to obtain order information corresponding to the order number in a preset order table, wherein the order information comprises a plurality of order attribute IDs;
307. searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID;
308. inquiring a customer table in the database according to the customer attribute value of the express order to obtain customer information corresponding to the customer attribute value;
309. inquiring a network point table in the database according to the network point attribute value of the express order to obtain network point information corresponding to the network point attribute value; inquiring a province table in the database according to the province attribute value of the express order to obtain province information corresponding to the province attribute value; inquiring a city table in the database according to the city attribute value of the express order to obtain city information corresponding to the city attribute value; inquiring a district table in the database according to the district attribute value of the express order to obtain the district information corresponding to the district attribute value;
310. and taking the inquired customer information, the website information, the province information, the city information and the district information as information inquiry results of the express orders corresponding to the order numbers and outputting the information inquiry results.
In this embodiment, the order attributes of the express order include, but are not limited to: customer attribute, site attribute, province attribute, city attribute, district attribute. Accordingly, the order attribute ID includes, but is not limited to: customer ID, website ID, province ID, city ID, district ID. The order attribute table includes, but is not limited to: customer table, website table, province table, city table, district table. The following specifically exemplifies the order query process with the data shown in table 1.
For example, an order number of an express order is 1001, and it is assumed that an order table uses a customer attribute, a site attribute, a province attribute, a city attribute, and a prefecture attribute. The query server reads the order number 1001 at present, and then searches the order table index by taking 1001 as an index name, and as can be seen from table 1, the order attribute IDs corresponding to the order number 1001 are a101, B201, C301, D401, and E501, respectively; the query server searches the key value pair in the cache by taking the order attribute ID as a key word to obtain a corresponding order attribute value: client A, website A, Guangdong province, Shenzhen and southern mountain area; and finally, the query server queries corresponding order attribute tables according to the order attribute values, for example, a client A corresponds to a retrieval client table, a website A corresponds to a retrieval website table, Guangdong province corresponds to a retrieval identity table, Shenzhen corresponds to a retrieval city table, and a Nanshan district corresponds to a retrieval district county table, and outputs detailed information of the client A, the website A, Guangdong province, Shenzhen and the Nanshan district in the attribute tables corresponding to the client A, the website A, the Guangdong province, the Shenzhen and the Nanshan district respectively.
In the embodiment, when the order information of the express is inquired, the order number is read firstly, then the index of the preset order table is retrieved by taking the order number as the index name, and the order attribute ID in the order table corresponding to the order number is obtained; searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID; and finally, inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value, wherein the detailed information is the detailed order information of the express order. In the embodiment, the data query mode is adjusted correspondingly by improving the content record form of the order table, the order attribute value corresponding to the order number can be obtained only by retrieving the order table index and the key value pair, and then the corresponding attribute value table is accurately queried according to the order attribute value, so that the data retrieval efficiency is improved,
the above description of the method for querying the order information of the express mail in the embodiment of the present invention, and the following description of the apparatus for querying the order information of the express mail in the embodiment of the present invention refer to fig. 4, where an embodiment of the apparatus for querying the order information of the express mail in the embodiment of the present invention includes:
the reading module 401 is used for reading the order number of the express order to be inquired;
an index retrieval module 402, configured to retrieve a preset order table index with the order number as an index name, to obtain order information corresponding to the order number in a preset order table, where the order information includes multiple order attribute IDs;
a key value retrieval module 403, configured to retrieve preset key value pairs in the cache by using each order attribute ID as a keyword, to obtain an order attribute value corresponding to each order attribute ID;
the query module 404 is configured to query a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
and an output module 405, configured to output detailed information corresponding to each order attribute value.
In the embodiment, the data query mode is correspondingly adjusted by improving the content record form of the order table, only the order number and each order attribute ID are stored in the order table, the order attribute value corresponding to the order number can be obtained only by retrieving the order table index and the key value pair in order data query, then the corresponding attribute value table is accurately queried according to the order attribute value and order detailed data is obtained from the attribute table, so that the order data retrieval efficiency is improved, and in addition, the key value pair is stored in the cache, so that the order information retrieval speed is further accelerated.
Referring to fig. 5, another embodiment of the device for querying express order information according to the embodiment of the present invention includes:
an order table processing module 501, configured to write an order number and a plurality of order attribute IDs corresponding to each express order into an order table; and establishing an order table index corresponding to the order table by taking the order number as an index name.
An attribute table processing module 502, configured to write each order attribute value and the detailed information corresponding to each order attribute value into the corresponding order attribute table, respectively; and creating a key value pair of each order attribute ID and the corresponding order attribute value, and writing the key value pair into a cache.
The reading module 503 is used for reading the order number of the express order to be inquired;
an index retrieval module 504, configured to retrieve a preset order table index with the order number as an index name, to obtain order information corresponding to the order number in a preset order table, where the order information includes multiple order attribute IDs;
a key value retrieval module 505, configured to retrieve preset key value pairs in the cache by using each order attribute ID as a keyword, to obtain an order attribute value corresponding to each order attribute ID;
the query module 506 is configured to query the corresponding order attribute table in the preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
and an output module 507, configured to output detailed information corresponding to each order attribute value.
Optionally, the order attribute ID includes: customer ID, website ID, province ID, city ID, district ID.
Optionally, the order attribute table stored in the database includes: a customer table, a network point table, a province table, a city table and a district table;
the system comprises a client table, a network point table, a province table, a city table and a district table, wherein the client table is used for storing client information, the network point table is used for storing network point information, the province table is used for storing province information, the city table is used for storing city information, and the district table is used for storing district information.
Optionally, the query module 506 is specifically configured to:
(1) inquiring a customer table in the database according to the customer attribute value of the express order to obtain customer information corresponding to the customer attribute value;
(2) inquiring a network point table in the database according to the network point attribute value of the express order to obtain network point information corresponding to the network point attribute value;
(3) inquiring a province table in the database according to the province attribute value of the express order to obtain province information corresponding to the province attribute value;
(4) inquiring a city table in the database according to the city attribute value of the express order to obtain city information corresponding to the city attribute value;
(5) and inquiring a district and county table in the database according to the district and county attribute value of the express order to obtain the district and county information corresponding to the district and county attribute value.
Optionally, the output module 507 is specifically configured to:
and taking the inquired customer information, the website information, the province information, the city information and the district information as information inquiry results of the express orders corresponding to the order numbers and outputting the information inquiry results.
In this embodiment, each piece of order information is written into the database and is respectively written into different attribute tables according to the attribute type of the information, some indicative numbers ID and the like are used to represent corresponding information, such as customer information, such as a customer name corresponding to a customer ID, information, such as a network name address corresponding to a network ID, and the like, only the information, such as the customer ID, the network ID, a province ID, a city ID and the like, is recorded in the order table, and corresponding detailed information can be found in the customer table, the network table, the province table and the city table through the IDs. The table structure design of the embodiment can reduce the data volume written in the order table and improve the data query efficiency, and if some information in the order table needs to be modified, only attribute tables such as the website table of the corresponding customer table need to be modified, and each order table with the information does not need to be modified, so that convenience of modifying only one place instead of modifying n places is achieved, and data maintenance in the subsequent order table is facilitated.
Fig. 4 and 5 describe the express order information query device in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the express order information query device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 6 is a schematic structural diagram of an express order information query device according to an embodiment of the present invention, where the express order information query device 600 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing applications 633 or data 632. Memory 620 and storage medium 630 may be, among other things, transient or persistent storage. The program stored on the storage medium 630 may include one or more modules (not shown), each of which may include a series of instruction operations in the device 600 for querying the order information of the dispatch. Still further, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the dispatch order information query device 600.
The express order information query device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input/output interfaces 660, and/or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the configuration of the express order information query device shown in fig. 6 does not constitute a limitation of the express order information query device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, or a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the express order information query method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. An express order information query method is characterized by comprising the following steps:
reading an order number of an express order to be inquired;
taking the order number as an index name, retrieving a preset order table index to obtain order information corresponding to the order number in a preset order table, wherein the order information comprises a plurality of order attribute IDs;
searching preset key value pairs in the cache by taking each order attribute ID as a keyword to obtain order attribute values corresponding to each order attribute ID;
inquiring a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
and outputting detailed information corresponding to each order attribute value.
2. The method for inquiring express order information according to claim 1, wherein before the reading of the order number of the express order to be inquired, the method further comprises:
writing order numbers and a plurality of order attribute IDs corresponding to the express orders into an order table;
and establishing an order table index corresponding to the order table by taking the order number as an index name.
3. The method for inquiring express order information according to claim 1, wherein before the reading of the order number of the express order to be inquired, the method further comprises:
respectively writing each order attribute value and the detailed information corresponding to each order attribute value into a corresponding order attribute table;
and creating a key value pair of each order attribute ID and the corresponding order attribute value, and writing the key value pair into a cache.
4. An express order information query method according to any one of claims 1-3, wherein the order attribute ID comprises: customer ID, website ID, province ID, city ID, district ID.
5. The method of querying information on an express order according to claim 4, wherein the order attribute table stored in the database comprises: a customer table, a network point table, a province table, a city table and a district table;
the system comprises a client table, a network point table, a province table, a city table and a district table, wherein the client table is used for storing client information, the network point table is used for storing network point information, the province table is used for storing province information, the city table is used for storing city information, and the district table is used for storing district information.
6. The method for querying express order information according to claim 5, wherein querying a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value comprises:
inquiring a customer table in the database according to the customer attribute value of the express order to obtain customer information corresponding to the customer attribute value;
inquiring a network point table in the database according to the network point attribute value of the express order to obtain network point information corresponding to the network point attribute value;
inquiring a province table in the database according to the province attribute value of the express order to obtain province information corresponding to the province attribute value;
inquiring a city table in the database according to the city attribute value of the express order to obtain city information corresponding to the city attribute value;
and inquiring a district and county table in the database according to the district and county attribute value of the express order to obtain the district and county information corresponding to the district and county attribute value.
7. The method of querying express order information of claim 6, wherein the outputting detailed information corresponding to each order attribute value comprises:
and taking the inquired customer information, the website information, the province information, the city information and the district information as information inquiry results of the express orders corresponding to the order numbers and outputting the information inquiry results.
8. An express mail order information inquiry device, characterized in that, the express mail order information inquiry device includes:
the reading module is used for reading the order number of the express order to be inquired;
the index retrieval module is used for retrieving a preset order list index by taking the order number as an index name to obtain order information corresponding to the order number in a preset order list, wherein the order information comprises a plurality of order attribute IDs;
the key value retrieval module is used for retrieving the preset key value pairs in the cache by taking each order attribute ID as a key word to obtain the order attribute value corresponding to each order attribute ID;
the query module is used for querying a corresponding order attribute table in a preset database according to each order attribute value to obtain detailed information corresponding to each order attribute value;
and the output module is used for outputting the detailed information corresponding to each order attribute value.
9. An express order information inquiry apparatus, characterized in that the express order information inquiry apparatus comprises: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the dispatch order information query device to perform the dispatch order information query method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the express order information query method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010164816.3A CN111352960B (en) | 2020-03-11 | 2020-03-11 | Express order information query method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010164816.3A CN111352960B (en) | 2020-03-11 | 2020-03-11 | Express order information query method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111352960A true CN111352960A (en) | 2020-06-30 |
CN111352960B CN111352960B (en) | 2023-05-12 |
Family
ID=71197273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010164816.3A Active CN111352960B (en) | 2020-03-11 | 2020-03-11 | Express order information query method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111352960B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113902201A (en) * | 2021-10-15 | 2022-01-07 | 首约科技(北京)有限公司 | Optimization method for detecting conflict list of taxi booking drivers |
CN114862446A (en) * | 2022-04-07 | 2022-08-05 | 江苏银承网络科技股份有限公司 | Virtual asset processing method, device and equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8949147B1 (en) * | 2001-05-18 | 2015-02-03 | New Breed, Inc. | Methods and systems for tracking a product or service within a supply |
WO2019076001A1 (en) * | 2017-10-18 | 2019-04-25 | 北京京东尚科信息技术有限公司 | Information updating method and device |
CN110288288A (en) * | 2019-05-23 | 2019-09-27 | 中国平安财产保险股份有限公司 | Intelligent order processing method, apparatus, computer equipment and storage medium |
-
2020
- 2020-03-11 CN CN202010164816.3A patent/CN111352960B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8949147B1 (en) * | 2001-05-18 | 2015-02-03 | New Breed, Inc. | Methods and systems for tracking a product or service within a supply |
WO2019076001A1 (en) * | 2017-10-18 | 2019-04-25 | 北京京东尚科信息技术有限公司 | Information updating method and device |
CN110288288A (en) * | 2019-05-23 | 2019-09-27 | 中国平安财产保险股份有限公司 | Intelligent order processing method, apparatus, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
高玉平;: "海量图书检索信息的快速查询系统优化设计研究" * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113902201A (en) * | 2021-10-15 | 2022-01-07 | 首约科技(北京)有限公司 | Optimization method for detecting conflict list of taxi booking drivers |
CN113902201B (en) * | 2021-10-15 | 2024-09-10 | 首约科技(北京)有限公司 | Optimization method for detecting conflict list of network taxi drivers |
CN114862446A (en) * | 2022-04-07 | 2022-08-05 | 江苏银承网络科技股份有限公司 | Virtual asset processing method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111352960B (en) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7809752B1 (en) | Representing user behavior information | |
CN106326361B (en) | Data query method and device based on HBase database | |
CN106528787B (en) | query method and device based on multidimensional analysis of mass data | |
US10296622B1 (en) | Item attribute generation using query and item data | |
CN110795524B (en) | Main data mapping processing method and device, computer equipment and storage medium | |
US20130339369A1 (en) | Search Method and Apparatus | |
US11567999B2 (en) | Using a B-tree to store graph information in a database | |
WO2018097846A1 (en) | Edge store designs for graph databases | |
CN111352960B (en) | Express order information query method, device, equipment and storage medium | |
WO2013106595A2 (en) | Processing store visiting data | |
CN108319608A (en) | The method, apparatus and system of access log storage inquiry | |
US6987845B1 (en) | Methods, systems, and computer-readable mediums for indexing and rapidly searching data records | |
US20230153455A1 (en) | Query-based database redaction | |
CN109101512B (en) | Construction method of legal database, legal data query method and device | |
CN113722296A (en) | Agricultural information processing method and device, electronic equipment and storage medium | |
CN111680072B (en) | System and method for dividing social information data | |
CN111242751B (en) | Express order updating method, device, equipment and storage medium | |
CN110008407B (en) | Information retrieval method and device | |
CN102129454A (en) | Method and system for processing encyclopaedia data based on cloud storage | |
US20170242836A1 (en) | Architecture, system and method for storing files and data in organized grid format | |
CN115080684B (en) | Network disk document indexing method and device, network disk and storage medium | |
CN115982205A (en) | Intelligent collection system and collection method for massive multi-metadata | |
CN114253925B (en) | Method, server, terminal and electronic equipment for accessing database logs | |
CN111753020A (en) | Method and device for establishing relational network model | |
US20070233718A1 (en) | Generating and utilizing composite keys in lieu of compound keys |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |