Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a device for sorting orders, which can improve the success rate of automatic determination of dispatch sites and the efficiency of manual sorting operation of orders by recording all address information of orders, converting specific address information into address identifiers with larger coverage areas, and recording corresponding relation information of the address identifiers and the dispatch sites.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a method of order sorting, including:
acquiring an order address, and converting the order address into an address identifier in a preset format;
inquiring a dispatch site corresponding to the address identifier from a preset address table;
and sorting the articles corresponding to the orders to the dispatch site.
Optionally, converting the order address into an address identifier in a preset format includes:
when the order address of the order is not modified, converting the order address;
and when the order address of the order is modified, converting the order addresses before and after the order is modified.
Optionally, the information in the address identifier includes at least one of: province, city, state, district, county, village, and town;
the information in the address identifier further includes: and (5) road area identification.
Optionally, before querying the dispatch site corresponding to the address identifier from a preset address table, the method further includes:
confirming that the dispatch site information corresponding to the address identification exists in the address table;
if not, determining the dispatch site corresponding to the address identifier; and storing the corresponding relation information of the address identification and the dispatch site in an address table.
Optionally, updating the address table as follows:
judging whether the corresponding relation information of the address identification-dispatch site in the address table is changed or not;
if yes, updating the address table.
Optionally, sorting the item corresponding to the order to the dispatch site includes:
when the order address of the order is not modified, sorting the articles in the order to a dispatch site corresponding to the order address;
and when the order address of the order is modified, sorting the articles in the order to a dispatch site corresponding to the last modified order address.
According to still another aspect of an embodiment of the present invention, there is provided an order sorting apparatus including:
the conversion module is used for obtaining an order address and converting the order address into an address identification in a preset format;
the inquiry module is used for inquiring the dispatch site corresponding to the address identifier from a preset address table;
and the sorting module is used for sorting the articles corresponding to the orders to the dispatch site.
Optionally, the converting module converts the order address into an address identifier in a preset format, including:
when the order address of the order is not modified, converting the order address;
and when the order address of the order is modified, converting the order addresses before and after the order is modified.
Optionally, the information in the address identifier includes at least one of: province, city, state, district, county, village, and town;
the information in the address identifier further includes: and (5) road area identification.
Optionally, before querying the dispatch site corresponding to the address identifier from a preset address table, the query module further includes:
confirming that the dispatch site information corresponding to the address identification exists in the address table;
if not, determining the dispatch site corresponding to the address identifier; and storing the corresponding relation information of the address identification and the dispatch site in an address table.
Optionally, the query module is further configured to update the address table as follows:
judging whether the corresponding relation information of the address identification-dispatch site in the address table is changed or not;
if yes, updating the address table.
Optionally, the sorting module sorts the articles corresponding to the order to the dispatch site, including:
when the order address of the order is not modified, sorting the articles in the order to a dispatch site corresponding to the order address;
and when the order address of the order is modified, sorting the articles in the order to a dispatch site corresponding to the last modified order address.
According to another aspect of an embodiment of the present invention, there is provided an order sorting electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the order sorting method provided by the present invention.
According to yet another aspect of an embodiment of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements the order sorting method provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: because the technical means of recording all address information of the order, converting specific address information into address identification with larger coverage area and recording the corresponding relation information of the address identification and the dispatch site are adopted, the technical problems that the manual sorting workload is large and the address information is easy to lose in the prior art are solved, and the technical effects of improving the success rate of automatically determining the dispatch site of the order and the manual sorting operation efficiency are achieved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of an order sorting method according to an embodiment of the present invention, as shown in fig. 1, including:
step S101, acquiring an order address, and converting the order address into an address identifier in a preset format;
step S102, inquiring a dispatch site corresponding to the address identifier from a preset address table;
and step S103, sorting the articles corresponding to the orders to the dispatch site.
The address table may be located in a preset storage medium (such as redis cache), where correspondence information between address identifiers and dispatch sites may be stored.
The invention can convert the order address into the address identification in the preset format, and inquire the dispatch site corresponding to the address identification from the address table, so as to directly sort the order articles to the dispatch site, thereby improving the automatic sorting success rate and reducing the workload of manual sorting.
In some embodiments, converting the order address into an address identifier in a preset format includes:
when the order address of the order is not modified, converting the order address;
and when the order address of the order is modified, converting the order addresses before and after the order is modified.
All addresses related to the order input by the user can be subjected to format conversion, so that the loss of order information is prevented; compared with the method for directly covering the original address when the order address is modified in the prior art, the method can reserve all data, and can conveniently inquire the error reason when a problem or error occurs.
In practical application, due to factors such as uncertainty of data transmission, a plurality of address information can be received in a short time; when the multithreading problem is processed, the step of converting the acquired address information into the address identification in the invention can be realized by using the queue lock, thereby ensuring the accuracy of order address processing.
In some embodiments, the information in the address identification includes at least one of: province, city, state, district, county, village, and town;
the information in the address identifier further includes: and (5) road area identification.
Since the dispatch site typically corresponds to a range of areas, specific addresses in the order are not necessary in practical applications; information in a specific address may be extracted to translate the specific order address into a larger range of addresses.
In practical application, a specific address in an order can be resolved, and a four-level address in the order can be extracted: province, city, state, district, county, country, and town information; the detailed road area address after the four-level address in the specific address is acquired, for example: the cell A, the cell B, the building C, the cell D and resolving the detailed road area address, extracting road area information in the road area information, such as the cell A; finally, the order address can be converted into a quaternary address identifier and a road area identifier;
the steps can convert the same addresses of different descriptions into uniform descriptions, for example, the 'L-province N-city M area A cell B building C unit D room' and the 'LNM development area A cell B building C unit D room' can be converted into the same address identification 'L-province N-city M area A cell';
the above steps can also convert the near address into a unified description, for example, "the M-district a-B-C-D-room of the N-city, L-province and the M-district a-E-F-room of the LN-city, L-district a-district" of the same address identifier, so that unnecessary operations in the subsequent steps can be saved.
In some embodiments, before querying the dispatch site corresponding to the address identifier from a preset address table, the method further includes:
confirming that the dispatch site information corresponding to the address identification exists in the address table;
if not, determining the dispatch site corresponding to the address identifier; and storing the corresponding relation information of the address identification and the dispatch site in an address table.
In practical application, if some areas are not recorded with an address table, the dispatch site corresponding to the address identifier cannot be determined from the address table; the dispatch site corresponding to the address identification can be determined in a preset mode; after the corresponding relation information of the good address identification and the delivery site is determined, the good address identification and the delivery site are stored in an address table and can be used for automatically processing the same address identification acquired afterwards, so that the sorting efficiency is improved;
the preset mode can be determined according to actual requirements and scenes, for example: a manual query or a custom mode can be adopted; and the dispatch site corresponding to the address identifier can also be determined by learning the corresponding relation between the existing region and the site in a machine learning mode.
In some embodiments, further comprising updating the address table as follows:
judging whether the corresponding relation information of the address identification-dispatch site in the address table is changed or not;
if yes, updating the address table.
When the corresponding relation information of the address identification and the dispatch site is changed, the address table is updated, so that the availability and the credibility of the address table can be ensured, and the wrong dispatch site is prevented from being determined for the order.
In practical application, the action of submitting the order by the user can determine that the address identification is matched with the dispatch site when the order is signed, the dispatch site can determine whether the address identification is matched with the dispatch site correctly, and the upper instruction can inform whether the corresponding relation between the address identification and the dispatch site is changed.
In some embodiments, sorting the item corresponding to the order to the dispatch site includes:
when the order address of the order is not modified, sorting the articles in the order to a dispatch site corresponding to the order address;
and when the order address of the order is modified, sorting the articles in the order to a dispatch site corresponding to the last modified order address.
After determining the dispatch site corresponding to the address identifier, sorting the articles in the order to the determined dispatch site for the order with the unmodified order address; for an order with a modified order address, the last modified order address can be determined first, and then the articles in the order are sorted to a dispatch site determined according to the address identification converted by the order address;
so far, the order sorting is completed.
Fig. 2 is a schematic diagram of main modules of an order sorting apparatus according to an embodiment of the present invention, and as shown in fig. 2, the order sorting apparatus 200 includes:
the conversion module 201 is configured to obtain an order address, and convert the order address into an address identifier in a preset format;
the query module 202 is configured to query a preset address table for a dispatch site corresponding to the address identifier;
and the sorting module 203 is configured to sort the articles corresponding to the order to the dispatch site.
The invention can convert the order address into the address identification in the preset format, and inquire the dispatch site corresponding to the address identification from the address table, so as to directly sort the order articles to the dispatch site, thereby improving the automatic sorting success rate and reducing the workload of manual sorting.
In some embodiments, the converting module 201 converts the order address into an address identifier in a preset format, including:
when the order address of the order is not modified, converting the order address;
and when the order address of the order is modified, converting the order addresses before and after the order is modified.
The steps can collect all addresses input by a user about the order, and prevent the loss of order information; compared with the method for directly covering the original address when the order address is modified in the prior art, the method can reserve all data, and can conveniently inquire the error reason when a problem or error occurs.
In practical application, due to factors such as uncertainty of data transmission, a plurality of address information can be received in a short time; when the multithreading problem is processed, the step of converting the acquired address information into the address identification in the invention can be realized by using the queue lock, thereby ensuring the accuracy of order address processing.
In some embodiments, the information in the address identification includes at least one of: province, city, state, district, county, village, and town;
the information in the address identifier further includes: and (5) road area identification.
Since the dispatch site typically corresponds to a range of areas, specific addresses in the order are not necessary in practical applications; information in a specific address may be extracted to translate the specific order address into a larger range of addresses.
In practical application, a specific address in an order can be resolved, and a four-level address in the order can be extracted: province, city, state, district, county, country, and town information; the detailed road area address after the four-level address in the specific address is acquired, for example: the cell A, the cell B, the building C, the cell D and resolving the detailed road area address, extracting road area information in the road area information, such as the cell A; finally, the order address can be converted into a quaternary address identifier and a road area identifier;
the steps can convert the same addresses of different descriptions into uniform descriptions, for example, the 'L-province N-city M area A cell B building C unit D room' and the 'LNM development area A cell B building C unit D room' can be converted into the same address identification 'L-province N-city M area A cell';
the above steps can also convert the near address into a unified description, for example, "the M-district a-B-C-D-room of the N-city, L-province and the M-district a-E-F-room of the LN-city, L-district a-district" of the same address identifier, so that unnecessary operations in the subsequent steps can be saved.
In some embodiments, before the querying module 202 queries the dispatch site corresponding to the address identifier from the preset address table, the querying module further includes:
confirming that the dispatch site information corresponding to the address identification exists in the address table;
if not, determining the dispatch site corresponding to the address identifier; and storing the corresponding relation information of the address identification and the dispatch site in an address table.
In practical application, if some areas are not recorded with an address table, the dispatch site corresponding to the address identifier cannot be determined from the address table; the dispatch site corresponding to the address identification can be determined in a preset mode; after the corresponding relation information of the good address identification and the delivery site is determined, the good address identification and the delivery site are stored in an address table and can be used for automatically processing the same address identification acquired afterwards, so that the sorting efficiency is improved;
the preset mode can be determined according to actual requirements and scenes, for example: a manual query or a custom mode can be adopted; and the dispatch site corresponding to the address identifier can also be determined by learning the corresponding relation between the existing region and the site in a machine learning mode.
In some embodiments, the query module 202 is further configured to update the address table as follows:
judging whether the corresponding relation information of the address identification-dispatch site in the address table is changed or not;
if yes, updating the address table.
When the corresponding relation information of the address identification and the dispatch site is changed, the address table is updated, so that the availability and the credibility of the address table can be ensured, and the wrong dispatch site is prevented from being determined for the order.
In practical application, the action of submitting the order by the user can determine that the address identification is matched with the dispatch site when the order is signed, the dispatch site can determine whether the address identification is matched with the dispatch site correctly, and the upper instruction can inform whether the corresponding relation between the address identification and the dispatch site is changed.
In some embodiments, the sorting module 203 sorts the items corresponding to the order to the dispatch site, including:
when the order address of the order is not modified, sorting the articles in the order to a dispatch site corresponding to the order address;
and when the order address of the order is modified, sorting the articles in the order to a dispatch site corresponding to the last modified order address.
After determining the dispatch site corresponding to the address identifier, sorting the articles in the order to the determined dispatch site for the order with the unmodified order address; for an order with a modified order address, the last modified order address can be determined first, and then the articles in the order are sorted to a dispatch site determined according to the address identification converted by the order address;
so far, the order sorting is completed.
Fig. 3 illustrates an exemplary system architecture 300 in which an order sorting method or order sorting apparatus of an embodiment of the present invention may be applied.
As shown in fig. 3, the system architecture 300 may include terminal devices 301, 302, 303, a network 304, and a server 305. The network 304 is used as a medium to provide communication links between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 305 via the network 304 using the terminal devices 301, 302, 303 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 301, 302, 303.
The terminal devices 301, 302, 303 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 305 may be a server providing various services, such as a background management server providing support for shopping-type websites browsed by the user using the terminal devices 301, 302, 303. The background management server can analyze and other data of the received product information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that, the order sorting method provided in the embodiment of the present invention is generally executed by the server 305, and accordingly, the order sorting device is generally disposed in the server 305.
It should be understood that the number of terminal devices, networks and servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 4, there is illustrated a schematic diagram of a computer system 400 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 4 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In RAM 403, various programs and data required for the operation of system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output portion 407 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 401.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a conversion module, a query module, and a sort module. The names of these modules do not in some cases limit the module itself, and for example, the conversion module may also be described as "a module that sends a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: step S101, acquiring an order address, and converting the order address into an address identifier in a preset format; step S102, inquiring a dispatch site corresponding to the address identifier from a preset address table; and step S103, sorting the articles corresponding to the orders to the dispatch site.
According to the technical scheme provided by the embodiment of the invention, the technical means of recording all address information of the order, converting specific address information into the address identification with larger coverage area and recording the corresponding relation information of the address identification and the dispatch site are adopted, so that the technical problems of high manual sorting workload and easiness in address information loss in the prior art are solved, and the technical effects of improving the success rate of automatic determination of the dispatch site and the manual sorting operation efficiency of the order are further achieved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.