Disclosure of Invention
In view of the above, the embodiment of the invention provides a method and a device for distributing the grid openings in real time, which can realize the real-time distribution of the grid openings, effectively improve the utilization rate of the grid openings and improve the package sorting efficiency.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a method for distributing a grid in real time.
The method for distributing the grid openings in real time comprises the following steps: under the condition that a grid unlocking instruction to be allocated is received, determining the number of packages of each site to be allocated currently; determining the number of the allocated grids of each site and the total number of the grids; and determining a target site according to the number of packages of each site, the number of allocated grids of each site and the total number of grids, and binding the grids to be allocated with the target site.
Optionally, the step of determining the target site according to the number of packages of each site, the number of allocated sites and the total number of sites includes: determining the total quantity of packages according to the quantity of packages at each site; determining the theoretical distribution grid number of each site according to the package number, the package total number and the grid total number of each site; and calculating the ratio of the number of the allocated grids of each station to the number of the theoretical allocation grids, and determining the station with the minimum ratio as the target station.
Optionally, the step of determining the number of packages for each site currently to be allocated includes: under the condition that the package reaches the conveyor, determining a destination station according to the identification information of the reached package, and adding 1 to the number of packages at the destination station; in the case of a parcel drop-in portal, the number of parcels dropped into the destination site of the parcel is reduced by 1.
Optionally, before determining the number of packages of each site to be currently distributed, the method further includes: determining the last binding site of the to-be-allocated grid according to the historical binding site information of the to-be-allocated grid; and determining that the number of allocated grids of the last bound site is greater than 1.
Optionally, the method further comprises: the method comprises the steps of regularly obtaining time records of all grid states according to preset time intervals; determining the grid openings which do not reach the full grid state within a preset time threshold according to the time records of all the grid openings in the full grid state and the current time; according to the determined information of the grid binding sites, screening the grid with the number of the allocated grid of the binding sites being more than 1; and locking the grid of the screened grid openings, and solving an allocation unlocking instruction.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for distributing a grid in real time.
The device for distributing the grid ports in real time comprises the following steps:
the parcel number determining module is used for determining the parcel number of each station to be distributed currently under the condition that a grid unlocking instruction to be distributed is received;
the grid number determining module is used for determining the number of the distributed grid openings of each site and the total number of the grid openings;
and the target site determining module is used for determining a target site according to the number of packages of each site, the number of allocated sites and the total number of sites, and binding the sites to be allocated with the target site.
Optionally, the target site determining module is further configured to determine a total number of packages according to the number of packages at each site; determining the theoretical distribution grid number of each site according to the package number, the package total number and the grid total number of each site; and calculating the ratio of the number of the allocated grids of each station to the number of the theoretical allocation grids, and determining the station with the minimum ratio as the target station.
Optionally, the parcel number determining module is further configured to determine a destination station according to the identification information of the arriving parcel when the parcel arrives at the conveyor, and add 1 to the parcel number of the destination station; in the case of a parcel drop-in portal, the number of parcels dropped into the destination site of the parcel is reduced by 1.
Optionally, the method further comprises a last binding site determining module, configured to determine, according to the information of the historical binding site of the to-be-allocated site, a site to which the to-be-allocated site is bound last time; and determining that the number of allocated grids of the last bound site is greater than 1.
Optionally, the system further comprises a monitoring module, wherein the monitoring module is used for regularly acquiring time records of all grid opening full grid states according to preset time intervals; determining the grid openings which do not reach the full grid state within a preset time threshold according to the time records of all the grid openings in the full grid state and the current time; according to the determined information of the grid binding sites, screening the grid with the number of the allocated grid of the binding sites being more than 1; and locking the grid of the screened grid openings, and solving an allocation unlocking instruction.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of allocating a bin in real time of any of the above.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the method of allocating a bin in real time of any one of the above.
One embodiment of the above invention has the following advantages or benefits: each bin is reassigned when unlocked (transition from full bin or disabled state to enabled state). When the sorting system generates an unlocking instruction for the grid, the grid is to be allocated and needs to be reallocated. When the unlocked grid openings to be allocated are re-allocated, determining a target site according to the number of packages of each site to be allocated currently, the number of allocated grid openings of each site and the total number of grid openings, and binding the target site with the grid openings to be allocated, namely, allocating the grid openings to the target site. Furthermore, the allocation of the grid openings is adjusted in real time in the package transmission process. And the utilization rate of the grid openings is effectively improved, and the package sorting efficiency is improved.
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 main flow of a method for allocating a grid in real time according to an embodiment of the present invention, and as shown in fig. 1, the method for allocating a grid in real time according to an embodiment of the present invention mainly includes:
step S101: and under the condition that a grid unlocking instruction to be allocated is received, determining the number of packages of each site to be allocated currently. In the embodiment of the invention, the packages arriving on the conveyor are packages to be distributed, and the packages to be distributed fall into the grid through the conveyor and then arrive at each station. After the woven bag or cage of the compartment is fully packed, the empty woven bag or cage needs to be replaced for the compartment, and in order to prevent the woven bag or cage from falling during the replacement, the compartment is marked as full in the sorter control system during the replacement, and the compartment is locked (the package cannot fall into the compartment). Or the grid is in a problem or the woven bag or the cage car is out of order and needs to be maintained, the package can not fall into the grid at the moment, the grid is marked as forbidden in the control system of the sorting machine during maintenance, and the grid is locked. And when the replacement or maintenance is finished, the sorting system generates an unlocking instruction for the grid. During one wave production period, as the packages on the conveyor continuously fall into each grid, each grid can always display a full grid state, and each grid of the conveyor can receive unlocking instructions at random. Compared with the prior art, the method and the device have the advantages that the binding relation between the grid and the site cannot be changed in the whole wave production process for the grid arranged on one conveyor, and the grid on the conveyor is redistributed (the binding relation between the grid and the site is changed) every time the grid is unlocked in the wave production process.
In the process, in the case that the package reaches the conveyor, the destination site is determined according to the identification information of each arriving package, and the number of packages at the destination site is increased by 1. And in the case of a parcel drop-in port, subtracting 1 from the number of parcels dropped into the destination site of the parcel. After the package reaches the conveyor, the corresponding destination site is needed to be reached through the grid, firstly, the destination site can be obtained according to the identification information (package number or name and icon identification) of the package by scanning the bar code of the package, and the number of packages of the destination site is increased by 1. If the package falls into the grid, the package does not need grid resources, and the number of packages of the destination site corresponding to the package is reduced by 1. Through the above process, the number of packages of each site to be distributed currently can be determined, and the determined number is real-time data.
And before determining the number of packages of each site to be distributed currently, determining the last bound site of the to-be-distributed sites according to the information of the to-be-distributed site history binding sites. And determining that the number of allocated ports of the last bound site is greater than 1. When the corresponding relation between the lattice ports and the sites is configured, one site can configure one or more lattice ports, and the number of the lattice ports allocated is greater than 1, namely the number of lattice ports bound by the site is greater than 1, namely the site is bound by other lattice ports besides the current lattice ports.
Step S102: the number of allocated ports and the total number of ports for each site are determined. When a site binds with a grid, the grid is allocated to the site, and the number of the allocated grid of each site can be recorded through a data table. When a new grid is allocated to the site or the binding relation between the grid and the site is released, the data table is updated, so that the data recorded in the data table is the data allocated to the current latest grid. The total number of bins refers to the number of all bins currently available to the host transmitter.
Step S103: and determining a target site according to the number of packages of each site, the number of allocated grids of each site and the total number of grids, and binding the grids to be allocated with the target site. Specifically, determining the total number of packages according to the number of packages at each site; determining the theoretical distribution grid number of each site according to the number of packages, the total number of packages and the total number of grid openings of each site; and calculating the ratio of the number of the allocated grids of each station to the number of the theoretical allocated grids, and determining the station with the minimum ratio as the target station. The ratio is the smallest, which means that the grid resources of the site are most needed to be supplemented in terms of package proportion. For example, the main conveyor has a total of s bins, two of the bins are respectively bin 1 and bin 2, the number of packages at bin 1 on the main conveyor is currently m, the number of packages at bin 2 is n, and the total number of packages is m+n. Then, the product of m/(m+n) and s is the theoretical number of allocated apertures of the station 1, a1, and the product of n/(m+n) and s is the theoretical number of allocated apertures of the station 2, b1. As can be seen from the inquiry, the number of allocated ports (the number of actually allocated ports) of the stations 1 and 2 is a2 and b2, respectively. The ratio of a2 to a1, the ratio of b2 to b1 can be further calculated, the size of the two ratios is judged, and if the ratio of the station 1 is small, the to-be-allocated lattice is allocated to the station 1.
The method for distributing the grid openings in real time in the embodiment of the invention further comprises the following steps: the method comprises the steps of regularly obtaining time records of all grid states according to preset time intervals; determining the grid openings which do not reach the full grid state within a preset time threshold according to the time records of all the grid openings in the full grid state and the current time; according to the determined information of the grid binding sites, screening the grid with the number of the allocated grid of the binding sites being more than 1; and locking the grid of the screened grid openings, and solving an allocation unlocking instruction. By timing tasks, the allocated socket for which no unlock instruction was received is monitored. If the time of the last full grid state of the monitored grid at the current time exceeds a preset time threshold, namely the grid is in a relatively idle state within a quite long time, and the grid allocated by the binding site is more than one, the grid is forcedly reallocated, and the utilization rate of the grid is further improved.
FIG. 2 is a schematic diagram of a method of allocating a bin in real time according to an embodiment of the invention; as shown in fig. 2, the instructions capable of triggering the bin unlock operation include a bin full bin and a timed task scanning to a bin that has not been full for more than t minutes. After the unlocking operation is triggered, an unlocking instruction of the grid can be received, and the mechanical energy is used for reassigning the grid.
First, the theoretical number of allocated bins per site can be calculated. In the process, the theoretical distribution grid number of each site can be determined through the proportion of the number of packages of each site to the total number of packages and the total number of grids. Quantity of packages a for each site at present i Summing up to the current package aggregate A, i representing each site, a i Dividing M to obtain the wrapping proportion p of each site, and multiplying p by the total number s of the grids to obtain the theoretical distribution grid number (the grid number to be distributed) b of each site i 。
Then, the number of allocated bins for each station is determined. And determining the number of the allocated grid openings of each site through the configured corresponding relation between the sites and the grid openings. The corresponding relationship between the site and the grid is as follows:
as can be seen from the above table, the allocated grid openings of the "beijing national trade station" stations are ch ute1 and ch ute2, the number of allocated grid openings of the "beijing national trade station" stations is 2, and correspondingly, the number of allocated grid openings of the "beijing apple orchard station" stations is 1, the number of allocated grid openings of the "beijing on-ground station" stations is 3, the number of allocated grid openings of the "beijing ten river station" stations is 1, and the number of allocated grid openings of the "beijing military station" stations is 1.
And further, calculating the ratio of the number of the allocated grids of each station to the number of the theoretically allocated grids, and determining the station with the minimum ratio as the target station.
Each bin is reassigned when unlocked (transition from full bin or disabled state to enabled state). When the sorting system generates an unlocking instruction for the grid, the grid is to be allocated and needs to be reallocated. When the unlocked lattice ports to be allocated are re-allocated, in order to ensure that each lattice port is allocated, firstly, the last bound lattice port before the lattice ports to be allocated are determined, and at least two lattice ports are allocated. And then, determining a target site according to the number of packages of each site to be allocated, the number of allocated grids of each site and the total number of grids, and binding the target site with the grids to be allocated, namely, allocating the grids to the target site. Furthermore, the allocation of the grid openings is adjusted in real time in the package transmission process. And the utilization rate of the grid openings is effectively improved, and the package sorting efficiency is improved. And monitoring the allocated grid port without receiving an unlocking instruction for the grid port through the timing task. If the time of the last full grid state of the monitored grid at the current time exceeds a preset time threshold, namely the grid is in a relatively idle state within a quite long time, and the grid allocated by the binding site is more than one, the grid is forcedly reallocated, and the utilization rate of the grid is further improved.
Fig. 3 is a schematic diagram of main modules of an apparatus for real-time allocating a bin according to an embodiment of the present invention, and as shown in fig. 3, an apparatus 300 for real-time allocating a bin according to an embodiment of the present invention includes a parcel number determining module 301, a bin number determining module 302, and a destination station determining module 303.
The package quantity determining module 301 is configured to determine, when receiving a to-be-allocated format unlock instruction, a package quantity of each site to be allocated currently. The parcel quantity determining module is also used for determining a destination station according to the identification information of the arriving parcel and adding 1 to the parcel quantity of the destination station under the condition that the parcel arrives at the conveyor; in the case of a parcel drop-in portal, the number of parcels that drop into the destination site of the parcel is reduced by 1.
The number of bins determination module 302 is configured to determine the number of bins allocated and the total number of bins for each station.
The target site determining module 303 is configured to determine a target site according to the number of packages of each site, the number of allocated sites of each site, and the total number of sites, and bind the sites to be allocated with the target site. The standard site determining module is also used for determining the total number of packages according to the number of packages at each site; determining the theoretical distribution grid number of each site according to the number of packages, the total number of packages and the total number of grid openings of each site; and calculating the ratio of the number of the allocated grids of each station to the number of the theoretical allocated grids, and determining the station with the minimum ratio as the target station.
The device for distributing the grid in real time further comprises a last binding site determining module, wherein the last binding site determining module is used for determining the last binding site of the grid to be distributed according to the information of the historical binding sites of the grid to be distributed; it is determined that the number of allocated bins for the last bound site is greater than 1.
The device for distributing the grid openings in real time further comprises a monitoring module, wherein the monitoring module is used for regularly acquiring time records of all grid openings in full grid states according to preset time intervals; determining the grid openings which do not reach the full grid state within a preset time threshold according to the time records of all the grid openings in the full grid state and the current time; according to the determined information of the grid binding sites, screening the grid with the number of the allocated grid of the binding sites being more than 1; and locking the grid of the screened grid openings, and solving an allocation unlocking instruction.
In the embodiment of the invention, each grid is redistributed when being unlocked (the full grid or the disabled state is changed into the enabled state). When the unlocked lattice ports are reassigned, in order to ensure that each lattice port is assigned with one lattice port, firstly, the last bound site before the lattice port is unlocked is determined, and at least two lattice ports are assigned. Then, determining a target site according to the number of packages of each site to be allocated, the number of allocated grids of each site and the total number of grids, and binding the target site with the grids to finish the re-allocation of the unlocking grids; furthermore, the allocation of the grid openings is adjusted in real time in the package transmission process. And the utilization rate of the grid openings is effectively improved, and the package sorting efficiency is improved. And monitoring the allocated grid port without receiving an unlocking instruction for the grid port through the timing task. If the time of the last full grid state of the monitored grid at the current time exceeds a preset time threshold, namely the grid is in a relatively idle state within a quite long time, and the grid allocated by the binding site is more than one, the grid is forcedly reallocated, and the utilization rate of the grid is further improved.
Fig. 4 illustrates an exemplary system architecture 400 to which the method of allocating a bin in real time or the apparatus of allocating a bin in real time of an embodiment of the invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 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. (by way of example only) may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various 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 405 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 401, 402, 403. 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 method for allocating the ports in real time according to the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for allocating the ports in real time is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 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. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 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 509, and/or installed from the removable media 511. 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) 501.
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 an acquire package quantity determination module, a bin quantity determination module, and a destination site determination module. The names of these modules do not limit the module itself in some cases, for example, the parcel number determination module may also be described as "a module for determining the parcel number of each station to be currently distributed when receiving a to-be-distributed slot unlock instruction".
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: under the condition that a grid unlocking instruction to be allocated is received, determining the number of packages of each site to be allocated currently; determining the number of the allocated grids of each site and the total number of the grids; and determining a target site according to the number of packages of each site, the number of allocated grids of each site and the total number of grids, and binding the grids to be allocated with the target site.
In the embodiment of the invention, each grid is redistributed when being unlocked (the full grid or the disabled state is changed into the enabled state). When the unlocked lattice ports are reassigned, in order to ensure that each lattice port is assigned with one lattice port, firstly, the last bound site before the lattice port is unlocked is determined, and at least two lattice ports are assigned. Then, determining a target site according to the number of packages of each site to be allocated, the number of allocated grids of each site and the total number of grids, and binding the target site with the grids to finish the re-allocation of the unlocking grids; furthermore, the allocation of the grid openings is adjusted in real time in the package transmission process. And the utilization rate of the grid openings is effectively improved, and the package sorting efficiency is improved.
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.